From 9aa9fa29f1df57849210bf67338a865ec5bf23f7 Mon Sep 17 00:00:00 2001 From: Chaim Date: Sat, 25 Apr 2026 14:35:47 +0000 Subject: [PATCH] feat(ui): add gush/parcel/sub-parcel columns to DealsTable; fix proximity labels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add גוש, חלקה, תת-חלקה columns (gushNum/parcelNum/subParcelNum from Govmap) - Fix house number access: was reading `house_num` (non-existent field), now reads `houseNum` (actual extra field from Govmap API) - Rename proximity labels: "באותו רחוב" → "סביבה קרובה", "בשכונה" → "שכונה" because "street" polygon searches return deals from multiple streets, making "same street" label factually incorrect Co-Authored-By: Claude Opus 4.7 (1M context) --- web/src/api/types.ts | 5 ++++- web/src/components/DealsTable.tsx | 16 +++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/web/src/api/types.ts b/web/src/api/types.ts index 967edd4..aca5923 100644 --- a/web/src/api/types.ts +++ b/web/src/api/types.ts @@ -38,7 +38,10 @@ export interface Deal { property_type_description?: string; settlementNameHeb?: string; streetNameHeb?: string; - house_num?: string | number; + houseNum?: string | number; + gushNum?: number | null; + parcelNum?: number | null; + subParcelNum?: number | null; price_per_sqm?: number; deal_source?: string | null; [key: string]: unknown; diff --git a/web/src/components/DealsTable.tsx b/web/src/components/DealsTable.tsx index b63fdf4..e980887 100644 --- a/web/src/components/DealsTable.tsx +++ b/web/src/components/DealsTable.tsx @@ -7,8 +7,8 @@ interface Props { const SOURCE_LABELS: Record = { same_building: "אותו בניין", - street: "באותו רחוב", - neighborhood: "בשכונה", + street: "סביבה קרובה", + neighborhood: "שכונה", }; export function DealsTable({ deals }: Props) { @@ -33,14 +33,17 @@ export function DealsTable({ deals }: Props) { שטח (מ"ר) מחיר מחיר/מ"ר + גוש + חלקה + תת-חלקה קרבה {deals.map((d) => { - const street = (d.streetNameHeb as string) || ""; - const houseNum = (d.house_num as string | number | undefined) ?? ""; - const settlement = (d.settlementNameHeb as string) || ""; + const street = d.streetNameHeb || ""; + const houseNum = d.houseNum ?? ""; + const settlement = d.settlementNameHeb || ""; const address = [street, houseNum, settlement].filter(Boolean).join(" "); return ( @@ -56,6 +59,9 @@ export function DealsTable({ deals }: Props) { {formatCurrencyILS(d.price_per_sqm)} + {d.gushNum ?? "—"} + {d.parcelNum ?? "—"} + {d.subParcelNum ?? "—"} {d.deal_source ? (