mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-05 15:22:04 +00:00
vendor-portal-provider.tsx and task-templates.tsx mixed data-fetching,
state, and rendering in one file, with no caching and hand-rolled form
state. This is a pure refactor with no behavior change.
- vendor-portal-provider.tsx: replace manual useEffect/useState fetch
with useVendorPortalSession (useQuery), closing the token race
condition the old key={token} remount was working around
- task-templates.tsx: split into useTaskTemplateEditor hook plus 4
presentational components; replace hand-rolled form state with
react-hook-form + zod validation; replace the "new" string sentinel
with a NEW_TEMPLATE_ID constant
- add 29 tests (hook, component, and full-page integration) confirming
identical behavior to the original code
|
||
|---|---|---|
| .. | ||
| dispatch-detail-sections.test.tsx | ||
| dispatch-snapshot-details.test.tsx | ||
| refuse-dispatch-dialog.test.tsx | ||
| signoff-section.test.tsx | ||
| uplift-request-form.test.tsx | ||
| vendor-portal-documents.test.tsx | ||
| vendor-portal-provider.test.tsx | ||