diff --git a/src/components/residential/residential-clients-list.tsx b/src/components/residential/residential-clients-list.tsx index 9f0cb16..123a2b9 100644 --- a/src/components/residential/residential-clients-list.tsx +++ b/src/components/residential/residential-clients-list.tsx @@ -18,6 +18,7 @@ import { SubdivisionCombobox } from '@/components/shared/subdivision-combobox'; import { PhoneInput, type PhoneInputValue } from '@/components/shared/phone-input'; import { useRealtimeInvalidation } from '@/hooks/use-realtime-invalidation'; import { apiFetch } from '@/lib/api/client'; +import { cn } from '@/lib/utils'; import type { CountryCode } from '@/lib/i18n/countries'; interface ResidentialClientRow { @@ -85,7 +86,9 @@ export function ResidentialClientsList() { /> -
+ {/* Desktop: table layout. Hidden below lg because the 6 columns clip + off the viewport at phone widths. */} +
@@ -137,6 +140,51 @@ export function ResidentialClientsList() {
+ {/* Mobile: card list. Each card mirrors the table row data with + name + status pill on top, then meta line(s) below. */} +
+ {isLoading && ( +
+ Loading… +
+ )} + {!isLoading && data?.data.length === 0 && ( +
+ No residential clients yet. +
+ )} + {data?.data.map((c) => ( + +
+

{c.fullName}

+ + {STATUS_LABELS[c.status] ?? c.status} + +
+
+ {c.email ? {c.email} : null} + {c.phone ? {c.phone} : null} + {c.placeOfResidence ? {c.placeOfResidence} : null} + {c.source ? · {c.source} : null} +
+ + ))} +
+
); diff --git a/src/components/residential/residential-interests-list.tsx b/src/components/residential/residential-interests-list.tsx index 1f1291d..637dca8 100644 --- a/src/components/residential/residential-interests-list.tsx +++ b/src/components/residential/residential-interests-list.tsx @@ -94,7 +94,8 @@ export function ResidentialInterestsList() { -
+ {/* Desktop: table layout. Hidden below lg; mobile renders cards. */} +
@@ -149,6 +150,47 @@ export function ResidentialInterestsList() {
+ + {/* Mobile: card list. Stage as the headline (it's the most actionable + field for triage), preferences/notes truncated below. */} +
+ {isLoading && ( +
+ Loading… +
+ )} + {!isLoading && data?.data.length === 0 && ( +
+ No interests match. +
+ )} + {data?.data.map((i) => ( + +
+

+ {STAGE_LABELS[i.pipelineStage] ?? i.pipelineStage} +

+ + {new Date(i.updatedAt).toLocaleDateString()} + +
+ {i.preferences ? ( +

{i.preferences}

+ ) : null} + {i.notes ? ( +

{i.notes}

+ ) : null} + {i.source ? ( +

{i.source}

+ ) : null} + + ))} +
); }