@burdenoff/microfe-housingvista 2026.827.1 → 2026.830.2
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/pages/HomePage.js +140 -142
- package/dist/housingvista/pages/HomePage.js.map +1 -1
- package/dist/housingvista/pages/properties/PropertiesPage.d.ts.map +1 -1
- package/dist/housingvista/pages/properties/PropertiesPage.js +325 -327
- package/dist/housingvista/pages/properties/PropertiesPage.js.map +1 -1
- package/dist/housingvista/pages/transactions/TransactionsPage.d.ts.map +1 -1
- package/dist/housingvista/pages/transactions/TransactionsPage.js +153 -155
- package/dist/housingvista/pages/transactions/TransactionsPage.js.map +1 -1
- package/dist/shared/hooks/index.d.ts +2 -0
- package/dist/shared/hooks/index.d.ts.map +1 -0
- package/dist/shared/hooks/index.js +1 -0
- package/dist/shared/hooks/useTr.d.ts +17 -0
- package/dist/shared/hooks/useTr.d.ts.map +1 -0
- package/dist/shared/hooks/useTr.js +14 -0
- package/dist/shared/hooks/useTr.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { useTr as e } from "../../../shared/hooks/useTr.js";
|
|
2
|
+
import "../../../shared/hooks/index.js";
|
|
3
|
+
import { formatCurrency as t, formatDate as n } from "../../utils/helpers.js";
|
|
4
|
+
import { PageLayout as ee } from "../../components/PageLayout.js";
|
|
3
5
|
import { StatCard as r } from "../../components/StatCard.js";
|
|
4
|
-
import { DataTable as
|
|
5
|
-
import { StatusBadge as
|
|
6
|
-
import { EmptyState as
|
|
7
|
-
import { FilterBar as
|
|
8
|
-
import { useTrackPageView as
|
|
9
|
-
import { useCreateTransaction as
|
|
10
|
-
import { notify as
|
|
6
|
+
import { DataTable as i } from "../../components/DataTable.js";
|
|
7
|
+
import { StatusBadge as a } from "../../components/StatusBadge.js";
|
|
8
|
+
import { EmptyState as te } from "../../components/EmptyState.js";
|
|
9
|
+
import { FilterBar as ne } from "../../components/FilterBar.js";
|
|
10
|
+
import { useTrackPageView as re } from "../../hooks/useHousingVistaAnalytics.js";
|
|
11
|
+
import { useCreateTransaction as o, useProperties as s, useTransactions as c } from "../../hooks/index.js";
|
|
12
|
+
import { notify as l } from "../../lib/toast.js";
|
|
11
13
|
import "../../components/index.js";
|
|
12
|
-
import { useServerPagination as
|
|
13
|
-
import { MilestoneStepper as
|
|
14
|
-
import { useEffect as
|
|
15
|
-
import { ArrowRight as
|
|
16
|
-
import { useNavigate as
|
|
14
|
+
import { useServerPagination as u } from "../../hooks/useServerPagination.js";
|
|
15
|
+
import { MilestoneStepper as ie, ProgressBar as ae, milestoneProgress as oe, parseEscrow as se, parseMilestones as d } from "./milestones.js";
|
|
16
|
+
import { useEffect as f, useMemo as ce, useState as p } from "react";
|
|
17
|
+
import { ArrowRight as le, Building as ue, CheckCircle as de, DollarSign as fe, Eye as pe, FileText as m, Plus as h, Shield as g, TrendingUp as me, Upload as he, Users as ge } from "lucide-react";
|
|
18
|
+
import { useNavigate as _e } from "react-router";
|
|
17
19
|
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
18
|
-
import { useI18n as _e } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
19
20
|
import { Button as y, EmphasisPanel as ve, GlassCard as ye, NextSteps as be, ResponsiveDialog as xe, ResponsiveDialogContent as Se, ResponsiveDialogDescription as Ce, ResponsiveDialogFooter as we, ResponsiveDialogHeader as b, ResponsiveDialogTitle as x } from "@burdenoff/fe-libs/ui";
|
|
20
21
|
//#region src/housingvista/pages/transactions/TransactionsPage.tsx
|
|
21
22
|
var S = "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)]", C = [
|
|
@@ -39,102 +40,99 @@ var S = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
|
|
|
39
40
|
cancelled: "error",
|
|
40
41
|
disputed: "error"
|
|
41
42
|
}, E = () => {
|
|
42
|
-
|
|
43
|
-
let E =
|
|
44
|
-
|
|
45
|
-
let e = setTimeout(() =>
|
|
43
|
+
re("housingvista.transaction.viewed");
|
|
44
|
+
let E = _e(), D = e(), O = u(10), [k, A] = p(""), [Te, Ee] = p(""), [j, De] = p("all");
|
|
45
|
+
f(() => {
|
|
46
|
+
let e = setTimeout(() => Ee(k), 300);
|
|
46
47
|
return () => clearTimeout(e);
|
|
47
48
|
}, [k]);
|
|
48
|
-
let { data:
|
|
49
|
+
let { data: M, loading: Oe } = c({
|
|
49
50
|
filter: {
|
|
50
|
-
search:
|
|
51
|
-
status:
|
|
51
|
+
search: Te.trim() || void 0,
|
|
52
|
+
status: j === "all" ? void 0 : j
|
|
52
53
|
},
|
|
53
54
|
pagination: O.pagination
|
|
54
|
-
}), { createTransaction:
|
|
55
|
+
}), { createTransaction: ke, loading: N } = o(), { data: P } = s({ pagination: {
|
|
55
56
|
limit: 50,
|
|
56
57
|
offset: 0
|
|
57
|
-
} }), [
|
|
58
|
-
|
|
59
|
-
if (
|
|
60
|
-
|
|
58
|
+
} }), [F, I] = p(null);
|
|
59
|
+
f(() => {
|
|
60
|
+
if (M.length === 0) {
|
|
61
|
+
F !== null && I(null);
|
|
61
62
|
return;
|
|
62
63
|
}
|
|
63
|
-
(!
|
|
64
|
-
}, [
|
|
65
|
-
let
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
let n = D(e);
|
|
71
|
-
return n === e ? t : n;
|
|
72
|
-
}, [Me, z] = m(!1), [B, V] = m(""), [H, U] = m(""), [W, G] = m("sale"), [K, q] = m("draft"), [J, Y] = m(""), [X, Z] = m("USD"), Q = () => {
|
|
64
|
+
(!F || !M.some((e) => e.id === F)) && I(M[0].id);
|
|
65
|
+
}, [M, F]);
|
|
66
|
+
let L = M.find((e) => e.id === F) ?? null, Ae = (e) => {
|
|
67
|
+
A(e), O.setPage(1);
|
|
68
|
+
}, R = (e) => {
|
|
69
|
+
De(e), O.setPage(1);
|
|
70
|
+
}, [je, z] = p(!1), [B, V] = p(""), [H, U] = p(""), [W, G] = p("sale"), [K, q] = p("draft"), [J, Y] = p(""), [X, Z] = p("USD"), Q = () => {
|
|
73
71
|
V(""), U(""), G("sale"), q("draft"), Y(""), Z("USD"), z(!0);
|
|
74
|
-
},
|
|
72
|
+
}, Me = (e) => {
|
|
75
73
|
V(e);
|
|
76
|
-
let t =
|
|
74
|
+
let t = P.find((t) => t.id === e);
|
|
77
75
|
t?.price?.currency && Z(t.price.currency);
|
|
78
|
-
},
|
|
76
|
+
}, Ne = async (e) => {
|
|
79
77
|
if (e.preventDefault(), !B) {
|
|
80
|
-
|
|
78
|
+
l.warning(D("housingvista.transactions.create.validation.selectPropertyTitle", "Select a property"), D("housingvista.transactions.create.validation.selectPropertyDesc", "Choose the property this transaction is for."));
|
|
81
79
|
return;
|
|
82
80
|
}
|
|
83
81
|
if (!H.trim()) {
|
|
84
|
-
|
|
82
|
+
l.warning(D("housingvista.transactions.create.validation.addTitle", "Add a title"), D("housingvista.transactions.create.validation.addTitleDesc", "Give this transaction a short, recognizable name."));
|
|
85
83
|
return;
|
|
86
84
|
}
|
|
87
85
|
let t = Number(J);
|
|
88
86
|
if (!Number.isFinite(t) || t <= 0) {
|
|
89
|
-
|
|
87
|
+
l.warning(D("housingvista.transactions.create.validation.validAmount", "Enter a valid amount"), D("housingvista.transactions.create.validation.validAmountDesc", "The transaction amount must be greater than zero."));
|
|
90
88
|
return;
|
|
91
89
|
}
|
|
92
90
|
try {
|
|
93
|
-
await
|
|
91
|
+
await ke({
|
|
94
92
|
propertyId: B,
|
|
95
93
|
title: H.trim(),
|
|
96
94
|
type: W,
|
|
97
95
|
status: K,
|
|
98
96
|
amount: t,
|
|
99
97
|
currency: X.trim() || "USD"
|
|
100
|
-
}),
|
|
98
|
+
}), l.success(D("housingvista.transactions.create.successTitle", "Transaction created"), D("housingvista.transactions.create.successDesc", "{{title}} was added to your transactions.", { title: H.trim() })), z(!1);
|
|
101
99
|
} catch (e) {
|
|
102
|
-
|
|
100
|
+
l.error(D("housingvista.transactions.create.errorTitle", "Could not create transaction"), e.message);
|
|
103
101
|
}
|
|
104
|
-
},
|
|
102
|
+
}, Pe = [
|
|
105
103
|
{
|
|
106
104
|
value: "all",
|
|
107
|
-
label:
|
|
105
|
+
label: D("housingvista.transactions.statusTabs.all", "All")
|
|
108
106
|
},
|
|
109
107
|
{
|
|
110
108
|
value: "in_progress",
|
|
111
|
-
label:
|
|
109
|
+
label: D("housingvista.transactions.statusTabs.inProgress", "In Progress")
|
|
112
110
|
},
|
|
113
111
|
{
|
|
114
112
|
value: "completed",
|
|
115
|
-
label:
|
|
113
|
+
label: D("housingvista.transactions.statusTabs.completed", "Completed")
|
|
116
114
|
},
|
|
117
115
|
{
|
|
118
116
|
value: "cancelled",
|
|
119
|
-
label:
|
|
117
|
+
label: D("housingvista.transactions.statusTabs.cancelled", "Cancelled")
|
|
120
118
|
},
|
|
121
119
|
{
|
|
122
120
|
value: "negotiation",
|
|
123
|
-
label:
|
|
121
|
+
label: D("housingvista.transactions.statusTabs.negotiation", "Negotiation")
|
|
124
122
|
},
|
|
125
123
|
{
|
|
126
124
|
value: "pending_approval",
|
|
127
|
-
label:
|
|
125
|
+
label: D("housingvista.transactions.statusTabs.pending", "Pending")
|
|
128
126
|
}
|
|
129
|
-
], $ =
|
|
130
|
-
total:
|
|
131
|
-
totalValue:
|
|
132
|
-
active:
|
|
133
|
-
completed:
|
|
134
|
-
}), [
|
|
127
|
+
], $ = ce(() => ({
|
|
128
|
+
total: M.length,
|
|
129
|
+
totalValue: M.reduce((e, t) => e + t.amount, 0),
|
|
130
|
+
active: M.filter((e) => e.status === "in_progress" || e.status === "negotiation" || e.status === "pending_approval").length,
|
|
131
|
+
completed: M.filter((e) => e.status === "completed").length
|
|
132
|
+
}), [M]), Fe = [
|
|
135
133
|
{
|
|
136
134
|
key: "id",
|
|
137
|
-
header:
|
|
135
|
+
header: D("housingvista.transactions.table.id", "ID"),
|
|
138
136
|
render: (e) => /* @__PURE__ */ v("span", {
|
|
139
137
|
className: "font-medium text-text-primary",
|
|
140
138
|
children: ["#", e.id.split("-")[1]]
|
|
@@ -142,7 +140,7 @@ var S = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
|
|
|
142
140
|
},
|
|
143
141
|
{
|
|
144
142
|
key: "property",
|
|
145
|
-
header:
|
|
143
|
+
header: D("housingvista.transactions.table.property", "Property"),
|
|
146
144
|
render: (e) => /* @__PURE__ */ v("div", {
|
|
147
145
|
className: "max-w-[200px]",
|
|
148
146
|
children: [/* @__PURE__ */ _("div", {
|
|
@@ -160,7 +158,7 @@ var S = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
|
|
|
160
158
|
},
|
|
161
159
|
{
|
|
162
160
|
key: "type",
|
|
163
|
-
header:
|
|
161
|
+
header: D("housingvista.transactions.table.type", "Type"),
|
|
164
162
|
render: (e) => /* @__PURE__ */ _("span", {
|
|
165
163
|
className: "capitalize text-sm text-text-primary",
|
|
166
164
|
children: e.type
|
|
@@ -168,8 +166,8 @@ var S = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
|
|
|
168
166
|
},
|
|
169
167
|
{
|
|
170
168
|
key: "status",
|
|
171
|
-
header:
|
|
172
|
-
render: (e) => /* @__PURE__ */ _(
|
|
169
|
+
header: D("housingvista.transactions.table.status", "Status"),
|
|
170
|
+
render: (e) => /* @__PURE__ */ _(a, {
|
|
173
171
|
label: e.status.replace(/_/g, " "),
|
|
174
172
|
variant: T[e.status] ?? "default",
|
|
175
173
|
dot: !0
|
|
@@ -177,22 +175,22 @@ var S = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
|
|
|
177
175
|
},
|
|
178
176
|
{
|
|
179
177
|
key: "amount",
|
|
180
|
-
header:
|
|
178
|
+
header: D("housingvista.transactions.table.amount", "Amount"),
|
|
181
179
|
sortable: !0,
|
|
182
|
-
render: (
|
|
180
|
+
render: (e) => /* @__PURE__ */ _("span", {
|
|
183
181
|
className: "font-semibold text-text-primary",
|
|
184
|
-
children: e
|
|
182
|
+
children: t(e.amount, e.currency)
|
|
185
183
|
})
|
|
186
184
|
},
|
|
187
185
|
{
|
|
188
186
|
key: "progress",
|
|
189
|
-
header:
|
|
187
|
+
header: D("housingvista.transactions.table.progress", "Progress"),
|
|
190
188
|
sortable: !1,
|
|
191
189
|
render: (e) => {
|
|
192
|
-
let t =
|
|
190
|
+
let t = oe(d(e.milestones));
|
|
193
191
|
return /* @__PURE__ */ v("div", {
|
|
194
192
|
className: "flex min-w-28 items-center gap-2",
|
|
195
|
-
children: [/* @__PURE__ */ _(
|
|
193
|
+
children: [/* @__PURE__ */ _(ae, {
|
|
196
194
|
percent: t,
|
|
197
195
|
className: "w-20"
|
|
198
196
|
}), /* @__PURE__ */ v("span", {
|
|
@@ -204,11 +202,11 @@ var S = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
|
|
|
204
202
|
},
|
|
205
203
|
{
|
|
206
204
|
key: "createdAt",
|
|
207
|
-
header:
|
|
205
|
+
header: D("housingvista.transactions.table.date", "Date"),
|
|
208
206
|
sortable: !0,
|
|
209
207
|
render: (e) => /* @__PURE__ */ _("span", {
|
|
210
208
|
className: "text-sm text-text-secondary",
|
|
211
|
-
children:
|
|
209
|
+
children: n(String(e.createdAt))
|
|
212
210
|
})
|
|
213
211
|
},
|
|
214
212
|
{
|
|
@@ -220,19 +218,19 @@ var S = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
|
|
|
220
218
|
t.stopPropagation(), E(e.id);
|
|
221
219
|
},
|
|
222
220
|
className: "inline-flex items-center gap-1 text-xs font-medium text-text-secondary transition-colors hover:text-text-primary",
|
|
223
|
-
children: [/* @__PURE__ */ _(
|
|
221
|
+
children: [/* @__PURE__ */ _(pe, { className: "h-3.5 w-3.5" }), D("housingvista.transactions.table.view", "View")]
|
|
224
222
|
})
|
|
225
223
|
}
|
|
226
224
|
];
|
|
227
|
-
return /* @__PURE__ */ v(
|
|
228
|
-
title:
|
|
229
|
-
description:
|
|
230
|
-
purpose:
|
|
225
|
+
return /* @__PURE__ */ v(ee, {
|
|
226
|
+
title: D("housingvista.transactions.title", "Transactions"),
|
|
227
|
+
description: D("housingvista.transactions.description", "Manage your property transactions, escrow, and deals"),
|
|
228
|
+
purpose: D("housingvista.transactions.purpose", "Track every buy, sell, and lease deal end to end — from offer and negotiation through escrow, approvals, and closing. Use this page to see what money is in motion, which deals need action, and the full history of each transaction."),
|
|
231
229
|
actions: /* @__PURE__ */ v(y, {
|
|
232
230
|
type: "button",
|
|
233
231
|
onClick: Q,
|
|
234
232
|
className: "gap-2",
|
|
235
|
-
children: [/* @__PURE__ */ _(
|
|
233
|
+
children: [/* @__PURE__ */ _(h, { className: "h-4 w-4" }), D("housingvista.transactions.actions.newTransaction", "New Transaction")]
|
|
236
234
|
}),
|
|
237
235
|
children: [
|
|
238
236
|
/* @__PURE__ */ _(ve, {
|
|
@@ -241,25 +239,25 @@ var S = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
|
|
|
241
239
|
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
242
240
|
children: [
|
|
243
241
|
/* @__PURE__ */ _(r, {
|
|
244
|
-
label:
|
|
242
|
+
label: D("housingvista.transactions.stats.totalTransactions", "Total Transactions"),
|
|
245
243
|
value: $.total,
|
|
246
|
-
icon: /* @__PURE__ */ _(
|
|
244
|
+
icon: /* @__PURE__ */ _(m, { className: "h-5 w-5" })
|
|
247
245
|
}),
|
|
248
246
|
/* @__PURE__ */ _(r, {
|
|
249
|
-
label:
|
|
247
|
+
label: D("housingvista.transactions.stats.totalValue", "Total Value"),
|
|
250
248
|
value: $.totalValue,
|
|
251
249
|
prefix: "$",
|
|
252
|
-
icon: /* @__PURE__ */ _(
|
|
250
|
+
icon: /* @__PURE__ */ _(fe, { className: "h-5 w-5" })
|
|
253
251
|
}),
|
|
254
252
|
/* @__PURE__ */ _(r, {
|
|
255
|
-
label:
|
|
253
|
+
label: D("housingvista.transactions.stats.active", "Active"),
|
|
256
254
|
value: $.active,
|
|
257
|
-
icon: /* @__PURE__ */ _(
|
|
255
|
+
icon: /* @__PURE__ */ _(me, { className: "h-5 w-5" })
|
|
258
256
|
}),
|
|
259
257
|
/* @__PURE__ */ _(r, {
|
|
260
|
-
label:
|
|
258
|
+
label: D("housingvista.transactions.stats.completed", "Completed"),
|
|
261
259
|
value: $.completed,
|
|
262
|
-
icon: /* @__PURE__ */ _(
|
|
260
|
+
icon: /* @__PURE__ */ _(de, { className: "h-5 w-5" })
|
|
263
261
|
})
|
|
264
262
|
]
|
|
265
263
|
})
|
|
@@ -269,71 +267,71 @@ var S = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
|
|
|
269
267
|
steps: [
|
|
270
268
|
{
|
|
271
269
|
id: "focus-active",
|
|
272
|
-
label:
|
|
273
|
-
description:
|
|
274
|
-
onClick: () =>
|
|
270
|
+
label: D("housingvista.transactions.nextSteps.active", "See deals that need attention"),
|
|
271
|
+
description: D("housingvista.transactions.nextSteps.activeDesc", "Filter to in-progress deals where money is moving."),
|
|
272
|
+
onClick: () => R("in_progress")
|
|
275
273
|
},
|
|
276
274
|
{
|
|
277
275
|
id: "open-detail",
|
|
278
|
-
label:
|
|
279
|
-
description:
|
|
276
|
+
label: D("housingvista.transactions.nextSteps.open", "Open a transaction"),
|
|
277
|
+
description: D("housingvista.transactions.nextSteps.openDesc", "Drill into escrow, approvals, and the full timeline."),
|
|
280
278
|
onClick: () => {
|
|
281
|
-
let e =
|
|
279
|
+
let e = M[0];
|
|
282
280
|
e && E(`../transactions/${e.id}`);
|
|
283
281
|
}
|
|
284
282
|
},
|
|
285
283
|
{
|
|
286
284
|
id: "browse-properties",
|
|
287
|
-
label:
|
|
288
|
-
description:
|
|
285
|
+
label: D("housingvista.transactions.nextSteps.browse", "Start a new deal from a listing"),
|
|
286
|
+
description: D("housingvista.transactions.nextSteps.browseDesc", "Find a property to make an offer on."),
|
|
289
287
|
onClick: () => E("../properties")
|
|
290
288
|
}
|
|
291
289
|
]
|
|
292
290
|
}),
|
|
293
|
-
/* @__PURE__ */ _(
|
|
291
|
+
/* @__PURE__ */ _(ne, {
|
|
294
292
|
searchValue: k,
|
|
295
|
-
onSearchChange:
|
|
296
|
-
searchPlaceholder:
|
|
293
|
+
onSearchChange: Ae,
|
|
294
|
+
searchPlaceholder: D("housingvista.transactions.search.placeholder", "Search by property or transaction ID...")
|
|
297
295
|
}),
|
|
298
296
|
/* @__PURE__ */ _("div", {
|
|
299
297
|
className: "flex flex-wrap items-center gap-2",
|
|
300
|
-
children:
|
|
301
|
-
onClick: () =>
|
|
302
|
-
className: `rounded-md px-3 py-1.5 text-sm font-medium transition-colors ${
|
|
298
|
+
children: Pe.map((e) => /* @__PURE__ */ _("button", {
|
|
299
|
+
onClick: () => R(e.value),
|
|
300
|
+
className: `rounded-md px-3 py-1.5 text-sm font-medium transition-colors ${j === e.value ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"}`,
|
|
303
301
|
children: e.label
|
|
304
302
|
}, e.value))
|
|
305
303
|
}),
|
|
306
304
|
/* @__PURE__ */ v("p", {
|
|
307
305
|
className: "text-sm text-text-secondary",
|
|
308
306
|
children: [
|
|
309
|
-
|
|
307
|
+
D("housingvista.transactions.results.showing", "Showing"),
|
|
310
308
|
" ",
|
|
311
|
-
|
|
309
|
+
M.length,
|
|
312
310
|
" ",
|
|
313
|
-
|
|
314
|
-
|
|
311
|
+
D("housingvista.transactions.results.transactions", "transactions"),
|
|
312
|
+
L ? " — select a row to preview its deal timeline" : ""
|
|
315
313
|
]
|
|
316
314
|
}),
|
|
317
|
-
|
|
315
|
+
M.length > 0 ? /* @__PURE__ */ v("div", {
|
|
318
316
|
className: "grid grid-cols-1 gap-6 xl:grid-cols-[minmax(0,1fr)_22rem]",
|
|
319
317
|
children: [/* @__PURE__ */ _("div", {
|
|
320
318
|
className: "min-w-0",
|
|
321
|
-
children: /* @__PURE__ */ _(
|
|
322
|
-
columns:
|
|
323
|
-
data:
|
|
319
|
+
children: /* @__PURE__ */ _(i, {
|
|
320
|
+
columns: Fe,
|
|
321
|
+
data: M,
|
|
324
322
|
keyField: "id",
|
|
325
|
-
onRowClick: (e) =>
|
|
323
|
+
onRowClick: (e) => I(e.id),
|
|
326
324
|
pageSize: O.pageSize,
|
|
327
325
|
serverPagination: {
|
|
328
326
|
page: O.page,
|
|
329
327
|
pageSize: O.pageSize,
|
|
330
|
-
hasNextPage:
|
|
331
|
-
loading:
|
|
328
|
+
hasNextPage: M.length >= O.pageSize,
|
|
329
|
+
loading: Oe,
|
|
332
330
|
onPageChange: O.setPage,
|
|
333
331
|
onPageSizeChange: O.setPageSize
|
|
334
332
|
}
|
|
335
333
|
})
|
|
336
|
-
}),
|
|
334
|
+
}), L && /* @__PURE__ */ v(ye, {
|
|
337
335
|
treatment: "insight",
|
|
338
336
|
className: "h-fit p-5 xl:sticky xl:top-6",
|
|
339
337
|
children: [
|
|
@@ -343,46 +341,46 @@ var S = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
|
|
|
343
341
|
className: "min-w-0",
|
|
344
342
|
children: [/* @__PURE__ */ _("h3", {
|
|
345
343
|
className: "text-base font-semibold text-text-primary",
|
|
346
|
-
children: "Transaction Details"
|
|
344
|
+
children: D("housingvista.transactions.detail.title", "Transaction Details")
|
|
347
345
|
}), /* @__PURE__ */ v("p", {
|
|
348
346
|
className: "truncate text-xs text-text-secondary",
|
|
349
|
-
children: ["#",
|
|
347
|
+
children: ["#", L.id.split("-")[1] ?? L.id]
|
|
350
348
|
})]
|
|
351
|
-
}), /* @__PURE__ */ _(
|
|
352
|
-
label:
|
|
353
|
-
variant: T[
|
|
349
|
+
}), /* @__PURE__ */ _(a, {
|
|
350
|
+
label: L.status.replace(/_/g, " "),
|
|
351
|
+
variant: T[L.status] ?? "default",
|
|
354
352
|
dot: !0
|
|
355
353
|
})]
|
|
356
354
|
}),
|
|
357
355
|
/* @__PURE__ */ v("div", {
|
|
358
356
|
className: "mb-4 flex items-center gap-2 text-sm text-text-primary",
|
|
359
|
-
children: [/* @__PURE__ */ _(
|
|
357
|
+
children: [/* @__PURE__ */ _(ue, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ _("span", {
|
|
360
358
|
className: "truncate",
|
|
361
|
-
children:
|
|
359
|
+
children: L.property?.title ?? D("housingvista.transactions.detail.propertyFallback", "Property")
|
|
362
360
|
})]
|
|
363
361
|
}),
|
|
364
362
|
/* @__PURE__ */ v("div", {
|
|
365
363
|
className: "mb-4 rounded-lg bg-bg-sunken/50 p-3",
|
|
366
364
|
children: [/* @__PURE__ */ v("div", {
|
|
367
365
|
className: "mb-2 flex items-center gap-1.5 text-xs font-medium text-text-secondary",
|
|
368
|
-
children: [/* @__PURE__ */ _(
|
|
369
|
-
}), /* @__PURE__ */ _(
|
|
366
|
+
children: [/* @__PURE__ */ _(g, { className: "h-3.5 w-3.5" }), D("housingvista.transactions.detail.dealStages", "Deal stages")]
|
|
367
|
+
}), /* @__PURE__ */ _(ie, { milestones: d(L.milestones) })]
|
|
370
368
|
}),
|
|
371
369
|
(() => {
|
|
372
|
-
let
|
|
370
|
+
let e = se(L.escrow), n = e?.amount != null;
|
|
373
371
|
return /* @__PURE__ */ v("div", {
|
|
374
372
|
className: "mb-4",
|
|
375
373
|
children: [
|
|
376
374
|
/* @__PURE__ */ _("p", {
|
|
377
375
|
className: "text-xs font-medium text-text-secondary",
|
|
378
|
-
children: n ? "Escrow amount" : "Deal amount"
|
|
376
|
+
children: n ? D("housingvista.transactions.detail.escrowAmount", "Escrow amount") : D("housingvista.transactions.detail.dealAmount", "Deal amount")
|
|
379
377
|
}),
|
|
380
378
|
/* @__PURE__ */ _("p", {
|
|
381
379
|
className: "text-2xl font-bold tabular-nums text-text-primary",
|
|
382
|
-
children:
|
|
380
|
+
children: t(n ? e?.amount ?? 0 : L.amount, L.currency)
|
|
383
381
|
}),
|
|
384
|
-
|
|
385
|
-
label:
|
|
382
|
+
e?.status && /* @__PURE__ */ _(a, {
|
|
383
|
+
label: D("housingvista.transactions.detail.escrowStatus", "Escrow {{status}}", { status: e.status }),
|
|
386
384
|
variant: "info",
|
|
387
385
|
className: "mt-1"
|
|
388
386
|
})
|
|
@@ -394,19 +392,19 @@ var S = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
|
|
|
394
392
|
children: [/* @__PURE__ */ v(y, {
|
|
395
393
|
type: "button",
|
|
396
394
|
size: "sm",
|
|
397
|
-
onClick: () => E(`${
|
|
398
|
-
children: [/* @__PURE__ */ _(
|
|
395
|
+
onClick: () => E(`${L.id}#transaction-parties`),
|
|
396
|
+
children: [/* @__PURE__ */ _(ge, { className: "h-4 w-4" }), /* @__PURE__ */ _("span", {
|
|
399
397
|
className: "ml-1",
|
|
400
|
-
children: "Parties"
|
|
398
|
+
children: D("housingvista.transactions.detail.parties", "Parties")
|
|
401
399
|
})]
|
|
402
400
|
}), /* @__PURE__ */ v(y, {
|
|
403
401
|
type: "button",
|
|
404
402
|
variant: "outline",
|
|
405
403
|
size: "sm",
|
|
406
|
-
onClick: () => E(`${
|
|
407
|
-
children: [/* @__PURE__ */ _(
|
|
404
|
+
onClick: () => E(`${L.id}#transaction-documents`),
|
|
405
|
+
children: [/* @__PURE__ */ _(he, { className: "h-4 w-4" }), /* @__PURE__ */ _("span", {
|
|
408
406
|
className: "ml-1",
|
|
409
|
-
children: "Documents"
|
|
407
|
+
children: D("housingvista.transactions.detail.documents", "Documents")
|
|
410
408
|
})]
|
|
411
409
|
})]
|
|
412
410
|
}),
|
|
@@ -415,59 +413,59 @@ var S = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
|
|
|
415
413
|
variant: "ghost",
|
|
416
414
|
size: "sm",
|
|
417
415
|
className: "mt-2 w-full",
|
|
418
|
-
onClick: () => E(
|
|
419
|
-
children: ["Open full deal", /* @__PURE__ */ _(
|
|
416
|
+
onClick: () => E(L.id),
|
|
417
|
+
children: [D("housingvista.transactions.detail.openFullDeal", "Open full deal"), /* @__PURE__ */ _(le, { className: "ml-1 h-4 w-4" })]
|
|
420
418
|
})
|
|
421
419
|
]
|
|
422
420
|
})]
|
|
423
|
-
}) : /* @__PURE__ */ _(
|
|
421
|
+
}) : /* @__PURE__ */ _(te, {
|
|
424
422
|
illustration: "empty-search",
|
|
425
|
-
icon: /* @__PURE__ */ _(
|
|
426
|
-
title:
|
|
427
|
-
description:
|
|
423
|
+
icon: /* @__PURE__ */ _(m, { className: "h-12 w-12" }),
|
|
424
|
+
title: D("housingvista.transactions.empty.title", "No transactions found"),
|
|
425
|
+
description: D("housingvista.transactions.empty.description", "Try adjusting your search criteria or create a new transaction."),
|
|
428
426
|
action: /* @__PURE__ */ v(y, {
|
|
429
427
|
type: "button",
|
|
430
428
|
onClick: Q,
|
|
431
429
|
className: "gap-2",
|
|
432
|
-
children: [/* @__PURE__ */ _(
|
|
430
|
+
children: [/* @__PURE__ */ _(h, { className: "h-4 w-4" }), D("housingvista.transactions.empty.createNewTransaction", "Create New Transaction")]
|
|
433
431
|
})
|
|
434
432
|
}),
|
|
435
433
|
/* @__PURE__ */ _(xe, {
|
|
436
|
-
open:
|
|
434
|
+
open: je,
|
|
437
435
|
onOpenChange: z,
|
|
438
436
|
children: /* @__PURE__ */ _(Se, {
|
|
439
437
|
className: "sm:max-w-lg",
|
|
440
438
|
children: /* @__PURE__ */ v("form", {
|
|
441
|
-
onSubmit:
|
|
439
|
+
onSubmit: Ne,
|
|
442
440
|
children: [
|
|
443
|
-
/* @__PURE__ */ v(b, { children: [/* @__PURE__ */ _(x, { children:
|
|
441
|
+
/* @__PURE__ */ v(b, { children: [/* @__PURE__ */ _(x, { children: D("housingvista.transactions.create.title", "New transaction") }), /* @__PURE__ */ _(Ce, { children: D("housingvista.transactions.create.description", "Start a deal against a property. You can add documents, milestones, and escrow later.") })] }),
|
|
444
442
|
/* @__PURE__ */ v("div", {
|
|
445
443
|
className: "space-y-3 py-2",
|
|
446
444
|
children: [
|
|
447
445
|
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
|
|
448
446
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
449
|
-
children: [
|
|
447
|
+
children: [D("housingvista.transactions.create.property", "Property"), " *"]
|
|
450
448
|
}), /* @__PURE__ */ v("select", {
|
|
451
449
|
required: !0,
|
|
452
450
|
value: B,
|
|
453
|
-
onChange: (e) =>
|
|
451
|
+
onChange: (e) => Me(e.target.value),
|
|
454
452
|
className: S,
|
|
455
453
|
children: [/* @__PURE__ */ _("option", {
|
|
456
454
|
value: "",
|
|
457
455
|
disabled: !0,
|
|
458
|
-
children:
|
|
459
|
-
}),
|
|
456
|
+
children: P.length > 0 ? D("housingvista.transactions.create.selectProperty", "Select a property…") : D("housingvista.transactions.create.noProperties", "No properties available")
|
|
457
|
+
}), P.map((e) => /* @__PURE__ */ _("option", {
|
|
460
458
|
value: e.id,
|
|
461
459
|
children: e.title
|
|
462
460
|
}, e.id))]
|
|
463
461
|
})] }),
|
|
464
462
|
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
|
|
465
463
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
466
|
-
children: [
|
|
464
|
+
children: [D("housingvista.transactions.create.titleField", "Title"), " *"]
|
|
467
465
|
}), /* @__PURE__ */ _("input", {
|
|
468
466
|
type: "text",
|
|
469
467
|
required: !0,
|
|
470
|
-
placeholder:
|
|
468
|
+
placeholder: D("housingvista.transactions.create.titlePlaceholder", "e.g. Maple Court purchase"),
|
|
471
469
|
value: H,
|
|
472
470
|
onChange: (e) => U(e.target.value),
|
|
473
471
|
className: S
|
|
@@ -476,7 +474,7 @@ var S = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
|
|
|
476
474
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
477
475
|
children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
478
476
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
479
|
-
children:
|
|
477
|
+
children: D("housingvista.transactions.create.type", "Type")
|
|
480
478
|
}), /* @__PURE__ */ _("select", {
|
|
481
479
|
value: W,
|
|
482
480
|
onChange: (e) => G(e.target.value),
|
|
@@ -488,7 +486,7 @@ var S = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
|
|
|
488
486
|
}, e))
|
|
489
487
|
})] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
490
488
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
491
|
-
children:
|
|
489
|
+
children: D("housingvista.transactions.create.status", "Status")
|
|
492
490
|
}), /* @__PURE__ */ _("select", {
|
|
493
491
|
value: K,
|
|
494
492
|
onChange: (e) => q(e.target.value),
|
|
@@ -503,7 +501,7 @@ var S = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
|
|
|
503
501
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
504
502
|
children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
|
|
505
503
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
506
|
-
children: [
|
|
504
|
+
children: [D("housingvista.transactions.create.amount", "Amount"), " *"]
|
|
507
505
|
}), /* @__PURE__ */ _("input", {
|
|
508
506
|
type: "number",
|
|
509
507
|
required: !0,
|
|
@@ -515,7 +513,7 @@ var S = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
|
|
|
515
513
|
className: S
|
|
516
514
|
})] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
517
515
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
518
|
-
children:
|
|
516
|
+
children: D("housingvista.transactions.create.currency", "Currency")
|
|
519
517
|
}), /* @__PURE__ */ _("input", {
|
|
520
518
|
type: "text",
|
|
521
519
|
placeholder: "USD",
|
|
@@ -531,11 +529,11 @@ var S = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 t
|
|
|
531
529
|
type: "button",
|
|
532
530
|
variant: "outline",
|
|
533
531
|
onClick: () => z(!1),
|
|
534
|
-
children:
|
|
532
|
+
children: D("housingvista.transactions.create.cancel", "Cancel")
|
|
535
533
|
}), /* @__PURE__ */ _(y, {
|
|
536
534
|
type: "submit",
|
|
537
|
-
disabled:
|
|
538
|
-
children:
|
|
535
|
+
disabled: N,
|
|
536
|
+
children: N ? D("housingvista.transactions.create.creating", "Creating…") : D("housingvista.transactions.create.submit", "Create transaction")
|
|
539
537
|
})] })
|
|
540
538
|
]
|
|
541
539
|
})
|