@burdenoff/microfe-assethandler 2026.811.1 → 2026.813.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.
Files changed (78) hide show
  1. package/dist/assethandler/components/charts/BarsChart.js +25 -25
  2. package/dist/assethandler/components/charts/ChartParts.js +27 -27
  3. package/dist/assethandler/components/charts/DonutChart.js +17 -17
  4. package/dist/assethandler/components/charts/ProgressMeter.js +5 -5
  5. package/dist/assethandler/components/charts/RadialGauge.js +13 -13
  6. package/dist/assethandler/components/charts/Sparkline.js +27 -27
  7. package/dist/assethandler/components/charts/TrendChart.js +47 -47
  8. package/dist/assethandler/components/index.js +1 -1
  9. package/dist/assethandler/pages/AiPredictionsPage.js +20 -20
  10. package/dist/assethandler/pages/AnalyticsPage.d.ts.map +1 -1
  11. package/dist/assethandler/pages/AnalyticsPage.js +133 -133
  12. package/dist/assethandler/pages/AnalyticsPage.js.map +1 -1
  13. package/dist/assethandler/pages/AssetsAssetCategoriesPage.d.ts.map +1 -1
  14. package/dist/assethandler/pages/AssetsAssetCategoriesPage.js +55 -55
  15. package/dist/assethandler/pages/AssetsAssetCategoriesPage.js.map +1 -1
  16. package/dist/assethandler/pages/AssetsAssetCreatePage.d.ts.map +1 -1
  17. package/dist/assethandler/pages/AssetsAssetCreatePage.js +172 -163
  18. package/dist/assethandler/pages/AssetsAssetCreatePage.js.map +1 -1
  19. package/dist/assethandler/pages/AssetsAssetDetailPage.d.ts.map +1 -1
  20. package/dist/assethandler/pages/AssetsAssetDetailPage.js +223 -224
  21. package/dist/assethandler/pages/AssetsAssetDetailPage.js.map +1 -1
  22. package/dist/assethandler/pages/AssetsAssetListPage.js +249 -249
  23. package/dist/assethandler/pages/AssetsAssetListPage.js.map +1 -1
  24. package/dist/assethandler/pages/AssetsAssetTrackingPage.js +8 -8
  25. package/dist/assethandler/pages/CmdbBrowserPage.js +34 -34
  26. package/dist/assethandler/pages/DashboardPage.d.ts.map +1 -1
  27. package/dist/assethandler/pages/DashboardPage.js +256 -255
  28. package/dist/assethandler/pages/DashboardPage.js.map +1 -1
  29. package/dist/assethandler/pages/DiscoveryJobsPage.js +27 -27
  30. package/dist/assethandler/pages/EsgDashboardPage.js +53 -53
  31. package/dist/assethandler/pages/FinanceBudgetDetailPage.d.ts.map +1 -1
  32. package/dist/assethandler/pages/FinanceBudgetDetailPage.js +156 -155
  33. package/dist/assethandler/pages/FinanceBudgetDetailPage.js.map +1 -1
  34. package/dist/assethandler/pages/FinanceFinanceHubPage.d.ts.map +1 -1
  35. package/dist/assethandler/pages/FinanceFinanceHubPage.js +475 -475
  36. package/dist/assethandler/pages/FinanceFinanceHubPage.js.map +1 -1
  37. package/dist/assethandler/pages/FinanceInvoiceDetailPage.d.ts.map +1 -1
  38. package/dist/assethandler/pages/FinanceInvoiceDetailPage.js +141 -140
  39. package/dist/assethandler/pages/FinanceInvoiceDetailPage.js.map +1 -1
  40. package/dist/assethandler/pages/ItilChangeManagementPage.js +21 -21
  41. package/dist/assethandler/pages/ItilIncidentManagementPage.js +34 -34
  42. package/dist/assethandler/pages/ItilProblemManagementPage.js +17 -17
  43. package/dist/assethandler/pages/KnowledgeBasePage.js +39 -39
  44. package/dist/assethandler/pages/MaintenanceMaintenanceSchedulerPage.d.ts.map +1 -1
  45. package/dist/assethandler/pages/MaintenanceMaintenanceSchedulerPage.js +114 -114
  46. package/dist/assethandler/pages/MaintenanceMaintenanceSchedulerPage.js.map +1 -1
  47. package/dist/assethandler/pages/OperationsMaintenanceDetailPage.d.ts.map +1 -1
  48. package/dist/assethandler/pages/OperationsMaintenanceDetailPage.js +158 -157
  49. package/dist/assethandler/pages/OperationsMaintenanceDetailPage.js.map +1 -1
  50. package/dist/assethandler/pages/OperationsOperationsHubPage.d.ts.map +1 -1
  51. package/dist/assethandler/pages/OperationsOperationsHubPage.js +253 -252
  52. package/dist/assethandler/pages/OperationsOperationsHubPage.js.map +1 -1
  53. package/dist/assethandler/pages/PortfolioPortfolioOverviewPage.d.ts.map +1 -1
  54. package/dist/assethandler/pages/PortfolioPortfolioOverviewPage.js +96 -95
  55. package/dist/assethandler/pages/PortfolioPortfolioOverviewPage.js.map +1 -1
  56. package/dist/assethandler/pages/ProvenancePage.js +21 -21
  57. package/dist/assethandler/pages/ReportsDashboardPage.d.ts.map +1 -1
  58. package/dist/assethandler/pages/ReportsDashboardPage.js +301 -301
  59. package/dist/assethandler/pages/ReportsDashboardPage.js.map +1 -1
  60. package/dist/assethandler/pages/SecuritySecurityHubPage.js +126 -126
  61. package/dist/assethandler/pages/SecuritySecurityHubPage.js.map +1 -1
  62. package/dist/assethandler/pages/TransactionsTransactionDetailPage.d.ts.map +1 -1
  63. package/dist/assethandler/pages/TransactionsTransactionDetailPage.js +112 -113
  64. package/dist/assethandler/pages/TransactionsTransactionDetailPage.js.map +1 -1
  65. package/dist/assethandler/pages/TransactionsTransactionListPage.d.ts.map +1 -1
  66. package/dist/assethandler/pages/TransactionsTransactionListPage.js +136 -137
  67. package/dist/assethandler/pages/TransactionsTransactionListPage.js.map +1 -1
  68. package/dist/assethandler/providers/AssetHandlerProvider.d.ts +14 -0
  69. package/dist/assethandler/providers/AssetHandlerProvider.d.ts.map +1 -1
  70. package/dist/assethandler/providers/AssetHandlerProvider.js +44 -34
  71. package/dist/assethandler/providers/AssetHandlerProvider.js.map +1 -1
  72. package/dist/assethandler/types/index.d.ts +10 -0
  73. package/dist/assethandler/types/index.d.ts.map +1 -1
  74. package/dist/assethandler/utils/money.d.ts +34 -0
  75. package/dist/assethandler/utils/money.d.ts.map +1 -0
  76. package/dist/assethandler/utils/money.js +27 -0
  77. package/dist/assethandler/utils/money.js.map +1 -0
  78. package/package.json +1 -1
@@ -1,22 +1,21 @@
1
1
  import { useAssetHandlerStore as e } from "../store/assethandlerStore.js";
2
2
  import { formatAssetCategory as t } from "../utils/categoryPresentation.js";
3
- import { useAssetCategoryPresentation as n } from "../providers/AssetHandlerProvider.js";
4
- import { useAssetHandlerNavigate as r } from "../hooks/useAssetHandlerNavigate.js";
5
- import { useCopy as i } from "../hooks/useCopy.js";
6
- import { notify as a } from "../utils/toast.js";
7
- import { AttachmentsPanel as o } from "../components/AttachmentsPanel.js";
8
- import { CommentsPanel as ee } from "../components/CommentsPanel.js";
9
- import { formatCurrencyCompact as s } from "../components/charts/chartTheme.js";
10
- import { TrendChart as te } from "../components/charts/TrendChart.js";
11
- import { BarsChart as ne } from "../components/charts/BarsChart.js";
12
- import { DonutChart as re } from "../components/charts/DonutChart.js";
13
- import { ActivityTimeline as ie } from "../components/ActivityTimeline.js";
14
- import { NotFoundState as ae } from "../components/NotFoundState.js";
15
- import { StatTile as c } from "../components/StatTile.js";
16
- import { ChartCard as l } from "../components/ChartCard.js";
3
+ import { useAssetCategoryPresentation as n, useAssetMoney as r } from "../providers/AssetHandlerProvider.js";
4
+ import { useAssetHandlerNavigate as i } from "../hooks/useAssetHandlerNavigate.js";
5
+ import { useCopy as a } from "../hooks/useCopy.js";
6
+ import { notify as o } from "../utils/toast.js";
7
+ import { AttachmentsPanel as ee } from "../components/AttachmentsPanel.js";
8
+ import { CommentsPanel as te } from "../components/CommentsPanel.js";
9
+ import { TrendChart as ne } from "../components/charts/TrendChart.js";
10
+ import { BarsChart as re } from "../components/charts/BarsChart.js";
11
+ import { DonutChart as ie } from "../components/charts/DonutChart.js";
12
+ import { ActivityTimeline as ae } from "../components/ActivityTimeline.js";
13
+ import { NotFoundState as oe } from "../components/NotFoundState.js";
14
+ import { StatTile as s } from "../components/StatTile.js";
15
+ import { ChartCard as c } from "../components/ChartCard.js";
17
16
  import "../components/index.js";
18
- import { useState as u } from "react";
19
- import { Archive as oe, ArrowLeft as se, Building2 as ce, Calendar as le, DollarSign as ue, Hash as de, Layers as fe, MapPin as pe, Pencil as me, ShieldCheck as he, Tag as ge, Trash2 as _e, TrendingDown as ve, Truck as ye, User as be, Wrench as d } from "lucide-react";
17
+ import { useState as l } from "react";
18
+ import { Archive as se, ArrowLeft as ce, Building2 as le, Calendar as ue, DollarSign as u, Hash as de, Layers as fe, MapPin as pe, Pencil as me, ShieldCheck as he, Tag as ge, Trash2 as _e, TrendingDown as ve, Truck as ye, User as be, Wrench as d } from "lucide-react";
20
19
  import { useParams as xe } from "react-router";
21
20
  import { gql as f } from "@apollo/client";
22
21
  import { useMutation as p, useQuery as Se } from "@apollo/client/react";
@@ -80,7 +79,7 @@ var Ie = f`
80
79
  fair: "text-status-warning-text bg-status-warning-bg-subtle",
81
80
  poor: "text-status-warning-text bg-status-warning-bg-subtle",
82
81
  damaged: "text-status-error-text bg-status-error-bg-subtle"
83
- }, N = (e) => e == null ? "—" : `$${Number(e).toLocaleString(void 0, { maximumFractionDigits: 2 })}`;
82
+ };
84
83
  function Ve(e) {
85
84
  let t = Date.now();
86
85
  return e.map((e) => e.scheduledDate).filter((e) => e != null && new Date(e).getTime() >= t).sort((e, t) => new Date(e).getTime() - new Date(t).getTime())[0];
@@ -155,77 +154,77 @@ function Ge(e) {
155
154
  unitsProduced: e.unitsProduced == null ? "" : String(e.unitsProduced)
156
155
  };
157
156
  }
158
- function P() {
159
- let f = r(), { labels: P } = n(), { assetId: Ke } = xe(), { maintenanceRecords: qe } = e(), Je = i(), { data: Ye, loading: Xe, refetch: Ze } = Se(Ie, {
160
- variables: { id: Ke ?? "" },
161
- skip: !Ke,
157
+ function Ke() {
158
+ let f = i(), { labels: Ke } = n(), { format: F, compact: I } = r(), { assetId: qe } = xe(), { maintenanceRecords: Je } = e(), L = a(), { data: Ye, loading: Xe, refetch: Ze } = Se(Ie, {
159
+ variables: { id: qe ?? "" },
160
+ skip: !qe,
162
161
  fetchPolicy: "cache-and-network"
163
- }), [Qe, L] = u(!1), [$e, R] = u(!1), [et, z] = u(!1), [B, tt] = u(null), [V, H] = u({
162
+ }), [Qe, R] = l(!1), [$e, z] = l(!1), [et, B] = l(!1), [V, tt] = l(null), [H, U] = l({
164
163
  disposalDate: "",
165
164
  method: "",
166
165
  notes: ""
167
- }), [nt, { loading: U }] = p(Le, {
166
+ }), [nt, { loading: W }] = p(Le, {
168
167
  refetchQueries: ["AssetHandlerBootstrap"],
169
168
  onCompleted: () => {
170
- a.success("Asset updated", "Your changes have been saved."), L(!1), Ze();
169
+ o.success("Asset updated", "Your changes have been saved."), R(!1), Ze();
171
170
  },
172
- onError: (e) => a.error("Could not update asset", e.message)
173
- }), [rt, { loading: W }] = p(Re, {
171
+ onError: (e) => o.error("Could not update asset", e.message)
172
+ }), [rt, { loading: G }] = p(Re, {
174
173
  refetchQueries: ["AssetHandlerBootstrap"],
175
174
  onCompleted: () => {
176
- a.success("Asset disposed", "The asset has been marked as disposed."), R(!1), Ze();
175
+ o.success("Asset disposed", "The asset has been marked as disposed."), z(!1), Ze();
177
176
  },
178
- onError: (e) => a.error("Could not dispose asset", e.message)
179
- }), [it, { loading: G }] = p(ze, {
177
+ onError: (e) => o.error("Could not dispose asset", e.message)
178
+ }), [it, { loading: K }] = p(ze, {
180
179
  refetchQueries: ["AssetHandlerBootstrap"],
181
180
  onCompleted: () => {
182
- a.success("Asset deleted", "The asset has been removed from the inventory."), f("/assets/asset-list");
181
+ o.success("Asset deleted", "The asset has been removed from the inventory."), f("/assets/asset-list");
183
182
  },
184
- onError: (e) => a.error("Could not delete asset", e.message)
183
+ onError: (e) => o.error("Could not delete asset", e.message)
185
184
  });
186
185
  if (Xe && !Ye) return /* @__PURE__ */ h("div", {
187
186
  className: "space-y-3 p-6",
188
187
  children: Array.from({ length: 6 }).map((e, t) => /* @__PURE__ */ h("div", { className: "h-10 rounded-md bg-bg-sunken motion-safe:animate-vc-shimmer" }, t))
189
188
  });
190
- let K = Ye?.asset;
191
- if (!K) return /* @__PURE__ */ h(ae, {
192
- entityLabel: "Asset",
193
- description: "This asset may have been disposed or removed. Return to the inventory to find it.",
194
- backLabel: "Back to inventory",
189
+ let q = Ye?.asset;
190
+ if (!q) return /* @__PURE__ */ h(oe, {
191
+ entityLabel: L("assethandler.asset.detail.notFound.entity", "{{asset}}"),
192
+ description: L("assethandler.asset.detail.notFound.description", "This {{assetLower}} may have been disposed or removed. Return to the inventory to find it."),
193
+ backLabel: L("assethandler.asset.detail.notFound.back", "Back to inventory"),
195
194
  onBack: () => f("/assets/asset-list")
196
195
  });
197
- let q = {
198
- ...K,
199
- status: K.status.toLowerCase(),
200
- condition: K.condition.toLowerCase(),
201
- category: K.category.toLowerCase()
202
- }, J = qe.filter((e) => e.assetId === q.id), Y = J.filter((e) => e.status !== "completed" && e.status !== "cancelled"), at = Ve(Y), ot = q.status === "disposed", X = We({
203
- purchaseValue: q.purchaseValue,
204
- salvageValue: q.salvageValue,
205
- usefulLifeMonths: q.usefulLifeMonths,
206
- method: q.depreciationMethod,
207
- unitsOfProductionCapacity: q.unitsOfProductionCapacity,
208
- unitsProduced: q.unitsProduced
209
- }), st = X.map((e) => e.bookValue), ct = J.filter((e) => (e.actualCost ?? e.estimatedCost) != null).map((e) => ({
196
+ let J = {
197
+ ...q,
198
+ status: q.status.toLowerCase(),
199
+ condition: q.condition.toLowerCase(),
200
+ category: q.category.toLowerCase()
201
+ }, Y = Je.filter((e) => e.assetId === J.id), X = Y.filter((e) => e.status !== "completed" && e.status !== "cancelled"), at = Ve(X), ot = J.status === "disposed", Z = We({
202
+ purchaseValue: J.purchaseValue,
203
+ salvageValue: J.salvageValue,
204
+ usefulLifeMonths: J.usefulLifeMonths,
205
+ method: J.depreciationMethod,
206
+ unitsOfProductionCapacity: J.unitsOfProductionCapacity,
207
+ unitsProduced: J.unitsProduced
208
+ }), st = Z.map((e) => e.bookValue), ct = Y.filter((e) => (e.actualCost ?? e.estimatedCost) != null).map((e) => ({
210
209
  label: e.scheduledDate ? new Date(e.scheduledDate).toLocaleDateString(void 0, {
211
210
  month: "short",
212
211
  year: "2-digit"
213
212
  }) : e.title.slice(0, 12),
214
213
  cost: e.actualCost ?? e.estimatedCost ?? 0
215
- })), Z = J.reduce((e, t) => e + (t.actualCost ?? t.estimatedCost ?? 0), 0), Q = q.purchaseValue != null && Z > 0 ? [{
214
+ })), lt = Y.reduce((e, t) => e + (t.actualCost ?? t.estimatedCost ?? 0), 0), Q = J.purchaseValue != null && lt > 0 ? [{
216
215
  name: "Purchase",
217
- value: q.purchaseValue,
216
+ value: J.purchaseValue,
218
217
  color: "var(--color-accent-primary)"
219
218
  }, {
220
219
  name: "Maintenance",
221
- value: Z,
220
+ value: lt,
222
221
  color: "var(--color-status-info-bg)"
223
- }] : [], lt = () => {
224
- tt(Ge(K)), L(!0);
225
- }, ut = (e) => {
226
- if (e.preventDefault(), !B) return;
227
- if (!B.name.trim()) {
228
- a.warning("Name required", "An asset must have a name.");
222
+ }] : [], ut = () => {
223
+ tt(Ge(q)), R(!0);
224
+ }, dt = (e) => {
225
+ if (e.preventDefault(), !V) return;
226
+ if (!V.name.trim()) {
227
+ o.warning("Name required", "An asset must have a name.");
229
228
  return;
230
229
  }
231
230
  let t = (e) => {
@@ -235,33 +234,33 @@ function P() {
235
234
  return Number.isNaN(n) ? null : n;
236
235
  };
237
236
  nt({ variables: {
238
- id: q.id,
237
+ id: J.id,
239
238
  input: {
240
- name: B.name.trim(),
241
- description: B.description.trim() || null,
242
- category: B.category.trim(),
243
- status: B.status,
244
- condition: B.condition,
245
- serialNumber: B.serialNumber.trim() || null,
246
- locationName: B.locationName.trim() || null,
247
- assignedTo: B.assignedTo.trim() || null,
248
- department: B.department.trim() || null,
249
- supplier: B.supplier.trim() || null,
250
- purchaseValue: t(B.purchaseValue),
251
- salvageValue: t(B.salvageValue),
252
- usefulLifeMonths: t(B.usefulLifeMonths),
253
- depreciationMethod: B.depreciationMethod,
254
- unitsOfProductionCapacity: t(B.unitsOfProductionCapacity),
255
- unitsProduced: t(B.unitsProduced)
239
+ name: V.name.trim(),
240
+ description: V.description.trim() || null,
241
+ category: V.category.trim(),
242
+ status: V.status,
243
+ condition: V.condition,
244
+ serialNumber: V.serialNumber.trim() || null,
245
+ locationName: V.locationName.trim() || null,
246
+ assignedTo: V.assignedTo.trim() || null,
247
+ department: V.department.trim() || null,
248
+ supplier: V.supplier.trim() || null,
249
+ purchaseValue: t(V.purchaseValue),
250
+ salvageValue: t(V.salvageValue),
251
+ usefulLifeMonths: t(V.usefulLifeMonths),
252
+ depreciationMethod: V.depreciationMethod,
253
+ unitsOfProductionCapacity: t(V.unitsOfProductionCapacity),
254
+ unitsProduced: t(V.unitsProduced)
256
255
  }
257
256
  } });
258
- }, dt = (e) => {
257
+ }, ft = (e) => {
259
258
  e.preventDefault(), rt({ variables: {
260
- id: q.id,
259
+ id: J.id,
261
260
  input: {
262
- disposalDate: V.disposalDate ? new Date(V.disposalDate).toISOString() : (/* @__PURE__ */ new Date()).toISOString(),
263
- method: V.method.trim() || null,
264
- notes: V.notes.trim() || null
261
+ disposalDate: H.disposalDate ? new Date(H.disposalDate).toISOString() : (/* @__PURE__ */ new Date()).toISOString(),
262
+ method: H.method.trim() || null,
263
+ notes: H.notes.trim() || null
265
264
  }
266
265
  } });
267
266
  }, $ = (e, t) => tt((n) => n && {
@@ -280,26 +279,26 @@ function P() {
280
279
  size: "icon",
281
280
  "aria-label": "Go back",
282
281
  onClick: () => f("/assets/asset-list"),
283
- children: /* @__PURE__ */ h(se, { className: "h-4 w-4" })
282
+ children: /* @__PURE__ */ h(ce, { className: "h-4 w-4" })
284
283
  }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("div", {
285
284
  className: "flex items-center gap-3",
286
285
  children: [
287
286
  /* @__PURE__ */ h("h1", {
288
287
  className: "text-2xl font-bold",
289
- children: /* @__PURE__ */ h(je, { children: q.name })
288
+ children: /* @__PURE__ */ h(je, { children: J.name })
290
289
  }),
291
290
  /* @__PURE__ */ h("span", {
292
- className: `rounded-full px-2.5 py-0.5 text-xs font-medium capitalize ${Ue[q.status] ?? "bg-bg-sunken text-text-secondary"}`,
293
- children: q.status.replace(/_/g, " ")
291
+ className: `rounded-full px-2.5 py-0.5 text-xs font-medium capitalize ${Ue[J.status] ?? "bg-bg-sunken text-text-secondary"}`,
292
+ children: J.status.replace(/_/g, " ")
294
293
  }),
295
294
  /* @__PURE__ */ h("span", {
296
- className: `rounded-full px-2.5 py-0.5 text-xs font-medium capitalize ${Be[q.condition] ?? ""}`,
297
- children: q.condition
295
+ className: `rounded-full px-2.5 py-0.5 text-xs font-medium capitalize ${Be[J.condition] ?? ""}`,
296
+ children: J.condition
298
297
  })
299
298
  ]
300
299
  }), /* @__PURE__ */ g("p", {
301
300
  className: "text-sm text-text-secondary mt-1",
302
- children: [q.assetNumber, q.serialNumber ? /* @__PURE__ */ g(m, { children: [" · SN: ", q.serialNumber] }) : null]
301
+ children: [J.assetNumber, J.serialNumber ? /* @__PURE__ */ g(m, { children: [" · SN: ", J.serialNumber] }) : null]
303
302
  })] })]
304
303
  }), /* @__PURE__ */ g("div", {
305
304
  className: "flex items-center gap-2",
@@ -307,72 +306,72 @@ function P() {
307
306
  /* @__PURE__ */ g(_, {
308
307
  size: "sm",
309
308
  variant: "outline",
310
- onClick: lt,
309
+ onClick: ut,
311
310
  children: [/* @__PURE__ */ h(me, { className: "mr-2 h-4 w-4" }), "Edit"]
312
311
  }),
313
312
  ot ? null : /* @__PURE__ */ g(_, {
314
313
  size: "sm",
315
314
  variant: "outline",
316
- onClick: () => R(!0),
317
- children: [/* @__PURE__ */ h(oe, { className: "mr-2 h-4 w-4" }), "Dispose"]
315
+ onClick: () => z(!0),
316
+ children: [/* @__PURE__ */ h(se, { className: "mr-2 h-4 w-4" }), "Dispose"]
318
317
  }),
319
318
  /* @__PURE__ */ g(_, {
320
319
  size: "sm",
321
320
  variant: "outline",
322
321
  className: "text-status-error-text",
323
- onClick: () => z(!0),
322
+ onClick: () => B(!0),
324
323
  children: [/* @__PURE__ */ h(_e, { className: "mr-2 h-4 w-4" }), "Delete"]
325
324
  })
326
325
  ]
327
326
  })]
328
327
  }),
329
- /* @__PURE__ */ h(Me, { children: "The complete profile of a single asset — its identity, condition, location, assignment, financials and maintenance history. Use this page as the asset's home base: edit its details, track its book value, and dispose of it when it reaches end of life." }),
328
+ /* @__PURE__ */ h(Me, { children: L("assethandler.asset.detail.purpose", "The complete profile of a single {{assetLower}} — its identity, condition, location, assignment, financials and maintenance history. Use this page as the {{assetLower}}'s home base: edit its details, track its book value, and dispose of it when it reaches end of life.") }),
330
329
  ot ? /* @__PURE__ */ g(ke, { children: [
331
330
  /* @__PURE__ */ g("div", {
332
331
  className: "flex items-center gap-2 text-sm font-medium",
333
332
  children: [
334
- /* @__PURE__ */ h(oe, { className: "h-4 w-4" }),
333
+ /* @__PURE__ */ h(se, { className: "h-4 w-4" }),
335
334
  "This asset was disposed",
336
- q.disposalDate ? ` on ${new Date(q.disposalDate).toLocaleDateString()}` : ""
335
+ J.disposalDate ? ` on ${new Date(J.disposalDate).toLocaleDateString()}` : ""
337
336
  ]
338
337
  }),
339
- q.disposalMethod ? /* @__PURE__ */ g("p", {
338
+ J.disposalMethod ? /* @__PURE__ */ g("p", {
340
339
  className: "mt-1 text-sm text-text-secondary",
341
- children: ["Method: ", q.disposalMethod]
340
+ children: ["Method: ", J.disposalMethod]
342
341
  }) : null,
343
- q.disposalNotes ? /* @__PURE__ */ h("p", {
342
+ J.disposalNotes ? /* @__PURE__ */ h("p", {
344
343
  className: "mt-1 text-sm text-text-secondary",
345
- children: q.disposalNotes
344
+ children: J.disposalNotes
346
345
  }) : null
347
346
  ] }) : null,
348
347
  /* @__PURE__ */ g("div", {
349
348
  className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
350
349
  children: [
351
- /* @__PURE__ */ h(c, {
350
+ /* @__PURE__ */ h(s, {
352
351
  hero: !0,
353
352
  label: "Current value",
354
- value: N(q.currentValue),
355
- delta: q.purchaseValue == null ? void 0 : `of ${N(q.purchaseValue)}`,
353
+ value: F(J.currentValue),
354
+ delta: J.purchaseValue == null ? void 0 : `of ${F(J.purchaseValue)}`,
356
355
  deltaDirection: "neutral",
357
356
  spark: st.length > 1 ? st : void 0,
358
- icon: ue
357
+ icon: u
359
358
  }),
360
- /* @__PURE__ */ h(c, {
359
+ /* @__PURE__ */ h(s, {
361
360
  label: "Maintenance records",
362
- value: J.length,
363
- delta: Y.length > 0 ? `${Y.length} open` : void 0,
361
+ value: Y.length,
362
+ delta: X.length > 0 ? `${X.length} open` : void 0,
364
363
  deltaTone: "neutral",
365
364
  deltaDirection: "neutral",
366
365
  icon: d
367
366
  }),
368
- /* @__PURE__ */ h(c, {
367
+ /* @__PURE__ */ h(s, {
369
368
  label: "Registered",
370
- value: q.createdAt ? new Date(q.createdAt).toLocaleDateString() : "—",
371
- icon: le
369
+ value: J.createdAt ? new Date(J.createdAt).toLocaleDateString() : "—",
370
+ icon: ue
372
371
  }),
373
- /* @__PURE__ */ h(c, {
372
+ /* @__PURE__ */ h(s, {
374
373
  label: "Location",
375
- value: q.locationName || "—",
374
+ value: J.locationName || "—",
376
375
  icon: pe
377
376
  })
378
377
  ]
@@ -409,75 +408,75 @@ function P() {
409
408
  value: "details",
410
409
  className: "mt-4 space-y-4",
411
410
  children: [
412
- q.description ? /* @__PURE__ */ h(F, {
411
+ J.description ? /* @__PURE__ */ h(N, {
413
412
  label: "Description",
414
- value: q.description,
413
+ value: J.description,
415
414
  full: !0
416
415
  }) : null,
417
416
  /* @__PURE__ */ g("div", {
418
417
  className: "grid gap-3 sm:grid-cols-2 xl:grid-cols-3",
419
418
  children: [
420
- /* @__PURE__ */ h(F, {
421
- label: "Asset Tag",
422
- value: q.assetNumber,
419
+ /* @__PURE__ */ h(N, {
420
+ label: L("assethandler.asset.detail.field.tag", "{{asset}} Tag"),
421
+ value: J.assetNumber,
423
422
  icon: de,
424
423
  mono: !0
425
424
  }),
426
- /* @__PURE__ */ h(F, {
425
+ /* @__PURE__ */ h(N, {
427
426
  label: "Serial Number",
428
- value: q.serialNumber || "—",
427
+ value: J.serialNumber || "—",
429
428
  icon: de,
430
429
  mono: !0
431
430
  }),
432
- /* @__PURE__ */ h(F, {
431
+ /* @__PURE__ */ h(N, {
433
432
  label: "Category",
434
- value: t(q.category, P),
433
+ value: t(J.category, Ke),
435
434
  icon: fe,
436
435
  capitalize: !0
437
436
  }),
438
- /* @__PURE__ */ h(F, {
437
+ /* @__PURE__ */ h(N, {
439
438
  label: "Condition",
440
439
  icon: he,
441
440
  children: /* @__PURE__ */ h("span", {
442
- className: `inline-flex rounded-full px-2.5 py-0.5 text-xs font-medium capitalize ${Be[q.condition] ?? ""}`,
443
- children: q.condition
441
+ className: `inline-flex rounded-full px-2.5 py-0.5 text-xs font-medium capitalize ${Be[J.condition] ?? ""}`,
442
+ children: J.condition
444
443
  })
445
444
  }),
446
- /* @__PURE__ */ h(F, {
445
+ /* @__PURE__ */ h(N, {
447
446
  label: "Assigned To",
448
- value: q.assignedTo || "—",
447
+ value: J.assignedTo || "—",
449
448
  icon: be
450
449
  }),
451
- /* @__PURE__ */ h(F, {
452
- label: Je("assethandler.asset.detail.nextService", "Next Service"),
450
+ /* @__PURE__ */ h(N, {
451
+ label: L("assethandler.asset.detail.nextService", "Next Service"),
453
452
  value: at ? new Date(at).toLocaleDateString() : "—",
454
453
  icon: d
455
454
  }),
456
- /* @__PURE__ */ h(F, {
455
+ /* @__PURE__ */ h(N, {
457
456
  label: "Department",
458
- value: q.department || "—",
459
- icon: ce
457
+ value: J.department || "—",
458
+ icon: le
460
459
  }),
461
- /* @__PURE__ */ h(F, {
460
+ /* @__PURE__ */ h(N, {
462
461
  label: "Location",
463
- value: q.locationName || "—",
462
+ value: J.locationName || "—",
464
463
  icon: pe
465
464
  }),
466
- /* @__PURE__ */ h(F, {
465
+ /* @__PURE__ */ h(N, {
467
466
  label: "Supplier",
468
- value: q.supplier || "—",
467
+ value: J.supplier || "—",
469
468
  icon: ye
470
469
  }),
471
- /* @__PURE__ */ h(F, {
470
+ /* @__PURE__ */ h(N, {
472
471
  label: "Warranty Expiry",
473
- value: q.warrantyExpiry ? new Date(q.warrantyExpiry).toLocaleDateString() : "—",
474
- icon: le
472
+ value: J.warrantyExpiry ? new Date(J.warrantyExpiry).toLocaleDateString() : "—",
473
+ icon: ue
475
474
  })
476
475
  ]
477
476
  }),
478
- /* @__PURE__ */ h(o, {
477
+ /* @__PURE__ */ h(ee, {
479
478
  entityType: "assethandler-asset",
480
- entityId: q.id
479
+ entityId: J.id
481
480
  })
482
481
  ]
483
482
  }),
@@ -488,36 +487,36 @@ function P() {
488
487
  /* @__PURE__ */ g("div", {
489
488
  className: "grid gap-4 sm:grid-cols-2 xl:grid-cols-4",
490
489
  children: [
491
- /* @__PURE__ */ h(c, {
490
+ /* @__PURE__ */ h(s, {
492
491
  label: "Purchase Value",
493
- value: N(q.purchaseValue)
492
+ value: F(J.purchaseValue)
494
493
  }),
495
- /* @__PURE__ */ h(c, {
494
+ /* @__PURE__ */ h(s, {
496
495
  hero: !0,
497
496
  label: "Current Book Value",
498
- value: N(q.currentValue)
497
+ value: F(J.currentValue)
499
498
  }),
500
- /* @__PURE__ */ h(c, {
499
+ /* @__PURE__ */ h(s, {
501
500
  label: "Accum. Depreciation",
502
- value: N(q.accumulatedDepreciation)
501
+ value: F(J.accumulatedDepreciation)
503
502
  }),
504
- /* @__PURE__ */ h(c, {
503
+ /* @__PURE__ */ h(s, {
505
504
  label: "Total Cost of Ownership",
506
- value: N(q.totalCostOfOwnership)
505
+ value: F(J.totalCostOfOwnership)
507
506
  })
508
507
  ]
509
508
  }),
510
509
  /* @__PURE__ */ g("div", {
511
510
  className: "grid gap-4 lg:grid-cols-2",
512
- children: [/* @__PURE__ */ h(l, {
511
+ children: [/* @__PURE__ */ h(c, {
513
512
  title: "Depreciation & book value",
514
513
  subtitle: "Projected book value over the useful life",
515
514
  icon: ve,
516
- children: X.length > 0 ? /* @__PURE__ */ h(te, {
517
- data: X,
515
+ children: Z.length > 0 ? /* @__PURE__ */ h(ne, {
516
+ data: Z,
518
517
  xKey: "year",
519
518
  height: 260,
520
- valueFormat: s("USD"),
519
+ valueFormat: I,
521
520
  xTickFormat: (e) => `${e}y`,
522
521
  series: [{
523
522
  key: "bookValue",
@@ -527,52 +526,52 @@ function P() {
527
526
  className: "py-12 text-center text-sm text-text-secondary",
528
527
  children: "Add purchase value, useful life and salvage value to see the depreciation schedule."
529
528
  })
530
- }), /* @__PURE__ */ h(l, {
529
+ }), /* @__PURE__ */ h(c, {
531
530
  title: "Key facts",
532
531
  subtitle: "Purchase & depreciation terms",
533
532
  children: /* @__PURE__ */ g("dl", {
534
533
  className: "overflow-hidden rounded-lg border border-border-seam text-sm",
535
534
  children: [
536
- /* @__PURE__ */ h(I, {
535
+ /* @__PURE__ */ h(P, {
537
536
  label: "Purchase Date",
538
- value: q.purchaseDate ? new Date(q.purchaseDate).toLocaleDateString() : "—",
537
+ value: J.purchaseDate ? new Date(J.purchaseDate).toLocaleDateString() : "—",
539
538
  striped: !0
540
539
  }),
541
- /* @__PURE__ */ h(I, {
540
+ /* @__PURE__ */ h(P, {
542
541
  label: "Useful Life",
543
- value: q.usefulLifeMonths ? `${q.usefulLifeMonths} months` : "—"
542
+ value: J.usefulLifeMonths ? `${J.usefulLifeMonths} months` : "—"
544
543
  }),
545
- /* @__PURE__ */ h(I, {
544
+ /* @__PURE__ */ h(P, {
546
545
  label: "Salvage Value",
547
- value: N(q.salvageValue),
546
+ value: F(J.salvageValue),
548
547
  striped: !0
549
548
  }),
550
- /* @__PURE__ */ h(I, {
549
+ /* @__PURE__ */ h(P, {
551
550
  label: "Depreciation Method",
552
- value: q.depreciationMethod ? He[q.depreciationMethod.toUpperCase()] ?? q.depreciationMethod : "—"
551
+ value: J.depreciationMethod ? He[J.depreciationMethod.toUpperCase()] ?? J.depreciationMethod : "—"
553
552
  }),
554
- /* @__PURE__ */ h(I, {
553
+ /* @__PURE__ */ h(P, {
555
554
  label: "Supplier",
556
- value: q.supplier || "—",
555
+ value: J.supplier || "—",
557
556
  striped: !0
558
557
  }),
559
- /* @__PURE__ */ h(I, {
558
+ /* @__PURE__ */ h(P, {
560
559
  label: "Warranty Expiry",
561
- value: q.warrantyExpiry ? new Date(q.warrantyExpiry).toLocaleDateString() : "—"
560
+ value: J.warrantyExpiry ? new Date(J.warrantyExpiry).toLocaleDateString() : "—"
562
561
  })
563
562
  ]
564
563
  })
565
564
  })]
566
565
  }),
567
- Q.length > 0 ? /* @__PURE__ */ h(l, {
566
+ Q.length > 0 ? /* @__PURE__ */ h(c, {
568
567
  title: "Total cost of ownership",
569
568
  subtitle: "What drives lifetime cost",
570
- icon: ue,
571
- children: /* @__PURE__ */ h(re, {
569
+ icon: u,
570
+ children: /* @__PURE__ */ h(ie, {
572
571
  data: Q,
573
572
  centerLabel: "TCO",
574
573
  centerValue: Q.reduce((e, t) => e + t.value, 0),
575
- valueFormat: s("USD"),
574
+ valueFormat: I,
576
575
  height: 220
577
576
  })
578
577
  }) : null
@@ -581,15 +580,15 @@ function P() {
581
580
  /* @__PURE__ */ g(j, {
582
581
  value: "maintenance",
583
582
  className: "mt-4 space-y-4",
584
- children: [ct.length > 0 ? /* @__PURE__ */ h(l, {
583
+ children: [ct.length > 0 ? /* @__PURE__ */ h(c, {
585
584
  title: "Maintenance cost history",
586
585
  subtitle: "Recorded cost per maintenance event",
587
586
  icon: d,
588
- children: /* @__PURE__ */ h(ne, {
587
+ children: /* @__PURE__ */ h(re, {
589
588
  data: ct,
590
589
  xKey: "label",
591
590
  height: 220,
592
- valueFormat: s("USD"),
591
+ valueFormat: I,
593
592
  series: [{
594
593
  key: "cost",
595
594
  label: "Cost"
@@ -598,12 +597,12 @@ function P() {
598
597
  }) : null, /* @__PURE__ */ g(we, { children: [/* @__PURE__ */ g(De, { children: [/* @__PURE__ */ g(Oe, {
599
598
  className: "flex items-center gap-2",
600
599
  children: [/* @__PURE__ */ h(d, { className: "h-4 w-4" }), "Maintenance History"]
601
- }), /* @__PURE__ */ g(Ee, { children: [J.length, " records found"] })] }), /* @__PURE__ */ h(Te, { children: J.length === 0 ? /* @__PURE__ */ h("p", {
600
+ }), /* @__PURE__ */ g(Ee, { children: [Y.length, " records found"] })] }), /* @__PURE__ */ h(Te, { children: Y.length === 0 ? /* @__PURE__ */ h("p", {
602
601
  className: "py-8 text-center text-text-secondary",
603
602
  children: "No maintenance records for this asset."
604
603
  }) : /* @__PURE__ */ h("div", {
605
604
  className: "space-y-3",
606
- children: J.map((e) => /* @__PURE__ */ h("div", {
605
+ children: Y.map((e) => /* @__PURE__ */ h("div", {
607
606
  className: "flex items-start gap-4 rounded-lg border p-4",
608
607
  children: /* @__PURE__ */ g("div", {
609
608
  className: "flex-1",
@@ -633,7 +632,7 @@ function P() {
633
632
  "Scheduled:",
634
633
  " ",
635
634
  e.scheduledDate ? new Date(e.scheduledDate).toLocaleDateString() : "—"
636
- ] }), e.actualCost != null || e.estimatedCost != null ? /* @__PURE__ */ g("span", { children: ["Cost: ", N(e.actualCost ?? e.estimatedCost)] }) : null]
635
+ ] }), e.actualCost != null || e.estimatedCost != null ? /* @__PURE__ */ g("span", { children: ["Cost: ", F(e.actualCost ?? e.estimatedCost)] }) : null]
637
636
  })
638
637
  ]
639
638
  })
@@ -643,9 +642,9 @@ function P() {
643
642
  /* @__PURE__ */ h(j, {
644
643
  value: "discussion",
645
644
  className: "mt-4",
646
- children: /* @__PURE__ */ h(ee, {
645
+ children: /* @__PURE__ */ h(te, {
647
646
  entityType: "assethandler-asset",
648
- entityId: q.id
647
+ entityId: J.id
649
648
  })
650
649
  })
651
650
  ]
@@ -660,41 +659,41 @@ function P() {
660
659
  children: [/* @__PURE__ */ g("h3", {
661
660
  className: "flex items-center gap-2 text-sm font-semibold",
662
661
  children: [/* @__PURE__ */ h(ge, { className: "h-4 w-4 text-text-secondary" }), "Tags"]
663
- }), q.tags.length === 0 ? /* @__PURE__ */ h("p", {
662
+ }), J.tags.length === 0 ? /* @__PURE__ */ h("p", {
664
663
  className: "text-xs text-text-secondary",
665
664
  children: "No tags yet"
666
665
  }) : /* @__PURE__ */ h("div", {
667
666
  className: "flex flex-wrap gap-1.5",
668
- children: q.tags.map((e) => /* @__PURE__ */ h("span", {
667
+ children: J.tags.map((e) => /* @__PURE__ */ h("span", {
669
668
  className: "rounded-full bg-action-primary-bg/10 px-2.5 py-0.5 text-xs font-medium text-action-primary-bg",
670
669
  children: e
671
670
  }, e))
672
671
  })]
673
672
  })
674
- }), /* @__PURE__ */ h(ie, { resourceId: q.id })]
673
+ }), /* @__PURE__ */ h(ae, { resourceId: J.id })]
675
674
  })]
676
675
  }),
677
676
  /* @__PURE__ */ h(b, {
678
677
  open: Qe,
679
- onOpenChange: L,
678
+ onOpenChange: R,
680
679
  children: /* @__PURE__ */ g(x, {
681
680
  className: "max-h-[85vh] overflow-y-auto sm:max-w-2xl",
682
- children: [/* @__PURE__ */ g(w, { children: [/* @__PURE__ */ h(T, { children: "Edit asset" }), /* @__PURE__ */ h(S, { children: "Update this asset's details and financials." })] }), B ? /* @__PURE__ */ g("form", {
681
+ children: [/* @__PURE__ */ g(w, { children: [/* @__PURE__ */ h(T, { children: "Edit asset" }), /* @__PURE__ */ h(S, { children: "Update this asset's details and financials." })] }), V ? /* @__PURE__ */ g("form", {
683
682
  className: "space-y-4",
684
- onSubmit: ut,
683
+ onSubmit: dt,
685
684
  children: [
686
685
  /* @__PURE__ */ g("div", {
687
686
  className: "grid gap-4 md:grid-cols-2",
688
687
  children: [/* @__PURE__ */ g("div", {
689
688
  className: "space-y-2",
690
689
  children: [/* @__PURE__ */ h(y, { children: "Name" }), /* @__PURE__ */ h(v, {
691
- value: B.name,
690
+ value: V.name,
692
691
  onChange: (e) => $("name", e.target.value)
693
692
  })]
694
693
  }), /* @__PURE__ */ g("div", {
695
694
  className: "space-y-2",
696
695
  children: [/* @__PURE__ */ h(y, { children: "Category" }), /* @__PURE__ */ h(v, {
697
- value: B.category,
696
+ value: V.category,
698
697
  onChange: (e) => $("category", e.target.value)
699
698
  })]
700
699
  })]
@@ -702,7 +701,7 @@ function P() {
702
701
  /* @__PURE__ */ g("div", {
703
702
  className: "space-y-2",
704
703
  children: [/* @__PURE__ */ h(y, { children: "Description" }), /* @__PURE__ */ h(Fe, {
705
- value: B.description,
704
+ value: V.description,
706
705
  onChange: (e) => $("description", e.target.value),
707
706
  rows: 2
708
707
  })]
@@ -713,7 +712,7 @@ function P() {
713
712
  /* @__PURE__ */ g("div", {
714
713
  className: "space-y-2",
715
714
  children: [/* @__PURE__ */ h(y, { children: "Status" }), /* @__PURE__ */ g(E, {
716
- value: B.status,
715
+ value: V.status,
717
716
  onValueChange: (e) => $("status", e),
718
717
  children: [/* @__PURE__ */ h(k, { children: /* @__PURE__ */ h(A, {}) }), /* @__PURE__ */ g(D, { children: [
719
718
  /* @__PURE__ */ h(O, {
@@ -738,7 +737,7 @@ function P() {
738
737
  /* @__PURE__ */ g("div", {
739
738
  className: "space-y-2",
740
739
  children: [/* @__PURE__ */ h(y, { children: "Condition" }), /* @__PURE__ */ g(E, {
741
- value: B.condition,
740
+ value: V.condition,
742
741
  onValueChange: (e) => $("condition", e),
743
742
  children: [/* @__PURE__ */ h(k, { children: /* @__PURE__ */ h(A, {}) }), /* @__PURE__ */ g(D, { children: [
744
743
  /* @__PURE__ */ h(O, {
@@ -767,7 +766,7 @@ function P() {
767
766
  /* @__PURE__ */ g("div", {
768
767
  className: "space-y-2",
769
768
  children: [/* @__PURE__ */ h(y, { children: "Department" }), /* @__PURE__ */ h(v, {
770
- value: B.department,
769
+ value: V.department,
771
770
  onChange: (e) => $("department", e.target.value)
772
771
  })]
773
772
  })
@@ -779,28 +778,28 @@ function P() {
779
778
  /* @__PURE__ */ g("div", {
780
779
  className: "space-y-2",
781
780
  children: [/* @__PURE__ */ h(y, { children: "Serial Number" }), /* @__PURE__ */ h(v, {
782
- value: B.serialNumber,
781
+ value: V.serialNumber,
783
782
  onChange: (e) => $("serialNumber", e.target.value)
784
783
  })]
785
784
  }),
786
785
  /* @__PURE__ */ g("div", {
787
786
  className: "space-y-2",
788
787
  children: [/* @__PURE__ */ h(y, { children: "Assigned To" }), /* @__PURE__ */ h(v, {
789
- value: B.assignedTo,
788
+ value: V.assignedTo,
790
789
  onChange: (e) => $("assignedTo", e.target.value)
791
790
  })]
792
791
  }),
793
792
  /* @__PURE__ */ g("div", {
794
793
  className: "space-y-2",
795
794
  children: [/* @__PURE__ */ h(y, { children: "Location" }), /* @__PURE__ */ h(v, {
796
- value: B.locationName,
795
+ value: V.locationName,
797
796
  onChange: (e) => $("locationName", e.target.value)
798
797
  })]
799
798
  }),
800
799
  /* @__PURE__ */ g("div", {
801
800
  className: "space-y-2",
802
801
  children: [/* @__PURE__ */ h(y, { children: "Supplier" }), /* @__PURE__ */ h(v, {
803
- value: B.supplier,
802
+ value: V.supplier,
804
803
  onChange: (e) => $("supplier", e.target.value)
805
804
  })]
806
805
  })
@@ -815,7 +814,7 @@ function P() {
815
814
  type: "number",
816
815
  min: "0",
817
816
  step: "0.01",
818
- value: B.purchaseValue,
817
+ value: V.purchaseValue,
819
818
  onChange: (e) => $("purchaseValue", e.target.value)
820
819
  })]
821
820
  }),
@@ -825,7 +824,7 @@ function P() {
825
824
  type: "number",
826
825
  min: "0",
827
826
  step: "0.01",
828
- value: B.salvageValue,
827
+ value: V.salvageValue,
829
828
  onChange: (e) => $("salvageValue", e.target.value)
830
829
  })]
831
830
  }),
@@ -835,14 +834,14 @@ function P() {
835
834
  type: "number",
836
835
  min: "0",
837
836
  step: "1",
838
- value: B.usefulLifeMonths,
837
+ value: V.usefulLifeMonths,
839
838
  onChange: (e) => $("usefulLifeMonths", e.target.value)
840
839
  })]
841
840
  }),
842
841
  /* @__PURE__ */ g("div", {
843
842
  className: "space-y-2",
844
843
  children: [/* @__PURE__ */ h(y, { children: "Depreciation" }), /* @__PURE__ */ g(E, {
845
- value: B.depreciationMethod,
844
+ value: V.depreciationMethod,
846
845
  onValueChange: (e) => $("depreciationMethod", e),
847
846
  children: [/* @__PURE__ */ h(k, { children: /* @__PURE__ */ h(A, {}) }), /* @__PURE__ */ g(D, { children: [
848
847
  /* @__PURE__ */ h(O, {
@@ -872,13 +871,13 @@ function P() {
872
871
  ] })]
873
872
  })]
874
873
  }),
875
- B.depreciationMethod === "UNITS_OF_PRODUCTION" ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g("div", {
874
+ V.depreciationMethod === "UNITS_OF_PRODUCTION" ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g("div", {
876
875
  className: "space-y-2",
877
876
  children: [/* @__PURE__ */ h(y, { children: "Lifetime Capacity (units)" }), /* @__PURE__ */ h(v, {
878
877
  type: "number",
879
878
  min: "0",
880
879
  step: "1",
881
- value: B.unitsOfProductionCapacity,
880
+ value: V.unitsOfProductionCapacity,
882
881
  onChange: (e) => $("unitsOfProductionCapacity", e.target.value)
883
882
  })]
884
883
  }), /* @__PURE__ */ g("div", {
@@ -887,7 +886,7 @@ function P() {
887
886
  type: "number",
888
887
  min: "0",
889
888
  step: "1",
890
- value: B.unitsProduced,
889
+ value: V.unitsProduced,
891
890
  onChange: (e) => $("unitsProduced", e.target.value)
892
891
  })]
893
892
  })] }) : null
@@ -896,13 +895,13 @@ function P() {
896
895
  /* @__PURE__ */ g(C, { children: [/* @__PURE__ */ h(_, {
897
896
  type: "button",
898
897
  variant: "outline",
899
- onClick: () => L(!1),
900
- disabled: U,
898
+ onClick: () => R(!1),
899
+ disabled: W,
901
900
  children: "Cancel"
902
901
  }), /* @__PURE__ */ h(_, {
903
902
  type: "submit",
904
- disabled: U,
905
- children: U ? "Saving…" : "Save changes"
903
+ disabled: W,
904
+ children: W ? "Saving…" : "Save changes"
906
905
  })] })
907
906
  ]
908
907
  }) : null]
@@ -910,17 +909,17 @@ function P() {
910
909
  }),
911
910
  /* @__PURE__ */ h(b, {
912
911
  open: $e,
913
- onOpenChange: R,
912
+ onOpenChange: z,
914
913
  children: /* @__PURE__ */ g(x, { children: [/* @__PURE__ */ g(w, { children: [/* @__PURE__ */ h(T, { children: "Dispose asset" }), /* @__PURE__ */ h(S, { children: "Record the disposal of this asset. It will be marked as disposed and removed from active inventory." })] }), /* @__PURE__ */ g("form", {
915
914
  className: "space-y-4",
916
- onSubmit: dt,
915
+ onSubmit: ft,
917
916
  children: [
918
917
  /* @__PURE__ */ g("div", {
919
918
  className: "space-y-2",
920
919
  children: [/* @__PURE__ */ h(y, { children: "Disposal Date" }), /* @__PURE__ */ h(v, {
921
920
  type: "date",
922
- value: V.disposalDate,
923
- onChange: (e) => H((t) => ({
921
+ value: H.disposalDate,
922
+ onChange: (e) => U((t) => ({
924
923
  ...t,
925
924
  disposalDate: e.target.value
926
925
  }))
@@ -930,8 +929,8 @@ function P() {
930
929
  className: "space-y-2",
931
930
  children: [/* @__PURE__ */ h(y, { children: "Method" }), /* @__PURE__ */ h(v, {
932
931
  placeholder: "e.g., Sold, Recycled, Scrapped",
933
- value: V.method,
934
- onChange: (e) => H((t) => ({
932
+ value: H.method,
933
+ onChange: (e) => U((t) => ({
935
934
  ...t,
936
935
  method: e.target.value
937
936
  }))
@@ -941,8 +940,8 @@ function P() {
941
940
  className: "space-y-2",
942
941
  children: [/* @__PURE__ */ h(y, { children: "Notes" }), /* @__PURE__ */ h(Fe, {
943
942
  placeholder: "Optional details about the disposal",
944
- value: V.notes,
945
- onChange: (e) => H((t) => ({
943
+ value: H.notes,
944
+ onChange: (e) => U((t) => ({
946
945
  ...t,
947
946
  notes: e.target.value
948
947
  })),
@@ -952,43 +951,43 @@ function P() {
952
951
  /* @__PURE__ */ g(C, { children: [/* @__PURE__ */ h(_, {
953
952
  type: "button",
954
953
  variant: "outline",
955
- onClick: () => R(!1),
956
- disabled: W,
954
+ onClick: () => z(!1),
955
+ disabled: G,
957
956
  children: "Cancel"
958
957
  }), /* @__PURE__ */ h(_, {
959
958
  type: "submit",
960
- disabled: W,
961
- children: W ? "Disposing…" : "Confirm disposal"
959
+ disabled: G,
960
+ children: G ? "Disposing…" : "Confirm disposal"
962
961
  })] })
963
962
  ]
964
963
  })] })
965
964
  }),
966
965
  /* @__PURE__ */ h(b, {
967
966
  open: et,
968
- onOpenChange: z,
967
+ onOpenChange: B,
969
968
  children: /* @__PURE__ */ g(x, { children: [/* @__PURE__ */ g(w, { children: [/* @__PURE__ */ h(T, { children: "Delete asset" }), /* @__PURE__ */ g(S, { children: [
970
969
  "This removes ",
971
970
  /* @__PURE__ */ h("span", {
972
971
  className: "font-medium",
973
- children: q.name
972
+ children: J.name
974
973
  }),
975
974
  " from the inventory. This action cannot be undone."
976
975
  ] })] }), /* @__PURE__ */ g(C, { children: [/* @__PURE__ */ h(_, {
977
976
  variant: "outline",
978
- onClick: () => z(!1),
979
- disabled: G,
977
+ onClick: () => B(!1),
978
+ disabled: K,
980
979
  children: "Cancel"
981
980
  }), /* @__PURE__ */ h(_, {
982
981
  variant: "destructive",
983
- onClick: () => void it({ variables: { id: q.id } }),
984
- disabled: G,
985
- children: G ? "Deleting…" : "Delete asset"
982
+ onClick: () => void it({ variables: { id: J.id } }),
983
+ disabled: K,
984
+ children: K ? "Deleting…" : "Delete asset"
986
985
  })] })] })
987
986
  })
988
987
  ]
989
988
  });
990
989
  }
991
- function F({ label: e, value: t, icon: n, mono: r, capitalize: i, full: a, children: o }) {
990
+ function N({ label: e, value: t, icon: n, mono: r, capitalize: i, full: a, children: o }) {
992
991
  return /* @__PURE__ */ g("div", {
993
992
  className: `rounded-lg border border-border-seam bg-bg-surface p-3.5 ${a ? "sm:col-span-2 xl:col-span-3" : ""}`,
994
993
  children: [/* @__PURE__ */ g("p", {
@@ -1003,7 +1002,7 @@ function F({ label: e, value: t, icon: n, mono: r, capitalize: i, full: a, child
1003
1002
  })]
1004
1003
  });
1005
1004
  }
1006
- function I({ label: e, value: t, striped: n }) {
1005
+ function P({ label: e, value: t, striped: n }) {
1007
1006
  return /* @__PURE__ */ g("div", {
1008
1007
  className: `flex items-center justify-between gap-4 px-3.5 py-2.5 ${n ? "bg-bg-sunken/40" : ""}`,
1009
1008
  children: [/* @__PURE__ */ h("dt", {
@@ -1016,6 +1015,6 @@ function I({ label: e, value: t, striped: n }) {
1016
1015
  });
1017
1016
  }
1018
1017
  //#endregion
1019
- export { P as AssetsAssetDetailPage };
1018
+ export { Ke as AssetsAssetDetailPage };
1020
1019
 
1021
1020
  //# sourceMappingURL=AssetsAssetDetailPage.js.map