Commit graph

15 commits

Author SHA1 Message Date
Adam Moussa
dc8c8b68f3 Map frontend form fields to backend DTO fields on work order edit
- Frontend uses workOrderNumber/title/assignedTo, backend expects
  WorkerOrderNumber/WorkerOrderTitle/AssignTo
- Prevents null overwrite of existing data on save
2026-04-16 18:12:44 -04:00
Adam Moussa
d979d5571a Add four-tab activity section: Customer, Vendor, Internal, Audit Log
- Filter comments by commentType field (customer, vendor, internal)
- Add AuditTimeline component showing field changes with old → new values
- Pass auditLog from API response to view page
2026-04-16 18:09:57 -04:00
Adam Moussa
1958973968 Split activity into customer and vendor comment tabs
- Extract CommentTimeline into reusable component
- Filter comments: customer (from ingest pipeline, has recordType/commenter)
  vs vendor (internal, has userName from ApplicationUser)
- Add tab UI to switch between streams with counts
- Format comment timestamps with formatDateTime
- Show "No comments yet" when a tab is empty
2026-04-16 18:01:25 -04:00
Adam Moussa
b0811aae65 Format created date on work order list page
- Add render function to createdDate column
- Same YYYY-MM-DD HH:MM TZ format as the view page
2026-04-16 17:59:05 -04:00
Adam Moussa
9bae91f281 Format created date as YYYY-MM-DD HH:MM TZ on view page
- Parse timestamp as UTC, display in user's local timezone
- 24-hour format with short timezone name (e.g. 2026-04-16 17:27 EDT)
2026-04-16 17:54:21 -04:00
Adam Moussa
9c2c8321de Remove estimated hours and sync priority options to Sev 1-5
- Remove estimatedHours from form state, API mapping, and form UI
- Replace Low/Medium/High/Urgent priority options with Sev 1 through Sev 5
- Adjust date row from 3 columns to 2 columns
2026-04-16 17:49:48 -04:00
Adam Moussa
a7391cb02b Fix undefined work order ID on edit save
- formData.id was undefined because id isn't in the initial form state
- Pass id from useParams explicitly when calling editWorkOrder
2026-04-16 17:47:21 -04:00
Adam Moussa
0ccf8bdbbc Populate location dropdown from API in work order form
- Fetch locations from /api/Contact/GetLocations on mount
- Replace hardcoded dropdown options with dynamic list
- Switch form field from location (string) to locationId (int)
- Include locationId in API response mapping
2026-04-16 17:45:19 -04:00
Adam Moussa
62d2b3103e Navigate back to view page from work order edit form
- Cancel and save now return to /workorders/:id when editing
- New work orders still navigate to the list
2026-04-16 17:42:47 -04:00
Adam Moussa
03b2572773 Add work order detail/view page
- Create WorkOrderViewPage with details grid, status badge, and activity timeline
- Add /workorders/:id route for view, keep /workorders/edit/:id for edit
- List page now navigates to view page instead of edit
- Include comments and commenter fields in API response mapping
2026-04-16 17:41:11 -04:00
Adam Moussa
cdf7477059 Map API response fields to form state in getWorkOrderById
- workerOrderNumber → workOrderNumber
- assignee → assignedTo
- Format dates for date input fields
- Default empty strings for null fields
2026-04-16 17:37:21 -04:00
Adam Moussa
fad2b7d661 Fix controlled input warning on all form pages
- Merge API response into form state instead of replacing it
- Null values from the API now fall back to the form's default values
- Prevents React controlled-to-uncontrolled input warning
2026-04-16 17:34:53 -04:00
Adam Moussa
7db23a5597 Replace 11 duplicate hooks with single usePaginatedList
- Create shared hooks/usePaginatedList.js accepting a fetch function and optional extra params
- Update all 7 list pages to use the shared hook
- Delete 11 individual hook files (useItems, useEmployees, useLocations, etc.)
2026-04-16 16:53:52 -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