@feedmepos/mf-inventory-portal 0.0.21-dev.4 → 0.0.21-dev.5

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 (32) hide show
  1. package/dist/ApprovalView-BHoJzHuo.js +129 -0
  2. package/dist/{BindingsDialog-BFLeun5L.js → BindingsDialog-sUZjZtSl.js} +1 -1
  3. package/dist/{BindingsPicker-CnjJZH9t.js → BindingsPicker-CqzSUVc_.js} +1 -1
  4. package/dist/{BindingsTable-C3VTa0YL.js → BindingsTable-C1o5EgLy.js} +1 -1
  5. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DYBTXD_J.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CpN5Kn8b.js} +1 -1
  6. package/dist/{IngredientsView-CQYJfAze.js → IngredientsView-CrXPIQme.js} +99 -91
  7. package/dist/IntegrationView-BJT-KMVp.js +1141 -0
  8. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Wv8RvXJL.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DH0CcGmX.js} +1 -1
  9. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DsOGlAb7.js → PremiumBadge.vue_vue_type_script_setup_true_lang-kJKVCH40.js} +1 -1
  10. package/dist/{PurchaseOrderPrintPreview-B0hDduXB.js → PurchaseOrderPrintPreview-k26o__vy.js} +1 -1
  11. package/dist/ReceiveRequestView-ysOzzBTW.js +216 -0
  12. package/dist/{RecipeView-DYKhSgtw.js → RecipeView-DAH8YIzY.js} +182 -174
  13. package/dist/{StockView-BIGGG87A.js → StockView-BlCpuSLe.js} +547 -539
  14. package/dist/{SupplierView-DQzopnzt.js → SupplierView-Bwknjcke.js} +263 -255
  15. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D8-sMRGm.js → TransferDetails.vue_vue_type_script_setup_true_lang-LCNiBfi7.js} +3 -3
  16. package/dist/{TransferDialog.vue_vue_type_script_setup_true_lang-CSUnXAyq.js → TransferDialog.vue_vue_type_script_setup_true_lang-BDvtif2q.js} +4 -4
  17. package/dist/{TransferTemplateView-DWF54okN.js → TransferTemplateView-DcMdNiH6.js} +372 -364
  18. package/dist/{UnitView-Cdw8xxzV.js → UnitView-BVMr4KlR.js} +186 -178
  19. package/dist/{WarehouseView-DOelxuIh.js → WarehouseView-Dd-e-IlG.js} +388 -380
  20. package/dist/{app-SBnQEeEV.js → app-S6iG6Hux.js} +4 -4
  21. package/dist/app.js +1 -1
  22. package/dist/{decimal-BlEB2PrM.js → decimal-nOOdFIFP.js} +1 -1
  23. package/dist/{id-to-date-Y6berpHs.js → id-to-date-CKQ0n3Qi.js} +1 -1
  24. package/dist/{purchase-order-transaction-type-Dp0wsGal.js → purchase-order-transaction-type-CQ-RpJ0h.js} +2 -2
  25. package/dist/{supplier-I_rYvljH.js → supplier-DQsAfn3q.js} +1 -1
  26. package/dist/tsconfig.app.tsbuildinfo +1 -1
  27. package/dist/{xlsx-DGwG2ekM.js → xlsx-Dgjf-KvE.js} +1 -1
  28. package/dist/{xlsx.util-Dsf-EgrG.js → xlsx.util-CODYzgF8.js} +2 -2
  29. package/package.json +3 -3
  30. package/dist/ApprovalView-BS4jzhAR.js +0 -121
  31. package/dist/IntegrationView-9V2OcyP_.js +0 -1172
  32. package/dist/ReceiveRequestView-3boFHkOO.js +0 -208
@@ -1,21 +1,21 @@
1
- import { defineComponent as Q, mergeModels as xe, computed as _, useModel as we, resolveComponent as P, openBlock as U, createElementBlock as B, createElementVNode as u, createVNode as m, withCtx as N, toDisplayString as T, unref as l, Fragment as ke, renderList as Ce, ref as L, createBlock as q, createCommentVNode as X, isRef as me, watch as Ie, onMounted as Me, normalizeStyle as $e, Teleport as Ae } from "vue";
2
- import { u as be } from "./supplier-I_rYvljH.js";
3
- import { D as ve, R as O, F as A } from "./row-action.enum-PMKMRrZR.js";
4
- import { c as Ue, _ as De, F as J } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
5
- import { c as Z, u as ge, a2 as Fe, d as fe, g as Re, y as Pe, C as W, h as Ne, R as F, b as Ve, j as _e } from "./app-SBnQEeEV.js";
6
- import { useI18n as z, useCoreStore as Ee } from "@feedmepos/mf-common";
7
- import { useDialog as he, useSnackbar as Se, useProxiedModel as ye, useBreakpoints as Te } from "@feedmepos/ui-library";
8
- import { u as Be, _ as Le, a as qe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DYBTXD_J.js";
9
- import { _ as ze } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
10
- function Ye(R, C) {
11
- const { t: h } = z();
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-DQsAfn3q.js";
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, a2 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-S6iG6Hux.js";
6
+ import { useI18n as q, useCoreStore as Be } from "@feedmepos/mf-common";
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-CpN5Kn8b.js";
9
+ import { _ as He } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
10
+ function Ke(R, C) {
11
+ const { t: h } = q();
12
12
  function o(f, a) {
13
- if (f === O.Edit) {
14
- R(Z(a));
13
+ if (f === J.Edit) {
14
+ R(ee(a));
15
15
  return;
16
16
  }
17
- if (f === O.Delete) {
18
- C(Z(a));
17
+ if (f === J.Delete) {
18
+ C(ee(a));
19
19
  return;
20
20
  }
21
21
  }
@@ -48,8 +48,8 @@ function Ye(R, C) {
48
48
  id: "action",
49
49
  header: "",
50
50
  cell(f) {
51
- return Ue(
52
- [ve[O.Edit], ve[O.Delete]],
51
+ return Fe(
52
+ [fe[J.Edit], fe[J.Delete]],
53
53
  (a) => {
54
54
  o(a, f.row.original);
55
55
  }
@@ -63,7 +63,7 @@ function Ye(R, C) {
63
63
  }
64
64
  ] };
65
65
  }
66
- const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, je = { class: "flex items-center gap-8 py-8" }, Ge = { class: "flex-1" }, Oe = { class: "fm-typo-en-title-sm-800" }, Je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qe = { class: "flex flex-col gap-4" }, We = { class: "flex-1" }, Xe = { class: "flex flex-col" }, Ze = { class: "fm-typo-en-body-lg-400" }, et = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, tt = { class: "flex-1" }, lt = { class: "flex" }, st = { class: "text-fm-color-typo-secondary" }, ot = /* @__PURE__ */ Q({
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({
67
67
  __name: "SupplierSupplyItemField",
68
68
  props: /* @__PURE__ */ xe({
69
69
  modelValue: {}
@@ -73,23 +73,23 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
73
73
  }),
74
74
  emits: ["update:modelValue"],
75
75
  setup(R) {
76
- const C = Ee(), h = ge(), o = _(() => h.skus), v = he(), { t: f } = z(), a = we(R, "modelValue");
77
- function i() {
76
+ const C = Be(), h = Ve(), o = b(() => h.skus), v = Se(), { t: f } = q(), a = ke(R, "modelValue");
77
+ function u() {
78
78
  var V;
79
- const n = h.skus.map((d) => ({
80
- label: d.name,
81
- sublabel: d.code,
82
- value: d._id
83
- })), S = ((V = a.value) == null ? void 0 : V.map((d) => d.skuId)) ?? [], k = _(
79
+ const n = h.skus.map((i) => ({
80
+ label: i.name,
81
+ sublabel: i.code,
82
+ value: i._id
83
+ })), S = ((V = a.value) == null ? void 0 : V.map((i) => i.skuId)) ?? [], k = b(
84
84
  () => {
85
- var d;
86
- return ((d = Re(C.currentCountry.value)) == null ? void 0 : d.currency) ?? "MYR";
85
+ var i;
86
+ return ((i = Ne(C.currentCountry.value)) == null ? void 0 : i.currency) ?? "MYR";
87
87
  }
88
88
  );
89
89
  v.open({
90
90
  title: f("inventory.supplier.supplyItems.selectItem"),
91
91
  closeButton: !0,
92
- contentComponent: Pe,
92
+ contentComponent: Ee,
93
93
  contentComponentProps: {
94
94
  modelValue: S,
95
95
  items: n
@@ -103,15 +103,15 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
103
103
  close: !0,
104
104
  variant: "tertiary"
105
105
  }
106
- }).onPrimary((d) => {
107
- const s = d.map((x) => h.skuById[x]).filter((x) => x);
108
- s.sort((x, w) => x.code.localeCompare(w.code));
109
- const c = s.map((x) => {
110
- var y;
111
- const w = (y = a.value) == null ? void 0 : y.find((t) => t.skuId === x._id);
112
- return w || {
113
- skuId: x._id,
114
- defaultCost: x.defaultCost ?? {
106
+ }).onPrimary((i) => {
107
+ const s = i.map((_) => h.skuById[_]).filter((_) => _);
108
+ s.sort((_, x) => _.code.localeCompare(x.code));
109
+ const d = s.map((_) => {
110
+ var c;
111
+ const x = (c = a.value) == null ? void 0 : c.find((t) => t.skuId === _._id);
112
+ return x || {
113
+ skuId: _._id,
114
+ defaultCost: _.defaultCost ?? {
115
115
  costPerUnit: {
116
116
  currency: k.value,
117
117
  amount: 0,
@@ -120,16 +120,16 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
120
120
  }
121
121
  };
122
122
  });
123
- a.value = c;
123
+ a.value = d;
124
124
  });
125
125
  }
126
- function b(n) {
126
+ function y(n) {
127
127
  switch (n) {
128
- case W.MY:
128
+ case X.MY:
129
129
  return "MYR";
130
- case W.SG:
130
+ case X.SG:
131
131
  return "SGD";
132
- case W.ID:
132
+ case X.ID:
133
133
  return "IDR";
134
134
  default:
135
135
  return "MYR";
@@ -141,7 +141,7 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
141
141
  }
142
142
  function E(n) {
143
143
  var V;
144
- const S = n.skuId, k = (V = o.value.find((d) => d._id === S)) == null ? void 0 : V.unit;
144
+ const S = n.skuId, k = (V = o.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;
@@ -153,13 +153,13 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
153
153
  };
154
154
  }
155
155
  function D(n, S) {
156
- const V = (a.value ?? []).map((d) => d.skuId !== n.skuId ? d : {
157
- ...d,
156
+ const V = (a.value ?? []).map((i) => i.skuId !== n.skuId ? i : {
157
+ ...i,
158
158
  defaultCost: {
159
- ...d.defaultCost,
159
+ ...i.defaultCost,
160
160
  measurement: S.measurement,
161
161
  costPerUnit: {
162
- ...d.defaultCost.costPerUnit,
162
+ ...i.defaultCost.costPerUnit,
163
163
  ...S.amount
164
164
  }
165
165
  }
@@ -168,66 +168,66 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
168
168
  }
169
169
  return (n, S) => {
170
170
  const k = P("FmButton");
171
- return U(), B("div", He, [
172
- u("div", Ke, [
173
- u("div", je, [
174
- u("div", Ge, [
175
- m(ze, { "z-index": 50 }, {
171
+ return U(), B("div", je, [
172
+ r("div", Ge, [
173
+ r("div", Oe, [
174
+ r("div", Je, [
175
+ m(He, { "z-index": 50 }, {
176
176
  default: N(() => [
177
- u("div", Oe, T(l(f)("inventory.supplier.supplyItems.title")), 1)
177
+ r("div", Qe, T(l(f)("inventory.supplier.supplyItems.title")), 1)
178
178
  ]),
179
179
  _: 1
180
180
  })
181
181
  ]),
182
- u("div", null, [
182
+ r("div", null, [
183
183
  m(k, {
184
184
  "prepend-icon": "link",
185
185
  label: l(f)("inventory.supplier.supplyItems.addItems"),
186
186
  variant: "plain",
187
- onClick: i
187
+ onClick: u
188
188
  }, null, 8, ["label"])
189
189
  ])
190
190
  ]),
191
- u("div", Je, T(l(f)("inventory.supplier.supplyItems.overridePriceHint")), 1)
191
+ r("div", We, T(l(f)("inventory.supplier.supplyItems.overridePriceHint")), 1)
192
192
  ]),
193
- u("div", Qe, [
194
- (U(!0), B(ke, null, Ce(a.value, (V, d) => {
195
- var s, c, x;
193
+ r("div", Xe, [
194
+ (U(!0), B(Ce, null, Ie(a.value, (V, i) => {
195
+ var s, d, _;
196
196
  return U(), B("div", {
197
197
  key: V.skuId,
198
198
  class: "flex"
199
199
  }, [
200
- u("div", We, [
201
- u("div", Xe, [
202
- u("div", Ze, T((s = l(h).skuById[V.skuId]) == null ? void 0 : s.name), 1),
203
- u("div", et, T((c = l(h).skuById[V.skuId]) == null ? void 0 : c.code), 1)
200
+ r("div", Ze, [
201
+ r("div", et, [
202
+ r("div", tt, T((s = l(h).skuById[V.skuId]) == null ? void 0 : s.name), 1),
203
+ r("div", lt, T((d = l(h).skuById[V.skuId]) == null ? void 0 : d.code), 1)
204
204
  ])
205
205
  ]),
206
- u("div", tt, [
207
- u("div", lt, [
208
- m(Fe, {
206
+ r("div", st, [
207
+ r("div", ot, [
208
+ m(Pe, {
209
209
  "model-value": g(V),
210
210
  unit: E(V),
211
- "onUpdate:modelValue": (w) => D(V, w),
212
- placement: a.value && d === ((x = a.value) == null ? void 0 : x.length) - 1 ? "top" : "bottom",
211
+ "onUpdate:modelValue": (x) => D(V, x),
212
+ placement: a.value && i === ((_ = a.value) == null ? void 0 : _.length) - 1 ? "top" : "bottom",
213
213
  separator: "/",
214
214
  "apply-default-rules": "",
215
215
  precision: 4,
216
216
  "format-minimum-precision": 2
217
217
  }, {
218
218
  prepend: N(() => {
219
- var w, p;
219
+ var x, I;
220
220
  return [
221
- u("div", st, T(b(((w = l(C).currentCountry) == null ? void 0 : w.value) ?? l(fe)) === "MYR" ? "RM" : b(((p = l(C).currentCountry) == null ? void 0 : p.value) ?? l(fe))), 1)
221
+ r("div", nt, T(y(((x = l(C).currentCountry) == null ? void 0 : x.value) ?? l(ye)) === "MYR" ? "RM" : y(((I = l(C).currentCountry) == null ? void 0 : I.value) ?? l(ye))), 1)
222
222
  ];
223
223
  }),
224
224
  _: 2
225
225
  }, 1032, ["model-value", "unit", "onUpdate:modelValue", "placement"]),
226
- u("div", null, [
226
+ r("div", null, [
227
227
  m(k, {
228
228
  "prepend-icon": "close",
229
229
  variant: "tertiary",
230
- onClick: (w) => $(d)
230
+ onClick: (x) => $(i)
231
231
  }, null, 8, ["onClick"])
232
232
  ])
233
233
  ])
@@ -238,10 +238,10 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
238
238
  ]);
239
239
  };
240
240
  }
241
- }), nt = { class: "flex flex-col gap-40" }, at = { class: "flex flex-col gap-16" }, rt = { key: 0 }, ut = { class: "flex flex-col gap-8" }, it = { class: "fm-typo-en-title-sm-800" }, dt = { class: "grid grid-cols-2 gap-24" }, pt = { class: "flex flex-col gap-8" }, ct = { class: "fm-typo-en-title-sm-800" }, mt = { class: "flex flex-col gap-16" }, vt = {
241
+ }), rt = { class: "flex flex-col gap-40" }, ut = { class: "flex flex-col gap-16" }, it = { key: 0 }, dt = { class: "flex flex-col gap-8" }, pt = { class: "fm-typo-en-title-sm-800" }, ct = { class: "grid grid-cols-2 gap-24" }, mt = { class: "flex flex-col gap-8" }, vt = { class: "fm-typo-en-title-sm-800" }, ft = { class: "flex flex-col gap-16" }, yt = {
242
242
  key: 0,
243
243
  class: "flex flex-col gap-8"
244
- }, ft = /* @__PURE__ */ Q({
244
+ }, bt = /* @__PURE__ */ W({
245
245
  __name: "SupplierForm",
246
246
  props: {
247
247
  modelValue: {},
@@ -249,7 +249,7 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
249
249
  },
250
250
  emits: ["update:modelValue", "validation-success"],
251
251
  setup(R, { expose: C, emit: h }) {
252
- const o = R, v = h, f = Ve(), a = ge(), i = _(() => Ne(a.skus, "_id")), { t: b } = z(), $ = _e(), E = _(() => $.businessLevel), g = _({
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({
253
253
  get() {
254
254
  var t;
255
255
  return ((t = o.modelValue) == null ? void 0 : t.name) ?? "";
@@ -258,7 +258,7 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
258
258
  const e = o.modelValue ?? {};
259
259
  e.name = t, v("update:modelValue", e);
260
260
  }
261
- }), D = _({
261
+ }), D = b({
262
262
  get() {
263
263
  var t;
264
264
  return ((t = o.modelValue) == null ? void 0 : t.registrationNumber) ?? "";
@@ -267,7 +267,7 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
267
267
  const e = o.modelValue ?? {};
268
268
  e.registrationNumber = t, v("update:modelValue", e);
269
269
  }
270
- }), n = _({
270
+ }), n = b({
271
271
  get() {
272
272
  var t, e;
273
273
  return ((e = (t = o.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.line1) ?? "";
@@ -276,7 +276,7 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
276
276
  const e = o.modelValue ?? {};
277
277
  e.address ?? (e.address = {}), e.address.line1 = t, v("update:modelValue", e);
278
278
  }
279
- }), S = _({
279
+ }), S = b({
280
280
  get() {
281
281
  var t, e;
282
282
  return ((e = (t = o.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.line2) ?? "";
@@ -285,7 +285,7 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
285
285
  const e = o.modelValue ?? {};
286
286
  e.address ?? (e.address = {}), e.address.line2 = t, v("update:modelValue", e);
287
287
  }
288
- }), k = _({
288
+ }), k = b({
289
289
  get() {
290
290
  var t, e;
291
291
  return ((e = (t = o.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.city) ?? "";
@@ -294,7 +294,7 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
294
294
  const e = o.modelValue ?? {};
295
295
  e.address ?? (e.address = {}), e.address.city = t, v("update:modelValue", e);
296
296
  }
297
- }), V = _({
297
+ }), V = b({
298
298
  get() {
299
299
  var t, e;
300
300
  return ((e = (t = o.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.postcode) ?? "";
@@ -303,7 +303,7 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
303
303
  const e = o.modelValue ?? {};
304
304
  e.address ?? (e.address = {}), e.address.postcode = t, v("update:modelValue", e);
305
305
  }
306
- }), d = _({
306
+ }), i = b({
307
307
  get() {
308
308
  var t, e;
309
309
  return ((e = (t = o.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.state) ?? "";
@@ -312,7 +312,7 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
312
312
  const e = o.modelValue ?? {};
313
313
  e.address ?? (e.address = {}), e.address.state = t, v("update:modelValue", e);
314
314
  }
315
- }), s = _({
315
+ }), s = b({
316
316
  get() {
317
317
  var t, e;
318
318
  return ((e = (t = o.modelValue) == null ? void 0 : t.address) == null ? void 0 : e.country) ?? "";
@@ -321,7 +321,7 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
321
321
  const e = o.modelValue ?? {};
322
322
  e.address ?? (e.address = {}), e.address.country = t, v("update:modelValue", e);
323
323
  }
324
- }), c = _({
324
+ }), d = b({
325
325
  get() {
326
326
  var t;
327
327
  return ((t = o.modelValue) == null ? void 0 : t.contactName) ?? "";
@@ -330,7 +330,7 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
330
330
  const e = o.modelValue ?? {};
331
331
  e.contactName = t, v("update:modelValue", e);
332
332
  }
333
- }), x = _({
333
+ }), _ = b({
334
334
  get() {
335
335
  var t;
336
336
  return ((t = o.modelValue) == null ? void 0 : t.phoneNumber) ?? "";
@@ -339,7 +339,7 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
339
339
  const e = o.modelValue ?? {};
340
340
  e.phoneNumber = t, v("update:modelValue", e);
341
341
  }
342
- }), w = _({
342
+ }), x = b({
343
343
  get() {
344
344
  var t;
345
345
  return ((t = o.modelValue) == null ? void 0 : t.email) ?? "";
@@ -348,155 +348,155 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
348
348
  const e = o.modelValue ?? {};
349
349
  e.email = t, v("update:modelValue", e);
350
350
  }
351
- }), p = _({
351
+ }), I = b({
352
352
  get() {
353
353
  var e;
354
- return (((e = o.modelValue) == null ? void 0 : e.supplyItems) ?? []).filter((M) => i.value[M.skuId]);
354
+ return (((e = o.modelValue) == null ? void 0 : e.supplyItems) ?? []).filter((M) => u.value[M.skuId]);
355
355
  },
356
356
  set(t) {
357
357
  const e = o.modelValue ?? {};
358
358
  e.supplyItems = t, v("update:modelValue", e);
359
359
  }
360
- }), y = L();
360
+ }), c = L();
361
361
  return C({
362
362
  validateInputs: () => {
363
363
  var t, e;
364
- (e = (t = y.value) == null ? void 0 : t.validateInputs) == null || e.call(t);
364
+ (e = (t = c.value) == null ? void 0 : t.validateInputs) == null || e.call(t);
365
365
  },
366
366
  resetInputsValidation: () => {
367
367
  var t, e;
368
- (e = (t = y.value) == null ? void 0 : t.resetInputsValidation) == null || e.call(t);
368
+ (e = (t = c.value) == null ? void 0 : t.resetInputsValidation) == null || e.call(t);
369
369
  },
370
370
  resetInputs: () => {
371
371
  var t, e;
372
- (e = (t = y.value) == null ? void 0 : t.resetInputs) == null || e.call(t);
372
+ (e = (t = c.value) == null ? void 0 : t.resetInputs) == null || e.call(t);
373
373
  }
374
374
  }), (t, e) => {
375
- const M = P("FmChip"), I = P("FmTextField"), Y = P("FmPhoneNumber"), H = P("FmForm");
376
- return U(), q(H, {
375
+ const M = P("FmChip"), w = P("FmTextField"), Y = P("FmPhoneNumber"), H = P("FmForm");
376
+ return U(), z(H, {
377
377
  ref_key: "formRef",
378
- ref: y,
379
- onValidationSuccess: e[12] || (e[12] = (r) => v("validation-success"))
378
+ ref: c,
379
+ onValidationSuccess: e[12] || (e[12] = (p) => v("validation-success"))
380
380
  }, {
381
381
  default: N(() => [
382
- u("div", nt, [
383
- u("div", at, [
384
- E.value ? (U(), B("div", rt, [
382
+ r("div", rt, [
383
+ r("div", ut, [
384
+ E.value ? (U(), B("div", it, [
385
385
  m(M, {
386
386
  label: "Business supplier",
387
387
  compact: ""
388
388
  })
389
- ])) : X("", !0),
390
- m(I, {
389
+ ])) : Z("", !0),
390
+ m(w, {
391
391
  disabled: t.disabled,
392
392
  rules: [l(F)()],
393
393
  "label-mark": "required",
394
- label: l(b)("inventory.supplier.companyName"),
394
+ label: l(y)("inventory.supplier.companyName"),
395
395
  modelValue: g.value,
396
- "onUpdate:modelValue": e[0] || (e[0] = (r) => g.value = r)
396
+ "onUpdate:modelValue": e[0] || (e[0] = (p) => g.value = p)
397
397
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
398
- m(I, {
398
+ m(w, {
399
399
  disabled: t.disabled,
400
400
  rules: [l(F)()],
401
401
  "label-mark": "required",
402
- label: l(b)("inventory.supplier.registrationNo"),
402
+ label: l(y)("inventory.supplier.registrationNo"),
403
403
  modelValue: D.value,
404
- "onUpdate:modelValue": e[1] || (e[1] = (r) => D.value = r)
404
+ "onUpdate:modelValue": e[1] || (e[1] = (p) => D.value = p)
405
405
  }, null, 8, ["disabled", "rules", "label", "modelValue"])
406
406
  ]),
407
- u("div", ut, [
408
- u("div", it, T(l(b)("inventory.supplier.address.title")), 1),
409
- u("div", dt, [
410
- m(I, {
407
+ r("div", dt, [
408
+ r("div", pt, T(l(y)("inventory.supplier.address.title")), 1),
409
+ r("div", ct, [
410
+ m(w, {
411
411
  disabled: t.disabled,
412
412
  rules: [l(F)()],
413
413
  "label-mark": "required",
414
- label: l(b)("inventory.supplier.address.line1"),
414
+ label: l(y)("inventory.supplier.address.line1"),
415
415
  modelValue: n.value,
416
- "onUpdate:modelValue": e[2] || (e[2] = (r) => n.value = r)
416
+ "onUpdate:modelValue": e[2] || (e[2] = (p) => n.value = p)
417
417
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
418
- m(I, {
418
+ m(w, {
419
419
  disabled: t.disabled,
420
420
  "label-mark": "optional",
421
- label: l(b)("inventory.supplier.address.line2"),
421
+ label: l(y)("inventory.supplier.address.line2"),
422
422
  modelValue: S.value,
423
- "onUpdate:modelValue": e[3] || (e[3] = (r) => S.value = r)
423
+ "onUpdate:modelValue": e[3] || (e[3] = (p) => S.value = p)
424
424
  }, null, 8, ["disabled", "label", "modelValue"]),
425
- m(I, {
425
+ m(w, {
426
426
  disabled: t.disabled,
427
427
  rules: [l(F)()],
428
428
  "label-mark": "required",
429
- label: l(b)("inventory.supplier.address.city"),
429
+ label: l(y)("inventory.supplier.address.city"),
430
430
  modelValue: k.value,
431
- "onUpdate:modelValue": e[4] || (e[4] = (r) => k.value = r)
431
+ "onUpdate:modelValue": e[4] || (e[4] = (p) => k.value = p)
432
432
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
433
- m(I, {
433
+ m(w, {
434
434
  disabled: t.disabled,
435
435
  rules: [l(F)()],
436
436
  "label-mark": "required",
437
- label: l(b)("inventory.supplier.address.postcode"),
437
+ label: l(y)("inventory.supplier.address.postcode"),
438
438
  modelValue: V.value,
439
- "onUpdate:modelValue": e[5] || (e[5] = (r) => V.value = r)
439
+ "onUpdate:modelValue": e[5] || (e[5] = (p) => V.value = p)
440
440
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
441
- m(I, {
441
+ m(w, {
442
442
  disabled: t.disabled,
443
443
  rules: [l(F)()],
444
444
  "label-mark": "required",
445
- label: l(b)("inventory.supplier.address.state"),
446
- modelValue: d.value,
447
- "onUpdate:modelValue": e[6] || (e[6] = (r) => d.value = r)
445
+ label: l(y)("inventory.supplier.address.state"),
446
+ modelValue: i.value,
447
+ "onUpdate:modelValue": e[6] || (e[6] = (p) => i.value = p)
448
448
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
449
- m(I, {
449
+ m(w, {
450
450
  disabled: t.disabled,
451
451
  rules: [l(F)()],
452
452
  "label-mark": "required",
453
- label: l(b)("inventory.supplier.address.country"),
453
+ label: l(y)("inventory.supplier.address.country"),
454
454
  modelValue: s.value,
455
- "onUpdate:modelValue": e[7] || (e[7] = (r) => s.value = r)
455
+ "onUpdate:modelValue": e[7] || (e[7] = (p) => s.value = p)
456
456
  }, null, 8, ["disabled", "rules", "label", "modelValue"])
457
457
  ])
458
458
  ]),
459
- u("div", pt, [
460
- u("div", ct, T(l(b)("inventory.supplier.contact.title")), 1),
461
- u("div", mt, [
462
- m(I, {
459
+ r("div", mt, [
460
+ r("div", vt, T(l(y)("inventory.supplier.contact.title")), 1),
461
+ r("div", ft, [
462
+ m(w, {
463
463
  disabled: t.disabled,
464
464
  rules: [l(F)()],
465
465
  "label-mark": "required",
466
- label: l(b)("inventory.supplier.contact.pic"),
467
- modelValue: c.value,
468
- "onUpdate:modelValue": e[8] || (e[8] = (r) => c.value = r)
466
+ label: l(y)("inventory.supplier.contact.pic"),
467
+ modelValue: d.value,
468
+ "onUpdate:modelValue": e[8] || (e[8] = (p) => d.value = p)
469
469
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
470
470
  m(Y, {
471
471
  disabled: t.disabled,
472
472
  rules: [l(F)()],
473
473
  "label-mark": "required",
474
- label: l(b)("inventory.supplier.contact.phoneNumber"),
475
- modelValue: x.value,
476
- "onUpdate:modelValue": e[9] || (e[9] = (r) => x.value = r)
474
+ label: l(y)("inventory.supplier.contact.phoneNumber"),
475
+ modelValue: _.value,
476
+ "onUpdate:modelValue": e[9] || (e[9] = (p) => _.value = p)
477
477
  }, null, 8, ["disabled", "rules", "label", "modelValue"]),
478
- m(I, {
478
+ m(w, {
479
479
  disabled: t.disabled,
480
480
  "label-mark": "optional",
481
- label: l(b)("inventory.supplier.contact.email"),
482
- modelValue: w.value,
483
- "onUpdate:modelValue": e[10] || (e[10] = (r) => w.value = r)
481
+ label: l(y)("inventory.supplier.contact.email"),
482
+ modelValue: x.value,
483
+ "onUpdate:modelValue": e[10] || (e[10] = (p) => x.value = p)
484
484
  }, null, 8, ["disabled", "label", "modelValue"])
485
485
  ])
486
486
  ]),
487
- l(f).enableTotalCost ? (U(), B("div", vt, [
488
- m(ot, {
489
- modelValue: p.value,
490
- "onUpdate:modelValue": e[11] || (e[11] = (r) => p.value = r)
487
+ l(f).enableTotalCost ? (U(), B("div", yt, [
488
+ m(at, {
489
+ modelValue: I.value,
490
+ "onUpdate:modelValue": e[11] || (e[11] = (p) => I.value = p)
491
491
  }, null, 8, ["modelValue"])
492
- ])) : X("", !0)
492
+ ])) : Z("", !0)
493
493
  ])
494
494
  ]),
495
495
  _: 1
496
496
  }, 512);
497
497
  };
498
498
  }
499
- }), yt = { class: "flex gap-4" }, bt = /* @__PURE__ */ Q({
499
+ }), gt = { class: "flex gap-4" }, Vt = /* @__PURE__ */ W({
500
500
  __name: "SupplierDialog",
501
501
  props: {
502
502
  mode: {},
@@ -505,52 +505,52 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
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 = Se(), { t: i } = z(), b = be(), $ = _(() => {
508
+ const o = R, v = h, f = L(!1), a = we(), { t: u } = q(), y = ge(), $ = b(() => {
509
509
  switch (o.mode) {
510
510
  case A.READ:
511
511
  return "";
512
512
  case A.UPDATE:
513
- return i("inventory.supplier.update.title");
513
+ return u("inventory.supplier.update.title");
514
514
  case A.CREATE:
515
- return i("inventory.supplier.create.title");
515
+ return u("inventory.supplier.create.title");
516
516
  }
517
517
  return "";
518
- }), E = _(() => {
518
+ }), E = b(() => {
519
519
  switch (o.mode) {
520
520
  case A.READ:
521
521
  return "";
522
522
  case A.UPDATE:
523
- return i("common.save");
523
+ return u("common.save");
524
524
  case A.CREATE:
525
- return i("common.add");
525
+ return u("common.add");
526
526
  }
527
527
  return "";
528
528
  }), g = L();
529
529
  C({
530
530
  validateInputs: () => {
531
- var s, c;
532
- (c = (s = g.value) == null ? void 0 : s.validateInputs) == null || c.call(s);
531
+ var s, d;
532
+ (d = (s = g.value) == null ? void 0 : s.validateInputs) == null || d.call(s);
533
533
  },
534
534
  resetInputsValidation: () => {
535
- var s, c;
536
- (c = (s = g.value) == null ? void 0 : s.resetInputsValidation) == null || c.call(s);
535
+ var s, d;
536
+ (d = (s = g.value) == null ? void 0 : s.resetInputsValidation) == null || d.call(s);
537
537
  },
538
538
  resetInputs: () => {
539
- var s, c;
540
- (c = (s = g.value) == null ? void 0 : s.resetInputs) == null || c.call(s);
539
+ var s, d;
540
+ (d = (s = g.value) == null ? void 0 : s.resetInputs) == null || d.call(s);
541
541
  }
542
542
  });
543
- const D = ye(o, "show"), n = ye(o, "supplier");
543
+ const D = be(o, "show"), n = be(o, "supplier");
544
544
  function S() {
545
- var s, c;
546
- (c = (s = g.value) == null ? void 0 : s.validateInputs) == null || c.call(s);
545
+ var s, d;
546
+ (d = (s = g.value) == null ? void 0 : s.validateInputs) == null || d.call(s);
547
547
  }
548
548
  function k() {
549
549
  switch (o.mode) {
550
550
  case A.READ:
551
551
  return;
552
552
  case A.UPDATE:
553
- return d();
553
+ return i();
554
554
  case A.CREATE:
555
555
  return V();
556
556
  }
@@ -559,11 +559,11 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
559
559
  f.value = !0;
560
560
  try {
561
561
  await Promise.all([
562
- b.createSupplier(n.value),
562
+ y.createSupplier(n.value),
563
563
  new Promise((s) => setTimeout(s, 1e3))
564
564
  ]), a.open({
565
- title: i("common.success"),
566
- message: i("inventory.supplier.create.success", { name: n.value.name }),
565
+ title: u("common.success"),
566
+ message: u("inventory.supplier.create.success", { name: n.value.name }),
567
567
  type: "success"
568
568
  }), v("update:show", !1), v("submitted");
569
569
  } catch (s) {
@@ -576,11 +576,11 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
576
576
  f.value = !1;
577
577
  }
578
578
  }
579
- async function d() {
579
+ async function i() {
580
580
  if (n.value === null) {
581
581
  a.open({
582
- title: i("inventory.supplier.update.error.title"),
583
- message: i("inventory.supplier.update.error.emptySupplier"),
582
+ title: u("inventory.supplier.update.error.title"),
583
+ message: u("inventory.supplier.update.error.emptySupplier"),
584
584
  type: "error"
585
585
  });
586
586
  return;
@@ -588,51 +588,51 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
588
588
  f.value = !0;
589
589
  try {
590
590
  await Promise.all([
591
- b.updateSupplier(n.value),
591
+ y.updateSupplier(n.value),
592
592
  new Promise((s) => setTimeout(s, 1e3))
593
593
  ]), a.open({
594
- title: i("common.success"),
595
- message: i("inventory.supplier.update.success", { name: n.value.name }),
594
+ title: u("common.success"),
595
+ message: u("inventory.supplier.update.success", { name: n.value.name }),
596
596
  type: "success"
597
597
  }), v("update:show", !1), v("submitted");
598
598
  } catch (s) {
599
599
  a.open({
600
- title: i("inventory.supplier.update.error.title"),
601
- message: i("inventory.supplier.update.error.message"),
600
+ title: u("inventory.supplier.update.error.title"),
601
+ message: u("inventory.supplier.update.error.message"),
602
602
  type: "error"
603
603
  }), console.error("cannot update supplier", s);
604
604
  } finally {
605
605
  f.value = !1;
606
606
  }
607
607
  }
608
- return (s, c) => {
609
- const x = P("FmButton"), w = P("FmSideSheet");
610
- return U(), q(w, {
608
+ return (s, d) => {
609
+ const _ = P("FmButton"), x = P("FmSideSheet");
610
+ return U(), z(x, {
611
611
  header: $.value,
612
612
  modelValue: l(D),
613
- "onUpdate:modelValue": c[1] || (c[1] = (p) => me(D) ? D.value = p : null),
613
+ "onUpdate:modelValue": d[1] || (d[1] = (I) => ve(D) ? D.value = I : null),
614
614
  "dismiss-away": !f.value,
615
615
  "close-button": "",
616
616
  "max-width": 500
617
617
  }, {
618
618
  default: N(() => {
619
- var p;
619
+ var I;
620
620
  return [
621
- (U(), q(ft, {
621
+ (U(), z(bt, {
622
622
  class: "w-full",
623
623
  ref_key: "formRef",
624
624
  ref: g,
625
625
  modelValue: l(n),
626
- "onUpdate:modelValue": c[0] || (c[0] = (y) => me(n) ? n.value = y : null),
626
+ "onUpdate:modelValue": d[0] || (d[0] = (c) => ve(n) ? n.value = c : null),
627
627
  onValidationSuccess: k,
628
- key: ((p = s.supplier) == null ? void 0 : p._id) ?? "",
628
+ key: ((I = s.supplier) == null ? void 0 : I._id) ?? "",
629
629
  disabled: f.value
630
630
  }, null, 8, ["modelValue", "disabled"]))
631
631
  ];
632
632
  }),
633
633
  "side-sheet-footer": N(() => [
634
- u("div", yt, [
635
- m(x, {
634
+ r("div", gt, [
635
+ m(_, {
636
636
  loading: f.value,
637
637
  label: E.value,
638
638
  onClick: S
@@ -643,16 +643,16 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
643
643
  }, 8, ["header", "modelValue", "dismiss-away"]);
644
644
  };
645
645
  }
646
- }), gt = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, Vt = { class: "flex flex-col py-8" }, _t = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, ht = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, St = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xt = {
646
+ }), _t = { class: "flex flex-col py-8" }, ht = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, St = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, wt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xt = {
647
647
  key: 0,
648
648
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
649
- }, wt = "You are managing business-level supplier list. These suppliers will be made visible to all locations.", Rt = /* @__PURE__ */ Q({
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 = be(), h = _e(), o = Ve(), v = L(!1), f = he(), a = Se(), { t: i } = z();
652
+ const C = ge(), h = he(), o = _e(), v = L(!1), f = Se(), a = we(), { t: u } = q();
653
653
  h.watchLocation($);
654
- const b = _(() => h.businessLevel);
655
- Ie(b, $), Me(() => {
654
+ const y = b(() => h.businessLevel);
655
+ Me(y, $), $e(() => {
656
656
  o.enableSupplierMasterList || (h.businessLevel = !1);
657
657
  });
658
658
  async function $() {
@@ -661,7 +661,7 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
661
661
  try {
662
662
  await Promise.all([
663
663
  C.readSuppliers(),
664
- new Promise((y) => setTimeout(y, 1e3))
664
+ new Promise((t) => setTimeout(t, 1e3))
665
665
  ]);
666
666
  } catch {
667
667
  a.open({
@@ -673,123 +673,131 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
673
673
  }
674
674
  }
675
675
  }
676
- const E = _(
677
- () => b.value ? C.businessSuppliers : C.locationSuppliers
676
+ const E = b(
677
+ () => y.value ? C.businessSuppliers : C.locationSuppliers
678
678
  ), g = L({});
679
679
  function D() {
680
680
  g.value.mode = A.CREATE, g.value.supplier = {}, g.value.show = !0;
681
681
  }
682
- function n(p) {
683
- g.value.mode = A.UPDATE, g.value.supplier = Z(p), g.value.show = !0;
682
+ function n(c) {
683
+ g.value.mode = A.UPDATE, g.value.supplier = ee(c), g.value.show = !0;
684
684
  }
685
- async function S(p) {
685
+ async function S(c) {
686
686
  f.open({
687
- title: i("inventory.supplier.delete.confirm"),
688
- message: i("inventory.supplier.delete.confirmMessage", { name: p.name }),
687
+ title: u("inventory.supplier.delete.confirm"),
688
+ message: u("inventory.supplier.delete.confirmMessage", { name: c.name }),
689
689
  primaryActions: {
690
- text: i("common.delete"),
690
+ text: u("common.delete"),
691
691
  close: !0,
692
692
  variant: "destructive"
693
693
  },
694
694
  secondaryActions: {
695
- text: i("common.cancel"),
695
+ text: u("common.cancel"),
696
696
  close: !0
697
697
  }
698
- }).onPrimary(() => k(p));
698
+ }).onPrimary(() => k(c));
699
699
  }
700
- async function k(p) {
700
+ async function k(c) {
701
701
  f.open({
702
- title: i("inventory.supplier.deletingSupplier"),
702
+ title: u("inventory.supplier.deletingSupplier"),
703
703
  closeButton: !1
704
704
  });
705
705
  try {
706
- await C.deleteSupplier(p), a.open({
707
- title: i("inventory.supplier.delete.success"),
708
- message: i("inventory.supplier.delete.successMessage", { name: p == null ? void 0 : p.name }),
706
+ await C.deleteSupplier(c), a.open({
707
+ title: u("inventory.supplier.delete.success"),
708
+ message: u("inventory.supplier.delete.successMessage", { name: c == null ? void 0 : c.name }),
709
709
  type: "success"
710
710
  }), $();
711
- } catch (y) {
711
+ } catch (t) {
712
712
  a.open({
713
- title: i("inventory.supplier.delete.error"),
714
- message: i("inventory.supplier.delete.errorMessage", { name: p == null ? void 0 : p.name }),
713
+ title: u("inventory.supplier.delete.error"),
714
+ message: u("inventory.supplier.delete.errorMessage", { name: c == null ? void 0 : c.name }),
715
715
  type: "error"
716
- }), console.error("failed to delete supplier", y);
716
+ }), console.error("failed to delete supplier", t);
717
717
  } finally {
718
718
  f.close();
719
719
  }
720
720
  }
721
- const { columnDefs: V } = Ye(n, S);
722
- function d(p) {
723
- p === "create" && D();
721
+ const { columnDefs: V } = Ke(n, S);
722
+ function i(c) {
723
+ c === "create" && D();
724
724
  }
725
- const s = L(""), { breakpoints: c } = Te(), x = _(() => c.value.xs || c.value.sm ? 10 : 20), w = Be();
726
- return (p, y) => {
727
- const t = P("FmTable");
728
- return U(), q(Le, {
729
- title: l(i)("inventory.supplier.title"),
725
+ const s = L(""), { breakpoints: d } = Le(), _ = b(() => d.value.xs || d.value.sm), x = b(() => _.value ? 10 : 20), I = ze();
726
+ return (c, t) => {
727
+ const e = P("FmTable");
728
+ return U(), z(qe, {
729
+ title: l(u)("inventory.supplier.title"),
730
730
  actions: [
731
731
  {
732
- label: l(i)("inventory.supplier.create.title"),
732
+ label: l(u)("inventory.supplier.create.title"),
733
733
  value: "create",
734
734
  isPrimary: !0,
735
735
  prependIcon: "add"
736
736
  }
737
737
  ],
738
- "onClick:action": d,
739
- "using-business-helper-text": wt
738
+ "onClick:action": i,
739
+ "using-business-helper-text": kt
740
740
  }, {
741
741
  default: N(() => [
742
- u("div", gt, [
743
- m(qe, {
742
+ r("div", {
743
+ class: Ae([
744
+ "flex flex-col gap-8 max-h-full",
745
+ {
746
+ "p-0": _.value,
747
+ "px-24 ": !_.value
748
+ }
749
+ ])
750
+ }, [
751
+ m(Ye, {
744
752
  searchable: "",
745
753
  "change-location": "",
746
754
  search: s.value,
747
- "onUpdate:search": y[0] || (y[0] = (e) => s.value = e),
755
+ "onUpdate:search": t[0] || (t[0] = (M) => s.value = M),
748
756
  "show-business": l(o).enableSupplierMasterList,
749
757
  actions: [{ icon: "refresh", onClick: () => $() }]
750
758
  }, null, 8, ["search", "show-business", "actions"]),
751
- m(t, {
752
- style: $e(l(w).tableHeight),
759
+ m(e, {
760
+ style: Ue(l(I).tableHeight),
753
761
  "column-defs": l(V),
754
762
  "row-data": E.value,
755
763
  "search-value": s.value,
756
764
  loading: !l(h)._currentLocation || v.value,
757
- onRowClick: y[1] || (y[1] = (e) => n(e.original)),
765
+ onRowClick: t[1] || (t[1] = (M) => n(M.original)),
758
766
  "page-size": x.value
759
767
  }, {
760
- "list-row": N((e) => [
761
- m(De, {
762
- row: e,
768
+ "list-row": N((M) => [
769
+ m(Re, {
770
+ row: M,
763
771
  onRowClick: n
764
772
  }, {
765
- default: N((M) => {
766
- var I, Y, H, r, ee, te, le, se, K, oe, ne, ae, re, j, ue, ie, de, pe, G, ce;
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;
767
775
  return [
768
- u("div", Vt, [
769
- u("div", _t, [
770
- m(l(J), {
771
- render: (H = (Y = (I = M.name) == null ? void 0 : I.column) == null ? void 0 : Y.columnDef) == null ? void 0 : H.cell,
772
- props: (ee = (r = M.name) == null ? void 0 : r.getContext) == null ? void 0 : ee.call(r)
776
+ r("div", _t, [
777
+ r("div", ht, [
778
+ m(l(Q), {
779
+ render: (p = (H = (Y = w.name) == null ? void 0 : Y.column) == null ? void 0 : H.columnDef) == null ? void 0 : p.cell,
780
+ props: (te = (K = w.name) == null ? void 0 : K.getContext) == null ? void 0 : te.call(K)
773
781
  }, null, 8, ["render", "props"])
774
782
  ]),
775
- u("div", ht, [
776
- m(l(J), {
777
- render: (se = (le = (te = M.contactName) == null ? void 0 : te.column) == null ? void 0 : le.columnDef) == null ? void 0 : se.cell,
778
- props: (oe = (K = M.contactName) == null ? void 0 : K.getContext) == null ? void 0 : oe.call(K)
783
+ r("div", St, [
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)
779
787
  }, null, 8, ["render", "props"])
780
788
  ]),
781
- u("div", St, [
782
- m(l(J), {
783
- render: (re = (ae = (ne = M.phoneNumber) == null ? void 0 : ne.column) == null ? void 0 : ae.columnDef) == null ? void 0 : re.cell,
784
- props: (ue = (j = M.phoneNumber) == null ? void 0 : j.getContext) == null ? void 0 : ue.call(j)
789
+ r("div", wt, [
790
+ m(l(Q), {
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)
785
793
  }, null, 8, ["render", "props"])
786
794
  ]),
787
- e.original.email ? (U(), B("div", xt, [
788
- m(l(J), {
789
- render: (pe = (de = (ie = M.email) == null ? void 0 : ie.column) == null ? void 0 : de.columnDef) == null ? void 0 : pe.cell,
790
- props: (ce = (G = M.email) == null ? void 0 : G.getContext) == null ? void 0 : ce.call(G)
795
+ M.original.email ? (U(), B("div", xt, [
796
+ m(l(Q), {
797
+ render: (ce = (pe = (de = w.email) == null ? void 0 : de.column) == null ? void 0 : pe.columnDef) == null ? void 0 : ce.cell,
798
+ props: (me = (O = w.email) == null ? void 0 : O.getContext) == null ? void 0 : me.call(O)
791
799
  }, null, 8, ["render", "props"])
792
- ])) : X("", !0)
800
+ ])) : Z("", !0)
793
801
  ])
794
802
  ];
795
803
  }),
@@ -798,14 +806,14 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
798
806
  ]),
799
807
  _: 1
800
808
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
801
- ]),
802
- (U(), q(Ae, { to: "body" }, [
803
- m(bt, {
809
+ ], 2),
810
+ (U(), z(De, { to: "body" }, [
811
+ m(Vt, {
804
812
  show: g.value.show,
805
- "onUpdate:show": y[2] || (y[2] = (e) => g.value.show = e),
813
+ "onUpdate:show": t[2] || (t[2] = (M) => g.value.show = M),
806
814
  supplier: g.value.supplier,
807
815
  mode: g.value.mode,
808
- onSubmitted: y[3] || (y[3] = (e) => $())
816
+ onSubmitted: t[3] || (t[3] = (M) => $())
809
817
  }, null, 8, ["show", "supplier", "mode"])
810
818
  ]))
811
819
  ]),
@@ -815,5 +823,5 @@ const He = { class: "flex flex-col gap-12" }, Ke = { class: "flex flex-col" }, j
815
823
  }
816
824
  });
817
825
  export {
818
- Rt as default
826
+ Pt as default
819
827
  };