Commit graph

115 commits

Author SHA1 Message Date
Alexandre Brandizzi
620ac65153 fix(lint): enforce error typography composition 2026-07-24 11:36:30 -03:00
Alexandre Brandizzi
392af77b91 refactor(ui): enforce maintainable conditional feedback 2026-07-24 11:32:58 -03:00
Alexandre Brandizzi
21b7de57a1 chore(frontend): enforce maintainable text rendering 2026-07-23 18:48:15 -03:00
Alexandre Brandizzi
20237f8142
feat(vendors): align directory UI with current prototype (#46)
Some checks are pending
CI / ci (push) Waiting to run
Deploy / deploy (push) Waiting to run
* feat(vendors): align directory UI with prototype

* fix(vendors): report the filtered total

* fix(vendors): keep company input in sync

* fix(vendors): scope facets to directory status
2026-07-23 15:23:03 -03:00
Alexandre Brandizzi
cf7eeb0a8b
Merge pull request #28 from Sea-Haven-Industries/chore/ci-cdk-deploy
Some checks failed
CI / ci (push) Has been cancelled
Deploy / deploy (push) Has been cancelled
chore(ci): add deploy pipeline, CDK scaffold, and board API docs
2026-07-21 14:37:52 -03:00
Alexandre Brandizzi
5140827f9e
Merge pull request #38 from Sea-Haven-Industries/feature/wo-domain-tests
test(work-orders): cover board filters and wizard mappers
2026-07-21 14:35:33 -03:00
Arthur Bassi
bb8961cc71 docs(work-orders): document overdue=true instead of types=99 2026-07-21 14:31:58 -03:00
Arthur Bassi
ff32c0da06 test(work-orders): fix advanced filter date fixture and unused import 2026-07-21 14:28:09 -03:00
Alexandre Brandizzi
8813cb2e75
Merge pull request #37 from Sea-Haven-Industries/feature/wo-domain-utils-mocks
Some checks are pending
CI / ci (push) Waiting to run
Deploy / deploy (push) Waiting to run
feat(work-orders): add board utils and mock data
2026-07-21 14:10:45 -03:00
Alexandre Brandizzi
a55beb903c
Merge branch 'dev' into feature/wo-domain-utils-mocks 2026-07-21 14:07:59 -03:00
Alexandre Brandizzi
31e4fb1907
Merge pull request #36 from Sea-Haven-Industries/feature/wo-domain-core
feat(work-orders): add domain core types, api, mappers and use-cases
2026-07-21 14:07:44 -03:00
Alexandre Brandizzi
579af60278
Merge branch 'dev' into feature/wo-domain-core 2026-07-21 14:04:31 -03:00
Alexandre Brandizzi
ec20c693d3
Merge pull request #35 from Sea-Haven-Industries/feature/wo-shared-ui
feat(ui): add shared board UI primitives and plumbing
2026-07-21 14:03:58 -03:00
Arthur Bassi
bea41b7e4d chore(ci): merge origin/dev into chore/ci-cdk-deploy 2026-07-21 11:10:48 -03:00
Arthur Bassi
4beefba719 fix(work-orders): align consumers with domain-core types 2026-07-21 09:47:43 -03:00
Adam Moussa
042b9db2ac
chore: correct Sea Haven branding and rewrite README (#25)
Some checks failed
CI / ci (push) Has been cancelled
Deploy / deploy (push) Has been cancelled
* fix: correct Sea Haven branding in page title and wordmark

* chore: use correct company name in docs and comments

* docs: rewrite README

* docs: add README badge block per github-standards

* fix: update command syntax in deployment instructions

* fix: replace template PWA icons and manifest branding

* test: assert PWA manifest branding
2026-07-17 13:17:21 -04:00
Arthur Bassi
e446bbae0e test(work-orders): cover board filters and wizard mappers 2026-07-17 13:59:32 -03:00
Arthur Bassi
df8f3553e8 feat(work-orders): add board utils and mock data 2026-07-17 13:59:31 -03:00
Arthur Bassi
e13bc4c1a2 feat(work-orders): add domain core types, api, mappers and use-cases 2026-07-17 13:58:19 -03:00
Arthur Bassi
a3e8a533b1 fix(ui): align shared board plumbing with ky v2 and react-router
- api.ts: use ky v2 hook object args, prefix (not prefixUrl), and normalizeApiRequestError
- replace react-router-dom with react-router in layout, topbar, and vendor-pos view
- move MUI style props (justifyContent, alignItems, flexWrap, display, fontWeight) into sx
- resource-list-table/query-key: use local types instead of missing work-order-list module
2026-07-17 13:31:56 -03:00
Arthur Bassi
01939cbb70 feat(ui): add shared board UI primitives and plumbing 2026-07-17 11:59:05 -03:00
Arthur Bassi
d2e0061b93 chore(ci): add deploy pipeline, CDK scaffold, and board API docs 2026-07-17 11:48:47 -03:00
Alexandre Brandizzi
c68d47af7b
chore: upgrade frontend dependencies (#24)
Some checks failed
CI / ci (push) Has been cancelled
Deploy / deploy (push) Has been cancelled
* chore: upgrade frontend application dependencies

* chore: upgrade frontend infrastructure dependencies

* fix: align lockfiles with CI npm

* fix: preserve ky error semantics

* fix: sanitize timeout error message
2026-07-14 21:35:59 -03:00
Alexandre Brandizzi
166df904ac
feat(infra): AWS S3 + CloudFront CD pipeline on dev.seahaven.com (#21)
Some checks failed
CI / ci (push) Has been cancelled
Deploy / deploy (push) Has been cancelled
Self-contained CDK app (S3 + CloudFront + OIDC deploy role) deployed via the org reusable cd-cdk.yaml. Frontend served on dev.seahaven.com with the *.seahaven.com cert and a Route 53 apex alias; the SPA calls the dev backend directly at https://api.dev.seahaven.com/api.
2026-07-07 06:14:06 -03:00
4464e76228 Convert CI to org reusable workflow caller
Some checks failed
CI / ci (push) Has been cancelled
Replace the inline 5-job ci.yml with a thin caller of the org reusable
workflow ci-typescript-frontend.yaml. The standards gate, changed-line
guard, format/lint/build, unit tests, and Playwright browser smoke now
live centrally in Sea-Haven-Industries/.github and are maintained once.

Renames ci.yml -> ci.yaml (kebab-case .yaml convention) and triggers on
pull_request and push to main and dev, so this branch keeps CI coverage.

The reusable workflow runs as a single `ci` job, so this caller emits the
`ci / ci` status context. Branch-protection rulesets for main and dev must
have their required checks switched from the old job names (Metadata and
standards, Code quality, Build, Unit tests, Browser smoke) to `ci / ci`.
2026-06-24 16:46:47 -04:00
Adam Moussa
0af9d871ab
Add CODEOWNERS requiring internal-dev review (#20)
Assign all files to the internal-dev team so every pull request needs an
approving review from an internal-dev member, giving internal engineering
oversight of changes. The org main-branch-protection ruleset enforces this
via required code-owner review; the internal-dev team has write access, so
it is an eligible code owner.
2026-06-22 16:46:19 -04:00
Arthur Bassi
a0cf7b9ef0
Feat/vite typescript migration (#16)
* chore: add eslint, prettier, husky and commitlint tooling

* ci: add GitHub Actions workflow for lint and build

* build: migrate from CRA to Vite with TypeScript config

* docs: add architecture plan and design system documentation

* fix: scope ESLint to new components and hooks directories

* feat: add HTTP client, query cache and shared utilities

* feat: add theme system and global application styles

* feat: add shared UI, layout and domain badge components

* feat: add auth domain, provider and login page

* feat: add app shell, file-based routing and bootstrap

* feat: add protected layout and dashboard module

* feat: add accounts CRUD module

* feat: add assets CRUD module

* feat: add contacts CRUD module

* feat: add employees CRUD module

* feat: add locations CRUD module

* feat: add calendar events module

* feat: add follow-ups CRUD module

* feat: add PM schedules CRUD module

* feat: add work orders module with dispatch modals

* feat: add vendors CRUD and portal token panel

* feat: add vendor purchase orders module

* feat: add uplifts queue module

* feat: add settings for dropdowns and task templates

* feat: add vendor portal routes and signature capture

* test: add Vitest setup and Playwright login e2e spec

* chore: remove legacy CRA pages, Redux store and JS hooks

* chore: update gitignore and env example for Vite

* docs: translate pt-BR docs and Cursor rules to English

* fix(ci): fix login e2e session mock and prettier formatting

* fix(build): use mjs router script for Node 20 CI compatibility

* chore: remove migration scripts and unused generouted router

* fix(auth): restore JWT and align CRUD with backend routes

* fix(api): add no-content helpers and align paths with backend

* fix(accounts): align detail and mutation payloads with backend

* fix(contacts): resolve detail via GetContacts and map address DTOs

* fix(work-orders): align routes, delete body, and create payload

* fix(vendors): delete vendors via REST route

* fix(pm-schedules): handle empty save and delete responses

* fix(employees): add fallbacks for detail and dropdown calls

* chore(calendar): disable routes until backend exists

* chore(env): switch tracked env vars to Vite prefixes

* fix(api): align frontend contracts with backend review findings

Correct Work Order getById query param, asset site options via Location API,
Employee JobTitleId payload, and remove stale API paths.

* fix(employees,pm-schedules): align forms with backend API contracts

Align PM Schedule form and save payload with PMSchedule_DTO fields.
Bind employee Job Title select to jobTitleId for create/update payloads.
Add regression tests for both flows.

* fix(pm-schedules): gate edit/delete for Dev API contract

Production Dev API exposes only GetList and Save.

Hide unsupported edit/delete UI and block the edit route.

Add regression tests for disabled actions.

* docs(env): document VITE_API_URL must include /api suffix

* refactor(api): extract shared API prefix URL resolution

* feat(build): fail build on misconfigured absolute VITE_API_URL

* test(api): cover API URL contract and prefix resolution

* feat(auth): disable login submit until email and password are valid

* test(auth): align login tests with disabled submit behavior

* Feat/ab/menu-and-header (#17)

* chore(deps): add lucide-react for layout icon migration

* feat(auth): add getPrimaryUserRole helper for header display

* style(theme): add sidebar active tokens and nav group typography

* refactor(menu): migrate nav icons to lucide and trim menu groups

* feat(layout): redesign sidebar, topbar, and admin shell viewport

* chore(menu): hide Reports and Documents from sidebar

---------

Co-authored-by: Arthur Bassi <arthur.winiarski.ranger@outlook.com>

* ci: add frontend PR quality baseline (#18)

* chore(deps): add lucide-react for layout icon migration

* feat(auth): add getPrimaryUserRole helper for header display

* style(theme): add sidebar active tokens and nav group typography

* refactor(menu): migrate nav icons to lucide and trim menu groups

* feat(layout): redesign sidebar, topbar, and admin shell viewport

* chore(menu): hide Reports and Documents from sidebar

* ci: add PR quality baseline checks

* ci: avoid self-matching standards guard

* ci: split frontend quality gates

---------

Co-authored-by: Arthur Bassi <arthur.winiarski.ranger@outlook.com>

---------

Co-authored-by: Arthur Bassi <arthur.winiarski.ranger@outlook.com>
Co-authored-by: Alexandre Brandizzi <alex_brandizzi@hotmail.com>
2026-06-18 14:41:17 -03:00
npalOmega
1632f1e656 pm schedule fix 2026-05-14 11:01:59 -05:00
npalOmega
65bf95b20c refactor: fix compilation errors and centralize constants
- Fixed Redux slice errors
- All query keys now use constants from src/constants/
- Converted LoginPage to CSS Modules
- Consolidated documentation
2026-05-12 20:33:23 -05:00
npalOmega
5151be29ba Add production and development environment configuration files 2026-04-27 08:50:47 -05:00
Adam Moussa
bbcd1eb4e1 Wire Follow Ups list and form to backend
Replaces the mock api with real endpoints, fixes list column mappings
to match the backend payload, and realigns the form to the FollowUps
model (Reason, ScheduleDate, ScheduleStartTime, EmployeeId, AccountId,
LocationId, WorkOrderId) with real lookup dropdowns for Employee,
Account, and Location. Also redesigns the list header to match the
Work Orders toolbar + chip filter look.
2026-04-20 13:49:58 -04:00
Adam Moussa
a349a58822 Group sidebar nav by purpose
Replaces the flat 16-item list with six sections (Overview, Operations,
Vendors, Customers & Sites, Internal, System) and adds section titles
that collapse into dividers when the sidebar is collapsed.
2026-04-20 13:49:52 -04:00
Adam Moussa
2a6fe6f35e Add NTE uplift UI, vendor PO pages, and portal POs tab
Vendors can now request NTE uplifts from the dispatch detail page and
dispatchers can approve or deny them (with tier-gated buttons) from
the work order view. Admin uplift queue page lists all requests with
status/tier filters. New Vendor POs section lists every PO with a
detail page showing vendor, linked WOs, uplift history, checklist,
signoffs, comments, and scoped audit log with print support. Vendor
portal gets a POs tab alongside Work so vendors can reconcile by PO
number.
2026-04-20 13:26:08 -04:00
Adam Moussa
c98a905d4d Merge feature/vendor-portal into dev 2026-04-20 12:45:09 -04:00
Adam Moussa
168fa69a87 Add vendor portal UI
- Separate route tree at /v/:token (no SHOC chrome); session resolved via
  X-Vendor-Token header
- Dashboard lists only the vendor's own dispatches with status filters
- Dispatch detail: accept + status transitions (Acknowledged -> In Progress ->
  Completed), request cancel, checklist toggles, customer signoff before vendor
  signoff, comments attributed by type (dispatcher / vendor / customer)
- SignaturePad component (mouse + touch canvas, drawn or typed)
- Admin vendor form: portal token panel to generate, copy, rotate, or revoke
  the portal link
2026-04-20 12:02:00 -04:00
Adam Moussa
3b3086d873 Update TODO with completed items and vendor portal next steps 2026-04-17 16:33:18 -04:00
Adam Moussa
da51d4a5be Add Cancel Dispatch button to dispatch detail modal
- Red outlined button on the left side of actions row
- Confirmation prompt before cancelling
- Hidden when dispatch is already cancelled or verified
- Updates status to Cancelled and refreshes
2026-04-17 16:31:48 -04:00
Adam Moussa
913d75802c Polish dispatch workflow — custom items, name input, read-only after verify
- Custom checklist items in dispatch modal (type + Enter, removable chips)
- Add checklist item input in dispatch detail modal
- SignatureCapture now has proper Full Name field instead of prompt()
- Verified dispatches are read-only: edit hidden, checkboxes disabled, signoff buttons disabled
- Custom items sent as CustomChecklistItems in dispatch payload
2026-04-17 16:26:22 -04:00
Adam Moussa
dc81078df7 Add multi-WO selection to dispatch modal
- Current WO shown as non-removable chip
- Dropdown shows all WOs at same site, filtered by locationId server-side
- Search bar filters the dropdown list
- Click to add, X to remove additional WOs
- Header shows count when multiple WOs selected
- All selected WO IDs sent to backend
2026-04-17 16:13:18 -04:00
Adam Moussa
199715d5b6 Add Verify & Close button and verified banner to dispatch detail
- Verify & Close button at bottom of dispatch modal
- Disabled with tooltip showing missing items (checklist, signoffs)
- Green verified banner after verification with verifier name + timestamp
- Verified status badge (dark green)
- Added Verified to DISPATCH_STATUSES constant
- verifyDispatch API function
2026-04-17 16:03:34 -04:00
Adam Moussa
5c24b9249d Add sign-off UI with signature capture component
- SignatureCapture component: canvas drawing pad + typed mode with cursive preview
- Two sign-off slots in dispatch detail modal: Customer and Vendor
- Collect Signature button opens capture modal, prompts for name
- Signed slots show signature thumbnail, name, and timestamp
- Green "All Signed" badge when both complete
- addDispatchSignoff API function
2026-04-17 15:51:20 -04:00
Adam Moussa
31479029e3 Add time tracking to dispatch workflow
- timeSince utility: relative time display (2h ago, 3d ago)
- timeBetween utility: duration between two timestamps
- waitTimeColor utility: green (<4h), yellow (4-24h), red (>24h)
- Dispatch detail modal shows accepted time with duration
- Awaiting acceptance shows elapsed time with color coding
- Dispatches table shows Wait column with color-coded time for Sent dispatches
2026-04-17 15:41:51 -04:00
Adam Moussa
5dcfc9d303 Show acceptance status in dispatch detail modal
- Accepted field shows green timestamp when acknowledged
- Shows "Awaiting acceptance" in yellow when status is Sent
2026-04-17 15:39:50 -04:00
Adam Moussa
62bc2f058c Add checklist UI to dispatch workflow
- Task List Template picker in dispatch modal
- Checklist section in dispatch detail modal with toggleable items
- Shows completion count, completed by user name + timestamp
- Strikethrough styling on completed items
- fetchTaskTemplates, updateChecklistItem, addChecklistItem API functions
2026-04-17 15:28:52 -04:00
Adam Moussa
714376c61b Update dispatch for multi-WO support
- Pass WorkOrderIds array in dispatch API call
- DispatchDetailModal shows WO list from junction table in header
- dispatchToVendor API simplified to pass full payload
2026-04-17 15:16:28 -04:00
Adam Moussa
4de6c54fc0 Add Task Templates settings page with shared settings nav
- Task Templates page: create/edit templates with checklist items
- Add/remove/reorder items, save template with name + description
- SettingsNav component with tab links between Dropdown Options and Task Templates
- taskTemplateApi in services/api.js
- Route at /settings/task-templates
2026-04-17 14:57:18 -04:00
Adam Moussa
27fb70724b Remove Vendor tab from Activity section
- Vendor communication now lives in the dispatch detail modal
- Activity tabs: Customer, Internal, Audit Log
- Comment input only shows on Internal tab
2026-04-17 14:03:41 -04:00
Adam Moussa
2a23febcec Add dispatch detail modal with vendor communication thread
- Click dispatch row to open detail modal
- View/edit dispatch status, NTE, scheduled/completed dates, description
- Vendor Communication thread with message input
- Send email toggle — messages optionally email the vendor
- Modal sized for long email threads with scrollable communication area
- Dispatch table shows dispatch number, clickable rows
2026-04-17 14:01:13 -04:00
Adam Moussa
7428a6d5e3 Add project TODO tracking deferred work items 2026-04-17 13:08:19 -04:00
Adam Moussa
0d847896db Move status and assignee filters to server-side
- Pass status and assignee as API query parameters
- Filters applied in SQL for accurate counts across all pages
- Remove client-side row filtering
- Pagination and total count now reflect filtered results
2026-04-17 12:57:37 -04:00