@feedmepos/mf-inventory-portal 0.0.25-dev.6 → 0.0.25-dev.7

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 (40) hide show
  1. package/dist/{App-CbfxkgwK.js → App-qJehfAde.js} +1 -1
  2. package/dist/{ApprovalView-ELDEWMap.js → ApprovalView-BuqKIEPL.js} +2 -2
  3. package/dist/{BindingsDialog-BtCjzX36.js → BindingsDialog-BrF-YAJ2.js} +2 -2
  4. package/dist/{BindingsPicker-DP6FdglZ.js → BindingsPicker-DK41dcoG.js} +1 -1
  5. package/dist/{BindingsTable-amcmKpj_.js → BindingsTable-DxlRhKzN.js} +1 -1
  6. package/dist/{ClosingDraftView-DO_14oDG.js → ClosingDraftView-CpGQMN37.js} +2 -2
  7. package/dist/{ClosingTemplateView-BMsQpdg7.js → ClosingTemplateView-4l891KsC.js} +3 -3
  8. package/dist/{FmCustomAttribute.vue_vue_type_script_setup_true_lang-DUXkuq24.js → FmCustomAttribute.vue_vue_type_script_setup_true_lang-CyHyOhG6.js} +1 -1
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BZQxtTDj.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DRqpc9k0.js} +3 -3
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-iPM-EQny.js → FmUnitInput.vue_vue_type_script_setup_true_lang-3LU_3Y8h.js} +1 -1
  11. package/dist/{IngredientGroupView-Coo5z0LR.js → IngredientGroupView-Bjv9Kih7.js} +1 -1
  12. package/dist/{IngredientsView-CeQXaN2p.js → IngredientsView-ChJbe-U_.js} +3 -3
  13. package/dist/{IntegrationView-md4hgi8k.js → IntegrationView-Cmh47qP7.js} +1 -1
  14. package/dist/{InventoryBindingForm-CwsppNrg.js → InventoryBindingForm-GmcCTBqN.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CLR61V6f.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CQrjMOFh.js} +3 -3
  16. package/dist/{InventoryBindingSummary-DMvVMPfD.js → InventoryBindingSummary-w1pFGR3C.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-ByQXRxdh.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Cxr2xhRR.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DPmIQEPN.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CzxVUAC8.js} +1 -1
  19. package/dist/{PublishView-27Kqj9Pl.js → PublishView-pWAEdGLi.js} +2 -2
  20. package/dist/{PurchaseOrderPrintPreview-aa4spvmG.js → PurchaseOrderPrintPreview-CZczBXL2.js} +1 -1
  21. package/dist/{ReceiveRequestView-D9U4Vea4.js → ReceiveRequestView-tWyQCrIN.js} +8 -8
  22. package/dist/{RecipeView-A8xhUvgI.js → RecipeView-Dy1BBW3o.js} +3 -3
  23. package/dist/{StockView-Dw3H-6FB.js → StockView-B0c0FiPr.js} +7 -7
  24. package/dist/{SupplierView-B5T1mml-.js → SupplierView-BUs8xZPq.js} +3 -3
  25. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-C8Q0rIlP.js → TransferDetails.vue_vue_type_script_setup_true_lang-BA0HIuSW.js} +3 -3
  26. package/dist/{TransferTemplateView-BByKikfy.js → TransferTemplateView-MSbvSo96.js} +162 -160
  27. package/dist/{UnitView-BPm-9Ouy.js → UnitView-GBK0ovxt.js} +3 -3
  28. package/dist/{WarehouseView-B6kMLEnU.js → WarehouseView-CXoj99HO.js} +1 -1
  29. package/dist/{app-DLEGCGlp.js → app-Du-JrqLm.js} +96 -96
  30. package/dist/app.js +1 -1
  31. package/dist/{decimal-Ivbuwf48.js → decimal-BXePRNLM.js} +1 -1
  32. package/dist/{format-unit-display-DWEQ-Uq0.js → format-unit-display-BdC0fMRb.js} +256 -253
  33. package/dist/{index-D9ACNHSL.js → index-cY9fiIBU.js} +1 -1
  34. package/dist/{index-CjaT65-H.js → index-irnhqIWw.js} +3 -3
  35. package/dist/{stock-IxIBNyKi.js → stock-CE5Qq59r.js} +1 -1
  36. package/dist/{supplier-5uoaiSy6.js → supplier-Cy-jlD0j.js} +1 -1
  37. package/dist/{use-inventory-binding-dialog-Bv4zc_sy.js → use-inventory-binding-dialog-nHDQBRL3.js} +1 -1
  38. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +0 -1
  39. package/dist/{vue-i18n-CW-Rmr2v.js → vue-i18n-DIA7c33f.js} +295 -295
  40. package/package.json +1 -1
@@ -1,13 +1,13 @@
1
- import { defineComponent as X, onMounted as ce, computed as R, ref as U, watch as pe, inject as Je, resolveComponent as V, openBlock as D, createElementBlock as K, createElementVNode as t, createVNode as c, withCtx as B, renderSlot as Oe, withDirectives as Ve, normalizeClass as Z, vModelText as Ae, reactive as Ze, h as J, toDisplayString as I, unref as e, createBlock as W, mergeProps as Ee, isRef as Ue, createCommentVNode as ee, Fragment as qe, renderList as Xe, normalizeStyle as Ye, Teleport as et, normalizeProps as tt, guardReactiveProps as ot } from "vue";
2
- import { H as Ne, ay as ue, t as De, I as st, az as lt, aA as nt, j as G, aB as at, b as ze, $ as Re, m as me, a as He, P as ie, L as rt, A as de, M as it, c as je, G as Q, u as Qe, ac as ut, V as mt, E as Ke, J as dt, K as ct, e as te, aC as ae, a9 as pt, a1 as ft, z as yt, i as Pe, _ as vt, B as bt } from "./app-DLEGCGlp.js";
1
+ import { defineComponent as X, onMounted as ce, computed as R, ref as U, watch as pe, inject as Je, resolveComponent as V, openBlock as A, createElementBlock as G, createElementVNode as t, createVNode as c, withCtx as B, renderSlot as Oe, withDirectives as Ve, normalizeClass as Z, vModelText as De, reactive as Ze, h as J, toDisplayString as I, unref as e, createBlock as W, mergeProps as Ee, isRef as Ue, createCommentVNode as ee, Fragment as qe, renderList as Xe, normalizeStyle as Ye, Teleport as et, normalizeProps as tt, guardReactiveProps as ot } from "vue";
2
+ import { H as Ne, ay as ue, t as Ae, I as st, az as lt, aA as nt, j as K, aB as at, b as ze, $ as Re, m as de, a as He, P as ie, L as rt, A as me, M as it, c as je, G as Q, u as Qe, ac as ut, V as dt, E as Ke, J as mt, K as ct, e as te, aC as ae, a9 as pt, a1 as ft, z as yt, i as Pe, _ as vt, B as bt } from "./app-Du-JrqLm.js";
3
3
  import { useI18n as Y } from "@feedmepos/mf-common";
4
- import { P as H, a as xt, f as _t, t as ht, b as Le, u as gt } from "./format-unit-display-DWEQ-Uq0.js";
4
+ import { P as H, a as xt, f as _t, t as ht, b as Le, u as gt } from "./format-unit-display-BdC0fMRb.js";
5
5
  import { components as re, useDialog as Tt, useSnackbar as Ft, useProxiedModel as Ge, useBreakpoints as wt } from "@feedmepos/ui-library";
6
6
  import { storeToRefs as Be } from "pinia";
7
- import { _ as kt, b as Ct, F as St, a as Mt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-iPM-EQny.js";
8
- import { c as $t, u as It, _ as Ot } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BZQxtTDj.js";
9
- import { u as Vt } from "./supplier-5uoaiSy6.js";
10
- const At = { class: "flex flex-col" }, Dt = { class: "flex flex-col" }, Rt = { class: "flex-1" }, Pt = { class: "flex items-center" }, Lt = { class: "flex-1" }, Bt = { class: "flex-1" }, Et = /* @__PURE__ */ X({
7
+ import { _ as kt, b as Ct, F as St, a as $t } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-3LU_3Y8h.js";
8
+ import { c as Mt, u as It, _ as Ot } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DRqpc9k0.js";
9
+ import { u as Vt } from "./supplier-Cy-jlD0j.js";
10
+ const Dt = { class: "flex flex-col" }, At = { class: "flex flex-col" }, Rt = { class: "flex-1" }, Pt = { class: "flex items-center" }, Lt = { class: "flex-1" }, Bt = { class: "flex-1" }, Et = /* @__PURE__ */ X({
11
11
  __name: "FmMinMaxInput",
12
12
  props: {
13
13
  rules: {},
@@ -53,43 +53,43 @@ const At = { class: "flex flex-col" }, Dt = { class: "flex flex-col" }, Rt = { c
53
53
  u.min = a, u.max = f;
54
54
  }
55
55
  });
56
- const m = R(() => {
56
+ const d = R(() => {
57
57
  const { min: p, max: r } = u ?? {};
58
58
  return Math.max((p == null ? void 0 : p.precision) ?? 0, (r == null ? void 0 : r.precision) ?? 0, _.precision ?? 0);
59
59
  }), C = (p) => {
60
60
  if (!p) return "";
61
- const r = lt(p), b = m.value, a = ue(r, b);
61
+ const r = lt(p), b = d.value, a = ue(r, b);
62
62
  return nt(
63
- +G(a),
63
+ +K(a),
64
64
  a.precision
65
65
  );
66
66
  }, i = U(C(u.min)), l = U(C(u.max));
67
67
  pe([i, l], ([p, r]) => {
68
- const b = u ?? {}, a = s(p), f = s(r), w = m.value;
68
+ const b = u ?? {}, a = s(p), f = s(r), w = d.value;
69
69
  if (p !== "" && a === !0) {
70
- const o = De(+p, w);
70
+ const o = Ae(+p, w);
71
71
  b.min = o;
72
72
  } else
73
73
  b.min = null;
74
74
  if (r !== "" && f === !0) {
75
- const o = De(+r, w);
75
+ const o = Ae(+r, w);
76
76
  b.max = o;
77
77
  } else
78
78
  b.max = null;
79
79
  u.min = b.min, u.max = b.max;
80
80
  });
81
- const d = Symbol.for("fm:form-state"), k = Je(d, null), g = R(() => _.disabled ?? (k == null ? void 0 : k.getDisabled()) ?? !1), A = U(), T = U(), v = U(!1), F = U(!1), O = R(() => v.value || F.value), E = R(() => [...[
81
+ const m = Symbol.for("fm:form-state"), k = Je(m, null), g = R(() => _.disabled ?? (k == null ? void 0 : k.getDisabled()) ?? !1), D = U(), T = U(), v = U(!1), F = U(!1), O = R(() => v.value || F.value), E = R(() => [...[
82
82
  function() {
83
83
  return typeof s(i.value) == "string" || typeof s(l.value) == "string" ? "Must be a number" : !0;
84
84
  },
85
85
  function(b) {
86
- return !b || !b.min || !b.max ? !0 : +G(b.min) > +G(b.max) ? "Min must be less than or equal to max" : !0;
86
+ return !b || !b.min || !b.max ? !0 : +K(b.min) > +K(b.max) ? "Min must be less than or equal to max" : !0;
87
87
  }
88
88
  ], ..._.rules ?? []]);
89
89
  return (p, r) => {
90
90
  const b = V("FmLabel"), a = V("FmField"), f = V("FmFormGroup");
91
- return D(), K("div", At, [
92
- t("div", Dt, [
91
+ return A(), G("div", Dt, [
92
+ t("div", At, [
93
93
  t("div", Rt, [
94
94
  c(b, {
95
95
  label: p.label,
@@ -107,7 +107,7 @@ const At = { class: "flex flex-col" }, Dt = { class: "flex flex-col" }, Rt = { c
107
107
  Ve(t("input", {
108
108
  type: "text",
109
109
  ref_key: "minInputRef",
110
- ref: A,
110
+ ref: D,
111
111
  onFocus: r[0] || (r[0] = () => v.value = !0),
112
112
  onBlur: r[1] || (r[1] = () => v.value = !1),
113
113
  "onUpdate:modelValue": r[2] || (r[2] = (w) => i.value = w),
@@ -117,7 +117,7 @@ const At = { class: "flex flex-col" }, Dt = { class: "flex flex-col" }, Rt = { c
117
117
  "text-fm-color-typo-disabled": g.value
118
118
  })
119
119
  }, null, 34), [
120
- [Ae, i.value]
120
+ [De, i.value]
121
121
  ])
122
122
  ]),
123
123
  r[7] || (r[7] = t("div", { class: "block h-32 mx-4 w-[1px] bg-fm-color-neutral-gray-200" }, null, -1)),
@@ -136,7 +136,7 @@ const At = { class: "flex flex-col" }, Dt = { class: "flex flex-col" }, Rt = { c
136
136
  "text-fm-color-typo-disabled": g.value
137
137
  })
138
138
  }, null, 34), [
139
- [Ae, l.value]
139
+ [De, l.value]
140
140
  ])
141
141
  ]),
142
142
  Oe(p.$slots, "append")
@@ -164,30 +164,30 @@ function Ut({ min: y, max: _ } = { min: !0, max: !0 }) {
164
164
  }
165
165
  function qt(y, _) {
166
166
  return function(s) {
167
- return !s || !s.min || !s.max ? !0 : +G(s.min) < y ? `Must be between ${y} and ${_}` : +G(s.max) > _ ? `Must be between ${y} and ${_}` : !0;
167
+ return !s || !s.min || !s.max ? !0 : +K(s.min) < y ? `Must be between ${y} and ${_}` : +K(s.max) > _ ? `Must be between ${y} and ${_}` : !0;
168
168
  };
169
169
  }
170
170
  function Nt(y) {
171
- const _ = at(y), u = G(y);
172
- return function(m) {
173
- const C = !(m != null && m.min) || _(m.min) === !0, i = !(m != null && m.max) || _(m.max) === !0;
171
+ const _ = at(y), u = K(y);
172
+ return function(d) {
173
+ const C = !(d != null && d.min) || _(d.min) === !0, i = !(d != null && d.max) || _(d.max) === !0;
174
174
  return !C && !i ? `Min & max must be a multiple of ${u}` : C ? i ? !0 : `Max must be a multiple of ${u}` : `Min must be a multiple of ${u}`;
175
175
  };
176
176
  }
177
- var L = /* @__PURE__ */ ((y) => (y.Code = "Code", y.Name = "Name", y.DefaultAmount = "DefaultAmount", y.Limit = "Limit", y.MinimumAmount = "MinimumAmount", y.Step = "Step", y.Cost = "Cost", y.Delete = "Delete", y))(L || {});
177
+ var L = /* @__PURE__ */ ((y) => (y.Code = "Code", y.Name = "Name", y.DefaultAmount = "DefaultAmount", y.Limit = "Limit", y.Step = "Step", y.Cost = "Cost", y.Delete = "Delete", y))(L || {});
178
178
  function zt(y) {
179
179
  const { t: _ } = Y(), u = ze(), s = Ze({});
180
180
  ce(() => {
181
181
  for (const i of y.items) {
182
182
  if (!i.totalCost)
183
183
  continue;
184
- const l = $t(i.sku, i.quantity, i.measurement, {
184
+ const l = Mt(i.sku, i.quantity, i.measurement, {
185
185
  supplier: y.supplier
186
- }), d = i.totalCost ?? Re.reset();
187
- l ? s[i.sku._id] = l.amount !== d.amount || l.precision !== d.precision : s[i.sku._id] = !0;
186
+ }), m = i.totalCost ?? Re.reset();
187
+ l ? s[i.sku._id] = l.amount !== m.amount || l.precision !== m.precision : s[i.sku._id] = !0;
188
188
  }
189
189
  });
190
- const m = [
190
+ const d = [
191
191
  {
192
192
  id: "Code",
193
193
  header: () => _("inventory.transfer.form.items.table.Code"),
@@ -197,14 +197,14 @@ function zt(y) {
197
197
  const l = i.row.original;
198
198
  return J(re.FmTextField, {
199
199
  modelValue: l.code,
200
- "onUpdate:modelValue": (d) => {
200
+ "onUpdate:modelValue": (m) => {
201
201
  y.updateItem({
202
202
  ...l,
203
- code: d
203
+ code: m
204
204
  });
205
205
  },
206
206
  key: l.sku._id,
207
- rules: [me()],
207
+ rules: [de()],
208
208
  labelMark: "required"
209
209
  });
210
210
  },
@@ -218,14 +218,14 @@ function zt(y) {
218
218
  const l = i.row.original;
219
219
  return J(re.FmTextField, {
220
220
  modelValue: l.name,
221
- "onUpdate:modelValue": (d) => {
221
+ "onUpdate:modelValue": (m) => {
222
222
  y.updateItem({
223
223
  ...l,
224
- name: d
224
+ name: m
225
225
  });
226
226
  },
227
227
  key: l.sku._id,
228
- rules: [me()],
228
+ rules: [de()],
229
229
  labelMark: "required"
230
230
  });
231
231
  },
@@ -237,10 +237,10 @@ function zt(y) {
237
237
  minSize: 200,
238
238
  cell(i) {
239
239
  var v;
240
- const l = i.row.original, d = He(), k = d.skuById[l.sku._id], g = d.unitById[(v = k.unit) == null ? void 0 : v._id], A = g.measurements.find((F) => {
240
+ const l = i.row.original, m = He(), k = m.skuById[l.sku._id], g = m.unitById[(v = k.unit) == null ? void 0 : v._id], D = g.measurements.find((F) => {
241
241
  var O;
242
242
  return ((O = l.measurement) == null ? void 0 : O.id) === F.id;
243
- }), T = l.sku.unit._id !== k.unit._id || !g || l.measurement && !A;
243
+ }), T = l.sku.unit._id !== k.unit._id || !g || l.measurement && !D;
244
244
  return J(kt, {
245
245
  style: {
246
246
  flex: "1 1 0%"
@@ -270,17 +270,19 @@ function zt(y) {
270
270
  },
271
271
  rules: [
272
272
  Ct(l.quantityStep),
273
- St(
274
- +G(
275
- l.minimumQuantity ?? {
276
- amount: 1,
277
- // NOTE: leave this reading from row.sku.unit and row.measurement instead,
278
- precision: ie(l.sku.unit, l.measurement)
279
- }
273
+ ...+K(l.quantity) ? [
274
+ St(
275
+ +K(
276
+ l.minimumQuantity ?? {
277
+ amount: 1,
278
+ // NOTE: leave this reading from row.sku.unit and row.measurement instead,
279
+ precision: ie(l.sku.unit, l.measurement)
280
+ }
281
+ )
280
282
  )
281
- ),
282
- Mt(
283
- l.maximumQuantity ? +G(l.maximumQuantity) : 1 / 0
283
+ ] : [],
284
+ $t(
285
+ l.maximumQuantity ? +K(l.maximumQuantity) : 1 / 0
284
286
  ),
285
287
  function(O) {
286
288
  return T ? "This item is no longer valid due to change in unit. Please reapply unit." : !0;
@@ -309,15 +311,15 @@ function zt(y) {
309
311
  disabled: y.disabled,
310
312
  key: l.sku._id,
311
313
  unit: l.sku.unit,
312
- "onUpdate:modelValue": (d) => {
314
+ "onUpdate:modelValue": (m) => {
313
315
  const k = { ...l };
314
- d != null && d.min ? k.minimumQuantity = d.min : k.minimumQuantity = null, d != null && d.max ? k.maximumQuantity = d.max : k.maximumQuantity = null, y.updateItem(k);
316
+ m != null && m.min ? k.minimumQuantity = m.min : k.minimumQuantity = null, m != null && m.max ? k.maximumQuantity = m.max : k.maximumQuantity = null, y.updateItem(k);
315
317
  },
316
318
  rules: [
317
319
  Ut({ max: !1 }),
318
320
  Nt(l.quantityStep),
319
321
  qt(
320
- +G({
322
+ +K({
321
323
  amount: 0,
322
324
  precision: ie(l.sku.unit, l.measurement)
323
325
  }),
@@ -336,16 +338,16 @@ function zt(y) {
336
338
  cell(i) {
337
339
  const l = i.row.original;
338
340
  return J(re.FmTextField, {
339
- modelValue: G(l.quantityStep ?? Re.reset(), !1),
341
+ modelValue: K(l.quantityStep ?? Re.reset(), !1),
340
342
  key: l.sku._id,
341
- "onUpdate:modelValue": (d) => {
343
+ "onUpdate:modelValue": (m) => {
342
344
  y.updateItem({
343
345
  ...l,
344
- quantityStep: rt(+d)
346
+ quantityStep: rt(+m)
345
347
  });
346
348
  },
347
349
  rules: [
348
- de({
350
+ me({
349
351
  amount: 1,
350
352
  precision: ie(l.sku.unit, l.measurement)
351
353
  }),
@@ -382,7 +384,7 @@ function zt(y) {
382
384
  }
383
385
  ];
384
386
  return {
385
- columnDefs: R(() => je().enableTotalCost && y.transferType === H.PURCHASE ? m : m.filter((l) => l.id !== "Cost"))
387
+ columnDefs: R(() => je().enableTotalCost && y.transferType === H.PURCHASE ? d : d.filter((l) => l.id !== "Cost"))
386
388
  };
387
389
  }
388
390
  const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-center" }, Qt = { class: "flex-1 flex gap-1 items-center" }, Kt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Gt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Wt = { class: "flex gap-8 w-full" }, Jt = { class: "flex-1 flex flex-col gap-4" }, Zt = { class: "flex-1 flex flex-col gap-4" }, Xt = { class: "flex gap-8 w-full" }, Yt = { class: "flex-1 flex flex-col gap-4" }, eo = { class: "flex-1 flex flex-col gap-4" }, to = { class: "flex gap-8 w-full" }, oo = { class: "flex-1 flex flex-col gap-4" }, so = /* @__PURE__ */ X({
@@ -394,9 +396,9 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
394
396
  setup(y) {
395
397
  const { t: _ } = Y();
396
398
  return (u, s) => {
397
- var C, i, l, d, k, g, A, T, v, F, O, E, p, r, b, a, f, w, o, n, S, $, M, h, P, q, z, j, x, N;
398
- const m = V("FmLabel");
399
- return D(), K("div", Ht, [
399
+ var C, i, l, m, k, g, D, T, v, F, O, E, p, r, b, a, f, w, o, n, S, M, $, h, P, q, z, j, x, N;
400
+ const d = V("FmLabel");
401
+ return A(), G("div", Ht, [
400
402
  t("div", jt, [
401
403
  t("div", Qt, [
402
404
  t("span", Kt, " (" + I(u.row.original.sku.code) + ") ", 1),
@@ -405,23 +407,23 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
405
407
  t("div", null, [
406
408
  c(e(Q), {
407
409
  render: (l = (i = (C = u.cellByColId.Delete) == null ? void 0 : C.column) == null ? void 0 : i.columnDef) == null ? void 0 : l.cell,
408
- props: (k = (d = u.cellByColId.Delete) == null ? void 0 : d.getContext) == null ? void 0 : k.call(d)
410
+ props: (k = (m = u.cellByColId.Delete) == null ? void 0 : m.getContext) == null ? void 0 : k.call(m)
409
411
  }, null, 8, ["render", "props"])
410
412
  ])
411
413
  ]),
412
414
  t("div", Wt, [
413
415
  t("div", Jt, [
414
- c(m, {
416
+ c(d, {
415
417
  label: e(_)(`inventory.transfer.form.items.table.${e(L).Code}`)
416
418
  }, null, 8, ["label"]),
417
419
  c(e(Q), {
418
- render: (T = (A = (g = u.cellByColId[e(L).Code]) == null ? void 0 : g.column) == null ? void 0 : A.columnDef) == null ? void 0 : T.cell,
420
+ render: (T = (D = (g = u.cellByColId[e(L).Code]) == null ? void 0 : g.column) == null ? void 0 : D.columnDef) == null ? void 0 : T.cell,
419
421
  props: (F = (v = u.cellByColId[e(L).Code]) == null ? void 0 : v.getContext) == null ? void 0 : F.call(v)
420
422
  }, null, 8, ["render", "props"]),
421
423
  s[0] || (s[0] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
422
424
  ]),
423
425
  t("div", Zt, [
424
- c(m, {
426
+ c(d, {
425
427
  label: e(_)(`inventory.transfer.form.items.table.${e(L).Name}`)
426
428
  }, null, 8, ["label"]),
427
429
  c(e(Q), {
@@ -433,7 +435,7 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
433
435
  ]),
434
436
  t("div", Xt, [
435
437
  t("div", Yt, [
436
- c(m, {
438
+ c(d, {
437
439
  label: e(_)(`inventory.transfer.form.items.table.${e(L).DefaultAmount}`)
438
440
  }, null, 8, ["label"]),
439
441
  c(e(Q), {
@@ -443,11 +445,11 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
443
445
  s[2] || (s[2] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
444
446
  ]),
445
447
  t("div", eo, [
446
- c(m, {
448
+ c(d, {
447
449
  label: e(_)(`inventory.transfer.form.items.table.${e(L).Step}`)
448
450
  }, null, 8, ["label"]),
449
451
  c(e(Q), {
450
- render: (M = ($ = (S = u.cellByColId[e(L).Step]) == null ? void 0 : S.column) == null ? void 0 : $.columnDef) == null ? void 0 : M.cell,
452
+ render: ($ = (M = (S = u.cellByColId[e(L).Step]) == null ? void 0 : S.column) == null ? void 0 : M.columnDef) == null ? void 0 : $.cell,
451
453
  props: (P = (h = u.cellByColId[e(L).Step]) == null ? void 0 : h.getContext) == null ? void 0 : P.call(h)
452
454
  }, null, 8, ["render", "props"]),
453
455
  s[3] || (s[3] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
@@ -455,7 +457,7 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
455
457
  ]),
456
458
  t("div", to, [
457
459
  t("div", oo, [
458
- c(m, {
460
+ c(d, {
459
461
  label: e(_)(`inventory.transfer.form.items.table.${e(L).Limit}`)
460
462
  }, null, 8, ["label"]),
461
463
  c(e(Q), {
@@ -475,7 +477,7 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
475
477
  disabled: { type: Boolean }
476
478
  },
477
479
  setup(y, { expose: _ }) {
478
- const u = y, s = Ne(), { t: m } = Y(), C = Qe(), i = He(), l = Vt(), d = ze();
480
+ const u = y, s = Ne(), { t: d } = Y(), C = Qe(), i = He(), l = Vt(), m = ze();
479
481
  pe(
480
482
  () => u.modelValue,
481
483
  (o) => {
@@ -492,14 +494,14 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
492
494
  supplier: o.supplier ?? (s == null ? void 0 : s.purchaseOrder.supplier)
493
495
  };
494
496
  }
495
- ), A = R({
497
+ ), D = R({
496
498
  get() {
497
499
  var o, n;
498
500
  return typeof ((n = (o = s.purchaseOrder) == null ? void 0 : o.supplier) == null ? void 0 : n.internal) == "string" ? H.TRANSFER : H.PURCHASE;
499
501
  },
500
502
  set(o) {
501
- var S, $;
502
- const n = typeof (($ = (S = s.purchaseOrder) == null ? void 0 : S.supplier) == null ? void 0 : $.internal) == "string" ? H.TRANSFER : H.PURCHASE;
503
+ var S, M;
504
+ const n = typeof ((M = (S = s.purchaseOrder) == null ? void 0 : S.supplier) == null ? void 0 : M.internal) == "string" ? H.TRANSFER : H.PURCHASE;
503
505
  o !== n && (s.purchaseOrder.supplier = o === H.PURCHASE ? g.locationOptionsTypePurchase.value[0] : g.locationOptionsTypeTransfer.value[0]);
504
506
  }
505
507
  }), T = R(() => g.transferLocationOptions.value), v = R({
@@ -525,8 +527,8 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
525
527
  function p() {
526
528
  var o, n;
527
529
  return (o = s.locations) != null && o.find((S) => {
528
- var $, M;
529
- return (($ = S.doc) == null ? void 0 : $._id) === ((M = s.purchaseOrder.supplier) == null ? void 0 : M._id);
530
+ var M, $;
531
+ return ((M = S.doc) == null ? void 0 : M._id) === (($ = s.purchaseOrder.supplier) == null ? void 0 : $._id);
530
532
  }) ? `Location ${(n = s.purchaseOrder.supplier) == null ? void 0 : n.name} must be removed because template cannot be used to transfer to itself.` : !0;
531
533
  }
532
534
  const r = R({
@@ -579,35 +581,35 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
579
581
  sublabel: S.code,
580
582
  value: S
581
583
  })), n = o.filter((S) => {
582
- var $;
583
- return ($ = s.purchaseOrder.items) == null ? void 0 : $.find((M) => M.sku._id === S.value._id);
584
+ var M;
585
+ return (M = s.purchaseOrder.items) == null ? void 0 : M.find(($) => $.sku._id === S.value._id);
584
586
  }).map((S) => S.value);
585
587
  k.open({
586
- title: m("inventory.transfer.form.items.selectItem"),
588
+ title: d("inventory.transfer.form.items.selectItem"),
587
589
  closeButton: !0,
588
- contentComponent: dt,
590
+ contentComponent: mt,
589
591
  contentComponentProps: {
590
592
  modelValue: n,
591
593
  items: o,
592
594
  virtualScroll: !0
593
595
  },
594
596
  primaryActions: {
595
- text: m("common.confirm"),
597
+ text: d("common.confirm"),
596
598
  close: !0
597
599
  },
598
600
  secondaryActions: {
599
- text: m("common.close"),
601
+ text: d("common.close"),
600
602
  close: !0,
601
603
  variant: "tertiary"
602
604
  }
603
605
  }).onPrimary((S) => {
604
- const $ = s.purchaseOrder.items ?? [], M = S.map((h) => {
605
- const P = $.find((x) => x.sku._id === h._id);
606
+ const M = s.purchaseOrder.items ?? [], $ = S.map((h) => {
607
+ const P = M.find((x) => x.sku._id === h._id);
606
608
  if (P)
607
609
  return P;
608
610
  let q = h.code;
609
- if (d.isEnabled) {
610
- const x = d.getItemPKTCode(h);
611
+ if (m.isEnabled) {
612
+ const x = m.getItemPKTCode(h);
611
613
  x && (q = x);
612
614
  }
613
615
  const z = { amount: 1, precision: ie(h.unit) };
@@ -624,12 +626,12 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
624
626
  quantityStep: z
625
627
  };
626
628
  });
627
- M.sort((h, P) => h.sku.code.localeCompare(P.sku.code)), s.purchaseOrder.items = M;
629
+ $.sort((h, P) => h.sku.code.localeCompare(P.sku.code)), s.purchaseOrder.items = $;
628
630
  });
629
631
  }
630
632
  return (o, n) => {
631
- const S = V("FmTextField"), $ = V("FmSelect"), M = V("FmTextarea"), h = V("FmButton"), P = V("FmTable"), q = V("FmFormGroup"), z = V("FmForm");
632
- return D(), W(z, {
633
+ const S = V("FmTextField"), M = V("FmSelect"), $ = V("FmTextarea"), h = V("FmButton"), P = V("FmTable"), q = V("FmFormGroup"), z = V("FmForm");
634
+ return A(), W(z, {
633
635
  ref_key: "formRef",
634
636
  ref: b,
635
637
  class: "flex flex-col gap-32",
@@ -641,31 +643,31 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
641
643
  t("div", lo, [
642
644
  t("div", no, [
643
645
  c(S, {
644
- label: e(m)("inventory.transfer.form.name"),
646
+ label: e(d)("inventory.transfer.form.name"),
645
647
  "label-mark": "required",
646
648
  modelValue: e(s).name,
647
649
  "onUpdate:modelValue": n[0] || (n[0] = (x) => e(s).name = x),
648
- rules: [e(me)()]
650
+ rules: [e(de)()]
649
651
  }, null, 8, ["label", "modelValue", "rules"]),
650
- c($, {
651
- label: e(m)("inventory.transfer.form.type.title"),
652
- "model-value": A.value,
653
- "onUpdate:modelValue": n[1] || (n[1] = (x) => A.value = x),
652
+ c(M, {
653
+ label: e(d)("inventory.transfer.form.type.title"),
654
+ "model-value": D.value,
655
+ "onUpdate:modelValue": n[1] || (n[1] = (x) => D.value = x),
654
656
  items: [
655
657
  {
656
- label: e(m)("inventory.transfer.form.type.purchase"),
658
+ label: e(d)("inventory.transfer.form.type.purchase"),
657
659
  value: e(H).PURCHASE,
658
660
  disabled: !e(g).locationOptionsTypePurchase.value.length,
659
- sublabel: e(g).locationOptionsTypePurchase.value.length ? void 0 : e(m)("inventory.transfer.form.noSupplierAvailable")
661
+ sublabel: e(g).locationOptionsTypePurchase.value.length ? void 0 : e(d)("inventory.transfer.form.noSupplierAvailable")
660
662
  },
661
663
  {
662
- label: e(m)("inventory.transfer.form.type.transfer"),
664
+ label: e(d)("inventory.transfer.form.type.transfer"),
663
665
  value: e(H).TRANSFER,
664
666
  disabled: !e(g).locationOptionsTypeTransfer.value.length,
665
- sublabel: e(g).locationOptionsTypeTransfer.value.length ? void 0 : e(m)("inventory.transfer.form.noLocationAvailable")
667
+ sublabel: e(g).locationOptionsTypeTransfer.value.length ? void 0 : e(d)("inventory.transfer.form.noLocationAvailable")
666
668
  }
667
669
  ],
668
- rules: [e(de)(1)(T.value)]
670
+ rules: [e(me)(1)(T.value)]
669
671
  }, {
670
672
  default: B(() => [
671
673
  t("span", {
@@ -673,12 +675,12 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
673
675
  "line-clamp-1 fm-typo-en-body-lg-400",
674
676
  o.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
675
677
  ])
676
- }, I(e(mt)(A.value)), 3)
678
+ }, I(e(dt)(D.value)), 3)
677
679
  ]),
678
680
  _: 1
679
681
  }, 8, ["label", "model-value", "items", "rules"]),
680
- c($, {
681
- label: A.value === e(H).PURCHASE ? e(m)("inventory.transfer.form.purchaseFrom") : e(m)("inventory.transfer.form.transferFrom"),
682
+ c(M, {
683
+ label: D.value === e(H).PURCHASE ? e(d)("inventory.transfer.form.purchaseFrom") : e(d)("inventory.transfer.form.transferFrom"),
682
684
  modelValue: v.value,
683
685
  "onUpdate:modelValue": n[2] || (n[2] = (x) => v.value = x),
684
686
  items: T.value
@@ -706,13 +708,13 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
706
708
  _: 1
707
709
  }, 8, ["label", "modelValue", "items"]),
708
710
  c(S, {
709
- label: e(m)("inventory.transfer.form.reference"),
711
+ label: e(d)("inventory.transfer.form.reference"),
710
712
  "label-mark": "optional",
711
713
  modelValue: e(s).purchaseOrder.ref,
712
714
  "onUpdate:modelValue": n[3] || (n[3] = (x) => e(s).purchaseOrder.ref = x)
713
715
  }, null, 8, ["label", "modelValue"]),
714
- c(M, {
715
- label: e(m)("inventory.transfer.form.remark"),
716
+ c($, {
717
+ label: e(d)("inventory.transfer.form.remark"),
716
718
  "label-mark": "optional",
717
719
  "max-length": 240,
718
720
  modelValue: r.value,
@@ -752,10 +754,10 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
752
754
  ]),
753
755
  t("div", uo, [
754
756
  t("div", mo, [
755
- t("div", co, I(e(m)("inventory.transfer.form.items.title")), 1),
757
+ t("div", co, I(e(d)("inventory.transfer.form.items.title")), 1),
756
758
  c(h, {
757
759
  disabled: o.disabled,
758
- label: e(m)("inventory.transfer.form.items.addItem"),
760
+ label: e(d)("inventory.transfer.form.items.addItem"),
759
761
  "prepend-icon": "add",
760
762
  variant: "plain",
761
763
  class: "border-2 rounded-lg border-fm-color-primary",
@@ -763,7 +765,7 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
763
765
  size: "md"
764
766
  }, null, 8, ["disabled", "label"])
765
767
  ]),
766
- (D(), W(P, {
768
+ (A(), W(P, {
767
769
  "column-defs": f.value,
768
770
  "row-data": e(s).purchaseOrder.items,
769
771
  key: e(s).purchaseOrder.items.map((x) => x.sku._id).join("."),
@@ -771,7 +773,7 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
771
773
  "page-size": e(s).purchaseOrder.items.length
772
774
  }, {
773
775
  "list-row": B((x) => [
774
- (D(), W(Ke, {
776
+ (A(), W(Ke, {
775
777
  row: x,
776
778
  key: e(s).purchaseOrder.items.map((N) => N.sku._id).join(".")
777
779
  }, {
@@ -788,7 +790,7 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
788
790
  }, 8, ["column-defs", "row-data", "page-size"])),
789
791
  c(q, {
790
792
  "model-value": e(s).purchaseOrder.items.length,
791
- rules: [e(de)(1)]
793
+ rules: [e(me)(1)]
792
794
  }, null, 8, ["model-value", "rules"])
793
795
  ])
794
796
  ];
@@ -807,7 +809,7 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
807
809
  emits: ["update:show", "submitted"],
808
810
  setup(y, { expose: _, emit: u }) {
809
811
  var b;
810
- const s = y, m = u, C = xt(), i = Ft(), { t: l } = Y(), d = Ge(s, "show");
812
+ const s = y, d = u, C = xt(), i = Ft(), { t: l } = Y(), m = Ge(s, "show");
811
813
  function k() {
812
814
  return {
813
815
  _id: "",
@@ -838,12 +840,12 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
838
840
  }
839
841
  };
840
842
  }
841
- const g = U(s.modelValue ?? k()), A = U(((b = s.modelValue) == null ? void 0 : b._id) ?? `${Math.random()}`);
843
+ const g = U(s.modelValue ?? k()), D = U(((b = s.modelValue) == null ? void 0 : b._id) ?? `${Math.random()}`);
842
844
  pe(
843
845
  () => s.show,
844
846
  (a) => {
845
847
  var f;
846
- a && (g.value = s.modelValue ?? k(), A.value = ((f = s.modelValue) == null ? void 0 : f._id) ?? `${Math.random()}`);
848
+ a && (g.value = s.modelValue ?? k(), D.value = ((f = s.modelValue) == null ? void 0 : f._id) ?? `${Math.random()}`);
847
849
  }
848
850
  );
849
851
  const T = U(!1), v = R(() => {
@@ -883,7 +885,7 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
883
885
  title: l("inventory.transfer.template.create.success"),
884
886
  message: l("inventory.transfer.template.create.successMessage"),
885
887
  type: "success"
886
- }), m("update:show", !1), m("submitted");
888
+ }), d("update:show", !1), d("submitted");
887
889
  } catch (o) {
888
890
  i.open({
889
891
  title: l("inventory.transfer.template.create.error"),
@@ -907,7 +909,7 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
907
909
  title: l("inventory.transfer.template.update.success"),
908
910
  message: l("inventory.transfer.template.update.successMessage"),
909
911
  type: "success"
910
- }), m("update:show", !1), m("submitted");
912
+ }), d("update:show", !1), d("submitted");
911
913
  } catch (o) {
912
914
  i.open({
913
915
  title: l("inventory.transfer.template.update.error"),
@@ -933,9 +935,9 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
933
935
  }
934
936
  return (a, f) => {
935
937
  const w = V("FmButton"), o = V("FmSideSheet");
936
- return D(), W(o, {
937
- modelValue: e(d),
938
- "onUpdate:modelValue": f[2] || (f[2] = (n) => Ue(d) ? d.value = n : null),
938
+ return A(), W(o, {
939
+ modelValue: e(m),
940
+ "onUpdate:modelValue": f[2] || (f[2] = (n) => Ue(m) ? m.value = n : null),
939
941
  "dismiss-away": "",
940
942
  "close-button": "",
941
943
  "max-width": 1200
@@ -946,7 +948,7 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
946
948
  ])
947
949
  ]),
948
950
  default: B(() => [
949
- (D(), W(po, {
951
+ (A(), W(po, {
950
952
  class: "w-full",
951
953
  ref_key: "formRef",
952
954
  ref: F,
@@ -954,7 +956,7 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
954
956
  "model-value": g.value,
955
957
  "onUpdate:modelValue": f[0] || (f[0] = (n) => g.value = n),
956
958
  disabled: T.value,
957
- key: A.value
959
+ key: D.value
958
960
  }, null, 8, ["model-value", "disabled"]))
959
961
  ]),
960
962
  "side-sheet-footer": B(() => [
@@ -968,7 +970,7 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
968
970
  disabled: T.value,
969
971
  variant: "tertiary",
970
972
  label: e(l)("common.close"),
971
- onClick: f[1] || (f[1] = (n) => m("update:show", !1))
973
+ onClick: f[1] || (f[1] = (n) => d("update:show", !1))
972
974
  }, null, 8, ["disabled", "label"])
973
975
  ])
974
976
  ]),
@@ -979,13 +981,13 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
979
981
  }), xo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, _o = { class: "flex justify-between" }, ho = { class: "fm-typo-en-body-lg-600" }, go = { class: "fm-status-badge fm-status-badge-info-secondary" }, To = { class: "flex flex-col gap-8" }, Fo = { class: "flex flex-col gap-4" }, wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ko = { class: "flex gap-1" }, Co = { class: "fm-typo-en-body-lg-600" }, So = {
980
982
  key: 0,
981
983
  class: "flex flex-col gap-4"
982
- }, Mo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $o = { class: "fm-typo-en-body-lg-600" }, Io = {
984
+ }, $o = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Mo = { class: "fm-typo-en-body-lg-600" }, Io = {
983
985
  key: 1,
984
986
  class: "flex flex-col gap-4"
985
- }, Oo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Vo = { class: "fm-typo-en-body-lg-600" }, Ao = {
987
+ }, Oo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Vo = { class: "fm-typo-en-body-lg-600" }, Do = {
986
988
  key: 2,
987
989
  class: "flex flex-col gap-4"
988
- }, Do = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ro = { class: "fm-typo-en-body-lg-600" }, Po = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Lo = { class: "flex flex-col gap-8" }, Bo = { class: "fm-typo-en-body-lg-600" }, Eo = { class: "flex w-full gap-4" }, Uo = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, qo = { class: "fm-typo-en-body-lg-600 shrink-0" }, No = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, zo = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Ho = {
990
+ }, Ao = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ro = { class: "fm-typo-en-body-lg-600" }, Po = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Lo = { class: "flex flex-col gap-8" }, Bo = { class: "fm-typo-en-body-lg-600" }, Eo = { class: "flex w-full gap-4" }, Uo = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, qo = { class: "fm-typo-en-body-lg-600 shrink-0" }, No = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, zo = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Ho = {
989
991
  key: 0,
990
992
  class: "shrink-0 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
991
993
  }, jo = {
@@ -999,25 +1001,25 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
999
1001
  },
1000
1002
  emits: ["update:show", "action:edit"],
1001
1003
  setup(y, { emit: _ }) {
1002
- const u = y, s = _, m = je(), { t: C } = Y(), i = R(() => {
1004
+ const u = y, s = _, d = je(), { t: C } = Y(), i = R(() => {
1003
1005
  var T;
1004
1006
  return (T = u.template) == null ? void 0 : T.purchaseOrder;
1005
1007
  }), l = [
1006
1008
  { accessorKey: "name", header: () => "Name" },
1007
1009
  { accessorKey: "type", header: () => "Type" }
1008
- ], d = U(""), k = R(
1010
+ ], m = U(""), k = R(
1009
1011
  () => {
1010
1012
  var T, v, F, O;
1011
1013
  return ((v = (T = i.value) == null ? void 0 : T.supplier) == null ? void 0 : v.internal) === "restaurant" || ((O = (F = i.value) == null ? void 0 : F.supplier) == null ? void 0 : O.internal) === "warehouse" ? H.TRANSFER : H.PURCHASE;
1012
1014
  }
1013
- ), g = U(!0), A = Ge(u, "show");
1015
+ ), g = U(!0), D = Ge(u, "show");
1014
1016
  return (T, v) => {
1015
1017
  var f;
1016
1018
  const F = V("FmMenuDivider"), O = V("FmCard"), E = V("FmIcon"), p = V("FmTextField"), r = V("FmTable"), b = V("FmButton"), a = V("FmSideSheet");
1017
- return D(), W(a, {
1019
+ return A(), W(a, {
1018
1020
  header: e(C)("inventory.transfer.template.details.view", { template: (f = T.template) == null ? void 0 : f.name }),
1019
- modelValue: e(A),
1020
- "onUpdate:modelValue": v[2] || (v[2] = (w) => Ue(A) ? A.value = w : null),
1021
+ modelValue: e(D),
1022
+ "onUpdate:modelValue": v[2] || (v[2] = (w) => Ue(D) ? D.value = w : null),
1021
1023
  "dismiss-away": g.value,
1022
1024
  "close-button": "",
1023
1025
  "max-width": 500
@@ -1032,7 +1034,7 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1032
1034
  class: "flex flex-col gap-8 px-12 py-16"
1033
1035
  }, {
1034
1036
  default: B(() => {
1035
- var n, S, $, M, h, P, q;
1037
+ var n, S, M, $, h, P, q;
1036
1038
  return [
1037
1039
  t("div", _o, [
1038
1040
  t("div", ho, I(e(C)("inventory.transfer.template.details.templateSummary")), 1),
@@ -1048,16 +1050,16 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1048
1050
  ]),
1049
1051
  t("div", Co, I(e(pt)(((n = T.template) == null ? void 0 : n._id) ?? "")), 1)
1050
1052
  ]),
1051
- ($ = (S = i.value) == null ? void 0 : S.supplier) != null && $.name ? (D(), K("div", So, [
1052
- t("div", Mo, I(e(C)("inventory.transfer.receiveRequest.details.from")), 1),
1053
- t("div", $o, I((h = (M = i.value) == null ? void 0 : M.supplier) == null ? void 0 : h.name), 1)
1053
+ (M = (S = i.value) == null ? void 0 : S.supplier) != null && M.name ? (A(), G("div", So, [
1054
+ t("div", $o, I(e(C)("inventory.transfer.receiveRequest.details.from")), 1),
1055
+ t("div", Mo, I((h = ($ = i.value) == null ? void 0 : $.supplier) == null ? void 0 : h.name), 1)
1054
1056
  ])) : ee("", !0),
1055
- (P = i.value) != null && P.ref ? (D(), K("div", Io, [
1057
+ (P = i.value) != null && P.ref ? (A(), G("div", Io, [
1056
1058
  t("div", Oo, I(e(C)("inventory.transfer.receiveRequest.details.reference")), 1),
1057
1059
  t("div", Vo, I(i.value.ref), 1)
1058
1060
  ])) : ee("", !0),
1059
- (q = i.value) != null && q.remark ? (D(), K("div", Ao, [
1060
- t("div", Do, I(e(C)("inventory.transfer.receiveRequest.details.remark")), 1),
1061
+ (q = i.value) != null && q.remark ? (A(), G("div", Do, [
1062
+ t("div", Ao, I(e(C)("inventory.transfer.receiveRequest.details.remark")), 1),
1061
1063
  t("div", Ro, I(i.value.remark), 1)
1062
1064
  ])) : ee("", !0)
1063
1065
  ])
@@ -1069,7 +1071,7 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1069
1071
  t("div", Po, [
1070
1072
  t("div", Lo, [
1071
1073
  t("div", Bo, I(e(C)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
1072
- (D(!0), K(qe, null, Xe(((w = i.value) == null ? void 0 : w.items) ?? [], (n) => (D(), K("div", {
1074
+ (A(!0), G(qe, null, Xe(((w = i.value) == null ? void 0 : w.items) ?? [], (n) => (A(), G("div", {
1073
1075
  key: n.code,
1074
1076
  class: "flex flex-col"
1075
1077
  }, [
@@ -1080,9 +1082,9 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1080
1082
  ]),
1081
1083
  t("div", No, [
1082
1084
  t("div", zo, I(n.code), 1),
1083
- n.totalCost && e(m).enableTotalCost ? (D(), K("div", Ho, " (" + I(e(ft)(n.totalCost)) + ") ", 1)) : ee("", !0)
1085
+ n.totalCost && e(d).enableTotalCost ? (A(), G("div", Ho, " (" + I(e(ft)(n.totalCost)) + ") ", 1)) : ee("", !0)
1084
1086
  ]),
1085
- e(ht)(n) ? (D(), K("div", jo, [
1087
+ e(ht)(n) ? (A(), G("div", jo, [
1086
1088
  c(E, {
1087
1089
  name: "error",
1088
1090
  color: "system-error-300",
@@ -1102,8 +1104,8 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1102
1104
  ], -1)),
1103
1105
  t("div", Ko, [
1104
1106
  c(p, {
1105
- modelValue: d.value,
1106
- "onUpdate:modelValue": v[0] || (v[0] = (n) => d.value = n),
1107
+ modelValue: m.value,
1108
+ "onUpdate:modelValue": v[0] || (v[0] = (n) => m.value = n),
1107
1109
  placeholder: "Filter locations",
1108
1110
  "prepend-icon": "search"
1109
1111
  }, null, 8, ["modelValue"]),
@@ -1111,7 +1113,7 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1111
1113
  "hide-footer": "",
1112
1114
  style: { height: "500px" },
1113
1115
  "column-defs": l,
1114
- "search-value": d.value,
1116
+ "search-value": m.value,
1115
1117
  "row-data": ((o = u.template) == null ? void 0 : o.locations) ?? [{ name: "All locations" }]
1116
1118
  }, null, 8, ["search-value", "row-data"])
1117
1119
  ])
@@ -1135,19 +1137,19 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1135
1137
  }), Jo = { class: "flex-1 flex flex-col gap-8" }, Zo = { class: "flex flex-col" }, Xo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Yo = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, es = { class: "fm-typo-en-body-lg-400" }, ts = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, os = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, cs = /* @__PURE__ */ X({
1136
1138
  __name: "TransferTemplateView",
1137
1139
  setup(y) {
1138
- const { t: _ } = Y(), { createTemplate: u, viewTemplate: s, importTemplates: m, exportTemplates: C } = Le(), { templateDialogProps: i, templateDetailsProps: l } = Be(Le()), d = gt(), { loading: k, templates: g } = Be(d), A = U(!1), T = yt(), v = Qe(), { breakpoints: F } = wt();
1139
- ce(d.fetchTemplates);
1140
+ const { t: _ } = Y(), { createTemplate: u, viewTemplate: s, importTemplates: d, exportTemplates: C } = Le(), { templateDialogProps: i, templateDetailsProps: l } = Be(Le()), m = gt(), { loading: k, templates: g } = Be(m), D = U(!1), T = yt(), v = Qe(), { breakpoints: F } = wt();
1141
+ ce(m.fetchTemplates);
1140
1142
  const O = R(
1141
- () => A.value || k.value || !v._currentLocation
1143
+ () => D.value || k.value || !v._currentLocation
1142
1144
  ), E = R(() => g.value), p = U(""), r = R(() => F.value.xs || F.value.sm), b = R(() => r.value ? 10 : 20);
1143
1145
  function a(o) {
1144
1146
  switch (o) {
1145
1147
  case Pe.Add:
1146
1148
  return u();
1147
1149
  case "refresh":
1148
- return d.fetchTemplates();
1150
+ return m.fetchTemplates();
1149
1151
  case "import":
1150
- return m();
1152
+ return d();
1151
1153
  case "export":
1152
1154
  return C();
1153
1155
  }
@@ -1180,14 +1182,14 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1180
1182
  ]);
1181
1183
  return (o, n) => {
1182
1184
  const S = V("FmTable");
1183
- return D(), K(qe, null, [
1185
+ return A(), G(qe, null, [
1184
1186
  c(vt, {
1185
1187
  title: e(_)("inventory.transfer.template.title2"),
1186
1188
  actions: w.value,
1187
1189
  "onClick:action": a
1188
1190
  }, {
1189
1191
  default: B(() => {
1190
- var $;
1192
+ var M;
1191
1193
  return [
1192
1194
  t("div", {
1193
1195
  class: Z([
@@ -1201,25 +1203,25 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1201
1203
  c(bt, {
1202
1204
  searchable: "",
1203
1205
  search: p.value,
1204
- "onUpdate:search": n[0] || (n[0] = (M) => p.value = M)
1206
+ "onUpdate:search": n[0] || (n[0] = ($) => p.value = $)
1205
1207
  }, null, 8, ["search"]),
1206
- (D(), W(S, {
1208
+ (A(), W(S, {
1207
1209
  style: Ye(e(T).tableHeight),
1208
- "column-defs": e(d).columnDefs,
1210
+ "column-defs": e(m).columnDefs,
1209
1211
  "row-data": E.value,
1210
1212
  "search-value": p.value,
1211
1213
  loading: O.value,
1212
- key: ($ = e(v)._currentLocation) == null ? void 0 : $.dbName,
1213
- onRowClick: n[1] || (n[1] = (M) => e(s)(M.original)),
1214
+ key: (M = e(v)._currentLocation) == null ? void 0 : M.dbName,
1215
+ onRowClick: n[1] || (n[1] = ($) => e(s)($.original)),
1214
1216
  "page-size": b.value
1215
1217
  }, {
1216
- "list-row": B((M) => [
1218
+ "list-row": B(($) => [
1217
1219
  c(Ke, {
1218
- row: M,
1220
+ row: $,
1219
1221
  onRowClick: (h) => e(s)(h)
1220
1222
  }, {
1221
1223
  default: B((h) => {
1222
- var P, q, z, j, x, N, fe, ye, oe, ve, be, xe, _e, se, he, ge, Te, Fe, we, ke, le, Ce, Se, Me, $e, ne, Ie;
1224
+ var P, q, z, j, x, N, fe, ye, oe, ve, be, xe, _e, se, he, ge, Te, Fe, we, ke, le, Ce, Se, $e, Me, ne, Ie;
1223
1225
  return [
1224
1226
  t("div", Jo, [
1225
1227
  t("div", Zo, [
@@ -1241,8 +1243,8 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1241
1243
  props: (he = (se = h.supplier) == null ? void 0 : se.getContext) == null ? void 0 : he.call(se)
1242
1244
  }, null, 8, ["render", "props"])
1243
1245
  ]),
1244
- t("div", null, I((ge = M.original.locations) != null && ge.length ? `Enabled for ${(Te = M.original.locations) == null ? void 0 : Te.length} outlets` : "Enabled for all outlets"), 1),
1245
- t("div", ts, I(M.original.purchaseOrder.items.length ? M.original.purchaseOrder.items.map((We) => We.name).join(", ") : "No items"), 1),
1246
+ t("div", null, I((ge = $.original.locations) != null && ge.length ? `Enabled for ${(Te = $.original.locations) == null ? void 0 : Te.length} outlets` : "Enabled for all outlets"), 1),
1247
+ t("div", ts, I($.original.purchaseOrder.items.length ? $.original.purchaseOrder.items.map((We) => We.name).join(", ") : "No items"), 1),
1246
1248
  t("div", os, [
1247
1249
  c(e(Q), {
1248
1250
  render: (ke = (we = (Fe = h.ref) == null ? void 0 : Fe.column) == null ? void 0 : we.columnDef) == null ? void 0 : ke.cell,
@@ -1252,7 +1254,7 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1252
1254
  ]),
1253
1255
  t("div", null, [
1254
1256
  c(e(Q), {
1255
- render: ($e = (Me = (Se = h.type) == null ? void 0 : Se.column) == null ? void 0 : Me.columnDef) == null ? void 0 : $e.cell,
1257
+ render: (Me = ($e = (Se = h.type) == null ? void 0 : Se.column) == null ? void 0 : $e.columnDef) == null ? void 0 : Me.cell,
1256
1258
  props: (Ie = (ne = h.type) == null ? void 0 : ne.getContext) == null ? void 0 : Ie.call(ne)
1257
1259
  }, null, 8, ["render", "props"])
1258
1260
  ])
@@ -1269,10 +1271,10 @@ const Ht = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1269
1271
  }),
1270
1272
  _: 1
1271
1273
  }, 8, ["title", "actions"]),
1272
- (D(), W(et, { to: "body" }, [
1274
+ (A(), W(et, { to: "body" }, [
1273
1275
  c(Wo, tt(ot(e(l))), null, 16),
1274
1276
  c(bo, Ee(e(i), {
1275
- onSubmitted: n[2] || (n[2] = ($) => e(d).fetchTemplates())
1277
+ onSubmitted: n[2] || (n[2] = (M) => e(m).fetchTemplates())
1276
1278
  }), null, 16)
1277
1279
  ]))
1278
1280
  ], 64);