@feedmepos/mf-inventory-portal 0.0.22-dev.9 → 0.0.23-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 (163) hide show
  1. package/dist/App-Y3Ez8Rjf.js +255 -0
  2. package/dist/ApprovalView-BUU1G4Q2.js +141 -0
  3. package/dist/{BindingsDialog-GzX9Bo2g.js → BindingsDialog-8wc4Q0JQ.js} +13 -12
  4. package/dist/{BindingsPicker-SbOetc0-.js → BindingsPicker-DGWN1LQc.js} +19 -18
  5. package/dist/{BindingsTable-CAcE5y8U.js → BindingsTable-7NJP2jT6.js} +20 -16
  6. package/dist/ClosingTemplateView-9s7vmwaT.js +1833 -0
  7. package/dist/FmDroppableField-8RzKjEdL.js +154 -0
  8. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B4DDh9-a.js +267 -0
  9. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-5DINn0ZB.js +436 -0
  10. package/dist/FmMultiselectDialog-7hok9sJP.js +411 -0
  11. package/dist/FmUnitInput.vue_vue_type_script_setup_true_lang-CxR1FCft.js +326 -0
  12. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-FQ0HjuL3.js +51 -0
  13. package/dist/IngredientGroupView-C3maHTCg.js +610 -0
  14. package/dist/IngredientsView-DCR3IBkR.js +1613 -0
  15. package/dist/IntegrationView-gO4h89Wj.js +1227 -0
  16. package/dist/InventoryBindingForm-dh3GeyG-.js +4 -0
  17. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CJuo3i7W.js +278 -0
  18. package/dist/InventoryBindingSummary-BPoPcEoe.js +75 -0
  19. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-1FCwvO8A.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-olm8sZKt.js} +1 -1
  20. package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-BezTV43V.js +116 -0
  21. package/dist/{PurchaseOrderPrintPreview-5HIWHR_f.js → PurchaseOrderPrintPreview-Dix_fIoo.js} +14 -13
  22. package/dist/ReceiveRequestView-DdPiYb2P.js +4082 -0
  23. package/dist/RecipeView-C4-a4IEW.js +597 -0
  24. package/dist/Standalone.vue.d.ts +2 -0
  25. package/dist/StockView-Du2txrIP.js +7778 -0
  26. package/dist/SupplierView-D_09FbQh.js +1474 -0
  27. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-C9MOos--.js +1144 -0
  28. package/dist/TransferTemplateView-j3CRy6Lc.js +1262 -0
  29. package/dist/{UnitView-BpU0Yk7X.js → UnitView-BXw2Vwq1.js} +30 -29
  30. package/dist/{WarehouseView-DqxWgogc.js → WarehouseView-CKamiETC.js} +205 -202
  31. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  32. package/dist/api/bill.d.ts +86 -240
  33. package/dist/api/closing-template.d.ts +6 -4
  34. package/dist/api/inventory.d.ts +281 -88
  35. package/dist/api/netsuite.d.ts +32 -1
  36. package/dist/api/purchase-order-template.d.ts +4 -2
  37. package/dist/api/supplier.d.ts +1 -0
  38. package/dist/app-GUbzqEtW.js +33456 -0
  39. package/dist/app.d.ts +259 -6
  40. package/dist/app.js +8 -7
  41. package/dist/array-hChJVZLE.js +43 -0
  42. package/dist/components/FmFilterableMenuOptions.vue.d.ts +54 -0
  43. package/dist/components/FmMinMaxInputRules.d.ts +2 -0
  44. package/dist/components/FmMultiselectDialog.vue.d.ts +3 -9
  45. package/dist/components/FmMultiselectDialogProps.d.ts +0 -2
  46. package/dist/components/FmUnitInputRules.d.ts +2 -0
  47. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +5 -5
  48. package/dist/components/map/GoogleMap.vue.d.ts +4 -4
  49. package/dist/components/shell/inventory/binding-dialog.vue.d.ts +2 -2
  50. package/dist/components/shell/inventory/binding-ui.vue.d.ts +2 -2
  51. package/dist/date2-CLE9fB2R.js +117 -0
  52. package/dist/dayjs.min-CY1d38w7.js +282 -0
  53. package/dist/{decimal-DWbwRn_v.js → decimal-SIjO6Mjw.js} +1 -1
  54. package/dist/defineDeepModel-l40rX7kr.js +13 -0
  55. package/dist/extensions/array.d.ts +1 -0
  56. package/dist/feature-BXruKUhX.js +78 -0
  57. package/dist/{format-time-from-id-BnmaRuab.js → format-time-from-id-CcFsBXmk.js} +1 -1
  58. package/dist/format-unit-display-DEKg8cJm.js +1198 -0
  59. package/dist/fuzzy-CVOV9zJc.js +41 -0
  60. package/dist/googlemap-Dm8ERVai.js +97 -0
  61. package/dist/helper/rules.d.ts +7 -0
  62. package/dist/helper/rules.spec.d.ts +1 -0
  63. package/dist/helper/xlsx.util.d.ts +7 -0
  64. package/dist/index-BX5KZXhI.js +22279 -0
  65. package/dist/index-CVsyOEb1.js +10545 -0
  66. package/dist/index-m9e9nYfl.js +45 -0
  67. package/dist/netsuite-DAKRv7zr.js +146 -0
  68. package/dist/normalizeArguments-DP7Hrren.js +1552 -0
  69. package/dist/router/name.d.ts +1 -0
  70. package/dist/rules-DlnN8IP3.js +198 -0
  71. package/dist/stores/integration/foodmarkethub.d.ts +391 -0
  72. package/dist/stores/integration/index.d.ts +7 -0
  73. package/dist/stores/integration/netsuite.d.ts +102 -0
  74. package/dist/stores/inventory.d.ts +295 -9
  75. package/dist/stores/location.d.ts +508 -485
  76. package/dist/stores/supplier.d.ts +124 -4
  77. package/dist/stores/warehouse.d.ts +7 -4
  78. package/dist/style.css +1 -1
  79. package/dist/supplier-B21WlSAM.js +77 -0
  80. package/dist/tsconfig.app.tsbuildinfo +1 -1
  81. package/dist/use-inventory-binding-dialog-D3x6xj2O.js +95 -0
  82. package/dist/{use-template-enabled-locations-2-ClBq9FjN.js → use-template-enabled-locations-2-z-b-UXef.js} +9 -8
  83. package/dist/useTabStorage-BkIVScW_.js +25 -0
  84. package/dist/views/closing-template/closing-template-import/ClosingTemplateImport.vue.d.ts +2 -0
  85. package/dist/views/closing-template/closing-template-import/ClosingTemplateImportItem.vue.d.ts +12 -0
  86. package/dist/views/closing-template/closing-template-import/ClosingTemplateImportItemProps.d.ts +7 -0
  87. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +1 -1
  88. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +877 -1002
  89. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +882 -1013
  90. package/dist/views/closing-template/helpers/import-export.helper.d.ts +58 -0
  91. package/dist/views/ingredient-group/IngredientGroupView.vue.d.ts +3 -0
  92. package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialog.vue.d.ts +31 -0
  93. package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialogProps.d.ts +12 -0
  94. package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupForm.vue.d.ts +20 -0
  95. package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupFormProps.d.ts +12 -0
  96. package/dist/views/ingredient-group/composables/use-ingredient-group-actions.d.ts +24 -0
  97. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +215 -0
  98. package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +2 -2
  99. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +2 -2
  100. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +5 -5
  101. package/dist/views/ingredients/composables/use-ingredient-form.d.ts +2 -2
  102. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -1
  103. package/dist/views/integration/FoodMarketHub.vue.d.ts +2 -0
  104. package/dist/views/integration/NetSuite.vue.d.ts +2 -0
  105. package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +7 -7
  106. package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +7 -7
  107. package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +1 -0
  108. package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +49 -0
  109. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +1913 -53
  110. package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +1 -0
  111. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +2 -2
  112. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -1
  113. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +2370 -327
  114. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +2304 -261
  115. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -2
  116. package/dist/views/recipe/composables/use-recipe-form.d.ts +2 -2
  117. package/dist/views/stock/components/StockRecordCard.vue.d.ts +43 -120
  118. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +34 -4
  119. package/dist/views/stock/composables/use-stock-action.d.ts +2 -2
  120. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  121. package/dist/views/supplier/components/supplier-import/SupplierImport.vue.d.ts +2 -0
  122. package/dist/views/supplier/components/supplier-import/SupplierImportItem.vue.d.ts +12 -0
  123. package/dist/views/supplier/components/supplier-import/SupplierImportItemProps.d.ts +6 -0
  124. package/dist/views/supplier/composables/use-supplier-actions.d.ts +10 -0
  125. package/dist/views/supplier/helpers/import-export.helper.d.ts +50 -0
  126. package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetails.vue.d.ts +0 -2
  127. package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetailsProps.d.ts +0 -1
  128. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +71 -82
  129. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +38 -1
  130. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +1 -1
  131. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImport.vue.d.ts +2 -0
  132. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItem.vue.d.ts +12 -0
  133. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItemProps.d.ts +9 -0
  134. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +1279 -1528
  135. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +2207 -446
  136. package/dist/views/transfer-template/helpers/import-export.helper.d.ts +76 -0
  137. package/dist/views/transfer-template/helpers/remove-deleted-skus.helper.d.ts +1 -251
  138. package/dist/views/transfer-template/helpers/template-item.error.helper.d.ts +1 -0
  139. package/dist/views/unit/composables/use-unit-form.d.ts +2 -2
  140. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +14 -8
  141. package/dist/{xlsx-DiOKvJ6l.js → xlsx-6mM1eNiL.js} +1525 -1525
  142. package/dist/xlsx.util-BLftcF4q.js +78 -0
  143. package/package.json +7 -4
  144. package/dist/ApprovalView-BPsScR5_.js +0 -129
  145. package/dist/ClosingTemplateView-DECwEnlK.js +0 -1066
  146. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DnogYrRE.js +0 -372
  147. package/dist/IngredientsView-8fT1Ljd5.js +0 -1758
  148. package/dist/IntegrationView-CjGLRM78.js +0 -1141
  149. package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-DlhNc8Vk.js +0 -88
  150. package/dist/ReceiveRequestView-CXZv8g5U.js +0 -215
  151. package/dist/RecipeView-sB0Lgmob.js +0 -581
  152. package/dist/StockView-CY2kNohB.js +0 -1892
  153. package/dist/SupplierView-DTqeZPts.js +0 -827
  154. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BBby29tW.js +0 -762
  155. package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-ByNQap9n.js +0 -1498
  156. package/dist/TransferTemplateView-DkRVfAox.js +0 -1277
  157. package/dist/app-BuyAj4kw.js +0 -69068
  158. package/dist/defineDeepModel-DuVmbMwq.js +0 -13
  159. package/dist/id-to-date-CI5Vv0Ji.js +0 -30
  160. package/dist/purchase-order-transaction-type-DrFJFvtK.js +0 -676
  161. package/dist/stores/netsuite.d.ts +0 -49
  162. package/dist/supplier-BQyK2eSZ.js +0 -69
  163. package/dist/xlsx.util-CZ7zYxdP.js +0 -109
@@ -1,12 +1,16 @@
1
- import { ref as W, defineComponent as j, watch as ee, onMounted as te, onUnmounted as Fe, openBlock as S, createElementBlock as z, 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 I, createCommentVNode as Ae, computed as F, isRef as we, normalizeClass as Se, normalizeStyle as Re } from "vue";
2
- import { n as Pe, T as Te, V as Ue, c as G, W as ae, X as le, Y as Ee, i as Le, R as E, j as Ne } from "./app-BuyAj4kw.js";
3
- import { useCoreStore as Be, useI18n as q } from "@feedmepos/mf-common";
4
- import { D as Ve, R as Z, F as T } from "./row-action.enum-PMKMRrZR.js";
5
- import { c as qe, _ as ze, F as J } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
6
- import { u as Ie, _ as je, a as Oe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DnogYrRE.js";
7
- import { useDialogChild as Ge, useDialog as Me, useSnackbar as se, useProxiedModel as oe, useBreakpoints as Ke } from "@feedmepos/ui-library";
8
- const Q = Pe((m, h) => {
9
- const y = Be();
1
+ import { ref as W, defineComponent as I, watch as ee, onMounted as te, onUnmounted as Fe, openBlock as S, createElementBlock as B, 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 { j as Pe, p as Te, q as Ue, c as O, u as Ee } from "./app-GUbzqEtW.js";
3
+ import { useCoreStore as Le, useI18n as j } from "@feedmepos/mf-common";
4
+ import { D as Ve, R as J, F as T } from "./row-action.enum-PMKMRrZR.js";
5
+ import { c as Ne, _ as qe, F as Q } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
6
+ import { u as Be, _ as ze, a as Ie } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-5DINn0ZB.js";
7
+ import { useDialogChild as je, useDialog as Me, useSnackbar as ae, useProxiedModel as oe, useBreakpoints as Oe } from "@feedmepos/ui-library";
8
+ import { R as E } from "./rules-DlnN8IP3.js";
9
+ import { c as le, u as se } from "./googlemap-Dm8ERVai.js";
10
+ import { d as Ge } from "./index-m9e9nYfl.js";
11
+ import { _ as Ke } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
+ const X = Pe((m, h) => {
13
+ const y = Le();
10
14
  return {
11
15
  async readWarehouses() {
12
16
  var l;
@@ -19,8 +23,8 @@ const Q = Pe((m, h) => {
19
23
  return await h.post(l, a);
20
24
  },
21
25
  async updateWarehouse(a, n) {
22
- var r;
23
- const l = ((r = y.currentBusiness.value) == null ? void 0 : r._id) ?? "", p = `${m.inventoryBackendUrl}/businesses/${l}/warehouse/${a}`;
26
+ var s;
27
+ const l = ((s = y.currentBusiness.value) == null ? void 0 : s._id) ?? "", p = `${m.inventoryBackendUrl}/businesses/${l}/warehouse/${a}`;
24
28
  return await h.put(p, n);
25
29
  },
26
30
  async deleteWarehouse(a) {
@@ -47,17 +51,17 @@ function Ce() {
47
51
  },
48
52
  // actions
49
53
  async readWarehouses() {
50
- const m = Q();
54
+ const m = X();
51
55
  this.warehouses = await m.readWarehouses();
52
56
  },
53
57
  async createWarehouse(m) {
54
- await Q().createWarehouse(m);
58
+ await X().createWarehouse(m);
55
59
  },
56
60
  async updateWarehouse(m) {
57
- await Q().updateWarehouse(m._id, m.profile);
61
+ await X().updateWarehouse(m._id, m.profile);
58
62
  },
59
63
  async deleteWarehouse(m) {
60
- await Q().deleteWarehouse(m._id);
64
+ await X().deleteWarehouse(m._id);
61
65
  },
62
66
  async init() {
63
67
  const m = Te();
@@ -69,18 +73,18 @@ function Ce() {
69
73
  }
70
74
  };
71
75
  }
72
- function Xe(m, h) {
73
- function y(p, r) {
74
- if (p === Z.Edit) {
75
- m(G(r));
76
+ function Ze(m, h) {
77
+ function y(p, s) {
78
+ if (p === J.Edit) {
79
+ m(O(s));
76
80
  return;
77
81
  }
78
- if (p === Z.Delete) {
79
- h(G(r));
82
+ if (p === J.Delete) {
83
+ h(O(s));
80
84
  return;
81
85
  }
82
86
  }
83
- const { t: a } = q(), n = [
87
+ const { t: a } = j(), n = [
84
88
  {
85
89
  accessorKey: "warehouse",
86
90
  header: () => a("inventory.warehouse.table.warehouse"),
@@ -105,10 +109,10 @@ function Xe(m, h) {
105
109
  id: "action",
106
110
  header: "",
107
111
  cell(p) {
108
- return qe(
109
- [Ve[Z.Edit], Ve[Z.Delete]],
110
- (r) => {
111
- y(r, p.row.original.original);
112
+ return Ne(
113
+ [Ve[J.Edit], Ve[J.Delete]],
114
+ (s) => {
115
+ y(s, p.row.original.original);
112
116
  }
113
117
  );
114
118
  },
@@ -121,13 +125,13 @@ function Xe(m, h) {
121
125
  }
122
126
  ];
123
127
  function l(p) {
124
- return p.map((r) => ({
125
- original: r,
126
- warehouse: r.profile.name,
127
- contact: r.profile.phoneNo,
128
- email: r.profile.email,
128
+ return p.map((s) => ({
129
+ original: s,
130
+ warehouse: s.profile.name,
131
+ contact: s.profile.phoneNo,
132
+ email: s.profile.email,
129
133
  get address() {
130
- const u = r.profile.address;
134
+ const u = s.profile.address;
131
135
  return [
132
136
  u == null ? void 0 : u.line1,
133
137
  u == null ? void 0 : u.line2,
@@ -141,7 +145,7 @@ function Xe(m, h) {
141
145
  }
142
146
  return { columnDefs: n, formatRowData: l };
143
147
  }
144
- const Ye = /* @__PURE__ */ j({
148
+ const Je = /* @__PURE__ */ I({
145
149
  __name: "GoogleMap",
146
150
  props: {
147
151
  markers: {
@@ -162,35 +166,35 @@ const Ye = /* @__PURE__ */ j({
162
166
  },
163
167
  center: {
164
168
  type: Object,
165
- default: ae.jb
169
+ default: le.jb
166
170
  }
167
171
  },
168
172
  emits: ["map-click", "marker-change", "polygon-change", "polygon-right-click"],
169
173
  setup(m, { expose: h, emit: y }) {
170
174
  const a = m, n = y;
171
175
  h({
172
- setCenter: (s) => {
176
+ setCenter: (r) => {
173
177
  var f, b;
174
- (f = r.value) == null || f.setCenter(s), (b = r.value) == null || b.setZoom(18);
178
+ (f = s.value) == null || f.setCenter(r), (b = s.value) == null || b.setZoom(18);
175
179
  }
176
180
  });
177
- const { googleMap: l } = le(), p = W(), r = W(null), u = [];
178
- function _(s) {
181
+ const { googleMap: l } = se(), p = W(), s = W(null), u = [];
182
+ function _(r) {
179
183
  return {
180
- lat: s.latLng.lat(),
181
- lng: s.latLng.lng()
184
+ lat: r.latLng.lat(),
185
+ lng: r.latLng.lng()
182
186
  };
183
187
  }
184
- function v(s, f, b) {
185
- const x = l.maps.event.addListener(s, f, b);
188
+ function v(r, f, b) {
189
+ const x = l.maps.event.addListener(r, f, b);
186
190
  u.push(x);
187
191
  }
188
192
  const M = W([]);
189
- function $(s, f, b) {
190
- v(s, f, b);
193
+ function $(r, f, b) {
194
+ v(r, f, b);
191
195
  }
192
- function C(s) {
193
- R(null), M.value = s.map((f, b) => {
196
+ function C(r) {
197
+ R(null), M.value = r.map((f, b) => {
194
198
  const x = new l.maps.Marker({
195
199
  position: f,
196
200
  draggable: !0
@@ -198,37 +202,37 @@ const Ye = /* @__PURE__ */ j({
198
202
  return $(x, "dragend", (D) => {
199
203
  n("marker-change", { index: b, position: _(D) });
200
204
  }), x;
201
- }), R(r.value);
205
+ }), R(s.value);
202
206
  }
203
- function R(s) {
204
- M.value.map((f) => be(f).setMap(s));
207
+ function R(r) {
208
+ M.value.map((f) => be(f).setMap(r));
205
209
  }
206
- const d = W([]);
207
- function k(s, f, b) {
208
- v(s, f, b);
210
+ const i = W([]);
211
+ function k(r, f, b) {
212
+ v(r, f, b);
209
213
  }
210
- function A(s, f, b) {
211
- v(s, f, b);
214
+ function A(r, f, b) {
215
+ v(r, f, b);
212
216
  }
213
- function o(s) {
214
- return d.value[s].getPath().getArray().map(({ lat: b, lng: x }) => ({
217
+ function o(r) {
218
+ return i.value[r].getPath().getArray().map(({ lat: b, lng: x }) => ({
215
219
  lat: b(),
216
220
  lng: x()
217
221
  }));
218
222
  }
219
- function e(s) {
220
- const f = o(s);
221
- n("polygon-change", { index: s, path: f });
223
+ function e(r) {
224
+ const f = o(r);
225
+ n("polygon-change", { index: r, path: f });
222
226
  }
223
- function t(s, f) {
224
- const x = o(s).filter((D, K) => K !== f);
225
- n("polygon-change", { index: s, path: x });
227
+ function t(r, f) {
228
+ const x = o(r).filter((D, G) => G !== f);
229
+ n("polygon-change", { index: r, path: x });
226
230
  }
227
- function B(s, f) {
228
- f.vertex !== void 0 ? t(s, f.vertex) : n("polygon-right-click", s);
231
+ function q(r, f) {
232
+ f.vertex !== void 0 ? t(r, f.vertex) : n("polygon-right-click", r);
229
233
  }
230
- function w(s) {
231
- i(null), d.value = s.map((f, b) => {
234
+ function w(r) {
235
+ d(null), i.value = r.map((f, b) => {
232
236
  const x = new l.maps.Polygon({
233
237
  paths: f.paths,
234
238
  strokeColor: f.strokeColor,
@@ -236,38 +240,38 @@ const Ye = /* @__PURE__ */ j({
236
240
  fillOpacity: 0.5,
237
241
  editable: a.editable
238
242
  });
239
- return k(x, "contextmenu", (D) => B(b, D)), x.getPaths().forEach((D) => {
243
+ return k(x, "contextmenu", (D) => q(b, D)), x.getPaths().forEach((D) => {
240
244
  A(D, "insert_at", () => e(b)), A(D, "set_at", () => e(b));
241
245
  }), x;
242
- }), i(r.value);
246
+ }), d(s.value);
243
247
  }
244
- function i(s) {
245
- d.value.map((f) => be(f).setMap(s));
248
+ function d(r) {
249
+ i.value.map((f) => be(f).setMap(r));
246
250
  }
247
- function O(s, f, b) {
248
- v(s, f, b);
251
+ function Y(r, f, b) {
252
+ v(r, f, b);
249
253
  }
250
254
  function P() {
251
- r.value = new l.maps.Map(p.value, {
255
+ s.value = new l.maps.Map(p.value, {
252
256
  center: a.center,
253
257
  zoom: a.zoom,
254
258
  mapTypeControl: !1,
255
259
  streetViewControl: !1,
256
260
  draggable: !0,
257
261
  scrollwheel: !0
258
- }), O(r.value, "click", (s) => n("map-click", _(s)));
262
+ }), Y(s.value, "click", (r) => n("map-click", _(r)));
259
263
  }
260
264
  return ee(() => a.markers, C, { deep: !0 }), ee(() => a.polygons, w, { deep: !0 }), te(() => {
261
265
  !p.value || !l || (P(), C(a.markers), w(a.polygons));
262
266
  }), Fe(() => {
263
- u.forEach((s) => s.remove());
264
- }), (s, f) => (S(), z("div", {
267
+ u.forEach((r) => r.remove());
268
+ }), (r, f) => (S(), B("div", {
265
269
  ref_key: "mapRef",
266
270
  ref: p,
267
271
  class: "map app-map"
268
272
  }, null, 512));
269
273
  }
270
- }), Ze = { class: "flex flex-col gap-24" }, Je = { class: "flex flex-col gap-8" }, Qe = { 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__ */ j({
274
+ }), 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({
271
275
  __name: "CoordinateDialog",
272
276
  props: {
273
277
  address: {
@@ -280,25 +284,25 @@ const Ye = /* @__PURE__ */ j({
280
284
  }
281
285
  },
282
286
  setup(m) {
283
- const h = m, y = Ge(), a = le(), { t: n } = q(), l = xe(
284
- G(h.coordinate ? h.coordinate : ae.jb)
285
- ), p = W(""), r = Ee(async function() {
287
+ const h = m, y = je(), a = se(), { t: n } = j(), l = xe(
288
+ O(h.coordinate ? h.coordinate : le.jb)
289
+ ), p = W(""), s = Ge(async function() {
286
290
  p.value = await a.getFirstMatchingAddress(
287
291
  l.lat,
288
292
  l.lng
289
293
  );
290
294
  }, 1e3);
291
295
  te(() => {
292
- y.emitData(G(l)), r();
296
+ y.emitData(O(l)), s();
293
297
  });
294
298
  function u({ position: v }) {
295
- l.lat = v.lat, l.lng = v.lng, y.emitData(G(l)), r();
299
+ l.lat = v.lat, l.lng = v.lng, y.emitData(O(l)), s();
296
300
  }
297
301
  const _ = W();
298
- return (v, M) => (S(), z("div", Ze, [
299
- g("div", Je, [
302
+ return (v, M) => (S(), B("div", Qe, [
303
+ g("div", Xe, [
300
304
  g("div", null, [
301
- g("span", Qe, U(c(n)("inventory.formField.coordinate.address")) + ": ", 1),
305
+ g("span", Ye, U(c(n)("inventory.formField.coordinate.address")) + ": ", 1),
302
306
  g("span", eo, U(p.value), 1)
303
307
  ]),
304
308
  g("div", null, [
@@ -310,7 +314,7 @@ const Ye = /* @__PURE__ */ j({
310
314
  g("span", lo, U(l.lat), 1)
311
315
  ])
312
316
  ]),
313
- V(Ye, {
317
+ V(Je, {
314
318
  ref_key: "gmapRef",
315
319
  ref: _,
316
320
  class: "h-[272px] sm:h-[240px] xs:h-[240px]",
@@ -322,7 +326,7 @@ const Ye = /* @__PURE__ */ j({
322
326
  }, null, 8, ["center", "markers"])
323
327
  ]));
324
328
  }
325
- }), ro = /* @__PURE__ */ Le(so, [["__scopeId", "data-v-272f5e8b"]]);
329
+ }), ro = /* @__PURE__ */ Ke(so, [["__scopeId", "data-v-272f5e8b"]]);
326
330
  function ke([m, h]) {
327
331
  return {
328
332
  lat: h,
@@ -332,7 +336,7 @@ function ke([m, h]) {
332
336
  function no({ lng: m, lat: h }) {
333
337
  return [m, h];
334
338
  }
335
- const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1 }, po = /* @__PURE__ */ j({
339
+ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1 }, po = /* @__PURE__ */ I({
336
340
  __name: "FmCoordinateInput",
337
341
  props: {
338
342
  address: {},
@@ -349,14 +353,14 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
349
353
  },
350
354
  emits: ["update:modelValue"],
351
355
  setup(m, { emit: h }) {
352
- const y = m, a = h, n = le(), l = Me(), p = se(), r = oe(y, "modelValue"), u = W(!1), { t: _ } = q();
353
- function v(d) {
354
- if (d != null && d[0] && (d != null && d[1]))
355
- return _("inventory.formField.coordinate.longLat", [d[0].toFixed(3), d[1].toFixed(3)]);
356
+ const y = m, a = h, n = se(), l = Me(), p = ae(), s = oe(y, "modelValue"), u = W(!1), { t: _ } = j();
357
+ function v(i) {
358
+ if (i != null && i[0] && (i != null && i[1]))
359
+ return _("inventory.formField.coordinate.longLat", [i[0].toFixed(3), i[1].toFixed(3)]);
356
360
  }
357
- async function M(d) {
361
+ async function M(i) {
358
362
  var e, t;
359
- 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) : ae.jb;
363
+ 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;
360
364
  l.open({
361
365
  title: y.dialogTitle ?? y.label ?? _("inventory.formField.coordinate.pinLocation"),
362
366
  closeButton: !0,
@@ -373,9 +377,9 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
373
377
  text: _("common.close"),
374
378
  close: !0
375
379
  }
376
- }).onPrimary(d);
380
+ }).onPrimary(i);
377
381
  }
378
- const $ = (d) => a("update:modelValue", d ? no(d) : null);
382
+ const $ = (i) => a("update:modelValue", i ? no(i) : null);
379
383
  async function C() {
380
384
  if (!y.disabled) {
381
385
  if (!n.isGoogleMapReady) {
@@ -392,35 +396,35 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
392
396
  function R() {
393
397
  a("update:modelValue", null);
394
398
  }
395
- return (d, k) => {
399
+ return (i, k) => {
396
400
  const A = L("FmField"), o = L("FmButton"), e = L("FmFormGroup");
397
- return S(), z("div", uo, [
401
+ return S(), B("div", uo, [
398
402
  V(e, {
399
403
  class: "flex-1",
400
- "model-value": c(r),
401
- label: d.label,
402
- disabled: d.disabled,
403
- required: d.labelMark === "required",
404
- optional: d.labelMark === "optional",
405
- info: d.labelInfo,
406
- rules: d.rules,
404
+ "model-value": c(s),
405
+ label: i.label,
406
+ disabled: i.disabled,
407
+ required: i.labelMark === "required",
408
+ optional: i.labelMark === "optional",
409
+ info: i.labelInfo,
410
+ rules: i.rules,
407
411
  focused: u.value,
408
- "helper-text": d.helperText,
409
- "helper-state": d.helperState,
412
+ "helper-text": i.helperText,
413
+ "helper-state": i.helperState,
410
414
  onClick: k[0] || (k[0] = (t) => C())
411
415
  }, $e({
412
416
  default: N(({ invalid: t }) => [
413
- d.modelValue && d.modelValue[0] && d.modelValue[1] ? (S(), z("div", io, [
417
+ i.modelValue && i.modelValue[0] && i.modelValue[1] ? (S(), B("div", io, [
414
418
  V(A, {
415
419
  invalid: t,
416
420
  class: "fm-typo-en-body-lg-400"
417
421
  }, {
418
422
  default: N(() => [
419
- We(U(v(d.modelValue)), 1)
423
+ We(U(v(i.modelValue)), 1)
420
424
  ]),
421
425
  _: 2
422
426
  }, 1032, ["invalid"])
423
- ])) : (S(), z("div", co, [
427
+ ])) : (S(), B("div", co, [
424
428
  V(o, {
425
429
  label: c(_)("inventory.formField.coordinate.addCoordinate"),
426
430
  "prepend-icon": "add",
@@ -430,15 +434,15 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
430
434
  ]),
431
435
  _: 2
432
436
  }, [
433
- d.$slots.label ? {
437
+ i.$slots.label ? {
434
438
  name: "label",
435
439
  fn: N(() => [
436
- De(d.$slots, "label")
440
+ De(i.$slots, "label")
437
441
  ]),
438
442
  key: "0"
439
443
  } : void 0
440
444
  ]), 1032, ["model-value", "label", "disabled", "required", "optional", "info", "rules", "focused", "helper-text", "helper-state"]),
441
- d.modelValue && d.modelValue[0] && d.modelValue[1] ? (S(), I(o, {
445
+ i.modelValue && i.modelValue[0] && i.modelValue[1] ? (S(), z(o, {
442
446
  key: 0,
443
447
  "prepend-icon": "delete",
444
448
  variant: "tertiary",
@@ -447,7 +451,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
447
451
  ]);
448
452
  };
449
453
  }
450
- }), 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__ */ j({
454
+ }), 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({
451
455
  __name: "WarehouseForm",
452
456
  props: {
453
457
  modelValue: {},
@@ -455,7 +459,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
455
459
  },
456
460
  emits: ["update:modelValue", "validation-success"],
457
461
  setup(m, { expose: h, emit: y }) {
458
- const a = m, n = y, { t: l } = q(), p = F({
462
+ const a = m, n = y, { t: l } = j(), p = F({
459
463
  get() {
460
464
  var o, e;
461
465
  return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.name) ?? "";
@@ -464,7 +468,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
464
468
  const e = a.modelValue ?? {};
465
469
  e.profile ?? (e.profile = {}), e.profile.name = o, n("update:modelValue", e);
466
470
  }
467
- }), r = F({
471
+ }), s = F({
468
472
  get() {
469
473
  var o, e;
470
474
  return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.regNo) ?? "";
@@ -543,7 +547,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
543
547
  const e = a.modelValue ?? {};
544
548
  e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.coordinates = o, n("update:modelValue", e);
545
549
  }
546
- }), d = F({
550
+ }), i = F({
547
551
  get() {
548
552
  var o, e;
549
553
  return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.phoneNo) ?? "";
@@ -576,11 +580,11 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
576
580
  (e = (o = A.value) == null ? void 0 : o.resetInputs) == null || e.call(o);
577
581
  }
578
582
  }), (o, e) => {
579
- const t = L("FmTextField"), B = L("FmPhoneNumber"), w = L("FmForm");
580
- return S(), I(w, {
583
+ const t = L("FmTextField"), q = L("FmPhoneNumber"), w = L("FmForm");
584
+ return S(), z(w, {
581
585
  ref_key: "formRef",
582
586
  ref: A,
583
- onValidationSuccess: e[11] || (e[11] = (i) => n("validation-success"))
587
+ onValidationSuccess: e[11] || (e[11] = (d) => n("validation-success"))
584
588
  }, {
585
589
  default: N(() => [
586
590
  g("div", mo, [
@@ -591,15 +595,15 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
591
595
  "label-mark": "required",
592
596
  label: c(l)("inventory.warehouse.companyName"),
593
597
  modelValue: p.value,
594
- "onUpdate:modelValue": e[0] || (e[0] = (i) => p.value = i)
598
+ "onUpdate:modelValue": e[0] || (e[0] = (d) => p.value = d)
595
599
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
596
600
  V(t, {
597
601
  disabled: o.disabled,
598
602
  rules: [c(E)()],
599
603
  "label-mark": "required",
600
604
  label: c(l)("inventory.warehouse.registrationNo"),
601
- modelValue: r.value,
602
- "onUpdate:modelValue": e[1] || (e[1] = (i) => r.value = i)
605
+ modelValue: s.value,
606
+ "onUpdate:modelValue": e[1] || (e[1] = (d) => s.value = d)
603
607
  }, null, 8, ["disabled", "rules", "label", "modelValue"])
604
608
  ]),
605
609
  g("div", ho, [
@@ -611,14 +615,14 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
611
615
  "label-mark": "required",
612
616
  label: c(l)("inventory.warehouse.address.line1"),
613
617
  modelValue: u.value,
614
- "onUpdate:modelValue": e[2] || (e[2] = (i) => u.value = i)
618
+ "onUpdate:modelValue": e[2] || (e[2] = (d) => u.value = d)
615
619
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
616
620
  V(t, {
617
621
  disabled: o.disabled,
618
622
  "label-mark": "optional",
619
623
  label: c(l)("inventory.warehouse.address.line2"),
620
624
  modelValue: _.value,
621
- "onUpdate:modelValue": e[3] || (e[3] = (i) => _.value = i)
625
+ "onUpdate:modelValue": e[3] || (e[3] = (d) => _.value = d)
622
626
  }, null, 8, ["disabled", "label", "modelValue"]),
623
627
  V(t, {
624
628
  disabled: o.disabled,
@@ -626,7 +630,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
626
630
  "label-mark": "required",
627
631
  label: c(l)("inventory.warehouse.address.city"),
628
632
  modelValue: v.value,
629
- "onUpdate:modelValue": e[4] || (e[4] = (i) => v.value = i)
633
+ "onUpdate:modelValue": e[4] || (e[4] = (d) => v.value = d)
630
634
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
631
635
  V(t, {
632
636
  disabled: o.disabled,
@@ -634,7 +638,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
634
638
  "label-mark": "required",
635
639
  label: c(l)("inventory.warehouse.address.postcode"),
636
640
  modelValue: M.value,
637
- "onUpdate:modelValue": e[5] || (e[5] = (i) => M.value = i)
641
+ "onUpdate:modelValue": e[5] || (e[5] = (d) => M.value = d)
638
642
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
639
643
  V(t, {
640
644
  disabled: o.disabled,
@@ -642,7 +646,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
642
646
  "label-mark": "required",
643
647
  label: c(l)("inventory.warehouse.address.state"),
644
648
  modelValue: $.value,
645
- "onUpdate:modelValue": e[6] || (e[6] = (i) => $.value = i)
649
+ "onUpdate:modelValue": e[6] || (e[6] = (d) => $.value = d)
646
650
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
647
651
  V(t, {
648
652
  disabled: o.disabled,
@@ -650,7 +654,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
650
654
  "label-mark": "required",
651
655
  label: c(l)("inventory.warehouse.address.country"),
652
656
  modelValue: C.value,
653
- "onUpdate:modelValue": e[7] || (e[7] = (i) => C.value = i)
657
+ "onUpdate:modelValue": e[7] || (e[7] = (d) => C.value = d)
654
658
  }, null, 8, ["disabled", "rules", "label", "modelValue"])
655
659
  ])
656
660
  ]),
@@ -661,26 +665,26 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
661
665
  rules: [c(E)()],
662
666
  "label-mark": "required",
663
667
  modelValue: R.value,
664
- "onUpdate:modelValue": e[8] || (e[8] = (i) => R.value = i)
668
+ "onUpdate:modelValue": e[8] || (e[8] = (d) => R.value = d)
665
669
  }, null, 8, ["disabled", "rules", "modelValue"])
666
670
  ]),
667
671
  g("div", wo, [
668
672
  g("div", Vo, U(c(l)("inventory.warehouse.contact.title")), 1),
669
673
  g("div", _o, [
670
- V(B, {
674
+ V(q, {
671
675
  disabled: o.disabled,
672
676
  rules: [c(E)()],
673
677
  "label-mark": "required",
674
678
  label: c(l)("inventory.warehouse.contact.phoneNumber"),
675
- modelValue: d.value,
676
- "onUpdate:modelValue": e[9] || (e[9] = (i) => d.value = i)
679
+ modelValue: i.value,
680
+ "onUpdate:modelValue": e[9] || (e[9] = (d) => i.value = d)
677
681
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
678
682
  V(t, {
679
683
  disabled: o.disabled,
680
684
  "label-mark": "optional",
681
685
  label: c(l)("inventory.warehouse.contact.email"),
682
686
  modelValue: k.value,
683
- "onUpdate:modelValue": e[10] || (e[10] = (i) => k.value = i)
687
+ "onUpdate:modelValue": e[10] || (e[10] = (d) => k.value = d)
684
688
  }, null, 8, ["disabled", "label", "modelValue"])
685
689
  ])
686
690
  ])
@@ -690,7 +694,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
690
694
  }, 512);
691
695
  };
692
696
  }
693
- }), Ao = { class: "flex gap-4" }, Mo = /* @__PURE__ */ j({
697
+ }), Ao = { class: "flex gap-4" }, Mo = /* @__PURE__ */ I({
694
698
  __name: "WarehouseDialog",
695
699
  props: {
696
700
  mode: {},
@@ -699,14 +703,14 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
699
703
  },
700
704
  emits: ["update:show", "submitted"],
701
705
  setup(m, { expose: h, emit: y }) {
702
- const a = m, n = y, l = W(!1), p = se(), { t: r } = q(), u = Ce(), _ = F(() => {
706
+ const a = m, n = y, l = W(!1), p = ae(), { t: s } = j(), u = Ce(), _ = F(() => {
703
707
  switch (a.mode) {
704
708
  case T.READ:
705
709
  return "";
706
710
  case T.UPDATE:
707
- return r("inventory.warehouse.update.title");
711
+ return s("inventory.warehouse.update.title");
708
712
  case T.CREATE:
709
- return r("inventory.warehouse.create.title");
713
+ return s("inventory.warehouse.create.title");
710
714
  }
711
715
  return "";
712
716
  }), v = F(() => {
@@ -714,9 +718,9 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
714
718
  case T.READ:
715
719
  return "";
716
720
  case T.UPDATE:
717
- return r("common.save");
721
+ return s("common.save");
718
722
  case T.CREATE:
719
- return r("common.add");
723
+ return s("common.add");
720
724
  }
721
725
  return "";
722
726
  }), M = W();
@@ -739,7 +743,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
739
743
  var o, e;
740
744
  (e = (o = M.value) == null ? void 0 : o.validateInputs) == null || e.call(o);
741
745
  }
742
- function d() {
746
+ function i() {
743
747
  switch (a.mode) {
744
748
  case T.READ:
745
749
  return;
@@ -757,14 +761,14 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
757
761
  u.createWarehouse(C.value),
758
762
  new Promise((t) => setTimeout(t, 1e3))
759
763
  ]), p.open({
760
- title: r("common.success"),
761
- message: r("inventory.warehouse.create.success", { name: (e = (o = C.value) == null ? void 0 : o.profile) == null ? void 0 : e.name }),
764
+ title: s("inventory.common.success"),
765
+ message: s("inventory.warehouse.create.success", { name: (e = (o = C.value) == null ? void 0 : o.profile) == null ? void 0 : e.name }),
762
766
  type: "success"
763
767
  }), n("update:show", !1), n("submitted");
764
768
  } catch (t) {
765
769
  p.open({
766
- title: r("inventory.warehouse.create.error.title"),
767
- message: r("inventory.warehouse.create.error.message"),
770
+ title: s("inventory.warehouse.create.error.title"),
771
+ message: s("inventory.warehouse.create.error.message"),
768
772
  type: "error"
769
773
  }), console.error("cannot create warehouse", t);
770
774
  } finally {
@@ -775,8 +779,8 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
775
779
  var o, e;
776
780
  if (C.value === null) {
777
781
  p.open({
778
- title: r("inventory.warehouse.update.error.title"),
779
- message: r("inventory.warehouse.update.error.emptyWarehouse"),
782
+ title: s("inventory.warehouse.update.error.title"),
783
+ message: s("inventory.warehouse.update.error.emptyWarehouse"),
780
784
  type: "error"
781
785
  });
782
786
  return;
@@ -787,14 +791,14 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
787
791
  u.updateWarehouse(C.value),
788
792
  new Promise((t) => setTimeout(t, 1e3))
789
793
  ]), p.open({
790
- title: r("common.success"),
791
- message: r("inventory.warehouse.update.success", { name: (e = (o = C.value) == null ? void 0 : o.profile) == null ? void 0 : e.name }),
794
+ title: s("inventory.common.success"),
795
+ message: s("inventory.warehouse.update.success", { name: (e = (o = C.value) == null ? void 0 : o.profile) == null ? void 0 : e.name }),
792
796
  type: "success"
793
797
  }), n("update:show", !1), n("submitted");
794
798
  } catch (t) {
795
799
  p.open({
796
- title: r("inventory.warehouse.update.error.title"),
797
- message: r("inventory.warehouse.update.error.message"),
800
+ title: s("inventory.warehouse.update.error.title"),
801
+ message: s("inventory.warehouse.update.error.message"),
798
802
  type: "error"
799
803
  }), console.error("cannot update warehouse", t);
800
804
  } finally {
@@ -802,8 +806,8 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
802
806
  }
803
807
  }
804
808
  return (o, e) => {
805
- const t = L("FmButton"), B = L("FmSideSheet");
806
- return S(), I(B, {
809
+ const t = L("FmButton"), q = L("FmSideSheet");
810
+ return S(), z(q, {
807
811
  header: _.value,
808
812
  modelValue: c($),
809
813
  "onUpdate:modelValue": e[1] || (e[1] = (w) => we($) ? $.value = w : null),
@@ -814,13 +818,13 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
814
818
  default: N(() => {
815
819
  var w;
816
820
  return [
817
- (S(), I(ko, {
821
+ (S(), z(ko, {
818
822
  class: "w-full",
819
823
  ref_key: "formRef",
820
824
  ref: M,
821
825
  modelValue: c(C),
822
- "onUpdate:modelValue": e[0] || (e[0] = (i) => we(C) ? C.value = i : null),
823
- onValidationSuccess: d,
826
+ "onUpdate:modelValue": e[0] || (e[0] = (d) => we(C) ? C.value = d : null),
827
+ onValidationSuccess: i,
824
828
  key: ((w = o.warehouse) == null ? void 0 : w._id) ?? "",
825
829
  disabled: l.value
826
830
  }, null, 8, ["modelValue", "disabled"]))
@@ -842,10 +846,10 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
842
846
  }), 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 = {
843
847
  key: 0,
844
848
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
845
- }, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary line-clamp-3" }, Lo = /* @__PURE__ */ j({
849
+ }, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary line-clamp-3" }, zo = /* @__PURE__ */ I({
846
850
  __name: "WarehouseView",
847
851
  setup(m) {
848
- const h = Ce(), y = Ne(), a = F(() => h.warehouses), n = Me(), l = se(), p = W(!1), { t: r } = q();
852
+ const h = Ce(), y = Ee(), a = F(() => h.warehouses), n = Me(), l = ae(), p = W(!1), { t: s } = j();
849
853
  te(() => {
850
854
  y._currentLocation && A();
851
855
  }), ee([() => y._currentLocation], () => {
@@ -860,8 +864,8 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
860
864
  }
861
865
  async function M(w) {
862
866
  n.open({
863
- title: r("inventory.warehouse.delete.confirm"),
864
- message: r("inventory.warehouse.delete.confirmMessage", { name: w.profile.name }),
867
+ title: s("inventory.warehouse.delete.confirm"),
868
+ message: s("inventory.warehouse.delete.confirmMessage", { name: w.profile.name }),
865
869
  primaryActions: {
866
870
  text: "Delete",
867
871
  close: !0,
@@ -874,32 +878,31 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
874
878
  }).onPrimary(() => $(w));
875
879
  }
876
880
  async function $(w) {
877
- const { t: i } = q();
878
881
  n.open({
879
- title: i("inventory.warehouse.delete.deletingWarehouse"),
882
+ title: s("inventory.warehouse.delete.deletingWarehouse"),
880
883
  closeButton: !1
881
884
  });
882
885
  try {
883
886
  await h.deleteWarehouse(w), l.open({
884
- title: i("inventory.warehouse.delete.success"),
885
- message: i("inventory.warehouse.delete.deletedWarehouse", { name: w.profile.name }),
887
+ title: s("inventory.warehouse.delete.success"),
888
+ message: s("inventory.warehouse.delete.deletedWarehouse", { name: w.profile.name }),
886
889
  type: "success"
887
890
  }), await A(!0);
888
- } catch (O) {
891
+ } catch (d) {
889
892
  l.open({
890
- title: i("inventory.warehouse.delete.error"),
891
- message: i("inventory.warehouse.delete.errorMessage", { name: w.profile.name }),
893
+ title: s("inventory.warehouse.delete.error"),
894
+ message: s("inventory.warehouse.delete.errorMessage", { name: w.profile.name }),
892
895
  type: "error"
893
- }), console.error("failed to delete warehouse", O);
896
+ }), console.error("failed to delete warehouse", d);
894
897
  } finally {
895
898
  n.close();
896
899
  }
897
900
  }
898
- const { columnDefs: C, formatRowData: R } = Xe(
901
+ const { columnDefs: C, formatRowData: R } = Ze(
899
902
  v,
900
903
  M
901
904
  );
902
- function d(w) {
905
+ function i(w) {
903
906
  w === "create" && _();
904
907
  }
905
908
  const k = W("");
@@ -916,20 +919,20 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
916
919
  p.value = !1;
917
920
  }
918
921
  }
919
- const { breakpoints: o } = Ke(), e = F(() => o.value.xs || o.value.sm), t = F(() => e.value ? 10 : 20), B = Ie();
920
- return (w, i) => {
921
- const O = L("FmTable");
922
- return S(), I(je, {
923
- title: c(r)("inventory.warehouse.title"),
922
+ const { breakpoints: o } = Oe(), e = F(() => o.value.xs || o.value.sm), t = F(() => e.value ? 10 : 20), q = Be();
923
+ return (w, d) => {
924
+ const Y = L("FmTable");
925
+ return S(), z(ze, {
926
+ title: c(s)("inventory.warehouse.title"),
924
927
  actions: [
925
928
  {
926
- label: c(r)("inventory.warehouse.create.title"),
929
+ label: c(s)("inventory.warehouse.create.title"),
927
930
  value: "create",
928
931
  isPrimary: !0,
929
932
  prependIcon: "add"
930
933
  }
931
934
  ],
932
- "onClick:action": d
935
+ "onClick:action": i
933
936
  }, {
934
937
  default: N(() => [
935
938
  g("div", {
@@ -941,53 +944,53 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
941
944
  }
942
945
  ])
943
946
  }, [
944
- V(Oe, {
947
+ V(Ie, {
945
948
  searchable: "",
946
949
  "change-location": "",
947
950
  search: k.value,
948
- "onUpdate:search": i[0] || (i[0] = (P) => k.value = P)
951
+ "onUpdate:search": d[0] || (d[0] = (P) => k.value = P)
949
952
  }, null, 8, ["search"]),
950
- (S(), I(O, {
951
- style: Re(c(B).tableHeight),
953
+ (S(), z(Y, {
954
+ style: Re(c(q).tableHeight),
952
955
  "column-defs": c(C),
953
956
  "row-data": c(R)(a.value),
954
957
  "search-value": k.value,
955
958
  loading: !c(y)._currentLocation || p.value,
956
- onRowClick: i[1] || (i[1] = (P) => v(P.original.original)),
959
+ onRowClick: d[1] || (d[1] = (P) => v(P.original.original)),
957
960
  key: a.value.length,
958
961
  "page-size": t.value
959
962
  }, {
960
963
  "list-row": N((P) => [
961
- V(ze, {
964
+ V(qe, {
962
965
  row: P,
963
- onRowClick: (s) => v(s.original)
966
+ onRowClick: (r) => v(r.original)
964
967
  }, {
965
- default: N((s) => {
966
- var f, b, x, D, K, re, ne, ue, H, ie, de, ce, pe, me, X, fe, he, ye, ve, Y, ge;
968
+ default: N((r) => {
969
+ var f, b, x, D, G, re, ne, ue, K, ie, de, ce, pe, me, H, fe, he, ye, ve, Z, ge;
967
970
  return [
968
971
  g("div", Co, [
969
972
  g("div", Fo, [
970
- V(c(J), {
971
- render: (x = (b = (f = s.warehouse) == null ? void 0 : f.column) == null ? void 0 : b.columnDef) == null ? void 0 : x.cell,
972
- props: (K = (D = s.warehouse) == null ? void 0 : D.getContext) == null ? void 0 : K.call(D)
973
+ V(c(Q), {
974
+ render: (x = (b = (f = r.warehouse) == null ? void 0 : f.column) == null ? void 0 : b.columnDef) == null ? void 0 : x.cell,
975
+ props: (G = (D = r.warehouse) == null ? void 0 : D.getContext) == null ? void 0 : G.call(D)
973
976
  }, null, 8, ["render", "props"])
974
977
  ]),
975
978
  g("div", xo, [
976
- V(c(J), {
977
- render: (ue = (ne = (re = s.contact) == null ? void 0 : re.column) == null ? void 0 : ne.columnDef) == null ? void 0 : ue.cell,
978
- props: (ie = (H = s.contact) == null ? void 0 : H.getContext) == null ? void 0 : ie.call(H)
979
+ V(c(Q), {
980
+ render: (ue = (ne = (re = r.contact) == null ? void 0 : re.column) == null ? void 0 : ne.columnDef) == null ? void 0 : ue.cell,
981
+ props: (ie = (K = r.contact) == null ? void 0 : K.getContext) == null ? void 0 : ie.call(K)
979
982
  }, null, 8, ["render", "props"])
980
983
  ]),
981
- (de = P.original) != null && de.email ? (S(), z("div", $o, [
982
- V(c(J), {
983
- render: (me = (pe = (ce = s.email) == null ? void 0 : ce.column) == null ? void 0 : pe.columnDef) == null ? void 0 : me.cell,
984
- props: (fe = (X = s.email) == null ? void 0 : X.getContext) == null ? void 0 : fe.call(X)
984
+ (de = P.original) != null && de.email ? (S(), B("div", $o, [
985
+ V(c(Q), {
986
+ render: (me = (pe = (ce = r.email) == null ? void 0 : ce.column) == null ? void 0 : pe.columnDef) == null ? void 0 : me.cell,
987
+ props: (fe = (H = r.email) == null ? void 0 : H.getContext) == null ? void 0 : fe.call(H)
985
988
  }, null, 8, ["render", "props"])
986
989
  ])) : Ae("", !0),
987
990
  g("div", Wo, [
988
- V(c(J), {
989
- render: (ve = (ye = (he = s.address) == null ? void 0 : he.column) == null ? void 0 : ye.columnDef) == null ? void 0 : ve.cell,
990
- props: (ge = (Y = s.address) == null ? void 0 : Y.getContext) == null ? void 0 : ge.call(Y)
991
+ V(c(Q), {
992
+ render: (ve = (ye = (he = r.address) == null ? void 0 : he.column) == null ? void 0 : ye.columnDef) == null ? void 0 : ve.cell,
993
+ props: (ge = (Z = r.address) == null ? void 0 : Z.getContext) == null ? void 0 : ge.call(Z)
991
994
  }, null, 8, ["render", "props"])
992
995
  ])
993
996
  ])
@@ -1001,10 +1004,10 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
1001
1004
  ], 2),
1002
1005
  V(Mo, {
1003
1006
  show: u.value.show,
1004
- "onUpdate:show": i[2] || (i[2] = (P) => u.value.show = P),
1007
+ "onUpdate:show": d[2] || (d[2] = (P) => u.value.show = P),
1005
1008
  warehouse: u.value.warehouse,
1006
1009
  mode: u.value.mode,
1007
- onSubmitted: i[3] || (i[3] = (P) => A(!0))
1010
+ onSubmitted: d[3] || (d[3] = (P) => A(!0))
1008
1011
  }, null, 8, ["show", "warehouse", "mode"])
1009
1012
  ]),
1010
1013
  _: 1
@@ -1013,5 +1016,5 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
1013
1016
  }
1014
1017
  });
1015
1018
  export {
1016
- Lo as default
1019
+ zo as default
1017
1020
  };