[Arch] Duplicated AddShipmentModal and drifted status-color logic #60
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Medium | Category: Frontend
AddShipmentModalis implemented near-verbatim in bothDashboard.tsx:72andShipments.tsx:63. Separately,eventDotColor(Dashboard) andstateDotColor(ShipmentDetail) map the same state set to colors but have drifted (different "preparing" handling, different fallback opacity).Recommendation: Extract
AddShipmentModaltofrontend/src/components/AddShipmentModal.tsx; move the state-color mapping tolib/utils.tsalongsideSTATE_LABELS.Full detail:
docs/architecture-review.md§ C + § H.4Fixed on branch
architecture-rework, commit5402f3e: extractedcomponents/AddShipmentModal.tsx, bothDashboard.tsxandShipments.tsxnow import it. Also consolidated the drifted state-color mapping into a singlestateDotColorinlib/utils.ts. Verified:tsc --noEmit,eslint,vite buildall pass.