@burdenoff/microfe-housingvista 2026.1102.2 → 2026.1102.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/housingvista/components/DocumentChip.d.ts +17 -0
- package/dist/housingvista/components/DocumentChip.d.ts.map +1 -0
- package/dist/housingvista/components/DocumentChip.js +68 -0
- package/dist/housingvista/components/DocumentChip.js.map +1 -0
- package/dist/housingvista/components/FileUploader.d.ts +2 -0
- package/dist/housingvista/components/FileUploader.d.ts.map +1 -1
- package/dist/housingvista/components/FileUploader.js +14 -14
- package/dist/housingvista/components/FileUploader.js.map +1 -1
- package/dist/housingvista/components/ServiceCategoryIcon.d.ts +13 -0
- package/dist/housingvista/components/ServiceCategoryIcon.d.ts.map +1 -0
- package/dist/housingvista/components/ServiceCategoryIcon.js +23 -0
- package/dist/housingvista/components/ServiceCategoryIcon.js.map +1 -0
- package/dist/housingvista/components/index.d.ts +1 -0
- package/dist/housingvista/components/index.d.ts.map +1 -1
- package/dist/housingvista/components/index.js +1 -0
- package/dist/housingvista/hooks/index.d.ts +9 -0
- package/dist/housingvista/hooks/index.d.ts.map +1 -1
- package/dist/housingvista/hooks/index.js +4 -2
- package/dist/housingvista/hooks/index.js.map +1 -1
- package/dist/housingvista/pages/investments/InvestmentDetailPage.d.ts.map +1 -1
- package/dist/housingvista/pages/investments/InvestmentDetailPage.js +345 -322
- package/dist/housingvista/pages/investments/InvestmentDetailPage.js.map +1 -1
- package/dist/housingvista/pages/investments/InvestmentDocuments.d.ts +11 -0
- package/dist/housingvista/pages/investments/InvestmentDocuments.d.ts.map +1 -0
- package/dist/housingvista/pages/investments/InvestmentDocuments.js +99 -0
- package/dist/housingvista/pages/investments/InvestmentDocuments.js.map +1 -0
- package/dist/housingvista/pages/legal/LegalPage.d.ts.map +1 -1
- package/dist/housingvista/pages/legal/LegalPage.js +87 -110
- package/dist/housingvista/pages/legal/LegalPage.js.map +1 -1
- package/dist/housingvista/pages/marketplace/MarketplacePage.d.ts.map +1 -1
- package/dist/housingvista/pages/marketplace/MarketplacePage.js +80 -113
- package/dist/housingvista/pages/marketplace/MarketplacePage.js.map +1 -1
- package/dist/housingvista/pages/marketplace/ServiceDetailPage.d.ts.map +1 -1
- package/dist/housingvista/pages/marketplace/ServiceDetailPage.js +127 -135
- package/dist/housingvista/pages/marketplace/ServiceDetailPage.js.map +1 -1
- package/dist/housingvista/pages/offers/OffersPage.d.ts.map +1 -1
- package/dist/housingvista/pages/offers/OffersPage.js +110 -176
- package/dist/housingvista/pages/offers/OffersPage.js.map +1 -1
- package/dist/housingvista/pages/offers/offerTimeline.d.ts +14 -0
- package/dist/housingvista/pages/offers/offerTimeline.d.ts.map +1 -0
- package/dist/housingvista/pages/offers/offerTimeline.js +77 -0
- package/dist/housingvista/pages/offers/offerTimeline.js.map +1 -0
- package/dist/housingvista/pages/properties/PropertyDetailPage.d.ts.map +1 -1
- package/dist/housingvista/pages/properties/PropertyDetailPage.js +262 -257
- package/dist/housingvista/pages/properties/PropertyDetailPage.js.map +1 -1
- package/dist/housingvista/pages/rental/ApplicationDocuments.d.ts.map +1 -1
- package/dist/housingvista/pages/rental/ApplicationDocuments.js +7 -34
- package/dist/housingvista/pages/rental/ApplicationDocuments.js.map +1 -1
- package/dist/housingvista/services/createSandboxAssistantTransport.d.ts.map +1 -1
- package/dist/housingvista/services/createSandboxAssistantTransport.js +12 -6
- package/dist/housingvista/services/createSandboxAssistantTransport.js.map +1 -1
- package/dist/housingvista/types/index.d.ts +3 -1
- package/dist/housingvista/types/index.d.ts.map +1 -1
- package/dist/housingvista/utils/assistantRetry.d.ts +31 -0
- package/dist/housingvista/utils/assistantRetry.d.ts.map +1 -0
- package/dist/housingvista/utils/assistantRetry.js +33 -0
- package/dist/housingvista/utils/assistantRetry.js.map +1 -0
- package/dist/housingvista/utils/investmentDocuments.d.ts +17 -0
- package/dist/housingvista/utils/investmentDocuments.d.ts.map +1 -0
- package/dist/housingvista/utils/investmentDocuments.js +12 -0
- package/dist/housingvista/utils/investmentDocuments.js.map +1 -0
- package/dist/housingvista/utils/serviceCategories.d.ts +105 -0
- package/dist/housingvista/utils/serviceCategories.d.ts.map +1 -0
- package/dist/housingvista/utils/serviceCategories.js +70 -0
- package/dist/housingvista/utils/serviceCategories.js.map +1 -0
- package/dist/housingvista/utils/similarProperties.d.ts +14 -0
- package/dist/housingvista/utils/similarProperties.d.ts.map +1 -0
- package/dist/housingvista/utils/similarProperties.js +17 -0
- package/dist/housingvista/utils/similarProperties.js.map +1 -0
- package/package.json +1 -1
|
@@ -22,20 +22,21 @@ import { describeInvestmentError as Ee, getTrackedInvestmentStatus as De } from
|
|
|
22
22
|
import { CoordinatePicker as Oe } from "../../components/maps/CoordinatePicker.js";
|
|
23
23
|
import { amenityOptions as d } from "../../utils/amenities.js";
|
|
24
24
|
import { currencyOptions as ke, facingOptions as Ae, furnishingOptions as je, propertyCategoryOptions as Me, propertyTypeOptions as Ne } from "../../utils/propertyOptions.js";
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
25
|
+
import { pickSimilarProperties as Pe, similarPropertiesFilter as Fe } from "../../utils/similarProperties.js";
|
|
26
|
+
import { useMemo as Ie, useState as f } from "react";
|
|
27
|
+
import { ArrowLeft as Le, BadgeCheck as Re, Bath as ze, Bed as Be, Building as Ve, Calculator as He, Calendar as Ue, Car as We, CheckCircle as p, ChevronLeft as Ge, ChevronRight as Ke, Compass as qe, DollarSign as Je, Download as Ye, Dumbbell as m, Flame as Xe, Heart as Ze, KeyRound as Qe, MapPin as $e, MessageSquare as et, Navigation as tt, ParkingCircle as nt, Pencil as rt, PencilRuler as it, Share2 as at, Shield as h, Square as ot, Trash2 as st, TreePine as g, TrendingUp as ct, Utensils as lt, Waves as ut, Wifi as dt, Wind as ft } from "lucide-react";
|
|
28
|
+
import { useLocation as pt, useNavigate as mt, useParams as ht } from "react-router";
|
|
29
|
+
import { Fragment as gt, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
30
|
+
import { Button as y, EmphasisPanel as _t, NextSteps as vt, PagePurpose as yt, ResponsiveDialog as b, ResponsiveDialogContent as x, ResponsiveDialogDescription as S, ResponsiveDialogFooter as C, ResponsiveDialogHeader as w, ResponsiveDialogTitle as T } from "@burdenoff/fe-libs/ui";
|
|
30
31
|
//#region src/housingvista/pages/properties/PropertyDetailPage.tsx
|
|
31
|
-
var
|
|
32
|
+
var bt = {
|
|
32
33
|
for_sale: "success",
|
|
33
34
|
for_rent: "info",
|
|
34
35
|
sold: "muted",
|
|
35
36
|
rented: "muted",
|
|
36
37
|
under_contract: "warning",
|
|
37
38
|
off_market: "error"
|
|
38
|
-
},
|
|
39
|
+
}, xt = [
|
|
39
40
|
{
|
|
40
41
|
value: "for_sale",
|
|
41
42
|
label: "For Sale"
|
|
@@ -60,7 +61,7 @@ var vt = {
|
|
|
60
61
|
value: "off_market",
|
|
61
62
|
label: "Off Market"
|
|
62
63
|
}
|
|
63
|
-
],
|
|
64
|
+
], St = [
|
|
64
65
|
{
|
|
65
66
|
value: "sale",
|
|
66
67
|
label: "Sale"
|
|
@@ -73,7 +74,7 @@ var vt = {
|
|
|
73
74
|
value: "lease",
|
|
74
75
|
label: "Lease"
|
|
75
76
|
}
|
|
76
|
-
],
|
|
77
|
+
], Ct = [
|
|
77
78
|
{
|
|
78
79
|
value: "",
|
|
79
80
|
label: "— (one-time)"
|
|
@@ -90,7 +91,7 @@ var vt = {
|
|
|
90
91
|
value: "yearly",
|
|
91
92
|
label: "Yearly"
|
|
92
93
|
}
|
|
93
|
-
],
|
|
94
|
+
], wt = {
|
|
94
95
|
title: "",
|
|
95
96
|
description: "",
|
|
96
97
|
status: "for_sale",
|
|
@@ -125,7 +126,7 @@ var vt = {
|
|
|
125
126
|
pricePerSqft: "",
|
|
126
127
|
amenities: [],
|
|
127
128
|
extraAmenities: []
|
|
128
|
-
},
|
|
129
|
+
}, Tt = 10, E = (e) => {
|
|
129
130
|
let t = e.trim();
|
|
130
131
|
if (t === "") return null;
|
|
131
132
|
let n = Number(t);
|
|
@@ -133,7 +134,7 @@ var vt = {
|
|
|
133
134
|
}, D = (e) => {
|
|
134
135
|
let t = E(e);
|
|
135
136
|
return t === null ? void 0 : t;
|
|
136
|
-
}, O = (e) => e == null ? "" : String(e), k = (e) => e ?? "",
|
|
137
|
+
}, O = (e) => e == null ? "" : String(e), k = (e) => e ?? "", Et = (e) => e.split(",").map((e) => e.trim()).filter(Boolean), Dt = [
|
|
137
138
|
{
|
|
138
139
|
key: "bedrooms",
|
|
139
140
|
label: "Bedrooms",
|
|
@@ -195,11 +196,11 @@ var vt = {
|
|
|
195
196
|
step: "1"
|
|
196
197
|
}
|
|
197
198
|
];
|
|
198
|
-
function
|
|
199
|
+
function Ot() {
|
|
199
200
|
let e = new Date(Date.now() + 10080 * 60 * 1e3);
|
|
200
201
|
return (/* @__PURE__ */ new Date(e.getTime() - e.getTimezoneOffset() * 6e4)).toISOString().slice(0, 16);
|
|
201
202
|
}
|
|
202
|
-
var
|
|
203
|
+
var kt = [
|
|
203
204
|
{
|
|
204
205
|
id: "details",
|
|
205
206
|
label: "Details"
|
|
@@ -216,10 +217,10 @@ var Dt = [
|
|
|
216
217
|
id: "documents",
|
|
217
218
|
label: "Documents"
|
|
218
219
|
}
|
|
219
|
-
], A = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
220
|
+
], A = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", At = [
|
|
220
221
|
{
|
|
221
222
|
match: /pool|swim/i,
|
|
222
|
-
icon:
|
|
223
|
+
icon: ut
|
|
223
224
|
},
|
|
224
225
|
{
|
|
225
226
|
match: /gym|fitness/i,
|
|
@@ -227,7 +228,7 @@ var Dt = [
|
|
|
227
228
|
},
|
|
228
229
|
{
|
|
229
230
|
match: /park/i,
|
|
230
|
-
icon:
|
|
231
|
+
icon: nt
|
|
231
232
|
},
|
|
232
233
|
{
|
|
233
234
|
match: /garden|green|lawn|park/i,
|
|
@@ -239,26 +240,26 @@ var Dt = [
|
|
|
239
240
|
},
|
|
240
241
|
{
|
|
241
242
|
match: /wifi|internet|broadband/i,
|
|
242
|
-
icon:
|
|
243
|
+
icon: dt
|
|
243
244
|
},
|
|
244
245
|
{
|
|
245
246
|
match: /a\/?c|air.?condition|central air|hvac/i,
|
|
246
|
-
icon:
|
|
247
|
+
icon: ft
|
|
247
248
|
},
|
|
248
249
|
{
|
|
249
250
|
match: /fire|chimney|heat/i,
|
|
250
|
-
icon:
|
|
251
|
+
icon: Xe
|
|
251
252
|
},
|
|
252
253
|
{
|
|
253
254
|
match: /kitchen|modular|dining/i,
|
|
254
|
-
icon:
|
|
255
|
+
icon: lt
|
|
255
256
|
},
|
|
256
257
|
{
|
|
257
258
|
match: /car|garage/i,
|
|
258
|
-
icon:
|
|
259
|
+
icon: We
|
|
259
260
|
}
|
|
260
|
-
],
|
|
261
|
-
function
|
|
261
|
+
], jt = (e) => At.find((t) => t.match.test(e))?.icon ?? p;
|
|
262
|
+
function Mt(e) {
|
|
262
263
|
switch (e.toLowerCase()) {
|
|
263
264
|
case "vacant": return "Vacant — accepting applications";
|
|
264
265
|
case "occupied": return "Currently occupied";
|
|
@@ -267,7 +268,7 @@ function At(e) {
|
|
|
267
268
|
default: return e.replace(/[-_]/g, " ");
|
|
268
269
|
}
|
|
269
270
|
}
|
|
270
|
-
function
|
|
271
|
+
function Nt(e) {
|
|
271
272
|
switch (e.toLowerCase()) {
|
|
272
273
|
case "vacant": return "success";
|
|
273
274
|
case "occupied": return "muted";
|
|
@@ -276,20 +277,24 @@ function jt(e) {
|
|
|
276
277
|
default: return "muted";
|
|
277
278
|
}
|
|
278
279
|
}
|
|
279
|
-
var
|
|
280
|
-
let { id: p } =
|
|
280
|
+
var Pt = () => {
|
|
281
|
+
let { id: p } = ht(), m = mt(), Xe = pt(), { emit: nt, emitResource: h } = te();
|
|
281
282
|
l("housingvista.property.viewed", p);
|
|
282
|
-
let { data: g, loading:
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
283
|
+
let { data: g, loading: lt } = se(p), { data: ut } = oe({
|
|
284
|
+
filter: g ? Fe(g) : void 0,
|
|
285
|
+
pagination: {
|
|
286
|
+
limit: 100,
|
|
287
|
+
offset: 0
|
|
288
|
+
},
|
|
289
|
+
skip: !g
|
|
290
|
+
}), { data: dt } = de(), { data: ft } = le({
|
|
286
291
|
filter: p ? { propertyId: p } : void 0,
|
|
287
292
|
pagination: {
|
|
288
293
|
limit: 1,
|
|
289
294
|
offset: 0
|
|
290
295
|
}
|
|
291
|
-
}), { saveShortlist:
|
|
292
|
-
if (
|
|
296
|
+
}), { saveShortlist: At, loading: Pt } = ue(), { removeShortlist: Ft, loading: It } = ce(), { bookViewing: Lt, loading: Rt } = ne(), { submitOffer: zt, loading: Bt } = fe(), { updateProperty: Vt, loading: j } = me(), { deleteProperty: Ht, loading: Ut } = ie(), { submitRentalApplication: Wt, loading: Gt } = pe(), { deleteUploadedFiles: Kt } = ee(), { createInvestment: qt, loading: Jt } = re(), { eligibilityVerified: Yt, loading: Xt } = ae(), { updatePropertyReraStatus: Zt, loading: Qt } = he(), $t = Ie(() => g ? Pe(g, ut) : [], [g, ut]), M = Ie(() => dt.some((e) => e.propertyId === p), [dt, p]), [N, P] = f(0), [F, en] = f("details"), [tn, I] = f(!1), [nn, L] = f(!1), [rn, R] = f(!1), [an, on] = f(!1), [sn, cn] = f(!1), [ln, un] = f(!1), [dn, fn] = f(""), [pn, mn] = f(""), [hn, gn] = f(""), [_n, vn] = f(""), [yn, bn] = f(""), [z, B] = f([]), [xn, Sn] = f(!1), [Cn, wn] = f(""), [Tn, En] = f(""), [Dn, On] = f("8"), [V, kn] = f(!0), [An, jn] = f("6"), [H, Mn] = f(!1), [Nn, Pn] = f("20"), [Fn, In] = f("8.5"), [Ln, Rn] = f("20"), [U, zn] = f(""), [Bn, Vn] = f("in_person"), [Hn, Un] = f(""), [Wn, Gn] = f(""), [Kn, qn] = f(""), [Jn, Yn] = f(""), [Xn, Zn] = f(""), [Qn, W] = f(""), [G, $n] = f(wt), [er, tr] = f(wt);
|
|
297
|
+
if (lt && !g) return /* @__PURE__ */ v("div", {
|
|
293
298
|
className: "space-y-6 p-6",
|
|
294
299
|
children: [/* @__PURE__ */ _(c, { className: "h-80" }), /* @__PURE__ */ _(c, { variant: "detail" })]
|
|
295
300
|
});
|
|
@@ -297,66 +302,66 @@ var Mt = () => {
|
|
|
297
302
|
className: "p-6",
|
|
298
303
|
children: /* @__PURE__ */ _(o, {
|
|
299
304
|
illustration: "empty-search",
|
|
300
|
-
icon: /* @__PURE__ */ _(
|
|
305
|
+
icon: /* @__PURE__ */ _(Ve, { className: "h-12 w-12" }),
|
|
301
306
|
title: "Property Not Found",
|
|
302
307
|
description: "The property you're looking for doesn't exist or has been removed.",
|
|
303
308
|
action: /* @__PURE__ */ v("button", {
|
|
304
309
|
onClick: () => m("../properties"),
|
|
305
310
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text",
|
|
306
|
-
children: [/* @__PURE__ */ _(
|
|
311
|
+
children: [/* @__PURE__ */ _(Le, { className: "h-4 w-4" }), "Back to Properties"]
|
|
307
312
|
})
|
|
308
313
|
})
|
|
309
314
|
});
|
|
310
|
-
let
|
|
315
|
+
let nr = [{
|
|
311
316
|
label: "Properties",
|
|
312
317
|
href: "../"
|
|
313
|
-
}, { label: g.title }],
|
|
318
|
+
}, { label: g.title }], rr = (e) => {
|
|
314
319
|
let t = n(e.amount, e.currency);
|
|
315
320
|
return e.type === "rent" && e.period ? `${t}/${e.period.replace("ly", "")}` : t;
|
|
316
|
-
},
|
|
321
|
+
}, ir = () => P((e) => e === g.images.length - 1 ? 0 : e + 1), ar = () => P((e) => e === 0 ? g.images.length - 1 : e - 1), or = () => {
|
|
317
322
|
navigator.share ? navigator.share({
|
|
318
323
|
title: g.title,
|
|
319
324
|
text: g.description,
|
|
320
325
|
url: window.location.href
|
|
321
326
|
}) : (navigator.clipboard.writeText(window.location.href), u.info("Link copied", "The property link is on your clipboard."));
|
|
322
|
-
},
|
|
327
|
+
}, sr = async () => {
|
|
323
328
|
try {
|
|
324
|
-
M ? (await
|
|
329
|
+
M ? (await Ft(g.id), u.success("Removed from shortlist")) : (await At(g.id), h("housingvista.shortlist.property_added", g.id), u.success("Saved to shortlist"));
|
|
325
330
|
} catch (e) {
|
|
326
331
|
u.error("Could not update shortlist", e.message);
|
|
327
332
|
}
|
|
328
|
-
},
|
|
333
|
+
}, cr = async (e) => {
|
|
329
334
|
if (e.preventDefault(), U) try {
|
|
330
|
-
await
|
|
335
|
+
await Lt({
|
|
331
336
|
propertyId: g.id,
|
|
332
337
|
scheduledAt: new Date(U).toISOString(),
|
|
333
|
-
type:
|
|
334
|
-
attendeeName:
|
|
335
|
-
attendeeEmail:
|
|
336
|
-
notes:
|
|
337
|
-
}), h("housingvista.viewing.scheduled", g.id), u.success("Viewing requested", "The owner will confirm your slot shortly."), I(!1),
|
|
338
|
+
type: Bn,
|
|
339
|
+
attendeeName: Hn.trim() || void 0,
|
|
340
|
+
attendeeEmail: Wn.trim() || void 0,
|
|
341
|
+
notes: Kn.trim() || void 0
|
|
342
|
+
}), h("housingvista.viewing.scheduled", g.id), u.success("Viewing requested", "The owner will confirm your slot shortly."), I(!1), zn(""), Un(""), Gn(""), qn("");
|
|
338
343
|
} catch (e) {
|
|
339
344
|
u.error("Could not book viewing", e.message);
|
|
340
345
|
}
|
|
341
|
-
},
|
|
346
|
+
}, lr = async (e) => {
|
|
342
347
|
e.preventDefault();
|
|
343
|
-
let t = Number(
|
|
348
|
+
let t = Number(Jn);
|
|
344
349
|
if (!t || t <= 0) {
|
|
345
350
|
u.warning("Enter a valid offer amount");
|
|
346
351
|
return;
|
|
347
352
|
}
|
|
348
353
|
try {
|
|
349
|
-
await
|
|
354
|
+
await zt({
|
|
350
355
|
propertyId: g.id,
|
|
351
356
|
amount: t,
|
|
352
357
|
currency: g.price.currency,
|
|
353
|
-
notes:
|
|
354
|
-
expiresAt:
|
|
355
|
-
}), h("housingvista.offer.created", g.id), u.success("Offer submitted", `Your offer of ${n(t, g.price.currency)} was sent.`), L(!1),
|
|
358
|
+
notes: Xn.trim() || void 0,
|
|
359
|
+
expiresAt: Qn ? new Date(Qn).toISOString() : void 0
|
|
360
|
+
}), h("housingvista.offer.created", g.id), u.success("Offer submitted", `Your offer of ${n(t, g.price.currency)} was sent.`), L(!1), Yn(""), Zn(""), W("");
|
|
356
361
|
} catch (e) {
|
|
357
362
|
u.error("Could not submit offer", e.message);
|
|
358
363
|
}
|
|
359
|
-
},
|
|
364
|
+
}, ur = () => {
|
|
360
365
|
let e = g.location.coordinates, t = {
|
|
361
366
|
title: g.title,
|
|
362
367
|
description: k(g.description),
|
|
@@ -396,11 +401,11 @@ var Mt = () => {
|
|
|
396
401
|
extraAmenities: g.amenities.filter((e) => !d.some((t) => t.label === e.name)),
|
|
397
402
|
catalogAmenities: g.amenities.filter((e) => d.some((t) => t.label === e.name))
|
|
398
403
|
};
|
|
399
|
-
|
|
400
|
-
}, K = (e) =>
|
|
404
|
+
$n(t), tr(t), R(!0);
|
|
405
|
+
}, K = (e) => $n((t) => ({
|
|
401
406
|
...t,
|
|
402
407
|
...e
|
|
403
|
-
})), q = (e) => e.trim(),
|
|
408
|
+
})), q = (e) => e.trim(), dr = async (e) => {
|
|
404
409
|
e.preventDefault();
|
|
405
410
|
let t = G.title.trim(), n = G.city.trim(), r = G.state.trim(), i = E(G.bedrooms), a = E(G.bathrooms), o = E(G.totalArea), s = E(G.price);
|
|
406
411
|
if (!t || !n || !r) {
|
|
@@ -423,7 +428,7 @@ var Mt = () => {
|
|
|
423
428
|
u.warning("Enter a price greater than zero");
|
|
424
429
|
return;
|
|
425
430
|
}
|
|
426
|
-
let c =
|
|
431
|
+
let c = Et(G.landmarks), ee = c.join("|") !== Et(er.landmarks).join("|"), te = [...G.amenities].sort().join("|") !== [...er.amenities].sort().join("|"), l = {
|
|
427
432
|
title: t,
|
|
428
433
|
description: q(G.description),
|
|
429
434
|
status: G.status,
|
|
@@ -479,92 +484,92 @@ var Mt = () => {
|
|
|
479
484
|
l.amenities = [...t.values()];
|
|
480
485
|
}
|
|
481
486
|
try {
|
|
482
|
-
await
|
|
487
|
+
await Vt(g.id, l), h("housingvista.property.updated", g.id), u.success("Property updated"), R(!1);
|
|
483
488
|
} catch (e) {
|
|
484
489
|
u.error("Could not update property", e.message);
|
|
485
490
|
}
|
|
486
|
-
},
|
|
491
|
+
}, fr = async () => {
|
|
487
492
|
try {
|
|
488
|
-
await
|
|
493
|
+
await Ht(g.id), h("housingvista.property.deleted", g.id), u.success("Property deleted"), m("../properties");
|
|
489
494
|
} catch (e) {
|
|
490
495
|
u.error("Could not delete property", e.message);
|
|
491
496
|
}
|
|
492
|
-
}, J =
|
|
497
|
+
}, J = ft[0], Y = J?.id, pr = async (e) => {
|
|
493
498
|
if (e.preventDefault(), !Y) {
|
|
494
499
|
u.warning("No rental unit is available for this property yet");
|
|
495
500
|
return;
|
|
496
501
|
}
|
|
497
|
-
if (!
|
|
502
|
+
if (!dn.trim() || !pn.trim()) {
|
|
498
503
|
u.warning("Enter your name and email to apply");
|
|
499
504
|
return;
|
|
500
505
|
}
|
|
501
506
|
try {
|
|
502
|
-
await
|
|
507
|
+
await Wt({
|
|
503
508
|
rentalUnitId: Y,
|
|
504
|
-
applicantName:
|
|
505
|
-
applicantEmail:
|
|
506
|
-
applicantPhone:
|
|
507
|
-
monthlyIncome:
|
|
508
|
-
moveInDate:
|
|
509
|
+
applicantName: dn.trim(),
|
|
510
|
+
applicantEmail: pn.trim(),
|
|
511
|
+
applicantPhone: hn.trim() || void 0,
|
|
512
|
+
monthlyIncome: _n ? Number(_n) : void 0,
|
|
513
|
+
moveInDate: yn ? new Date(yn).toISOString() : void 0,
|
|
509
514
|
documentFileIds: z.length > 0 ? z.map((e) => e.id) : void 0
|
|
510
|
-
}), u.success("Application submitted", "The owner will review your rental application shortly."),
|
|
515
|
+
}), u.success("Application submitted", "The owner will review your rental application shortly."), cn(!1), fn(""), mn(""), gn(""), vn(""), bn(""), B([]);
|
|
511
516
|
} catch (e) {
|
|
512
517
|
u.error("Could not submit application", e.message);
|
|
513
518
|
}
|
|
514
|
-
},
|
|
519
|
+
}, mr = (e) => {
|
|
515
520
|
B((t) => [...t, ...e]);
|
|
516
|
-
},
|
|
517
|
-
e.length !== 0 &&
|
|
521
|
+
}, hr = (e) => {
|
|
522
|
+
e.length !== 0 && Kt(e.map((e) => e.id)).then((e) => {
|
|
518
523
|
e.length > 0 && u.warning("Some uploaded documents could not be removed", "You can delete them from your files.");
|
|
519
524
|
});
|
|
520
|
-
},
|
|
525
|
+
}, gr = (e) => {
|
|
521
526
|
let t = z.find((t) => t.id === e);
|
|
522
|
-
B((t) => t.filter((t) => t.id !== e)), t &&
|
|
523
|
-
},
|
|
527
|
+
B((t) => t.filter((t) => t.id !== e)), t && hr([t]);
|
|
528
|
+
}, _r = (e) => {
|
|
524
529
|
if (!e) {
|
|
525
|
-
if (
|
|
526
|
-
|
|
530
|
+
if (xn) return;
|
|
531
|
+
hr(z), B([]);
|
|
527
532
|
}
|
|
528
|
-
|
|
529
|
-
},
|
|
533
|
+
cn(e);
|
|
534
|
+
}, vr = async () => {
|
|
530
535
|
try {
|
|
531
|
-
await
|
|
536
|
+
await qt({
|
|
532
537
|
propertyId: g.id,
|
|
533
538
|
title: `${g.title} — investment`,
|
|
534
|
-
status: De(
|
|
539
|
+
status: De(Yt),
|
|
535
540
|
investmentType: "full_ownership",
|
|
536
541
|
riskLevel: "medium",
|
|
537
542
|
totalValue: g.price.amount,
|
|
538
543
|
startDate: (/* @__PURE__ */ new Date()).toISOString()
|
|
539
|
-
}), u.success("Tracking investment",
|
|
544
|
+
}), u.success("Tracking investment", Yt ? `${g.title} was added to your portfolio.` : `${g.title} was added to your portfolio as an expression of interest.`);
|
|
540
545
|
} catch (e) {
|
|
541
546
|
u.error("Could not track investment", Ee(e));
|
|
542
547
|
}
|
|
543
|
-
},
|
|
548
|
+
}, yr = async (e) => {
|
|
544
549
|
try {
|
|
545
|
-
await
|
|
550
|
+
await Zt(g.id, e), u.success(e === "verified" ? "RERA registration verified" : "RERA registration rejected", g.title);
|
|
546
551
|
} catch (e) {
|
|
547
552
|
u.error("Could not update RERA status", e.message);
|
|
548
553
|
}
|
|
549
|
-
}, X = g.price.amount,
|
|
554
|
+
}, X = g.price.amount, br = Number(Cn) || Math.round(X * .005), xr = Number(Tn) || Math.round(X * .0015), Sr = br * 12, Cr = X > 0 ? Sr / X * 100 : 0, wr = Sr - xr * 12, Tr = X > 0 ? wr / X * 100 : 0, Er = Math.max(0, Number(Dn) || 0) / 100, Dr = Array.from({ length: 6 }, (e, t) => ({
|
|
550
555
|
label: t === 0 ? "Now" : `Yr ${t}`,
|
|
551
|
-
value: Math.round(X * (1 +
|
|
552
|
-
})),
|
|
556
|
+
value: Math.round(X * (1 + Er) ** +t)
|
|
557
|
+
})), Or = Dr[Dr.length - 1].value, kr = Or - X + wr * 5, Ar = X > 0 ? kr / X * 100 : 0, jr = Math.max(0, Number(An) || 0), Mr = V ? jr / 100 * X : 0, Nr = Math.min(100, Math.max(0, Number(Nn) || 0)), Pr = Math.max(0, Number(Fn) || 0) / 100, Fr = Math.max(1, Number(Ln) || 1), Ir = H ? Nr / 100 * X : X, Z = H ? X - Ir : 0, Q = Pr / 12, Lr = Fr * 12, Rr = H && Z > 0 ? Q > 0 ? Z * Q * (1 + Q) ** +Lr / ((1 + Q) ** +Lr - 1) : Z / Lr : 0, zr = Rr * 12, $ = Ir + Mr, Br = wr - zr, Vr = $ > 0 ? Br / $ * 100 : 0;
|
|
553
558
|
return /* @__PURE__ */ v("div", {
|
|
554
559
|
className: "space-y-6 p-6",
|
|
555
560
|
children: [
|
|
556
|
-
/* @__PURE__ */ _(s, { items:
|
|
561
|
+
/* @__PURE__ */ _(s, { items: nr }),
|
|
557
562
|
/* @__PURE__ */ v("div", {
|
|
558
563
|
className: "flex flex-wrap items-center gap-3",
|
|
559
564
|
children: [
|
|
560
565
|
/* @__PURE__ */ v("button", {
|
|
561
566
|
onClick: () => m("../properties"),
|
|
562
567
|
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-1.5 text-sm text-text-primary transition-colors hover:bg-bg-sunken",
|
|
563
|
-
children: [/* @__PURE__ */ _(
|
|
568
|
+
children: [/* @__PURE__ */ _(Le, { className: "h-4 w-4" }), "Back"]
|
|
564
569
|
}),
|
|
565
570
|
/* @__PURE__ */ _(a, {
|
|
566
571
|
label: g.status.replace("_", " "),
|
|
567
|
-
variant:
|
|
572
|
+
variant: bt[g.status] ?? "default",
|
|
568
573
|
dot: !0
|
|
569
574
|
}),
|
|
570
575
|
g.verificationStatus === "verified" && /* @__PURE__ */ _(a, {
|
|
@@ -582,23 +587,23 @@ var Mt = () => {
|
|
|
582
587
|
type: "button",
|
|
583
588
|
variant: "outline",
|
|
584
589
|
size: "sm",
|
|
585
|
-
onClick:
|
|
586
|
-
children: [/* @__PURE__ */ _(
|
|
590
|
+
onClick: ur,
|
|
591
|
+
children: [/* @__PURE__ */ _(rt, { className: "mr-1.5 h-4 w-4" }), "Edit"]
|
|
587
592
|
}), /* @__PURE__ */ v(y, {
|
|
588
593
|
type: "button",
|
|
589
594
|
variant: "outline",
|
|
590
595
|
size: "sm",
|
|
591
|
-
onClick: () =>
|
|
592
|
-
children: [/* @__PURE__ */ _(
|
|
596
|
+
onClick: () => on(!0),
|
|
597
|
+
children: [/* @__PURE__ */ _(st, { className: "mr-1.5 h-4 w-4" }), "Delete"]
|
|
593
598
|
})]
|
|
594
599
|
})
|
|
595
600
|
]
|
|
596
601
|
}),
|
|
597
|
-
/* @__PURE__ */ _(
|
|
602
|
+
/* @__PURE__ */ _(yt, {
|
|
598
603
|
className: "max-w-3xl",
|
|
599
604
|
children: "Everything you need to evaluate this property in one place — photos, specifications, amenities, and location. Use it to shortlist the property, schedule a viewing, or make an offer."
|
|
600
605
|
}),
|
|
601
|
-
/* @__PURE__ */ _(
|
|
606
|
+
/* @__PURE__ */ _(vt, {
|
|
602
607
|
storageKey: "housingvista-property-detail",
|
|
603
608
|
steps: [
|
|
604
609
|
{
|
|
@@ -612,14 +617,14 @@ var Mt = () => {
|
|
|
612
617
|
label: "Make an offer",
|
|
613
618
|
description: "Submit a price and let the owner respond.",
|
|
614
619
|
onClick: () => {
|
|
615
|
-
W(
|
|
620
|
+
W(Ot()), L(!0);
|
|
616
621
|
}
|
|
617
622
|
},
|
|
618
623
|
{
|
|
619
624
|
id: "location",
|
|
620
625
|
label: "Explore the location",
|
|
621
626
|
description: "See the neighborhood, nearby landmarks, and map.",
|
|
622
|
-
onClick: () =>
|
|
627
|
+
onClick: () => en("location")
|
|
623
628
|
}
|
|
624
629
|
]
|
|
625
630
|
}),
|
|
@@ -635,39 +640,39 @@ var Mt = () => {
|
|
|
635
640
|
className: "h-80 w-full object-cover sm:h-[26rem]"
|
|
636
641
|
}) : /* @__PURE__ */ v("div", {
|
|
637
642
|
className: "flex h-80 w-full flex-col items-center justify-center gap-3 bg-gradient-to-br from-[var(--color-action-primary-bg)]/12 via-bg-sunken to-[var(--color-accent-blue)]/12 text-text-secondary/70 sm:h-[26rem]",
|
|
638
|
-
children: [/* @__PURE__ */ _(
|
|
643
|
+
children: [/* @__PURE__ */ _(Ve, { className: "h-12 w-12" }), /* @__PURE__ */ _("span", {
|
|
639
644
|
className: "text-sm font-medium tracking-wide",
|
|
640
645
|
children: "No photos yet"
|
|
641
646
|
})]
|
|
642
647
|
}),
|
|
643
|
-
g.images.length > 1 && /* @__PURE__ */ v(
|
|
644
|
-
onClick:
|
|
648
|
+
g.images.length > 1 && /* @__PURE__ */ v(gt, { children: [/* @__PURE__ */ _("button", {
|
|
649
|
+
onClick: ar,
|
|
645
650
|
"aria-label": "Previous photo",
|
|
646
651
|
className: "absolute left-4 top-1/2 -translate-y-1/2 rounded-full bg-bg-overlay/70 p-2 text-text-inverse transition-colors hover:bg-bg-overlay",
|
|
647
|
-
children: /* @__PURE__ */ _(
|
|
652
|
+
children: /* @__PURE__ */ _(Ge, { className: "h-5 w-5" })
|
|
648
653
|
}), /* @__PURE__ */ _("button", {
|
|
649
|
-
onClick:
|
|
654
|
+
onClick: ir,
|
|
650
655
|
"aria-label": "Next photo",
|
|
651
656
|
className: "absolute right-4 top-1/2 -translate-y-1/2 rounded-full bg-bg-overlay/70 p-2 text-text-inverse transition-colors hover:bg-bg-overlay",
|
|
652
|
-
children: /* @__PURE__ */ _(
|
|
657
|
+
children: /* @__PURE__ */ _(Ke, { className: "h-5 w-5" })
|
|
653
658
|
})] }),
|
|
654
659
|
g.verificationStatus === "verified" && /* @__PURE__ */ v("div", {
|
|
655
660
|
className: "absolute left-4 top-4 inline-flex items-center gap-1.5 rounded-full bg-status-success-bg-subtle px-3 py-1 text-xs font-semibold text-status-success-text shadow-elevation-1 backdrop-blur-sm",
|
|
656
|
-
children: [/* @__PURE__ */ _(
|
|
661
|
+
children: [/* @__PURE__ */ _(Re, { className: "h-4 w-4" }), "Verified listing"]
|
|
657
662
|
}),
|
|
658
663
|
/* @__PURE__ */ v("div", {
|
|
659
664
|
className: "absolute right-4 top-4 flex gap-2",
|
|
660
665
|
children: [/* @__PURE__ */ _("button", {
|
|
661
|
-
onClick:
|
|
662
|
-
disabled:
|
|
666
|
+
onClick: sr,
|
|
667
|
+
disabled: Pt || It,
|
|
663
668
|
"aria-label": M ? "Remove from shortlist" : "Save to shortlist",
|
|
664
669
|
className: "rounded-full bg-bg-surface/85 p-2 shadow-elevation-1 backdrop-blur-sm transition-colors hover:bg-bg-surface disabled:opacity-60",
|
|
665
|
-
children: /* @__PURE__ */ _(
|
|
670
|
+
children: /* @__PURE__ */ _(Ze, { className: e("h-5 w-5", M ? "fill-status-error-text text-status-error-text" : "text-text-secondary") })
|
|
666
671
|
}), /* @__PURE__ */ _("button", {
|
|
667
|
-
onClick:
|
|
672
|
+
onClick: or,
|
|
668
673
|
"aria-label": "Share this listing",
|
|
669
674
|
className: "rounded-full bg-bg-surface/85 p-2 shadow-elevation-1 backdrop-blur-sm transition-colors hover:bg-bg-surface",
|
|
670
|
-
children: /* @__PURE__ */ _(
|
|
675
|
+
children: /* @__PURE__ */ _(at, { className: "h-5 w-5 text-text-secondary" })
|
|
671
676
|
})]
|
|
672
677
|
}),
|
|
673
678
|
g.images.length > 0 && /* @__PURE__ */ _("div", {
|
|
@@ -701,7 +706,7 @@ var Mt = () => {
|
|
|
701
706
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/50 p-3",
|
|
702
707
|
children: [/* @__PURE__ */ v("p", {
|
|
703
708
|
className: "mb-2 flex items-center gap-1.5 text-xs font-medium text-text-secondary",
|
|
704
|
-
children: [/* @__PURE__ */ _(
|
|
709
|
+
children: [/* @__PURE__ */ _(it, { className: "h-3.5 w-3.5" }), "Floor plans"]
|
|
705
710
|
}), /* @__PURE__ */ _("div", {
|
|
706
711
|
className: "flex gap-3 overflow-x-auto pb-1",
|
|
707
712
|
children: g.images.map((e, t) => ({
|
|
@@ -725,7 +730,7 @@ var Mt = () => {
|
|
|
725
730
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
726
731
|
children: [/* @__PURE__ */ v("div", {
|
|
727
732
|
className: "space-y-6 lg:col-span-2",
|
|
728
|
-
children: [/* @__PURE__ */ v(
|
|
733
|
+
children: [/* @__PURE__ */ v(_t, { children: [
|
|
729
734
|
/* @__PURE__ */ v("div", {
|
|
730
735
|
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
731
736
|
children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h1", {
|
|
@@ -733,7 +738,7 @@ var Mt = () => {
|
|
|
733
738
|
children: g.title
|
|
734
739
|
}), /* @__PURE__ */ v("div", {
|
|
735
740
|
className: "mt-2 flex items-center text-text-secondary",
|
|
736
|
-
children: [/* @__PURE__ */ _(
|
|
741
|
+
children: [/* @__PURE__ */ _($e, { className: "mr-1.5 h-4 w-4 shrink-0" }), /* @__PURE__ */ _("span", {
|
|
737
742
|
className: "text-sm",
|
|
738
743
|
children: [
|
|
739
744
|
g.location.address,
|
|
@@ -745,7 +750,7 @@ var Mt = () => {
|
|
|
745
750
|
className: "text-right",
|
|
746
751
|
children: [/* @__PURE__ */ _("div", {
|
|
747
752
|
className: "text-2xl font-bold text-text-primary",
|
|
748
|
-
children:
|
|
753
|
+
children: rr(g.price)
|
|
749
754
|
}), g.price.pricePerSqft && /* @__PURE__ */ v("div", {
|
|
750
755
|
className: "text-sm text-text-secondary",
|
|
751
756
|
children: [n(g.price.pricePerSqft), "/sqft"]
|
|
@@ -756,26 +761,26 @@ var Mt = () => {
|
|
|
756
761
|
className: "mt-6 grid grid-cols-2 gap-3 border-t border-border-subtle pt-6 sm:grid-cols-4",
|
|
757
762
|
children: [
|
|
758
763
|
g.specifications.bedrooms != null && {
|
|
759
|
-
icon:
|
|
764
|
+
icon: Be,
|
|
760
765
|
value: String(g.specifications.bedrooms),
|
|
761
766
|
label: g.specifications.bedrooms === 1 ? "Bedroom" : "Bedrooms"
|
|
762
767
|
},
|
|
763
768
|
g.specifications.bathrooms != null && {
|
|
764
|
-
icon:
|
|
769
|
+
icon: ze,
|
|
765
770
|
value: String(g.specifications.bathrooms),
|
|
766
771
|
label: g.specifications.bathrooms === 1 ? "Bathroom" : "Bathrooms"
|
|
767
772
|
},
|
|
768
773
|
{
|
|
769
|
-
icon:
|
|
774
|
+
icon: ot,
|
|
770
775
|
value: i(g.specifications.totalArea),
|
|
771
776
|
label: "sq ft"
|
|
772
777
|
},
|
|
773
778
|
g.specifications.parking != null && g.specifications.parking > 0 ? {
|
|
774
|
-
icon:
|
|
779
|
+
icon: We,
|
|
775
780
|
value: String(g.specifications.parking),
|
|
776
781
|
label: "Parking"
|
|
777
782
|
} : g.specifications.facing ? {
|
|
778
|
-
icon:
|
|
783
|
+
icon: qe,
|
|
779
784
|
value: g.specifications.facing,
|
|
780
785
|
label: "Facing"
|
|
781
786
|
} : !1
|
|
@@ -813,8 +818,8 @@ var Mt = () => {
|
|
|
813
818
|
className: "border-b border-border-subtle",
|
|
814
819
|
children: /* @__PURE__ */ _("nav", {
|
|
815
820
|
className: "flex space-x-6 overflow-x-auto px-6",
|
|
816
|
-
children:
|
|
817
|
-
onClick: () =>
|
|
821
|
+
children: kt.map((t) => /* @__PURE__ */ _("button", {
|
|
822
|
+
onClick: () => en(t.id),
|
|
818
823
|
className: e("whitespace-nowrap border-b-2 py-3 text-sm font-medium transition-colors", F === t.id ? "border-action-primary-border text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
|
|
819
824
|
children: t.label
|
|
820
825
|
}, t.id))
|
|
@@ -950,7 +955,7 @@ var Mt = () => {
|
|
|
950
955
|
className: "flex flex-col items-center gap-2 rounded-lg border border-border-subtle bg-bg-sunken/40 p-4 text-center",
|
|
951
956
|
children: [/* @__PURE__ */ _("span", {
|
|
952
957
|
className: "flex h-10 w-10 items-center justify-center rounded-full bg-status-success-bg-subtle text-status-success-text",
|
|
953
|
-
children: /* @__PURE__ */ _(
|
|
958
|
+
children: /* @__PURE__ */ _(jt(e.name), { className: "h-5 w-5" })
|
|
954
959
|
}), /* @__PURE__ */ _("span", {
|
|
955
960
|
className: "text-sm font-medium text-text-primary",
|
|
956
961
|
children: e.name
|
|
@@ -980,7 +985,7 @@ var Mt = () => {
|
|
|
980
985
|
children: [
|
|
981
986
|
/* @__PURE__ */ _("span", {
|
|
982
987
|
className: "flex h-11 w-11 items-center justify-center rounded-full bg-action-primary-bg text-action-primary-text shadow-pop",
|
|
983
|
-
children: /* @__PURE__ */ _(
|
|
988
|
+
children: /* @__PURE__ */ _($e, { className: "h-5 w-5" })
|
|
984
989
|
}),
|
|
985
990
|
/* @__PURE__ */ _("span", {
|
|
986
991
|
className: "mt-1 rounded-md bg-bg-surface/90 px-2 py-0.5 text-sm font-semibold text-text-primary shadow-elevation-1 backdrop-blur-sm",
|
|
@@ -997,7 +1002,7 @@ var Mt = () => {
|
|
|
997
1002
|
target: "_blank",
|
|
998
1003
|
rel: "noreferrer",
|
|
999
1004
|
className: "absolute bottom-3 right-3 inline-flex items-center gap-1.5 rounded-md bg-bg-surface/90 px-2.5 py-1.5 text-xs font-medium text-text-primary shadow-elevation-1 backdrop-blur-sm transition-colors hover:bg-bg-surface",
|
|
1000
|
-
children: [/* @__PURE__ */ _(
|
|
1005
|
+
children: [/* @__PURE__ */ _(tt, { className: "h-3.5 w-3.5" }), "Open in Maps"]
|
|
1001
1006
|
})
|
|
1002
1007
|
]
|
|
1003
1008
|
}),
|
|
@@ -1103,7 +1108,7 @@ var Mt = () => {
|
|
|
1103
1108
|
className: "flex flex-wrap items-baseline gap-x-2 gap-y-1",
|
|
1104
1109
|
children: [/* @__PURE__ */ _("span", {
|
|
1105
1110
|
className: "text-3xl font-bold text-text-primary",
|
|
1106
|
-
children:
|
|
1111
|
+
children: rr(g.price)
|
|
1107
1112
|
}), g.price.negotiable && /* @__PURE__ */ _("span", {
|
|
1108
1113
|
className: "text-sm text-text-secondary",
|
|
1109
1114
|
children: "· Negotiable"
|
|
@@ -1120,16 +1125,16 @@ var Mt = () => {
|
|
|
1120
1125
|
type: "button",
|
|
1121
1126
|
className: "w-full justify-center",
|
|
1122
1127
|
onClick: () => {
|
|
1123
|
-
W(
|
|
1128
|
+
W(Ot()), L(!0);
|
|
1124
1129
|
},
|
|
1125
|
-
children: [/* @__PURE__ */ _(
|
|
1130
|
+
children: [/* @__PURE__ */ _(Je, { className: "mr-2 h-4 w-4" }), "Make Offer"]
|
|
1126
1131
|
}),
|
|
1127
|
-
g.status === "for_rent" && /* @__PURE__ */ v(
|
|
1132
|
+
g.status === "for_rent" && /* @__PURE__ */ v(gt, { children: [/* @__PURE__ */ v(y, {
|
|
1128
1133
|
type: "button",
|
|
1129
1134
|
className: "w-full justify-center",
|
|
1130
|
-
onClick: () =>
|
|
1135
|
+
onClick: () => cn(!0),
|
|
1131
1136
|
disabled: !Y,
|
|
1132
|
-
children: [/* @__PURE__ */ _(
|
|
1137
|
+
children: [/* @__PURE__ */ _(Qe, { className: "mr-2 h-4 w-4" }), "Apply to Rent"]
|
|
1133
1138
|
}), !Y && /* @__PURE__ */ _("p", {
|
|
1134
1139
|
className: "px-1 text-xs text-text-secondary",
|
|
1135
1140
|
children: "No rental unit is listed for this property yet — applications open once a unit is added."
|
|
@@ -1141,28 +1146,28 @@ var Mt = () => {
|
|
|
1141
1146
|
variant: "outline",
|
|
1142
1147
|
className: "w-full justify-center",
|
|
1143
1148
|
onClick: () => I(!0),
|
|
1144
|
-
children: [/* @__PURE__ */ _(
|
|
1149
|
+
children: [/* @__PURE__ */ _(Ue, { className: "mr-2 h-4 w-4" }), "Viewing"]
|
|
1145
1150
|
}), /* @__PURE__ */ v(y, {
|
|
1146
1151
|
type: "button",
|
|
1147
1152
|
variant: "outline",
|
|
1148
1153
|
className: "w-full justify-center",
|
|
1149
|
-
onClick: () =>
|
|
1150
|
-
children: [/* @__PURE__ */ _(
|
|
1154
|
+
onClick: () => un(!0),
|
|
1155
|
+
children: [/* @__PURE__ */ _(et, { className: "mr-2 h-4 w-4" }), "Contact"]
|
|
1151
1156
|
})]
|
|
1152
1157
|
}),
|
|
1153
1158
|
/* @__PURE__ */ v(y, {
|
|
1154
1159
|
type: "button",
|
|
1155
1160
|
variant: "outline",
|
|
1156
1161
|
className: "w-full justify-center",
|
|
1157
|
-
onClick:
|
|
1158
|
-
disabled:
|
|
1159
|
-
children: [/* @__PURE__ */ _(
|
|
1162
|
+
onClick: sr,
|
|
1163
|
+
disabled: Pt || It,
|
|
1164
|
+
children: [/* @__PURE__ */ _(Ze, { className: e("mr-2 h-4 w-4", M && "fill-status-error-text text-status-error-text") }), M ? "Saved to Shortlist" : "Save to Shortlist"]
|
|
1160
1165
|
})
|
|
1161
1166
|
]
|
|
1162
1167
|
}),
|
|
1163
1168
|
g.verificationStatus === "verified" && /* @__PURE__ */ v("div", {
|
|
1164
1169
|
className: "mt-4 flex items-center gap-2 border-t border-border-subtle pt-4 text-sm font-medium text-status-success-text",
|
|
1165
|
-
children: [/* @__PURE__ */ _(
|
|
1170
|
+
children: [/* @__PURE__ */ _(Re, { className: "h-4 w-4" }), "Verified listing"]
|
|
1166
1171
|
})
|
|
1167
1172
|
]
|
|
1168
1173
|
}),
|
|
@@ -1171,7 +1176,7 @@ var Mt = () => {
|
|
|
1171
1176
|
children: [
|
|
1172
1177
|
/* @__PURE__ */ v("div", {
|
|
1173
1178
|
className: "mb-4 flex items-center gap-2",
|
|
1174
|
-
children: [/* @__PURE__ */ _(
|
|
1179
|
+
children: [/* @__PURE__ */ _(He, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ _("h3", {
|
|
1175
1180
|
className: "text-base font-semibold text-text-primary",
|
|
1176
1181
|
children: "Investment Analysis"
|
|
1177
1182
|
})]
|
|
@@ -1189,9 +1194,9 @@ var Mt = () => {
|
|
|
1189
1194
|
}), /* @__PURE__ */ _("input", {
|
|
1190
1195
|
type: "number",
|
|
1191
1196
|
min: 0,
|
|
1192
|
-
value:
|
|
1193
|
-
onChange: (e) =>
|
|
1194
|
-
placeholder: String(
|
|
1197
|
+
value: Cn,
|
|
1198
|
+
onChange: (e) => wn(e.target.value),
|
|
1199
|
+
placeholder: String(br),
|
|
1195
1200
|
className: A
|
|
1196
1201
|
})] }),
|
|
1197
1202
|
/* @__PURE__ */ v("div", {
|
|
@@ -1206,9 +1211,9 @@ var Mt = () => {
|
|
|
1206
1211
|
}), /* @__PURE__ */ _("input", {
|
|
1207
1212
|
type: "number",
|
|
1208
1213
|
min: 0,
|
|
1209
|
-
value:
|
|
1210
|
-
onChange: (e) =>
|
|
1211
|
-
placeholder: String(
|
|
1214
|
+
value: Tn,
|
|
1215
|
+
onChange: (e) => En(e.target.value),
|
|
1216
|
+
placeholder: String(xr),
|
|
1212
1217
|
className: A
|
|
1213
1218
|
})] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
1214
1219
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
@@ -1217,8 +1222,8 @@ var Mt = () => {
|
|
|
1217
1222
|
type: "number",
|
|
1218
1223
|
min: 0,
|
|
1219
1224
|
step: .5,
|
|
1220
|
-
value:
|
|
1221
|
-
onChange: (e) =>
|
|
1225
|
+
value: Dn,
|
|
1226
|
+
onChange: (e) => On(e.target.value),
|
|
1222
1227
|
className: A
|
|
1223
1228
|
})] })]
|
|
1224
1229
|
}),
|
|
@@ -1238,15 +1243,15 @@ var Mt = () => {
|
|
|
1238
1243
|
children: [/* @__PURE__ */ _("input", {
|
|
1239
1244
|
type: "checkbox",
|
|
1240
1245
|
checked: V,
|
|
1241
|
-
onChange: (e) =>
|
|
1246
|
+
onChange: (e) => kn(e.target.checked),
|
|
1242
1247
|
className: "h-3.5 w-3.5 rounded border-border-subtle"
|
|
1243
1248
|
}), "Include stamp duty & registration"]
|
|
1244
1249
|
}), V && /* @__PURE__ */ _("input", {
|
|
1245
1250
|
type: "number",
|
|
1246
1251
|
min: 0,
|
|
1247
1252
|
step: .5,
|
|
1248
|
-
value:
|
|
1249
|
-
onChange: (e) =>
|
|
1253
|
+
value: An,
|
|
1254
|
+
onChange: (e) => jn(e.target.value),
|
|
1250
1255
|
"aria-label": "Stamp duty rate percent",
|
|
1251
1256
|
className: "h-7 w-16 rounded-md border border-border-subtle bg-bg-surface px-2 text-right text-xs text-text-primary"
|
|
1252
1257
|
})]
|
|
@@ -1258,7 +1263,7 @@ var Mt = () => {
|
|
|
1258
1263
|
children: [/* @__PURE__ */ _("input", {
|
|
1259
1264
|
type: "checkbox",
|
|
1260
1265
|
checked: H,
|
|
1261
|
-
onChange: (e) =>
|
|
1266
|
+
onChange: (e) => Mn(e.target.checked),
|
|
1262
1267
|
className: "h-3.5 w-3.5 rounded border-border-subtle"
|
|
1263
1268
|
}), "Include financing (loan)"]
|
|
1264
1269
|
})
|
|
@@ -1273,8 +1278,8 @@ var Mt = () => {
|
|
|
1273
1278
|
type: "number",
|
|
1274
1279
|
min: 0,
|
|
1275
1280
|
max: 100,
|
|
1276
|
-
value:
|
|
1277
|
-
onChange: (e) =>
|
|
1281
|
+
value: Nn,
|
|
1282
|
+
onChange: (e) => Pn(e.target.value),
|
|
1278
1283
|
className: A
|
|
1279
1284
|
})] }),
|
|
1280
1285
|
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
@@ -1284,8 +1289,8 @@ var Mt = () => {
|
|
|
1284
1289
|
type: "number",
|
|
1285
1290
|
min: 0,
|
|
1286
1291
|
step: .1,
|
|
1287
|
-
value:
|
|
1288
|
-
onChange: (e) =>
|
|
1292
|
+
value: Fn,
|
|
1293
|
+
onChange: (e) => In(e.target.value),
|
|
1289
1294
|
className: A
|
|
1290
1295
|
})] }),
|
|
1291
1296
|
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
@@ -1294,8 +1299,8 @@ var Mt = () => {
|
|
|
1294
1299
|
}), /* @__PURE__ */ _("input", {
|
|
1295
1300
|
type: "number",
|
|
1296
1301
|
min: 1,
|
|
1297
|
-
value:
|
|
1298
|
-
onChange: (e) =>
|
|
1302
|
+
value: Ln,
|
|
1303
|
+
onChange: (e) => Rn(e.target.value),
|
|
1299
1304
|
className: A
|
|
1300
1305
|
})] })
|
|
1301
1306
|
]
|
|
@@ -1304,7 +1309,7 @@ var Mt = () => {
|
|
|
1304
1309
|
type: "button",
|
|
1305
1310
|
onClick: () => m(`../home-loans${Te({
|
|
1306
1311
|
amount: Z,
|
|
1307
|
-
tenure:
|
|
1312
|
+
tenure: Fr,
|
|
1308
1313
|
propertyId: g.id
|
|
1309
1314
|
})}`),
|
|
1310
1315
|
className: "text-xs font-medium text-accent-blue hover:underline",
|
|
@@ -1318,7 +1323,7 @@ var Mt = () => {
|
|
|
1318
1323
|
" ",
|
|
1319
1324
|
/* @__PURE__ */ _("span", {
|
|
1320
1325
|
className: "font-semibold text-text-primary",
|
|
1321
|
-
children: t(
|
|
1326
|
+
children: t(Mr, g.price.currency)
|
|
1322
1327
|
})
|
|
1323
1328
|
] }),
|
|
1324
1329
|
H && /* @__PURE__ */ v("span", { children: [
|
|
@@ -1326,7 +1331,7 @@ var Mt = () => {
|
|
|
1326
1331
|
" ",
|
|
1327
1332
|
/* @__PURE__ */ _("span", {
|
|
1328
1333
|
className: "font-semibold text-text-primary",
|
|
1329
|
-
children: t(
|
|
1334
|
+
children: t(Rr, g.price.currency)
|
|
1330
1335
|
})
|
|
1331
1336
|
] }),
|
|
1332
1337
|
/* @__PURE__ */ v("span", { children: [
|
|
@@ -1351,7 +1356,7 @@ var Mt = () => {
|
|
|
1351
1356
|
children: "Gross Yield"
|
|
1352
1357
|
}), /* @__PURE__ */ v("div", {
|
|
1353
1358
|
className: "mt-0.5 text-lg font-bold text-status-success-text",
|
|
1354
|
-
children: [
|
|
1359
|
+
children: [Cr.toFixed(1), "%"]
|
|
1355
1360
|
})]
|
|
1356
1361
|
}),
|
|
1357
1362
|
/* @__PURE__ */ v("div", {
|
|
@@ -1361,7 +1366,7 @@ var Mt = () => {
|
|
|
1361
1366
|
children: "Net Yield"
|
|
1362
1367
|
}), /* @__PURE__ */ v("div", {
|
|
1363
1368
|
className: "mt-0.5 text-lg font-bold text-text-primary",
|
|
1364
|
-
children: [
|
|
1369
|
+
children: [Tr.toFixed(1), "%"]
|
|
1365
1370
|
})]
|
|
1366
1371
|
}),
|
|
1367
1372
|
/* @__PURE__ */ v("div", {
|
|
@@ -1371,7 +1376,7 @@ var Mt = () => {
|
|
|
1371
1376
|
children: H ? "Cash-on-Cash" : "5-yr ROI"
|
|
1372
1377
|
}), /* @__PURE__ */ v("div", {
|
|
1373
1378
|
className: "mt-0.5 text-lg font-bold text-text-primary",
|
|
1374
|
-
children: [H ?
|
|
1379
|
+
children: [H ? Vr.toFixed(1) : Ar.toFixed(0), "%"]
|
|
1375
1380
|
})]
|
|
1376
1381
|
})
|
|
1377
1382
|
]
|
|
@@ -1386,7 +1391,7 @@ var Mt = () => {
|
|
|
1386
1391
|
children: "Projected Value Growth"
|
|
1387
1392
|
}), /* @__PURE__ */ _("span", {
|
|
1388
1393
|
className: "text-xs font-semibold text-text-primary",
|
|
1389
|
-
children: t(
|
|
1394
|
+
children: t(Or, g.price.currency)
|
|
1390
1395
|
})]
|
|
1391
1396
|
}),
|
|
1392
1397
|
/* @__PURE__ */ _("div", {
|
|
@@ -1395,7 +1400,7 @@ var Mt = () => {
|
|
|
1395
1400
|
width: "100%",
|
|
1396
1401
|
height: "100%",
|
|
1397
1402
|
children: /* @__PURE__ */ v(we, {
|
|
1398
|
-
data:
|
|
1403
|
+
data: Dr,
|
|
1399
1404
|
margin: {
|
|
1400
1405
|
top: 4,
|
|
1401
1406
|
right: 4,
|
|
@@ -1456,9 +1461,9 @@ var Mt = () => {
|
|
|
1456
1461
|
type: "button",
|
|
1457
1462
|
variant: "outline",
|
|
1458
1463
|
className: "flex-1 justify-center",
|
|
1459
|
-
onClick:
|
|
1460
|
-
disabled:
|
|
1461
|
-
children: [/* @__PURE__ */ _(
|
|
1464
|
+
onClick: vr,
|
|
1465
|
+
disabled: Jt || Xt,
|
|
1466
|
+
children: [/* @__PURE__ */ _(ct, { className: "mr-2 h-4 w-4" }), Jt ? "Adding…" : "Track as Investment"]
|
|
1462
1467
|
}), /* @__PURE__ */ _(y, {
|
|
1463
1468
|
type: "button",
|
|
1464
1469
|
variant: "ghost",
|
|
@@ -1469,36 +1474,36 @@ var Mt = () => {
|
|
|
1469
1474
|
`Generated: ${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}`,
|
|
1470
1475
|
"",
|
|
1471
1476
|
`Listing price,${X}`,
|
|
1472
|
-
`Expected monthly rent,${
|
|
1473
|
-
`Monthly holding costs,${
|
|
1474
|
-
`Gross rental yield,${
|
|
1475
|
-
`Net rental yield,${
|
|
1476
|
-
`Appreciation rate (input),${(
|
|
1477
|
-
`Projected value (5yr),${
|
|
1478
|
-
`Projected ROI (5yr, unleveraged),${
|
|
1477
|
+
`Expected monthly rent,${br}`,
|
|
1478
|
+
`Monthly holding costs,${xr}`,
|
|
1479
|
+
`Gross rental yield,${Cr.toFixed(2)}%`,
|
|
1480
|
+
`Net rental yield,${Tr.toFixed(2)}%`,
|
|
1481
|
+
`Appreciation rate (input),${(Er * 100).toFixed(2)}%`,
|
|
1482
|
+
`Projected value (5yr),${Or}`,
|
|
1483
|
+
`Projected ROI (5yr, unleveraged),${Ar.toFixed(2)}%`,
|
|
1479
1484
|
"",
|
|
1480
1485
|
`Stamp duty & registration included,${V ? "Yes" : "No"}`,
|
|
1481
|
-
`Stamp duty rate,${
|
|
1482
|
-
`Stamp duty & registration cost,${
|
|
1486
|
+
`Stamp duty rate,${jr}%`,
|
|
1487
|
+
`Stamp duty & registration cost,${Mr.toFixed(0)}`,
|
|
1483
1488
|
"",
|
|
1484
1489
|
`Financing included,${H ? "Yes" : "No"}`,
|
|
1485
1490
|
...H ? [
|
|
1486
|
-
`Down payment (${
|
|
1491
|
+
`Down payment (${Nr}%),${Ir.toFixed(0)}`,
|
|
1487
1492
|
`Loan amount,${Z.toFixed(0)}`,
|
|
1488
|
-
`Loan rate,${(
|
|
1489
|
-
`Loan tenure (years),${
|
|
1490
|
-
`Monthly EMI,${
|
|
1491
|
-
`Annual debt service,${
|
|
1493
|
+
`Loan rate,${(Pr * 100).toFixed(2)}%`,
|
|
1494
|
+
`Loan tenure (years),${Fr}`,
|
|
1495
|
+
`Monthly EMI,${Rr.toFixed(0)}`,
|
|
1496
|
+
`Annual debt service,${zr.toFixed(0)}`
|
|
1492
1497
|
] : [],
|
|
1493
1498
|
`Net cash outlay,${$.toFixed(0)}`,
|
|
1494
|
-
`Cash-on-cash return,${
|
|
1499
|
+
`Cash-on-cash return,${Vr.toFixed(2)}%`,
|
|
1495
1500
|
"",
|
|
1496
1501
|
"This is not financial advice. Consult a licensed financial advisor before investing."
|
|
1497
1502
|
], t = new Blob([e.join("\n")], { type: "text/csv;charset=utf-8;" }), n = URL.createObjectURL(t), r = document.createElement("a");
|
|
1498
1503
|
r.href = n, r.download = `${g.id}-investment-analysis.csv`, r.click(), URL.revokeObjectURL(n);
|
|
1499
1504
|
},
|
|
1500
1505
|
"aria-label": "Download investment analysis report",
|
|
1501
|
-
children: /* @__PURE__ */ _(
|
|
1506
|
+
children: /* @__PURE__ */ _(Ye, { className: "h-4 w-4" })
|
|
1502
1507
|
})]
|
|
1503
1508
|
})
|
|
1504
1509
|
]
|
|
@@ -1520,7 +1525,7 @@ var Mt = () => {
|
|
|
1520
1525
|
children: "Status"
|
|
1521
1526
|
}), /* @__PURE__ */ _(a, {
|
|
1522
1527
|
label: g.status.replace("_", " "),
|
|
1523
|
-
variant:
|
|
1528
|
+
variant: bt[g.status] ?? "default"
|
|
1524
1529
|
})]
|
|
1525
1530
|
}),
|
|
1526
1531
|
/* @__PURE__ */ v("div", {
|
|
@@ -1540,7 +1545,7 @@ var Mt = () => {
|
|
|
1540
1545
|
children: "RERA status"
|
|
1541
1546
|
}), /* @__PURE__ */ v("span", {
|
|
1542
1547
|
className: "flex items-center gap-1.5 font-medium capitalize text-text-primary",
|
|
1543
|
-
children: [g.reraVerificationStatus === "verified" && /* @__PURE__ */ _(
|
|
1548
|
+
children: [g.reraVerificationStatus === "verified" && /* @__PURE__ */ _(Re, { className: "h-4 w-4 text-status-success-text" }), g.reraVerificationStatus.replace("_", " ")]
|
|
1544
1549
|
})]
|
|
1545
1550
|
}),
|
|
1546
1551
|
g.reraRegistrationNo && /* @__PURE__ */ v("div", {
|
|
@@ -1571,28 +1576,28 @@ var Mt = () => {
|
|
|
1571
1576
|
type: "button",
|
|
1572
1577
|
variant: "outline",
|
|
1573
1578
|
className: "flex-1 justify-center",
|
|
1574
|
-
disabled:
|
|
1575
|
-
onClick: () =>
|
|
1579
|
+
disabled: Qt,
|
|
1580
|
+
onClick: () => yr("verified"),
|
|
1576
1581
|
children: "Verify RERA"
|
|
1577
1582
|
}), /* @__PURE__ */ _(y, {
|
|
1578
1583
|
type: "button",
|
|
1579
1584
|
variant: "ghost",
|
|
1580
1585
|
className: "flex-1 justify-center",
|
|
1581
|
-
disabled:
|
|
1582
|
-
onClick: () =>
|
|
1586
|
+
disabled: Qt,
|
|
1587
|
+
onClick: () => yr("rejected"),
|
|
1583
1588
|
children: "Reject"
|
|
1584
1589
|
})]
|
|
1585
1590
|
})
|
|
1586
1591
|
]
|
|
1587
1592
|
}),
|
|
1588
|
-
|
|
1593
|
+
$t.length > 0 && /* @__PURE__ */ v("div", {
|
|
1589
1594
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
1590
1595
|
children: [/* @__PURE__ */ _("h3", {
|
|
1591
1596
|
className: "mb-4 text-base font-semibold text-text-primary",
|
|
1592
1597
|
children: "Similar Properties"
|
|
1593
1598
|
}), /* @__PURE__ */ _("div", {
|
|
1594
1599
|
className: "space-y-3",
|
|
1595
|
-
children:
|
|
1600
|
+
children: $t.map((e) => /* @__PURE__ */ v("button", {
|
|
1596
1601
|
onClick: () => m(`../properties/${e.id}`),
|
|
1597
1602
|
className: "flex w-full items-start gap-3 rounded-lg border border-border-subtle p-3 text-left transition-colors hover:bg-bg-sunken/50",
|
|
1598
1603
|
children: [e.images[0] && /* @__PURE__ */ _("img", {
|
|
@@ -1627,22 +1632,22 @@ var Mt = () => {
|
|
|
1627
1632
|
entityType: "housingvista-property"
|
|
1628
1633
|
}),
|
|
1629
1634
|
/* @__PURE__ */ _(ge, {
|
|
1630
|
-
open:
|
|
1631
|
-
onOpenChange:
|
|
1635
|
+
open: ln,
|
|
1636
|
+
onOpenChange: un,
|
|
1632
1637
|
entityId: g.id,
|
|
1633
1638
|
entityType: "housingvista-property",
|
|
1634
1639
|
title: g.title,
|
|
1635
|
-
pagePath:
|
|
1640
|
+
pagePath: Xe.pathname,
|
|
1636
1641
|
heading: "Contact owner",
|
|
1637
1642
|
description: `Ask a question or start a conversation about ${g.title}.`
|
|
1638
1643
|
}),
|
|
1639
1644
|
/* @__PURE__ */ _(b, {
|
|
1640
|
-
open:
|
|
1641
|
-
onOpenChange:
|
|
1645
|
+
open: sn,
|
|
1646
|
+
onOpenChange: _r,
|
|
1642
1647
|
children: /* @__PURE__ */ _(x, {
|
|
1643
1648
|
className: "sm:max-w-2xl",
|
|
1644
1649
|
children: /* @__PURE__ */ v("form", {
|
|
1645
|
-
onSubmit:
|
|
1650
|
+
onSubmit: pr,
|
|
1646
1651
|
children: [
|
|
1647
1652
|
/* @__PURE__ */ v(w, { children: [/* @__PURE__ */ _(T, { children: "Apply to rent" }), /* @__PURE__ */ v(S, { children: [
|
|
1648
1653
|
"Submit a rental application for ",
|
|
@@ -1662,8 +1667,8 @@ var Mt = () => {
|
|
|
1662
1667
|
}), /* @__PURE__ */ _("input", {
|
|
1663
1668
|
type: "text",
|
|
1664
1669
|
required: !0,
|
|
1665
|
-
value:
|
|
1666
|
-
onChange: (e) =>
|
|
1670
|
+
value: dn,
|
|
1671
|
+
onChange: (e) => fn(e.target.value),
|
|
1667
1672
|
className: A
|
|
1668
1673
|
})] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
1669
1674
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
@@ -1671,8 +1676,8 @@ var Mt = () => {
|
|
|
1671
1676
|
}), /* @__PURE__ */ _("input", {
|
|
1672
1677
|
type: "email",
|
|
1673
1678
|
required: !0,
|
|
1674
|
-
value:
|
|
1675
|
-
onChange: (e) =>
|
|
1679
|
+
value: pn,
|
|
1680
|
+
onChange: (e) => mn(e.target.value),
|
|
1676
1681
|
className: A
|
|
1677
1682
|
})] })]
|
|
1678
1683
|
}),
|
|
@@ -1683,8 +1688,8 @@ var Mt = () => {
|
|
|
1683
1688
|
children: "Phone"
|
|
1684
1689
|
}), /* @__PURE__ */ _("input", {
|
|
1685
1690
|
type: "tel",
|
|
1686
|
-
value:
|
|
1687
|
-
onChange: (e) =>
|
|
1691
|
+
value: hn,
|
|
1692
|
+
onChange: (e) => gn(e.target.value),
|
|
1688
1693
|
className: A
|
|
1689
1694
|
})] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
|
|
1690
1695
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
@@ -1696,8 +1701,8 @@ var Mt = () => {
|
|
|
1696
1701
|
}), /* @__PURE__ */ _("input", {
|
|
1697
1702
|
type: "number",
|
|
1698
1703
|
min: 0,
|
|
1699
|
-
value:
|
|
1700
|
-
onChange: (e) =>
|
|
1704
|
+
value: _n,
|
|
1705
|
+
onChange: (e) => vn(e.target.value),
|
|
1701
1706
|
className: A
|
|
1702
1707
|
})] })]
|
|
1703
1708
|
}),
|
|
@@ -1706,8 +1711,8 @@ var Mt = () => {
|
|
|
1706
1711
|
children: "Preferred move-in date"
|
|
1707
1712
|
}), /* @__PURE__ */ _("input", {
|
|
1708
1713
|
type: "date",
|
|
1709
|
-
value:
|
|
1710
|
-
onChange: (e) =>
|
|
1714
|
+
value: yn,
|
|
1715
|
+
onChange: (e) => bn(e.target.value),
|
|
1711
1716
|
className: A
|
|
1712
1717
|
})] }),
|
|
1713
1718
|
/* @__PURE__ */ v("div", { children: [
|
|
@@ -1719,17 +1724,17 @@ var Mt = () => {
|
|
|
1719
1724
|
className: "mb-2 text-xs text-text-secondary",
|
|
1720
1725
|
children: [
|
|
1721
1726
|
"Optional — ID, payslips or references (up to ",
|
|
1722
|
-
|
|
1727
|
+
Tt,
|
|
1723
1728
|
" files)."
|
|
1724
1729
|
]
|
|
1725
1730
|
}),
|
|
1726
1731
|
/* @__PURE__ */ _(ve, {
|
|
1727
1732
|
label: "Attach documents",
|
|
1728
1733
|
value: z,
|
|
1729
|
-
maxFiles:
|
|
1730
|
-
onUploaded:
|
|
1731
|
-
onRemove:
|
|
1732
|
-
onBusyChange:
|
|
1734
|
+
maxFiles: Tt - z.length,
|
|
1735
|
+
onUploaded: mr,
|
|
1736
|
+
onRemove: gr,
|
|
1737
|
+
onBusyChange: Sn
|
|
1733
1738
|
})
|
|
1734
1739
|
] })
|
|
1735
1740
|
]
|
|
@@ -1758,7 +1763,7 @@ var Mt = () => {
|
|
|
1758
1763
|
})]
|
|
1759
1764
|
})]
|
|
1760
1765
|
}),
|
|
1761
|
-
J ? /* @__PURE__ */ v(
|
|
1766
|
+
J ? /* @__PURE__ */ v(gt, { children: [/* @__PURE__ */ v("dl", {
|
|
1762
1767
|
className: "mt-3 grid grid-cols-2 gap-3 border-t border-border-subtle pt-3",
|
|
1763
1768
|
children: [
|
|
1764
1769
|
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("dt", {
|
|
@@ -1788,8 +1793,8 @@ var Mt = () => {
|
|
|
1788
1793
|
}), /* @__PURE__ */ _("dd", {
|
|
1789
1794
|
className: "mt-0.5",
|
|
1790
1795
|
children: /* @__PURE__ */ _(a, {
|
|
1791
|
-
label:
|
|
1792
|
-
variant:
|
|
1796
|
+
label: Mt(J.status),
|
|
1797
|
+
variant: Nt(J.status)
|
|
1793
1798
|
})
|
|
1794
1799
|
})] })
|
|
1795
1800
|
]
|
|
@@ -1811,7 +1816,7 @@ var Mt = () => {
|
|
|
1811
1816
|
className: "mt-1.5 space-y-1.5",
|
|
1812
1817
|
children: g.amenities.slice(0, 5).map((e) => /* @__PURE__ */ v("li", {
|
|
1813
1818
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
1814
|
-
children: [/* @__PURE__ */ _(
|
|
1819
|
+
children: [/* @__PURE__ */ _(jt(e.name), { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ _("span", {
|
|
1815
1820
|
className: "truncate",
|
|
1816
1821
|
children: e.name
|
|
1817
1822
|
})]
|
|
@@ -1833,25 +1838,25 @@ var Mt = () => {
|
|
|
1833
1838
|
/* @__PURE__ */ v(C, { children: [/* @__PURE__ */ _(y, {
|
|
1834
1839
|
type: "button",
|
|
1835
1840
|
variant: "outline",
|
|
1836
|
-
disabled:
|
|
1837
|
-
onClick: () =>
|
|
1841
|
+
disabled: xn,
|
|
1842
|
+
onClick: () => _r(!1),
|
|
1838
1843
|
children: "Cancel"
|
|
1839
1844
|
}), /* @__PURE__ */ _(y, {
|
|
1840
1845
|
type: "submit",
|
|
1841
|
-
disabled:
|
|
1842
|
-
children:
|
|
1846
|
+
disabled: Gt || xn || !Y,
|
|
1847
|
+
children: Gt ? "Submitting…" : "Submit application"
|
|
1843
1848
|
})] })
|
|
1844
1849
|
]
|
|
1845
1850
|
})
|
|
1846
1851
|
})
|
|
1847
1852
|
}),
|
|
1848
1853
|
/* @__PURE__ */ _(b, {
|
|
1849
|
-
open:
|
|
1854
|
+
open: tn,
|
|
1850
1855
|
onOpenChange: I,
|
|
1851
1856
|
children: /* @__PURE__ */ _(x, {
|
|
1852
1857
|
className: "sm:max-w-md",
|
|
1853
1858
|
children: /* @__PURE__ */ v("form", {
|
|
1854
|
-
onSubmit:
|
|
1859
|
+
onSubmit: cr,
|
|
1855
1860
|
children: [
|
|
1856
1861
|
/* @__PURE__ */ v(w, { children: [/* @__PURE__ */ _(T, { children: "Schedule a viewing" }), /* @__PURE__ */ v(S, { children: [
|
|
1857
1862
|
"Pick a date and time to see ",
|
|
@@ -1868,15 +1873,15 @@ var Mt = () => {
|
|
|
1868
1873
|
type: "datetime-local",
|
|
1869
1874
|
required: !0,
|
|
1870
1875
|
value: U,
|
|
1871
|
-
onChange: (e) =>
|
|
1876
|
+
onChange: (e) => zn(e.target.value),
|
|
1872
1877
|
className: A
|
|
1873
1878
|
})] }),
|
|
1874
1879
|
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
1875
1880
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
1876
1881
|
children: "Type"
|
|
1877
1882
|
}), /* @__PURE__ */ v("select", {
|
|
1878
|
-
value:
|
|
1879
|
-
onChange: (e) =>
|
|
1883
|
+
value: Bn,
|
|
1884
|
+
onChange: (e) => Vn(e.target.value),
|
|
1880
1885
|
className: A,
|
|
1881
1886
|
children: [/* @__PURE__ */ _("option", {
|
|
1882
1887
|
value: "in_person",
|
|
@@ -1891,22 +1896,22 @@ var Mt = () => {
|
|
|
1891
1896
|
children: [/* @__PURE__ */ _("input", {
|
|
1892
1897
|
type: "text",
|
|
1893
1898
|
placeholder: "Your name",
|
|
1894
|
-
value:
|
|
1895
|
-
onChange: (e) =>
|
|
1899
|
+
value: Hn,
|
|
1900
|
+
onChange: (e) => Un(e.target.value),
|
|
1896
1901
|
className: A
|
|
1897
1902
|
}), /* @__PURE__ */ _("input", {
|
|
1898
1903
|
type: "email",
|
|
1899
1904
|
placeholder: "Your email",
|
|
1900
|
-
value:
|
|
1901
|
-
onChange: (e) =>
|
|
1905
|
+
value: Wn,
|
|
1906
|
+
onChange: (e) => Gn(e.target.value),
|
|
1902
1907
|
className: A
|
|
1903
1908
|
})]
|
|
1904
1909
|
}),
|
|
1905
1910
|
/* @__PURE__ */ _("textarea", {
|
|
1906
1911
|
placeholder: "Notes (optional)",
|
|
1907
1912
|
rows: 2,
|
|
1908
|
-
value:
|
|
1909
|
-
onChange: (e) =>
|
|
1913
|
+
value: Kn,
|
|
1914
|
+
onChange: (e) => qn(e.target.value),
|
|
1910
1915
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
1911
1916
|
})
|
|
1912
1917
|
]
|
|
@@ -1918,24 +1923,24 @@ var Mt = () => {
|
|
|
1918
1923
|
children: "Cancel"
|
|
1919
1924
|
}), /* @__PURE__ */ _(y, {
|
|
1920
1925
|
type: "submit",
|
|
1921
|
-
disabled:
|
|
1922
|
-
children:
|
|
1926
|
+
disabled: Rt || !U,
|
|
1927
|
+
children: Rt ? "Booking…" : "Request viewing"
|
|
1923
1928
|
})] })
|
|
1924
1929
|
]
|
|
1925
1930
|
})
|
|
1926
1931
|
})
|
|
1927
1932
|
}),
|
|
1928
1933
|
/* @__PURE__ */ _(b, {
|
|
1929
|
-
open:
|
|
1934
|
+
open: nn,
|
|
1930
1935
|
onOpenChange: L,
|
|
1931
1936
|
children: /* @__PURE__ */ _(x, {
|
|
1932
1937
|
className: "sm:max-w-md",
|
|
1933
1938
|
children: /* @__PURE__ */ v("form", {
|
|
1934
|
-
onSubmit:
|
|
1939
|
+
onSubmit: lr,
|
|
1935
1940
|
children: [
|
|
1936
1941
|
/* @__PURE__ */ v(w, { children: [/* @__PURE__ */ _(T, { children: "Make an offer" }), /* @__PURE__ */ v(S, { children: [
|
|
1937
1942
|
"Listing price is ",
|
|
1938
|
-
|
|
1943
|
+
rr(g.price),
|
|
1939
1944
|
"."
|
|
1940
1945
|
] })] }),
|
|
1941
1946
|
/* @__PURE__ */ v("div", {
|
|
@@ -1952,16 +1957,16 @@ var Mt = () => {
|
|
|
1952
1957
|
type: "number",
|
|
1953
1958
|
required: !0,
|
|
1954
1959
|
min: 1,
|
|
1955
|
-
value:
|
|
1956
|
-
onChange: (e) =>
|
|
1960
|
+
value: Jn,
|
|
1961
|
+
onChange: (e) => Yn(e.target.value),
|
|
1957
1962
|
placeholder: "Enter amount",
|
|
1958
1963
|
className: A
|
|
1959
1964
|
})] }),
|
|
1960
1965
|
/* @__PURE__ */ _("textarea", {
|
|
1961
1966
|
placeholder: "Message to the owner (optional)",
|
|
1962
1967
|
rows: 3,
|
|
1963
|
-
value:
|
|
1964
|
-
onChange: (e) =>
|
|
1968
|
+
value: Xn,
|
|
1969
|
+
onChange: (e) => Zn(e.target.value),
|
|
1965
1970
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
1966
1971
|
}),
|
|
1967
1972
|
/* @__PURE__ */ v("div", { children: [
|
|
@@ -1973,7 +1978,7 @@ var Mt = () => {
|
|
|
1973
1978
|
/* @__PURE__ */ _("input", {
|
|
1974
1979
|
id: "offer-expires",
|
|
1975
1980
|
type: "datetime-local",
|
|
1976
|
-
value:
|
|
1981
|
+
value: Qn,
|
|
1977
1982
|
onChange: (e) => W(e.target.value),
|
|
1978
1983
|
className: A
|
|
1979
1984
|
}),
|
|
@@ -1991,20 +1996,20 @@ var Mt = () => {
|
|
|
1991
1996
|
children: "Cancel"
|
|
1992
1997
|
}), /* @__PURE__ */ _(y, {
|
|
1993
1998
|
type: "submit",
|
|
1994
|
-
disabled:
|
|
1995
|
-
children:
|
|
1999
|
+
disabled: Bt,
|
|
2000
|
+
children: Bt ? "Submitting…" : "Submit offer"
|
|
1996
2001
|
})] })
|
|
1997
2002
|
]
|
|
1998
2003
|
})
|
|
1999
2004
|
})
|
|
2000
2005
|
}),
|
|
2001
2006
|
/* @__PURE__ */ _(b, {
|
|
2002
|
-
open:
|
|
2007
|
+
open: rn,
|
|
2003
2008
|
onOpenChange: (e) => !e && !j && R(!1),
|
|
2004
2009
|
children: /* @__PURE__ */ _(x, {
|
|
2005
2010
|
className: "sm:max-w-2xl",
|
|
2006
2011
|
children: /* @__PURE__ */ v("form", {
|
|
2007
|
-
onSubmit:
|
|
2012
|
+
onSubmit: dr,
|
|
2008
2013
|
children: [
|
|
2009
2014
|
/* @__PURE__ */ v(w, { children: [/* @__PURE__ */ _(T, { children: "Edit property" }), /* @__PURE__ */ _(S, { children: "Update the listing details — basics, location, specifications and pricing. Photos are managed separately from the gallery." })] }),
|
|
2010
2015
|
/* @__PURE__ */ v("div", {
|
|
@@ -2046,7 +2051,7 @@ var Mt = () => {
|
|
|
2046
2051
|
value: G.status,
|
|
2047
2052
|
onChange: (e) => K({ status: e.target.value }),
|
|
2048
2053
|
className: A,
|
|
2049
|
-
children:
|
|
2054
|
+
children: xt.map((e) => /* @__PURE__ */ _("option", {
|
|
2050
2055
|
value: e.value,
|
|
2051
2056
|
children: e.label
|
|
2052
2057
|
}, e.value))
|
|
@@ -2177,7 +2182,7 @@ var Mt = () => {
|
|
|
2177
2182
|
}), /* @__PURE__ */ v("div", {
|
|
2178
2183
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-4",
|
|
2179
2184
|
children: [
|
|
2180
|
-
|
|
2185
|
+
Dt.map((e) => /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
2181
2186
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
2182
2187
|
children: e.label
|
|
2183
2188
|
}), /* @__PURE__ */ _("input", {
|
|
@@ -2245,7 +2250,7 @@ var Mt = () => {
|
|
|
2245
2250
|
value: G.priceType,
|
|
2246
2251
|
onChange: (e) => K({ priceType: e.target.value }),
|
|
2247
2252
|
className: A,
|
|
2248
|
-
children:
|
|
2253
|
+
children: St.map((e) => /* @__PURE__ */ _("option", {
|
|
2249
2254
|
value: e.value,
|
|
2250
2255
|
children: e.label
|
|
2251
2256
|
}, e.value))
|
|
@@ -2257,7 +2262,7 @@ var Mt = () => {
|
|
|
2257
2262
|
value: G.pricePeriod,
|
|
2258
2263
|
onChange: (e) => K({ pricePeriod: e.target.value }),
|
|
2259
2264
|
className: A,
|
|
2260
|
-
children:
|
|
2265
|
+
children: Ct.map((e) => /* @__PURE__ */ _("option", {
|
|
2261
2266
|
value: e.value,
|
|
2262
2267
|
children: e.label
|
|
2263
2268
|
}, e.value))
|
|
@@ -2334,21 +2339,21 @@ var Mt = () => {
|
|
|
2334
2339
|
})
|
|
2335
2340
|
}),
|
|
2336
2341
|
/* @__PURE__ */ _(b, {
|
|
2337
|
-
open:
|
|
2338
|
-
onOpenChange:
|
|
2342
|
+
open: an,
|
|
2343
|
+
onOpenChange: on,
|
|
2339
2344
|
children: /* @__PURE__ */ v(x, {
|
|
2340
2345
|
className: "sm:max-w-md",
|
|
2341
2346
|
children: [/* @__PURE__ */ v(w, { children: [/* @__PURE__ */ _(T, { children: "Delete this property?" }), /* @__PURE__ */ v(S, { children: [g.title, " will be permanently removed. This cannot be undone."] })] }), /* @__PURE__ */ v(C, { children: [/* @__PURE__ */ _(y, {
|
|
2342
2347
|
type: "button",
|
|
2343
2348
|
variant: "outline",
|
|
2344
|
-
onClick: () =>
|
|
2349
|
+
onClick: () => on(!1),
|
|
2345
2350
|
children: "Cancel"
|
|
2346
2351
|
}), /* @__PURE__ */ _(y, {
|
|
2347
2352
|
type: "button",
|
|
2348
2353
|
variant: "destructive",
|
|
2349
|
-
onClick:
|
|
2350
|
-
disabled:
|
|
2351
|
-
children:
|
|
2354
|
+
onClick: fr,
|
|
2355
|
+
disabled: Ut,
|
|
2356
|
+
children: Ut ? "Deleting…" : "Delete property"
|
|
2352
2357
|
})] })]
|
|
2353
2358
|
})
|
|
2354
2359
|
})
|
|
@@ -2356,6 +2361,6 @@ var Mt = () => {
|
|
|
2356
2361
|
});
|
|
2357
2362
|
};
|
|
2358
2363
|
//#endregion
|
|
2359
|
-
export {
|
|
2364
|
+
export { Pt as PropertyDetailPage };
|
|
2360
2365
|
|
|
2361
2366
|
//# sourceMappingURL=PropertyDetailPage.js.map
|