@feedmepos/mf-inventory-portal 1.0.13 → 1.0.15-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/{App-D3tAuqoa.js → App-DtuHbzaj.js} +3 -3
  2. package/dist/{ApprovalView-CZSEkuxs.js → ApprovalView-C8gHcI4o.js} +2 -2
  3. package/dist/{BindingsDialog-BCw5xmh3.js → BindingsDialog-CLp5DbdF.js} +2 -2
  4. package/dist/{BindingsPicker-B--B9aT5.js → BindingsPicker-ChB_dM_r.js} +1 -1
  5. package/dist/{BindingsTable-z4ohAK-T.js → BindingsTable-usQiwRyf.js} +1 -1
  6. package/dist/{ClosingDraftView-5fVFzVpD.js → ClosingDraftView-C7mlsyK5.js} +20 -20
  7. package/dist/{ClosingTemplateView-BuJtrXgC.js → ClosingTemplateView-C3csSJ5x.js} +10 -10
  8. package/dist/{DeliveryOrderPrintPreview-DPlR2qhc.js → DeliveryOrderPrintPreview-DGI0Mk4p.js} +1 -1
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-P1dvKMS3.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D8iQyzaJ.js} +3 -3
  10. package/dist/{FmMultiselectDialog-CVNqlp0n.js → FmMultiselectDialog-B3MYE2b7.js} +1 -1
  11. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-ublLlB16.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DFidOxdU.js} +12 -12
  12. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-MSbWAo1i.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CIKQ6nC1.js} +1 -1
  13. package/dist/{IngredientGroupView-CgNdkuae.js → IngredientGroupView-91WE1P4g.js} +2 -2
  14. package/dist/{IngredientsView-Bg9XhCNT.js → IngredientsView-CLZX2W7Y.js} +4 -4
  15. package/dist/{IntegrationView-DKzLjZig.js → IntegrationView-D8VbNV6H.js} +1009 -1000
  16. package/dist/{InventoryBindingForm-CZl0uidf.js → InventoryBindingForm-rGVDi4T8.js} +1 -1
  17. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BhxHbT2g.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Dx4rHyb5.js} +24 -24
  18. package/dist/{InventoryBindingSummary-BTO2qsNW.js → InventoryBindingSummary-BGLbSQRD.js} +1 -1
  19. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B4GyfLV-.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CJ5FPRac.js} +26 -20
  20. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Cfup6M3u.js → PremiumBadge.vue_vue_type_script_setup_true_lang-qUWKfasI.js} +1 -1
  21. package/dist/{PublishView-CjmtkaiI.js → PublishView-ClqhWcBu.js} +8 -8
  22. package/dist/{PurchaseOrderPrintPreview-KG9VkV-7.js → PurchaseOrderPrintPreview-s2TN-ZJL.js} +1 -1
  23. package/dist/{ReceiveRequestView-Og_mkJHQ.js → ReceiveRequestView-0r85gHww.js} +63 -63
  24. package/dist/{RecipeView-SvMt9zdS.js → RecipeView-FRHv7v2K.js} +4 -4
  25. package/dist/{StockView-DjO6wmxl.js → StockView-DeE60k1a.js} +7 -7
  26. package/dist/{SupplierView-CMatOKL0.js → SupplierView-DQSYItBZ.js} +37 -37
  27. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Bm9lLcf5.js +2020 -0
  28. package/dist/{TransferTemplateView-CNZtqhhI.js → TransferTemplateView-rPjPeB7z.js} +88 -88
  29. package/dist/UnitView-BLfRD-MZ.js +667 -0
  30. package/dist/{WarehouseView-C9Yi9nQV.js → WarehouseView-DmzmdKUj.js} +12 -12
  31. package/dist/api/netsuite.d.ts +3 -0
  32. package/dist/api/purchase-order.d.ts +1 -1
  33. package/dist/{app-9KyslrXV.js → app-BmrQUin8.js} +4445 -4396
  34. package/dist/app.d.ts +1 -0
  35. package/dist/app.js +1 -1
  36. package/dist/{decimal-CX0eUEB3.js → decimal-Ba0cFNkn.js} +1 -1
  37. package/dist/{feature-CmWqoog1.js → feature-CAfGclDp.js} +1856 -965
  38. package/dist/{format-unit-display-UiaVS36D.js → format-unit-display-6JZPqi0z.js} +29 -29
  39. package/dist/{index-CKAZMrqi.js → index-0LAqB9Nf.js} +2 -2
  40. package/dist/{index-BRtGevm6.js → index-Df8rBaGT.js} +4070 -4049
  41. package/dist/{stock-CT3LESH2.js → stock-Ca2xlSi5.js} +1 -1
  42. package/dist/{supplier-BrQo7L81.js → supplier-BFRlDSmN.js} +2 -2
  43. package/dist/tsconfig.app.tsbuildinfo +1 -1
  44. package/dist/{use-ingredient-select-dialog-BLcnX7uY.js → use-ingredient-select-dialog-BleZLcKu.js} +1 -1
  45. package/dist/{use-inventory-binding-dialog-CegZeDD6.js → use-inventory-binding-dialog-C8-NZufG.js} +1 -1
  46. package/dist/views/receive-request/components/netsuite/NetSuiteLog.vue.d.ts +17 -0
  47. package/dist/views/receive-request/components/netsuite/NetSuitePanel.vue.d.ts +21 -0
  48. package/dist/views/receive-request/components/transfer-details/usePurchaseOrderFn.d.ts +1 -0
  49. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +4 -4
  50. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +6 -2
  51. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +6 -6
  52. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +6 -6
  53. package/dist/views/receive-request/constants/po-action-to-ui-style.d.ts +1 -0
  54. package/dist/views/unit/components/unit-form/UnitFormProps.d.ts +1 -1
  55. package/dist/{vue-i18n-C2C5um-s.js → vue-i18n-CLUATIwy.js} +222 -222
  56. package/package.json +3 -3
  57. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BDbUensL.js +0 -1898
  58. package/dist/UnitView-D75e_8B3.js +0 -648
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as ee, onMounted as ve, computed as U, ref as Q, watch as be, inject as et, resolveComponent as A, openBlock as R, createElementBlock as j, createElementVNode as s, createVNode as p, withCtx as N, renderSlot as Re, withDirectives as Ae, normalizeClass as X, vModelText as Pe, reactive as tt, h as J, toDisplayString as D, unref as t, createCommentVNode as oe, Fragment as _e, renderList as ze, normalizeStyle as He, createBlock as Z, mergeProps as Qe, isRef as je, Teleport as st, normalizeProps as ot, guardReactiveProps as lt } from "vue";
2
- import { G as Ge, ay as ce, t as Ue, I as nt, az as at, aA as rt, i as Y, aB as it, b as ut, a as Ke, $ as Be, l as fe, O as me, J as ue, A as ye, M as dt, E as W, u as We, ac as mt, T as pt, C as Ye, d as ne, aC as de, a9 as ct, a1 as ft, z as yt, h as Le, _ as vt, B as bt } from "./app-9KyslrXV.js";
2
+ import { G as Ke, ay as ce, t as Ue, I as nt, az as at, aA as rt, i as Y, aB as it, b as ut, a as Ge, J as Be, l as fe, P as me, K as ue, A as ye, M as dt, E as W, u as We, ac as mt, V as pt, C as Ye, d as ne, aC as de, a9 as ct, a1 as ft, z as yt, h as Le, _ as vt, B as bt } from "./app-BmrQUin8.js";
3
3
  import { useI18n as le } from "@feedmepos/mf-common";
4
- import { P as K, a as _t, f as ht, t as xt, b as qe, u as gt } from "./format-unit-display-UiaVS36D.js";
5
- import { components as se, useDialog as Tt, useSnackbar as kt, useProxiedModel as Je, useBreakpoints as wt } from "@feedmepos/ui-library";
4
+ import { P as G, a as _t, f as ht, t as xt, b as qe, u as gt } from "./format-unit-display-6JZPqi0z.js";
5
+ import { components as se, useDialog as kt, useSnackbar as Tt, useProxiedModel as Je, useBreakpoints as wt } from "@feedmepos/ui-library";
6
6
  import { defineStore as Ft, storeToRefs as Ee } from "pinia";
7
- import { _ as It, b as St, F as Ct, a as $t } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-ublLlB16.js";
8
- import { u as pe } from "./feature-CmWqoog1.js";
9
- import { c as Ot, u as Mt, _ as Vt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-P1dvKMS3.js";
10
- import { u as Dt } from "./supplier-BrQo7L81.js";
11
- import { u as Rt } from "./use-ingredient-select-dialog-BLcnX7uY.js";
7
+ import { _ as It, b as St, F as Ct, a as $t } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DFidOxdU.js";
8
+ import { u as pe } from "./feature-CAfGclDp.js";
9
+ import { c as Ot, u as Mt, _ as Vt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D8iQyzaJ.js";
10
+ import { u as Dt } from "./supplier-BFRlDSmN.js";
11
+ import { u as Rt } from "./use-ingredient-select-dialog-BleZLcKu.js";
12
12
  const At = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Ut = { class: "flex-1" }, Bt = { class: "flex items-center" }, Lt = { class: "flex-1" }, qt = { class: "flex-1" }, Et = /* @__PURE__ */ ee({
13
13
  __name: "FmMinMaxInput",
14
14
  props: {
@@ -47,11 +47,11 @@ const At = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Ut = { c
47
47
  helperState: {}
48
48
  },
49
49
  setup(m) {
50
- const c = m, v = Ge("modelValue"), e = nt();
50
+ const c = m, v = Ke("modelValue"), e = nt();
51
51
  ve(() => {
52
52
  const { min: y, max: d } = v ?? {};
53
53
  if (!(!y || !d) && y.precision !== d.precision) {
54
- const T = Math.max(y.precision, d.precision), a = ce(y, T), f = ce(d, T);
54
+ const k = Math.max(y.precision, d.precision), a = ce(y, k), f = ce(d, k);
55
55
  v.min = a, v.max = f;
56
56
  }
57
57
  });
@@ -60,40 +60,40 @@ const At = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Ut = { c
60
60
  return Math.max((y == null ? void 0 : y.precision) ?? 0, (d == null ? void 0 : d.precision) ?? 0, c.precision ?? 0);
61
61
  }), g = (y) => {
62
62
  if (!y) return "";
63
- const d = at(y), T = n.value, a = ce(d, T);
63
+ const d = at(y), k = n.value, a = ce(d, k);
64
64
  return rt(
65
65
  +Y(a),
66
66
  a.precision
67
67
  );
68
68
  }, b = Q(g(v.min)), i = Q(g(v.max));
69
69
  be([b, i], ([y, d]) => {
70
- const T = v ?? {}, a = e(y), f = e(d), C = n.value;
70
+ const k = v ?? {}, a = e(y), f = e(d), C = n.value;
71
71
  if (y !== "" && a === !0) {
72
72
  const $ = Ue(+y, C);
73
- T.min = $;
73
+ k.min = $;
74
74
  } else
75
- T.min = null;
75
+ k.min = null;
76
76
  if (d !== "" && f === !0) {
77
77
  const $ = Ue(+d, C);
78
- T.max = $;
78
+ k.max = $;
79
79
  } else
80
- T.max = null;
81
- v.min = T.min, v.max = T.max;
80
+ k.max = null;
81
+ v.min = k.min, v.max = k.max;
82
82
  });
83
- const o = Symbol.for("fm:form-state"), u = et(o, null), _ = U(() => c.disabled ?? (u == null ? void 0 : u.getDisabled()) ?? !1), P = Q(), I = Q(), h = Q(!1), S = Q(!1), V = U(() => h.value || S.value), G = U(() => [...[
83
+ const o = Symbol.for("fm:form-state"), u = et(o, null), _ = U(() => c.disabled ?? (u == null ? void 0 : u.getDisabled()) ?? !1), P = Q(), I = Q(), h = Q(!1), S = Q(!1), V = U(() => h.value || S.value), K = U(() => [...[
84
84
  function() {
85
85
  return typeof e(b.value) == "string" || typeof e(i.value) == "string" ? "Must be a number" : !0;
86
86
  },
87
- function(T) {
88
- return !T || !T.min || !T.max ? !0 : +Y(T.min) > +Y(T.max) ? "Min must be less than or equal to max" : !0;
87
+ function(k) {
88
+ return !k || !k.min || !k.max ? !0 : +Y(k.min) > +Y(k.max) ? "Min must be less than or equal to max" : !0;
89
89
  }
90
90
  ], ...c.rules ?? []]);
91
91
  return (y, d) => {
92
- const T = A("FmLabel"), a = A("FmField"), f = A("FmFormGroup");
92
+ const k = A("FmLabel"), a = A("FmField"), f = A("FmFormGroup");
93
93
  return R(), j("div", At, [
94
94
  s("div", Pt, [
95
95
  s("div", Ut, [
96
- p(T, {
96
+ p(k, {
97
97
  label: y.label,
98
98
  disabled: y.disabled,
99
99
  required: y.labelMark === "required",
@@ -151,7 +151,7 @@ const At = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Ut = { c
151
151
  class: "flex-1",
152
152
  "model-value": y.modelValue,
153
153
  info: y.labelInfo,
154
- rules: G.value,
154
+ rules: K.value,
155
155
  "helper-text": y.helperText,
156
156
  "helper-state": y.helperState
157
157
  }, null, 8, ["model-value", "info", "rules", "helper-text", "helper-state"])
@@ -203,7 +203,7 @@ const Ze = Ft("transfer-template-helper", () => {
203
203
  var H = /* @__PURE__ */ ((m) => (m.Code = "Code", m.Name = "Name", m.DefaultAmount = "DefaultAmount", m.Limit = "Limit", m.Step = "Step", m.Cost = "Cost", m.Delete = "Delete", m))(H || {});
204
204
  const Ne = Ze();
205
205
  function Qt(m) {
206
- const { t: c } = le(), v = Ke(), e = pe(), n = tt({});
206
+ const { t: c } = le(), v = Ge(), e = pe(), n = tt({});
207
207
  ve(() => {
208
208
  for (const i of m.items) {
209
209
  if (!i.totalCost)
@@ -458,10 +458,10 @@ function Qt(m) {
458
458
  }
459
459
  ];
460
460
  return {
461
- columnDefs: U(() => pe().enableTotalCost && m.transferType === K.PURCHASE ? g : g.filter((o) => o.id !== "Cost"))
461
+ columnDefs: U(() => pe().enableTotalCost && m.transferType === G.PURCHASE ? g : g.filter((o) => o.id !== "Cost"))
462
462
  };
463
463
  }
464
- const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-center" }, Kt = { class: "flex-1 flex gap-1 items-center" }, Wt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Yt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Jt = { class: "flex gap-8 w-full" }, Zt = { class: "flex-1 flex flex-col gap-4" }, Xt = { class: "flex-1 flex flex-col gap-4" }, es = {
464
+ const jt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-center" }, Gt = { class: "flex-1 flex gap-1 items-center" }, Wt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Yt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Jt = { class: "flex gap-8 w-full" }, Zt = { class: "flex-1 flex flex-col gap-4" }, Xt = { class: "flex-1 flex flex-col gap-4" }, es = {
465
465
  key: 0,
466
466
  class: "flex gap-8 w-full"
467
467
  }, ts = { class: "flex-1 flex flex-col gap-4" }, ss = { class: "flex-1 flex flex-col gap-4" }, os = { class: "flex gap-8 w-full" }, ls = { class: "flex-1 flex flex-col gap-4" }, ns = /* @__PURE__ */ ee({
@@ -476,11 +476,11 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
476
476
  return e;
477
477
  }
478
478
  return (e, n) => {
479
- var b, i, o, u, _, P, I, h, S, V, G, y, d, T, a, f, C, $, x, l, r, k, F, B, z, O, M, L, q, w;
479
+ var b, i, o, u, _, P, I, h, S, V, K, y, d, k, a, f, C, $, x, l, r, T, F, B, z, O, M, L, q, w;
480
480
  const g = A("FmLabel");
481
481
  return R(), j("div", jt, [
482
- s("div", Gt, [
483
- s("div", Kt, [
482
+ s("div", Kt, [
483
+ s("div", Gt, [
484
484
  s("span", Wt, " (" + D(e.row.original.sku.code) + ") ", 1),
485
485
  s("span", Yt, D(e.row.original.sku.name), 1)
486
486
  ]),
@@ -507,8 +507,8 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
507
507
  label: t(c)(`inventory.transfer.form.items.table.${t(H).Name}`)
508
508
  }, null, 8, ["label"]),
509
509
  p(t(W), {
510
- render: (d = (y = (G = e.cellByColId[t(H).Name]) == null ? void 0 : G.column) == null ? void 0 : y.columnDef) == null ? void 0 : d.cell,
511
- props: (a = (T = e.cellByColId[t(H).Name]) == null ? void 0 : T.getContext) == null ? void 0 : a.call(T)
510
+ render: (d = (y = (K = e.cellByColId[t(H).Name]) == null ? void 0 : K.column) == null ? void 0 : y.columnDef) == null ? void 0 : d.cell,
511
+ props: (a = (k = e.cellByColId[t(H).Name]) == null ? void 0 : k.getContext) == null ? void 0 : a.call(k)
512
512
  }, null, 8, ["render", "props"]),
513
513
  n[1] || (n[1] = s("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
514
514
  ])
@@ -529,7 +529,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
529
529
  label: t(c)(`inventory.transfer.form.items.table.${t(H).Step}`)
530
530
  }, null, 8, ["label"]),
531
531
  p(t(W), {
532
- render: (F = (k = (r = e.cellByColId[t(H).Step]) == null ? void 0 : r.column) == null ? void 0 : k.columnDef) == null ? void 0 : F.cell,
532
+ render: (F = (T = (r = e.cellByColId[t(H).Step]) == null ? void 0 : r.column) == null ? void 0 : T.columnDef) == null ? void 0 : F.cell,
533
533
  props: (z = (B = e.cellByColId[t(H).Step]) == null ? void 0 : B.getContext) == null ? void 0 : z.call(B)
534
534
  }, null, 8, ["render", "props"]),
535
535
  n[3] || (n[3] = s("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
@@ -590,7 +590,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
590
590
  disabled: { type: Boolean }
591
591
  },
592
592
  setup(m, { expose: c }) {
593
- const v = m, e = Ge(), { t: n } = le(), g = We(), b = Ke(), i = Dt(), o = pe(), u = Ze();
593
+ const v = m, e = Ke(), { t: n } = le(), g = We(), b = Ge(), i = Dt(), o = pe(), u = Ze();
594
594
  be(
595
595
  () => v.modelValue,
596
596
  (l) => {
@@ -598,7 +598,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
598
598
  }
599
599
  ), g.watchLocation(async () => {
600
600
  location && (e.purchaseOrder.supplier || (e.purchaseOrder.supplier = i.suppliers.find((l) => l) ?? e.purchaseOrder.supplier));
601
- }), Tt();
601
+ }), kt();
602
602
  const _ = Mt(
603
603
  () => e.purchaseOrder,
604
604
  (l) => {
@@ -610,12 +610,12 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
610
610
  ), P = U({
611
611
  get() {
612
612
  var l, r;
613
- return typeof ((r = (l = e.purchaseOrder) == null ? void 0 : l.supplier) == null ? void 0 : r.internal) == "string" ? K.TRANSFER : K.PURCHASE;
613
+ return typeof ((r = (l = e.purchaseOrder) == null ? void 0 : l.supplier) == null ? void 0 : r.internal) == "string" ? G.TRANSFER : G.PURCHASE;
614
614
  },
615
615
  set(l) {
616
- var k, F;
617
- const r = typeof ((F = (k = e.purchaseOrder) == null ? void 0 : k.supplier) == null ? void 0 : F.internal) == "string" ? K.TRANSFER : K.PURCHASE;
618
- l !== r && (e.purchaseOrder.supplier = l === K.PURCHASE ? _.locationOptionsTypePurchase.value[0] : _.locationOptionsTypeTransfer.value[0]);
616
+ var T, F;
617
+ const r = typeof ((F = (T = e.purchaseOrder) == null ? void 0 : T.supplier) == null ? void 0 : F.internal) == "string" ? G.TRANSFER : G.PURCHASE;
618
+ l !== r && (e.purchaseOrder.supplier = l === G.PURCHASE ? _.locationOptionsTypePurchase.value[0] : _.locationOptionsTypeTransfer.value[0]);
619
619
  }
620
620
  }), I = U(() => _.transferLocationOptions.value), h = U({
621
621
  get() {
@@ -628,7 +628,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
628
628
  }), {
629
629
  promptSelectLocations: S,
630
630
  columnDefs: V,
631
- rowData: G
631
+ rowData: K
632
632
  } = mt({
633
633
  getLocations() {
634
634
  return e.locations;
@@ -639,9 +639,9 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
639
639
  });
640
640
  function y() {
641
641
  var l, r;
642
- return (l = e.locations) != null && l.find((k) => {
642
+ return (l = e.locations) != null && l.find((T) => {
643
643
  var F, B;
644
- return ((F = k.doc) == null ? void 0 : F._id) === ((B = e.purchaseOrder.supplier) == null ? void 0 : B._id);
644
+ return ((F = T.doc) == null ? void 0 : F._id) === ((B = e.purchaseOrder.supplier) == null ? void 0 : B._id);
645
645
  }) ? `Location ${(r = e.purchaseOrder.supplier) == null ? void 0 : r.name} must be removed because template cannot be used to transfer to itself.` : !0;
646
646
  }
647
647
  const d = U({
@@ -651,19 +651,19 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
651
651
  set(l) {
652
652
  e.purchaseOrder.remark = l;
653
653
  }
654
- }), T = Q();
654
+ }), k = Q();
655
655
  c({
656
656
  validateInputs: () => {
657
657
  var l, r;
658
- (r = (l = T.value) == null ? void 0 : l.validateInputs) == null || r.call(l);
658
+ (r = (l = k.value) == null ? void 0 : l.validateInputs) == null || r.call(l);
659
659
  },
660
660
  resetInputsValidation: () => {
661
661
  var l, r;
662
- (r = (l = T.value) == null ? void 0 : l.resetInputsValidation) == null || r.call(l);
662
+ (r = (l = k.value) == null ? void 0 : l.resetInputsValidation) == null || r.call(l);
663
663
  },
664
664
  resetInputs: () => {
665
665
  var l, r;
666
- (r = (l = T.value) == null ? void 0 : l.resetInputs) == null || r.call(l);
666
+ (r = (l = k.value) == null ? void 0 : l.resetInputs) == null || r.call(l);
667
667
  }
668
668
  });
669
669
  const a = U(() => ({
@@ -677,12 +677,12 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
677
677
  },
678
678
  updateItem: (l) => {
679
679
  let r = [];
680
- l.id ? r = e.purchaseOrder.items.map((k) => k.id !== l.id ? k : l) : r = e.purchaseOrder.items.map((k) => k.sku._id !== l.sku._id ? k : l), e.purchaseOrder.items = r;
680
+ l.id ? r = e.purchaseOrder.items.map((T) => T.id !== l.id ? T : l) : r = e.purchaseOrder.items.map((T) => T.sku._id !== l.sku._id ? T : l), e.purchaseOrder.items = r;
681
681
  },
682
682
  deleteItem: (l) => {
683
683
  console.log(l.id);
684
684
  let r = [];
685
- l.id ? r = e.purchaseOrder.items.filter((k) => k.id !== l.id) : r = e.purchaseOrder.items.filter((k) => k.sku._id !== l.sku._id), e.purchaseOrder.items = r;
685
+ l.id ? r = e.purchaseOrder.items.filter((T) => T.id !== l.id) : r = e.purchaseOrder.items.filter((T) => T.sku._id !== l.sku._id), e.purchaseOrder.items = r;
686
686
  }
687
687
  })), f = Qt({
688
688
  duplicateItem: a.value.duplicateItem,
@@ -695,7 +695,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
695
695
  return e.purchaseOrder.items;
696
696
  },
697
697
  get transferType() {
698
- return K.PURCHASE;
698
+ return G.PURCHASE;
699
699
  },
700
700
  get disabled() {
701
701
  return v.disabled;
@@ -709,10 +709,10 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
709
709
  })).filter((O) => {
710
710
  var M;
711
711
  return (M = e.purchaseOrder.items) == null ? void 0 : M.find((L) => L.sku._id === O.value._id);
712
- }).map((O) => O.value), k = e.purchaseOrder.items ?? [], F = await $(
712
+ }).map((O) => O.value), T = e.purchaseOrder.items ?? [], F = await $(
713
713
  r.map((O) => O._id),
714
714
  (O) => {
715
- const M = b.skuById[O], L = k.find((E) => E.sku._id === M._id);
715
+ const M = b.skuById[O], L = T.find((E) => E.sku._id === M._id);
716
716
  if (L)
717
717
  return L;
718
718
  const q = { amount: 1, precision: me(M.unit) };
@@ -745,7 +745,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
745
745
  if (!F) return;
746
746
  const B = F.map((O) => O.sku._id), z = [];
747
747
  for (const O of B) {
748
- const M = k.filter((L) => L.sku._id === O);
748
+ const M = T.filter((L) => L.sku._id === O);
749
749
  if (M.length > 0)
750
750
  z.push(...M);
751
751
  else {
@@ -756,10 +756,10 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
756
756
  z.sort((O, M) => O.sku.code.localeCompare(M.sku.code)), e.purchaseOrder.items = z;
757
757
  }
758
758
  return (l, r) => {
759
- const k = A("FmTextField"), F = A("FmSelect"), B = A("FmTextarea"), z = A("FmButton"), O = A("FmTable"), M = A("FmFormGroup"), L = A("FmForm");
759
+ const T = A("FmTextField"), F = A("FmSelect"), B = A("FmTextarea"), z = A("FmButton"), O = A("FmTable"), M = A("FmFormGroup"), L = A("FmForm");
760
760
  return R(), Z(L, {
761
761
  ref_key: "formRef",
762
- ref: T,
762
+ ref: k,
763
763
  class: "flex flex-col gap-32",
764
764
  disabled: l.disabled
765
765
  }, {
@@ -768,7 +768,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
768
768
  return [
769
769
  s("div", us, [
770
770
  s("div", ds, [
771
- p(k, {
771
+ p(T, {
772
772
  label: t(n)("inventory.transfer.form.name"),
773
773
  "label-mark": "required",
774
774
  modelValue: t(e).name,
@@ -782,13 +782,13 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
782
782
  items: [
783
783
  {
784
784
  label: t(n)("inventory.transfer.form.type.purchase"),
785
- value: t(K).PURCHASE,
785
+ value: t(G).PURCHASE,
786
786
  disabled: !t(_).locationOptionsTypePurchase.value.length,
787
787
  sublabel: t(_).locationOptionsTypePurchase.value.length ? void 0 : t(n)("inventory.transfer.form.noSupplierAvailable")
788
788
  },
789
789
  {
790
790
  label: t(n)("inventory.transfer.form.type.transfer"),
791
- value: t(K).TRANSFER,
791
+ value: t(G).TRANSFER,
792
792
  disabled: !t(_).locationOptionsTypeTransfer.value.length,
793
793
  sublabel: t(_).locationOptionsTypeTransfer.value.length ? void 0 : t(n)("inventory.transfer.form.noLocationAvailable")
794
794
  }
@@ -806,7 +806,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
806
806
  _: 1
807
807
  }, 8, ["label", "model-value", "items", "rules"]),
808
808
  p(F, {
809
- label: P.value === t(K).PURCHASE ? t(n)("inventory.transfer.form.purchaseFrom") : t(n)("inventory.transfer.form.transferFrom"),
809
+ label: P.value === t(G).PURCHASE ? t(n)("inventory.transfer.form.purchaseFrom") : t(n)("inventory.transfer.form.transferFrom"),
810
810
  modelValue: h.value,
811
811
  "onUpdate:modelValue": r[2] || (r[2] = (w) => h.value = w),
812
812
  items: I.value
@@ -833,7 +833,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
833
833
  }),
834
834
  _: 1
835
835
  }, 8, ["label", "modelValue", "items"]),
836
- p(k, {
836
+ p(T, {
837
837
  label: t(n)("inventory.transfer.form.reference"),
838
838
  "label-mark": "optional",
839
839
  modelValue: t(e).purchaseOrder.ref,
@@ -863,7 +863,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
863
863
  ]),
864
864
  p(O, {
865
865
  "column-defs": t(V),
866
- "row-data": t(G),
866
+ "row-data": t(K),
867
867
  "shrink-at": 9999,
868
868
  onRowClick: t(S),
869
869
  "hide-footer": ""
@@ -943,8 +943,8 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
943
943
  },
944
944
  emits: ["update:show", "submitted"],
945
945
  setup(m, { expose: c, emit: v }) {
946
- var T;
947
- const e = m, n = v, g = _t(), b = kt(), { t: i } = le(), o = Je(e, "show");
946
+ var k;
947
+ const e = m, n = v, g = _t(), b = Tt(), { t: i } = le(), o = Je(e, "show");
948
948
  function u() {
949
949
  return {
950
950
  _id: "",
@@ -975,7 +975,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
975
975
  }
976
976
  };
977
977
  }
978
- const _ = Q(e.modelValue ?? u()), P = Q(((T = e.modelValue) == null ? void 0 : T._id) ?? `${Math.random()}`);
978
+ const _ = Q(e.modelValue ?? u()), P = Q(((k = e.modelValue) == null ? void 0 : k._id) ?? `${Math.random()}`);
979
979
  be(
980
980
  () => e.show,
981
981
  (a) => {
@@ -1032,7 +1032,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1032
1032
  }
1033
1033
  }
1034
1034
  }
1035
- async function G() {
1035
+ async function K() {
1036
1036
  var f, C;
1037
1037
  const a = _.value;
1038
1038
  if (a) {
@@ -1061,7 +1061,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1061
1061
  case ne.CREATE:
1062
1062
  return V();
1063
1063
  case ne.UPDATE:
1064
- return G();
1064
+ return K();
1065
1065
  }
1066
1066
  }
1067
1067
  function d() {
@@ -1113,7 +1113,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1113
1113
  }, 8, ["modelValue"]);
1114
1114
  };
1115
1115
  }
1116
- }), Ts = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, ks = { class: "flex justify-between" }, ws = { class: "fm-typo-en-body-lg-600" }, Fs = { class: "fm-status-badge fm-status-badge-info-secondary" }, Is = { class: "flex flex-col gap-8" }, Ss = { class: "flex flex-col gap-4" }, Cs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $s = { class: "flex gap-1" }, Os = { class: "fm-typo-en-body-lg-600" }, Ms = {
1116
+ }), ks = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, Ts = { class: "flex justify-between" }, ws = { class: "fm-typo-en-body-lg-600" }, Fs = { class: "fm-status-badge fm-status-badge-info-secondary" }, Is = { class: "flex flex-col gap-8" }, Ss = { class: "flex flex-col gap-4" }, Cs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $s = { class: "flex gap-1" }, Os = { class: "fm-typo-en-body-lg-600" }, Ms = {
1117
1117
  key: 0,
1118
1118
  class: "flex flex-col gap-4"
1119
1119
  }, Vs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ds = { class: "fm-typo-en-body-lg-600" }, Rs = {
@@ -1122,7 +1122,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1122
1122
  }, As = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ps = { class: "fm-typo-en-body-lg-600" }, Us = {
1123
1123
  key: 2,
1124
1124
  class: "flex flex-col gap-4"
1125
- }, Bs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ls = { class: "fm-typo-en-body-lg-600" }, qs = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Es = { class: "flex flex-col gap-8" }, Ns = { class: "fm-typo-en-body-lg-600" }, zs = { class: "flex w-full gap-4" }, Hs = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, Qs = { class: "fm-typo-en-body-lg-600 shrink-0" }, js = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Gs = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Ks = {
1125
+ }, Bs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ls = { class: "fm-typo-en-body-lg-600" }, qs = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Es = { class: "flex flex-col gap-8" }, Ns = { class: "fm-typo-en-body-lg-600" }, zs = { class: "flex w-full gap-4" }, Hs = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, Qs = { class: "fm-typo-en-body-lg-600 shrink-0" }, js = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Ks = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Gs = {
1126
1126
  key: 0,
1127
1127
  class: "shrink-0 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
1128
1128
  }, Ws = {
@@ -1145,12 +1145,12 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1145
1145
  ], o = Q(""), u = U(
1146
1146
  () => {
1147
1147
  var I, h, S, V;
1148
- return ((h = (I = b.value) == null ? void 0 : I.supplier) == null ? void 0 : h.internal) === "restaurant" || ((V = (S = b.value) == null ? void 0 : S.supplier) == null ? void 0 : V.internal) === "warehouse" ? K.TRANSFER : K.PURCHASE;
1148
+ return ((h = (I = b.value) == null ? void 0 : I.supplier) == null ? void 0 : h.internal) === "restaurant" || ((V = (S = b.value) == null ? void 0 : S.supplier) == null ? void 0 : V.internal) === "warehouse" ? G.TRANSFER : G.PURCHASE;
1149
1149
  }
1150
1150
  ), _ = Q(!0), P = Je(v, "show");
1151
1151
  return (I, h) => {
1152
1152
  var f;
1153
- const S = A("FmMenuDivider"), V = A("FmCard"), G = A("FmIcon"), y = A("FmTextField"), d = A("FmTable"), T = A("FmButton"), a = A("FmSideSheet");
1153
+ const S = A("FmMenuDivider"), V = A("FmCard"), K = A("FmIcon"), y = A("FmTextField"), d = A("FmTable"), k = A("FmButton"), a = A("FmSideSheet");
1154
1154
  return R(), Z(a, {
1155
1155
  header: t(g)("inventory.transfer.template.details.view", { template: (f = I.template) == null ? void 0 : f.name }),
1156
1156
  modelValue: t(P),
@@ -1162,16 +1162,16 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1162
1162
  default: N(() => {
1163
1163
  var C, $;
1164
1164
  return [
1165
- s("div", Ts, [
1165
+ s("div", ks, [
1166
1166
  s("div", null, [
1167
1167
  p(V, {
1168
1168
  variant: "outlined",
1169
1169
  class: "flex flex-col gap-8 px-12 py-16"
1170
1170
  }, {
1171
1171
  default: N(() => {
1172
- var x, l, r, k, F, B, z;
1172
+ var x, l, r, T, F, B, z;
1173
1173
  return [
1174
- s("div", ks, [
1174
+ s("div", Ts, [
1175
1175
  s("div", ws, D(t(g)("inventory.transfer.template.details.templateSummary")), 1),
1176
1176
  s("div", Fs, D(t(g)(
1177
1177
  `inventory.transfer.receiveRequest.details.type.${u.value.toLocaleLowerCase("en-US")}`
@@ -1187,7 +1187,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1187
1187
  ]),
1188
1188
  (r = (l = b.value) == null ? void 0 : l.supplier) != null && r.name ? (R(), j("div", Ms, [
1189
1189
  s("div", Vs, D(t(g)("inventory.transfer.receiveRequest.details.from")), 1),
1190
- s("div", Ds, D((F = (k = b.value) == null ? void 0 : k.supplier) == null ? void 0 : F.name), 1)
1190
+ s("div", Ds, D((F = (T = b.value) == null ? void 0 : T.supplier) == null ? void 0 : F.name), 1)
1191
1191
  ])) : oe("", !0),
1192
1192
  (B = b.value) != null && B.ref ? (R(), j("div", Rs, [
1193
1193
  s("div", As, D(t(g)("inventory.transfer.receiveRequest.details.reference")), 1),
@@ -1216,11 +1216,11 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1216
1216
  s("div", Qs, D(t(ht)(x.quantity, x.sku.unit, x.measurement)), 1)
1217
1217
  ]),
1218
1218
  s("div", js, [
1219
- s("div", Gs, D(x.code), 1),
1220
- x.totalCost && t(n).enableTotalCost ? (R(), j("div", Ks, " (" + D(t(ft)(x.totalCost)) + ") ", 1)) : oe("", !0)
1219
+ s("div", Ks, D(x.code), 1),
1220
+ x.totalCost && t(n).enableTotalCost ? (R(), j("div", Gs, " (" + D(t(ft)(x.totalCost)) + ") ", 1)) : oe("", !0)
1221
1221
  ]),
1222
1222
  t(xt)(x) ? (R(), j("div", Ws, [
1223
- p(G, {
1223
+ p(K, {
1224
1224
  name: "error",
1225
1225
  color: "system-error-300",
1226
1226
  size: "sm"
@@ -1258,7 +1258,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1258
1258
  }),
1259
1259
  "side-sheet-footer": N(() => [
1260
1260
  s("div", Zs, [
1261
- p(T, {
1261
+ p(k, {
1262
1262
  label: t(g)("common.edit"),
1263
1263
  onClick: h[1] || (h[1] = (C) => e("action:edit")),
1264
1264
  variant: "tertiary"
@@ -1276,7 +1276,7 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1276
1276
  ve(o.fetchTemplates);
1277
1277
  const V = U(
1278
1278
  () => P.value || u.value || !h._currentLocation
1279
- ), G = U(() => _.value), y = Q(""), d = U(() => S.value.xs || S.value.sm), T = U(() => d.value ? 10 : 20);
1279
+ ), K = U(() => _.value), y = Q(""), d = U(() => S.value.xs || S.value.sm), k = U(() => d.value ? 10 : 20);
1280
1280
  function a($) {
1281
1281
  switch ($) {
1282
1282
  case Le.Add:
@@ -1338,25 +1338,25 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1338
1338
  p(bt, {
1339
1339
  searchable: "",
1340
1340
  search: y.value,
1341
- "onUpdate:search": x[0] || (x[0] = (k) => y.value = k)
1341
+ "onUpdate:search": x[0] || (x[0] = (T) => y.value = T)
1342
1342
  }, null, 8, ["search"]),
1343
1343
  (R(), Z(l, {
1344
1344
  style: He(t(I).tableHeight),
1345
1345
  "column-defs": t(o).columnDefs,
1346
- "row-data": G.value,
1346
+ "row-data": K.value,
1347
1347
  "search-value": y.value,
1348
1348
  loading: V.value,
1349
1349
  key: (r = t(h)._currentLocation) == null ? void 0 : r.dbName,
1350
- onRowClick: x[1] || (x[1] = (k) => t(e)(k.original)),
1351
- "page-size": T.value
1350
+ onRowClick: x[1] || (x[1] = (T) => t(e)(T.original)),
1351
+ "page-size": k.value
1352
1352
  }, {
1353
- "list-row": N((k) => [
1353
+ "list-row": N((T) => [
1354
1354
  p(Ye, {
1355
- row: k,
1355
+ row: T,
1356
1356
  onRowClick: (F) => t(e)(F)
1357
1357
  }, {
1358
1358
  default: N((F) => {
1359
- var B, z, O, M, L, q, w, E, te, he, xe, ge, Te, ae, ke, we, Fe, Ie, Se, Ce, re, $e, Oe, Me, Ve, ie, De;
1359
+ var B, z, O, M, L, q, w, E, te, he, xe, ge, ke, ae, Te, we, Fe, Ie, Se, Ce, re, $e, Oe, Me, Ve, ie, De;
1360
1360
  return [
1361
1361
  s("div", eo, [
1362
1362
  s("div", to, [
@@ -1374,12 +1374,12 @@ const jt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1374
1374
  ]),
1375
1375
  s("div", lo, [
1376
1376
  p(t(W), {
1377
- render: (Te = (ge = (xe = F.supplier) == null ? void 0 : xe.column) == null ? void 0 : ge.columnDef) == null ? void 0 : Te.cell,
1378
- props: (ke = (ae = F.supplier) == null ? void 0 : ae.getContext) == null ? void 0 : ke.call(ae)
1377
+ render: (ke = (ge = (xe = F.supplier) == null ? void 0 : xe.column) == null ? void 0 : ge.columnDef) == null ? void 0 : ke.cell,
1378
+ props: (Te = (ae = F.supplier) == null ? void 0 : ae.getContext) == null ? void 0 : Te.call(ae)
1379
1379
  }, null, 8, ["render", "props"])
1380
1380
  ]),
1381
- s("div", null, D((we = k.original.locations) != null && we.length ? `Enabled for ${(Fe = k.original.locations) == null ? void 0 : Fe.length} outlets` : "Enabled for all outlets"), 1),
1382
- s("div", no, D(k.original.purchaseOrder.items.length ? k.original.purchaseOrder.items.map((Xe) => Xe.name).join(", ") : "No items"), 1),
1381
+ s("div", null, D((we = T.original.locations) != null && we.length ? `Enabled for ${(Fe = T.original.locations) == null ? void 0 : Fe.length} outlets` : "Enabled for all outlets"), 1),
1382
+ s("div", no, D(T.original.purchaseOrder.items.length ? T.original.purchaseOrder.items.map((Xe) => Xe.name).join(", ") : "No items"), 1),
1383
1383
  s("div", ao, [
1384
1384
  p(t(W), {
1385
1385
  render: (Ce = (Se = (Ie = F.ref) == null ? void 0 : Ie.column) == null ? void 0 : Se.columnDef) == null ? void 0 : Ce.cell,