Commit Graph

85 Commits

Author SHA1 Message Date
Ichsan Kurniawan e8818bc234 Align assignment status pipeline UI
This update prioritizes technical status and date-matched assignment status resolution, then falls back to project status when needed. It also tightens milestone/timeline behavior by removing the deploy phase, reordering the stage flow, and adding tooltips for assignment codes, project info, and date ranges. The assignment list and overview helpers now use the resolved status consistently across the dashboard.
2026-10-14 17:45:06 +07:00
Ichsan Kurniawan f0526e4096 Add assignment timeline and activity log
This change adds a milestone timeline and development activity log for assignment detail pages, including a JSON comparison modal for activity history entries. It also extends assignment history types and overview helper logic to surface progress, delivery health, and milestone dates more accurately.
2026-10-14 15:47:50 +07:00
Ichsan Kurniawan 6f52078aa5 Redesign project assignment list
This commit refreshes the client project assignment UI with a new dashboard summary, streamlined card layouts, and shared assignment overview helpers. It adds phase/progress tracking, delivery health indicators, and improved team/status calculations across the assignment grid and list views. It also updates the project assignment type definitions and bumps the app version.
2026-10-13 20:42:59 +07:00
Ichsan Kurniawan 9a04ba7738 Revamp client overview dashboard
This update redesigns the task dashboard around client overview metrics, adding summary cards, project status breakdowns, and milestone timelines for each client. It also adds an active-first sort option, supports customizable search placeholders, and passes the full client list into the dashboard while wrapping the client views in Suspense for smoother loading.
2026-10-13 18:36:38 +07:00
Ichsan Kurniawan fccb901e2a Fix assignment deletion and team removal
This update changes assignment deletion labels to prefer WO/IM names, adds a configurable payload to ConfirmDelete for non-DELETE API calls, and switches team member removal to a PUT endpoint with status REMOVED. It also shortens project autofill toast duration, cleans out stale commented code on the client detail page, and updates the task error badge wording to better reflect app-level failures.
2026-10-13 16:56:20 +07:00
Ichsan Kurniawan 90a34330eb Add assignment tooltips and polish tooltip styles
This update adds richer hover tooltips for assignment codes and date ranges in both grid and list views, showing clearer labels like work order or memo codes and full start/end dates. It also standardizes tooltip visuals with a popover-style card, improved spacing, and better consistency across assignment cards.
2026-10-13 14:47:34 +07:00
Ichsan Kurniawan 0cf6a34522 Lazy-load modal components and fix promote flow
Replace eager modal/action component imports with dynamic (client-only) imports and add a shared ModalActionLoader UI for loading states. Use dynamic imports for ManageTeam, UpdateAdministrationStatus, UpdateTechnicalStatus, and ConfirmDeleteWithInput. Add ConvertedAssignmentBadge to assignment detail. Update ProjectAssignmentForm: replace useSearchParams with useRouter, prevent pre-filling project/work order fields when promoting (isPromote), adjust step handling, and skip project selector when promoting. Minor refactor to improve client-side performance and UX.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-13 13:30:18 +07:00
Ichsan Kurniawan c6aa1c912a Add ConvertedAssignmentBadge and IM conversion UI
Introduce ConvertedAssignmentBadge component to surface conversions between Internal Memos (IM) and Projects with hovercard details for both directions. Integrate the badge into AssignmentGrid and AssignmentList, add origin IM link when a project assignment lacks a project, and reuse formatAssignmentDate. Extend IProjectAssignment type to include im and list_wo fields to support the new UI data paths.
2026-10-13 13:29:37 +07:00
Ichsan Kurniawan a8c15cf3f6 Add task error UI and diagnostic asset
Add a client-side TaskError component at app/(dashboard)/task/error.tsx that displays friendly error states, logs details via clientLogger, offers retry/back/home actions, and a collapsible diagnostics pane with clipboard export and toast feedback. Uses motion/react, lucide-react icons and existing UI primitives (Button, Badge, Card). Also add the illustration asset public/assets/illustrations/server_task_error.webp referenced by the component.
2026-10-13 13:27:26 +07:00
Ichsan Kurniawan 83330418bc Add 'Promote to Project' flow for assignments
Introduce a promote-to-project workflow and related UI/logic changes.

Key changes:
- Add Promote button/link in AssignmentDetail, AssignmentGrid, and AssignmentList to open the ProjectAssignmentForm in promote mode.
- Propagate isPromote flag through pages and ProjectAssignmentForm: lock type to Project, prevent selecting IM, adjust headings/labels, and show badges.
- When promoting, set payload fields (project_id, im_id) accordingly and POST to create a Project from an existing IM.
- Autofill project/work-order fields from existing project selection and fetch WO sequence when project selected.
- Update validation messages, toasts, and minor UI/text sizing tweaks.
- Update UpdateAdministrationStatus to read/write notes (project_assignment_status_notes) and use it as initial remark.
- Extend IProjectAssignment type with im_id and project_assignment_status_notes.
- Remove .env.production.local (deleted).

Files changed: multiple components under app/(dashboard)/task and type.assignment.ts (see diff).
2026-10-12 18:41:10 +07:00
Ichsan Kurniawan f9e4f3de87 Add admin status updates and modal polish
Adds a dedicated administration-status workflow across client, assignment, and project views, including a new UpdateAdministrationStatus modal and action entries in assignment menus. It also improves modal layout consistency, prioritizes project-assignment status badges in list/grid views, and expands badge variants for administration and technical lifecycle states.
2026-10-12 13:32:00 +07:00
Ichsan Kurniawan 8b82372100 Add technical badges and delete confirmation
This update adds dedicated badge variants for technical progression states (Development, SIT, UAT, PTR, Go-live, BAST, Warranty) and improves status text matching for those stages. It also adds a confirmation dialog when deleting a schedule interval, including cleanup for the final remaining interval so the status description is cleared when appropriate and users are told when notes are being removed.
2026-10-12 10:51:08 +07:00
Ichsan Kurniawan f07990a3fb Refactor technical status workflow
Replace the legacy timeline status modal with a technical-status editor that supports multiple date intervals and descriptive notes. Update task views to use the new Update Technical Status action, normalize status-history parsing for array-based date records, and improve badge formatting for technical stages like SIT, UAT, PTR, Go-Live, and BAST.
2026-10-09 18:37:26 +07:00
Ichsan Kurniawan 98ce715ac6 Update ProjectAssignmentForm.tsx 2026-10-08 20:06:56 +07:00
Ichsan Kurniawan de8dafcd92 Enable React Compiler in Next config
This change enables the React Compiler in the Next.js configuration and adds the required Babel plugin dependency. The goal is to allow the app to use React Compiler optimizations during builds and improve rendering performance.
2026-10-08 17:36:42 +07:00
Ichsan Kurniawan bab7bbe272 Improve project assignment flow and form UX
This adds a clearer project assignment workflow with existing-project import, work-order sync, and stronger validation for project and work-order details. It also introduces reusable checkbox and input-group UI primitives and a dedicated loading state for the project assignment screen.
2026-10-08 17:36:25 +07:00
Ichsan Kurniawan aa91f1ac4c Add internal memo metrics to client views
Default client detail view now opens in list mode. The client model and listing UI now include `total_im`, showing internal memo counts across grid and list cards, and the profile summary adds the new metric. This also improves the empty-state description behavior and keeps the client summary stats consistent across views.
2026-10-08 13:19:41 +07:00
Ichsan Kurniawan d3c4e21636 Simplify task dashboard to client view
This change removes the assignment-view toggle from the task dashboard and keeps the page focused on clients, while preserving layout selection behavior with an explicit grid/list state. It also updates the shared Manage Team and Timeline Status modals to use the Dialog component, fixes their close handling, and adds a # prefix to assignment codes for clearer labeling.
2026-10-07 18:25:46 +07:00
Mohamad Ihsan 5be95729c5 update testing note 2026-10-07 16:49:35 +07:00
Ichsan Kurniawan 97b6987a83 Merge branch 'project-assignment' of https://github.com/ichsankurnia/hats-app into project-assignment 2026-10-07 14:08:14 +07:00
Ichsan Kurniawan 69f680bc24 Clean up unused assignment imports
Remove an unused initials helper from the assignment detail component and prune unused lucide-react imports from the assignment grid. This keeps the codebase cleaner and avoids dead code while preserving the current UI behavior.
2026-10-07 14:08:11 +07:00
Mohamad Ihsan 7a88659dfc update testing note 2026-10-07 13:24:17 +07:00
Mohamad Ihsan d59d4295dd Merge branch 'project-assignment' of https://github.com/ichsankurnia/hats-app into project-assignment 2026-10-07 13:09:48 +07:00
Mohamad Ihsan b275c4153d add testing note 2026-10-07 13:09:44 +07:00
Ichsan Kurniawan 200ef0571c Fix fallback images and timeline dates
Updated project assignment forms to use shared client/end-user fallback images and improve avatar presentation in selection lists and detail panels. Also normalized timeline and team date payloads to send YYYY-MM-DD values instead of ISO timestamps, and default missing project years to the current year.
2026-10-07 12:16:52 +07:00
Ichsan Kurniawan 3f0ed29f0c Improve image fallbacks and status display
This commit adds reusable client and end-user fallback assets and updates profile cards, lists, and assignment views to render graceful placeholders when images are missing or fail to load. It also hardens the shared LazyImage component with fallback handling and improves BadgeStatus so it accepts object-like status values and still renders clean labels. Minor UX fixes include dismissing upload toasts after completion and clarifying end-user form labels/copy.
2026-10-07 12:16:03 +07:00
Ichsan Kurniawan c6ecabd084 Refresh task loading skeletons
Updated loading states across the task dashboard, client detail, and project detail pages to match the current UI structure more closely. This change standardizes placeholder shapes, improves accessibility labels, and refines skeleton layouts for headers, stat blocks, filters, and card grids for a more consistent loading experience.
2026-10-07 11:17:21 +07:00
Ichsan Kurniawan 0d9a284a3f Update ProjectAssignmentForm.tsx 2026-10-06 15:58:52 +07:00
Ichsan Kurniawan bd42c2defa Revamp task client and project detail pages
This commit adds dedicated loading states and a reusable Reveal animation, and refactors the task client/project detail flows to present a cleaner summary UI. It introduces richer client and project headers, delivery overview cards, improved work-order timeline/team sections, and more consistent visual styling across the task dashboard. The update also improves mobile readability and team assignment presentation, while keeping the same underlying data flow.
2026-10-06 15:58:43 +07:00
Ichsan Kurniawan 26f2c16608 Add design-taste frontend skill
Adds the design-taste-frontend anti-slop frontend skill and lock metadata. It introduces a design-read workflow, dial-based styling guidance, redesign safeguards, motion/accessibility guardrails, and a final preflight checklist for landing pages and portfolio interfaces.
2026-10-06 11:24:57 +07:00
Ichsan Kurniawan 93a9b489d0 Improve task views mobile responsiveness
This commit updates the task dashboard and assignment views for smaller screens by tightening spacing, improving text wrapping, and making filter/search controls responsive. It also refreshes the assignment detail layout with clearer date spans, team summaries, and switchable grid/list member views, while polishing client and assignment cards for better readability on mobile.
2026-10-06 11:24:30 +07:00
Ichsan Kurniawan d0db9ee429 Add VPS deployment automation
This change adds staging and production deployment configuration for the VPS setup, including `.env.deploy.example`, `.env.staging`, and updated production environment values. It also introduces a PowerShell deployment script that builds the app, packages the Next.js artifact, uploads it to the server, and reloads PM2. Package scripts were added for staging and production deploys, and the TypeScript config now excludes legacy `.old` files.
2026-10-05 19:52:11 +07:00
Ichsan Kurniawan ffcf3c6e58 Refactor task views with layout toggles
This commit reorganizes client and project-assignment screens into dedicated grid/list components, adds a shared layout toggle via the URL query string, and updates task pages to render the selected view consistently. It also moves shared client form logic into a client folder, improves status badge formatting, extends LazyImage with custom image classes, and updates the illustration assets and Lucide dependency used in the task UI.
2026-10-01 18:32:56 +07:00
Ichsan Kurniawan f9829de388 Add antislop core and UI/layout skills
Introduce the antislop filter and supporting skills: adds .agents/skills/antislop/SKILL.md (core), antislop-ui/SKILL.md, antislop-layoutmobile/SKILL.md, and antislop/VERSION. Adds AGENTS.md pointer block referencing the installed skills. Update .gitignore to include anti-slop and fix a newline. These files provide rules, checklists, and delivery gates to prevent generic AI UI slop and guide UI/mobile work.
2026-10-01 18:31:37 +07:00
Ichsan Kurniawan 2853954cbc Add optional chaining for party and people props
Guard against null/undefined values by adding optional chaining to property accesses. In AssignmentDetailComponent.tsx, use party?.name, party?.photo, party?.description and make initials accept a possibly undefined name (name?.split...). In AssignedPeople.tsx, check people?.length and use people?.slice and people?.length in the UI so rendering won't crash when the people prop is missing or undefined. These changes prevent runtime errors when props are absent.
2026-05-07 16:53:23 +07:00
Ichsan Kurniawan 49f766ad27 Propagate assignment dates to ManageTeam
Pass assignment start/end dates into ManageTeam and enforce them in the UI. Updated components (ClientDetailComponent, AssignmentDetailComponent(.old), WorkOrderCard) to provide startDate/endDate props. Modified ManageTeam signature to accept startDate/endDate, added dayjs import to format displayed dates, and implemented disabledDate logic on the DatePicker controls to prevent selecting dates outside the assignment boundaries (normalizing dates to midnight and checking against assignment and user-selected dates). Also removed a stray console.log in AssignmentDetailComponent.old and adjusted ProjectDetailPage to fetch project assignments via the filtered query string (added a console.log(project) for debugging). Files changed: ClientDetailComponent.tsx, AssignmentDetailComponent.old.tsx, AssignmentDetailComponent.tsx, WorkOrderCard.tsx, page.tsx, ManageTeam.tsx.
2026-05-07 13:42:21 +07:00
Ichsan Kurniawan 3eabe762bf Add project-assignment admin pages and UI updates
Add new admin Project Assignment area with Client, End User, and Project Management pages and components (tables, Export buttons, lazy-loaded pages). Introduce FormProject for creating/editing projects and export utilities to download Excel for each module. Update task types: IEndUser now includes code and a status object. Clean up FormClient by removing unused imports and inline end-user modal usage. Make BadgeStatus robust to missing status values. Add "Project Assignment" entry to the sidebar and import FolderGit2.
2026-05-06 18:34:38 +07:00
Ichsan Kurniawan bbc2c7e3e2 Refactor project/assignment UI and timeline
Multiple UI adjustments across client/project/assignment views: fix client description copy, add project Year badge and adjust project card padding and description punctuation, move work-order/team section into its own card and update manage-team button, tweak AssignedPeople button label/styling, make StatusTimeline collapsible with animation (show current entry prominently and toggle historic entries), add padding and end-date fallback (N/A) to WorkOrderCard, and small ClientGrid markup/spacing cleanups. These changes improve layout consistency, UX for viewing details, and handle missing end dates more gracefully.
2026-05-06 15:14:21 +07:00
Ichsan Kurniawan 7892eda589 Refactor assignment detail UI and team components
Refactor Assignment detail view and related team components to improve layout, UX and behaviour. Key changes:

- Added a backup of the previous AssignmentDetailComponent as AssignmentDetailComponent.old.tsx.
- Reworked AssignmentDetailComponent.tsx: simplified assignment fields, added LazyImage, formatDate helper, visual redesign (MetaTile, PartyCard), improved project context card and conditional badges/UI for IM vs Project, and minor status-list rendering tweaks.
- AssignedPeople.tsx: made team list collapsible with motion animations, added toggle button, defaultOpen prop, and preserved stacked avatars UI.
- page.tsx: adjusted project assignment fetch to use /project/{id} (commented previous query-based call).
- AddTeam.tsx: updated existingTeam type and filter logic to exclude already-assigned users when mapping candidates.
- ManageTeam.tsx: removed an unused import.
- UpdateTimelineStatus.tsx: removed some form libs, updated success/error toast messages and sort timeline rows before rendering.
- globals.css: added --type-memo and --type-wo CSS variables and minor variable tweaks.

These changes aim to improve clarity, consistency and interactivity of the assignment and team management UI.
2026-05-05 20:14:21 +07:00
Ichsan Kurniawan dcb74c0f2b Add HoverCard and UI/status tweaks
Introduce a reusable HoverCard component (components/ui/hover-card.tsx) and integrate it into the client grid to show a status summary with badges. Import the cn helper and BadgeStatus in ClientGrid, add a status pill trigger with animated indicator, and switch displayed client reference from end_user_name to client.name. In ManageTeam, include id in draftData, replace BadgeStatus rendering with a Badge variant and adjust the edit button colors to teal; the same teal edit-button color change was applied to UpdateTimelineStatus. Remove an unnecessary comment line in the task page. These changes improve status visibility and unify UI affordances.
2026-05-05 16:06:13 +07:00
Ichsan Kurniawan aeda578c78 Add query-string helper and centralize filtering
Introduce getQueryStringFilteredAssignments in lib/fetchData and use it across task pages to append backend filter params to API requests. Move client/assignment filtering into shared helpers (getFilteredAssignments, getFilteredClients) and remove duplicated local filter logic from client/project pages. Expand searchable fields and adjust getFilteredAssignments signature to accept (list, query, sortBy). Update IClient type and add ProjectStatusSummary. Miscellaneous UI/UX fixes: use fullname in AssignmentTable tooltip, fix debounce usage, pass correct prop to FilterComponent in HomeTask, and normalize isEdit handling in project-assignment page.
2026-05-04 18:39:27 +07:00
Ichsan Kurniawan cca357c37d fixing typeerror production build 2026-04-30 14:11:00 +07:00
Ichsan Kurniawan c34aab579a Revamp project assignment review UI
Redesign the Review step of ProjectAssignmentForm: add new icons (Building2, CheckCircle2), restructure the overview card with distinct Client and End User sections, improve layout and spacing, introduce clearer Assignment Details and Work Order detail panels, add separators and a confirmation note. Adjust some date formatting to use native Date.toLocaleDateString for compact display. Also make a minor visual tweak in StatusTimeline: change the date separator from a dot to a dash and increase its opacity.
2026-04-29 21:49:46 +07:00
Ichsan Kurniawan 7e456dbbda Add end-user photo & UI refinements
Show end-user info and improve responsive layout and form UX. Changes include: make grid responsive (md:grid-cols-2) and add an inline end-user card with LazyImage in ClientDetailComponent; update ProjectAssignmentForm to show a default header description when no clientId, add bottom spacing to CardContent, and hide the "add client" (+) button when a clientId exists; remove a debug console.log and show client.description (with fallback) in project detail page; and add a photo field to Client and EndUser types in type.assignment.ts. These tweaks improve visual clarity and prevent creating duplicate clients from the assignment form.
2026-04-28 20:11:11 +07:00
Ichsan Kurniawan 6f0d8481a1 Refactor assignment status & assignment form
Normalize project-assignment status handling and improve assignment creation flow.

- Use project_assignment_status / project_assignment_status_detail fields throughout (ClientDetail, AssignmentDetail, WorkOrderCard, StatusTimeline, UpdateTimelineStatus, ProjectDetail filters) and prefer start_date/end_date for timeline ranges.
- Filter timeline lists to only include entries with start_date and format dates using dayjs.
- Update UpdateTimelineStatus to submit detail/master IDs and call PUT /project-assignment/status/:assignmentId; adjust table and editing state types.
- Rework ManageTeam and related types to match API shape (user object nested) and update UI/behaviors.
- Add a dedicated "Clients" step to ProjectAssignmentForm with client & end-user comboboxes, client creation modal, client/end-user fetching, validation, and navigation; fix payload mapping, default values, and post-submit routing.
- Add new project-assignment page entry (app/(dashboard)/task/project-assignment/page.tsx).
- Wrap ClientGrid cards in links and tidy card actions; adjust HomeTask view options and create-button behavior to route to project assignment flow.
- Add optional redirect behavior to FormClient and small UI spacing/structure tweaks.

These changes align front-end data structures with backend fields, improve timeline accuracy, and streamline the project assignment creation UX.
2026-04-28 18:47:02 +07:00
Ichsan Kurniawan d61e424012 Refactor task UI, forms and team/status flows
Consolidate and improve client/task UI and related forms:

- Replace/rename modal components: use ManageTeam and UpdateTimelineStatus consistently (replace previous ManageEmployee/FormUpdateStatus imports/usages).
- ClientDetail: update grid layout, add End User column in table view, guard status with optional chaining, adjust avatar size, and minor label tweaks.
- Project/Assignment forms: add end_user_id to assignment schema and form, fetch end-users, integrate ComboboxCustomUI and lazy image rendering for end-user selection, allow creating end-user inline, and fix autofill mappings for project selection. Improve loading handling and payload construction for create/update flows.
- Project assignments page: switch to fetching project list endpoint and pass correct project type to form.
- WorkOrderCard & AssignmentDetail: optional chaining for status, use correct selected IDs for modals, and ensure ManageTeam receives real assignment id.
- ManageTeam: update data shape (field renames: fullname, position, start_date, end_date, status strings), change PUT endpoint for updating assignment user, improve empty-state copy and avatar/fallback handling, adjust status select values.
- UpdateTimelineStatus: remove unused form, adjust payload mapping, make dialog scrollable, tweak layout and textarea sizing.
- AssignmentTable & ClientDetail table: adjust column widths, truncation classes, and use assignment.end_user where appropriate.
- Small UX/cleanup: hide category filter on HomeTask, comment out end_user in FormClient, minor spacing/formatting cleanups, and a temporary console.log in page.tsx.

These changes improve UI consistency, add explicit end-user handling across forms, harden status access with optional chaining, and align API usages and data shapes for team/status operations.
2026-04-27 18:33:20 +07:00
Ichsan Kurniawan fa973a8722 Replace FormUpdateStatus with timeline editor
Refactor status update UI: remove the old FormUpdateStatus component and introduce UpdateTimelineStatus (inline timeline editor with row-level editing, date pickers, and notes). Update imports/usages across client, assignment, project and work-order components to use the new component and adjust props (assignmentId/onClose). Also rename AddTeam usage to ManageTeam in the assignment detail. Add client description support: FormClient now includes a description field and textarea, and IClient type gains an optional description. Minor cleanup: remove stray comment in HomeTask/page.
2026-04-26 23:26:48 +07:00
Ichsan Kurniawan 461542cc1d fixing typescript error during production build 2026-04-24 20:24:57 +07:00
Ichsan Kurniawan 7b1541c567 Refactor team management & expand filters
Rename ManageEmployee to AddTeam and introduce a new ManageTeam component for listing/editing assignment team members. Update imports to use AddTeam and wire AddTeam into WorkOrder/Client pages. Enhance project assignment form payload to include end_user_id.

Improve filtering by adding new props to FilterComponent/FilterModal (hideClient, hideEndUser, hideProjectDateFilter, hideWoDateFilter, hideImDateFilter, hideFilterModal) and implement client/end-user multi-selects and per-category date pickers. Adjust FilterModal layout widths and initial/clear/apply logic to set URL params for client/end_user.

UX and API tweaks: switch user fetch to /user/active, change status endpoint to /project-assignment-status, replace multi-select with a Combobox in AddTeam, update textarea and popover sizing classes, and refine toast messages. Add ManageTeam modal with add/edit/delete flows and confirm-delete integration.
2026-04-24 20:20:45 +07:00
Ichsan Kurniawan a160eccddf fixing typescript error during production build
Adjust chart components (Overview, PieChart) for sizing and safer typings/casting; add v1.2.0 release note. Remove several obsolete dummy/old task pages and the useDummyTaskData hook. Also include minor fixes to FormClient and DonutChart/performance pages.
2026-04-23 21:36:42 +07:00