@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.
@@ -1,21 +1,22 @@
1
- import { formatCurrency as e, formatDate as t } from "../../utils/helpers.js";
2
- import { PageLayout as n } from "../../components/PageLayout.js";
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 ee } from "../../components/DataTable.js";
5
- import { StatusBadge as i } from "../../components/StatusBadge.js";
6
- import { EmptyState as a } from "../../components/EmptyState.js";
7
- import { FilterBar as o } from "../../components/FilterBar.js";
8
- import { useTrackPageView as te } from "../../hooks/useHousingVistaAnalytics.js";
9
- import { useCreateTransaction as ne, useProperties as re, useTransactions as ie } from "../../hooks/index.js";
10
- import { notify as s } from "../../lib/toast.js";
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 ae } from "../../hooks/useServerPagination.js";
13
- import { MilestoneStepper as c, ProgressBar as l, milestoneProgress as u, parseEscrow as d, parseMilestones as f } from "./milestones.js";
14
- import { useEffect as p, useMemo as oe, useState as m } from "react";
15
- import { ArrowRight as se, Building as ce, CheckCircle as le, DollarSign as ue, Eye as de, FileText as h, Plus as g, Shield as fe, TrendingUp as pe, Upload as me, Users as he } from "lucide-react";
16
- import { useNavigate as ge } from "react-router";
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
- te("housingvista.transaction.viewed");
43
- let E = ge(), { t: D } = _e(), O = ae(10), [k, Te] = m(""), [Ee, De] = m(""), [A, Oe] = m("all");
44
- p(() => {
45
- let e = setTimeout(() => De(k), 300);
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: j, loading: ke } = ie({
49
+ let { data: M, loading: Oe } = c({
49
50
  filter: {
50
- search: Ee.trim() || void 0,
51
- status: A === "all" ? void 0 : A
51
+ search: Te.trim() || void 0,
52
+ status: j === "all" ? void 0 : j
52
53
  },
53
54
  pagination: O.pagination
54
- }), { createTransaction: Ae, loading: M } = ne(), { data: N } = re({ pagination: {
55
+ }), { createTransaction: ke, loading: N } = o(), { data: P } = s({ pagination: {
55
56
  limit: 50,
56
57
  offset: 0
57
- } }), [P, F] = m(null);
58
- p(() => {
59
- if (j.length === 0) {
60
- P !== null && F(null);
58
+ } }), [F, I] = p(null);
59
+ f(() => {
60
+ if (M.length === 0) {
61
+ F !== null && I(null);
61
62
  return;
62
63
  }
63
- (!P || !j.some((e) => e.id === P)) && F(j[0].id);
64
- }, [j, P]);
65
- let I = j.find((e) => e.id === P) ?? null, je = (e) => {
66
- Te(e), O.setPage(1);
67
- }, L = (e) => {
68
- Oe(e), O.setPage(1);
69
- }, R = (e, t) => {
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
- }, Ne = (e) => {
72
+ }, Me = (e) => {
75
73
  V(e);
76
- let t = N.find((t) => t.id === e);
74
+ let t = P.find((t) => t.id === e);
77
75
  t?.price?.currency && Z(t.price.currency);
78
- }, Pe = async (e) => {
76
+ }, Ne = async (e) => {
79
77
  if (e.preventDefault(), !B) {
80
- s.warning("Select a property", "Choose the property this transaction is for.");
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
- s.warning("Add a title", "Give this transaction a short, recognizable name.");
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
- s.warning("Enter a valid amount", "The transaction amount must be greater than zero.");
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 Ae({
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
- }), s.success("Transaction created", `${H.trim()} was added to your transactions.`), z(!1);
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
- s.error("Could not create transaction", e.message);
100
+ l.error(D("housingvista.transactions.create.errorTitle", "Could not create transaction"), e.message);
103
101
  }
104
- }, Fe = [
102
+ }, Pe = [
105
103
  {
106
104
  value: "all",
107
- label: R("housingvista.transactions.statusTabs.all", "All")
105
+ label: D("housingvista.transactions.statusTabs.all", "All")
108
106
  },
109
107
  {
110
108
  value: "in_progress",
111
- label: R("housingvista.transactions.statusTabs.inProgress", "In Progress")
109
+ label: D("housingvista.transactions.statusTabs.inProgress", "In Progress")
112
110
  },
113
111
  {
114
112
  value: "completed",
115
- label: R("housingvista.transactions.statusTabs.completed", "Completed")
113
+ label: D("housingvista.transactions.statusTabs.completed", "Completed")
116
114
  },
117
115
  {
118
116
  value: "cancelled",
119
- label: R("housingvista.transactions.statusTabs.cancelled", "Cancelled")
117
+ label: D("housingvista.transactions.statusTabs.cancelled", "Cancelled")
120
118
  },
121
119
  {
122
120
  value: "negotiation",
123
- label: R("housingvista.transactions.statusTabs.negotiation", "Negotiation")
121
+ label: D("housingvista.transactions.statusTabs.negotiation", "Negotiation")
124
122
  },
125
123
  {
126
124
  value: "pending_approval",
127
- label: R("housingvista.transactions.statusTabs.pending", "Pending")
125
+ label: D("housingvista.transactions.statusTabs.pending", "Pending")
128
126
  }
129
- ], $ = oe(() => ({
130
- total: j.length,
131
- totalValue: j.reduce((e, t) => e + t.amount, 0),
132
- active: j.filter((e) => e.status === "in_progress" || e.status === "negotiation" || e.status === "pending_approval").length,
133
- completed: j.filter((e) => e.status === "completed").length
134
- }), [j]), Ie = [
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: R("housingvista.transactions.table.id", "ID"),
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: R("housingvista.transactions.table.property", "Property"),
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: R("housingvista.transactions.table.type", "Type"),
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: R("housingvista.transactions.table.status", "Status"),
172
- render: (e) => /* @__PURE__ */ _(i, {
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: R("housingvista.transactions.table.amount", "Amount"),
178
+ header: D("housingvista.transactions.table.amount", "Amount"),
181
179
  sortable: !0,
182
- render: (t) => /* @__PURE__ */ _("span", {
180
+ render: (e) => /* @__PURE__ */ _("span", {
183
181
  className: "font-semibold text-text-primary",
184
- children: e(t.amount, t.currency)
182
+ children: t(e.amount, e.currency)
185
183
  })
186
184
  },
187
185
  {
188
186
  key: "progress",
189
- header: R("housingvista.transactions.table.progress", "Progress"),
187
+ header: D("housingvista.transactions.table.progress", "Progress"),
190
188
  sortable: !1,
191
189
  render: (e) => {
192
- let t = u(f(e.milestones));
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__ */ _(l, {
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: R("housingvista.transactions.table.date", "Date"),
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: t(String(e.createdAt))
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__ */ _(de, { className: "h-3.5 w-3.5" }), R("housingvista.transactions.table.view", "View")]
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(n, {
228
- title: R("housingvista.transactions.title", "Transactions"),
229
- description: R("housingvista.transactions.description", "Manage your property transactions, escrow, and deals"),
230
- purpose: R("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."),
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__ */ _(g, { className: "h-4 w-4" }), R("housingvista.transactions.actions.newTransaction", "New Transaction")]
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: R("housingvista.transactions.stats.totalTransactions", "Total Transactions"),
242
+ label: D("housingvista.transactions.stats.totalTransactions", "Total Transactions"),
245
243
  value: $.total,
246
- icon: /* @__PURE__ */ _(h, { className: "h-5 w-5" })
244
+ icon: /* @__PURE__ */ _(m, { className: "h-5 w-5" })
247
245
  }),
248
246
  /* @__PURE__ */ _(r, {
249
- label: R("housingvista.transactions.stats.totalValue", "Total Value"),
247
+ label: D("housingvista.transactions.stats.totalValue", "Total Value"),
250
248
  value: $.totalValue,
251
249
  prefix: "$",
252
- icon: /* @__PURE__ */ _(ue, { className: "h-5 w-5" })
250
+ icon: /* @__PURE__ */ _(fe, { className: "h-5 w-5" })
253
251
  }),
254
252
  /* @__PURE__ */ _(r, {
255
- label: R("housingvista.transactions.stats.active", "Active"),
253
+ label: D("housingvista.transactions.stats.active", "Active"),
256
254
  value: $.active,
257
- icon: /* @__PURE__ */ _(pe, { className: "h-5 w-5" })
255
+ icon: /* @__PURE__ */ _(me, { className: "h-5 w-5" })
258
256
  }),
259
257
  /* @__PURE__ */ _(r, {
260
- label: R("housingvista.transactions.stats.completed", "Completed"),
258
+ label: D("housingvista.transactions.stats.completed", "Completed"),
261
259
  value: $.completed,
262
- icon: /* @__PURE__ */ _(le, { className: "h-5 w-5" })
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: R("housingvista.transactions.nextSteps.active", "See deals that need attention"),
273
- description: R("housingvista.transactions.nextSteps.activeDesc", "Filter to in-progress deals where money is moving."),
274
- onClick: () => L("in_progress")
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: R("housingvista.transactions.nextSteps.open", "Open a transaction"),
279
- description: R("housingvista.transactions.nextSteps.openDesc", "Drill into escrow, approvals, and the full timeline."),
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 = j[0];
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: R("housingvista.transactions.nextSteps.browse", "Start a new deal from a listing"),
288
- description: R("housingvista.transactions.nextSteps.browseDesc", "Find a property to make an offer on."),
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__ */ _(o, {
291
+ /* @__PURE__ */ _(ne, {
294
292
  searchValue: k,
295
- onSearchChange: je,
296
- searchPlaceholder: R("housingvista.transactions.search.placeholder", "Search by property or transaction ID...")
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: Fe.map((e) => /* @__PURE__ */ _("button", {
301
- onClick: () => L(e.value),
302
- className: `rounded-md px-3 py-1.5 text-sm font-medium transition-colors ${A === e.value ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"}`,
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
- R("housingvista.transactions.results.showing", "Showing"),
307
+ D("housingvista.transactions.results.showing", "Showing"),
310
308
  " ",
311
- j.length,
309
+ M.length,
312
310
  " ",
313
- R("housingvista.transactions.results.transactions", "transactions"),
314
- I ? " — select a row to preview its deal timeline" : ""
311
+ D("housingvista.transactions.results.transactions", "transactions"),
312
+ L ? " — select a row to preview its deal timeline" : ""
315
313
  ]
316
314
  }),
317
- j.length > 0 ? /* @__PURE__ */ v("div", {
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__ */ _(ee, {
322
- columns: Ie,
323
- data: j,
319
+ children: /* @__PURE__ */ _(i, {
320
+ columns: Fe,
321
+ data: M,
324
322
  keyField: "id",
325
- onRowClick: (e) => F(e.id),
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: j.length >= O.pageSize,
331
- loading: ke,
328
+ hasNextPage: M.length >= O.pageSize,
329
+ loading: Oe,
332
330
  onPageChange: O.setPage,
333
331
  onPageSizeChange: O.setPageSize
334
332
  }
335
333
  })
336
- }), I && /* @__PURE__ */ v(ye, {
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: ["#", I.id.split("-")[1] ?? I.id]
347
+ children: ["#", L.id.split("-")[1] ?? L.id]
350
348
  })]
351
- }), /* @__PURE__ */ _(i, {
352
- label: I.status.replace(/_/g, " "),
353
- variant: T[I.status] ?? "default",
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__ */ _(ce, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ _("span", {
357
+ children: [/* @__PURE__ */ _(ue, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ _("span", {
360
358
  className: "truncate",
361
- children: I.property?.title ?? "Property"
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__ */ _(fe, { className: "h-3.5 w-3.5" }), "Deal stages"]
369
- }), /* @__PURE__ */ _(c, { milestones: f(I.milestones) })]
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 t = d(I.escrow), n = t?.amount != null;
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: e(n ? t?.amount ?? 0 : I.amount, I.currency)
380
+ children: t(n ? e?.amount ?? 0 : L.amount, L.currency)
383
381
  }),
384
- t?.status && /* @__PURE__ */ _(i, {
385
- label: `Escrow ${t.status}`,
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(`${I.id}#transaction-parties`),
398
- children: [/* @__PURE__ */ _(he, { className: "h-4 w-4" }), /* @__PURE__ */ _("span", {
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(`${I.id}#transaction-documents`),
407
- children: [/* @__PURE__ */ _(me, { className: "h-4 w-4" }), /* @__PURE__ */ _("span", {
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(I.id),
419
- children: ["Open full deal", /* @__PURE__ */ _(se, { className: "ml-1 h-4 w-4" })]
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__ */ _(a, {
421
+ }) : /* @__PURE__ */ _(te, {
424
422
  illustration: "empty-search",
425
- icon: /* @__PURE__ */ _(h, { className: "h-12 w-12" }),
426
- title: R("housingvista.transactions.empty.title", "No transactions found"),
427
- description: R("housingvista.transactions.empty.description", "Try adjusting your search criteria or create a new transaction."),
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__ */ _(g, { className: "h-4 w-4" }), R("housingvista.transactions.empty.createNewTransaction", "Create New Transaction")]
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: Me,
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: Pe,
439
+ onSubmit: Ne,
442
440
  children: [
443
- /* @__PURE__ */ v(b, { children: [/* @__PURE__ */ _(x, { children: R("housingvista.transactions.create.title", "New transaction") }), /* @__PURE__ */ _(Ce, { children: R("housingvista.transactions.create.description", "Start a deal against a property. You can add documents, milestones, and escrow later.") })] }),
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: [R("housingvista.transactions.create.property", "Property"), " *"]
447
+ children: [D("housingvista.transactions.create.property", "Property"), " *"]
450
448
  }), /* @__PURE__ */ v("select", {
451
449
  required: !0,
452
450
  value: B,
453
- onChange: (e) => Ne(e.target.value),
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: N.length > 0 ? R("housingvista.transactions.create.selectProperty", "Select a property…") : R("housingvista.transactions.create.noProperties", "No properties available")
459
- }), N.map((e) => /* @__PURE__ */ _("option", {
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: [R("housingvista.transactions.create.titleField", "Title"), " *"]
464
+ children: [D("housingvista.transactions.create.titleField", "Title"), " *"]
467
465
  }), /* @__PURE__ */ _("input", {
468
466
  type: "text",
469
467
  required: !0,
470
- placeholder: R("housingvista.transactions.create.titlePlaceholder", "e.g. Maple Court purchase"),
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: R("housingvista.transactions.create.type", "Type")
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: R("housingvista.transactions.create.status", "Status")
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: [R("housingvista.transactions.create.amount", "Amount"), " *"]
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: R("housingvista.transactions.create.currency", "Currency")
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: R("housingvista.transactions.create.cancel", "Cancel")
532
+ children: D("housingvista.transactions.create.cancel", "Cancel")
535
533
  }), /* @__PURE__ */ _(y, {
536
534
  type: "submit",
537
- disabled: M,
538
- children: M ? R("housingvista.transactions.create.creating", "Creating…") : R("housingvista.transactions.create.submit", "Create transaction")
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
  })