Commit graph

48 commits

Author SHA1 Message Date
Codex Review Integration
75c2c1c1fa Merge remote-tracking branch 'origin/feat/ab/sh-292-notification-center' into HEAD
# Conflicts:
#	src/app/(protected)/workorders/_components/detail/use-slide-over-edit-state.ts
#	src/app/(protected)/workorders/_components/detail/use-work-order-slide-over.ts
#	src/app/(protected)/workorders/_components/detail/work-order-slide-over.tsx
#	src/app/(protected)/workorders/_components/list/work-orders-list-page-panels.tsx
#	src/app/(protected)/workorders/_hooks/use-work-orders-list-page.ts
2026-09-18 14:35:17 -03:00
Codex Review Integration
062a1e26c8 fix: resolve notification review findings 2026-09-18 14:23:43 -03:00
Codex Review Integration
299f471612 Merge commit '988c96c' into feat/ab/sh-288-event-notifications
# Conflicts:
#	src/components/notifications/notification-row.tsx
#	src/components/notifications/use-notification-center.ts
#	src/domain/notifications/utils/notification-target-url.ts
2026-09-18 13:43:48 -03:00
Codex Review Integration
ae941bc93d feat(notifications): open comment, mention, assignment and uplift items where they happened
Comment and mention items open the work order on the Comments tab with the
comments they were raised for highlighted; a grouped assignment opens the
dispatcher's own open queue; uplift decisions open the work order's uplifts.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-18 13:42:13 -03:00
Codex Review Integration
988c96c42d fix(notifications): keep vendor reminder actions and refresh header baselines
No Vendor opens the work order form on vendor assignment and Vendor Conflict
links each work order, as the vendor reminders did. Header baselines include the
notification bell, and the top bar user menu moves to its own component to stay
within the function-size gate. The vendor e2e now covers the feed contract.
2026-09-18 13:34:12 -03:00
Codex Review Integration
dcf944d7dc SH-292: Notification Center bell panel and feed page
Header bell panel and /notifications page share one feed from GET /api/notifications: labeled sections with live counts, unread styling, session-only dismiss and clear all (acknowledge rows excluded), and deep links to the unassigned queue and a work order's tab via ?wo=&tab=.
2026-09-18 12:55:54 -03:00
Alexandre Brandizzi
80be702733
feat(vendors): structure the address into Street/City/State with autocomplete (#176)
* feat(vendors): structure the address into Street/City/State with autocomplete

The Vendor form carried one free-text "Address (optional)" line, with City,
State and Zip already present but hidden behind display:none, and a separate
"Google Maps URL" input someone had to paste into by hand.

Street Address, City and State are now three required fields. Typing three
characters in Street Address offers up to four candidates; picking one fills
all three at once, and typing without picking stays plain free text. The
Google Maps URL input is gone — the location is derived from the address, the
Street Address itself is the link in view mode, and a keyless map preview
renders once all three parts are present. Zip stays in the payload but out of
the form; the ticket scopes the visible set to three.

The suggestion algorithm, candidate cities and copy are ported from the
approved prototype rather than invented, so dev and design agree on what a
dispatcher sees. Suggestions are deterministic for a given input on purpose:
a reshuffling list moves a row out from under the pointer mid-click.

Test fixtures that predate the requirement now carry an address, so each test
still fails for the reason it is about. The two drawer tests asserting the
stored-URL "Open in Google Maps" row are rewritten to the behaviour that
replaced it.

Delivers SH-271.

* feat(work-orders): show the vendor location map in the Vendor dialog

The last of SH-271's five acceptance bullets. The Work Order Vendor dialog
gets one composed address line from the vendor dropdown payload, not the
structured parts the form and detail drawer hold, so the preview takes the
line directly — it is saved data either way, and the completeness rule exists
to stop a map of half-typed input, not to reject a stored address.

The dialog's hand-built maps URL now goes through the shared helper, so the
link and the preview cannot drift apart.

* test(vendors): update the browser specs and pixel baselines for the new address

`npm run verify` does not run Playwright, so the first push went out with the
browser suite still asserting the UI this ticket removes. Three assertions
were stale: the combined "Address (optional)" input, the "Google Maps URL
(optional)" input, and the detail drawer's separate "Open in Google Maps"
row — now replaced by the Street Address itself being the link, checked
against the derived href. A fourth test created a vendor without an address,
which the new requirement blocks; it fills one, so the test still fails only
for the reason it is about.

Baselines regenerated in mcr.microsoft.com/playwright:v1.61.1-noble, the image
CI uses — macOS font rendering produces different pixels. Exactly three of the
sixteen were rewritten (vendor add, edit, detail); the rest, including every
Work Orders shot, are byte-identical, which is the evidence that this change
stays inside the surfaces it claims.

* test(vendors): keep the map preview out of the pixel baselines

The visual suite mocks `**/api/**` and nothing else, so the address map
preview's iframe reached maps.google.com for real. Whether that frame paints,
and what it paints, depends on the network and on what Google serves that
minute — which is why `vendor-edit` failed in CI at 18178 differing pixels
while passing in a container that could not reach Google. Regenerating the
baseline would not have fixed it; it would have moved the flake.

Aborting the request pins the frame to a blank box, so the shot measures our
layout and nothing else. The committed baselines are unchanged by this — they
were already correct — and a second container run with no --update passes
16/16, which is the evidence the shot is now stable rather than merely green
once.

* fix(vendors): complete structured address map flows

* test(vendors): align add visual baseline with CI

---------

Co-authored-by: Codex Review Integration <codex-review@local.invalid>
2026-09-15 16:13:15 -03:00
Arthur Bassi
da86297fb4
fix(work-orders): align sidebar and advanced filters with AAP (#185)
Some checks are pending
Frontend checks / Build and test (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Deploy dev content / Deploy shoc-frontend-new-dev through Terraform (push) Waiting to run
* fix(work-orders): align sidebar and advanced filters with AAP

* test(vendors): scope Site locator exactly

* fix(work-orders): keep sidebar scope unchanged

* test(work-orders): refresh SH-220 filter baseline

---------

Co-authored-by: Codex Review Integration <codex-review@local.invalid>
2026-09-15 14:05:18 -03:00
Arthur Bassi
ba2e3e37c7 feat(uplifts): align Reject/Revoke Cancel and required asterisk [SH-120] 2026-08-27 11:35:54 -03:00
Arthur Bassi
4782d2e3b0 fix(work-orders): paginate board and search without loading the full dataset (SH-165) 2026-08-24 18:38:32 -03:00
Arthur Bassi
07ecb4e0ab fix(work-orders): expose advanced filter pill pressed state
Keep data-selected for AAP; aria-pressed tracks the same toggle for assistive tech.
2026-08-21 12:09:31 -03:00
Arthur Bassi
8614f9415c feat(work-orders): relocate dispatcher filter under the title (SH-242)
Place dispatcher scoping under the Work Orders heading as a plain
trigger so the week/day bar stays boxed, without changing board params.
2026-08-20 15:53:03 -03:00
Codex Review Integration
54c90e0e36 fix(login): design parity — official logo, h1 welcome heading, label color (SH-245) 2026-08-18 12:08:17 -03:00
Arthur Bassi
4af826a1e0
feat(work-orders): query broadcast, remove auth bypass, dispatch polish (#100)
* fix(work-orders): address wizard create review findings

[recover] remove malicious eslint payload (was 166c63e4)

* fix(work-orders): remove legacy completedDate EditWorkorder path

[recover] remove malicious eslint payload (was f4e6132b)

* fix(work-orders): use local calendar day for completedDate

Restore todayIso() after parent merge reintroduced UTC slice, and keep the wizard-date-utils regression test.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(work-orders): send wizard status and clear POC notes on site change

Map draft.status to lifecycleStatus on board create, and reset pocNotes with POC fields when the wizard site changes.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(query): scope broadcast channel per account and clear on auth

Isolate TanStack Query broadcast by userId, dispose and clear on
logout/401, and extract vendor filter drawers for governance.

* feat(work-orders): board wizard create with service notes

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(work-orders): enforce single-service wizard create per SH-118

Use single service selection in the wizard and omit extraServices from board create.

* fix(vendors): restore filter drawer labels for e2e and visual CI

Use VendorFilterOptions again and keep the Apply filters footer label expected
by vendor Playwright specs and the committed visual baseline.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-14 11:52:48 -03:00
Arthur Bassi
f35fce9bd5
feat(work-orders): comment @mentions autocomplete (SH-217) (#91)
* docs(work-orders): add pending BE contract checklist for design parity gaps

* feat(work-orders): add mentions in work-order comments composer

* docs(work-orders): align pr description with jira and qa residuals

* refactor(workorders): split work order view page into view components

* fix(work-orders): export comment assignment vendor input types for view hook

* fix(work-orders): drop preferredContact from vendor update payload

Align with WorkOrderVendorUpdatePayload on current dev so the mentions branch typechecks.

* fix(work-orders): remove Preferred Contact from WO vendor editor (SH-180)

EOF

* fix(work-orders): harden comment mentions and clear draft on success

* fix(work-orders): harden mention highlight boundary and submit catch [SH-217]

* fix(work-orders): keep mention cursor sync on current value [SH-217]

* fix(work-orders): keep mention menu open after typing @

Pass live text into syncCursor instead of a render-time valueRef.
Add a composer interaction regression for @ autocomplete visibility.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Alexandre Brandizzi <alex_brandizzi@hotmail.com>
2026-08-11 14:07:02 -03:00
Alexandre Brandizzi
cc0df8f569 fix(vendors): complete shell and visual parity gates 2026-08-10 12:11:38 -03:00
Alexandre Brandizzi
fca5487f6d fix(vendors): enforce prototype visual geometry 2026-08-06 23:30:23 -03:00
Alexandre Brandizzi
e6a3899f4c fix(vendors): make navigation and PO filters responsive 2026-07-28 17:16:50 -03:00
Alexandre Brandizzi
ca9d9e9c2a chore: integrate current dev into board foundation 2026-07-24 18:43:22 -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
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
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
3c42abea40 feat(ui): add loading/error primitives and dialog guard 2026-07-17 14:12:01 -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
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
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
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
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
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
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
e2fc183636 Move sorting to server-side for full dataset ordering
- usePaginatedList now manages sortBy/sortDir state
- Sort params passed to fetch function and sent to API
- SharedTable receives sort state as props instead of managing internally
- Clicking column headers triggers API refetch with new sort
- Removes client-side sorting that only worked on current page
2026-04-17 12:50:23 -04:00
Adam Moussa
1ae58e56c3 Add column sorting, reorder, and show/hide to SharedTable
- Click any column header to sort (toggle asc/desc)
- Default sort by Last Updated descending
- Sort indicator arrow on active column
- Gear icon in pagination bar opens column config panel
- Drag to reorder columns in the config panel
- Checkbox to show/hide individual columns
- Column resize still works (stopPropagation on handle)
2026-04-17 12:40:41 -04:00
Adam Moussa
7b544d26db Move pagination bar above the table 2026-04-17 12:28:13 -04:00
Adam Moussa
b26fde454d Redesign pagination bar with button group page size selector
- Records per page as a button group (12/24/48/96) with active highlight
- First/prev/next/last navigation buttons
- Current page number as blue badge
- Showing X-Y of Z range display
- Resets to page 1 when changing page size
2026-04-17 12:26:11 -04:00
Adam Moussa
0167a1aa75 Add vendor pages and dispatch UI
- Vendor CRUD: list page with search, create/edit form with trade specialty chips
- Vendor routes, sidebar nav item with truck icon
- vendorApi in services/api.js
- Dispatch button on WO view page opens DispatchModal
- DispatchModal: vendor multi-select filtered by trade, NTE field, description
- Dispatches CollapsibleSection with PO table on WO view page
- fetchVendorsDropdown and dispatchToVendor API functions
- dispatches included in getWorkOrderById response mapping
2026-04-17 11:37:49 -04:00
Adam Moussa
feacb72337 Add WO fields, collapsible sections, assign dropdown, settings page
- New Classification section: Problem, Trade, SubTrade dropdowns (SubTrade filters by Trade)
- New Schedule fields: Scheduled, Completed dates
- New Financial section: Vendor NTE, Customer NTE placeholder
- All sections below Details default collapsed with toggle arrows
- Assigned To on view page is now a clickable dropdown like status
- TT moved to Details section
- Dropdown options settings page at /settings/dropdowns with add/edit/delete
- Settings link in sidebar and user dropdown
2026-04-17 10:40:55 -04:00
Adam Moussa
fb5bed9647 Revert actions column to original grid layout 2026-04-16 19:31:30 -04:00
Adam Moussa
2477bcf5a6 Add user dropdown menu and notification panel to topbar
- Click user section to open dropdown with profile, settings, password, sign out
- Shows user avatar, name, and email in dropdown header
- Click notification bell to open panel showing empty state
- Both use portal-rendered dropdowns, close on outside click
- Removed standalone logout button, moved into user dropdown
2026-04-16 19:21:26 -04:00
Adam Moussa
11e3d3d31f Redesign top header bar
- Remove search box from topbar (search is now on list pages)
- Clean notification bell icon
- User avatar with initials, name, and role displayed
- Divider between notifications and user section
- Logout as subtle icon button instead of red inline-styled button
- Remove inline styles, all styling via CSS classes
2026-04-16 19:18:27 -04:00
Adam Moussa
168383b0ee Clamp column resize so neither column goes below 50px
- Limit drag diff so both the dragged and neighbor column stay >= 50px
- Prevents columns from collapsing or going negative
2026-04-16 18:59:24 -04:00
Adam Moussa
186fea820b Remove dead code: unused components and sample data
- Delete Contacts.js, ContactTable.js (never imported)
- Delete data/contacts.js (unused sample data)
- Delete App.css (not imported anywhere)
2026-04-16 16:53:39 -04:00
npalOmega
65ec768e13 UI changes checking in 2026-03-30 07:53:42 -05:00
npalOmega
933e93c845 fixed style, added new pages, refactored 2026-01-20 15:05:00 -06:00
npalOmega
27d68b50e9 commiting changes 2026-01-11 17:35:46 -06:00
npalOmega
3461d3159e adding first commit 2026-01-11 17:35:33 -06:00