@feedmepos/mf-inventory-portal 0.0.22-dev.4 → 0.0.22-dev.40

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 (106) hide show
  1. package/dist/{ApprovalView-xF73Z1jN.js → ApprovalView-JOsQBu1z.js} +25 -26
  2. package/dist/{BindingsDialog-CCSAxGT4.js → BindingsDialog-DG2ZolH1.js} +9 -9
  3. package/dist/{BindingsPicker-ErFH0uEQ.js → BindingsPicker-B7h_iST8.js} +22 -22
  4. package/dist/{BindingsTable-D8ffJgIJ.js → BindingsTable-BToh6gcG.js} +1 -1
  5. package/dist/ClosingTemplateView-BwMJAxuz.js +1688 -0
  6. package/dist/FmDroppableField-CJNAT3h2.js +152 -0
  7. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-4NHQdjz7.js +266 -0
  8. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Cc_P0kss.js +364 -0
  9. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-DMOalXUS.js +51 -0
  10. package/dist/IngredientsView-ChnCqdWi.js +1611 -0
  11. package/dist/{IntegrationView-54yz2EqS.js → IntegrationView-NWkc9PLW.js} +71 -71
  12. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CKvKlCk-.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BQW6HYyD.js} +1 -1
  13. package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-BQqcpZIJ.js +116 -0
  14. package/dist/{PurchaseOrderPrintPreview-pcpWSfl4.js → PurchaseOrderPrintPreview-BvED8ZbQ.js} +7 -7
  15. package/dist/ReceiveRequestView-DdxBaqmU.js +4069 -0
  16. package/dist/RecipeView-YdSRy_yP.js +591 -0
  17. package/dist/Standalone.vue.d.ts +2 -0
  18. package/dist/StockView-WF5z4dTF.js +7762 -0
  19. package/dist/{SupplierView-TYCkPXan.js → SupplierView-H2Vi5lSs.js} +111 -111
  20. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-D48gSqHW.js +1137 -0
  21. package/dist/TransferTemplateView-DeT32cat.js +2054 -0
  22. package/dist/{UnitView-B9yE4-rc.js → UnitView-qD9JSdHT.js} +18 -18
  23. package/dist/{WarehouseView-DUtVLTjb.js → WarehouseView-C19Dd53y.js} +176 -177
  24. package/dist/api/bill.d.ts +84 -238
  25. package/dist/api/closing-template.d.ts +6 -4
  26. package/dist/api/inventory.d.ts +72 -85
  27. package/dist/api/netsuite.d.ts +47 -0
  28. package/dist/api/purchase-order-template.d.ts +4 -6
  29. package/dist/{app-w8TOQVZc.js → app-DKE_n9Mo.js} +24520 -23671
  30. package/dist/app.d.ts +7 -0
  31. package/dist/app.js +3 -3
  32. package/dist/components/FmFilterableMenuOptions.vue.d.ts +54 -0
  33. package/dist/components/FmMinMaxInputRules.d.ts +2 -0
  34. package/dist/components/FmUnitInputRules.d.ts +2 -0
  35. package/dist/components/map/GoogleMap.vue.d.ts +4 -4
  36. package/dist/{decimal-C4q7UMfr.js → decimal-veoPLYim.js} +1 -1
  37. package/dist/defineDeepModel-u6t3hXU9.js +13 -0
  38. package/dist/format-time-from-id-8gjg5B98.js +15 -0
  39. package/dist/helper/rules.d.ts +7 -0
  40. package/dist/helper/rules.spec.d.ts +1 -0
  41. package/dist/helper/xlsx.util.d.ts +7 -0
  42. package/dist/purchase-order-transaction-type-CIDEpjJB.js +348 -0
  43. package/dist/stores/api.d.ts +1 -0
  44. package/dist/stores/feature.d.ts +0 -1
  45. package/dist/stores/helper/core-store-proxy.d.ts +3 -0
  46. package/dist/stores/helper/generate-backend-urls.d.ts +1 -0
  47. package/dist/stores/inventory.d.ts +85 -0
  48. package/dist/stores/location.d.ts +508 -503
  49. package/dist/stores/netsuite.d.ts +69 -0
  50. package/dist/stores/route.d.ts +0 -5
  51. package/dist/stores/supplier.d.ts +120 -3
  52. package/dist/style.css +1 -1
  53. package/dist/supplier-DLcmVScz.js +70 -0
  54. package/dist/tsconfig.app.tsbuildinfo +1 -1
  55. package/dist/use-template-enabled-locations-2-CdJVJikY.js +85 -0
  56. package/dist/views/closing-template/closing-template-import/ClosingTemplateImportItem.vue.d.ts +12 -0
  57. package/dist/views/closing-template/closing-template-import/ClosingTemplateImportItemProps.d.ts +7 -0
  58. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +1093 -1026
  59. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +1098 -1037
  60. package/dist/views/closing-template/helpers/import-export.helper.d.ts +58 -0
  61. package/dist/views/ingredients/composables/use-ingredient-form.d.ts +2 -2
  62. package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +1 -0
  63. package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +45 -0
  64. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +1944 -82
  65. package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +1 -0
  66. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +2351 -284
  67. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +2300 -233
  68. package/dist/views/recipe/composables/use-recipe-form.d.ts +2 -2
  69. package/dist/views/stock/components/StockRecordCard.vue.d.ts +42 -119
  70. package/dist/views/stock/composables/use-stock-action.d.ts +2 -2
  71. package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetails.vue.d.ts +0 -2
  72. package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetailsProps.d.ts +0 -1
  73. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations-2.d.ts +13 -0
  74. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +71 -85
  75. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +39 -2
  76. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImport.vue.d.ts +2 -0
  77. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItem.vue.d.ts +12 -0
  78. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItemProps.d.ts +9 -0
  79. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +1263 -1466
  80. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +1688 -897
  81. package/dist/views/transfer-template/helpers/import-export.helper.d.ts +76 -0
  82. package/dist/views/transfer-template/helpers/remove-deleted-skus.helper.d.ts +1 -0
  83. package/dist/views/transfer-template/helpers/template-item.error.helper.d.ts +1 -0
  84. package/dist/views/unit/composables/use-unit-form.d.ts +2 -2
  85. package/dist/{xlsx-BggStaH1.js → xlsx-CrKrCGZz.js} +1525 -1525
  86. package/dist/xlsx.util-Bcpkvw1Z.js +78 -0
  87. package/package.json +5 -5
  88. package/dist/ClosingTemplateView-DdZlX1ug.js +0 -1030
  89. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-ZYtBNoaE.js +0 -372
  90. package/dist/IngredientsView-DnwwQJTN.js +0 -1758
  91. package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-Bom_KvXW.js +0 -88
  92. package/dist/ReceiveRequestView-D5HXMY4Z.js +0 -215
  93. package/dist/RecipeView-BHkTgm5H.js +0 -581
  94. package/dist/StockView-iczCFYxn.js +0 -1892
  95. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-EN3JgHKF.js +0 -740
  96. package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-DC0Ss5hi.js +0 -1409
  97. package/dist/TransferTemplateView-Bbvpuys7.js +0 -1230
  98. package/dist/defineDeepModel-BOApqV24.js +0 -13
  99. package/dist/format-time-from-id-Cafjo8fn.js +0 -15
  100. package/dist/id-to-date-CtSHSVJF.js +0 -30
  101. package/dist/layout/layout-routes.d.ts +0 -6
  102. package/dist/purchase-order-transaction-type-CIC5h-6x.js +0 -712
  103. package/dist/supplier-CM-vZ4bQ.js +0 -69
  104. package/dist/use-template-enabled-locations-Bm00vEzC.js +0 -57
  105. package/dist/xlsx.util-CqlYZLKW.js +0 -109
  106. /package/dist/{layout/InventoryLayout.vue.d.ts → views/closing-template/closing-template-import/ClosingTemplateImport.vue.d.ts} +0 -0
@@ -1,15 +1,15 @@
1
- import { defineComponent as W, mergeModels as xe, computed as b, useModel as ke, resolveComponent as P, openBlock as U, createElementBlock as B, createElementVNode as r, createVNode as m, withCtx as N, toDisplayString as T, unref as l, Fragment as Ce, renderList as Ie, ref as L, createBlock as z, createCommentVNode as Z, isRef as ve, watch as Me, onMounted as $e, normalizeClass as Ae, normalizeStyle as Ue, Teleport as De } from "vue";
2
- import { u as ge } from "./supplier-CM-vZ4bQ.js";
1
+ import { defineComponent as W, mergeModels as xe, computed as b, useModel as ke, resolveComponent as P, openBlock as D, createElementBlock as B, createElementVNode as r, createVNode as m, withCtx as N, toDisplayString as T, unref as l, Fragment as Ce, renderList as Ie, ref as L, createBlock as z, createCommentVNode as Z, isRef as ve, watch as Me, onMounted as $e, normalizeClass as Ae, normalizeStyle as De, Teleport as Fe } from "vue";
2
+ import { u as ge } from "./supplier-DLcmVScz.js";
3
3
  import { D as fe, R as J, F as A } from "./row-action.enum-PMKMRrZR.js";
4
- import { c as Fe, _ as Re, F as Q } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
5
- import { c as ee, u as Ve, a3 as Pe, d as ye, g as Ne, y as Ee, C as X, h as Te, R as F, b as _e, j as he } from "./app-w8TOQVZc.js";
4
+ import { c as Ue, _ as Re, F as Q } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
5
+ import { c as ee, u as Ve, a3 as Pe, d as ye, g as Ne, y as Ee, C as X, h as Te, i as _e, R as U, b as he } from "./app-DKE_n9Mo.js";
6
6
  import { useI18n as q, useCoreStore as Be } from "@feedmepos/mf-common";
7
7
  import { useDialog as Se, useSnackbar as we, useProxiedModel as be, useBreakpoints as Le } from "@feedmepos/ui-library";
8
- import { u as ze, _ as qe, a as Ye } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-ZYtBNoaE.js";
8
+ import { u as ze, _ as qe, a as Ye } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Cc_P0kss.js";
9
9
  import { _ as He } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
10
10
  function Ke(R, C) {
11
11
  const { t: h } = q();
12
- function o(f, a) {
12
+ function s(f, a) {
13
13
  if (f === J.Edit) {
14
14
  R(ee(a));
15
15
  return;
@@ -48,10 +48,10 @@ function Ke(R, C) {
48
48
  id: "action",
49
49
  header: "",
50
50
  cell(f) {
51
- return Fe(
51
+ return Ue(
52
52
  [fe[J.Edit], fe[J.Delete]],
53
53
  (a) => {
54
- o(a, f.row.original);
54
+ s(a, f.row.original);
55
55
  }
56
56
  );
57
57
  },
@@ -63,7 +63,7 @@ function Ke(R, C) {
63
63
  }
64
64
  ] };
65
65
  }
66
- const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, Oe = { class: "flex items-center gap-8 py-8" }, Je = { class: "flex-1" }, Qe = { class: "fm-typo-en-title-sm-800" }, We = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xe = { class: "flex flex-col gap-4" }, Ze = { class: "flex-1" }, et = { class: "flex flex-col" }, tt = { class: "fm-typo-en-body-lg-400" }, lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st = { class: "flex-1" }, ot = { class: "flex" }, nt = { class: "text-fm-color-typo-secondary" }, at = /* @__PURE__ */ W({
66
+ const Ge = { class: "flex flex-col gap-12" }, je = { class: "flex flex-col" }, Oe = { class: "flex items-center gap-8 py-8" }, Je = { class: "flex-1" }, Qe = { class: "fm-typo-en-title-sm-800" }, We = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xe = { class: "flex flex-col gap-4" }, Ze = { class: "flex-1" }, et = { class: "flex flex-col" }, tt = { class: "fm-typo-en-body-lg-400" }, lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ot = { class: "flex-1" }, st = { class: "flex" }, nt = { class: "text-fm-color-typo-secondary" }, at = /* @__PURE__ */ W({
67
67
  __name: "SupplierSupplyItemField",
68
68
  props: /* @__PURE__ */ xe({
69
69
  modelValue: {}
@@ -73,7 +73,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
73
73
  }),
74
74
  emits: ["update:modelValue"],
75
75
  setup(R) {
76
- const C = Be(), h = Ve(), o = b(() => h.skus), v = Se(), { t: f } = q(), a = ke(R, "modelValue");
76
+ const C = Be(), h = Ve(), s = b(() => h.skus), v = Se(), { t: f } = q(), a = ke(R, "modelValue");
77
77
  function u() {
78
78
  var V;
79
79
  const n = h.skus.map((i) => ({
@@ -104,9 +104,9 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
104
104
  variant: "tertiary"
105
105
  }
106
106
  }).onPrimary((i) => {
107
- const s = i.map((_) => h.skuById[_]).filter((_) => _);
108
- s.sort((_, x) => _.code.localeCompare(x.code));
109
- const d = s.map((_) => {
107
+ const o = i.map((_) => h.skuById[_]).filter((_) => _);
108
+ o.sort((_, x) => _.code.localeCompare(x.code));
109
+ const d = o.map((_) => {
110
110
  var c;
111
111
  const x = (c = a.value) == null ? void 0 : c.find((t) => t.skuId === _._id);
112
112
  return x || {
@@ -141,7 +141,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
141
141
  }
142
142
  function E(n) {
143
143
  var V;
144
- const S = n.skuId, k = (V = o.value.find((i) => i._id === S)) == null ? void 0 : V.unit;
144
+ const S = n.skuId, k = (V = s.value.find((i) => i._id === S)) == null ? void 0 : V.unit;
145
145
  if (!k)
146
146
  throw new Error(`Cannot find ingredient: ${S}`);
147
147
  return k;
@@ -152,7 +152,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
152
152
  measurement: n.defaultCost.measurement
153
153
  };
154
154
  }
155
- function D(n, S) {
155
+ function F(n, S) {
156
156
  const V = (a.value ?? []).map((i) => i.skuId !== n.skuId ? i : {
157
157
  ...i,
158
158
  defaultCost: {
@@ -168,8 +168,8 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
168
168
  }
169
169
  return (n, S) => {
170
170
  const k = P("FmButton");
171
- return U(), B("div", je, [
172
- r("div", Ge, [
171
+ return D(), B("div", Ge, [
172
+ r("div", je, [
173
173
  r("div", Oe, [
174
174
  r("div", Je, [
175
175
  m(He, { "z-index": 50 }, {
@@ -191,24 +191,24 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
191
191
  r("div", We, T(l(f)("inventory.supplier.supplyItems.overridePriceHint")), 1)
192
192
  ]),
193
193
  r("div", Xe, [
194
- (U(!0), B(Ce, null, Ie(a.value, (V, i) => {
195
- var s, d, _;
196
- return U(), B("div", {
194
+ (D(!0), B(Ce, null, Ie(a.value, (V, i) => {
195
+ var o, d, _;
196
+ return D(), B("div", {
197
197
  key: V.skuId,
198
198
  class: "flex"
199
199
  }, [
200
200
  r("div", Ze, [
201
201
  r("div", et, [
202
- r("div", tt, T((s = l(h).skuById[V.skuId]) == null ? void 0 : s.name), 1),
202
+ r("div", tt, T((o = l(h).skuById[V.skuId]) == null ? void 0 : o.name), 1),
203
203
  r("div", lt, T((d = l(h).skuById[V.skuId]) == null ? void 0 : d.code), 1)
204
204
  ])
205
205
  ]),
206
- r("div", st, [
207
- r("div", ot, [
206
+ r("div", ot, [
207
+ r("div", st, [
208
208
  m(Pe, {
209
209
  "model-value": g(V),
210
210
  unit: E(V),
211
- "onUpdate:modelValue": (x) => D(V, x),
211
+ "onUpdate:modelValue": (x) => F(V, x),
212
212
  placement: a.value && i === ((_ = a.value) == null ? void 0 : _.length) - 1 ? "top" : "bottom",
213
213
  separator: "/",
214
214
  "apply-default-rules": "",
@@ -249,112 +249,112 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
249
249
  },
250
250
  emits: ["update:modelValue", "validation-success"],
251
251
  setup(R, { expose: C, emit: h }) {
252
- const o = R, v = h, f = _e(), a = Ve(), u = b(() => Te(a.skus, "_id")), { t: y } = q(), $ = he(), E = b(() => $.businessLevel), g = b({
252
+ const s = R, v = h, f = he(), a = Ve(), u = b(() => Te(a.skus, "_id")), { t: y } = q(), $ = _e(), E = b(() => $.businessLevel), g = b({
253
253
  get() {
254
254
  var t;
255
- return ((t = o.modelValue) == null ? void 0 : t.name) ?? "";
255
+ return ((t = s.modelValue) == null ? void 0 : t.name) ?? "";
256
256
  },
257
257
  set(t) {
258
- const e = o.modelValue ?? {};
258
+ const e = s.modelValue ?? {};
259
259
  e.name = t, v("update:modelValue", e);
260
260
  }
261
- }), D = b({
261
+ }), F = b({
262
262
  get() {
263
263
  var t;
264
- return ((t = o.modelValue) == null ? void 0 : t.registrationNumber) ?? "";
264
+ return ((t = s.modelValue) == null ? void 0 : t.registrationNumber) ?? "";
265
265
  },
266
266
  set(t) {
267
- const e = o.modelValue ?? {};
267
+ const e = s.modelValue ?? {};
268
268
  e.registrationNumber = t, v("update:modelValue", e);
269
269
  }
270
270
  }), n = b({
271
271
  get() {
272
272
  var t, e;
273
- return ((e = (t = o.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.line1) ?? "";
273
+ return ((e = (t = s.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.line1) ?? "";
274
274
  },
275
275
  set(t) {
276
- const e = o.modelValue ?? {};
276
+ const e = s.modelValue ?? {};
277
277
  e.address ?? (e.address = {}), e.address.line1 = t, v("update:modelValue", e);
278
278
  }
279
279
  }), S = b({
280
280
  get() {
281
281
  var t, e;
282
- return ((e = (t = o.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.line2) ?? "";
282
+ return ((e = (t = s.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.line2) ?? "";
283
283
  },
284
284
  set(t) {
285
- const e = o.modelValue ?? {};
285
+ const e = s.modelValue ?? {};
286
286
  e.address ?? (e.address = {}), e.address.line2 = t, v("update:modelValue", e);
287
287
  }
288
288
  }), k = b({
289
289
  get() {
290
290
  var t, e;
291
- return ((e = (t = o.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.city) ?? "";
291
+ return ((e = (t = s.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.city) ?? "";
292
292
  },
293
293
  set(t) {
294
- const e = o.modelValue ?? {};
294
+ const e = s.modelValue ?? {};
295
295
  e.address ?? (e.address = {}), e.address.city = t, v("update:modelValue", e);
296
296
  }
297
297
  }), V = b({
298
298
  get() {
299
299
  var t, e;
300
- return ((e = (t = o.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.postcode) ?? "";
300
+ return ((e = (t = s.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.postcode) ?? "";
301
301
  },
302
302
  set(t) {
303
- const e = o.modelValue ?? {};
303
+ const e = s.modelValue ?? {};
304
304
  e.address ?? (e.address = {}), e.address.postcode = t, v("update:modelValue", e);
305
305
  }
306
306
  }), i = b({
307
307
  get() {
308
308
  var t, e;
309
- return ((e = (t = o.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.state) ?? "";
309
+ return ((e = (t = s.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.state) ?? "";
310
310
  },
311
311
  set(t) {
312
- const e = o.modelValue ?? {};
312
+ const e = s.modelValue ?? {};
313
313
  e.address ?? (e.address = {}), e.address.state = t, v("update:modelValue", e);
314
314
  }
315
- }), s = b({
315
+ }), o = b({
316
316
  get() {
317
317
  var t, e;
318
- return ((e = (t = o.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.country) ?? "";
318
+ return ((e = (t = s.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.country) ?? "";
319
319
  },
320
320
  set(t) {
321
- const e = o.modelValue ?? {};
321
+ const e = s.modelValue ?? {};
322
322
  e.address ?? (e.address = {}), e.address.country = t, v("update:modelValue", e);
323
323
  }
324
324
  }), d = b({
325
325
  get() {
326
326
  var t;
327
- return ((t = o.modelValue) == null ? void 0 : t.contactName) ?? "";
327
+ return ((t = s.modelValue) == null ? void 0 : t.contactName) ?? "";
328
328
  },
329
329
  set(t) {
330
- const e = o.modelValue ?? {};
330
+ const e = s.modelValue ?? {};
331
331
  e.contactName = t, v("update:modelValue", e);
332
332
  }
333
333
  }), _ = b({
334
334
  get() {
335
335
  var t;
336
- return ((t = o.modelValue) == null ? void 0 : t.phoneNumber) ?? "";
336
+ return ((t = s.modelValue) == null ? void 0 : t.phoneNumber) ?? "";
337
337
  },
338
338
  set(t) {
339
- const e = o.modelValue ?? {};
339
+ const e = s.modelValue ?? {};
340
340
  e.phoneNumber = t, v("update:modelValue", e);
341
341
  }
342
342
  }), x = b({
343
343
  get() {
344
344
  var t;
345
- return ((t = o.modelValue) == null ? void 0 : t.email) ?? "";
345
+ return ((t = s.modelValue) == null ? void 0 : t.email) ?? "";
346
346
  },
347
347
  set(t) {
348
- const e = o.modelValue ?? {};
348
+ const e = s.modelValue ?? {};
349
349
  e.email = t, v("update:modelValue", e);
350
350
  }
351
351
  }), I = b({
352
352
  get() {
353
353
  var e;
354
- return (((e = o.modelValue) == null ? void 0 : e.supplyItems) ?? []).filter((M) => u.value[M.skuId]);
354
+ return (((e = s.modelValue) == null ? void 0 : e.supplyItems) ?? []).filter((M) => u.value[M.skuId]);
355
355
  },
356
356
  set(t) {
357
- const e = o.modelValue ?? {};
357
+ const e = s.modelValue ?? {};
358
358
  e.supplyItems = t, v("update:modelValue", e);
359
359
  }
360
360
  }), c = L();
@@ -373,7 +373,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
373
373
  }
374
374
  }), (t, e) => {
375
375
  const M = P("FmChip"), w = P("FmTextField"), Y = P("FmPhoneNumber"), H = P("FmForm");
376
- return U(), z(H, {
376
+ return D(), z(H, {
377
377
  ref_key: "formRef",
378
378
  ref: c,
379
379
  onValidationSuccess: e[12] || (e[12] = (p) => v("validation-success"))
@@ -381,7 +381,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
381
381
  default: N(() => [
382
382
  r("div", rt, [
383
383
  r("div", ut, [
384
- E.value ? (U(), B("div", it, [
384
+ E.value ? (D(), B("div", it, [
385
385
  m(M, {
386
386
  label: "Business supplier",
387
387
  compact: ""
@@ -389,7 +389,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
389
389
  ])) : Z("", !0),
390
390
  m(w, {
391
391
  disabled: t.disabled,
392
- rules: [l(F)()],
392
+ rules: [l(U)()],
393
393
  "label-mark": "required",
394
394
  label: l(y)("inventory.supplier.companyName"),
395
395
  modelValue: g.value,
@@ -397,11 +397,11 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
397
397
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
398
398
  m(w, {
399
399
  disabled: t.disabled,
400
- rules: [l(F)()],
400
+ rules: [l(U)()],
401
401
  "label-mark": "required",
402
402
  label: l(y)("inventory.supplier.registrationNo"),
403
- modelValue: D.value,
404
- "onUpdate:modelValue": e[1] || (e[1] = (p) => D.value = p)
403
+ modelValue: F.value,
404
+ "onUpdate:modelValue": e[1] || (e[1] = (p) => F.value = p)
405
405
  }, null, 8, ["disabled", "rules", "label", "modelValue"])
406
406
  ]),
407
407
  r("div", dt, [
@@ -409,7 +409,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
409
409
  r("div", ct, [
410
410
  m(w, {
411
411
  disabled: t.disabled,
412
- rules: [l(F)()],
412
+ rules: [l(U)()],
413
413
  "label-mark": "required",
414
414
  label: l(y)("inventory.supplier.address.line1"),
415
415
  modelValue: n.value,
@@ -424,7 +424,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
424
424
  }, null, 8, ["disabled", "label", "modelValue"]),
425
425
  m(w, {
426
426
  disabled: t.disabled,
427
- rules: [l(F)()],
427
+ rules: [l(U)()],
428
428
  "label-mark": "required",
429
429
  label: l(y)("inventory.supplier.address.city"),
430
430
  modelValue: k.value,
@@ -432,7 +432,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
432
432
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
433
433
  m(w, {
434
434
  disabled: t.disabled,
435
- rules: [l(F)()],
435
+ rules: [l(U)()],
436
436
  "label-mark": "required",
437
437
  label: l(y)("inventory.supplier.address.postcode"),
438
438
  modelValue: V.value,
@@ -440,7 +440,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
440
440
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
441
441
  m(w, {
442
442
  disabled: t.disabled,
443
- rules: [l(F)()],
443
+ rules: [l(U)()],
444
444
  "label-mark": "required",
445
445
  label: l(y)("inventory.supplier.address.state"),
446
446
  modelValue: i.value,
@@ -448,11 +448,11 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
448
448
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
449
449
  m(w, {
450
450
  disabled: t.disabled,
451
- rules: [l(F)()],
451
+ rules: [l(U)()],
452
452
  "label-mark": "required",
453
453
  label: l(y)("inventory.supplier.address.country"),
454
- modelValue: s.value,
455
- "onUpdate:modelValue": e[7] || (e[7] = (p) => s.value = p)
454
+ modelValue: o.value,
455
+ "onUpdate:modelValue": e[7] || (e[7] = (p) => o.value = p)
456
456
  }, null, 8, ["disabled", "rules", "label", "modelValue"])
457
457
  ])
458
458
  ]),
@@ -461,7 +461,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
461
461
  r("div", ft, [
462
462
  m(w, {
463
463
  disabled: t.disabled,
464
- rules: [l(F)()],
464
+ rules: [l(U)()],
465
465
  "label-mark": "required",
466
466
  label: l(y)("inventory.supplier.contact.pic"),
467
467
  modelValue: d.value,
@@ -469,7 +469,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
469
469
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
470
470
  m(Y, {
471
471
  disabled: t.disabled,
472
- rules: [l(F)()],
472
+ rules: [l(U)()],
473
473
  "label-mark": "required",
474
474
  label: l(y)("inventory.supplier.contact.phoneNumber"),
475
475
  modelValue: _.value,
@@ -484,7 +484,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
484
484
  }, null, 8, ["disabled", "label", "modelValue"])
485
485
  ])
486
486
  ]),
487
- l(f).enableTotalCost ? (U(), B("div", yt, [
487
+ l(f).enableTotalCost ? (D(), B("div", yt, [
488
488
  m(at, {
489
489
  modelValue: I.value,
490
490
  "onUpdate:modelValue": e[11] || (e[11] = (p) => I.value = p)
@@ -505,8 +505,8 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
505
505
  },
506
506
  emits: ["update:show", "submitted"],
507
507
  setup(R, { expose: C, emit: h }) {
508
- const o = R, v = h, f = L(!1), a = we(), { t: u } = q(), y = ge(), $ = b(() => {
509
- switch (o.mode) {
508
+ const s = R, v = h, f = L(!1), a = we(), { t: u } = q(), y = ge(), $ = b(() => {
509
+ switch (s.mode) {
510
510
  case A.READ:
511
511
  return "";
512
512
  case A.UPDATE:
@@ -516,7 +516,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
516
516
  }
517
517
  return "";
518
518
  }), E = b(() => {
519
- switch (o.mode) {
519
+ switch (s.mode) {
520
520
  case A.READ:
521
521
  return "";
522
522
  case A.UPDATE:
@@ -528,25 +528,25 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
528
528
  }), g = L();
529
529
  C({
530
530
  validateInputs: () => {
531
- var s, d;
532
- (d = (s = g.value) == null ? void 0 : s.validateInputs) == null || d.call(s);
531
+ var o, d;
532
+ (d = (o = g.value) == null ? void 0 : o.validateInputs) == null || d.call(o);
533
533
  },
534
534
  resetInputsValidation: () => {
535
- var s, d;
536
- (d = (s = g.value) == null ? void 0 : s.resetInputsValidation) == null || d.call(s);
535
+ var o, d;
536
+ (d = (o = g.value) == null ? void 0 : o.resetInputsValidation) == null || d.call(o);
537
537
  },
538
538
  resetInputs: () => {
539
- var s, d;
540
- (d = (s = g.value) == null ? void 0 : s.resetInputs) == null || d.call(s);
539
+ var o, d;
540
+ (d = (o = g.value) == null ? void 0 : o.resetInputs) == null || d.call(o);
541
541
  }
542
542
  });
543
- const D = be(o, "show"), n = be(o, "supplier");
543
+ const F = be(s, "show"), n = be(s, "supplier");
544
544
  function S() {
545
- var s, d;
546
- (d = (s = g.value) == null ? void 0 : s.validateInputs) == null || d.call(s);
545
+ var o, d;
546
+ (d = (o = g.value) == null ? void 0 : o.validateInputs) == null || d.call(o);
547
547
  }
548
548
  function k() {
549
- switch (o.mode) {
549
+ switch (s.mode) {
550
550
  case A.READ:
551
551
  return;
552
552
  case A.UPDATE:
@@ -560,18 +560,18 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
560
560
  try {
561
561
  await Promise.all([
562
562
  y.createSupplier(n.value),
563
- new Promise((s) => setTimeout(s, 1e3))
563
+ new Promise((o) => setTimeout(o, 1e3))
564
564
  ]), a.open({
565
- title: u("common.success"),
565
+ title: u("inventory.common.success"),
566
566
  message: u("inventory.supplier.create.success", { name: n.value.name }),
567
567
  type: "success"
568
568
  }), v("update:show", !1), v("submitted");
569
- } catch (s) {
569
+ } catch (o) {
570
570
  a.open({
571
571
  title: "Something went wrong",
572
572
  message: `Cannot create ${n.value.name} supplier. Please try again`,
573
573
  type: "error"
574
- }), console.error("cannot create supplier", s);
574
+ }), console.error("cannot create supplier", o);
575
575
  } finally {
576
576
  f.value = !1;
577
577
  }
@@ -589,28 +589,28 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
589
589
  try {
590
590
  await Promise.all([
591
591
  y.updateSupplier(n.value),
592
- new Promise((s) => setTimeout(s, 1e3))
592
+ new Promise((o) => setTimeout(o, 1e3))
593
593
  ]), a.open({
594
- title: u("common.success"),
594
+ title: u("inventory.common.success"),
595
595
  message: u("inventory.supplier.update.success", { name: n.value.name }),
596
596
  type: "success"
597
597
  }), v("update:show", !1), v("submitted");
598
- } catch (s) {
598
+ } catch (o) {
599
599
  a.open({
600
600
  title: u("inventory.supplier.update.error.title"),
601
601
  message: u("inventory.supplier.update.error.message"),
602
602
  type: "error"
603
- }), console.error("cannot update supplier", s);
603
+ }), console.error("cannot update supplier", o);
604
604
  } finally {
605
605
  f.value = !1;
606
606
  }
607
607
  }
608
- return (s, d) => {
608
+ return (o, d) => {
609
609
  const _ = P("FmButton"), x = P("FmSideSheet");
610
- return U(), z(x, {
610
+ return D(), z(x, {
611
611
  header: $.value,
612
- modelValue: l(D),
613
- "onUpdate:modelValue": d[1] || (d[1] = (I) => ve(D) ? D.value = I : null),
612
+ modelValue: l(F),
613
+ "onUpdate:modelValue": d[1] || (d[1] = (I) => ve(F) ? F.value = I : null),
614
614
  "dismiss-away": !f.value,
615
615
  "close-button": "",
616
616
  "max-width": 500
@@ -618,14 +618,14 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
618
618
  default: N(() => {
619
619
  var I;
620
620
  return [
621
- (U(), z(bt, {
621
+ (D(), z(bt, {
622
622
  class: "w-full",
623
623
  ref_key: "formRef",
624
624
  ref: g,
625
625
  modelValue: l(n),
626
626
  "onUpdate:modelValue": d[0] || (d[0] = (c) => ve(n) ? n.value = c : null),
627
627
  onValidationSuccess: k,
628
- key: ((I = s.supplier) == null ? void 0 : I._id) ?? "",
628
+ key: ((I = o.supplier) == null ? void 0 : I._id) ?? "",
629
629
  disabled: f.value
630
630
  }, null, 8, ["modelValue", "disabled"]))
631
631
  ];
@@ -649,11 +649,11 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
649
649
  }, kt = "You are managing business-level supplier list. These suppliers will be made visible to all locations.", Pt = /* @__PURE__ */ W({
650
650
  __name: "SupplierView",
651
651
  setup(R) {
652
- const C = ge(), h = he(), o = _e(), v = L(!1), f = Se(), a = we(), { t: u } = q();
652
+ const C = ge(), h = _e(), s = he(), v = L(!1), f = Se(), a = we(), { t: u } = q();
653
653
  h.watchLocation($);
654
654
  const y = b(() => h.businessLevel);
655
655
  Me(y, $), $e(() => {
656
- o.enableSupplierMasterList || (h.businessLevel = !1);
656
+ s.enableSupplierMasterList || (h.businessLevel = !1);
657
657
  });
658
658
  async function $() {
659
659
  if (h._currentLocation) {
@@ -676,7 +676,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
676
676
  const E = b(
677
677
  () => y.value ? C.businessSuppliers : C.locationSuppliers
678
678
  ), g = L({});
679
- function D() {
679
+ function F() {
680
680
  g.value.mode = A.CREATE, g.value.supplier = {}, g.value.show = !0;
681
681
  }
682
682
  function n(c) {
@@ -720,12 +720,12 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
720
720
  }
721
721
  const { columnDefs: V } = Ke(n, S);
722
722
  function i(c) {
723
- c === "create" && D();
723
+ c === "create" && F();
724
724
  }
725
- const s = L(""), { breakpoints: d } = Le(), _ = b(() => d.value.xs || d.value.sm), x = b(() => _.value ? 10 : 20), I = ze();
725
+ const o = L(""), { breakpoints: d } = Le(), _ = b(() => d.value.xs || d.value.sm), x = b(() => _.value ? 10 : 20), I = ze();
726
726
  return (c, t) => {
727
727
  const e = P("FmTable");
728
- return U(), z(qe, {
728
+ return D(), z(qe, {
729
729
  title: l(u)("inventory.supplier.title"),
730
730
  actions: [
731
731
  {
@@ -751,16 +751,16 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
751
751
  m(Ye, {
752
752
  searchable: "",
753
753
  "change-location": "",
754
- search: s.value,
755
- "onUpdate:search": t[0] || (t[0] = (M) => s.value = M),
756
- "show-business": l(o).enableSupplierMasterList,
754
+ search: o.value,
755
+ "onUpdate:search": t[0] || (t[0] = (M) => o.value = M),
756
+ "show-business": l(s).enableSupplierMasterList,
757
757
  actions: [{ icon: "refresh", onClick: () => $() }]
758
758
  }, null, 8, ["search", "show-business", "actions"]),
759
759
  m(e, {
760
- style: Ue(l(I).tableHeight),
760
+ style: De(l(I).tableHeight),
761
761
  "column-defs": l(V),
762
762
  "row-data": E.value,
763
- "search-value": s.value,
763
+ "search-value": o.value,
764
764
  loading: !l(h)._currentLocation || v.value,
765
765
  onRowClick: t[1] || (t[1] = (M) => n(M.original)),
766
766
  "page-size": x.value
@@ -771,7 +771,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
771
771
  onRowClick: n
772
772
  }, {
773
773
  default: N((w) => {
774
- var Y, H, p, K, te, le, se, oe, j, ne, ae, re, ue, G, ie, de, pe, ce, O, me;
774
+ var Y, H, p, K, te, le, oe, se, G, ne, ae, re, ue, j, ie, de, pe, ce, O, me;
775
775
  return [
776
776
  r("div", _t, [
777
777
  r("div", ht, [
@@ -782,17 +782,17 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
782
782
  ]),
783
783
  r("div", St, [
784
784
  m(l(Q), {
785
- render: (oe = (se = (le = w.contactName) == null ? void 0 : le.column) == null ? void 0 : se.columnDef) == null ? void 0 : oe.cell,
786
- props: (ne = (j = w.contactName) == null ? void 0 : j.getContext) == null ? void 0 : ne.call(j)
785
+ render: (se = (oe = (le = w.contactName) == null ? void 0 : le.column) == null ? void 0 : oe.columnDef) == null ? void 0 : se.cell,
786
+ props: (ne = (G = w.contactName) == null ? void 0 : G.getContext) == null ? void 0 : ne.call(G)
787
787
  }, null, 8, ["render", "props"])
788
788
  ]),
789
789
  r("div", wt, [
790
790
  m(l(Q), {
791
791
  render: (ue = (re = (ae = w.phoneNumber) == null ? void 0 : ae.column) == null ? void 0 : re.columnDef) == null ? void 0 : ue.cell,
792
- props: (ie = (G = w.phoneNumber) == null ? void 0 : G.getContext) == null ? void 0 : ie.call(G)
792
+ props: (ie = (j = w.phoneNumber) == null ? void 0 : j.getContext) == null ? void 0 : ie.call(j)
793
793
  }, null, 8, ["render", "props"])
794
794
  ]),
795
- M.original.email ? (U(), B("div", xt, [
795
+ M.original.email ? (D(), B("div", xt, [
796
796
  m(l(Q), {
797
797
  render: (ce = (pe = (de = w.email) == null ? void 0 : de.column) == null ? void 0 : pe.columnDef) == null ? void 0 : ce.cell,
798
798
  props: (me = (O = w.email) == null ? void 0 : O.getContext) == null ? void 0 : me.call(O)
@@ -807,7 +807,7 @@ const je = { class: "flex flex-col gap-12" }, Ge = { class: "flex flex-col" }, O
807
807
  _: 1
808
808
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
809
809
  ], 2),
810
- (U(), z(De, { to: "body" }, [
810
+ (D(), z(Fe, { to: "body" }, [
811
811
  m(Vt, {
812
812
  show: g.value.show,
813
813
  "onUpdate:show": t[2] || (t[2] = (M) => g.value.show = M),