From da783d48cdca201b55ba611797e9a3f0e1c0c6d1 Mon Sep 17 00:00:00 2001 From: Adam Moussa <166072409+amoussa1229@users.noreply.github.com> Date: Wed, 27 May 2026 18:21:03 -0400 Subject: [PATCH] fix(web): restore WEB-C1/M4 fixes reverted by rebase conflict resolution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - client.ts: localStorage → sessionStorage (WEB-C1 critical fix) - proposals.ts: re-add 'Other' to ServiceCategory (WEB-M4) - ProposalListPage.tsx: STATUS_COLORS → STATUS_CHIP_STYLES (visual design) --- web/src/lib/api/client.ts | 2 +- web/src/lib/api/proposals.ts | 2 +- web/src/pages/proposals/list/ProposalListPage.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/lib/api/client.ts b/web/src/lib/api/client.ts index ee19f11..6bdb6fd 100644 --- a/web/src/lib/api/client.ts +++ b/web/src/lib/api/client.ts @@ -13,7 +13,7 @@ const apiClient = axios.create({ apiClient.interceptors.request.use( (config) => { - const tokenData = window.localStorage.getItem(STORAGE_KEY_TOKEN); + const tokenData = window.sessionStorage.getItem(STORAGE_KEY_TOKEN); if (tokenData) { try { const parsed = JSON.parse(tokenData); diff --git a/web/src/lib/api/proposals.ts b/web/src/lib/api/proposals.ts index cfebec5..cac276c 100644 --- a/web/src/lib/api/proposals.ts +++ b/web/src/lib/api/proposals.ts @@ -1,7 +1,7 @@ import apiClient from './client'; // Fix: WEB-M5 — align with shared contract types (shared/api-contracts/src/index.ts) -export type ServiceCategory = 'HVAC' | 'Plumbing' | 'Electrical' | 'General' | 'Renovation'; +export type ServiceCategory = 'HVAC' | 'Plumbing' | 'Electrical' | 'General' | 'Renovation' | 'Other'; export type Priority = 'Standard' | 'Urgent' | 'Emergency'; export interface CreateProposalRequest { diff --git a/web/src/pages/proposals/list/ProposalListPage.tsx b/web/src/pages/proposals/list/ProposalListPage.tsx index 34c7609..ac2e252 100644 --- a/web/src/pages/proposals/list/ProposalListPage.tsx +++ b/web/src/pages/proposals/list/ProposalListPage.tsx @@ -21,7 +21,7 @@ import SearchIcon from '@mui/icons-material/Search'; import AddCircleIcon from '@mui/icons-material/AddCircle'; import { usePaginatedList } from '../../../hooks/usePaginatedList'; import { proposalsApi, type ProposalListItem } from '../../../lib/api/proposals'; -import { STATUS_COLORS } from '../../../constants'; +import { STATUS_CHIP_STYLES } from '../../../constants'; import { formatBidAmount, formatDate, formatDateFull } from '../../../lib/format'; import { useDocumentTitle } from '../../../hooks/useDocumentTitle'; @@ -121,7 +121,7 @@ export default function ProposalListPage() {