Commit Graph

54 Commits

Author SHA1 Message Date
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
Ichsan Kurniawan 80cb73f7fa Add FilterModal and DatePickerMultiMode; UI fixes
Introduce a FilterModal component and a DatePickerMultiMode UI component; refactor FilterComponent to use the modal and expose new hide* props for finer control. Update HomeTask to use a Select for view switching and remove unused props. Improve client and assignment UIs: ClientGrid empty state, client card actions, AssignmentTable empty state, and various text/label adjustments. Fix PieChart null-safety with optional chaining and remove a stray console.log in ClientDetailComponent. Update assignment field mappings to prefer wo_* values where appropriate and pass hideCategory to project detail page. Also update .env.development API/IMG URLs.
2026-04-23 21:01:12 +07:00
Ichsan Kurniawan 29c2181acb fixing bug 2026-04-22 15:50:14 +07:00
Ichsan Kurniawan dbc70a6671 update 2026-04-22 14:28:53 +07:00
Ichsan Kurniawan 60d1af3758 update UI logic 2026-04-21 19:30:45 +07:00
Ichsan Kurniawan b5735a90c4 update logic, ui 2026-04-21 16:00:21 +07:00
Ichsan Kurniawan 2d0f2fa1f0 fixing ui, logic etc.. 2026-04-20 17:13:49 +07:00
Ichsan Kurniawan 6b16bd2dd4 add new UI Component 2026-04-20 17:13:20 +07:00
Ichsan Kurniawan ad4925bd55 update UI 2026-04-19 18:54:47 +07:00
Ichsan Kurniawan a4f0087b6c Add project detail UI and unified status badges
Introduce project detail screens and reusable status UI. Adds ProjectDetailComponent, WorkOrderCard, StatusTimeline, AssignedPeople, and a new BadgeStatus component with STATUS_BADGE_MAP and STATUS_LIST in badge.tsx to centralize status styling. Adds IProject type (type.project.ts) and project detail page routing. Update existing client/assignment views to use BadgeStatus, improve UI copy and link behavior (ExternalLink icon), handle nullable end dates in forms, include client_id in payload, and improve empty-state handling and descriptions. Misc: rename assignment page export, tweak form labels/placeholders, and small layout/UX refinements.
2026-04-17 17:16:47 +07:00
Ichsan Kurniawan 78f48d783f Add client & assignment detail UI; update dev env
Introduce client and assignment detail pages and client-side components for the Task dashboard. Adds interactive ClientDetailComponent, AssignmentDetailComponent, page entries (server + dummy variants), project-assignment form, various UI components (AssignmentTable, ClientGrid, ManageEmployee, FormUpdateStatus, ConfirmDelete, LazyImage helper), types and a dummy data hook. Update app/(dashboard)/task/page.tsx to use the new components. Update .env.development to point to dev API endpoints, bump NEXT_PUBLIC_APP_VERSION to v1.2.0 and add NEXT_PUBLIC_S3_IMAGE_URL.
2026-04-16 22:38:26 +07:00
Ichsan Kurniawan fb2d746fc0 Add UI components and Tooltip provider
Introduce a set of reusable UI primitives and integrate tooltip provider in the app layout. Adds: Combobox (with virtualized and non-virtualized variants), Command palette components (cmdk wrapper and related subcomponents), DatePicker and DateTimePicker (popover-based date/time selection with time pickers and Done footer), LazyImage (progressive image with blur/scale transition), and Tooltip (Radix wrapper and provider). Also imports TooltipProvider in app/layout.tsx and wraps the app content so tooltips are available globally.
2026-04-16 22:37:45 +07:00
Ichsan Kurniawan 154574ff45 Update EditProfile.tsx 2026-03-06 14:21:34 +07:00
Ichsan Kurniawan 32aab111dd Add POST fetch hook and render mention links
Introduce useFetchPOSTWithAxios (SWR + axios POST) and use it in ApprovalLeaveSick to fetch TLs (position_code P02). Map cc IDs to fullname entries, store them in state (mentionsTo) and render linked mention badges to /performance/:id instead of raw IDs. Also format birthday as 'YYYY-MM-DD' in EditProfile form, comment out a dashboard console.log, and apply small JSX/spacing cleanups.
2026-03-06 10:51:45 +07:00
Ichsan Kurniawan 60648f312d update 2026-02-25 13:39:59 +07:00
Ichsan Kurniawan 5af8a3c379 Update index.tsx 2026-02-22 23:38:35 +07:00
Ichsan Kurniawan 7d18e9f38f Add CreateAttendance and update UI/hooks
Add a new CreateAttendance component to allow admins to create manual attendance (Alpha) with confirmation dialog and server API call. Lazy-load the CreateAttendance component in EmployeeAlpha and wrap usages with Suspense plus a loading fallback to reduce initial bundle size. Update Performance page to use a centered Suspense fallback. Improve ImportExcel UX by showing a full-loading state, tweaking button/icon styles, and fixing modal sizing/scroll behavior. Enhance useFetchWithAxios to accept nullable URLs and SWR options, adjust the fetcher signature, and return the nested data payload. Add a "use server" directive and imports in lib/server-api, and apply small type/formatting tweaks (table size cast and minor UI/text refinements).
2026-02-22 23:33:15 +07:00
Ichsan Kurniawan 85d8db1e54 fixing error 2026-02-20 16:50:07 +07:00
Ichsan Kurniawan 226484f693 Update index.tsx 2026-02-20 16:14:46 +07:00
Ichsan Kurniawan e6a52d02d5 fixing error in production 2026-02-20 16:12:29 +07:00
Ichsan Kurniawan 2d0d5e7271 ignore package-lock 2026-02-20 15:21:09 +07:00
Ichsan Kurniawan 5a3629badf update performance, manual attendance, redownload leave form
Added the ability to view and re-download leave application forms in the Employee History page (Leave, Permit, and Sick tabs)
Added employee alpha stats and employee alpha detail in Employee Performance Page
Added total WFO, WFH and WFS in Admin Summary Report
Added batch import from Excel files in Admin Manual Attendance
2026-02-20 15:19:42 +07:00
Ichsan Kurniawan d09799068d Update member IDs and refactor geolocation
Adjust team data and improve geolocation handling. In app/(dashboard)/hats-team/page.tsx several TeamMember IDs were updated and a new member (Teddy Setiawan) was added; pastMembers IDs were also adjusted. In app/(dashboard)/presence-v2/components/FormComponent.tsx geolocation logic was refactored: moved PositionOptions constant outside the component, added useCallback for displayLocation, successCallback, and errorCallback, fixed useEffect dependencies to use stable callbacks, reduced noisy toasts on non-critical errors, and corrected an error-toast formatting issue. Also added useCallback to imports and minor formatting cleanups.
2026-02-09 23:41:21 +07:00
Ichsan Kurniawan b55e759029 Update FormChangePassword.tsx 2026-02-09 21:40:00 +07:00
Ichsan Kurniawan 09ad78ed03 update opengraph 2026-02-09 16:22:14 +07:00
Ichsan Kurniawan 5cbded392a Add server API helper, logging & misc updates
Introduce a reusable serverApiCall helper and file-based logger (lib/server-api.ts, lib/logger.ts) to centralize backend requests, attach session auth, and capture request/response/error logs. Update server actions to use the new helper (updateProfileAction, changeAvatarAction) and ensure profile revalidation. Add client-side avatar upload size limit (5MB) and normalize avatar base64 payload. Add new OpenGraph/Twitter images, bump app version to v1.1.1, and add a v1.1.1 entry in release notes. Update default API/IMG env URLs and metadataBase fallback, fix minor release-notes link capitalization, and adjust a debug console.log in admin user page.
2026-02-09 14:48:03 +07:00
Ichsan Kurniawan c24838550a update 2026-01-30 18:44:40 +07:00
Ichsan Kurniawan fc4e56eaef Update PieChart.tsx 2026-01-29 14:37:23 +07:00
Ichsan Kurniawan 36b5b07d28 update UI 2026-01-29 14:13:32 +07:00
Ichsan Kurniawan 5e439ea9f7 remove next image 2026-01-28 21:10:07 +07:00
Ichsan Kurniawan e0e9f8651f update 2026-01-28 20:45:59 +07:00
Ichsan Kurniawan 885cb00e29 fixing bug or error when build 2026-01-28 20:01:35 +07:00