@feedmepos/mf-inventory-portal 0.0.25-dev.2 → 0.0.25-dev.21

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 (115) hide show
  1. package/dist/App-D6WBVERc.js +278 -0
  2. package/dist/ApprovalView-BIBoagE8.js +146 -0
  3. package/dist/{BindingsDialog-qeGh3ND8.js → BindingsDialog-DHRRkK1Z.js} +6 -6
  4. package/dist/{BindingsPicker-SfiA8fmD.js → BindingsPicker-DohvMDDF.js} +3 -3
  5. package/dist/{BindingsTable-BjW-eJr6.js → BindingsTable-C_JwU9ei.js} +6 -6
  6. package/dist/ClosingDraftView-BBebhUj-.js +1308 -0
  7. package/dist/ClosingTemplateView-CXRN19-D.js +1859 -0
  8. package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js +34 -0
  9. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BJufUQNE.js +215 -0
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-5rldKjyh.js → FmUnitInput.vue_vue_type_script_setup_true_lang-C5Xk19jY.js} +52 -52
  11. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-7HNI82u-.js +51 -0
  12. package/dist/{IngredientGroupView-CGyyFyvj.js → IngredientGroupView-l2bAc1Kj.js} +1 -1
  13. package/dist/{IngredientsView-BLKk-VxQ.js → IngredientsView-zDXt7KEx.js} +394 -382
  14. package/dist/{IntegrationView-C6gwvZ9b.js → IntegrationView-BYnlAPrP.js} +660 -623
  15. package/dist/{InventoryBindingForm-BB3ZN3Lx.js → InventoryBindingForm-BuweG4Vl.js} +1 -1
  16. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-PT7Quw7j.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DgxN0U4N.js} +99 -99
  17. package/dist/{InventoryBindingSummary-yr0oie3c.js → InventoryBindingSummary-BpEo0JsK.js} +1 -1
  18. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DjJGUE9a.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CcjzkzCt.js} +1 -1
  19. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-O1mYRa5W.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Ej20iSHA.js} +15 -15
  20. package/dist/PublishView-DCZ0zIaP.js +222 -0
  21. package/dist/{PurchaseOrderPrintPreview-Q_9-KVNj.js → PurchaseOrderPrintPreview-Cag7UEvz.js} +1 -1
  22. package/dist/ReceiveRequestView-ChIJGA98.js +2319 -0
  23. package/dist/{RecipeView-DBfugmRY.js → RecipeView-bBshe0eF.js} +32 -31
  24. package/dist/{index-CgspzSQi.js → StockView-D6-oKpAC.js} +3577 -1764
  25. package/dist/{SupplierView-BQViPyfj.js → SupplierView-dyIcGp9Q.js} +12 -11
  26. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-C_7wbQow.js +1771 -0
  27. package/dist/TransferTemplateView-D2rxV0k_.js +1660 -0
  28. package/dist/{UnitView-CrbFeWaB.js → UnitView-DVS5Az5c.js} +14 -14
  29. package/dist/{WarehouseView-Dy5GljxY.js → WarehouseView-CR03TpnA.js} +332 -314
  30. package/dist/api/closing-draft.d.ts +1 -0
  31. package/dist/api/inventory.d.ts +9 -6
  32. package/dist/api/purchase-order.d.ts +2 -1
  33. package/dist/{app-D0O4wr2X.js → app-oV9ISfFL.js} +28343 -28141
  34. package/dist/app.js +1 -1
  35. package/dist/components/FmAutocompleteTextField.vue.d.ts +31 -0
  36. package/dist/components/FmCustomAttribute.vue.d.ts +3 -8
  37. package/dist/components/FmLockableField.vue.d.ts +3 -0
  38. package/dist/components/FmMultiselectDialog.d.ts +46 -0
  39. package/dist/components/FmMultiselectDialog.vue.d.ts +20 -3
  40. package/dist/components/FmMultiselectDialogProps.d.ts +2 -0
  41. package/dist/components/MountListener.vue.d.ts +15 -0
  42. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +1 -1
  43. package/dist/components/shell/inventory/binding-ui.vue.d.ts +1 -1
  44. package/dist/{decimal-CPGmj9BT.js → decimal-C7zgfr5G.js} +1 -1
  45. package/dist/feature-CDQQ-mV9.js +1003 -0
  46. package/dist/{format-unit-display-CMM6DZJj.js → format-unit-display-CVBzrNQ4.js} +334 -327
  47. package/dist/helper/fuzzy.d.ts +10 -0
  48. package/dist/index-0VS4cuk3.js +35546 -0
  49. package/dist/{stock-9nTT4Amy.js → stock-BIP_NIK_.js} +3 -3
  50. package/dist/stores/feature.d.ts +4 -7
  51. package/dist/stores/integration/netsuite.d.ts +5 -0
  52. package/dist/stores/inventory.d.ts +135 -8
  53. package/dist/stores/location.d.ts +100 -0
  54. package/dist/stores/warehouse.d.ts +1 -0
  55. package/dist/style.css +1 -1
  56. package/dist/{supplier-CH4EwBZM.js → supplier-DUQ2VSMg.js} +1 -1
  57. package/dist/tsconfig.app.tsbuildinfo +1 -1
  58. package/dist/use-ingredient-select-dialog-VkU5_Aaj.js +51 -0
  59. package/dist/{use-inventory-binding-dialog-Dli3xtq4.js → use-inventory-binding-dialog-BXp0z3v_.js} +1 -1
  60. package/dist/views/adjustment-template/wastage-template/actions.d.ts +24 -0
  61. package/dist/views/adjustment-template/wastage-template/table.d.ts +24 -0
  62. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +8 -4
  63. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +4 -1
  64. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +48 -24
  65. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +1 -1
  66. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +1 -1
  67. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +36 -12
  68. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +36 -12
  69. package/dist/views/dev/components/AutocompleteTextField.vue.d.ts +2 -0
  70. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +3 -3
  71. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +2 -2
  72. package/dist/views/ingredients/composables/use-ingredient-select-dialog.d.ts +16 -0
  73. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -1
  74. package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +2 -0
  75. package/dist/views/receive-request/components/transfer-details/TransferDetails.vue.d.ts +1387 -0
  76. package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +5 -1
  77. package/dist/views/receive-request/components/transfer-dialog/TransferDialogProps.d.ts +3 -0
  78. package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +1 -2
  79. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +48 -2
  80. package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +490 -2
  81. package/dist/views/receive-request/components/transfer-form/components/TransferSubItemTable.vue.d.ts +72 -0
  82. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +25 -2
  83. package/dist/views/receive-request/components/transfer-form/helpers/calculate-sub-item-total.helper.d.ts +4 -0
  84. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +693 -35
  85. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +684 -35
  86. package/dist/views/receive-request/helper/po-to-po-template.util.d.ts +1 -0
  87. package/dist/views/receive-request/helper/print-po.d.ts +9 -2
  88. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
  89. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItem.vue.d.ts +270 -2
  90. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +286 -0
  91. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateSubItem.vue.d.ts +74 -0
  92. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateSubItemTable.vue.d.ts +92 -0
  93. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations-2.d.ts +8 -0
  94. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +1 -0
  95. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +36 -2
  96. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +456 -12
  97. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +456 -12
  98. package/dist/views/transfer-template/helpers/location-to-po-supplier.util.d.ts +75 -0
  99. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -0
  100. package/dist/{vue-i18n-BcYt8MNZ.js → vue-i18n-CCd5_SRR.js} +212 -212
  101. package/package.json +3 -3
  102. package/dist/App-oKNdl2la.js +0 -276
  103. package/dist/ApprovalView-hDGkcBDy.js +0 -138
  104. package/dist/ClosingDraftView-CEeeL7W4.js +0 -1225
  105. package/dist/ClosingTemplateView-CkS9e0MV.js +0 -1819
  106. package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-CIBSvY0s.js +0 -142
  107. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Dg_7ELeT.js +0 -286
  108. package/dist/PublishView-ByXdmuJL.js +0 -192
  109. package/dist/ReceiveRequestView-CApg7LGM.js +0 -1876
  110. package/dist/StockView-D6o_oUlz.js +0 -1817
  111. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-D2skLe2M.js +0 -1327
  112. package/dist/TransferTemplateView-DVesObTd.js +0 -1284
  113. package/dist/components/FmCustomAttribute2.vue.d.ts +0 -18
  114. package/dist/index-P5iEcRw3.js +0 -29202
  115. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +0 -2628
@@ -1,9 +1,10 @@
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-D0O4wr2X.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";
1
+ import { ref as D, defineComponent as j, watch as ee, onMounted as te, onUnmounted as xe, openBlock as R, createElementBlock as z, toRaw as be, reactive as Fe, createElementVNode as g, toDisplayString as L, unref as c, createVNode as V, resolveComponent as B, createSlots as $e, withCtx as q, createTextVNode as Se, renderSlot as We, createBlock as I, createCommentVNode as Ae, computed as $, isRef as we, normalizeClass as De, normalizeStyle as Pe } from "vue";
2
+ import { W as Re, ap as Ue, aq as Ee, f as Te, D as Ve, h as Q, e as G, ar as Le, ah as Ne, l as N, d as T, S as Be, u as qe, y as ze, _ as Ie, z as je, B as Oe, E as X } from "./app-oV9ISfFL.js";
3
+ import { useCoreStore as Ge, useI18n as O } from "@feedmepos/mf-common";
4
+ import { useDialogChild as Ke, useDialog as Me, useSnackbar as ae, useProxiedModel as oe, useBreakpoints as He } from "@feedmepos/ui-library";
5
5
  import { c as le, u as se } from "./googlemap-Dm8ERVai.js";
6
- const Q = Re((m, h) => {
6
+ import { _ as Ze } from "./FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js";
7
+ const Y = Re((m, h) => {
7
8
  const y = Ge();
8
9
  return {
9
10
  async readWarehouses() {
@@ -28,12 +29,12 @@ const Q = Re((m, h) => {
28
29
  }
29
30
  };
30
31
  });
31
- function He() {
32
+ function Je() {
32
33
  return {
33
34
  warehouses: []
34
35
  };
35
36
  }
36
- const _e = W(He());
37
+ const _e = D(Je());
37
38
  function Ce() {
38
39
  return {
39
40
  // state
@@ -45,40 +46,40 @@ function Ce() {
45
46
  },
46
47
  // actions
47
48
  async readWarehouses() {
48
- const m = Q();
49
+ const m = Y();
49
50
  this.warehouses = await m.readWarehouses();
50
51
  },
51
52
  async createWarehouse(m) {
52
- await Q().createWarehouse(m);
53
+ await Y().createWarehouse(m);
53
54
  },
54
55
  async updateWarehouse(m) {
55
- await Q().updateWarehouse(m._id, m.profile);
56
+ await Y().updateWarehouse(m._id, m.profile);
56
57
  },
57
58
  async deleteWarehouse(m) {
58
- await Q().deleteWarehouse(m._id);
59
+ await Y().deleteWarehouse(m._id);
59
60
  },
60
61
  async init() {
61
- const m = Te();
62
+ const m = Ue();
62
63
  try {
63
64
  await this.readWarehouses();
64
65
  } catch (h) {
65
- throw h instanceof Ue || m.error("Error at reading warehouses"), h;
66
+ throw h instanceof Ee || m.error("Error at reading warehouses"), h;
66
67
  }
67
68
  }
68
69
  };
69
70
  }
70
- function Xe(m, h) {
71
+ function Qe(m, h) {
71
72
  function y(p, s) {
72
- if (p === Z.Edit) {
73
+ if (p === Q.Edit) {
73
74
  m(G(s));
74
75
  return;
75
76
  }
76
- if (p === Z.Delete) {
77
+ if (p === Q.Delete) {
77
78
  h(G(s));
78
79
  return;
79
80
  }
80
81
  }
81
- const { t } = j(), n = [
82
+ const { t } = O(), n = [
82
83
  {
83
84
  accessorKey: "warehouse",
84
85
  header: () => t("inventory.warehouse.table.warehouse"),
@@ -103,8 +104,8 @@ function Xe(m, h) {
103
104
  id: "action",
104
105
  header: "",
105
106
  cell(p) {
106
- return Ee(
107
- [Ve[Z.Edit], Ve[Z.Delete]],
107
+ return Te(
108
+ [Ve[Q.Edit], Ve[Q.Delete]],
108
109
  (s) => {
109
110
  y(s, p.row.original.original);
110
111
  }
@@ -133,13 +134,13 @@ function Xe(m, h) {
133
134
  u == null ? void 0 : u.postcode,
134
135
  u == null ? void 0 : u.state,
135
136
  u == null ? void 0 : u.country
136
- ].map((v) => v == null ? void 0 : v.trim()).filter((v) => v).join(", ");
137
+ ].map((b) => b == null ? void 0 : b.trim()).filter((b) => b).join(", ");
137
138
  }
138
139
  }));
139
140
  }
140
141
  return { columnDefs: n, formatRowData: l };
141
142
  }
142
- const Ze = /* @__PURE__ */ I({
143
+ const Xe = /* @__PURE__ */ j({
143
144
  __name: "GoogleMap",
144
145
  props: {
145
146
  markers: {
@@ -168,84 +169,84 @@ const Ze = /* @__PURE__ */ I({
168
169
  const t = m, n = y;
169
170
  h({
170
171
  setCenter: (r) => {
171
- var f, b;
172
- (f = s.value) == null || f.setCenter(r), (b = s.value) == null || b.setZoom(18);
172
+ var f, w;
173
+ (f = s.value) == null || f.setCenter(r), (w = s.value) == null || w.setZoom(18);
173
174
  }
174
175
  });
175
- const { googleMap: l } = se(), p = W(), s = W(null), u = [];
176
- function _(r) {
176
+ const { googleMap: l } = se(), p = D(), s = D(null), u = [];
177
+ function k(r) {
177
178
  return {
178
179
  lat: r.latLng.lat(),
179
180
  lng: r.latLng.lng()
180
181
  };
181
182
  }
182
- function v(r, f, b) {
183
- const F = l.maps.event.addListener(r, f, b);
184
- u.push(F);
183
+ function b(r, f, w) {
184
+ const S = l.maps.event.addListener(r, f, w);
185
+ u.push(S);
185
186
  }
186
- const M = W([]);
187
- function $(r, f, b) {
188
- v(r, f, b);
187
+ const M = D([]);
188
+ function W(r, f, w) {
189
+ b(r, f, w);
189
190
  }
190
191
  function C(r) {
191
- P(null), M.value = r.map((f, b) => {
192
- const F = new l.maps.Marker({
192
+ U(null), M.value = r.map((f, w) => {
193
+ const S = new l.maps.Marker({
193
194
  position: f,
194
195
  draggable: !0
195
196
  });
196
- return $(F, "dragend", (D) => {
197
- n("marker-change", { index: b, position: _(D) });
198
- }), F;
199
- }), P(s.value);
197
+ return W(S, "dragend", (P) => {
198
+ n("marker-change", { index: w, position: k(P) });
199
+ }), S;
200
+ }), U(s.value);
200
201
  }
201
- function P(r) {
202
+ function U(r) {
202
203
  M.value.map((f) => be(f).setMap(r));
203
204
  }
204
- const i = W([]);
205
- function k(r, f, b) {
206
- v(r, f, b);
205
+ const d = D([]);
206
+ function A(r, f, w) {
207
+ b(r, f, w);
207
208
  }
208
- function A(r, f, b) {
209
- v(r, f, b);
209
+ function F(r, f, w) {
210
+ b(r, f, w);
210
211
  }
211
- function o(r) {
212
- return i.value[r].getPath().getArray().map(({ lat: b, lng: F }) => ({
213
- lat: b(),
214
- lng: F()
212
+ function i(r) {
213
+ return d.value[r].getPath().getArray().map(({ lat: w, lng: S }) => ({
214
+ lat: w(),
215
+ lng: S()
215
216
  }));
216
217
  }
217
- function e(r) {
218
- const f = o(r);
218
+ function o(r) {
219
+ const f = i(r);
219
220
  n("polygon-change", { index: r, path: f });
220
221
  }
221
- function a(r, f) {
222
- const F = o(r).filter((D, O) => O !== f);
223
- n("polygon-change", { index: r, path: F });
222
+ function e(r, f) {
223
+ const S = i(r).filter((P, K) => K !== f);
224
+ n("polygon-change", { index: r, path: S });
224
225
  }
225
- function B(r, f) {
226
- f.vertex !== void 0 ? a(r, f.vertex) : n("polygon-right-click", r);
226
+ function a(r, f) {
227
+ f.vertex !== void 0 ? e(r, f.vertex) : n("polygon-right-click", r);
227
228
  }
228
- function w(r) {
229
- d(null), i.value = r.map((f, b) => {
230
- const F = new l.maps.Polygon({
229
+ function _(r) {
230
+ x(null), d.value = r.map((f, w) => {
231
+ const S = new l.maps.Polygon({
231
232
  paths: f.paths,
232
233
  strokeColor: f.strokeColor,
233
234
  fillColor: f.fillColor,
234
235
  fillOpacity: 0.5,
235
236
  editable: t.editable
236
237
  });
237
- return k(F, "contextmenu", (D) => B(b, D)), F.getPaths().forEach((D) => {
238
- A(D, "insert_at", () => e(b)), A(D, "set_at", () => e(b));
239
- }), F;
240
- }), d(s.value);
238
+ return A(S, "contextmenu", (P) => a(w, P)), S.getPaths().forEach((P) => {
239
+ F(P, "insert_at", () => o(w)), F(P, "set_at", () => o(w));
240
+ }), S;
241
+ }), x(s.value);
241
242
  }
242
- function d(r) {
243
- i.value.map((f) => be(f).setMap(r));
243
+ function x(r) {
244
+ d.value.map((f) => be(f).setMap(r));
244
245
  }
245
- function Y(r, f, b) {
246
- v(r, f, b);
246
+ function v(r, f, w) {
247
+ b(r, f, w);
247
248
  }
248
- function R() {
249
+ function E() {
249
250
  s.value = new l.maps.Map(p.value, {
250
251
  center: t.center,
251
252
  zoom: t.zoom,
@@ -253,19 +254,19 @@ const Ze = /* @__PURE__ */ I({
253
254
  streetViewControl: !1,
254
255
  draggable: !0,
255
256
  scrollwheel: !0
256
- }), Y(s.value, "click", (r) => n("map-click", _(r)));
257
+ }), v(s.value, "click", (r) => n("map-click", k(r)));
257
258
  }
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));
259
+ return ee(() => t.markers, C, { deep: !0 }), ee(() => t.polygons, _, { deep: !0 }), te(() => {
260
+ !p.value || !l || (E(), C(t.markers), _(t.polygons));
260
261
  }), xe(() => {
261
262
  u.forEach((r) => r.remove());
262
- }), (r, f) => (S(), q("div", {
263
+ }), (r, f) => (R(), z("div", {
263
264
  ref_key: "mapRef",
264
265
  ref: p,
265
266
  class: "map app-map"
266
267
  }, null, 512));
267
268
  }
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({
269
+ }), Ye = { class: "flex flex-col gap-24" }, eo = { class: "flex flex-col gap-8" }, 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 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ro = { class: "fm-typo-en-body-lg-600" }, no = /* @__PURE__ */ j({
269
270
  __name: "CoordinateDialog",
270
271
  props: {
271
272
  address: {
@@ -278,59 +279,59 @@ const Ze = /* @__PURE__ */ I({
278
279
  }
279
280
  },
280
281
  setup(m) {
281
- const h = m, y = Oe(), t = se(), { t: n } = j(), l = Fe(
282
+ const h = m, y = Ke(), t = se(), { t: n } = O(), l = Fe(
282
283
  G(h.coordinate ? h.coordinate : le.jb)
283
- ), p = W(""), s = Le(async function() {
284
+ ), p = D(""), s = Le(async function() {
284
285
  p.value = await t.getFirstMatchingAddress(
285
286
  l.lat,
286
287
  l.lng
287
288
  );
288
289
  }, 1e3);
289
- ae(() => {
290
+ te(() => {
290
291
  y.emitData(G(l)), s();
291
292
  });
292
- function u({ position: v }) {
293
- l.lat = v.lat, l.lng = v.lng, y.emitData(G(l)), s();
293
+ function u({ position: b }) {
294
+ l.lat = b.lat, l.lng = b.lng, y.emitData(G(l)), s();
294
295
  }
295
- const _ = W();
296
- return (v, M) => (S(), q("div", Je, [
297
- g("div", Qe, [
296
+ const k = D();
297
+ return (b, M) => (R(), z("div", Ye, [
298
+ g("div", eo, [
298
299
  g("div", null, [
299
- g("span", Ye, U(c(n)("inventory.formField.coordinate.address")) + ": ", 1),
300
- g("span", eo, U(p.value), 1)
300
+ g("span", oo, L(c(n)("inventory.formField.coordinate.address")) + ": ", 1),
301
+ g("span", to, L(p.value), 1)
301
302
  ]),
302
303
  g("div", null, [
303
- g("span", oo, U(c(n)("inventory.formField.coordinate.longitude")) + ": ", 1),
304
- g("span", ao, U(l.lng), 1)
304
+ g("span", ao, L(c(n)("inventory.formField.coordinate.longitude")) + ": ", 1),
305
+ g("span", lo, L(l.lng), 1)
305
306
  ]),
306
307
  g("div", null, [
307
- g("span", to, U(c(n)("inventory.formField.coordinate.latitude")) + ": ", 1),
308
- g("span", lo, U(l.lat), 1)
308
+ g("span", so, L(c(n)("inventory.formField.coordinate.latitude")) + ": ", 1),
309
+ g("span", ro, L(l.lat), 1)
309
310
  ])
310
311
  ]),
311
- V(Ze, {
312
+ V(Xe, {
312
313
  ref_key: "gmapRef",
313
- ref: _,
314
+ ref: k,
314
315
  class: "h-[272px] sm:h-[240px] xs:h-[240px]",
315
316
  editable: "",
316
317
  center: l,
317
318
  markers: [l],
318
319
  onMarkerChange: u,
319
- onMapClick: M[0] || (M[0] = ($) => u({ position: $ }))
320
+ onMapClick: M[0] || (M[0] = (W) => u({ position: W }))
320
321
  }, null, 8, ["center", "markers"])
321
322
  ]));
322
323
  }
323
- }), ro = /* @__PURE__ */ Ne(so, [["__scopeId", "data-v-272f5e8b"]]);
324
+ }), uo = /* @__PURE__ */ Ne(no, [["__scopeId", "data-v-272f5e8b"]]);
324
325
  function ke([m, h]) {
325
326
  return {
326
327
  lat: h,
327
328
  lng: m
328
329
  };
329
330
  }
330
- function no({ lng: m, lat: h }) {
331
+ function io({ lng: m, lat: h }) {
331
332
  return [m, h];
332
333
  }
333
- const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1 }, po = /* @__PURE__ */ I({
334
+ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1 }, fo = /* @__PURE__ */ j({
334
335
  __name: "FmCoordinateInput",
335
336
  props: {
336
337
  address: {},
@@ -347,80 +348,80 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
347
348
  },
348
349
  emits: ["update:modelValue"],
349
350
  setup(m, { emit: h }) {
350
- const y = m, t = h, n = se(), l = Me(), p = te(), s = oe(y, "modelValue"), u = W(!1), { t: _ } = j();
351
- function v(i) {
352
- if (i != null && i[0] && (i != null && i[1]))
353
- return _("inventory.formField.coordinate.longLat", [i[0].toFixed(3), i[1].toFixed(3)]);
354
- }
355
- async function M(i) {
356
- var e, a;
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;
351
+ const y = m, t = h, n = se(), l = Me(), p = ae(), s = oe(y, "modelValue"), u = D(!1), { t: k } = O();
352
+ function b(d) {
353
+ if (d != null && d[0] && (d != null && d[1]))
354
+ return k("inventory.formField.coordinate.longLat", [d[0].toFixed(3), d[1].toFixed(3)]);
355
+ }
356
+ async function M(d) {
357
+ var o, e;
358
+ const A = y.modelValue, F = !A && ((o = y.address) != null && o.formatted) ? await n.getFirstMatchingCoordinate(y.address.formatted) : null, i = A ? ke(A) : F ? ke(F) : le.jb;
358
359
  l.open({
359
- title: y.dialogTitle ?? y.label ?? _("inventory.formField.coordinate.pinLocation"),
360
+ title: y.dialogTitle ?? y.label ?? k("inventory.formField.coordinate.pinLocation"),
360
361
  closeButton: !0,
361
- contentComponent: ro,
362
+ contentComponent: uo,
362
363
  contentComponentProps: {
363
- address: (a = y.address) == null ? void 0 : a.formatted,
364
- coordinate: o
364
+ address: (e = y.address) == null ? void 0 : e.formatted,
365
+ coordinate: i
365
366
  },
366
367
  primaryActions: {
367
- text: _("common.select"),
368
+ text: k("common.select"),
368
369
  close: !0
369
370
  },
370
371
  secondaryActions: {
371
- text: _("common.close"),
372
+ text: k("common.close"),
372
373
  close: !0
373
374
  }
374
- }).onPrimary(i);
375
+ }).onPrimary(d);
375
376
  }
376
- const $ = (i) => t("update:modelValue", i ? no(i) : null);
377
+ const W = (d) => t("update:modelValue", d ? io(d) : null);
377
378
  async function C() {
378
379
  if (!y.disabled) {
379
380
  if (!n.isGoogleMapReady) {
380
381
  p.open({
381
- title: _("common.error"),
382
- message: _("inventory.formField.coordinate.error.loadMap"),
382
+ title: k("common.error"),
383
+ message: k("inventory.formField.coordinate.error.loadMap"),
383
384
  type: "error"
384
385
  });
385
386
  return;
386
387
  }
387
- M($);
388
+ M(W);
388
389
  }
389
390
  }
390
- function P() {
391
+ function U() {
391
392
  t("update:modelValue", null);
392
393
  }
393
- return (i, k) => {
394
- const A = L("FmField"), o = L("FmButton"), e = L("FmFormGroup");
395
- return S(), q("div", uo, [
396
- V(e, {
394
+ return (d, A) => {
395
+ const F = B("FmField"), i = B("FmButton"), o = B("FmFormGroup");
396
+ return R(), z("div", co, [
397
+ V(o, {
397
398
  class: "flex-1",
398
399
  "model-value": c(s),
399
- label: i.label,
400
- disabled: i.disabled,
401
- required: i.labelMark === "required",
402
- optional: i.labelMark === "optional",
403
- info: i.labelInfo,
404
- rules: i.rules,
400
+ label: d.label,
401
+ disabled: d.disabled,
402
+ required: d.labelMark === "required",
403
+ optional: d.labelMark === "optional",
404
+ info: d.labelInfo,
405
+ rules: d.rules,
405
406
  focused: u.value,
406
- "helper-text": i.helperText,
407
- "helper-state": i.helperState,
408
- onClick: k[0] || (k[0] = (a) => C())
407
+ "helper-text": d.helperText,
408
+ "helper-state": d.helperState,
409
+ onClick: A[0] || (A[0] = (e) => C())
409
410
  }, $e({
410
- default: N(({ invalid: a }) => [
411
- i.modelValue && i.modelValue[0] && i.modelValue[1] ? (S(), q("div", io, [
412
- V(A, {
413
- invalid: a,
411
+ default: q(({ invalid: e }) => [
412
+ d.modelValue && d.modelValue[0] && d.modelValue[1] ? (R(), z("div", po, [
413
+ V(F, {
414
+ invalid: e,
414
415
  class: "fm-typo-en-body-lg-400"
415
416
  }, {
416
- default: N(() => [
417
- We(U(v(i.modelValue)), 1)
417
+ default: q(() => [
418
+ Se(L(b(d.modelValue)), 1)
418
419
  ]),
419
420
  _: 2
420
421
  }, 1032, ["invalid"])
421
- ])) : (S(), q("div", co, [
422
- V(o, {
423
- label: c(_)("inventory.formField.coordinate.addCoordinate"),
422
+ ])) : (R(), z("div", mo, [
423
+ V(i, {
424
+ label: c(k)("inventory.formField.coordinate.addCoordinate"),
424
425
  "prepend-icon": "add",
425
426
  variant: "plain"
426
427
  }, null, 8, ["label"])
@@ -428,24 +429,24 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
428
429
  ]),
429
430
  _: 2
430
431
  }, [
431
- i.$slots.label ? {
432
+ d.$slots.label ? {
432
433
  name: "label",
433
- fn: N(() => [
434
- De(i.$slots, "label")
434
+ fn: q(() => [
435
+ We(d.$slots, "label")
435
436
  ]),
436
437
  key: "0"
437
438
  } : void 0
438
439
  ]), 1032, ["model-value", "label", "disabled", "required", "optional", "info", "rules", "focused", "helper-text", "helper-state"]),
439
- i.modelValue && i.modelValue[0] && i.modelValue[1] ? (S(), z(o, {
440
+ d.modelValue && d.modelValue[0] && d.modelValue[1] ? (R(), I(i, {
440
441
  key: 0,
441
442
  "prepend-icon": "delete",
442
443
  variant: "tertiary",
443
- onClick: k[1] || (k[1] = (a) => P())
444
+ onClick: A[1] || (A[1] = (e) => U())
444
445
  })) : Ae("", !0)
445
446
  ]);
446
447
  };
447
448
  }
448
- }), mo = { class: "flex flex-col gap-40" }, fo = { class: "flex flex-col gap-16" }, ho = { class: "flex flex-col gap-8" }, yo = { class: "fm-typo-en-title-sm-800" }, vo = { class: "grid grid-cols-2 gap-24" }, go = { class: "flex flex-col gap-8" }, bo = { class: "fm-typo-en-title-sm-800" }, wo = { class: "flex flex-col gap-8" }, Vo = { class: "fm-typo-en-title-sm-800" }, _o = { class: "flex flex-col gap-16" }, ko = /* @__PURE__ */ I({
449
+ }), ho = { class: "flex flex-col gap-40" }, yo = { class: "flex flex-col gap-16" }, vo = { class: "flex flex-col gap-8" }, go = { class: "fm-typo-en-title-sm-600" }, bo = { class: "grid grid-cols-2 gap-24" }, wo = { class: "flex flex-col gap-8" }, Vo = { class: "fm-typo-en-title-sm-600" }, _o = { class: "flex flex-col gap-8" }, ko = { class: "fm-typo-en-title-sm-600" }, Ao = { class: "flex flex-col gap-16" }, Mo = /* @__PURE__ */ j({
449
450
  __name: "WarehouseForm",
450
451
  props: {
451
452
  modelValue: {},
@@ -453,7 +454,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
453
454
  },
454
455
  emits: ["update:modelValue", "validation-success"],
455
456
  setup(m, { expose: h, emit: y }) {
456
- const t = m, n = y, { t: l } = j(), p = x({
457
+ const t = m, n = y, { t: l } = O(), p = $({
457
458
  get() {
458
459
  var o, e;
459
460
  return ((e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.name) ?? "";
@@ -462,7 +463,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
462
463
  const e = t.modelValue ?? {};
463
464
  e.profile ?? (e.profile = {}), e.profile.name = o, n("update:modelValue", e);
464
465
  }
465
- }), s = x({
466
+ }), s = $({
466
467
  get() {
467
468
  var o, e;
468
469
  return ((e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.regNo) ?? "";
@@ -471,7 +472,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
471
472
  const e = t.modelValue ?? {};
472
473
  e.profile ?? (e.profile = {}), e.profile.regNo = o, n("update:modelValue", e);
473
474
  }
474
- }), u = x({
475
+ }), u = $({
475
476
  get() {
476
477
  var o, e, a;
477
478
  return ((a = (e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : a.line1) ?? "";
@@ -481,7 +482,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
481
482
  const e = t.modelValue ?? {};
482
483
  e.profile ?? (e.profile = {}), (a = e.profile).address ?? (a.address = {}), e.profile.address.line1 = o, n("update:modelValue", e);
483
484
  }
484
- }), _ = x({
485
+ }), k = $({
485
486
  get() {
486
487
  var o, e, a;
487
488
  return ((a = (e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : a.line2) ?? "";
@@ -491,7 +492,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
491
492
  const e = t.modelValue ?? {};
492
493
  e.profile ?? (e.profile = {}), (a = e.profile).address ?? (a.address = {}), e.profile.address.line2 = o, n("update:modelValue", e);
493
494
  }
494
- }), v = x({
495
+ }), b = $({
495
496
  get() {
496
497
  var o, e, a;
497
498
  return ((a = (e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : a.city) ?? "";
@@ -501,7 +502,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
501
502
  const e = t.modelValue ?? {};
502
503
  e.profile ?? (e.profile = {}), (a = e.profile).address ?? (a.address = {}), e.profile.address.city = o, n("update:modelValue", e);
503
504
  }
504
- }), M = x({
505
+ }), M = $({
505
506
  get() {
506
507
  var o, e, a;
507
508
  return ((a = (e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : a.postcode) ?? "";
@@ -511,7 +512,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
511
512
  const e = t.modelValue ?? {};
512
513
  e.profile ?? (e.profile = {}), (a = e.profile).address ?? (a.address = {}), e.profile.address.postcode = o, n("update:modelValue", e);
513
514
  }
514
- }), $ = x({
515
+ }), W = $({
515
516
  get() {
516
517
  var o, e, a;
517
518
  return ((a = (e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : a.state) ?? "";
@@ -521,7 +522,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
521
522
  const e = t.modelValue ?? {};
522
523
  e.profile ?? (e.profile = {}), (a = e.profile).address ?? (a.address = {}), e.profile.address.state = o, n("update:modelValue", e);
523
524
  }
524
- }), C = x({
525
+ }), C = $({
525
526
  get() {
526
527
  var o, e, a;
527
528
  return ((a = (e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : a.country) ?? "";
@@ -531,7 +532,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
531
532
  const e = t.modelValue ?? {};
532
533
  e.profile ?? (e.profile = {}), (a = e.profile).address ?? (a.address = {}), e.profile.address.country = o, n("update:modelValue", e);
533
534
  }
534
- }), P = x({
535
+ }), U = $({
535
536
  get() {
536
537
  var o, e, a;
537
538
  return ((a = (e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : a.coordinates) ?? null;
@@ -541,7 +542,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
541
542
  const e = t.modelValue ?? {};
542
543
  e.profile ?? (e.profile = {}), (a = e.profile).address ?? (a.address = {}), e.profile.address.coordinates = o, n("update:modelValue", e);
543
544
  }
544
- }), i = x({
545
+ }), d = $({
545
546
  get() {
546
547
  var o, e;
547
548
  return ((e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.phoneNo) ?? "";
@@ -550,7 +551,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
550
551
  const e = t.modelValue ?? {};
551
552
  e.profile ?? (e.profile = {}), e.profile.phoneNo = o, n("update:modelValue", e);
552
553
  }
553
- }), k = x({
554
+ }), A = $({
554
555
  get() {
555
556
  var o, e;
556
557
  return ((e = (o = t.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.email) ?? "";
@@ -559,128 +560,146 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
559
560
  const e = t.modelValue ?? {};
560
561
  e.profile ?? (e.profile = {}), e.profile.email = o, n("update:modelValue", e);
561
562
  }
562
- }), A = W();
563
+ }), F = $({
564
+ get() {
565
+ var o;
566
+ return ((o = t.modelValue) == null ? void 0 : o.customAttributes) ?? {};
567
+ },
568
+ set(o) {
569
+ const e = t.modelValue ? {
570
+ ...t.modelValue
571
+ } : {};
572
+ e.customAttributes = o, n("update:modelValue", e);
573
+ }
574
+ }), i = D();
563
575
  return h({
564
576
  validateInputs: () => {
565
577
  var o, e;
566
- (e = (o = A.value) == null ? void 0 : o.validateInputs) == null || e.call(o);
578
+ (e = (o = i.value) == null ? void 0 : o.validateInputs) == null || e.call(o);
567
579
  },
568
580
  resetInputsValidation: () => {
569
581
  var o, e;
570
- (e = (o = A.value) == null ? void 0 : o.resetInputsValidation) == null || e.call(o);
582
+ (e = (o = i.value) == null ? void 0 : o.resetInputsValidation) == null || e.call(o);
571
583
  },
572
584
  resetInputs: () => {
573
585
  var o, e;
574
- (e = (o = A.value) == null ? void 0 : o.resetInputs) == null || e.call(o);
586
+ (e = (o = i.value) == null ? void 0 : o.resetInputs) == null || e.call(o);
575
587
  }
576
588
  }), (o, e) => {
577
- const a = L("FmTextField"), B = L("FmPhoneNumber"), w = L("FmForm");
578
- return S(), z(w, {
589
+ const a = B("FmTextField"), _ = B("FmPhoneNumber"), x = B("FmForm");
590
+ return R(), I(x, {
579
591
  ref_key: "formRef",
580
- ref: A,
581
- onValidationSuccess: e[11] || (e[11] = (d) => n("validation-success"))
592
+ ref: i,
593
+ onValidationSuccess: e[12] || (e[12] = (v) => n("validation-success"))
582
594
  }, {
583
- default: N(() => [
584
- g("div", mo, [
585
- g("div", fo, [
595
+ default: q(() => [
596
+ g("div", ho, [
597
+ g("div", yo, [
586
598
  V(a, {
587
599
  disabled: o.disabled,
588
- rules: [c(E)()],
600
+ rules: [c(N)()],
589
601
  "label-mark": "required",
590
602
  label: c(l)("inventory.warehouse.companyName"),
591
603
  modelValue: p.value,
592
- "onUpdate:modelValue": e[0] || (e[0] = (d) => p.value = d)
604
+ "onUpdate:modelValue": e[0] || (e[0] = (v) => p.value = v)
593
605
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
594
606
  V(a, {
595
607
  disabled: o.disabled,
596
- rules: [c(E)()],
608
+ rules: [c(N)()],
597
609
  "label-mark": "required",
598
610
  label: c(l)("inventory.warehouse.registrationNo"),
599
611
  modelValue: s.value,
600
- "onUpdate:modelValue": e[1] || (e[1] = (d) => s.value = d)
612
+ "onUpdate:modelValue": e[1] || (e[1] = (v) => s.value = v)
601
613
  }, null, 8, ["disabled", "rules", "label", "modelValue"])
602
614
  ]),
603
- g("div", ho, [
604
- g("div", yo, U(c(l)("inventory.warehouse.address.title")), 1),
605
- g("div", vo, [
615
+ g("div", vo, [
616
+ g("div", go, L(c(l)("inventory.warehouse.address.title")), 1),
617
+ g("div", bo, [
606
618
  V(a, {
607
619
  disabled: o.disabled,
608
- rules: [c(E)()],
620
+ rules: [c(N)()],
609
621
  "label-mark": "required",
610
622
  label: c(l)("inventory.warehouse.address.line1"),
611
623
  modelValue: u.value,
612
- "onUpdate:modelValue": e[2] || (e[2] = (d) => u.value = d)
624
+ "onUpdate:modelValue": e[2] || (e[2] = (v) => u.value = v)
613
625
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
614
626
  V(a, {
615
627
  disabled: o.disabled,
616
628
  "label-mark": "optional",
617
629
  label: c(l)("inventory.warehouse.address.line2"),
618
- modelValue: _.value,
619
- "onUpdate:modelValue": e[3] || (e[3] = (d) => _.value = d)
630
+ modelValue: k.value,
631
+ "onUpdate:modelValue": e[3] || (e[3] = (v) => k.value = v)
620
632
  }, null, 8, ["disabled", "label", "modelValue"]),
621
633
  V(a, {
622
634
  disabled: o.disabled,
623
- rules: [c(E)()],
635
+ rules: [c(N)()],
624
636
  "label-mark": "required",
625
637
  label: c(l)("inventory.warehouse.address.city"),
626
- modelValue: v.value,
627
- "onUpdate:modelValue": e[4] || (e[4] = (d) => v.value = d)
638
+ modelValue: b.value,
639
+ "onUpdate:modelValue": e[4] || (e[4] = (v) => b.value = v)
628
640
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
629
641
  V(a, {
630
642
  disabled: o.disabled,
631
- rules: [c(E)()],
643
+ rules: [c(N)()],
632
644
  "label-mark": "required",
633
645
  label: c(l)("inventory.warehouse.address.postcode"),
634
646
  modelValue: M.value,
635
- "onUpdate:modelValue": e[5] || (e[5] = (d) => M.value = d)
647
+ "onUpdate:modelValue": e[5] || (e[5] = (v) => M.value = v)
636
648
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
637
649
  V(a, {
638
650
  disabled: o.disabled,
639
- rules: [c(E)()],
651
+ rules: [c(N)()],
640
652
  "label-mark": "required",
641
653
  label: c(l)("inventory.warehouse.address.state"),
642
- modelValue: $.value,
643
- "onUpdate:modelValue": e[6] || (e[6] = (d) => $.value = d)
654
+ modelValue: W.value,
655
+ "onUpdate:modelValue": e[6] || (e[6] = (v) => W.value = v)
644
656
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
645
657
  V(a, {
646
658
  disabled: o.disabled,
647
- rules: [c(E)()],
659
+ rules: [c(N)()],
648
660
  "label-mark": "required",
649
661
  label: c(l)("inventory.warehouse.address.country"),
650
662
  modelValue: C.value,
651
- "onUpdate:modelValue": e[7] || (e[7] = (d) => C.value = d)
663
+ "onUpdate:modelValue": e[7] || (e[7] = (v) => C.value = v)
652
664
  }, null, 8, ["disabled", "rules", "label", "modelValue"])
653
665
  ])
654
666
  ]),
655
- g("div", go, [
656
- g("div", bo, U(c(l)("inventory.warehouse.coordinate.title")), 1),
657
- V(po, {
667
+ g("div", wo, [
668
+ g("div", Vo, L(c(l)("inventory.warehouse.coordinate.title")), 1),
669
+ V(fo, {
658
670
  disabled: o.disabled,
659
- rules: [c(E)()],
671
+ rules: [c(N)()],
660
672
  "label-mark": "required",
661
- modelValue: P.value,
662
- "onUpdate:modelValue": e[8] || (e[8] = (d) => P.value = d)
673
+ modelValue: U.value,
674
+ "onUpdate:modelValue": e[8] || (e[8] = (v) => U.value = v)
663
675
  }, null, 8, ["disabled", "rules", "modelValue"])
664
676
  ]),
665
- g("div", wo, [
666
- g("div", Vo, U(c(l)("inventory.warehouse.contact.title")), 1),
667
- g("div", _o, [
668
- V(B, {
677
+ g("div", _o, [
678
+ g("div", ko, L(c(l)("inventory.warehouse.contact.title")), 1),
679
+ g("div", Ao, [
680
+ V(_, {
669
681
  disabled: o.disabled,
670
- rules: [c(E)()],
682
+ rules: [c(N)()],
671
683
  "label-mark": "required",
672
684
  label: c(l)("inventory.warehouse.contact.phoneNumber"),
673
- modelValue: i.value,
674
- "onUpdate:modelValue": e[9] || (e[9] = (d) => i.value = d)
685
+ modelValue: d.value,
686
+ "onUpdate:modelValue": e[9] || (e[9] = (v) => d.value = v)
675
687
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
676
688
  V(a, {
677
689
  disabled: o.disabled,
678
690
  "label-mark": "optional",
679
691
  label: c(l)("inventory.warehouse.contact.email"),
680
- modelValue: k.value,
681
- "onUpdate:modelValue": e[10] || (e[10] = (d) => k.value = d)
692
+ modelValue: A.value,
693
+ "onUpdate:modelValue": e[10] || (e[10] = (v) => A.value = v)
682
694
  }, null, 8, ["disabled", "label", "modelValue"])
683
695
  ])
696
+ ]),
697
+ g("div", null, [
698
+ V(Ze, {
699
+ entity: "warehouse",
700
+ modelValue: F.value,
701
+ "onUpdate:modelValue": e[11] || (e[11] = (v) => F.value = v)
702
+ }, null, 8, ["modelValue"])
684
703
  ])
685
704
  ])
686
705
  ]),
@@ -688,7 +707,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
688
707
  }, 512);
689
708
  };
690
709
  }
691
- }), Ao = { class: "flex gap-4" }, Mo = /* @__PURE__ */ I({
710
+ }), Co = { class: "flex gap-4" }, xo = /* @__PURE__ */ j({
692
711
  __name: "WarehouseDialog",
693
712
  props: {
694
713
  mode: {},
@@ -697,7 +716,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
697
716
  },
698
717
  emits: ["update:show", "submitted"],
699
718
  setup(m, { expose: h, emit: y }) {
700
- const t = m, n = y, l = W(!1), p = te(), { t: s } = j(), u = Ce(), _ = x(() => {
719
+ const t = m, n = y, l = D(!1), p = ae(), { t: s } = O(), u = Ce(), k = $(() => {
701
720
  switch (t.mode) {
702
721
  case T.READ:
703
722
  return "";
@@ -707,7 +726,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
707
726
  return s("inventory.warehouse.create.title");
708
727
  }
709
728
  return "";
710
- }), v = x(() => {
729
+ }), b = $(() => {
711
730
  switch (t.mode) {
712
731
  case T.READ:
713
732
  return "";
@@ -717,60 +736,60 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
717
736
  return s("common.add");
718
737
  }
719
738
  return "";
720
- }), M = W();
739
+ }), M = D();
721
740
  h({
722
741
  validateInputs: () => {
723
- var o, e;
724
- (e = (o = M.value) == null ? void 0 : o.validateInputs) == null || e.call(o);
742
+ var i, o;
743
+ (o = (i = M.value) == null ? void 0 : i.validateInputs) == null || o.call(i);
725
744
  },
726
745
  resetInputsValidation: () => {
727
- var o, e;
728
- (e = (o = M.value) == null ? void 0 : o.resetInputsValidation) == null || e.call(o);
746
+ var i, o;
747
+ (o = (i = M.value) == null ? void 0 : i.resetInputsValidation) == null || o.call(i);
729
748
  },
730
749
  resetInputs: () => {
731
- var o, e;
732
- (e = (o = M.value) == null ? void 0 : o.resetInputs) == null || e.call(o);
750
+ var i, o;
751
+ (o = (i = M.value) == null ? void 0 : i.resetInputs) == null || o.call(i);
733
752
  }
734
753
  });
735
- const $ = oe(t, "show"), C = oe(t, "warehouse");
736
- function P() {
737
- var o, e;
738
- (e = (o = M.value) == null ? void 0 : o.validateInputs) == null || e.call(o);
754
+ const W = oe(t, "show"), C = oe(t, "warehouse");
755
+ function U() {
756
+ var i, o;
757
+ (o = (i = M.value) == null ? void 0 : i.validateInputs) == null || o.call(i);
739
758
  }
740
- function i() {
759
+ function d() {
741
760
  switch (t.mode) {
742
761
  case T.READ:
743
762
  return;
744
763
  case T.UPDATE:
745
- return A();
764
+ return F();
746
765
  case T.CREATE:
747
- return k();
766
+ return A();
748
767
  }
749
768
  }
750
- async function k() {
751
- var o, e;
769
+ async function A() {
770
+ var i, o;
752
771
  l.value = !0;
753
772
  try {
754
773
  await Promise.all([
755
774
  u.createWarehouse(C.value),
756
- new Promise((a) => setTimeout(a, 1e3))
775
+ new Promise((e) => setTimeout(e, 1e3))
757
776
  ]), p.open({
758
777
  title: s("inventory.common.success"),
759
- message: s("inventory.warehouse.create.success", { name: (e = (o = C.value) == null ? void 0 : o.profile) == null ? void 0 : e.name }),
778
+ message: s("inventory.warehouse.create.success", { name: (o = (i = C.value) == null ? void 0 : i.profile) == null ? void 0 : o.name }),
760
779
  type: "success"
761
780
  }), n("update:show", !1), n("submitted");
762
- } catch (a) {
781
+ } catch (e) {
763
782
  p.open({
764
783
  title: s("inventory.warehouse.create.error.title"),
765
- message: s("inventory.warehouse.create.error.message"),
784
+ message: e instanceof Be ? e.message : s("inventory.warehouse.create.error.message"),
766
785
  type: "error"
767
- }), console.error("cannot create warehouse", a);
786
+ }), console.error("cannot create warehouse", e);
768
787
  } finally {
769
788
  l.value = !1;
770
789
  }
771
790
  }
772
- async function A() {
773
- var o, e;
791
+ async function F() {
792
+ var i, o;
774
793
  if (C.value === null) {
775
794
  p.open({
776
795
  title: s("inventory.warehouse.update.error.title"),
@@ -783,53 +802,53 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
783
802
  try {
784
803
  await Promise.all([
785
804
  u.updateWarehouse(C.value),
786
- new Promise((a) => setTimeout(a, 1e3))
805
+ new Promise((e) => setTimeout(e, 1e3))
787
806
  ]), p.open({
788
807
  title: s("inventory.common.success"),
789
- message: s("inventory.warehouse.update.success", { name: (e = (o = C.value) == null ? void 0 : o.profile) == null ? void 0 : e.name }),
808
+ message: s("inventory.warehouse.update.success", { name: (o = (i = C.value) == null ? void 0 : i.profile) == null ? void 0 : o.name }),
790
809
  type: "success"
791
810
  }), n("update:show", !1), n("submitted");
792
- } catch (a) {
811
+ } catch (e) {
793
812
  p.open({
794
813
  title: s("inventory.warehouse.update.error.title"),
795
814
  message: s("inventory.warehouse.update.error.message"),
796
815
  type: "error"
797
- }), console.error("cannot update warehouse", a);
816
+ }), console.error("cannot update warehouse", e);
798
817
  } finally {
799
818
  l.value = !1;
800
819
  }
801
820
  }
802
- return (o, e) => {
803
- const a = L("FmButton"), B = L("FmSideSheet");
804
- return S(), z(B, {
805
- header: _.value,
806
- modelValue: c($),
807
- "onUpdate:modelValue": e[1] || (e[1] = (w) => we($) ? $.value = w : null),
821
+ return (i, o) => {
822
+ const e = B("FmButton"), a = B("FmSideSheet");
823
+ return R(), I(a, {
824
+ header: k.value,
825
+ modelValue: c(W),
826
+ "onUpdate:modelValue": o[1] || (o[1] = (_) => we(W) ? W.value = _ : null),
808
827
  "dismiss-away": !l.value,
809
828
  "close-button": "",
810
829
  "max-width": 500
811
830
  }, {
812
- default: N(() => {
813
- var w;
831
+ default: q(() => {
832
+ var _;
814
833
  return [
815
- (S(), z(ko, {
834
+ (R(), I(Mo, {
816
835
  class: "w-full",
817
836
  ref_key: "formRef",
818
837
  ref: M,
819
838
  modelValue: c(C),
820
- "onUpdate:modelValue": e[0] || (e[0] = (d) => we(C) ? C.value = d : null),
821
- onValidationSuccess: i,
822
- key: ((w = o.warehouse) == null ? void 0 : w._id) ?? "",
839
+ "onUpdate:modelValue": o[0] || (o[0] = (x) => we(C) ? C.value = x : null),
840
+ onValidationSuccess: d,
841
+ key: ((_ = i.warehouse) == null ? void 0 : _._id) ?? "",
823
842
  disabled: l.value
824
843
  }, null, 8, ["modelValue", "disabled"]))
825
844
  ];
826
845
  }),
827
- "side-sheet-footer": N(() => [
828
- g("div", Ao, [
829
- V(a, {
846
+ "side-sheet-footer": q(() => [
847
+ g("div", Co, [
848
+ V(e, {
830
849
  loading: l.value,
831
- label: v.value,
832
- onClick: P
850
+ label: b.value,
851
+ onClick: U
833
852
  }, null, 8, ["loading", "label"])
834
853
  ])
835
854
  ]),
@@ -837,29 +856,29 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
837
856
  }, 8, ["header", "modelValue", "dismiss-away"]);
838
857
  };
839
858
  }
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 = {
859
+ }), Fo = { class: "flex flex-col py-8" }, $o = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, So = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Wo = {
841
860
  key: 0,
842
861
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
843
- }, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary line-clamp-3" }, Uo = /* @__PURE__ */ I({
862
+ }, Do = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary line-clamp-3" }, No = /* @__PURE__ */ j({
844
863
  __name: "WarehouseView",
845
864
  setup(m) {
846
- const h = Ce(), y = Be(), t = x(() => h.warehouses), n = Me(), l = te(), p = W(!1), { t: s } = j();
847
- ae(() => {
848
- y._currentLocation && A();
865
+ const h = Ce(), y = qe(), t = $(() => h.warehouses), n = Me(), l = ae(), p = D(!1), { t: s } = O();
866
+ te(() => {
867
+ y._currentLocation && F();
849
868
  }), ee([() => y._currentLocation], () => {
850
- y._currentLocation && A();
869
+ y._currentLocation && F();
851
870
  });
852
- const u = W({});
853
- function _() {
871
+ const u = D({});
872
+ function k() {
854
873
  u.value.mode = T.CREATE, u.value.warehouse = {}, u.value.show = !0;
855
874
  }
856
- function v(w) {
857
- u.value.mode = T.UPDATE, u.value.warehouse = w, u.value.show = !0;
875
+ function b(_) {
876
+ u.value.mode = T.UPDATE, u.value.warehouse = _, u.value.show = !0;
858
877
  }
859
- async function M(w) {
878
+ async function M(_) {
860
879
  n.open({
861
880
  title: s("inventory.warehouse.delete.confirm"),
862
- message: s("inventory.warehouse.delete.confirmMessage", { name: w.profile.name }),
881
+ message: s("inventory.warehouse.delete.confirmMessage", { name: _.profile.name }),
863
882
  primaryActions: {
864
883
  text: "Delete",
865
884
  close: !0,
@@ -869,41 +888,41 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
869
888
  text: "Cancel",
870
889
  close: !0
871
890
  }
872
- }).onPrimary(() => $(w));
891
+ }).onPrimary(() => W(_));
873
892
  }
874
- async function $(w) {
893
+ async function W(_) {
875
894
  n.open({
876
895
  title: s("inventory.warehouse.delete.deletingWarehouse"),
877
896
  closeButton: !1
878
897
  });
879
898
  try {
880
- await h.deleteWarehouse(w), l.open({
899
+ await h.deleteWarehouse(_), l.open({
881
900
  title: s("inventory.warehouse.delete.success"),
882
- message: s("inventory.warehouse.delete.deletedWarehouse", { name: w.profile.name }),
901
+ message: s("inventory.warehouse.delete.deletedWarehouse", { name: _.profile.name }),
883
902
  type: "success"
884
- }), await A(!0);
885
- } catch (d) {
903
+ }), await F(!0);
904
+ } catch (x) {
886
905
  l.open({
887
906
  title: s("inventory.warehouse.delete.error"),
888
- message: s("inventory.warehouse.delete.errorMessage", { name: w.profile.name }),
907
+ message: s("inventory.warehouse.delete.errorMessage", { name: _.profile.name }),
889
908
  type: "error"
890
- }), console.error("failed to delete warehouse", d);
909
+ }), console.error("failed to delete warehouse", x);
891
910
  } finally {
892
911
  n.close();
893
912
  }
894
913
  }
895
- const { columnDefs: C, formatRowData: P } = Xe(
896
- v,
914
+ const { columnDefs: C, formatRowData: U } = Qe(
915
+ b,
897
916
  M
898
917
  );
899
- function i(w) {
900
- w === "create" && _();
918
+ function d(_) {
919
+ _ === "create" && k();
901
920
  }
902
- const k = W("");
903
- async function A(w = !1) {
921
+ const A = D("");
922
+ async function F(_ = !1) {
904
923
  p.value = !0;
905
924
  try {
906
- await h.readWarehouses(), w && await y.readLocations();
925
+ await h.readWarehouses(), _ && await y.readLocations();
907
926
  } catch {
908
927
  l.open({
909
928
  title: "Cannot fetch warehouse list",
@@ -913,10 +932,10 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
913
932
  p.value = !1;
914
933
  }
915
934
  }
916
- const { breakpoints: o } = Ke(), e = x(() => o.value.xs || o.value.sm), a = x(() => e.value ? 10 : 20), B = qe();
917
- return (w, d) => {
918
- const Y = L("FmTable");
919
- return S(), z(ze, {
935
+ const { breakpoints: i } = He(), o = $(() => i.value.xs || i.value.sm), e = $(() => o.value ? 10 : 20), a = ze();
936
+ return (_, x) => {
937
+ const v = B("FmTable");
938
+ return R(), I(Ie, {
920
939
  title: c(s)("inventory.warehouse.title"),
921
940
  actions: [
922
941
  {
@@ -926,65 +945,64 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
926
945
  prependIcon: "add"
927
946
  }
928
947
  ],
929
- "onClick:action": i
948
+ "onClick:action": d
930
949
  }, {
931
- default: N(() => [
950
+ default: q(() => [
932
951
  g("div", {
933
- class: Se([
952
+ class: De([
934
953
  "flex flex-col gap-8 max-h-full",
935
954
  {
936
- "p-0": e.value,
937
- "px-24 ": !e.value
955
+ "p-0": o.value,
956
+ "px-24 ": !o.value
938
957
  }
939
958
  ])
940
959
  }, [
941
- V(Ie, {
960
+ V(je, {
942
961
  searchable: "",
943
- "change-location": "",
944
- search: k.value,
945
- "onUpdate:search": d[0] || (d[0] = (R) => k.value = R)
962
+ search: A.value,
963
+ "onUpdate:search": x[0] || (x[0] = (E) => A.value = E)
946
964
  }, null, 8, ["search"]),
947
- (S(), z(Y, {
948
- style: Pe(c(B).tableHeight),
965
+ (R(), I(v, {
966
+ style: Pe(c(a).tableHeight),
949
967
  "column-defs": c(C),
950
- "row-data": c(P)(t.value),
951
- "search-value": k.value,
968
+ "row-data": c(U)(t.value),
969
+ "search-value": A.value,
952
970
  loading: !c(y)._currentLocation || p.value,
953
- onRowClick: d[1] || (d[1] = (R) => v(R.original.original)),
971
+ onRowClick: x[1] || (x[1] = (E) => b(E.original.original)),
954
972
  key: t.value.length,
955
- "page-size": a.value
973
+ "page-size": e.value
956
974
  }, {
957
- "list-row": N((R) => [
958
- V(je, {
959
- row: R,
960
- onRowClick: (r) => v(r.original)
975
+ "list-row": q((E) => [
976
+ V(Oe, {
977
+ row: E,
978
+ onRowClick: (r) => b(r.original)
961
979
  }, {
962
- default: N((r) => {
963
- var f, b, F, D, O, re, ne, ue, K, ie, de, ce, pe, me, H, fe, he, ye, ve, X, ge;
980
+ default: q((r) => {
981
+ var f, w, S, P, K, re, ne, ue, H, ie, de, ce, pe, me, Z, fe, he, ye, ve, J, ge;
964
982
  return [
965
- g("div", Co, [
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)
983
+ g("div", Fo, [
984
+ g("div", $o, [
985
+ V(c(X), {
986
+ render: (S = (w = (f = r.warehouse) == null ? void 0 : f.column) == null ? void 0 : w.columnDef) == null ? void 0 : S.cell,
987
+ props: (K = (P = r.warehouse) == null ? void 0 : P.getContext) == null ? void 0 : K.call(P)
970
988
  }, null, 8, ["render", "props"])
971
989
  ]),
972
- g("div", Fo, [
973
- V(c(J), {
990
+ g("div", So, [
991
+ V(c(X), {
974
992
  render: (ue = (ne = (re = r.contact) == null ? void 0 : re.column) == null ? void 0 : ne.columnDef) == null ? void 0 : ue.cell,
975
- props: (ie = (K = r.contact) == null ? void 0 : K.getContext) == null ? void 0 : ie.call(K)
993
+ props: (ie = (H = r.contact) == null ? void 0 : H.getContext) == null ? void 0 : ie.call(H)
976
994
  }, null, 8, ["render", "props"])
977
995
  ]),
978
- (de = R.original) != null && de.email ? (S(), q("div", $o, [
979
- V(c(J), {
996
+ (de = E.original) != null && de.email ? (R(), z("div", Wo, [
997
+ V(c(X), {
980
998
  render: (me = (pe = (ce = r.email) == null ? void 0 : ce.column) == null ? void 0 : pe.columnDef) == null ? void 0 : me.cell,
981
- props: (fe = (H = r.email) == null ? void 0 : H.getContext) == null ? void 0 : fe.call(H)
999
+ props: (fe = (Z = r.email) == null ? void 0 : Z.getContext) == null ? void 0 : fe.call(Z)
982
1000
  }, null, 8, ["render", "props"])
983
1001
  ])) : Ae("", !0),
984
- g("div", Wo, [
985
- V(c(J), {
1002
+ g("div", Do, [
1003
+ V(c(X), {
986
1004
  render: (ve = (ye = (he = r.address) == null ? void 0 : he.column) == null ? void 0 : ye.columnDef) == null ? void 0 : ve.cell,
987
- props: (ge = (X = r.address) == null ? void 0 : X.getContext) == null ? void 0 : ge.call(X)
1005
+ props: (ge = (J = r.address) == null ? void 0 : J.getContext) == null ? void 0 : ge.call(J)
988
1006
  }, null, 8, ["render", "props"])
989
1007
  ])
990
1008
  ])
@@ -996,12 +1014,12 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
996
1014
  _: 1
997
1015
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
998
1016
  ], 2),
999
- V(Mo, {
1017
+ V(xo, {
1000
1018
  show: u.value.show,
1001
- "onUpdate:show": d[2] || (d[2] = (R) => u.value.show = R),
1019
+ "onUpdate:show": x[2] || (x[2] = (E) => u.value.show = E),
1002
1020
  warehouse: u.value.warehouse,
1003
1021
  mode: u.value.mode,
1004
- onSubmitted: d[3] || (d[3] = (R) => A(!0))
1022
+ onSubmitted: x[3] || (x[3] = (E) => F(!0))
1005
1023
  }, null, 8, ["show", "warehouse", "mode"])
1006
1024
  ]),
1007
1025
  _: 1
@@ -1010,5 +1028,5 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
1010
1028
  }
1011
1029
  });
1012
1030
  export {
1013
- Uo as default
1031
+ No as default
1014
1032
  };