feat(ui): add gush/parcel/sub-parcel columns to DealsTable; fix proximity labels
- 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) <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -7,8 +7,8 @@ interface Props {
|
||||
|
||||
const SOURCE_LABELS: Record<string, string> = {
|
||||
same_building: "אותו בניין",
|
||||
street: "באותו רחוב",
|
||||
neighborhood: "בשכונה",
|
||||
street: "סביבה קרובה",
|
||||
neighborhood: "שכונה",
|
||||
};
|
||||
|
||||
export function DealsTable({ deals }: Props) {
|
||||
@@ -33,14 +33,17 @@ export function DealsTable({ deals }: Props) {
|
||||
<th className="p-3 text-end font-medium">שטח (מ"ר)</th>
|
||||
<th className="p-3 text-end font-medium">מחיר</th>
|
||||
<th className="p-3 text-end font-medium">מחיר/מ"ר</th>
|
||||
<th className="p-3 text-end font-medium">גוש</th>
|
||||
<th className="p-3 text-end font-medium">חלקה</th>
|
||||
<th className="p-3 text-end font-medium">תת-חלקה</th>
|
||||
<th className="p-3 text-start font-medium">קרבה</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{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 (
|
||||
<tr key={d.id} className="border-t hover:bg-accent/40">
|
||||
@@ -56,6 +59,9 @@ export function DealsTable({ deals }: Props) {
|
||||
<td className="p-3 text-end tabular-nums">
|
||||
{formatCurrencyILS(d.price_per_sqm)}
|
||||
</td>
|
||||
<td className="p-3 text-end tabular-nums">{d.gushNum ?? "—"}</td>
|
||||
<td className="p-3 text-end tabular-nums">{d.parcelNum ?? "—"}</td>
|
||||
<td className="p-3 text-end tabular-nums">{d.subParcelNum ?? "—"}</td>
|
||||
<td className="p-3">
|
||||
{d.deal_source ? (
|
||||
<span
|
||||
|
||||
Reference in New Issue
Block a user