Commit graph

1176 commits

Author SHA1 Message Date
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
9ae7c9b262 Add auth token to ApiService requests
- services/api.js was not sending Authorization header on any request
- Import getAccessToken and include it in all ApiService.request() calls
2026-04-16 17:12:38 -04:00
Adam Moussa
2dcb140d10 Consolidate duplicate form CSS into shared FormPage.css
- Create styles/FormPage.css from ContactFormPage.css
- Update contacts and accounts form pages to import shared CSS
- Delete 4 duplicate ContactFormPage.css copies
2026-04-16 16:54:03 -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
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
Adam Moussa
58c6ac6bcc Fix error swallowing in apiUtil and stale auth headers
- Restore error propagation in all fetch methods (was commented out)
- Change static header objects to functions so auth token is fresh per request
- Add missing return in putFormBody
- Properly throw on 401 unauthorized responses
2026-04-16 16:32:10 -04:00
Adam Moussa
e7fb682f71 Consolidate auth/token management into tokenUtility
- Make tokenUtility.js the single source of truth for localStorage
- Add getRawToken() and isAuthenticated() to tokenUtility
- Rewrite authService.js to delegate storage to tokenUtility
- Fix calendar api.js direct localStorage access
- Remove unused setToken import from apiUtil.js
2026-04-16 16:25:26 -04:00
Adam Moussa
ec8cca86d1 Configure frontend for local development
- Use relative API URLs instead of hardcoded production/localhost URLs
- Fix setupProxy.js for http-proxy-middleware v3 syntax
- Point proxy to backend HTTP port for dev compatibility
2026-04-16 16:25:19 -04:00
npalOmega
1ce41dda83 prod url flipped 2026-03-30 13:39:32 -05:00
npalOmega
65ec768e13 UI changes checking in 2026-03-30 07:53:42 -05:00
npalOmega
8417d708ac fix 2026-01-21 16:25:57 -06:00
npalOmega
933e93c845 fixed style, added new pages, refactored 2026-01-20 15:05:00 -06:00
npalOmega
3f3dcc70f6 fix 2026-01-13 12:03:46 -06:00
npalOmega
ff2eacaba4 ignoring legacy designs 2026-01-11 18:11:03 -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
npalOmega
90a7556392 Initialize project using Create React App 2025-08-11 19:13:42 -05:00