@feedmepos/mf-inventory-portal 0.0.23-dev.9 → 0.0.24-dev.1

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 (140) hide show
  1. package/dist/App-D3sNH2MR.js +276 -0
  2. package/dist/{ApprovalView-e85YmdZN.js → ApprovalView-DHnRx0hJ.js} +17 -20
  3. package/dist/{BindingsDialog-giBUD0IH.js → BindingsDialog-oTeg2Dai.js} +6 -6
  4. package/dist/{BindingsPicker-CC4MmPbF.js → BindingsPicker-CWdjmMJ3.js} +8 -9
  5. package/dist/{BindingsTable-WphZdzrA.js → BindingsTable-bKLR1OKX.js} +18 -22
  6. package/dist/ClosingDraftView-CIQVz7lY.js +1225 -0
  7. package/dist/{ClosingTemplateView-1lzoDyet.js → ClosingTemplateView-D5pLzQwU.js} +259 -274
  8. package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-ClLDcchC.js +142 -0
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Cv-vvzr5.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B_c6Vn6P.js} +23 -24
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DIFQcrc0.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DhpHOaRH.js} +50 -51
  11. package/dist/{IngredientGroupView-UegBM_JK.js → IngredientGroupView-4C437mso.js} +63 -70
  12. package/dist/IngredientsView-DoiGgjre.js +1706 -0
  13. package/dist/{IntegrationView-FYNNzKia.js → IntegrationView-8ZKE7MAM.js} +123 -126
  14. package/dist/{InventoryBindingForm-DsHv_IHG.js → InventoryBindingForm-CcnfliYQ.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BURSXafS.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-B_J-6C9x.js} +116 -108
  16. package/dist/{InventoryBindingSummary-BLb4MRPZ.js → InventoryBindingSummary-CRdHCzNE.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BG78-DHs.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B2-TypU0.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CqID5_7v.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BuQde75S.js} +20 -21
  19. package/dist/PublishView-t5gjGmK_.js +192 -0
  20. package/dist/{PurchaseOrderPrintPreview-BBMU3teq.js → PurchaseOrderPrintPreview-6i53Y-v1.js} +13 -14
  21. package/dist/ReceiveRequestView-uOeSh0Mr.js +1866 -0
  22. package/dist/RecipeView-BTWywckD.js +609 -0
  23. package/dist/StockView-DN2xk8ei.js +1817 -0
  24. package/dist/{SupplierView-B2aObtwK.js → SupplierView-l0XUg3J4.js} +185 -196
  25. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CWMn6fFf.js +1327 -0
  26. package/dist/TransferTemplateView-wDKXpCWZ.js +1263 -0
  27. package/dist/UnitView-CUI-k-tS.js +648 -0
  28. package/dist/{WarehouseView-G8pej6Y2.js → WarehouseView-WsI_eG5r.js} +190 -197
  29. package/dist/api/adjustment-template.d.ts +25 -0
  30. package/dist/api/bill.d.ts +240 -84
  31. package/dist/api/inventory.d.ts +19 -6
  32. package/dist/api/netsuite.d.ts +3 -3
  33. package/dist/app-DntcWR3_.js +85558 -0
  34. package/dist/app.d.ts +85 -0
  35. package/dist/app.js +2 -2
  36. package/dist/components/FmCustomAttribute.vue.d.ts +23 -0
  37. package/dist/components/FmLockableField.vue.d.ts +37 -0
  38. package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
  39. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +3 -1
  40. package/dist/components/shell/inventory/binding-ui.vue.d.ts +3 -1
  41. package/dist/composable/defineDeepModel.d.ts +1 -1
  42. package/dist/{decimal-DC07xoJW.js → decimal-DTCTnMwO.js} +1 -1
  43. package/dist/format-unit-display-Hy48Iw5j.js +1215 -0
  44. package/dist/index-Bv9RYyTZ.js +29202 -0
  45. package/dist/{StockView-C5btudss.js → index-D4yJP9I2.js} +2220 -3863
  46. package/dist/layout/SingleColumnLayout.vue.d.ts +1 -0
  47. package/dist/router/name.d.ts +2 -0
  48. package/dist/stock-BsdmfT-b.js +125 -0
  49. package/dist/stores/feature.d.ts +41 -1
  50. package/dist/stores/integration/netsuite.d.ts +3 -2
  51. package/dist/stores/inventory.d.ts +20 -8
  52. package/dist/stores/location.d.ts +29 -1
  53. package/dist/stores/supplier.d.ts +1 -1
  54. package/dist/style.css +1 -1
  55. package/dist/supplier-CXhkgC4M.js +77 -0
  56. package/dist/tsconfig.app.tsbuildinfo +1 -1
  57. package/dist/{use-inventory-binding-dialog-B0G2XYSw.js → use-inventory-binding-dialog-DPMJmBCr.js} +10 -11
  58. package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +2 -0
  59. package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +18 -0
  60. package/dist/views/adjustment-template/import/export.d.ts +60 -0
  61. package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
  62. package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
  63. package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
  64. package/dist/views/adjustment-template/wastage-template/WastageTemplateReason.vue.d.ts +18 -0
  65. package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
  66. package/dist/views/adjustment-template/wastage-template/actions.d.ts +1377 -0
  67. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
  68. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
  69. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
  70. package/dist/views/adjustment-template/wastage-template/props.d.ts +36 -0
  71. package/dist/views/adjustment-template/wastage-template/table.d.ts +1351 -0
  72. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +198 -12
  73. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +7 -4
  74. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +1559 -467
  75. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +19 -0
  76. package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +4 -0
  77. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +2 -1
  78. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +72 -12
  79. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +73 -13
  80. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +6 -3
  81. package/dist/views/ingredients/components/convert/ConvertFormProps.d.ts +1 -0
  82. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -2
  83. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +1 -0
  84. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +2 -1
  85. package/dist/views/publish/PublishView.vue.d.ts +2 -0
  86. package/dist/views/receive-request/components/netsuite/NetSuiteInfo.vue.d.ts +12 -0
  87. package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +13 -0
  88. package/dist/views/receive-request/components/netsuite/NetSuiteSync.vue.d.ts +12 -0
  89. package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +13 -0
  90. package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
  91. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +86 -17
  92. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +4 -2
  93. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +2 -1
  94. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +126 -24
  95. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +126 -24
  96. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -0
  97. package/dist/views/stock/components/StockRecordCard.vue.d.ts +120 -42
  98. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +6 -4
  99. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  100. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +4 -0
  101. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +2 -1
  102. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +72 -12
  103. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +72 -12
  104. package/dist/views/transfer-template/helpers/import-export.helper.d.ts +2 -1
  105. package/dist/vue-i18n-ByVzHsI7.js +2365 -0
  106. package/package.json +5 -4
  107. package/dist/App-ByLgARNp.js +0 -259
  108. package/dist/ClosingDraftView-CQM1Sx45.js +0 -755
  109. package/dist/FmDroppableField-8RzKjEdL.js +0 -154
  110. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BvkN-71q.js +0 -436
  111. package/dist/FmMultiselectDialog-DScMA6iG.js +0 -415
  112. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-t4pim_k9.js +0 -51
  113. package/dist/IngredientsView-BfW-jZLM.js +0 -1666
  114. package/dist/ReceiveRequestView-vbANEzne.js +0 -4165
  115. package/dist/RecipeView-DW4DY0C0.js +0 -598
  116. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
  117. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-B2LOvVef.js +0 -1229
  118. package/dist/TransferTemplateView-BKumN_p6.js +0 -1262
  119. package/dist/UnitView-CHLucv9s.js +0 -648
  120. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  121. package/dist/app-BXjk74IB.js +0 -33538
  122. package/dist/date2-CWAt9bRf.js +0 -117
  123. package/dist/dayjs.min-D3jPOnu6.js +0 -282
  124. package/dist/defineDeepModel-CiD4GtOw.js +0 -13
  125. package/dist/feature-6tcLMotY.js +0 -92
  126. package/dist/form-mode.enum-BKiNVH6A.js +0 -4
  127. package/dist/format-time-from-id-CYU5Z9Mt.js +0 -15
  128. package/dist/format-unit-display-CY-0bznr.js +0 -1217
  129. package/dist/fuzzy-BMkhNYLR.js +0 -41
  130. package/dist/index-BXwQa14X.js +0 -45
  131. package/dist/index-CRLd5xyg.js +0 -22283
  132. package/dist/index-DqwAtOgI.js +0 -12087
  133. package/dist/netsuite-fYUUk_ss.js +0 -225
  134. package/dist/row-action.enum-7rGLGZ5v.js +0 -55
  135. package/dist/rules-BmRGm3yv.js +0 -203
  136. package/dist/stock-CEX0DP2B.js +0 -111
  137. package/dist/supplier-CdJmZr7w.js +0 -77
  138. package/dist/use-template-enabled-locations-2-xbPJWHCs.js +0 -86
  139. package/dist/xlsx-CTOKp7SQ.js +0 -24004
  140. package/dist/xlsx.util-D5NFSfDg.js +0 -78
@@ -1,36 +1,29 @@
1
- import { ref as W, defineComponent as I, watch as ee, onMounted as te, onUnmounted as Fe, openBlock as S, createElementBlock as q, toRaw as be, reactive as xe, createElementVNode as g, toDisplayString as U, unref as c, createVNode as V, resolveComponent as L, createSlots as $e, withCtx as N, createTextVNode as We, renderSlot as De, createBlock as z, createCommentVNode as Ae, computed as F, isRef as we, normalizeClass as Se, normalizeStyle as Re } from "vue";
2
- import { k as Pe, t as Te, v as Ue, c as O, u as Ee } from "./app-BXjk74IB.js";
3
- import { useCoreStore as Le, useI18n as j } from "@feedmepos/mf-common";
4
- import { D as Ve, R as J } from "./row-action.enum-7rGLGZ5v.js";
5
- import { c as Ne, _ as Be, F as Q } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
6
- import { u as qe, _ as ze, a as Ie } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BvkN-71q.js";
7
- import { F as T } from "./form-mode.enum-BKiNVH6A.js";
8
- import { useDialogChild as je, useDialog as Me, useSnackbar as ae, useProxiedModel as oe, useBreakpoints as Oe } from "@feedmepos/ui-library";
9
- import { R as E } from "./rules-BmRGm3yv.js";
1
+ import { ref as W, defineComponent as I, watch as ee, onMounted as ae, onUnmounted as xe, openBlock as S, createElementBlock as q, toRaw as be, reactive as Fe, createElementVNode as g, toDisplayString as U, unref as c, createVNode as V, resolveComponent as L, createSlots as $e, withCtx as N, createTextVNode as We, renderSlot as De, createBlock as z, createCommentVNode as Ae, computed as x, isRef as we, normalizeClass as Se, normalizeStyle as Pe } from "vue";
2
+ import { X as Re, al as Te, am as Ue, h as Ee, D as Ve, i as Z, f as G, an as Le, ad as Ne, m as E, e as T, u as Be, z as qe, _ as ze, B as Ie, E as je, G as J } from "./app-DntcWR3_.js";
3
+ import { useCoreStore as Ge, useI18n as j } from "@feedmepos/mf-common";
4
+ import { useDialogChild as Oe, useDialog as Me, useSnackbar as te, useProxiedModel as oe, useBreakpoints as Ke } from "@feedmepos/ui-library";
10
5
  import { c as le, u as se } from "./googlemap-Dm8ERVai.js";
11
- import { d as Ge } from "./index-BXwQa14X.js";
12
- import { _ as Ke } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
- const X = Pe((m, h) => {
14
- const y = Le();
6
+ const Q = Re((m, h) => {
7
+ const y = Ge();
15
8
  return {
16
9
  async readWarehouses() {
17
10
  var l;
18
- const a = ((l = y.currentBusiness.value) == null ? void 0 : l._id) ?? "", n = `${m.inventoryBackendUrl}/businesses/${a}/warehouses`;
11
+ const t = ((l = y.currentBusiness.value) == null ? void 0 : l._id) ?? "", n = `${m.inventoryBackendUrl}/businesses/${t}/warehouses`;
19
12
  return await h.get(n);
20
13
  },
21
- async createWarehouse(a) {
14
+ async createWarehouse(t) {
22
15
  var p;
23
16
  const n = ((p = y.currentBusiness.value) == null ? void 0 : p._id) ?? "", l = `${m.inventoryBackendUrl}/businesses/${n}/warehouse`;
24
- return await h.post(l, a);
17
+ return await h.post(l, t);
25
18
  },
26
- async updateWarehouse(a, n) {
19
+ async updateWarehouse(t, n) {
27
20
  var s;
28
- const l = ((s = y.currentBusiness.value) == null ? void 0 : s._id) ?? "", p = `${m.inventoryBackendUrl}/businesses/${l}/warehouse/${a}`;
21
+ const l = ((s = y.currentBusiness.value) == null ? void 0 : s._id) ?? "", p = `${m.inventoryBackendUrl}/businesses/${l}/warehouse/${t}`;
29
22
  return await h.put(p, n);
30
23
  },
31
- async deleteWarehouse(a) {
24
+ async deleteWarehouse(t) {
32
25
  var p;
33
- const n = ((p = y.currentBusiness.value) == null ? void 0 : p._id) ?? "", l = `${m.inventoryBackendUrl}/businesses/${n}/warehouse/${a}`;
26
+ const n = ((p = y.currentBusiness.value) == null ? void 0 : p._id) ?? "", l = `${m.inventoryBackendUrl}/businesses/${n}/warehouse/${t}`;
34
27
  return await h.delete(l);
35
28
  }
36
29
  };
@@ -52,17 +45,17 @@ function Ce() {
52
45
  },
53
46
  // actions
54
47
  async readWarehouses() {
55
- const m = X();
48
+ const m = Q();
56
49
  this.warehouses = await m.readWarehouses();
57
50
  },
58
51
  async createWarehouse(m) {
59
- await X().createWarehouse(m);
52
+ await Q().createWarehouse(m);
60
53
  },
61
54
  async updateWarehouse(m) {
62
- await X().updateWarehouse(m._id, m.profile);
55
+ await Q().updateWarehouse(m._id, m.profile);
63
56
  },
64
57
  async deleteWarehouse(m) {
65
- await X().deleteWarehouse(m._id);
58
+ await Q().deleteWarehouse(m._id);
66
59
  },
67
60
  async init() {
68
61
  const m = Te();
@@ -74,44 +67,44 @@ function Ce() {
74
67
  }
75
68
  };
76
69
  }
77
- function Ze(m, h) {
70
+ function Xe(m, h) {
78
71
  function y(p, s) {
79
- if (p === J.Edit) {
80
- m(O(s));
72
+ if (p === Z.Edit) {
73
+ m(G(s));
81
74
  return;
82
75
  }
83
- if (p === J.Delete) {
84
- h(O(s));
76
+ if (p === Z.Delete) {
77
+ h(G(s));
85
78
  return;
86
79
  }
87
80
  }
88
- const { t: a } = j(), n = [
81
+ const { t } = j(), n = [
89
82
  {
90
83
  accessorKey: "warehouse",
91
- header: () => a("inventory.warehouse.table.warehouse"),
84
+ header: () => t("inventory.warehouse.table.warehouse"),
92
85
  size: 200
93
86
  },
94
87
  {
95
88
  accessorKey: "contact",
96
- header: () => a("inventory.warehouse.table.contact"),
89
+ header: () => t("inventory.warehouse.table.contact"),
97
90
  size: 200
98
91
  },
99
92
  {
100
93
  accessorKey: "email",
101
- header: () => a("inventory.warehouse.table.email"),
94
+ header: () => t("inventory.warehouse.table.email"),
102
95
  size: 200
103
96
  },
104
97
  {
105
98
  accessorKey: "address",
106
- header: () => a("inventory.warehouse.table.address"),
99
+ header: () => t("inventory.warehouse.table.address"),
107
100
  size: "auto"
108
101
  },
109
102
  {
110
103
  id: "action",
111
104
  header: "",
112
105
  cell(p) {
113
- return Ne(
114
- [Ve[J.Edit], Ve[J.Delete]],
106
+ return Ee(
107
+ [Ve[Z.Edit], Ve[Z.Delete]],
115
108
  (s) => {
116
109
  y(s, p.row.original.original);
117
110
  }
@@ -146,7 +139,7 @@ function Ze(m, h) {
146
139
  }
147
140
  return { columnDefs: n, formatRowData: l };
148
141
  }
149
- const Je = /* @__PURE__ */ I({
142
+ const Ze = /* @__PURE__ */ I({
150
143
  __name: "GoogleMap",
151
144
  props: {
152
145
  markers: {
@@ -172,7 +165,7 @@ const Je = /* @__PURE__ */ I({
172
165
  },
173
166
  emits: ["map-click", "marker-change", "polygon-change", "polygon-right-click"],
174
167
  setup(m, { expose: h, emit: y }) {
175
- const a = m, n = y;
168
+ const t = m, n = y;
176
169
  h({
177
170
  setCenter: (r) => {
178
171
  var f, b;
@@ -187,25 +180,25 @@ const Je = /* @__PURE__ */ I({
187
180
  };
188
181
  }
189
182
  function v(r, f, b) {
190
- const x = l.maps.event.addListener(r, f, b);
191
- u.push(x);
183
+ const F = l.maps.event.addListener(r, f, b);
184
+ u.push(F);
192
185
  }
193
186
  const M = W([]);
194
187
  function $(r, f, b) {
195
188
  v(r, f, b);
196
189
  }
197
190
  function C(r) {
198
- R(null), M.value = r.map((f, b) => {
199
- const x = new l.maps.Marker({
191
+ P(null), M.value = r.map((f, b) => {
192
+ const F = new l.maps.Marker({
200
193
  position: f,
201
194
  draggable: !0
202
195
  });
203
- return $(x, "dragend", (D) => {
196
+ return $(F, "dragend", (D) => {
204
197
  n("marker-change", { index: b, position: _(D) });
205
- }), x;
206
- }), R(s.value);
198
+ }), F;
199
+ }), P(s.value);
207
200
  }
208
- function R(r) {
201
+ function P(r) {
209
202
  M.value.map((f) => be(f).setMap(r));
210
203
  }
211
204
  const i = W([]);
@@ -216,34 +209,34 @@ const Je = /* @__PURE__ */ I({
216
209
  v(r, f, b);
217
210
  }
218
211
  function o(r) {
219
- return i.value[r].getPath().getArray().map(({ lat: b, lng: x }) => ({
212
+ return i.value[r].getPath().getArray().map(({ lat: b, lng: F }) => ({
220
213
  lat: b(),
221
- lng: x()
214
+ lng: F()
222
215
  }));
223
216
  }
224
217
  function e(r) {
225
218
  const f = o(r);
226
219
  n("polygon-change", { index: r, path: f });
227
220
  }
228
- function t(r, f) {
229
- const x = o(r).filter((D, G) => G !== f);
230
- n("polygon-change", { index: r, path: x });
221
+ function a(r, f) {
222
+ const F = o(r).filter((D, O) => O !== f);
223
+ n("polygon-change", { index: r, path: F });
231
224
  }
232
225
  function B(r, f) {
233
- f.vertex !== void 0 ? t(r, f.vertex) : n("polygon-right-click", r);
226
+ f.vertex !== void 0 ? a(r, f.vertex) : n("polygon-right-click", r);
234
227
  }
235
228
  function w(r) {
236
229
  d(null), i.value = r.map((f, b) => {
237
- const x = new l.maps.Polygon({
230
+ const F = new l.maps.Polygon({
238
231
  paths: f.paths,
239
232
  strokeColor: f.strokeColor,
240
233
  fillColor: f.fillColor,
241
234
  fillOpacity: 0.5,
242
- editable: a.editable
235
+ editable: t.editable
243
236
  });
244
- return k(x, "contextmenu", (D) => B(b, D)), x.getPaths().forEach((D) => {
237
+ return k(F, "contextmenu", (D) => B(b, D)), F.getPaths().forEach((D) => {
245
238
  A(D, "insert_at", () => e(b)), A(D, "set_at", () => e(b));
246
- }), x;
239
+ }), F;
247
240
  }), d(s.value);
248
241
  }
249
242
  function d(r) {
@@ -252,19 +245,19 @@ const Je = /* @__PURE__ */ I({
252
245
  function Y(r, f, b) {
253
246
  v(r, f, b);
254
247
  }
255
- function P() {
248
+ function R() {
256
249
  s.value = new l.maps.Map(p.value, {
257
- center: a.center,
258
- zoom: a.zoom,
250
+ center: t.center,
251
+ zoom: t.zoom,
259
252
  mapTypeControl: !1,
260
253
  streetViewControl: !1,
261
254
  draggable: !0,
262
255
  scrollwheel: !0
263
256
  }), Y(s.value, "click", (r) => n("map-click", _(r)));
264
257
  }
265
- return ee(() => a.markers, C, { deep: !0 }), ee(() => a.polygons, w, { deep: !0 }), te(() => {
266
- !p.value || !l || (P(), C(a.markers), w(a.polygons));
267
- }), Fe(() => {
258
+ return ee(() => t.markers, C, { deep: !0 }), ee(() => t.polygons, w, { deep: !0 }), ae(() => {
259
+ !p.value || !l || (R(), C(t.markers), w(t.polygons));
260
+ }), xe(() => {
268
261
  u.forEach((r) => r.remove());
269
262
  }), (r, f) => (S(), q("div", {
270
263
  ref_key: "mapRef",
@@ -272,7 +265,7 @@ const Je = /* @__PURE__ */ I({
272
265
  class: "map app-map"
273
266
  }, null, 512));
274
267
  }
275
- }), Qe = { class: "flex flex-col gap-24" }, Xe = { class: "flex flex-col gap-8" }, Ye = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, eo = { class: "fm-typo-en-body-lg-600" }, oo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, to = { class: "fm-typo-en-body-lg-600" }, ao = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, lo = { class: "fm-typo-en-body-lg-600" }, so = /* @__PURE__ */ I({
268
+ }), Je = { class: "flex flex-col gap-24" }, Qe = { class: "flex flex-col gap-8" }, Ye = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, eo = { class: "fm-typo-en-body-lg-600" }, oo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ao = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, lo = { class: "fm-typo-en-body-lg-600" }, so = /* @__PURE__ */ I({
276
269
  __name: "CoordinateDialog",
277
270
  props: {
278
271
  address: {
@@ -285,37 +278,37 @@ const Je = /* @__PURE__ */ I({
285
278
  }
286
279
  },
287
280
  setup(m) {
288
- const h = m, y = je(), a = se(), { t: n } = j(), l = xe(
289
- O(h.coordinate ? h.coordinate : le.jb)
290
- ), p = W(""), s = Ge(async function() {
291
- p.value = await a.getFirstMatchingAddress(
281
+ const h = m, y = Oe(), t = se(), { t: n } = j(), l = Fe(
282
+ G(h.coordinate ? h.coordinate : le.jb)
283
+ ), p = W(""), s = Le(async function() {
284
+ p.value = await t.getFirstMatchingAddress(
292
285
  l.lat,
293
286
  l.lng
294
287
  );
295
288
  }, 1e3);
296
- te(() => {
297
- y.emitData(O(l)), s();
289
+ ae(() => {
290
+ y.emitData(G(l)), s();
298
291
  });
299
292
  function u({ position: v }) {
300
- l.lat = v.lat, l.lng = v.lng, y.emitData(O(l)), s();
293
+ l.lat = v.lat, l.lng = v.lng, y.emitData(G(l)), s();
301
294
  }
302
295
  const _ = W();
303
- return (v, M) => (S(), q("div", Qe, [
304
- g("div", Xe, [
296
+ return (v, M) => (S(), q("div", Je, [
297
+ g("div", Qe, [
305
298
  g("div", null, [
306
299
  g("span", Ye, U(c(n)("inventory.formField.coordinate.address")) + ": ", 1),
307
300
  g("span", eo, U(p.value), 1)
308
301
  ]),
309
302
  g("div", null, [
310
303
  g("span", oo, U(c(n)("inventory.formField.coordinate.longitude")) + ": ", 1),
311
- g("span", to, U(l.lng), 1)
304
+ g("span", ao, U(l.lng), 1)
312
305
  ]),
313
306
  g("div", null, [
314
- g("span", ao, U(c(n)("inventory.formField.coordinate.latitude")) + ": ", 1),
307
+ g("span", to, U(c(n)("inventory.formField.coordinate.latitude")) + ": ", 1),
315
308
  g("span", lo, U(l.lat), 1)
316
309
  ])
317
310
  ]),
318
- V(Je, {
311
+ V(Ze, {
319
312
  ref_key: "gmapRef",
320
313
  ref: _,
321
314
  class: "h-[272px] sm:h-[240px] xs:h-[240px]",
@@ -327,7 +320,7 @@ const Je = /* @__PURE__ */ I({
327
320
  }, null, 8, ["center", "markers"])
328
321
  ]));
329
322
  }
330
- }), ro = /* @__PURE__ */ Ke(so, [["__scopeId", "data-v-272f5e8b"]]);
323
+ }), ro = /* @__PURE__ */ Ne(so, [["__scopeId", "data-v-272f5e8b"]]);
331
324
  function ke([m, h]) {
332
325
  return {
333
326
  lat: h,
@@ -354,20 +347,20 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
354
347
  },
355
348
  emits: ["update:modelValue"],
356
349
  setup(m, { emit: h }) {
357
- const y = m, a = h, n = se(), l = Me(), p = ae(), s = oe(y, "modelValue"), u = W(!1), { t: _ } = j();
350
+ const y = m, t = h, n = se(), l = Me(), p = te(), s = oe(y, "modelValue"), u = W(!1), { t: _ } = j();
358
351
  function v(i) {
359
352
  if (i != null && i[0] && (i != null && i[1]))
360
353
  return _("inventory.formField.coordinate.longLat", [i[0].toFixed(3), i[1].toFixed(3)]);
361
354
  }
362
355
  async function M(i) {
363
- var e, t;
356
+ var e, a;
364
357
  const k = y.modelValue, A = !k && ((e = y.address) != null && e.formatted) ? await n.getFirstMatchingCoordinate(y.address.formatted) : null, o = k ? ke(k) : A ? ke(A) : le.jb;
365
358
  l.open({
366
359
  title: y.dialogTitle ?? y.label ?? _("inventory.formField.coordinate.pinLocation"),
367
360
  closeButton: !0,
368
361
  contentComponent: ro,
369
362
  contentComponentProps: {
370
- address: (t = y.address) == null ? void 0 : t.formatted,
363
+ address: (a = y.address) == null ? void 0 : a.formatted,
371
364
  coordinate: o
372
365
  },
373
366
  primaryActions: {
@@ -380,7 +373,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
380
373
  }
381
374
  }).onPrimary(i);
382
375
  }
383
- const $ = (i) => a("update:modelValue", i ? no(i) : null);
376
+ const $ = (i) => t("update:modelValue", i ? no(i) : null);
384
377
  async function C() {
385
378
  if (!y.disabled) {
386
379
  if (!n.isGoogleMapReady) {
@@ -394,8 +387,8 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
394
387
  M($);
395
388
  }
396
389
  }
397
- function R() {
398
- a("update:modelValue", null);
390
+ function P() {
391
+ t("update:modelValue", null);
399
392
  }
400
393
  return (i, k) => {
401
394
  const A = L("FmField"), o = L("FmButton"), e = L("FmFormGroup");
@@ -412,12 +405,12 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
412
405
  focused: u.value,
413
406
  "helper-text": i.helperText,
414
407
  "helper-state": i.helperState,
415
- onClick: k[0] || (k[0] = (t) => C())
408
+ onClick: k[0] || (k[0] = (a) => C())
416
409
  }, $e({
417
- default: N(({ invalid: t }) => [
410
+ default: N(({ invalid: a }) => [
418
411
  i.modelValue && i.modelValue[0] && i.modelValue[1] ? (S(), q("div", io, [
419
412
  V(A, {
420
- invalid: t,
413
+ invalid: a,
421
414
  class: "fm-typo-en-body-lg-400"
422
415
  }, {
423
416
  default: N(() => [
@@ -447,7 +440,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
447
440
  key: 0,
448
441
  "prepend-icon": "delete",
449
442
  variant: "tertiary",
450
- onClick: k[1] || (k[1] = (t) => R())
443
+ onClick: k[1] || (k[1] = (a) => P())
451
444
  })) : Ae("", !0)
452
445
  ]);
453
446
  };
@@ -460,110 +453,110 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
460
453
  },
461
454
  emits: ["update:modelValue", "validation-success"],
462
455
  setup(m, { expose: h, emit: y }) {
463
- const a = m, n = y, { t: l } = j(), p = F({
456
+ const t = m, n = y, { t: l } = j(), p = x({
464
457
  get() {
465
458
  var o, e;
466
- return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.name) ?? "";
459
+ return ((e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.name) ?? "";
467
460
  },
468
461
  set(o) {
469
- const e = a.modelValue ?? {};
462
+ const e = t.modelValue ?? {};
470
463
  e.profile ?? (e.profile = {}), e.profile.name = o, n("update:modelValue", e);
471
464
  }
472
- }), s = F({
465
+ }), s = x({
473
466
  get() {
474
467
  var o, e;
475
- return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.regNo) ?? "";
468
+ return ((e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.regNo) ?? "";
476
469
  },
477
470
  set(o) {
478
- const e = a.modelValue ?? {};
471
+ const e = t.modelValue ?? {};
479
472
  e.profile ?? (e.profile = {}), e.profile.regNo = o, n("update:modelValue", e);
480
473
  }
481
- }), u = F({
474
+ }), u = x({
482
475
  get() {
483
- var o, e, t;
484
- return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.line1) ?? "";
476
+ var o, e, a;
477
+ return ((a = (e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : a.line1) ?? "";
485
478
  },
486
479
  set(o) {
487
- var t;
488
- const e = a.modelValue ?? {};
489
- e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.line1 = o, n("update:modelValue", e);
480
+ var a;
481
+ const e = t.modelValue ?? {};
482
+ e.profile ?? (e.profile = {}), (a = e.profile).address ?? (a.address = {}), e.profile.address.line1 = o, n("update:modelValue", e);
490
483
  }
491
- }), _ = F({
484
+ }), _ = x({
492
485
  get() {
493
- var o, e, t;
494
- return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.line2) ?? "";
486
+ var o, e, a;
487
+ return ((a = (e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : a.line2) ?? "";
495
488
  },
496
489
  set(o) {
497
- var t;
498
- const e = a.modelValue ?? {};
499
- e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.line2 = o, n("update:modelValue", e);
490
+ var a;
491
+ const e = t.modelValue ?? {};
492
+ e.profile ?? (e.profile = {}), (a = e.profile).address ?? (a.address = {}), e.profile.address.line2 = o, n("update:modelValue", e);
500
493
  }
501
- }), v = F({
494
+ }), v = x({
502
495
  get() {
503
- var o, e, t;
504
- return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.city) ?? "";
496
+ var o, e, a;
497
+ return ((a = (e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : a.city) ?? "";
505
498
  },
506
499
  set(o) {
507
- var t;
508
- const e = a.modelValue ?? {};
509
- e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.city = o, n("update:modelValue", e);
500
+ var a;
501
+ const e = t.modelValue ?? {};
502
+ e.profile ?? (e.profile = {}), (a = e.profile).address ?? (a.address = {}), e.profile.address.city = o, n("update:modelValue", e);
510
503
  }
511
- }), M = F({
504
+ }), M = x({
512
505
  get() {
513
- var o, e, t;
514
- return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.postcode) ?? "";
506
+ var o, e, a;
507
+ return ((a = (e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : a.postcode) ?? "";
515
508
  },
516
509
  set(o) {
517
- var t;
518
- const e = a.modelValue ?? {};
519
- e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.postcode = o, n("update:modelValue", e);
510
+ var a;
511
+ const e = t.modelValue ?? {};
512
+ e.profile ?? (e.profile = {}), (a = e.profile).address ?? (a.address = {}), e.profile.address.postcode = o, n("update:modelValue", e);
520
513
  }
521
- }), $ = F({
514
+ }), $ = x({
522
515
  get() {
523
- var o, e, t;
524
- return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.state) ?? "";
516
+ var o, e, a;
517
+ return ((a = (e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : a.state) ?? "";
525
518
  },
526
519
  set(o) {
527
- var t;
528
- const e = a.modelValue ?? {};
529
- e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.state = o, n("update:modelValue", e);
520
+ var a;
521
+ const e = t.modelValue ?? {};
522
+ e.profile ?? (e.profile = {}), (a = e.profile).address ?? (a.address = {}), e.profile.address.state = o, n("update:modelValue", e);
530
523
  }
531
- }), C = F({
524
+ }), C = x({
532
525
  get() {
533
- var o, e, t;
534
- return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.country) ?? "";
526
+ var o, e, a;
527
+ return ((a = (e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : a.country) ?? "";
535
528
  },
536
529
  set(o) {
537
- var t;
538
- const e = a.modelValue ?? {};
539
- e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.country = o, n("update:modelValue", e);
530
+ var a;
531
+ const e = t.modelValue ?? {};
532
+ e.profile ?? (e.profile = {}), (a = e.profile).address ?? (a.address = {}), e.profile.address.country = o, n("update:modelValue", e);
540
533
  }
541
- }), R = F({
534
+ }), P = x({
542
535
  get() {
543
- var o, e, t;
544
- return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.coordinates) ?? null;
536
+ var o, e, a;
537
+ return ((a = (e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : a.coordinates) ?? null;
545
538
  },
546
539
  set(o) {
547
- var t;
548
- const e = a.modelValue ?? {};
549
- e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.coordinates = o, n("update:modelValue", e);
540
+ var a;
541
+ const e = t.modelValue ?? {};
542
+ e.profile ?? (e.profile = {}), (a = e.profile).address ?? (a.address = {}), e.profile.address.coordinates = o, n("update:modelValue", e);
550
543
  }
551
- }), i = F({
544
+ }), i = x({
552
545
  get() {
553
546
  var o, e;
554
- return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.phoneNo) ?? "";
547
+ return ((e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.phoneNo) ?? "";
555
548
  },
556
549
  set(o) {
557
- const e = a.modelValue ?? {};
550
+ const e = t.modelValue ?? {};
558
551
  e.profile ?? (e.profile = {}), e.profile.phoneNo = o, n("update:modelValue", e);
559
552
  }
560
- }), k = F({
553
+ }), k = x({
561
554
  get() {
562
555
  var o, e;
563
- return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.email) ?? "";
556
+ return ((e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.email) ?? "";
564
557
  },
565
558
  set(o) {
566
- const e = a.modelValue ?? {};
559
+ const e = t.modelValue ?? {};
567
560
  e.profile ?? (e.profile = {}), e.profile.email = o, n("update:modelValue", e);
568
561
  }
569
562
  }), A = W();
@@ -581,7 +574,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
581
574
  (e = (o = A.value) == null ? void 0 : o.resetInputs) == null || e.call(o);
582
575
  }
583
576
  }), (o, e) => {
584
- const t = L("FmTextField"), B = L("FmPhoneNumber"), w = L("FmForm");
577
+ const a = L("FmTextField"), B = L("FmPhoneNumber"), w = L("FmForm");
585
578
  return S(), z(w, {
586
579
  ref_key: "formRef",
587
580
  ref: A,
@@ -590,7 +583,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
590
583
  default: N(() => [
591
584
  g("div", mo, [
592
585
  g("div", fo, [
593
- V(t, {
586
+ V(a, {
594
587
  disabled: o.disabled,
595
588
  rules: [c(E)()],
596
589
  "label-mark": "required",
@@ -598,7 +591,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
598
591
  modelValue: p.value,
599
592
  "onUpdate:modelValue": e[0] || (e[0] = (d) => p.value = d)
600
593
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
601
- V(t, {
594
+ V(a, {
602
595
  disabled: o.disabled,
603
596
  rules: [c(E)()],
604
597
  "label-mark": "required",
@@ -610,7 +603,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
610
603
  g("div", ho, [
611
604
  g("div", yo, U(c(l)("inventory.warehouse.address.title")), 1),
612
605
  g("div", vo, [
613
- V(t, {
606
+ V(a, {
614
607
  disabled: o.disabled,
615
608
  rules: [c(E)()],
616
609
  "label-mark": "required",
@@ -618,14 +611,14 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
618
611
  modelValue: u.value,
619
612
  "onUpdate:modelValue": e[2] || (e[2] = (d) => u.value = d)
620
613
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
621
- V(t, {
614
+ V(a, {
622
615
  disabled: o.disabled,
623
616
  "label-mark": "optional",
624
617
  label: c(l)("inventory.warehouse.address.line2"),
625
618
  modelValue: _.value,
626
619
  "onUpdate:modelValue": e[3] || (e[3] = (d) => _.value = d)
627
620
  }, null, 8, ["disabled", "label", "modelValue"]),
628
- V(t, {
621
+ V(a, {
629
622
  disabled: o.disabled,
630
623
  rules: [c(E)()],
631
624
  "label-mark": "required",
@@ -633,7 +626,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
633
626
  modelValue: v.value,
634
627
  "onUpdate:modelValue": e[4] || (e[4] = (d) => v.value = d)
635
628
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
636
- V(t, {
629
+ V(a, {
637
630
  disabled: o.disabled,
638
631
  rules: [c(E)()],
639
632
  "label-mark": "required",
@@ -641,7 +634,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
641
634
  modelValue: M.value,
642
635
  "onUpdate:modelValue": e[5] || (e[5] = (d) => M.value = d)
643
636
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
644
- V(t, {
637
+ V(a, {
645
638
  disabled: o.disabled,
646
639
  rules: [c(E)()],
647
640
  "label-mark": "required",
@@ -649,7 +642,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
649
642
  modelValue: $.value,
650
643
  "onUpdate:modelValue": e[6] || (e[6] = (d) => $.value = d)
651
644
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
652
- V(t, {
645
+ V(a, {
653
646
  disabled: o.disabled,
654
647
  rules: [c(E)()],
655
648
  "label-mark": "required",
@@ -665,8 +658,8 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
665
658
  disabled: o.disabled,
666
659
  rules: [c(E)()],
667
660
  "label-mark": "required",
668
- modelValue: R.value,
669
- "onUpdate:modelValue": e[8] || (e[8] = (d) => R.value = d)
661
+ modelValue: P.value,
662
+ "onUpdate:modelValue": e[8] || (e[8] = (d) => P.value = d)
670
663
  }, null, 8, ["disabled", "rules", "modelValue"])
671
664
  ]),
672
665
  g("div", wo, [
@@ -680,7 +673,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
680
673
  modelValue: i.value,
681
674
  "onUpdate:modelValue": e[9] || (e[9] = (d) => i.value = d)
682
675
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
683
- V(t, {
676
+ V(a, {
684
677
  disabled: o.disabled,
685
678
  "label-mark": "optional",
686
679
  label: c(l)("inventory.warehouse.contact.email"),
@@ -704,8 +697,8 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
704
697
  },
705
698
  emits: ["update:show", "submitted"],
706
699
  setup(m, { expose: h, emit: y }) {
707
- const a = m, n = y, l = W(!1), p = ae(), { t: s } = j(), u = Ce(), _ = F(() => {
708
- switch (a.mode) {
700
+ const t = m, n = y, l = W(!1), p = te(), { t: s } = j(), u = Ce(), _ = x(() => {
701
+ switch (t.mode) {
709
702
  case T.READ:
710
703
  return "";
711
704
  case T.UPDATE:
@@ -714,8 +707,8 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
714
707
  return s("inventory.warehouse.create.title");
715
708
  }
716
709
  return "";
717
- }), v = F(() => {
718
- switch (a.mode) {
710
+ }), v = x(() => {
711
+ switch (t.mode) {
719
712
  case T.READ:
720
713
  return "";
721
714
  case T.UPDATE:
@@ -739,13 +732,13 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
739
732
  (e = (o = M.value) == null ? void 0 : o.resetInputs) == null || e.call(o);
740
733
  }
741
734
  });
742
- const $ = oe(a, "show"), C = oe(a, "warehouse");
743
- function R() {
735
+ const $ = oe(t, "show"), C = oe(t, "warehouse");
736
+ function P() {
744
737
  var o, e;
745
738
  (e = (o = M.value) == null ? void 0 : o.validateInputs) == null || e.call(o);
746
739
  }
747
740
  function i() {
748
- switch (a.mode) {
741
+ switch (t.mode) {
749
742
  case T.READ:
750
743
  return;
751
744
  case T.UPDATE:
@@ -760,18 +753,18 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
760
753
  try {
761
754
  await Promise.all([
762
755
  u.createWarehouse(C.value),
763
- new Promise((t) => setTimeout(t, 1e3))
756
+ new Promise((a) => setTimeout(a, 1e3))
764
757
  ]), p.open({
765
758
  title: s("inventory.common.success"),
766
759
  message: s("inventory.warehouse.create.success", { name: (e = (o = C.value) == null ? void 0 : o.profile) == null ? void 0 : e.name }),
767
760
  type: "success"
768
761
  }), n("update:show", !1), n("submitted");
769
- } catch (t) {
762
+ } catch (a) {
770
763
  p.open({
771
764
  title: s("inventory.warehouse.create.error.title"),
772
765
  message: s("inventory.warehouse.create.error.message"),
773
766
  type: "error"
774
- }), console.error("cannot create warehouse", t);
767
+ }), console.error("cannot create warehouse", a);
775
768
  } finally {
776
769
  l.value = !1;
777
770
  }
@@ -790,24 +783,24 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
790
783
  try {
791
784
  await Promise.all([
792
785
  u.updateWarehouse(C.value),
793
- new Promise((t) => setTimeout(t, 1e3))
786
+ new Promise((a) => setTimeout(a, 1e3))
794
787
  ]), p.open({
795
788
  title: s("inventory.common.success"),
796
789
  message: s("inventory.warehouse.update.success", { name: (e = (o = C.value) == null ? void 0 : o.profile) == null ? void 0 : e.name }),
797
790
  type: "success"
798
791
  }), n("update:show", !1), n("submitted");
799
- } catch (t) {
792
+ } catch (a) {
800
793
  p.open({
801
794
  title: s("inventory.warehouse.update.error.title"),
802
795
  message: s("inventory.warehouse.update.error.message"),
803
796
  type: "error"
804
- }), console.error("cannot update warehouse", t);
797
+ }), console.error("cannot update warehouse", a);
805
798
  } finally {
806
799
  l.value = !1;
807
800
  }
808
801
  }
809
802
  return (o, e) => {
810
- const t = L("FmButton"), B = L("FmSideSheet");
803
+ const a = L("FmButton"), B = L("FmSideSheet");
811
804
  return S(), z(B, {
812
805
  header: _.value,
813
806
  modelValue: c($),
@@ -833,10 +826,10 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
833
826
  }),
834
827
  "side-sheet-footer": N(() => [
835
828
  g("div", Ao, [
836
- V(t, {
829
+ V(a, {
837
830
  loading: l.value,
838
831
  label: v.value,
839
- onClick: R
832
+ onClick: P
840
833
  }, null, 8, ["loading", "label"])
841
834
  ])
842
835
  ]),
@@ -844,14 +837,14 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
844
837
  }, 8, ["header", "modelValue", "dismiss-away"]);
845
838
  };
846
839
  }
847
- }), Co = { class: "flex flex-col py-8" }, Fo = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, xo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $o = {
840
+ }), Co = { class: "flex flex-col py-8" }, xo = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Fo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $o = {
848
841
  key: 0,
849
842
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
850
- }, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary line-clamp-3" }, Io = /* @__PURE__ */ I({
843
+ }, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary line-clamp-3" }, Uo = /* @__PURE__ */ I({
851
844
  __name: "WarehouseView",
852
845
  setup(m) {
853
- const h = Ce(), y = Ee(), a = F(() => h.warehouses), n = Me(), l = ae(), p = W(!1), { t: s } = j();
854
- te(() => {
846
+ const h = Ce(), y = Be(), t = x(() => h.warehouses), n = Me(), l = te(), p = W(!1), { t: s } = j();
847
+ ae(() => {
855
848
  y._currentLocation && A();
856
849
  }), ee([() => y._currentLocation], () => {
857
850
  y._currentLocation && A();
@@ -899,7 +892,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
899
892
  n.close();
900
893
  }
901
894
  }
902
- const { columnDefs: C, formatRowData: R } = Ze(
895
+ const { columnDefs: C, formatRowData: P } = Xe(
903
896
  v,
904
897
  M
905
898
  );
@@ -920,7 +913,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
920
913
  p.value = !1;
921
914
  }
922
915
  }
923
- const { breakpoints: o } = Oe(), e = F(() => o.value.xs || o.value.sm), t = F(() => e.value ? 10 : 20), B = qe();
916
+ const { breakpoints: o } = Ke(), e = x(() => o.value.xs || o.value.sm), a = x(() => e.value ? 10 : 20), B = qe();
924
917
  return (w, d) => {
925
918
  const Y = L("FmTable");
926
919
  return S(), z(ze, {
@@ -949,49 +942,49 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
949
942
  searchable: "",
950
943
  "change-location": "",
951
944
  search: k.value,
952
- "onUpdate:search": d[0] || (d[0] = (P) => k.value = P)
945
+ "onUpdate:search": d[0] || (d[0] = (R) => k.value = R)
953
946
  }, null, 8, ["search"]),
954
947
  (S(), z(Y, {
955
- style: Re(c(B).tableHeight),
948
+ style: Pe(c(B).tableHeight),
956
949
  "column-defs": c(C),
957
- "row-data": c(R)(a.value),
950
+ "row-data": c(P)(t.value),
958
951
  "search-value": k.value,
959
952
  loading: !c(y)._currentLocation || p.value,
960
- onRowClick: d[1] || (d[1] = (P) => v(P.original.original)),
961
- key: a.value.length,
962
- "page-size": t.value
953
+ onRowClick: d[1] || (d[1] = (R) => v(R.original.original)),
954
+ key: t.value.length,
955
+ "page-size": a.value
963
956
  }, {
964
- "list-row": N((P) => [
965
- V(Be, {
966
- row: P,
957
+ "list-row": N((R) => [
958
+ V(je, {
959
+ row: R,
967
960
  onRowClick: (r) => v(r.original)
968
961
  }, {
969
962
  default: N((r) => {
970
- var f, b, x, D, G, re, ne, ue, K, ie, de, ce, pe, me, H, fe, he, ye, ve, Z, ge;
963
+ var f, b, F, D, O, re, ne, ue, K, ie, de, ce, pe, me, H, fe, he, ye, ve, X, ge;
971
964
  return [
972
965
  g("div", Co, [
973
- g("div", Fo, [
974
- V(c(Q), {
975
- render: (x = (b = (f = r.warehouse) == null ? void 0 : f.column) == null ? void 0 : b.columnDef) == null ? void 0 : x.cell,
976
- props: (G = (D = r.warehouse) == null ? void 0 : D.getContext) == null ? void 0 : G.call(D)
966
+ g("div", xo, [
967
+ V(c(J), {
968
+ render: (F = (b = (f = r.warehouse) == null ? void 0 : f.column) == null ? void 0 : b.columnDef) == null ? void 0 : F.cell,
969
+ props: (O = (D = r.warehouse) == null ? void 0 : D.getContext) == null ? void 0 : O.call(D)
977
970
  }, null, 8, ["render", "props"])
978
971
  ]),
979
- g("div", xo, [
980
- V(c(Q), {
972
+ g("div", Fo, [
973
+ V(c(J), {
981
974
  render: (ue = (ne = (re = r.contact) == null ? void 0 : re.column) == null ? void 0 : ne.columnDef) == null ? void 0 : ue.cell,
982
975
  props: (ie = (K = r.contact) == null ? void 0 : K.getContext) == null ? void 0 : ie.call(K)
983
976
  }, null, 8, ["render", "props"])
984
977
  ]),
985
- (de = P.original) != null && de.email ? (S(), q("div", $o, [
986
- V(c(Q), {
978
+ (de = R.original) != null && de.email ? (S(), q("div", $o, [
979
+ V(c(J), {
987
980
  render: (me = (pe = (ce = r.email) == null ? void 0 : ce.column) == null ? void 0 : pe.columnDef) == null ? void 0 : me.cell,
988
981
  props: (fe = (H = r.email) == null ? void 0 : H.getContext) == null ? void 0 : fe.call(H)
989
982
  }, null, 8, ["render", "props"])
990
983
  ])) : Ae("", !0),
991
984
  g("div", Wo, [
992
- V(c(Q), {
985
+ V(c(J), {
993
986
  render: (ve = (ye = (he = r.address) == null ? void 0 : he.column) == null ? void 0 : ye.columnDef) == null ? void 0 : ve.cell,
994
- props: (ge = (Z = r.address) == null ? void 0 : Z.getContext) == null ? void 0 : ge.call(Z)
987
+ props: (ge = (X = r.address) == null ? void 0 : X.getContext) == null ? void 0 : ge.call(X)
995
988
  }, null, 8, ["render", "props"])
996
989
  ])
997
990
  ])
@@ -1005,10 +998,10 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
1005
998
  ], 2),
1006
999
  V(Mo, {
1007
1000
  show: u.value.show,
1008
- "onUpdate:show": d[2] || (d[2] = (P) => u.value.show = P),
1001
+ "onUpdate:show": d[2] || (d[2] = (R) => u.value.show = R),
1009
1002
  warehouse: u.value.warehouse,
1010
1003
  mode: u.value.mode,
1011
- onSubmitted: d[3] || (d[3] = (P) => A(!0))
1004
+ onSubmitted: d[3] || (d[3] = (R) => A(!0))
1012
1005
  }, null, 8, ["show", "warehouse", "mode"])
1013
1006
  ]),
1014
1007
  _: 1
@@ -1017,5 +1010,5 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
1017
1010
  }
1018
1011
  });
1019
1012
  export {
1020
- Io as default
1013
+ Uo as default
1021
1014
  };