@feedmepos/mf-inventory-portal 0.0.19-dev.13 → 0.0.19-dev.15

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 (181) hide show
  1. package/dist/App.vue.d.ts +1 -1
  2. package/dist/{ApprovalView-9MdmwrUz.js → ApprovalView-CRHU3Bv0.js} +5 -5
  3. package/dist/{BindingsDialog-C-q6Y04n.js → BindingsDialog-ChIRg0d3.js} +22 -22
  4. package/dist/{BindingsPicker-syyx9h8v.js → BindingsPicker-BJAbeiDf.js} +17 -17
  5. package/dist/{BindingsTable-CQ0WyX2i.js → BindingsTable-5MxWD_qa.js} +29 -29
  6. package/dist/Entry.vue.d.ts +1 -1
  7. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D0j4VOis.js +306 -0
  8. package/dist/{IngredientsView-Ofs2UG-9.js → IngredientsView-qXrDtzSK.js} +294 -294
  9. package/dist/{IntegrationView-BCruLSTA.js → IntegrationView-D6yFqod1.js} +278 -278
  10. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Bvw_BkWY.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DGurlvYg.js} +1 -1
  11. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BLVAIHDv.js → PremiumBadge.vue_vue_type_script_setup_true_lang-2Ady4pB4.js} +1 -1
  12. package/dist/PurchaseOrderPrintPreview-BWwjMRqb.js +152 -0
  13. package/dist/{ReceiveRequestView-Dw-AC1Mw.js → ReceiveRequestView-C94SWDaj.js} +7 -7
  14. package/dist/{RecipeView-B5WkUzLO.js → RecipeView-CG9H_ZOo.js} +181 -181
  15. package/dist/Standalone.vue.d.ts +1 -1
  16. package/dist/{StockView-CMTxj8Ly.js → StockView-BdXGfDNl.js} +23 -23
  17. package/dist/SupplierView-ClL2oc8K.js +813 -0
  18. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-B8IGZmDZ.js → TransferDetails.vue_vue_type_script_setup_true_lang-DktBkwCx.js} +106 -106
  19. package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-BE95F9r1.js +1437 -0
  20. package/dist/TransferTemplateView-BXrNS8pg.js +1279 -0
  21. package/dist/{UnitView-CExCsCFg.js → UnitView-Dx2vWJXi.js} +242 -242
  22. package/dist/{WarehouseView-DuPizg7w.js → WarehouseView-UkmUZnqH.js} +360 -362
  23. package/dist/api/bill.d.ts +238 -84
  24. package/dist/api/supplier.d.ts +4 -4
  25. package/dist/app-BLzTa0Ut.js +68571 -0
  26. package/dist/app.d.ts +14 -0
  27. package/dist/app.js +3 -3
  28. package/dist/components/ChangeLocationComponent.vue.d.ts +11 -1
  29. package/dist/components/DeferableLoading.vue.d.ts +1 -1
  30. package/dist/components/DeleteDialog.vue.d.ts +1 -1
  31. package/dist/components/FmCoordinateInput.vue.d.ts +3 -3
  32. package/dist/components/FmDroppableField.vue.d.ts +6 -6
  33. package/dist/components/FmFilterableSelect.vue.d.ts +3 -3
  34. package/dist/components/FmInventoryTableToolbar.vue.d.ts +21 -10
  35. package/dist/components/FmMinMaxInput.vue.d.ts +20 -0
  36. package/dist/components/FmMinMaxInputProps.d.ts +16 -0
  37. package/dist/components/FmMinMaxInputRules.d.ts +4 -0
  38. package/dist/components/FmMultiselectDialog.vue.d.ts +5 -5
  39. package/dist/components/FmMultiselectDialogProps.d.ts +6 -1
  40. package/dist/components/FmUnitInputRules.d.ts +1 -0
  41. package/dist/components/MultiSelectDialog.vue.d.ts +1 -1
  42. package/dist/components/NavigationTab.vue.d.ts +1 -1
  43. package/dist/components/NumberPrecisionInput.vue.d.ts +3 -3
  44. package/dist/components/PremiumBadge.vue.d.ts +3 -3
  45. package/dist/components/PreviewBadge.vue.d.ts +3 -3
  46. package/dist/components/StockForecast.vue.d.ts +1 -1
  47. package/dist/components/TableActionableRow.vue.d.ts +4 -4
  48. package/dist/components/UnitDisplayControl.vue.d.ts +1 -1
  49. package/dist/components/icons/IconCommunity.vue.d.ts +1 -1
  50. package/dist/components/icons/IconDocumentation.vue.d.ts +1 -1
  51. package/dist/components/icons/IconEcosystem.vue.d.ts +1 -1
  52. package/dist/components/icons/IconSupport.vue.d.ts +1 -1
  53. package/dist/components/icons/IconTooling.vue.d.ts +1 -1
  54. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +5 -5
  55. package/dist/components/map/CoordinateDialog.vue.d.ts +4 -4
  56. package/dist/components/map/GoogleMap.vue.d.ts +6 -6
  57. package/dist/components/nested-multiselect/FmNestedMultiselectDialog.vue.d.ts +3 -3
  58. package/dist/components/shell/inventory/binding-dialog.vue.d.ts +3 -3
  59. package/dist/components/shell/inventory/binding-ui.vue.d.ts +5 -5
  60. package/dist/components/ui-library/FmDateRangePickerChip.vue.d.ts +5 -5
  61. package/dist/composable/useIframe.d.ts +1 -1
  62. package/dist/composable/useSearch.d.ts +1 -1
  63. package/dist/{decimal-GwZ2MmM_.js → decimal-DLYVb_I_.js} +1 -1
  64. package/dist/format-unit-display-D_Z4TNZd.js +668 -0
  65. package/dist/helper/number.d.ts +2 -0
  66. package/dist/{id-to-date-CMUZ2glF.js → id-to-date-CKplrnj_.js} +1 -1
  67. package/dist/is-linked-ingredient-error-fJ2TJb3z.js +37 -0
  68. package/dist/layout/InventoryLayout.vue.d.ts +1 -1
  69. package/dist/layout/SingleColumnLayout.vue.d.ts +5 -5
  70. package/dist/layout/components/NavigationButton.vue.d.ts +4 -4
  71. package/dist/{layout-C3IEOm7C.js → layout-B9sdKjL9.js} +1 -1
  72. package/dist/stores/feature.d.ts +3 -1
  73. package/dist/stores/location.d.ts +112 -148
  74. package/dist/stores/supplier.d.ts +672 -18
  75. package/dist/stores/warehouse.d.ts +9 -5
  76. package/dist/supplier-BZ6HZcYB.js +60 -0
  77. package/dist/tsconfig.app.tsbuildinfo +1 -1
  78. package/dist/views/InventoryView.vue.d.ts +1 -1
  79. package/dist/views/SelectBussinessDialog.vue.d.ts +1 -1
  80. package/dist/views/approval/ApprovalView.vue.d.ts +1 -1
  81. package/dist/views/dev/ComponentPreview.vue.d.ts +1 -1
  82. package/dist/views/dev/components/CoordinateTest.vue.d.ts +1 -1
  83. package/dist/views/dev/components/DateRange.vue.d.ts +1 -1
  84. package/dist/views/dev/components/FmDecimalInputTest.vue.d.ts +1 -1
  85. package/dist/views/dev/components/FmMultiselectDialogGrouped.vue.d.ts +1 -1
  86. package/dist/views/dev/components/FmSelectTest.vue.d.ts +1 -1
  87. package/dist/views/dev/components/InventoryIframe.vue.d.ts +1 -1
  88. package/dist/views/dev/components/LayoutDev.vue.d.ts +1 -1
  89. package/dist/views/dev/components/MfCommontTest.vue.d.ts +1 -1
  90. package/dist/views/dev/components/NestedSelection.vue.d.ts +1 -1
  91. package/dist/views/dev/components/NumberStepper.vue.d.ts +1 -1
  92. package/dist/views/dev/components/TabStorageTest.vue.d.ts +1 -1
  93. package/dist/views/dev/components/UnitInput.vue.d.ts +1 -1
  94. package/dist/views/dev/helpers/pinia-test.d.ts +1 -1
  95. package/dist/views/home/HomeView.vue.d.ts +1 -1
  96. package/dist/views/iframe/inventory-bindings/bindings-dialog/BindingsDialog.vue.d.ts +1 -1
  97. package/dist/views/iframe/inventory-bindings/bindings-picker/BindingsPicker.vue.d.ts +1 -1
  98. package/dist/views/iframe/inventory-bindings/bindings-table/BindingsTable.vue.d.ts +1 -1
  99. package/dist/views/ingredients/IngredientsView.vue.d.ts +1 -1
  100. package/dist/views/ingredients/components/cannot-delete/CannotDelete.vue.d.ts +4 -4
  101. package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +3 -3
  102. package/dist/views/ingredients/components/import-ingredients/ImportIngredientItem.vue.d.ts +1 -1
  103. package/dist/views/ingredients/components/import-ingredients/ImportIngredients.vue.d.ts +1 -1
  104. package/dist/views/ingredients/components/ingredient-binded-item/IngredientBindedItem.vue.d.ts +1 -1
  105. package/dist/views/ingredients/components/ingredient-dialog/IngredientDialog.vue.d.ts +5 -5
  106. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -4
  107. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +5 -5
  108. package/dist/views/ingredients/components/inventory-binding/InventoryBindingSummary.vue.d.ts +3 -3
  109. package/dist/views/ingredients/composables/use-ingredient-form.d.ts +8 -8
  110. package/dist/views/integration/IntegrationView.vue.d.ts +1 -1
  111. package/dist/views/integration/components/ApplyAddon.vue.d.ts +5 -5
  112. package/dist/views/integration/components/ApplyProduct.vue.d.ts +5 -5
  113. package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +5 -5
  114. package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +5 -5
  115. package/dist/views/receive-request/ReceiveRequestView.vue.d.ts +1 -1
  116. package/dist/views/receive-request/components/select-template-dialog/SelectTemplateDialog.vue.d.ts +8 -0
  117. package/dist/views/receive-request/components/supplier-price-history/SupplierPriceHistory.vue.d.ts +1 -1
  118. package/dist/views/receive-request/components/transfer-details/TransferDetails.vue.d.ts +3 -3
  119. package/dist/views/receive-request/components/transfer-dialog/TransferDialog.vue.d.ts +4 -4
  120. package/dist/views/receive-request/components/transfer-dialog/TransferDialogProps.d.ts +1 -1
  121. package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +4 -4
  122. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +27 -27
  123. package/dist/views/receive-request/components/transfer-form/TransferForm2.vue.d.ts +4 -4
  124. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +4 -4
  125. package/dist/views/receive-request/components/transfer-form/components/TransferItem.vue.d.ts +3 -3
  126. package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +3 -3
  127. package/dist/views/receive-request/components/transfer-form/composables/use-backdate-po.d.ts +4 -4
  128. package/dist/views/receive-request/components/transfer-form/composables/use-compare-price.d.ts +3 -3
  129. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +0 -8
  130. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1013 -67
  131. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +24 -24
  132. package/dist/views/receive-request/print-preview/PurchaseOrderPrintPreview.vue.d.ts +1 -1
  133. package/dist/views/recipe/RecipeView.vue.d.ts +1 -1
  134. package/dist/views/recipe/components/recipe-dialog/RecipeDialog.vue.d.ts +5 -5
  135. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +4 -4
  136. package/dist/views/recipe/composables/use-recipe-form.d.ts +8 -8
  137. package/dist/views/stock/StockView.vue.d.ts +1 -1
  138. package/dist/views/stock/components/StockHeaderPreview.vue.d.ts +1 -1
  139. package/dist/views/stock/components/StockHistory.vue.d.ts +3 -3
  140. package/dist/views/stock/components/StockRecalculateDialog.vue.d.ts +2 -2
  141. package/dist/views/stock/components/StockRecordCard.vue.d.ts +123 -46
  142. package/dist/views/stock/components/dialog/AdjustSkuDialog.vue.d.ts +4 -4
  143. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +3 -3
  144. package/dist/views/stock/components/dialog/ConvertSkuDialog.vue.d.ts +4 -4
  145. package/dist/views/stock/composables/use-stock-action.d.ts +11 -11
  146. package/dist/views/supplier/SupplierView.vue.d.ts +1 -1
  147. package/dist/views/supplier/components/SupplierDialog.vue.d.ts +4 -4
  148. package/dist/views/supplier/components/SupplierDialogProps.d.ts +1 -0
  149. package/dist/views/supplier/components/SupplierForm.vue.d.ts +10 -10
  150. package/dist/views/supplier/components/SupplierSupplyItemField.vue.d.ts +3 -3
  151. package/dist/views/supplier/composables/use-supplier-table.d.ts +3 -3
  152. package/dist/views/transfer-template/TransferTemplateView.vue.d.ts +1 -1
  153. package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetails.vue.d.ts +3 -3
  154. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +4 -4
  155. package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateForm.vue.d.ts +2 -2
  156. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItem.vue.d.ts +3 -3
  157. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +7 -7
  158. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +13 -8
  159. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +1020 -79
  160. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +309 -11
  161. package/dist/views/unit/UnitView.vue.d.ts +1 -1
  162. package/dist/views/unit/components/unit-dialog/UnitDialog.vue.d.ts +5 -5
  163. package/dist/views/unit/components/unit-form/UnitForm.vue.d.ts +4 -4
  164. package/dist/views/unit/components/unit-summary/UnitSummary.vue.d.ts +3 -3
  165. package/dist/views/unit/components/unit-used-by/UnitUsedBy.vue.d.ts +1 -1
  166. package/dist/views/unit/composables/use-unit-form.d.ts +8 -8
  167. package/dist/views/warehouse/WarehouseView.vue.d.ts +1 -1
  168. package/dist/views/warehouse/components/WarehouseDialog.vue.d.ts +4 -4
  169. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +22 -14
  170. package/dist/{xlsx-CjErNF-B.js → xlsx-C3AV6UrJ.js} +2759 -2759
  171. package/dist/{xlsx.util-CMXCCmUA.js → xlsx.util-slrhXhsk.js} +2 -2
  172. package/package.json +2 -1
  173. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DlIq3AyC.js +0 -272
  174. package/dist/PurchaseOrderPrintPreview-Do2KxBzF.js +0 -152
  175. package/dist/SupplierView-OmZ0X1E1.js +0 -801
  176. package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-BJMBsA9j.js +0 -1672
  177. package/dist/TransferTemplateView-Da6ehaJF.js +0 -1101
  178. package/dist/app-Chj8x632.js +0 -67206
  179. package/dist/is-linked-ingredient-error-C6AghEwR.js +0 -37
  180. package/dist/purchase-order-transaction-type-DpZQe_jA.js +0 -299
  181. package/dist/supplier-dG_APcwB.js +0 -54
@@ -1,32 +1,32 @@
1
- import { ref as W, defineComponent as O, watch as ee, onMounted as te, onUnmounted as Fe, openBlock as R, createElementBlock as z, toRaw as be, reactive as $e, createElementVNode as b, toDisplayString as L, unref as p, createVNode as k, resolveComponent as B, createSlots as De, withCtx as q, createTextVNode as We, renderSlot as Se, createBlock as j, createCommentVNode as xe, computed as D, isRef as we, normalizeStyle as Te } from "vue";
2
- import { n as Re, Q as Ee, T as Pe, c as G, V as ae, W as le, X as Ue, i as Le, R as N, j as Ne } from "./app-Chj8x632.js";
1
+ import { ref as W, defineComponent as O, watch as ee, onMounted as te, onUnmounted as Fe, openBlock as S, createElementBlock as j, toRaw as be, reactive as $e, createElementVNode as b, toDisplayString as L, unref as c, createVNode as k, resolveComponent as B, createSlots as De, withCtx as q, createTextVNode as We, renderSlot as Pe, createBlock as z, createCommentVNode as xe, computed as D, isRef as we, normalizeStyle as Se } from "vue";
2
+ import { n as Re, Q as Te, T as Ee, c as G, V as ae, W as le, X as Ue, i as Le, R as N, j as Ne } from "./app-BLzTa0Ut.js";
3
3
  import { useCoreStore as Be, useI18n as I } from "@feedmepos/mf-common";
4
- import { D as Ve, R as Z, F as P } from "./row-action.enum-PMKMRrZR.js";
5
- import { c as qe, _ as Ie, F as J, u as ze } from "./layout-C3IEOm7C.js";
6
- import { _ as je, a as Oe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DlIq3AyC.js";
4
+ import { D as Ve, R as Z, F as E } from "./row-action.enum-PMKMRrZR.js";
5
+ import { c as qe, _ as Ie, F as J, u as je } from "./layout-B9sdKjL9.js";
6
+ import { _ as ze, a as Oe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D0j4VOis.js";
7
7
  import { useDialogChild as Ge, useDialog as Ae, useSnackbar as se, useProxiedModel as oe, useBreakpoints as Ke } from "@feedmepos/ui-library";
8
- const Y = Re((c, m) => {
8
+ const Y = Re((p, m) => {
9
9
  const f = Be();
10
10
  return {
11
11
  async readWarehouses() {
12
- var a;
13
- const l = ((a = f.currentBusiness.value) == null ? void 0 : a._id) ?? "", s = `${c.inventoryBackendUrl}/businesses/${l}/warehouses`;
12
+ var l;
13
+ const a = ((l = f.currentBusiness.value) == null ? void 0 : l._id) ?? "", s = `${p.inventoryBackendUrl}/businesses/${a}/warehouses`;
14
14
  return await m.get(s);
15
15
  },
16
- async createWarehouse(l) {
17
- var n;
18
- const s = ((n = f.currentBusiness.value) == null ? void 0 : n._id) ?? "", a = `${c.inventoryBackendUrl}/businesses/${s}/warehouse`;
19
- return await m.post(a, l);
16
+ async createWarehouse(a) {
17
+ var u;
18
+ const s = ((u = f.currentBusiness.value) == null ? void 0 : u._id) ?? "", l = `${p.inventoryBackendUrl}/businesses/${s}/warehouse`;
19
+ return await m.post(l, a);
20
20
  },
21
- async updateWarehouse(l, s) {
21
+ async updateWarehouse(a, s) {
22
22
  var r;
23
- const a = ((r = f.currentBusiness.value) == null ? void 0 : r._id) ?? "", n = `${c.inventoryBackendUrl}/businesses/${a}/warehouse/${l}`;
24
- return await m.put(n, s);
23
+ const l = ((r = f.currentBusiness.value) == null ? void 0 : r._id) ?? "", u = `${p.inventoryBackendUrl}/businesses/${l}/warehouse/${a}`;
24
+ return await m.put(u, s);
25
25
  },
26
- async deleteWarehouse(l) {
27
- var n;
28
- const s = ((n = f.currentBusiness.value) == null ? void 0 : n._id) ?? "", a = `${c.inventoryBackendUrl}/businesses/${s}/warehouse/${l}`;
29
- return await m.delete(a);
26
+ async deleteWarehouse(a) {
27
+ var u;
28
+ const s = ((u = f.currentBusiness.value) == null ? void 0 : u._id) ?? "", l = `${p.inventoryBackendUrl}/businesses/${s}/warehouse/${a}`;
29
+ return await m.delete(l);
30
30
  }
31
31
  };
32
32
  });
@@ -36,79 +36,79 @@ function He() {
36
36
  };
37
37
  }
38
38
  const _e = W(He());
39
- function Ce() {
39
+ function Me() {
40
40
  return {
41
41
  // state
42
42
  get warehouses() {
43
43
  return _e.value.warehouses;
44
44
  },
45
- set warehouses(c) {
46
- _e.value.warehouses = c;
45
+ set warehouses(p) {
46
+ _e.value.warehouses = p;
47
47
  },
48
48
  // actions
49
49
  async readWarehouses() {
50
- const c = Y();
51
- this.warehouses = await c.readWarehouses();
50
+ const p = Y();
51
+ this.warehouses = await p.readWarehouses();
52
52
  },
53
- async createWarehouse(c) {
54
- await Y().createWarehouse(c);
53
+ async createWarehouse(p) {
54
+ await Y().createWarehouse(p);
55
55
  },
56
- async updateWarehouse(c) {
57
- await Y().updateWarehouse(c._id, c.profile);
56
+ async updateWarehouse(p) {
57
+ await Y().updateWarehouse(p._id, p.profile);
58
58
  },
59
- async deleteWarehouse(c) {
60
- await Y().deleteWarehouse(c._id);
59
+ async deleteWarehouse(p) {
60
+ await Y().deleteWarehouse(p._id);
61
61
  },
62
62
  async init() {
63
- const c = Ee();
63
+ const p = Te();
64
64
  try {
65
65
  await this.readWarehouses();
66
66
  } catch (m) {
67
- throw m instanceof Pe || c.error("Error at reading warehouses"), m;
67
+ throw m instanceof Ee || p.error("Error at reading warehouses"), m;
68
68
  }
69
69
  }
70
70
  };
71
71
  }
72
- function Qe(c, m) {
73
- function f(n, r) {
74
- if (n === Z.Edit) {
75
- c(G(r));
72
+ function Qe(p, m) {
73
+ function f(u, r) {
74
+ if (u === Z.Edit) {
75
+ p(G(r));
76
76
  return;
77
77
  }
78
- if (n === Z.Delete) {
78
+ if (u === Z.Delete) {
79
79
  m(G(r));
80
80
  return;
81
81
  }
82
82
  }
83
- const { t: l } = I(), s = [
83
+ const { t: a } = I(), s = [
84
84
  {
85
85
  accessorKey: "warehouse",
86
- header: () => l("inventory.warehouse.table.warehouse"),
86
+ header: () => a("inventory.warehouse.table.warehouse"),
87
87
  size: 200
88
88
  },
89
89
  {
90
90
  accessorKey: "contact",
91
- header: () => l("inventory.warehouse.table.contact"),
91
+ header: () => a("inventory.warehouse.table.contact"),
92
92
  size: 200
93
93
  },
94
94
  {
95
95
  accessorKey: "email",
96
- header: () => l("inventory.warehouse.table.email"),
96
+ header: () => a("inventory.warehouse.table.email"),
97
97
  size: 200
98
98
  },
99
99
  {
100
100
  accessorKey: "address",
101
- header: () => l("inventory.warehouse.table.address"),
101
+ header: () => a("inventory.warehouse.table.address"),
102
102
  size: "auto"
103
103
  },
104
104
  {
105
105
  id: "action",
106
106
  header: "",
107
- cell(n) {
107
+ cell(u) {
108
108
  return qe(
109
109
  [Ve[Z.Edit], Ve[Z.Delete]],
110
110
  (r) => {
111
- f(r, n.row.original.original);
111
+ f(r, u.row.original.original);
112
112
  }
113
113
  );
114
114
  },
@@ -120,26 +120,26 @@ function Qe(c, m) {
120
120
  }
121
121
  }
122
122
  ];
123
- function a(n) {
124
- return n.map((r) => ({
123
+ function l(u) {
124
+ return u.map((r) => ({
125
125
  original: r,
126
126
  warehouse: r.profile.name,
127
127
  contact: r.profile.phoneNo,
128
128
  email: r.profile.email,
129
129
  get address() {
130
- const u = r.profile.address;
130
+ const n = r.profile.address;
131
131
  return [
132
- u == null ? void 0 : u.line1,
133
- u == null ? void 0 : u.line2,
134
- u == null ? void 0 : u.city,
135
- u == null ? void 0 : u.postcode,
136
- u == null ? void 0 : u.state,
137
- u == null ? void 0 : u.country
132
+ n == null ? void 0 : n.line1,
133
+ n == null ? void 0 : n.line2,
134
+ n == null ? void 0 : n.city,
135
+ n == null ? void 0 : n.postcode,
136
+ n == null ? void 0 : n.state,
137
+ n == null ? void 0 : n.country
138
138
  ].map((v) => v == null ? void 0 : v.trim()).filter((v) => v).join(", ");
139
139
  }
140
140
  }));
141
141
  }
142
- return { columnDefs: s, formatRowData: a };
142
+ return { columnDefs: s, formatRowData: l };
143
143
  }
144
144
  const Xe = /* @__PURE__ */ O({
145
145
  __name: "GoogleMap",
@@ -166,53 +166,53 @@ const Xe = /* @__PURE__ */ O({
166
166
  }
167
167
  },
168
168
  emits: ["map-click", "marker-change", "polygon-change", "polygon-right-click"],
169
- setup(c, { expose: m, emit: f }) {
170
- const l = c, s = f;
169
+ setup(p, { expose: m, emit: f }) {
170
+ const a = p, s = f;
171
171
  m({
172
172
  setCenter: (d) => {
173
- var h, V;
174
- (h = r.value) == null || h.setCenter(d), (V = r.value) == null || V.setZoom(18);
173
+ var h, _;
174
+ (h = r.value) == null || h.setCenter(d), (_ = r.value) == null || _.setZoom(18);
175
175
  }
176
176
  });
177
- const { googleMap: a } = le(), n = W(), r = W(null), u = [];
178
- function _(d) {
177
+ const { googleMap: l } = le(), u = W(), r = W(null), n = [];
178
+ function V(d) {
179
179
  return {
180
180
  lat: d.latLng.lat(),
181
181
  lng: d.latLng.lng()
182
182
  };
183
183
  }
184
- function v(d, h, V) {
185
- const $ = a.maps.event.addListener(d, h, V);
186
- u.push($);
184
+ function v(d, h, _) {
185
+ const $ = l.maps.event.addListener(d, h, _);
186
+ n.push($);
187
187
  }
188
188
  const g = W([]);
189
- function A(d, h, V) {
190
- v(d, h, V);
189
+ function x(d, h, _) {
190
+ v(d, h, _);
191
191
  }
192
- function x(d) {
193
- S(null), g.value = d.map((h, V) => {
194
- const $ = new a.maps.Marker({
192
+ function A(d) {
193
+ R(null), g.value = d.map((h, _) => {
194
+ const $ = new l.maps.Marker({
195
195
  position: h,
196
196
  draggable: !0
197
197
  });
198
- return A($, "dragend", (U) => {
199
- s("marker-change", { index: V, position: _(U) });
198
+ return x($, "dragend", (U) => {
199
+ s("marker-change", { index: _, position: V(U) });
200
200
  }), $;
201
- }), S(r.value);
201
+ }), R(r.value);
202
202
  }
203
- function S(d) {
203
+ function R(d) {
204
204
  g.value.map((h) => be(h).setMap(d));
205
205
  }
206
206
  const i = W([]);
207
- function C(d, h, V) {
208
- v(d, h, V);
207
+ function M(d, h, _) {
208
+ v(d, h, _);
209
209
  }
210
- function M(d, h, V) {
211
- v(d, h, V);
210
+ function C(d, h, _) {
211
+ v(d, h, _);
212
212
  }
213
213
  function o(d) {
214
- return i.value[d].getPath().getArray().map(({ lat: V, lng: $ }) => ({
215
- lat: V(),
214
+ return i.value[d].getPath().getArray().map(({ lat: _, lng: $ }) => ({
215
+ lat: _(),
216
216
  lng: $()
217
217
  }));
218
218
  }
@@ -228,85 +228,83 @@ const Xe = /* @__PURE__ */ O({
228
228
  h.vertex !== void 0 ? t(d, h.vertex) : s("polygon-right-click", d);
229
229
  }
230
230
  function w(d) {
231
- y(null), i.value = d.map((h, V) => {
232
- const $ = new a.maps.Polygon({
231
+ y(null), i.value = d.map((h, _) => {
232
+ const $ = new l.maps.Polygon({
233
233
  paths: h.paths,
234
234
  strokeColor: h.strokeColor,
235
235
  fillColor: h.fillColor,
236
236
  fillOpacity: 0.5,
237
- editable: l.editable
237
+ editable: a.editable
238
238
  });
239
- return C($, "contextmenu", (U) => F(V, U)), $.getPaths().forEach((U) => {
240
- M(U, "insert_at", () => e(V)), M(U, "set_at", () => e(V));
239
+ return M($, "contextmenu", (U) => F(_, U)), $.getPaths().forEach((U) => {
240
+ C(U, "insert_at", () => e(_)), C(U, "set_at", () => e(_));
241
241
  }), $;
242
242
  }), y(r.value);
243
243
  }
244
244
  function y(d) {
245
245
  i.value.map((h) => be(h).setMap(d));
246
246
  }
247
- function E(d, h, V) {
248
- v(d, h, V);
247
+ function T(d, h, _) {
248
+ v(d, h, _);
249
249
  }
250
- function T() {
251
- r.value = new a.maps.Map(n.value, {
252
- center: l.center,
253
- zoom: l.zoom,
250
+ function P() {
251
+ r.value = new l.maps.Map(u.value, {
252
+ center: a.center,
253
+ zoom: a.zoom,
254
254
  mapTypeControl: !1,
255
255
  streetViewControl: !1,
256
256
  draggable: !0,
257
257
  scrollwheel: !0
258
- }), E(r.value, "click", (d) => s("map-click", _(d)));
258
+ }), T(r.value, "click", (d) => s("map-click", V(d)));
259
259
  }
260
- return ee(() => l.markers, x, { deep: !0 }), ee(() => l.polygons, w, { deep: !0 }), te(() => {
261
- !n.value || !a || (T(), x(l.markers), w(l.polygons));
260
+ return ee(() => a.markers, A, { deep: !0 }), ee(() => a.polygons, w, { deep: !0 }), te(() => {
261
+ !u.value || !l || (P(), A(a.markers), w(a.polygons));
262
262
  }), Fe(() => {
263
- u.forEach((d) => d.remove());
264
- }), (d, h) => (R(), z("div", {
263
+ n.forEach((d) => d.remove());
264
+ }), (d, h) => (S(), j("div", {
265
265
  ref_key: "mapRef",
266
- ref: n,
266
+ ref: u,
267
267
  class: "map app-map"
268
268
  }, null, 512));
269
269
  }
270
270
  });
271
271
  var re = { exports: {} };
272
- function Me(c, m = 100, f = {}) {
273
- if (typeof c != "function")
274
- throw new TypeError(`Expected the first parameter to be a function, got \`${typeof c}\`.`);
272
+ function Ce(p, m = 100, f = {}) {
273
+ if (typeof p != "function")
274
+ throw new TypeError(`Expected the first parameter to be a function, got \`${typeof p}\`.`);
275
275
  if (m < 0)
276
276
  throw new RangeError("`wait` must not be negative.");
277
- const { immediate: l } = typeof f == "boolean" ? { immediate: f } : f;
278
- let s, a, n, r, u;
279
- function _() {
280
- const g = Date.now() - r;
281
- if (g < m && g >= 0)
282
- n = setTimeout(_, m - g);
283
- else if (n = void 0, !l) {
284
- const A = s, x = a;
285
- s = void 0, a = void 0, u = c.apply(A, x);
286
- }
277
+ const { immediate: a } = typeof f == "boolean" ? { immediate: f } : f;
278
+ let s, l, u, r, n;
279
+ function V() {
280
+ const x = s, A = l;
281
+ return s = void 0, l = void 0, n = p.apply(x, A), n;
287
282
  }
288
- const v = function(...g) {
289
- if (s && this !== s)
290
- throw new Error("Debounced method called with different contexts.");
291
- s = this, a = g, r = Date.now();
292
- const A = l && !n;
293
- if (n || (n = setTimeout(_, m)), A) {
294
- const x = s, S = a;
295
- s = void 0, a = void 0, u = c.apply(x, S);
296
- }
297
- return u;
283
+ function v() {
284
+ const x = Date.now() - r;
285
+ x < m && x >= 0 ? u = setTimeout(v, m - x) : (u = void 0, a || (n = V()));
286
+ }
287
+ const g = function(...x) {
288
+ if (s && this !== s && Object.getPrototypeOf(this) === Object.getPrototypeOf(s))
289
+ throw new Error("Debounced method called with different contexts of the same prototype.");
290
+ s = this, l = x, r = Date.now();
291
+ const A = a && !u;
292
+ return u || (u = setTimeout(v, m)), A && (n = V()), n;
298
293
  };
299
- return v.clear = () => {
300
- n && (clearTimeout(n), n = void 0);
301
- }, v.flush = () => {
302
- if (!n)
303
- return;
304
- const g = s, A = a;
305
- s = void 0, a = void 0, u = c.apply(g, A), clearTimeout(n), n = void 0;
306
- }, v;
294
+ return Object.defineProperty(g, "isPending", {
295
+ get() {
296
+ return u !== void 0;
297
+ }
298
+ }), g.clear = () => {
299
+ u && (clearTimeout(u), u = void 0);
300
+ }, g.flush = () => {
301
+ u && g.trigger();
302
+ }, g.trigger = () => {
303
+ n = V(), g.clear();
304
+ }, g;
307
305
  }
308
- re.exports.debounce = Me;
309
- re.exports = Me;
306
+ re.exports.debounce = Ce;
307
+ re.exports = Ce;
310
308
  var Ze = re.exports;
311
309
  const Je = /* @__PURE__ */ Ue(Ze), 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__ */ O({
312
310
  __name: "CoordinateDialog",
@@ -320,58 +318,58 @@ const Je = /* @__PURE__ */ Ue(Ze), Ye = { class: "flex flex-col gap-24" }, eo =
320
318
  default: void 0
321
319
  }
322
320
  },
323
- setup(c) {
324
- const m = c, f = Ge(), l = le(), { t: s } = I(), a = $e(
321
+ setup(p) {
322
+ const m = p, f = Ge(), a = le(), { t: s } = I(), l = $e(
325
323
  G(m.coordinate ? m.coordinate : ae.jb)
326
- ), n = W(""), r = Je(async function() {
327
- n.value = await l.getFirstMatchingAddress(
328
- a.lat,
329
- a.lng
324
+ ), u = W(""), r = Je(async function() {
325
+ u.value = await a.getFirstMatchingAddress(
326
+ l.lat,
327
+ l.lng
330
328
  );
331
329
  }, 1e3);
332
330
  te(() => {
333
- f.emitData(G(a)), r();
331
+ f.emitData(G(l)), r();
334
332
  });
335
- function u({ position: v }) {
336
- a.lat = v.lat, a.lng = v.lng, f.emitData(G(a)), r();
333
+ function n({ position: v }) {
334
+ l.lat = v.lat, l.lng = v.lng, f.emitData(G(l)), r();
337
335
  }
338
- const _ = W();
339
- return (v, g) => (R(), z("div", Ye, [
336
+ const V = W();
337
+ return (v, g) => (S(), j("div", Ye, [
340
338
  b("div", eo, [
341
339
  b("div", null, [
342
- b("span", oo, L(p(s)("inventory.formField.coordinate.address")) + ": ", 1),
343
- b("span", to, L(n.value), 1)
340
+ b("span", oo, L(c(s)("inventory.formField.coordinate.address")) + ": ", 1),
341
+ b("span", to, L(u.value), 1)
344
342
  ]),
345
343
  b("div", null, [
346
- b("span", ao, L(p(s)("inventory.formField.coordinate.longitude")) + ": ", 1),
347
- b("span", lo, L(a.lng), 1)
344
+ b("span", ao, L(c(s)("inventory.formField.coordinate.longitude")) + ": ", 1),
345
+ b("span", lo, L(l.lng), 1)
348
346
  ]),
349
347
  b("div", null, [
350
- b("span", so, L(p(s)("inventory.formField.coordinate.latitude")) + ": ", 1),
351
- b("span", ro, L(a.lat), 1)
348
+ b("span", so, L(c(s)("inventory.formField.coordinate.latitude")) + ": ", 1),
349
+ b("span", ro, L(l.lat), 1)
352
350
  ])
353
351
  ]),
354
352
  k(Xe, {
355
353
  ref_key: "gmapRef",
356
- ref: _,
354
+ ref: V,
357
355
  class: "h-[272px] sm:h-[240px] xs:h-[240px]",
358
356
  editable: "",
359
- center: a,
360
- markers: [a],
361
- onMarkerChange: u,
362
- onMapClick: g[0] || (g[0] = (A) => u({ position: A }))
357
+ center: l,
358
+ markers: [l],
359
+ onMarkerChange: n,
360
+ onMapClick: g[0] || (g[0] = (x) => n({ position: x }))
363
361
  }, null, 8, ["center", "markers"])
364
362
  ]));
365
363
  }
366
364
  }), uo = /* @__PURE__ */ Le(no, [["__scopeId", "data-v-272f5e8b"]]);
367
- function ke([c, m]) {
365
+ function ke([p, m]) {
368
366
  return {
369
367
  lat: m,
370
- lng: c
368
+ lng: p
371
369
  };
372
370
  }
373
- function io({ lng: c, lat: m }) {
374
- return [c, m];
371
+ function io({ lng: p, lat: m }) {
372
+ return [p, m];
375
373
  }
376
374
  const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1 }, fo = /* @__PURE__ */ O({
377
375
  __name: "FmCoordinateInput",
@@ -389,17 +387,17 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
389
387
  rules: {}
390
388
  },
391
389
  emits: ["update:modelValue"],
392
- setup(c, { emit: m }) {
393
- const f = c, l = m, s = le(), a = Ae(), n = se(), r = oe(f, "modelValue"), u = W(!1), { t: _ } = I();
390
+ setup(p, { emit: m }) {
391
+ const f = p, a = m, s = le(), l = Ae(), u = se(), r = oe(f, "modelValue"), n = W(!1), { t: V } = I();
394
392
  function v(i) {
395
393
  if (i != null && i[0] && (i != null && i[1]))
396
- return _("inventory.formField.coordinate.longLat", [i[0].toFixed(3), i[1].toFixed(3)]);
394
+ return V("inventory.formField.coordinate.longLat", [i[0].toFixed(3), i[1].toFixed(3)]);
397
395
  }
398
396
  async function g(i) {
399
397
  var e, t;
400
- const C = f.modelValue, M = !C && ((e = f.address) != null && e.formatted) ? await s.getFirstMatchingCoordinate(f.address.formatted) : null, o = C ? ke(C) : M ? ke(M) : ae.jb;
401
- a.open({
402
- title: f.dialogTitle ?? f.label ?? _("inventory.formField.coordinate.pinLocation"),
398
+ const M = f.modelValue, C = !M && ((e = f.address) != null && e.formatted) ? await s.getFirstMatchingCoordinate(f.address.formatted) : null, o = M ? ke(M) : C ? ke(C) : ae.jb;
399
+ l.open({
400
+ title: f.dialogTitle ?? f.label ?? V("inventory.formField.coordinate.pinLocation"),
403
401
  closeButton: !0,
404
402
  contentComponent: uo,
405
403
  contentComponentProps: {
@@ -407,52 +405,52 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
407
405
  coordinate: o
408
406
  },
409
407
  primaryActions: {
410
- text: _("common.select"),
408
+ text: V("common.select"),
411
409
  close: !0
412
410
  },
413
411
  secondaryActions: {
414
- text: _("common.close"),
412
+ text: V("common.close"),
415
413
  close: !0
416
414
  }
417
415
  }).onPrimary(i);
418
416
  }
419
- const A = (i) => l("update:modelValue", i ? io(i) : null);
420
- async function x() {
417
+ const x = (i) => a("update:modelValue", i ? io(i) : null);
418
+ async function A() {
421
419
  if (!f.disabled) {
422
420
  if (!s.isGoogleMapReady) {
423
- n.open({
424
- title: _("common.error"),
425
- message: _("inventory.formField.coordinate.error.loadMap"),
421
+ u.open({
422
+ title: V("common.error"),
423
+ message: V("inventory.formField.coordinate.error.loadMap"),
426
424
  type: "error"
427
425
  });
428
426
  return;
429
427
  }
430
- g(A);
428
+ g(x);
431
429
  }
432
430
  }
433
- function S() {
434
- l("update:modelValue", null);
431
+ function R() {
432
+ a("update:modelValue", null);
435
433
  }
436
- return (i, C) => {
437
- const M = B("FmField"), o = B("FmButton"), e = B("FmFormGroup");
438
- return R(), z("div", co, [
434
+ return (i, M) => {
435
+ const C = B("FmField"), o = B("FmButton"), e = B("FmFormGroup");
436
+ return S(), j("div", co, [
439
437
  k(e, {
440
438
  class: "flex-1",
441
- "model-value": p(r),
439
+ "model-value": c(r),
442
440
  label: i.label,
443
441
  disabled: i.disabled,
444
442
  required: i.labelMark === "required",
445
443
  optional: i.labelMark === "optional",
446
444
  info: i.labelInfo,
447
445
  rules: i.rules,
448
- focused: u.value,
446
+ focused: n.value,
449
447
  "helper-text": i.helperText,
450
448
  "helper-state": i.helperState,
451
- onClick: C[0] || (C[0] = (t) => x())
449
+ onClick: M[0] || (M[0] = (t) => A())
452
450
  }, De({
453
451
  default: q(({ invalid: t }) => [
454
- i.modelValue && i.modelValue[0] && i.modelValue[1] ? (R(), z("div", po, [
455
- k(M, {
452
+ i.modelValue && i.modelValue[0] && i.modelValue[1] ? (S(), j("div", po, [
453
+ k(C, {
456
454
  invalid: t,
457
455
  class: "fm-typo-en-body-lg-400"
458
456
  }, {
@@ -461,9 +459,9 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
461
459
  ]),
462
460
  _: 2
463
461
  }, 1032, ["invalid"])
464
- ])) : (R(), z("div", mo, [
462
+ ])) : (S(), j("div", mo, [
465
463
  k(o, {
466
- label: p(_)("inventory.formField.coordinate.addCoordinate"),
464
+ label: c(V)("inventory.formField.coordinate.addCoordinate"),
467
465
  "prepend-icon": "add",
468
466
  variant: "plain"
469
467
  }, null, 8, ["label"])
@@ -474,16 +472,16 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
474
472
  i.$slots.label ? {
475
473
  name: "label",
476
474
  fn: q(() => [
477
- Se(i.$slots, "label")
475
+ Pe(i.$slots, "label")
478
476
  ]),
479
477
  key: "0"
480
478
  } : void 0
481
479
  ]), 1032, ["model-value", "label", "disabled", "required", "optional", "info", "rules", "focused", "helper-text", "helper-state"]),
482
- i.modelValue && i.modelValue[0] && i.modelValue[1] ? (R(), j(o, {
480
+ i.modelValue && i.modelValue[0] && i.modelValue[1] ? (S(), z(o, {
483
481
  key: 0,
484
482
  "prepend-icon": "delete",
485
483
  variant: "tertiary",
486
- onClick: C[1] || (C[1] = (t) => S())
484
+ onClick: M[1] || (M[1] = (t) => R())
487
485
  })) : xe("", !0)
488
486
  ]);
489
487
  };
@@ -495,132 +493,132 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
495
493
  disabled: { type: Boolean }
496
494
  },
497
495
  emits: ["update:modelValue", "validation-success"],
498
- setup(c, { expose: m, emit: f }) {
499
- const l = c, s = f, { t: a } = I(), n = D({
496
+ setup(p, { expose: m, emit: f }) {
497
+ const a = p, s = f, { t: l } = I(), u = D({
500
498
  get() {
501
499
  var o, e;
502
- return ((e = (o = l.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.name) ?? "";
500
+ return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.name) ?? "";
503
501
  },
504
502
  set(o) {
505
- const e = l.modelValue ?? {};
503
+ const e = a.modelValue ?? {};
506
504
  e.profile ?? (e.profile = {}), e.profile.name = o, s("update:modelValue", e);
507
505
  }
508
506
  }), r = D({
509
507
  get() {
510
508
  var o, e;
511
- return ((e = (o = l.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.regNo) ?? "";
509
+ return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.regNo) ?? "";
512
510
  },
513
511
  set(o) {
514
- const e = l.modelValue ?? {};
512
+ const e = a.modelValue ?? {};
515
513
  e.profile ?? (e.profile = {}), e.profile.regNo = o, s("update:modelValue", e);
516
514
  }
517
- }), u = D({
515
+ }), n = D({
518
516
  get() {
519
517
  var o, e, t;
520
- return ((t = (e = (o = l.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.line1) ?? "";
518
+ return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.line1) ?? "";
521
519
  },
522
520
  set(o) {
523
521
  var t;
524
- const e = l.modelValue ?? {};
522
+ const e = a.modelValue ?? {};
525
523
  e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.line1 = o, s("update:modelValue", e);
526
524
  }
527
- }), _ = D({
525
+ }), V = D({
528
526
  get() {
529
527
  var o, e, t;
530
- return ((t = (e = (o = l.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.line2) ?? "";
528
+ return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.line2) ?? "";
531
529
  },
532
530
  set(o) {
533
531
  var t;
534
- const e = l.modelValue ?? {};
532
+ const e = a.modelValue ?? {};
535
533
  e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.line2 = o, s("update:modelValue", e);
536
534
  }
537
535
  }), v = D({
538
536
  get() {
539
537
  var o, e, t;
540
- return ((t = (e = (o = l.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.city) ?? "";
538
+ return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.city) ?? "";
541
539
  },
542
540
  set(o) {
543
541
  var t;
544
- const e = l.modelValue ?? {};
542
+ const e = a.modelValue ?? {};
545
543
  e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.city = o, s("update:modelValue", e);
546
544
  }
547
545
  }), g = D({
548
546
  get() {
549
547
  var o, e, t;
550
- return ((t = (e = (o = l.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.postcode) ?? "";
548
+ return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.postcode) ?? "";
551
549
  },
552
550
  set(o) {
553
551
  var t;
554
- const e = l.modelValue ?? {};
552
+ const e = a.modelValue ?? {};
555
553
  e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.postcode = o, s("update:modelValue", e);
556
554
  }
557
- }), A = D({
555
+ }), x = D({
558
556
  get() {
559
557
  var o, e, t;
560
- return ((t = (e = (o = l.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.state) ?? "";
558
+ return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.state) ?? "";
561
559
  },
562
560
  set(o) {
563
561
  var t;
564
- const e = l.modelValue ?? {};
562
+ const e = a.modelValue ?? {};
565
563
  e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.state = o, s("update:modelValue", e);
566
564
  }
567
- }), x = D({
565
+ }), A = D({
568
566
  get() {
569
567
  var o, e, t;
570
- return ((t = (e = (o = l.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.country) ?? "";
568
+ return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.country) ?? "";
571
569
  },
572
570
  set(o) {
573
571
  var t;
574
- const e = l.modelValue ?? {};
572
+ const e = a.modelValue ?? {};
575
573
  e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.country = o, s("update:modelValue", e);
576
574
  }
577
- }), S = D({
575
+ }), R = D({
578
576
  get() {
579
577
  var o, e, t;
580
- return ((t = (e = (o = l.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.coordinates) ?? null;
578
+ return ((t = (e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.address) == null ? void 0 : t.coordinates) ?? null;
581
579
  },
582
580
  set(o) {
583
581
  var t;
584
- const e = l.modelValue ?? {};
582
+ const e = a.modelValue ?? {};
585
583
  e.profile ?? (e.profile = {}), (t = e.profile).address ?? (t.address = {}), e.profile.address.coordinates = o, s("update:modelValue", e);
586
584
  }
587
585
  }), i = D({
588
586
  get() {
589
587
  var o, e;
590
- return ((e = (o = l.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.phoneNo) ?? "";
588
+ return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.phoneNo) ?? "";
591
589
  },
592
590
  set(o) {
593
- const e = l.modelValue ?? {};
591
+ const e = a.modelValue ?? {};
594
592
  e.profile ?? (e.profile = {}), e.profile.phoneNo = o, s("update:modelValue", e);
595
593
  }
596
- }), C = D({
594
+ }), M = D({
597
595
  get() {
598
596
  var o, e;
599
- return ((e = (o = l.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.email) ?? "";
597
+ return ((e = (o = a.modelValue) == null ? void 0 : o.profile) == null ? void 0 : e.email) ?? "";
600
598
  },
601
599
  set(o) {
602
- const e = l.modelValue ?? {};
600
+ const e = a.modelValue ?? {};
603
601
  e.profile ?? (e.profile = {}), e.profile.email = o, s("update:modelValue", e);
604
602
  }
605
- }), M = W();
603
+ }), C = W();
606
604
  return m({
607
605
  validateInputs: () => {
608
606
  var o, e;
609
- (e = (o = M.value) == null ? void 0 : o.validateInputs) == null || e.call(o);
607
+ (e = (o = C.value) == null ? void 0 : o.validateInputs) == null || e.call(o);
610
608
  },
611
609
  resetInputsValidation: () => {
612
610
  var o, e;
613
- (e = (o = M.value) == null ? void 0 : o.resetInputsValidation) == null || e.call(o);
611
+ (e = (o = C.value) == null ? void 0 : o.resetInputsValidation) == null || e.call(o);
614
612
  },
615
613
  resetInputs: () => {
616
614
  var o, e;
617
- (e = (o = M.value) == null ? void 0 : o.resetInputs) == null || e.call(o);
615
+ (e = (o = C.value) == null ? void 0 : o.resetInputs) == null || e.call(o);
618
616
  }
619
617
  }), (o, e) => {
620
618
  const t = B("FmTextField"), F = B("FmPhoneNumber"), w = B("FmForm");
621
- return R(), j(w, {
619
+ return S(), z(w, {
622
620
  ref_key: "formRef",
623
- ref: M,
621
+ ref: C,
624
622
  onValidationSuccess: e[11] || (e[11] = (y) => s("validation-success"))
625
623
  }, {
626
624
  default: q(() => [
@@ -628,100 +626,100 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
628
626
  b("div", yo, [
629
627
  k(t, {
630
628
  disabled: o.disabled,
631
- rules: [p(N)()],
629
+ rules: [c(N)()],
632
630
  "label-mark": "required",
633
- label: p(a)("inventory.warehouse.companyName"),
634
- modelValue: n.value,
635
- "onUpdate:modelValue": e[0] || (e[0] = (y) => n.value = y)
631
+ label: c(l)("inventory.warehouse.companyName"),
632
+ modelValue: u.value,
633
+ "onUpdate:modelValue": e[0] || (e[0] = (y) => u.value = y)
636
634
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
637
635
  k(t, {
638
636
  disabled: o.disabled,
639
- rules: [p(N)()],
637
+ rules: [c(N)()],
640
638
  "label-mark": "required",
641
- label: p(a)("inventory.warehouse.registrationNo"),
639
+ label: c(l)("inventory.warehouse.registrationNo"),
642
640
  modelValue: r.value,
643
641
  "onUpdate:modelValue": e[1] || (e[1] = (y) => r.value = y)
644
642
  }, null, 8, ["disabled", "rules", "label", "modelValue"])
645
643
  ]),
646
644
  b("div", vo, [
647
- b("div", go, L(p(a)("inventory.warehouse.address.title")), 1),
645
+ b("div", go, L(c(l)("inventory.warehouse.address.title")), 1),
648
646
  b("div", bo, [
649
647
  k(t, {
650
648
  disabled: o.disabled,
651
- rules: [p(N)()],
649
+ rules: [c(N)()],
652
650
  "label-mark": "required",
653
- label: p(a)("inventory.warehouse.address.line1"),
654
- modelValue: u.value,
655
- "onUpdate:modelValue": e[2] || (e[2] = (y) => u.value = y)
651
+ label: c(l)("inventory.warehouse.address.line1"),
652
+ modelValue: n.value,
653
+ "onUpdate:modelValue": e[2] || (e[2] = (y) => n.value = y)
656
654
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
657
655
  k(t, {
658
656
  disabled: o.disabled,
659
657
  "label-mark": "optional",
660
- label: p(a)("inventory.warehouse.address.line2"),
661
- modelValue: _.value,
662
- "onUpdate:modelValue": e[3] || (e[3] = (y) => _.value = y)
658
+ label: c(l)("inventory.warehouse.address.line2"),
659
+ modelValue: V.value,
660
+ "onUpdate:modelValue": e[3] || (e[3] = (y) => V.value = y)
663
661
  }, null, 8, ["disabled", "label", "modelValue"]),
664
662
  k(t, {
665
663
  disabled: o.disabled,
666
- rules: [p(N)()],
664
+ rules: [c(N)()],
667
665
  "label-mark": "required",
668
- label: p(a)("inventory.warehouse.address.city"),
666
+ label: c(l)("inventory.warehouse.address.city"),
669
667
  modelValue: v.value,
670
668
  "onUpdate:modelValue": e[4] || (e[4] = (y) => v.value = y)
671
669
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
672
670
  k(t, {
673
671
  disabled: o.disabled,
674
- rules: [p(N)()],
672
+ rules: [c(N)()],
675
673
  "label-mark": "required",
676
- label: p(a)("inventory.warehouse.address.postcode"),
674
+ label: c(l)("inventory.warehouse.address.postcode"),
677
675
  modelValue: g.value,
678
676
  "onUpdate:modelValue": e[5] || (e[5] = (y) => g.value = y)
679
677
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
680
678
  k(t, {
681
679
  disabled: o.disabled,
682
- rules: [p(N)()],
680
+ rules: [c(N)()],
683
681
  "label-mark": "required",
684
- label: p(a)("inventory.warehouse.address.state"),
685
- modelValue: A.value,
686
- "onUpdate:modelValue": e[6] || (e[6] = (y) => A.value = y)
682
+ label: c(l)("inventory.warehouse.address.state"),
683
+ modelValue: x.value,
684
+ "onUpdate:modelValue": e[6] || (e[6] = (y) => x.value = y)
687
685
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
688
686
  k(t, {
689
687
  disabled: o.disabled,
690
- rules: [p(N)()],
688
+ rules: [c(N)()],
691
689
  "label-mark": "required",
692
- label: p(a)("inventory.warehouse.address.country"),
693
- modelValue: x.value,
694
- "onUpdate:modelValue": e[7] || (e[7] = (y) => x.value = y)
690
+ label: c(l)("inventory.warehouse.address.country"),
691
+ modelValue: A.value,
692
+ "onUpdate:modelValue": e[7] || (e[7] = (y) => A.value = y)
695
693
  }, null, 8, ["disabled", "rules", "label", "modelValue"])
696
694
  ])
697
695
  ]),
698
696
  b("div", wo, [
699
- b("div", Vo, L(p(a)("inventory.warehouse.coordinate.title")), 1),
697
+ b("div", Vo, L(c(l)("inventory.warehouse.coordinate.title")), 1),
700
698
  k(fo, {
701
699
  disabled: o.disabled,
702
- rules: [p(N)()],
700
+ rules: [c(N)()],
703
701
  "label-mark": "required",
704
- modelValue: S.value,
705
- "onUpdate:modelValue": e[8] || (e[8] = (y) => S.value = y)
702
+ modelValue: R.value,
703
+ "onUpdate:modelValue": e[8] || (e[8] = (y) => R.value = y)
706
704
  }, null, 8, ["disabled", "rules", "modelValue"])
707
705
  ]),
708
706
  b("div", _o, [
709
- b("div", ko, L(p(a)("inventory.warehouse.contact.title")), 1),
707
+ b("div", ko, L(c(l)("inventory.warehouse.contact.title")), 1),
710
708
  b("div", xo, [
711
709
  k(F, {
712
710
  disabled: o.disabled,
713
- rules: [p(N)()],
711
+ rules: [c(N)()],
714
712
  "label-mark": "required",
715
- label: p(a)("inventory.warehouse.contact.phoneNumber"),
713
+ label: c(l)("inventory.warehouse.contact.phoneNumber"),
716
714
  modelValue: i.value,
717
715
  "onUpdate:modelValue": e[9] || (e[9] = (y) => i.value = y)
718
716
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
719
717
  k(t, {
720
718
  disabled: o.disabled,
721
719
  "label-mark": "optional",
722
- label: p(a)("inventory.warehouse.contact.email"),
723
- modelValue: C.value,
724
- "onUpdate:modelValue": e[10] || (e[10] = (y) => C.value = y)
720
+ label: c(l)("inventory.warehouse.contact.email"),
721
+ modelValue: M.value,
722
+ "onUpdate:modelValue": e[10] || (e[10] = (y) => M.value = y)
725
723
  }, null, 8, ["disabled", "label", "modelValue"])
726
724
  ])
727
725
  ])
@@ -731,7 +729,7 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
731
729
  }, 512);
732
730
  };
733
731
  }
734
- }), Co = { class: "flex gap-4" }, Mo = /* @__PURE__ */ O({
732
+ }), Mo = { class: "flex gap-4" }, Co = /* @__PURE__ */ O({
735
733
  __name: "WarehouseDialog",
736
734
  props: {
737
735
  mode: {},
@@ -739,24 +737,24 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
739
737
  show: { type: Boolean }
740
738
  },
741
739
  emits: ["update:show", "submitted"],
742
- setup(c, { expose: m, emit: f }) {
743
- const l = c, s = f, a = W(!1), n = se(), { t: r } = I(), u = Ce(), _ = D(() => {
744
- switch (l.mode) {
745
- case P.READ:
740
+ setup(p, { expose: m, emit: f }) {
741
+ const a = p, s = f, l = W(!1), u = se(), { t: r } = I(), n = Me(), V = D(() => {
742
+ switch (a.mode) {
743
+ case E.READ:
746
744
  return "";
747
- case P.UPDATE:
745
+ case E.UPDATE:
748
746
  return r("inventory.warehouse.update.title");
749
- case P.CREATE:
747
+ case E.CREATE:
750
748
  return r("inventory.warehouse.create.title");
751
749
  }
752
750
  return "";
753
751
  }), v = D(() => {
754
- switch (l.mode) {
755
- case P.READ:
752
+ switch (a.mode) {
753
+ case E.READ:
756
754
  return "";
757
- case P.UPDATE:
755
+ case E.UPDATE:
758
756
  return r("common.save");
759
- case P.CREATE:
757
+ case E.CREATE:
760
758
  return r("common.add");
761
759
  }
762
760
  return "";
@@ -775,104 +773,104 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
775
773
  (e = (o = g.value) == null ? void 0 : o.resetInputs) == null || e.call(o);
776
774
  }
777
775
  });
778
- const A = oe(l, "show"), x = oe(l, "warehouse");
779
- function S() {
776
+ const x = oe(a, "show"), A = oe(a, "warehouse");
777
+ function R() {
780
778
  var o, e;
781
779
  (e = (o = g.value) == null ? void 0 : o.validateInputs) == null || e.call(o);
782
780
  }
783
781
  function i() {
784
- switch (l.mode) {
785
- case P.READ:
782
+ switch (a.mode) {
783
+ case E.READ:
786
784
  return;
787
- case P.UPDATE:
788
- return M();
789
- case P.CREATE:
785
+ case E.UPDATE:
790
786
  return C();
787
+ case E.CREATE:
788
+ return M();
791
789
  }
792
790
  }
793
- async function C() {
791
+ async function M() {
794
792
  var o, e;
795
- a.value = !0;
793
+ l.value = !0;
796
794
  try {
797
795
  await Promise.all([
798
- u.createWarehouse(x.value),
796
+ n.createWarehouse(A.value),
799
797
  new Promise((t) => setTimeout(t, 1e3))
800
- ]), n.open({
798
+ ]), u.open({
801
799
  title: r("common.success"),
802
- message: r("inventory.warehouse.create.success", { name: (e = (o = x.value) == null ? void 0 : o.profile) == null ? void 0 : e.name }),
800
+ message: r("inventory.warehouse.create.success", { name: (e = (o = A.value) == null ? void 0 : o.profile) == null ? void 0 : e.name }),
803
801
  type: "success"
804
802
  }), s("update:show", !1), s("submitted");
805
803
  } catch (t) {
806
- n.open({
804
+ u.open({
807
805
  title: r("inventory.warehouse.create.error.title"),
808
806
  message: r("inventory.warehouse.create.error.message"),
809
807
  type: "error"
810
808
  }), console.error("cannot create warehouse", t);
811
809
  } finally {
812
- a.value = !1;
810
+ l.value = !1;
813
811
  }
814
812
  }
815
- async function M() {
813
+ async function C() {
816
814
  var o, e;
817
- if (x.value === null) {
818
- n.open({
815
+ if (A.value === null) {
816
+ u.open({
819
817
  title: r("inventory.warehouse.update.error.title"),
820
818
  message: r("inventory.warehouse.update.error.emptyWarehouse"),
821
819
  type: "error"
822
820
  });
823
821
  return;
824
822
  }
825
- a.value = !0;
823
+ l.value = !0;
826
824
  try {
827
825
  await Promise.all([
828
- u.updateWarehouse(x.value),
826
+ n.updateWarehouse(A.value),
829
827
  new Promise((t) => setTimeout(t, 1e3))
830
- ]), n.open({
828
+ ]), u.open({
831
829
  title: r("common.success"),
832
- message: r("inventory.warehouse.update.success", { name: (e = (o = x.value) == null ? void 0 : o.profile) == null ? void 0 : e.name }),
830
+ message: r("inventory.warehouse.update.success", { name: (e = (o = A.value) == null ? void 0 : o.profile) == null ? void 0 : e.name }),
833
831
  type: "success"
834
832
  }), s("update:show", !1), s("submitted");
835
833
  } catch (t) {
836
- n.open({
834
+ u.open({
837
835
  title: r("inventory.warehouse.update.error.title"),
838
836
  message: r("inventory.warehouse.update.error.message"),
839
837
  type: "error"
840
838
  }), console.error("cannot update warehouse", t);
841
839
  } finally {
842
- a.value = !1;
840
+ l.value = !1;
843
841
  }
844
842
  }
845
843
  return (o, e) => {
846
844
  const t = B("FmButton"), F = B("FmSideSheet");
847
- return R(), j(F, {
848
- header: _.value,
849
- modelValue: p(A),
850
- "onUpdate:modelValue": e[1] || (e[1] = (w) => we(A) ? A.value = w : null),
851
- "dismiss-away": !a.value,
845
+ return S(), z(F, {
846
+ header: V.value,
847
+ modelValue: c(x),
848
+ "onUpdate:modelValue": e[1] || (e[1] = (w) => we(x) ? x.value = w : null),
849
+ "dismiss-away": !l.value,
852
850
  "close-button": "",
853
851
  "max-width": 500
854
852
  }, {
855
853
  default: q(() => {
856
854
  var w;
857
855
  return [
858
- (R(), j(Ao, {
856
+ (S(), z(Ao, {
859
857
  class: "w-full",
860
858
  ref_key: "formRef",
861
859
  ref: g,
862
- modelValue: p(x),
863
- "onUpdate:modelValue": e[0] || (e[0] = (y) => we(x) ? x.value = y : null),
860
+ modelValue: c(A),
861
+ "onUpdate:modelValue": e[0] || (e[0] = (y) => we(A) ? A.value = y : null),
864
862
  onValidationSuccess: i,
865
863
  key: ((w = o.warehouse) == null ? void 0 : w._id) ?? "",
866
- disabled: a.value
864
+ disabled: l.value
867
865
  }, null, 8, ["modelValue", "disabled"]))
868
866
  ];
869
867
  }),
870
868
  "side-sheet-footer": q(() => [
871
- b("div", Co, [
869
+ b("div", Mo, [
872
870
  k(t, {
873
- loading: a.value,
871
+ loading: l.value,
874
872
  label: v.value,
875
- onClick: S
873
+ onClick: R
876
874
  }, null, 8, ["loading", "label"])
877
875
  ])
878
876
  ]),
@@ -880,24 +878,24 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
880
878
  }, 8, ["header", "modelValue", "dismiss-away"]);
881
879
  };
882
880
  }
883
- }), Fo = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, $o = { class: "flex flex-col py-8" }, Do = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, So = {
881
+ }), Fo = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, $o = { class: "flex flex-col py-8" }, Do = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Po = {
884
882
  key: 0,
885
883
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
886
- }, To = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary line-clamp-3" }, qo = /* @__PURE__ */ O({
884
+ }, So = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary line-clamp-3" }, qo = /* @__PURE__ */ O({
887
885
  __name: "WarehouseView",
888
- setup(c) {
889
- const m = Ce(), f = Ne(), l = D(() => m.warehouses), s = Ae(), a = se(), n = W(!1), { t: r } = I();
886
+ setup(p) {
887
+ const m = Me(), f = Ne(), a = D(() => m.warehouses), s = Ae(), l = se(), u = W(!1), { t: r } = I();
890
888
  te(() => {
891
- f._currentLocation && M();
889
+ f._currentLocation && C();
892
890
  }), ee([() => f._currentLocation], () => {
893
- f._currentLocation && M();
891
+ f._currentLocation && C();
894
892
  });
895
- const u = W({});
896
- function _() {
897
- u.value.mode = P.CREATE, u.value.warehouse = {}, u.value.show = !0;
893
+ const n = W({});
894
+ function V() {
895
+ n.value.mode = E.CREATE, n.value.warehouse = {}, n.value.show = !0;
898
896
  }
899
897
  function v(F) {
900
- u.value.mode = P.UPDATE, u.value.warehouse = F, u.value.show = !0;
898
+ n.value.mode = E.UPDATE, n.value.warehouse = F, n.value.show = !0;
901
899
  }
902
900
  async function g(F) {
903
901
  s.open({
@@ -912,22 +910,22 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
912
910
  text: "Cancel",
913
911
  close: !0
914
912
  }
915
- }).onPrimary(() => A(F));
913
+ }).onPrimary(() => x(F));
916
914
  }
917
- async function A(F) {
915
+ async function x(F) {
918
916
  const { t: w } = I();
919
917
  s.open({
920
918
  title: w("inventory.warehouse.delete.deletingWarehouse"),
921
919
  closeButton: !1
922
920
  });
923
921
  try {
924
- await m.deleteWarehouse(F), a.open({
922
+ await m.deleteWarehouse(F), l.open({
925
923
  title: w("inventory.warehouse.delete.success"),
926
924
  message: w("inventory.warehouse.delete.deletedWarehouse", { name: F.profile.name }),
927
925
  type: "success"
928
- }), await M(!0);
926
+ }), await C(!0);
929
927
  } catch (y) {
930
- a.open({
928
+ l.open({
931
929
  title: w("inventory.warehouse.delete.error"),
932
930
  message: w("inventory.warehouse.delete.errorMessage", { name: F.profile.name }),
933
931
  type: "error"
@@ -936,35 +934,35 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
936
934
  s.close();
937
935
  }
938
936
  }
939
- const { columnDefs: x, formatRowData: S } = Qe(
937
+ const { columnDefs: A, formatRowData: R } = Qe(
940
938
  v,
941
939
  g
942
940
  );
943
941
  function i(F) {
944
- F === "create" && _();
942
+ F === "create" && V();
945
943
  }
946
- const C = W("");
947
- async function M(F = !1) {
948
- n.value = !0;
944
+ const M = W("");
945
+ async function C(F = !1) {
946
+ u.value = !0;
949
947
  try {
950
948
  await m.readWarehouses(), F && await f.readLocations();
951
949
  } catch {
952
- a.open({
950
+ l.open({
953
951
  title: "Cannot fetch warehouse list",
954
952
  type: "error"
955
953
  });
956
954
  } finally {
957
- n.value = !1;
955
+ u.value = !1;
958
956
  }
959
957
  }
960
- const { breakpoints: o } = Ke(), e = D(() => o.value.xs || o.value.sm ? 10 : 20), t = ze();
958
+ const { breakpoints: o } = Ke(), e = D(() => o.value.xs || o.value.sm ? 10 : 20), t = je();
961
959
  return (F, w) => {
962
960
  const y = B("FmTable");
963
- return R(), j(je, {
964
- title: p(r)("inventory.warehouse.title"),
961
+ return S(), z(ze, {
962
+ title: c(r)("inventory.warehouse.title"),
965
963
  actions: [
966
964
  {
967
- label: p(r)("inventory.warehouse.create.title"),
965
+ label: c(r)("inventory.warehouse.create.title"),
968
966
  value: "create",
969
967
  isPrimary: !0,
970
968
  prependIcon: "add"
@@ -977,50 +975,50 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
977
975
  k(Oe, {
978
976
  searchable: "",
979
977
  "change-location": "",
980
- search: C.value,
981
- "onUpdate:search": w[0] || (w[0] = (E) => C.value = E)
978
+ search: M.value,
979
+ "onUpdate:search": w[0] || (w[0] = (T) => M.value = T)
982
980
  }, null, 8, ["search"]),
983
- (R(), j(y, {
984
- style: Te(p(t).tableHeight),
985
- "column-defs": p(x),
986
- "row-data": p(S)(l.value),
987
- "search-value": C.value,
988
- loading: !p(f)._currentLocation || n.value,
989
- onRowClick: w[1] || (w[1] = (E) => v(E.original.original)),
990
- key: l.value.length,
981
+ (S(), z(y, {
982
+ style: Se(c(t).tableHeight),
983
+ "column-defs": c(A),
984
+ "row-data": c(R)(a.value),
985
+ "search-value": M.value,
986
+ loading: !c(f)._currentLocation || u.value,
987
+ onRowClick: w[1] || (w[1] = (T) => v(T.original.original)),
988
+ key: a.value.length,
991
989
  "page-size": e.value
992
990
  }, {
993
- "list-row": q((E) => [
991
+ "list-row": q((T) => [
994
992
  k(Ie, {
995
- row: E,
996
- onRowClick: (T) => v(T.original)
993
+ row: T,
994
+ onRowClick: (P) => v(P.original)
997
995
  }, {
998
- default: q((T) => {
999
- var d, h, V, $, U, K, ne, ue, H, ie, de, ce, pe, me, Q, fe, he, ye, ve, X, ge;
996
+ default: q((P) => {
997
+ var d, h, _, $, U, K, ne, ue, H, ie, de, ce, pe, me, Q, fe, he, ye, ve, X, ge;
1000
998
  return [
1001
999
  b("div", $o, [
1002
1000
  b("div", Do, [
1003
- k(p(J), {
1004
- render: (V = (h = (d = T.warehouse) == null ? void 0 : d.column) == null ? void 0 : h.columnDef) == null ? void 0 : V.cell,
1005
- props: (U = ($ = T.warehouse) == null ? void 0 : $.getContext) == null ? void 0 : U.call($)
1001
+ k(c(J), {
1002
+ render: (_ = (h = (d = P.warehouse) == null ? void 0 : d.column) == null ? void 0 : h.columnDef) == null ? void 0 : _.cell,
1003
+ props: (U = ($ = P.warehouse) == null ? void 0 : $.getContext) == null ? void 0 : U.call($)
1006
1004
  }, null, 8, ["render", "props"])
1007
1005
  ]),
1008
1006
  b("div", Wo, [
1009
- k(p(J), {
1010
- render: (ue = (ne = (K = T.contact) == null ? void 0 : K.column) == null ? void 0 : ne.columnDef) == null ? void 0 : ue.cell,
1011
- props: (ie = (H = T.contact) == null ? void 0 : H.getContext) == null ? void 0 : ie.call(H)
1007
+ k(c(J), {
1008
+ render: (ue = (ne = (K = P.contact) == null ? void 0 : K.column) == null ? void 0 : ne.columnDef) == null ? void 0 : ue.cell,
1009
+ props: (ie = (H = P.contact) == null ? void 0 : H.getContext) == null ? void 0 : ie.call(H)
1012
1010
  }, null, 8, ["render", "props"])
1013
1011
  ]),
1014
- (de = E.original) != null && de.email ? (R(), z("div", So, [
1015
- k(p(J), {
1016
- render: (me = (pe = (ce = T.email) == null ? void 0 : ce.column) == null ? void 0 : pe.columnDef) == null ? void 0 : me.cell,
1017
- props: (fe = (Q = T.email) == null ? void 0 : Q.getContext) == null ? void 0 : fe.call(Q)
1012
+ (de = T.original) != null && de.email ? (S(), j("div", Po, [
1013
+ k(c(J), {
1014
+ render: (me = (pe = (ce = P.email) == null ? void 0 : ce.column) == null ? void 0 : pe.columnDef) == null ? void 0 : me.cell,
1015
+ props: (fe = (Q = P.email) == null ? void 0 : Q.getContext) == null ? void 0 : fe.call(Q)
1018
1016
  }, null, 8, ["render", "props"])
1019
1017
  ])) : xe("", !0),
1020
- b("div", To, [
1021
- k(p(J), {
1022
- render: (ve = (ye = (he = T.address) == null ? void 0 : he.column) == null ? void 0 : ye.columnDef) == null ? void 0 : ve.cell,
1023
- props: (ge = (X = T.address) == null ? void 0 : X.getContext) == null ? void 0 : ge.call(X)
1018
+ b("div", So, [
1019
+ k(c(J), {
1020
+ render: (ve = (ye = (he = P.address) == null ? void 0 : he.column) == null ? void 0 : ye.columnDef) == null ? void 0 : ve.cell,
1021
+ props: (ge = (X = P.address) == null ? void 0 : X.getContext) == null ? void 0 : ge.call(X)
1024
1022
  }, null, 8, ["render", "props"])
1025
1023
  ])
1026
1024
  ])
@@ -1032,12 +1030,12 @@ const co = { class: "flex gap-8 items-center" }, po = { key: 0 }, mo = { key: 1
1032
1030
  _: 1
1033
1031
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
1034
1032
  ]),
1035
- k(Mo, {
1036
- show: u.value.show,
1037
- "onUpdate:show": w[2] || (w[2] = (E) => u.value.show = E),
1038
- warehouse: u.value.warehouse,
1039
- mode: u.value.mode,
1040
- onSubmitted: w[3] || (w[3] = (E) => M(!0))
1033
+ k(Co, {
1034
+ show: n.value.show,
1035
+ "onUpdate:show": w[2] || (w[2] = (T) => n.value.show = T),
1036
+ warehouse: n.value.warehouse,
1037
+ mode: n.value.mode,
1038
+ onSubmitted: w[3] || (w[3] = (T) => C(!0))
1041
1039
  }, null, 8, ["show", "warehouse", "mode"])
1042
1040
  ]),
1043
1041
  _: 1