@feedmepos/mf-inventory-portal 1.3.11 → 1.3.12-dev.2

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 (92) hide show
  1. package/dist/{App-CBd6w_qA.js → App-CNtTZWS5.js} +3 -3
  2. package/dist/{ApprovalView-T5ukxJT2.js → ApprovalView-CEl22JiC.js} +7 -7
  3. package/dist/{BindingsDialog-wnUUvDbJ.js → BindingsDialog-CfKXCpBU.js} +2 -2
  4. package/dist/{BindingsPicker-DfxWEsuD.js → BindingsPicker-Cs5tz33G.js} +2 -2
  5. package/dist/{BindingsTable-C4osZe4g.js → BindingsTable-BfnpZ-KA.js} +3 -3
  6. package/dist/ClosingDraftView-DkhhKjNZ.js +3005 -0
  7. package/dist/{ClosingHistoryView-DVkRqMby.js → ClosingHistoryView-BZGgnEMk.js} +5 -5
  8. package/dist/{ClosingTemplateView-CWVFpLQp.js → ClosingTemplateView-CePW41Zv.js} +14 -14
  9. package/dist/{DeliveryOrderPrintPreview-CYJ-N_nT.js → DeliveryOrderPrintPreview-CMiT6FFJ.js} +9 -9
  10. package/dist/FmConfirmationButton.vue_vue_type_script_setup_true_lang-DLrMEGFR.js +62 -0
  11. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DqNegFEz.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Cy37JvjC.js} +17 -17
  12. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CmJ1-ez_.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D1F76xVX.js} +2 -2
  13. package/dist/{FmMultiselectDialog-DVmf2SUo.js → FmMultiselectDialog-BsvCwcJc.js} +1 -1
  14. package/dist/{FmMultiselectDialog-BlQ73-mq.js → FmMultiselectDialog-DhMpDoSp.js} +2 -2
  15. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-QjHZgy15.js → FmUnitInput.vue_vue_type_script_setup_true_lang-nHP7zkk1.js} +4 -4
  16. package/dist/{ImportView-2Lv-F8mA.js → ImportView-i_QNJOjX.js} +6 -6
  17. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BrBwx7H_.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-9mBpcrHT.js} +1 -1
  18. package/dist/{IngredientGroupView-6ehuvvaQ.js → IngredientGroupView-BRXP6KA8.js} +5 -5
  19. package/dist/{IngredientsView-CblSczx0.js → IngredientsView-Ctxhsn56.js} +15 -15
  20. package/dist/{IntegrationExplorerView-B1_QbRxN.js → IntegrationExplorerView-Bh04rXi3.js} +5 -5
  21. package/dist/{IntegrationView-O07aQ73D.js → IntegrationView-D21VT578.js} +13 -13
  22. package/dist/{InventoryBindingForm-D6ZEMcBv.js → InventoryBindingForm-DRN9QJi0.js} +1 -1
  23. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-D4m2EmK1.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BLoIOdb3.js} +5 -5
  24. package/dist/{InventoryBindingSummary-CtpcQqQH.js → InventoryBindingSummary-PAiqx015.js} +1 -1
  25. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang--DMDGodL.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BIvMfYs0.js} +1 -1
  26. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DUMRp4XY.js → PremiumBadge.vue_vue_type_script_setup_true_lang--ld9yYXG.js} +1 -1
  27. package/dist/{PublishView-BDl-gijS.js → PublishView-Dnltnb2q.js} +3 -3
  28. package/dist/{PurchaseOrderPrintPreview-BegfBpk1.js → PurchaseOrderPrintPreview-C117AdbG.js} +9 -9
  29. package/dist/{ReceiveRequestView-BOwtvG9t.js → ReceiveRequestView-CEGAD0Ng.js} +23 -23
  30. package/dist/{RecipeView-CH24uIHd.js → RecipeView-BPoXX96N.js} +15 -15
  31. package/dist/{SettingsView-BS1TIbEG.js → SettingsView-5wcHwBbj.js} +4 -4
  32. package/dist/StockView-QpWVITjo.js +2431 -0
  33. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DAeIe9L0.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DoBOG20i.js} +1 -1
  34. package/dist/{SupplierView-BGuEnnrq.js → SupplierView-CXztXTGJ.js} +12 -12
  35. package/dist/{SurchargeView-CNG75X-N.js → SurchargeView-mA1cNQGF.js} +6 -6
  36. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-peUaqYJf.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CbEb8v1Q.js} +2 -2
  37. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-7_GwFKXj.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-D1hykQLi.js} +1 -1
  38. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CFDPN904.js → TransferDetails.vue_vue_type_script_setup_true_lang-zeZt-Xni.js} +91 -91
  39. package/dist/{TransferTemplateView-BWvtu-wX.js → TransferTemplateView-RD0i6kb6.js} +584 -638
  40. package/dist/{UnitCostHistoryView-DOJE-1OS.js → UnitCostHistoryView-BWCq8Po_.js} +4 -4
  41. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-CscoVkhG.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-CZjt9Tph.js} +4 -4
  42. package/dist/{UnitView-DuAu2apH.js → UnitView-CDqc3Tlc.js} +7 -7
  43. package/dist/{WarehouseView-or9SYlSw.js → WarehouseView-Dn9Y1pfn.js} +5 -5
  44. package/dist/{WastageTemplateView-COW_V0fj.js → WastageTemplateView-DqNfxcrF.js} +14 -14
  45. package/dist/api/closing-draft.d.ts +2 -0
  46. package/dist/{app-D54yDxFV.js → app-BMCau-r9.js} +22168 -21063
  47. package/dist/app.d.ts +391 -0
  48. package/dist/app.js +2 -2
  49. package/dist/{closing-template-ldiEKhOl.js → closing-template-PafmbL9x.js} +1 -1
  50. package/dist/components/ui-library/FmConfirmationButton.vue.d.ts +2 -0
  51. package/dist/{date2-BLeYHVHx.js → date2-NGc-US7r.js} +1 -1
  52. package/dist/{dayjs.min-DGQ4zttU.js → dayjs.min-D6CbxpmT.js} +1 -1
  53. package/dist/{decimal-xstA267T.js → decimal-CZC4S20U.js} +2 -2
  54. package/dist/{defineDeepModel-Cr10VhS5.js → defineDeepModel-BWzoo1Yl.js} +1 -1
  55. package/dist/{duplicate-template-CyE0xzx2.js → duplicate-template-BxSUC5LI.js} +1 -1
  56. package/dist/{export-Dg8UUfiF.js → export-Df2CdXk-.js} +1 -1
  57. package/dist/{feature-DjgoqZRe.js → feature-Byu94DG1.js} +28 -28
  58. package/dist/{format-time-from-id-BUfvjuAI.js → format-time-from-id-hx4F-i1-.js} +1 -1
  59. package/dist/{format-unit-display-CjcUbFWk.js → format-unit-display-CDw8VsCc.js} +11 -11
  60. package/dist/{import-export.helper-CgtFAIYx.js → import-export.helper-DYFRZAI2.js} +6 -6
  61. package/dist/{index-DhmQ_-Xs.js → index-Bfe8USZ3.js} +1 -1
  62. package/dist/{index-DjsWOEAk.js → index-CsMpGUvS.js} +1 -1
  63. package/dist/{index-D1DXcz-1.js → index-DodBVGPe.js} +3 -3
  64. package/dist/{inventory-core-dart.default-BPi15AEL.js → inventory-core-dart.default-Do9H1oK-.js} +1 -1
  65. package/dist/{lodash-BKR9tW9Z.js → lodash-jqyiF2Jy.js} +1 -1
  66. package/dist/{lz-string-CXAZq-_B.js → lz-string-CZH3sbUP.js} +1 -1
  67. package/dist/{netsuite-BtyQlk6P.js → netsuite-D7C_nhsL.js} +37 -37
  68. package/dist/{number-DcJHR1ZR.js → number-Dzj3ENjG.js} +3 -3
  69. package/dist/{predefined-templates-msHan4_0.js → predefined-templates-BZ9EyGnO.js} +1 -1
  70. package/dist/{purchase-order-template-CYXcyeQV.js → purchase-order-template-DE9pQpEF.js} +1 -1
  71. package/dist/{recalculationUtils-1IqGhVdW.js → recalculationUtils-BvTzacgL.js} +1 -1
  72. package/dist/{rules-DXbirS4I.js → rules-Cb9NgTav.js} +2 -2
  73. package/dist/{stock-CEQ8o0P7.js → stock-BVdxOXPo.js} +1 -1
  74. package/dist/{stock-Co5liDhH.js → stock-CoJZvuG_.js} +3 -3
  75. package/dist/{supplier-DAiM8u9g.js → supplier-B7nSOpfH.js} +2 -2
  76. package/dist/{surcharge-DFgeEcwF.js → surcharge-F1vEGWak.js} +1 -1
  77. package/dist/tsconfig.app.tsbuildinfo +1 -1
  78. package/dist/{use-ingredient-select-dialog-RBp06_Ny.js → use-ingredient-select-dialog-BqBdVzw-.js} +2 -2
  79. package/dist/{use-inventory-binding-dialog-BJUDORac.js → use-inventory-binding-dialog-CsQ8GQND.js} +2 -2
  80. package/dist/{use-template-enabled-locations-DCgY6X-O.js → use-template-enabled-locations-BzZBqRYv.js} +2 -2
  81. package/dist/views/closing-draft/components/closing-draft-create/ClosingDraftCreatePreviewTable.vue.d.ts +18 -0
  82. package/dist/views/closing-draft/components/closing-draft-create/ClosingDraftCreateSideSheet.vue.d.ts +21 -0
  83. package/dist/views/closing-draft/composables/use-closing-draft-import.d.ts +559 -0
  84. package/dist/views/closing-draft/helpers/closing-draft-import.helper.d.ts +26 -0
  85. package/dist/views/stock/composables/use-stock-adjustment-permission.d.ts +3 -0
  86. package/dist/views/stock/composables/use-stock-adjustment-permission.test.d.ts +1 -0
  87. package/dist/{vue-i18n-CcG2seRc.js → vue-i18n-Gpl_Em6v.js} +252 -252
  88. package/dist/{xlsx-DQZhwN-j.js → xlsx-Cq--BOe0.js} +2 -2
  89. package/dist/{xlsx.util-BVyHdIH5.js → xlsx.util-BD4BK3XO.js} +1 -1
  90. package/package.json +4 -3
  91. package/dist/ClosingDraftView-g90vlE4b.js +0 -2476
  92. package/dist/StockView-D9hMA7Q6.js +0 -2406
@@ -1,29 +1,30 @@
1
- import { defineComponent as ae, onMounted as Fe, computed as N, ref as H, watch as Ce, inject as ot, resolveComponent as V, openBlock as S, createElementBlock as L, createElementVNode as e, createVNode as c, withCtx as B, renderSlot as xe, withDirectives as qe, normalizeClass as re, vModelText as Pe, reactive as st, h as Q, toDisplayString as I, unref as t, createCommentVNode as oe, Fragment as pe, normalizeStyle as ke, renderList as Qe, createBlock as ne, mergeProps as Ye, createTextVNode as le, mergeModels as Le, useModel as nt, isRef as He, Teleport as lt, normalizeProps as at, guardReactiveProps as rt } from "vue";
1
+ import { defineComponent as ae, onMounted as Te, computed as B, ref as H, watch as Fe, inject as ot, resolveComponent as R, openBlock as O, createElementBlock as L, createElementVNode as t, createVNode as b, withCtx as N, renderSlot as Ue, withDirectives as Pe, normalizeClass as le, vModelText as Be, reactive as st, h as Q, toDisplayString as M, unref as e, createCommentVNode as oe, Fragment as pe, normalizeStyle as _e, renderList as Qe, createBlock as ne, mergeProps as Ye, createTextVNode as re, mergeModels as Le, useModel as nt, isRef as He, Teleport as lt, normalizeProps as rt, guardReactiveProps as at } from "vue";
2
2
  import { u as it, _ as ut } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-sUxHOj47.js";
3
3
  import { useI18n as me } from "@feedmepos/mf-common";
4
- import { f as dt, t as mt, u as Ne, a as pt } from "./format-unit-display-CjcUbFWk.js";
4
+ import { f as dt, t as mt, u as Ne, a as pt } from "./format-unit-display-CDw8VsCc.js";
5
5
  import { R as Ee } from "./row-action.enum-Co_O4qD9.js";
6
- import { a as We, s as ct, t as X, u as Ge, v as ft, k as ye } from "./app-D54yDxFV.js";
7
- import { _ as yt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CmJ1-ez_.js";
6
+ import { a as We, s as ct, t as X, u as Ge, v as ft, k as ye } from "./app-BMCau-r9.js";
7
+ import { _ as yt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D1F76xVX.js";
8
8
  import { components as ue, useSnackbar as vt, useProxiedModel as Ke, useBreakpoints as bt } from "@feedmepos/ui-library";
9
- import { defineStore as gt, storeToRefs as ze } from "pinia";
9
+ import { defineStore as ht, storeToRefs as ze } from "pinia";
10
10
  import { F as de } from "./form-mode.enum-BKiNVH6A.js";
11
- import { I as ht, a as _t, R as we, A as Te, M as xt } from "./rules-DXbirS4I.js";
12
- import { u as he, t as je, b as kt, n as wt, a as se, g as be, c as ve, d as Tt } from "./number-DcJHR1ZR.js";
13
- import { d as Ze } from "./defineDeepModel-Cr10VhS5.js";
14
- import { _ as Ft, F as Ct, a as It, b as Mt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-QjHZgy15.js";
15
- import { u as ge } from "./feature-DjgoqZRe.js";
16
- import { u as Je } from "./netsuite-BtyQlk6P.js";
17
- import { F as _e } from "./inventory-core-dart.default-BPi15AEL.js";
18
- import { u as $t } from "./supplier-DAiM8u9g.js";
19
- import { u as St } from "./use-ingredient-select-dialog-RBp06_Ny.js";
11
+ import { I as gt, a as xt, R as ke, A as we, M as _t } from "./rules-Cb9NgTav.js";
12
+ import { u as ge, t as je, b as kt, n as wt, a as se, g as be, c as ve, d as Tt } from "./number-Dzj3ENjG.js";
13
+ import { d as Ze } from "./defineDeepModel-BWzoo1Yl.js";
14
+ import { _ as Ft, F as Ct, a as It, b as Mt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-nHP7zkk1.js";
15
+ import { u as he } from "./feature-Byu94DG1.js";
16
+ import { u as Je } from "./netsuite-D7C_nhsL.js";
17
+ import { F as xe } from "./inventory-core-dart.default-Do9H1oK-.js";
18
+ import { u as St } from "./supplier-B7nSOpfH.js";
19
+ import { u as Ot } from "./use-ingredient-select-dialog-BqBdVzw-.js";
20
20
  import { F as ee, _ as Xe } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js";
21
- import { u as Ot } from "./use-template-enabled-locations-DCgY6X-O.js";
22
- import { u as Dt, _ as Vt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DqNegFEz.js";
23
- import { u as At } from "./purchase-order-template-CYXcyeQV.js";
24
- import { f as Rt } from "./format-time-from-id-BUfvjuAI.js";
25
- import { f as Bt } from "./date2-BLeYHVHx.js";
26
- const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Pt = { class: "flex-1" }, Lt = { class: "flex items-center" }, Nt = { class: "flex-1" }, Et = { class: "flex-1" }, zt = /* @__PURE__ */ ae({
21
+ import { u as $t } from "./use-template-enabled-locations-BzZBqRYv.js";
22
+ import { u as Dt, _ as Vt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Cy37JvjC.js";
23
+ import { u as At } from "./purchase-order-template-DE9pQpEF.js";
24
+ import { _ as Rt } from "./FmConfirmationButton.vue_vue_type_script_setup_true_lang-DLrMEGFR.js";
25
+ import { f as qt } from "./format-time-from-id-hx4F-i1-.js";
26
+ import { f as Ut } from "./date2-NGc-US7r.js";
27
+ const Pt = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, Lt = { class: "flex-1" }, Nt = { class: "flex items-center" }, Et = { class: "flex-1" }, zt = { class: "flex-1" }, jt = /* @__PURE__ */ ae({
27
28
  __name: "FmMinMaxInput",
28
29
  props: {
29
30
  rules: {},
@@ -61,111 +62,111 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Pt = { c
61
62
  helperState: {}
62
63
  },
63
64
  setup(f) {
64
- const h = f, y = Ze("modelValue"), a = ht();
65
- Fe(() => {
66
- const { min: p, max: b } = y ?? {};
67
- if (!(!p || !b) && p.precision !== b.precision) {
68
- const w = Math.max(p.precision, b.precision), i = he(p, w), g = he(b, w);
69
- y.min = i, y.max = g;
65
+ const x = f, h = Ze("modelValue"), r = gt();
66
+ Te(() => {
67
+ const { min: p, max: c } = h ?? {};
68
+ if (!(!p || !c) && p.precision !== c.precision) {
69
+ const w = Math.max(p.precision, c.precision), a = ge(p, w), v = ge(c, w);
70
+ h.min = a, h.max = v;
70
71
  }
71
72
  });
72
- const r = N(() => {
73
- const { min: p, max: b } = y ?? {};
74
- return Math.max((p == null ? void 0 : p.precision) ?? 0, (b == null ? void 0 : b.precision) ?? 0, h.precision ?? 0);
73
+ const i = B(() => {
74
+ const { min: p, max: c } = h ?? {};
75
+ return Math.max((p == null ? void 0 : p.precision) ?? 0, (c == null ? void 0 : c.precision) ?? 0, x.precision ?? 0);
75
76
  }), s = (p) => {
76
77
  if (!p) return "";
77
- const b = kt(p), w = r.value, i = he(b, w);
78
+ const c = kt(p), w = i.value, a = ge(c, w);
78
79
  return wt(
79
- +se(i),
80
- i.precision
80
+ +se(a),
81
+ a.precision
81
82
  );
82
- }, u = H(s(y.min)), _ = H(s(y.max));
83
- Ce([u, _], ([p, b]) => {
84
- const w = y ?? {}, i = a(p), g = a(b), O = r.value;
85
- if (p !== "" && i === !0) {
86
- const $ = je(+p, O);
87
- w.min = $;
83
+ }, u = H(s(h.min)), _ = H(s(h.max));
84
+ Fe([u, _], ([p, c]) => {
85
+ const w = h ?? {}, a = r(p), v = r(c), S = i.value;
86
+ if (p !== "" && a === !0) {
87
+ const I = je(+p, S);
88
+ w.min = I;
88
89
  } else
89
90
  w.min = null;
90
- if (b !== "" && g === !0) {
91
- const $ = je(+b, O);
92
- w.max = $;
91
+ if (c !== "" && v === !0) {
92
+ const I = je(+c, S);
93
+ w.max = I;
93
94
  } else
94
95
  w.max = null;
95
- y.min = w.min, y.max = w.max;
96
+ h.min = w.min, h.max = w.max;
96
97
  });
97
- const M = Symbol.for("fm:form-state"), v = ot(M, null), o = N(() => h.disabled ?? (v == null ? void 0 : v.getDisabled()) ?? !1), d = H(), m = H(), k = H(!1), T = H(!1), R = N(() => k.value || T.value), U = N(() => [...[
98
+ const $ = Symbol.for("fm:form-state"), y = ot($, null), o = B(() => x.disabled ?? (y == null ? void 0 : y.getDisabled()) ?? !1), d = H(), m = H(), k = H(!1), T = H(!1), A = B(() => k.value || T.value), q = B(() => [...[
98
99
  function() {
99
- return typeof a(u.value) == "string" || typeof a(_.value) == "string" ? "Must be a number" : !0;
100
+ return typeof r(u.value) == "string" || typeof r(_.value) == "string" ? "Must be a number" : !0;
100
101
  },
101
102
  function(w) {
102
103
  return !w || !w.min || !w.max ? !0 : +se(w.min) > +se(w.max) ? "Min must be less than or equal to max" : !0;
103
104
  }
104
- ], ...h.rules ?? []]);
105
- return (p, b) => {
106
- const w = V("FmLabel"), i = V("FmField"), g = V("FmFormGroup");
107
- return S(), L("div", Ut, [
108
- e("div", qt, [
109
- e("div", Pt, [
110
- c(w, {
105
+ ], ...x.rules ?? []]);
106
+ return (p, c) => {
107
+ const w = R("FmLabel"), a = R("FmField"), v = R("FmFormGroup");
108
+ return O(), L("div", Pt, [
109
+ t("div", Bt, [
110
+ t("div", Lt, [
111
+ b(w, {
111
112
  label: p.label,
112
113
  disabled: p.disabled,
113
114
  required: p.labelMark === "required",
114
115
  optional: p.labelMark === "optional"
115
116
  }, null, 8, ["label", "disabled", "required", "optional"])
116
117
  ]),
117
- c(i, { focused: R.value }, {
118
- default: B(() => [
119
- e("div", Lt, [
120
- xe(p.$slots, "prepend"),
121
- b[6] || (b[6] = e("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Min.", -1)),
122
- e("div", Nt, [
123
- qe(e("input", {
118
+ b(a, { focused: A.value }, {
119
+ default: N(() => [
120
+ t("div", Nt, [
121
+ Ue(p.$slots, "prepend"),
122
+ c[6] || (c[6] = t("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Min.", -1)),
123
+ t("div", Et, [
124
+ Pe(t("input", {
124
125
  type: "text",
125
126
  ref_key: "minInputRef",
126
127
  ref: d,
127
- onFocus: b[0] || (b[0] = () => k.value = !0),
128
- onBlur: b[1] || (b[1] = () => k.value = !1),
129
- "onUpdate:modelValue": b[2] || (b[2] = (O) => u.value = O),
130
- class: re({
128
+ onFocus: c[0] || (c[0] = () => k.value = !0),
129
+ onBlur: c[1] || (c[1] = () => k.value = !1),
130
+ "onUpdate:modelValue": c[2] || (c[2] = (S) => u.value = S),
131
+ class: le({
131
132
  "fm-text-field--input fm-typo-en-body-lg-400": !0,
132
133
  "text-fm-color-typo-primary": !o.value,
133
134
  "text-fm-color-typo-disabled": o.value
134
135
  })
135
136
  }, null, 34), [
136
- [Pe, u.value]
137
+ [Be, u.value]
137
138
  ])
138
139
  ]),
139
- b[7] || (b[7] = e("div", { class: "block h-32 mx-4 w-[1px] bg-fm-color-neutral-gray-200" }, null, -1)),
140
- b[8] || (b[8] = e("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Max.", -1)),
141
- e("div", Et, [
142
- qe(e("input", {
140
+ c[7] || (c[7] = t("div", { class: "block h-32 mx-4 w-[1px] bg-fm-color-neutral-gray-200" }, null, -1)),
141
+ c[8] || (c[8] = t("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Max.", -1)),
142
+ t("div", zt, [
143
+ Pe(t("input", {
143
144
  type: "text",
144
145
  ref_key: "maxInputRef",
145
146
  ref: m,
146
- onFocus: b[3] || (b[3] = () => T.value = !0),
147
- onBlur: b[4] || (b[4] = () => T.value = !1),
148
- "onUpdate:modelValue": b[5] || (b[5] = (O) => _.value = O),
149
- class: re({
147
+ onFocus: c[3] || (c[3] = () => T.value = !0),
148
+ onBlur: c[4] || (c[4] = () => T.value = !1),
149
+ "onUpdate:modelValue": c[5] || (c[5] = (S) => _.value = S),
150
+ class: le({
150
151
  "fm-text-field--input fm-typo-en-body-lg-400": !0,
151
152
  "text-fm-color-typo-primary": !o.value,
152
153
  "text-fm-color-typo-disabled": o.value
153
154
  })
154
155
  }, null, 34), [
155
- [Pe, _.value]
156
+ [Be, _.value]
156
157
  ])
157
158
  ]),
158
- xe(p.$slots, "append")
159
+ Ue(p.$slots, "append")
159
160
  ])
160
161
  ]),
161
162
  _: 3
162
163
  }, 8, ["focused"])
163
164
  ]),
164
- c(g, {
165
+ b(v, {
165
166
  class: "flex-1",
166
167
  "model-value": p.modelValue,
167
168
  info: p.labelInfo,
168
- rules: U.value,
169
+ rules: q.value,
169
170
  "helper-text": p.helperText,
170
171
  "helper-state": p.helperState
171
172
  }, null, 8, ["model-value", "info", "rules", "helper-text", "helper-state"])
@@ -173,71 +174,71 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Pt = { c
173
174
  };
174
175
  }
175
176
  });
176
- function jt({ min: f, max: h } = { min: !0, max: !0 }) {
177
- return function(a) {
178
- return !a || !a.min && f != !1 || !a.max && h != !1 ? "Required" : !0;
177
+ function Qt({ min: f, max: x } = { min: !0, max: !0 }) {
178
+ return function(r) {
179
+ return !r || !r.min && f != !1 || !r.max && x != !1 ? "Required" : !0;
179
180
  };
180
181
  }
181
- function Qt(f, h) {
182
- return function(a) {
183
- return !a || !a.min || !a.max ? !0 : +se(a.min) < f ? `Must be between ${f} and ${h}` : +se(a.max) > h ? `Must be between ${f} and ${h}` : !0;
182
+ function Yt(f, x) {
183
+ return function(r) {
184
+ return !r || !r.min || !r.max ? !0 : +se(r.min) < f ? `Must be between ${f} and ${x}` : +se(r.max) > x ? `Must be between ${f} and ${x}` : !0;
184
185
  };
185
186
  }
186
- function Yt(f) {
187
- const h = _t(f), y = se(f);
188
- return function(r) {
189
- const s = !(r != null && r.min) || h(r.min) === !0, u = !(r != null && r.max) || h(r.max) === !0;
190
- return !s && !u ? `Min & max must be a multiple of ${y}` : s ? u ? !0 : `Max must be a multiple of ${y}` : `Min must be a multiple of ${y}`;
187
+ function Ht(f) {
188
+ const x = xt(f), h = se(f);
189
+ return function(i) {
190
+ const s = !(i != null && i.min) || x(i.min) === !0, u = !(i != null && i.max) || x(i.max) === !0;
191
+ return !s && !u ? `Min & max must be a multiple of ${h}` : s ? u ? !0 : `Max must be a multiple of ${h}` : `Min must be a multiple of ${h}`;
191
192
  };
192
193
  }
193
- const et = gt("netsuite-custom-field-helper", () => {
194
+ const et = ht("netsuite-custom-field-helper", () => {
194
195
  const f = Je();
195
- function h(y, a, r, s, u) {
196
- var v, o, d;
197
- if (!r) {
196
+ function x(h, r, i, s, u) {
197
+ var y, o, d;
198
+ if (!i) {
198
199
  u == null || u("Unit is not valid");
199
200
  return;
200
201
  }
201
- let _ = y.code;
202
- if (((v = y.measurement) == null ? void 0 : v.id) !== ((o = r.measurement) == null ? void 0 : o.id) && f.isEnabled) {
203
- const m = f.getItemCustomCode(a, (d = r.measurement) == null ? void 0 : d.id);
202
+ let _ = h.code;
203
+ if (((y = h.measurement) == null ? void 0 : y.id) !== ((o = i.measurement) == null ? void 0 : o.id) && f.isEnabled) {
204
+ const m = f.getItemCustomCode(r, (d = i.measurement) == null ? void 0 : d.id);
204
205
  m && (_ = m);
205
206
  }
206
207
  s({
207
- ...y,
208
- quantity: r.amount,
209
- measurement: r.measurement ?? null,
208
+ ...h,
209
+ quantity: i.amount,
210
+ measurement: i.measurement ?? null,
210
211
  code: _
211
212
  });
212
213
  }
213
214
  return {
214
- validateUnitInput: h
215
+ validateUnitInput: x
215
216
  };
216
217
  });
217
218
  var Y = /* @__PURE__ */ ((f) => (f.Code = "Code", f.Name = "Name", f.DefaultAmount = "DefaultAmount", f.Limit = "Limit", f.Step = "Step", f.Cost = "Cost", f.Delete = "Delete", f))(Y || {});
218
- function Ht(f, h = {}) {
219
- const { t: y } = me(), a = We(), r = ge(), s = st({}), u = et();
220
- Fe(() => {
221
- for (const v of f.items) {
222
- if (!v.totalCost)
219
+ function Wt(f, x = {}) {
220
+ const { t: h } = me(), r = We(), i = he(), s = st({}), u = et();
221
+ Te(() => {
222
+ for (const y of f.items) {
223
+ if (!y.totalCost)
223
224
  continue;
224
- const { cost: o } = _e.calculateDefaultCost({
225
- item: v.sku,
226
- amount: v.quantity,
227
- measurement: v.measurement,
225
+ const { cost: o } = xe.calculateDefaultCost({
226
+ item: y.sku,
227
+ amount: y.quantity,
228
+ measurement: y.measurement,
228
229
  overrides: {
229
230
  supplier: f.supplier
230
231
  },
231
232
  defaultCurrency: ct()
232
- }), d = v.totalCost ?? _e.reset();
233
- o ? s[v.sku._id] = o.amount !== d.amount || o.precision !== d.precision : s[v.sku._id] = !0;
233
+ }), d = y.totalCost ?? xe.reset();
234
+ o ? s[y.sku._id] = o.amount !== d.amount || o.precision !== d.precision : s[y.sku._id] = !0;
234
235
  }
235
236
  });
236
237
  const _ = [
237
238
  {
238
239
  id: "Code",
239
240
  header: () => Q("div", { class: "flex-col" }, [
240
- Q("div", y("inventory.transfer.form.items.table.Code")),
241
+ Q("div", h("inventory.transfer.form.items.table.Code")),
241
242
  Q(
242
243
  "div",
243
244
  { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
@@ -246,8 +247,8 @@ function Ht(f, h = {}) {
246
247
  ]),
247
248
  accessorKey: "code",
248
249
  size: 180,
249
- cell(v) {
250
- const o = v.row.original;
250
+ cell(y) {
251
+ const o = y.row.original;
251
252
  return Q("div", [
252
253
  Q(ue.FmTextField, {
253
254
  modelValue: o.code,
@@ -259,7 +260,7 @@ function Ht(f, h = {}) {
259
260
  },
260
261
  helperText: o.sku.code,
261
262
  key: o.sku._id,
262
- rules: [we()],
263
+ rules: [ke()],
263
264
  labelMark: "required"
264
265
  })
265
266
  ]);
@@ -269,7 +270,7 @@ function Ht(f, h = {}) {
269
270
  {
270
271
  id: "Name",
271
272
  header: () => Q("div", { class: "flex-col" }, [
272
- Q("div", y("inventory.transfer.form.items.table.Name")),
273
+ Q("div", h("inventory.transfer.form.items.table.Name")),
273
274
  Q(
274
275
  "div",
275
276
  { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
@@ -277,8 +278,8 @@ function Ht(f, h = {}) {
277
278
  )
278
279
  ]),
279
280
  minSize: 300,
280
- cell(v) {
281
- const o = v.row.original;
281
+ cell(y) {
282
+ const o = y.row.original;
282
283
  return Q("div", [
283
284
  Q(ue.FmTextField, {
284
285
  modelValue: o.name,
@@ -290,7 +291,7 @@ function Ht(f, h = {}) {
290
291
  },
291
292
  helperText: o.sku.name,
292
293
  key: o.sku._id,
293
- rules: [we()],
294
+ rules: [ke()],
294
295
  labelMark: "required"
295
296
  })
296
297
  ]);
@@ -299,13 +300,13 @@ function Ht(f, h = {}) {
299
300
  },
300
301
  {
301
302
  id: "DefaultAmount",
302
- header: () => y("inventory.transfer.form.items.table.DefaultAmount"),
303
+ header: () => h("inventory.transfer.form.items.table.DefaultAmount"),
303
304
  minSize: 200,
304
- cell(v) {
305
- var R;
306
- const o = v.row.original, d = a.skuById[o.sku._id], m = a.unitById[(R = d.unit) == null ? void 0 : R._id], k = m.measurements.find((U) => {
305
+ cell(y) {
306
+ var A;
307
+ const o = y.row.original, d = r.skuById[o.sku._id], m = r.unitById[(A = d.unit) == null ? void 0 : A._id], k = m.measurements.find((q) => {
307
308
  var p;
308
- return ((p = o.measurement) == null ? void 0 : p.id) === U.id;
309
+ return ((p = o.measurement) == null ? void 0 : p.id) === q.id;
309
310
  }), T = o.sku.unit._id !== d.unit._id || !m || o.measurement && !k;
310
311
  return Q(Ft, {
311
312
  style: {
@@ -319,11 +320,11 @@ function Ht(f, h = {}) {
319
320
  disabled: f.disabled,
320
321
  key: o.sku._id,
321
322
  unit: m,
322
- "onUpdate:modelValue": (U) => {
323
+ "onUpdate:modelValue": (q) => {
323
324
  u.validateUnitInput(
324
325
  o,
325
326
  d,
326
- U,
327
+ q,
327
328
  (p) => {
328
329
  f.updateItem({
329
330
  ...o,
@@ -364,9 +365,9 @@ function Ht(f, h = {}) {
364
365
  header: () => "Limit",
365
366
  // TODO: i18n,
366
367
  minSize: 280,
367
- cell(v) {
368
- const o = v.row.original;
369
- return Q(zt, {
368
+ cell(y) {
369
+ const o = y.row.original;
370
+ return Q(jt, {
370
371
  style: {
371
372
  flex: "1 1 0%"
372
373
  },
@@ -382,9 +383,9 @@ function Ht(f, h = {}) {
382
383
  d != null && d.min ? m.minimumQuantity = d.min : m.minimumQuantity = null, d != null && d.max ? m.maximumQuantity = d.max : m.maximumQuantity = null, f.updateItem(m);
383
384
  },
384
385
  rules: [
385
- jt({ max: !1 }),
386
- Yt(o.quantityStep),
387
- Qt(
386
+ Qt({ max: !1 }),
387
+ Ht(o.quantityStep),
388
+ Yt(
388
389
  +se({
389
390
  amount: 0,
390
391
  precision: be(o.sku.unit, o.measurement)
@@ -399,12 +400,12 @@ function Ht(f, h = {}) {
399
400
  },
400
401
  {
401
402
  id: "Step",
402
- header: () => y("inventory.transfer.form.items.table.Step"),
403
+ header: () => h("inventory.transfer.form.items.table.Step"),
403
404
  minSize: 100,
404
- cell(v) {
405
- const o = v.row.original;
405
+ cell(y) {
406
+ const o = y.row.original;
406
407
  return Q(ue.FmTextField, {
407
- modelValue: se(o.quantityStep ?? _e.reset(), !1),
408
+ modelValue: se(o.quantityStep ?? xe.reset(), !1),
408
409
  key: o.sku._id,
409
410
  "onUpdate:modelValue": (d) => {
410
411
  f.updateItem({
@@ -413,11 +414,11 @@ function Ht(f, h = {}) {
413
414
  });
414
415
  },
415
416
  rules: [
416
- Te({
417
+ we({
417
418
  amount: 1,
418
419
  precision: be(o.sku.unit, o.measurement)
419
420
  }),
420
- xt(o.sku.unit, o.measurement)
421
+ _t(o.sku.unit, o.measurement)
421
422
  ]
422
423
  });
423
424
  },
@@ -426,10 +427,10 @@ function Ht(f, h = {}) {
426
427
  {
427
428
  id: "Delete",
428
429
  header: "",
429
- cell(v) {
430
- const o = v.row.original;
430
+ cell(y) {
431
+ const o = y.row.original;
431
432
  return Q("div", { class: "flex items-center" }, [
432
- r.usePurchaseOrderV2 ? Q(
433
+ i.usePurchaseOrderV2 ? Q(
433
434
  ue.FmTooltip,
434
435
  {
435
436
  zIndex: 50,
@@ -496,108 +497,108 @@ function Ht(f, h = {}) {
496
497
  }
497
498
  ];
498
499
  return {
499
- columnDefs: N(() => {
500
- const v = ge(), o = [..._];
501
- if (Object.keys(h).length > 0)
502
- for (const [d, m] of Object.entries(h))
500
+ columnDefs: B(() => {
501
+ const y = he(), o = [..._];
502
+ if (Object.keys(x).length > 0)
503
+ for (const [d, m] of Object.entries(x))
503
504
  o.splice(Number(d), 0, {
504
505
  ...m,
505
506
  id: d
506
507
  });
507
- return v.enableTotalCost && f.transferType === X.enum.purchase ? o : o.filter((d) => d.id !== "Cost");
508
+ return y.enableTotalCost && f.transferType === X.enum.purchase ? o : o.filter((d) => d.id !== "Cost");
508
509
  })
509
510
  };
510
511
  }
511
- const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-center" }, Kt = { class: "flex-1 flex gap-1 items-center" }, Zt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Jt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Xt = { class: "flex gap-8 w-full" }, eo = { class: "flex-1 flex flex-col gap-4" }, to = { class: "flex-1 flex flex-col gap-4" }, oo = {
512
+ const Gt = { class: "flex flex-col gap-8 py-16" }, Kt = { class: "flex items-center" }, Zt = { class: "flex-1 flex gap-1 items-center" }, Jt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Xt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, eo = { class: "flex gap-8 w-full" }, to = { class: "flex-1 flex flex-col gap-4" }, oo = { class: "flex-1 flex flex-col gap-4" }, so = {
512
513
  key: 0,
513
514
  class: "flex gap-8 w-full"
514
- }, so = { class: "flex-1 flex flex-col gap-4" }, no = { class: "flex-1 flex flex-col gap-4" }, lo = { class: "flex gap-8 w-full" }, ao = { class: "flex-1 flex flex-col gap-4" }, ro = /* @__PURE__ */ ae({
515
+ }, no = { class: "flex-1 flex flex-col gap-4" }, lo = { class: "flex-1 flex flex-col gap-4" }, ro = { class: "flex gap-8 w-full" }, ao = { class: "flex-1 flex flex-col gap-4" }, io = /* @__PURE__ */ ae({
515
516
  __name: "TransferTemplateItem",
516
517
  props: {
517
518
  cellByColId: {},
518
519
  row: {}
519
520
  },
520
521
  setup(f) {
521
- const { t: h } = me();
522
- function y(a) {
523
- return a;
522
+ const { t: x } = me();
523
+ function h(r) {
524
+ return r;
524
525
  }
525
- return (a, r) => {
526
- var u, _, M, v, o, d, m, k, T, R, U, p, b, w, i, g, O, $, x, W, te, E, q, Z, n, l, F, P, z, G;
527
- const s = V("FmLabel");
528
- return S(), L("div", Wt, [
529
- e("div", Gt, [
530
- e("div", Kt, [
531
- e("span", Zt, " (" + I(a.row.original.sku.code) + ") ", 1),
532
- e("span", Jt, I(a.row.original.sku.name), 1)
526
+ return (r, i) => {
527
+ var u, _, $, y, o, d, m, k, T, A, q, p, c, w, a, v, S, I, g, W, te, E, U, Z, n, l, F, P, z, G;
528
+ const s = R("FmLabel");
529
+ return O(), L("div", Gt, [
530
+ t("div", Kt, [
531
+ t("div", Zt, [
532
+ t("span", Jt, " (" + M(r.row.original.sku.code) + ") ", 1),
533
+ t("span", Xt, M(r.row.original.sku.name), 1)
533
534
  ]),
534
- e("div", null, [
535
- c(t(ee), {
536
- render: (M = (_ = (u = a.cellByColId.Delete) == null ? void 0 : u.column) == null ? void 0 : _.columnDef) == null ? void 0 : M.cell,
537
- props: (o = (v = a.cellByColId.Delete) == null ? void 0 : v.getContext) == null ? void 0 : o.call(v)
535
+ t("div", null, [
536
+ b(e(ee), {
537
+ render: ($ = (_ = (u = r.cellByColId.Delete) == null ? void 0 : u.column) == null ? void 0 : _.columnDef) == null ? void 0 : $.cell,
538
+ props: (o = (y = r.cellByColId.Delete) == null ? void 0 : y.getContext) == null ? void 0 : o.call(y)
538
539
  }, null, 8, ["render", "props"])
539
540
  ])
540
541
  ]),
541
- e("div", Xt, [
542
- e("div", eo, [
543
- c(s, {
544
- label: t(h)(`inventory.transfer.form.items.table.${t(Y).Code}`)
542
+ t("div", eo, [
543
+ t("div", to, [
544
+ b(s, {
545
+ label: e(x)(`inventory.transfer.form.items.table.${e(Y).Code}`)
545
546
  }, null, 8, ["label"]),
546
- c(t(ee), {
547
- render: (k = (m = (d = a.cellByColId[t(Y).Code]) == null ? void 0 : d.column) == null ? void 0 : m.columnDef) == null ? void 0 : k.cell,
548
- props: (R = (T = a.cellByColId[t(Y).Code]) == null ? void 0 : T.getContext) == null ? void 0 : R.call(T)
547
+ b(e(ee), {
548
+ render: (k = (m = (d = r.cellByColId[e(Y).Code]) == null ? void 0 : d.column) == null ? void 0 : m.columnDef) == null ? void 0 : k.cell,
549
+ props: (A = (T = r.cellByColId[e(Y).Code]) == null ? void 0 : T.getContext) == null ? void 0 : A.call(T)
549
550
  }, null, 8, ["render", "props"]),
550
- r[0] || (r[0] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
551
+ i[0] || (i[0] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
551
552
  ]),
552
- e("div", to, [
553
- c(s, {
554
- label: t(h)(`inventory.transfer.form.items.table.${t(Y).Name}`)
553
+ t("div", oo, [
554
+ b(s, {
555
+ label: e(x)(`inventory.transfer.form.items.table.${e(Y).Name}`)
555
556
  }, null, 8, ["label"]),
556
- c(t(ee), {
557
- render: (b = (p = (U = a.cellByColId[t(Y).Name]) == null ? void 0 : U.column) == null ? void 0 : p.columnDef) == null ? void 0 : b.cell,
558
- props: (i = (w = a.cellByColId[t(Y).Name]) == null ? void 0 : w.getContext) == null ? void 0 : i.call(w)
557
+ b(e(ee), {
558
+ render: (c = (p = (q = r.cellByColId[e(Y).Name]) == null ? void 0 : q.column) == null ? void 0 : p.columnDef) == null ? void 0 : c.cell,
559
+ props: (a = (w = r.cellByColId[e(Y).Name]) == null ? void 0 : w.getContext) == null ? void 0 : a.call(w)
559
560
  }, null, 8, ["render", "props"]),
560
- r[1] || (r[1] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
561
+ i[1] || (i[1] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
561
562
  ])
562
563
  ]),
563
- a.row.original ? (S(), L("div", oo, [
564
- e("div", so, [
565
- c(s, {
566
- label: t(h)(`inventory.transfer.form.items.table.${t(Y).DefaultAmount}`)
564
+ r.row.original ? (O(), L("div", so, [
565
+ t("div", no, [
566
+ b(s, {
567
+ label: e(x)(`inventory.transfer.form.items.table.${e(Y).DefaultAmount}`)
567
568
  }, null, 8, ["label"]),
568
- c(t(ee), {
569
- render: ($ = (O = (g = a.cellByColId[t(Y).DefaultAmount]) == null ? void 0 : g.column) == null ? void 0 : O.columnDef) == null ? void 0 : $.cell,
570
- props: (W = (x = a.cellByColId[t(Y).DefaultAmount]) == null ? void 0 : x.getContext) == null ? void 0 : W.call(x)
569
+ b(e(ee), {
570
+ render: (I = (S = (v = r.cellByColId[e(Y).DefaultAmount]) == null ? void 0 : v.column) == null ? void 0 : S.columnDef) == null ? void 0 : I.cell,
571
+ props: (W = (g = r.cellByColId[e(Y).DefaultAmount]) == null ? void 0 : g.getContext) == null ? void 0 : W.call(g)
571
572
  }, null, 8, ["render", "props"]),
572
- r[2] || (r[2] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
573
+ i[2] || (i[2] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
573
574
  ]),
574
- e("div", no, [
575
- c(s, {
576
- label: t(h)(`inventory.transfer.form.items.table.${t(Y).Step}`)
575
+ t("div", lo, [
576
+ b(s, {
577
+ label: e(x)(`inventory.transfer.form.items.table.${e(Y).Step}`)
577
578
  }, null, 8, ["label"]),
578
- c(t(ee), {
579
- render: (q = (E = (te = a.cellByColId[t(Y).Step]) == null ? void 0 : te.column) == null ? void 0 : E.columnDef) == null ? void 0 : q.cell,
580
- props: (n = (Z = a.cellByColId[t(Y).Step]) == null ? void 0 : Z.getContext) == null ? void 0 : n.call(Z)
579
+ b(e(ee), {
580
+ render: (U = (E = (te = r.cellByColId[e(Y).Step]) == null ? void 0 : te.column) == null ? void 0 : E.columnDef) == null ? void 0 : U.cell,
581
+ props: (n = (Z = r.cellByColId[e(Y).Step]) == null ? void 0 : Z.getContext) == null ? void 0 : n.call(Z)
581
582
  }, null, 8, ["render", "props"]),
582
- r[3] || (r[3] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
583
+ i[3] || (i[3] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
583
584
  ])
584
585
  ])) : oe("", !0),
585
- e("div", lo, [
586
- e("div", ao, [
587
- c(s, {
588
- label: t(h)(`inventory.transfer.form.items.table.${t(Y).Limit}`)
586
+ t("div", ro, [
587
+ t("div", ao, [
588
+ b(s, {
589
+ label: e(x)(`inventory.transfer.form.items.table.${e(Y).Limit}`)
589
590
  }, null, 8, ["label"]),
590
- c(t(ee), {
591
- render: (P = (F = (l = a.cellByColId[t(Y).Limit]) == null ? void 0 : l.column) == null ? void 0 : F.columnDef) == null ? void 0 : P.cell,
592
- props: (G = (z = a.cellByColId[t(Y).Limit]) == null ? void 0 : z.getContext) == null ? void 0 : G.call(z)
591
+ b(e(ee), {
592
+ render: (P = (F = (l = r.cellByColId[e(Y).Limit]) == null ? void 0 : l.column) == null ? void 0 : F.columnDef) == null ? void 0 : P.cell,
593
+ props: (G = (z = r.cellByColId[e(Y).Limit]) == null ? void 0 : z.getContext) == null ? void 0 : G.call(z)
593
594
  }, null, 8, ["render", "props"]),
594
- r[4] || (r[4] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
595
+ i[4] || (i[4] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
595
596
  ])
596
597
  ])
597
598
  ]);
598
599
  };
599
600
  }
600
- }), io = { class: "fm-typo-en-body-md-400 line-clamp-2 w-full" }, uo = { key: 0 }, mo = ["colspan"], po = /* @__PURE__ */ ae({
601
+ }), uo = { class: "fm-typo-en-body-md-400 line-clamp-2 w-full" }, mo = { key: 0 }, po = ["colspan"], co = /* @__PURE__ */ ae({
601
602
  __name: "TransferTemplateItemTable",
602
603
  props: {
603
604
  row: {},
@@ -606,60 +607,60 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
606
607
  },
607
608
  emits: ["update:item"],
608
609
  setup(f) {
609
- function h(y) {
610
- return y.column.columnDef.meta;
610
+ function x(h) {
611
+ return h.column.columnDef.meta;
611
612
  }
612
- return (y, a) => (S(), L(pe, null, [
613
- e("tr", {
613
+ return (h, r) => (O(), L(pe, null, [
614
+ t("tr", {
614
615
  class: "hover:bg-fm-color-opacity-sm border-b border-fm-color-neutral-gray-100",
615
- style: ke({ backgroundColor: y.errorMessage ? "#ffd6d6" : void 0 })
616
+ style: _e({ backgroundColor: h.errorMessage ? "#ffd6d6" : void 0 })
616
617
  }, [
617
- (S(!0), L(pe, null, Qe(y.row.getVisibleCells(), (r) => {
618
- var s, u, _, M, v;
619
- return S(), L("td", {
620
- key: r.id,
621
- class: re(["text-fm-color-typo-primary", ((s = h(r)) == null ? void 0 : s.cellClass) ?? "px-16", "py-2"]),
622
- style: ke({
623
- width: (u = h(r)) != null && u.width ? (_ = h(r)) == null ? void 0 : _.width : r.column.getSize() !== 0 ? `${r.column.getSize()}px` : void 0,
624
- maxWidth: (M = h(r)) == null ? void 0 : M.maxWidth,
625
- textAlign: ((v = h(r)) == null ? void 0 : v.textAlign) ?? "left"
618
+ (O(!0), L(pe, null, Qe(h.row.getVisibleCells(), (i) => {
619
+ var s, u, _, $, y;
620
+ return O(), L("td", {
621
+ key: i.id,
622
+ class: le(["text-fm-color-typo-primary", ((s = x(i)) == null ? void 0 : s.cellClass) ?? "px-16", "py-2"]),
623
+ style: _e({
624
+ width: (u = x(i)) != null && u.width ? (_ = x(i)) == null ? void 0 : _.width : i.column.getSize() !== 0 ? `${i.column.getSize()}px` : void 0,
625
+ maxWidth: ($ = x(i)) == null ? void 0 : $.maxWidth,
626
+ textAlign: ((y = x(i)) == null ? void 0 : y.textAlign) ?? "left"
626
627
  })
627
628
  }, [
628
- e("span", io, [
629
- c(t(ee), {
630
- props: r.getContext(),
631
- render: r.column.columnDef.cell
629
+ t("span", uo, [
630
+ b(e(ee), {
631
+ props: i.getContext(),
632
+ render: i.column.columnDef.cell
632
633
  }, null, 8, ["props", "render"])
633
634
  ])
634
635
  ], 6);
635
636
  }), 128))
636
637
  ], 4),
637
- y.errorMessage ? (S(), L("tr", uo, [
638
- e("td", {
639
- colspan: y.row.getVisibleCells().length,
638
+ h.errorMessage ? (O(), L("tr", mo, [
639
+ t("td", {
640
+ colspan: h.row.getVisibleCells().length,
640
641
  class: "text-red-600 px-16 py-2"
641
- }, I(y.errorMessage), 9, mo)
642
+ }, M(h.errorMessage), 9, po)
642
643
  ])) : oe("", !0)
643
644
  ], 64));
644
645
  }
645
- }), co = { class: "flex flex-col gap-16" }, fo = { class: "flex flex-col gap-24" }, yo = { class: "flex flex-col gap-16" }, vo = { class: "flex items-center" }, bo = { class: "flex flex-col" }, go = { class: "flex flex-col gap-16" }, ho = { class: "flex gap-3" }, _o = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, xo = {
646
+ }), fo = { class: "flex flex-col gap-16" }, yo = { class: "flex flex-col gap-24" }, vo = { class: "flex flex-col gap-16" }, bo = { class: "flex items-center" }, ho = { class: "flex flex-col" }, go = { class: "flex flex-col gap-16" }, xo = { class: "flex gap-3" }, _o = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, ko = {
646
647
  key: 0,
647
648
  class: "border rounded-sm px-8 py-2 bg-fm-color-system-warning-100 fm-typo-en-body-lg-400"
648
- }, ko = { class: "border rounded-sm px-8 py-2 bg-fm-color-system-info-100 fm-typo-en-body-lg-400" }, wo = { class: "mb-2" }, To = /* @__PURE__ */ ae({
649
+ }, wo = { class: "border rounded-sm px-8 py-2 bg-fm-color-system-info-100 fm-typo-en-body-lg-400" }, To = { class: "mb-2" }, Fo = /* @__PURE__ */ ae({
649
650
  __name: "TransferTemplateForm",
650
651
  props: {
651
652
  modelValue: {},
652
653
  disabled: { type: Boolean }
653
654
  },
654
655
  emits: ["update:disabled"],
655
- setup(f, { expose: h, emit: y }) {
656
- const a = f, r = y, s = Ze(), { t: u } = me(), _ = H({}), M = Ge(), v = We(), o = $t(), d = ge(), m = Je(), k = et();
657
- Ce(
656
+ setup(f, { expose: x, emit: h }) {
657
+ const r = f, i = h, s = Ze(), { t: u } = me(), _ = H({}), $ = Ge(), y = We(), o = St(), d = he(), m = Je(), k = et();
658
+ Fe(
658
659
  () => s.purchaseOrder.items.length,
659
660
  () => {
660
661
  _.value = {};
661
662
  }
662
- ), M.watchLocation(async () => {
663
+ ), $.watchLocation(async () => {
663
664
  location && (s.purchaseOrder.supplier || (s.purchaseOrder.supplier = o.suppliers.find((n) => n) ?? s.purchaseOrder.supplier));
664
665
  });
665
666
  const T = Dt(
@@ -670,7 +671,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
670
671
  supplier: n.supplier ?? (s == null ? void 0 : s.purchaseOrder.supplier)
671
672
  };
672
673
  }
673
- ), R = N({
674
+ ), A = B({
674
675
  get() {
675
676
  var n, l;
676
677
  return typeof ((l = (n = s.purchaseOrder) == null ? void 0 : n.supplier) == null ? void 0 : l.internal) == "string" ? X.enum.transfer : X.enum.purchase;
@@ -680,7 +681,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
680
681
  const l = typeof ((P = (F = s.purchaseOrder) == null ? void 0 : F.supplier) == null ? void 0 : P.internal) == "string" ? X.enum.transfer : X.enum.purchase;
681
682
  n !== l && (s.purchaseOrder.supplier = n === X.enum.purchase ? T.locationOptionsTypePurchase.value[0] : T.locationOptionsTypeTransfer.value[0]);
682
683
  }
683
- }), U = N(() => T.transferLocationOptions.value), p = N({
684
+ }), q = B(() => T.transferLocationOptions.value), p = B({
684
685
  get() {
685
686
  var n;
686
687
  return (n = s.purchaseOrder.supplier) == null ? void 0 : n._id;
@@ -689,20 +690,20 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
689
690
  T.transferLocationModel.value = n;
690
691
  }
691
692
  });
692
- async function b() {
693
+ async function c() {
693
694
  const n = await m.checkCustomFieldCodes({
694
695
  beforeStart: async () => {
695
- r("update:disabled", !0);
696
+ i("update:disabled", !0);
696
697
  },
697
698
  templateItems: s.purchaseOrder.items
698
699
  });
699
- _.value = n, r("update:disabled", !1);
700
+ _.value = n, i("update:disabled", !1);
700
701
  }
701
702
  const {
702
703
  promptSelectLocations: w,
703
- columnDefs: i,
704
- rowData: g
705
- } = Ot({
704
+ columnDefs: a,
705
+ rowData: v
706
+ } = $t({
706
707
  getLocations() {
707
708
  return s.locations;
708
709
  },
@@ -710,36 +711,36 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
710
711
  s.locations = n;
711
712
  }
712
713
  });
713
- function O() {
714
+ function S() {
714
715
  var n, l;
715
716
  return (n = s.locations) != null && n.find((F) => {
716
717
  var P, z;
717
718
  return ((P = F.doc) == null ? void 0 : P._id) === ((z = s.purchaseOrder.supplier) == null ? void 0 : z._id);
718
719
  }) ? `Location ${(l = s.purchaseOrder.supplier) == null ? void 0 : l.name} must be removed because template cannot be used to transfer to itself.` : !0;
719
720
  }
720
- const $ = N({
721
+ const I = B({
721
722
  get() {
722
723
  return s.purchaseOrder.remark ?? void 0;
723
724
  },
724
725
  set(n) {
725
726
  s.purchaseOrder.remark = n;
726
727
  }
727
- }), x = H();
728
- h({
728
+ }), g = H();
729
+ x({
729
730
  validateInputs: () => {
730
731
  var n, l;
731
- (l = (n = x.value) == null ? void 0 : n.validateInputs) == null || l.call(n);
732
+ (l = (n = g.value) == null ? void 0 : n.validateInputs) == null || l.call(n);
732
733
  },
733
734
  resetInputsValidation: () => {
734
735
  var n, l;
735
- (l = (n = x.value) == null ? void 0 : n.resetInputsValidation) == null || l.call(n);
736
+ (l = (n = g.value) == null ? void 0 : n.resetInputsValidation) == null || l.call(n);
736
737
  },
737
738
  resetInputs: () => {
738
739
  var n, l;
739
- (l = (n = x.value) == null ? void 0 : n.resetInputs) == null || l.call(n);
740
+ (l = (n = g.value) == null ? void 0 : n.resetInputs) == null || l.call(n);
740
741
  }
741
742
  });
742
- const W = N(() => ({
743
+ const W = B(() => ({
743
744
  duplicateItem: (n) => {
744
745
  s.purchaseOrder.items = [
745
746
  ...s.purchaseOrder.items,
@@ -757,7 +758,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
757
758
  let l = [];
758
759
  n.id ? l = s.purchaseOrder.items.filter((F) => F.id !== n.id) : l = s.purchaseOrder.items.filter((F) => F.sku._id !== n.sku._id), s.purchaseOrder.items = l;
759
760
  }
760
- })), te = Ht(
761
+ })), te = Wt(
761
762
  {
762
763
  duplicateItem: W.value.duplicateItem,
763
764
  updateItem: W.value.updateItem,
@@ -772,7 +773,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
772
773
  return X.enum.purchase;
773
774
  },
774
775
  get disabled() {
775
- return a.disabled;
776
+ return r.disabled;
776
777
  }
777
778
  },
778
779
  m.transferTemplateColumnDefs({
@@ -788,27 +789,27 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
788
789
  });
789
790
  }
790
791
  })
791
- ), E = N(() => te.columnDefs.value), { promptSelectIngredients: q } = St();
792
+ ), E = B(() => te.columnDefs.value), { promptSelectIngredients: U } = Ot();
792
793
  async function Z() {
793
- const l = v.skus.map((D) => ({
794
+ const l = y.skus.map((D) => ({
794
795
  label: D.name,
795
796
  sublabel: D.code,
796
797
  value: D
797
798
  })).filter((D) => {
798
- var A;
799
- return (A = s.purchaseOrder.items) == null ? void 0 : A.find((K) => K.sku._id === D.value._id);
800
- }).map((D) => D.value), F = s.purchaseOrder.items ?? [], P = await q(
799
+ var V;
800
+ return (V = s.purchaseOrder.items) == null ? void 0 : V.find((K) => K.sku._id === D.value._id);
801
+ }).map((D) => D.value), F = s.purchaseOrder.items ?? [], P = await U(
801
802
  l.map((D) => D._id),
802
803
  (D) => {
803
- const A = v.skuById[D], K = F.find((j) => j.sku._id === A._id);
804
+ const V = y.skuById[D], K = F.find((j) => j.sku._id === V._id);
804
805
  if (K)
805
806
  return K;
806
- const J = { amount: 1, precision: be(A.unit) };
807
+ const J = { amount: 1, precision: be(V.unit) };
807
808
  let C = {
808
809
  id: d.usePurchaseOrderV2 ? crypto.randomUUID() : void 0,
809
- sku: A,
810
- code: A.code,
811
- name: A.name,
810
+ sku: V,
811
+ code: V.code,
812
+ name: V.name,
812
813
  quantity: J,
813
814
  minimumQuantity: J,
814
815
  // maximumQuantity: adjustmentAmountMultiplyDecimal(minimumQuantity, {
@@ -819,7 +820,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
819
820
  };
820
821
  return k.validateUnitInput(
821
822
  C,
822
- A,
823
+ V,
823
824
  {
824
825
  amount: J,
825
826
  measurement: null
@@ -833,153 +834,153 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
833
834
  if (!P) return;
834
835
  const z = P.map((D) => D.sku._id), G = [];
835
836
  for (const D of z) {
836
- const A = F.filter((K) => K.sku._id === D);
837
- if (A.length > 0)
838
- G.push(...A);
837
+ const V = F.filter((K) => K.sku._id === D);
838
+ if (V.length > 0)
839
+ G.push(...V);
839
840
  else {
840
841
  const K = P.find((J) => J.sku._id === D);
841
842
  K && G.push(K);
842
843
  }
843
844
  }
844
- G.sort((D, A) => D.sku.code.localeCompare(A.sku.code)), s.purchaseOrder.items = G;
845
+ G.sort((D, V) => D.sku.code.localeCompare(V.sku.code)), s.purchaseOrder.items = G;
845
846
  }
846
847
  return (n, l) => {
847
- const F = V("FmTextField"), P = V("FmSelect"), z = V("FmTextarea"), G = V("FmButton"), D = V("FmTable"), A = V("FmFormGroup"), K = V("FmForm");
848
- return S(), ne(K, {
848
+ const F = R("FmTextField"), P = R("FmSelect"), z = R("FmTextarea"), G = R("FmButton"), D = R("FmTable"), V = R("FmFormGroup"), K = R("FmForm");
849
+ return O(), ne(K, {
849
850
  ref_key: "formRef",
850
- ref: x,
851
+ ref: g,
851
852
  class: "flex flex-col gap-32",
852
853
  disabled: n.disabled
853
854
  }, {
854
- default: B(() => {
855
+ default: N(() => {
855
856
  var J;
856
857
  return [
857
- e("div", co, [
858
- e("div", fo, [
859
- c(F, {
860
- label: t(u)("inventory.transfer.form.name"),
858
+ t("div", fo, [
859
+ t("div", yo, [
860
+ b(F, {
861
+ label: e(u)("inventory.transfer.form.name"),
861
862
  "label-mark": "required",
862
- modelValue: t(s).name,
863
- "onUpdate:modelValue": l[0] || (l[0] = (C) => t(s).name = C),
864
- rules: [t(we)()]
863
+ modelValue: e(s).name,
864
+ "onUpdate:modelValue": l[0] || (l[0] = (C) => e(s).name = C),
865
+ rules: [e(ke)()]
865
866
  }, null, 8, ["label", "modelValue", "rules"]),
866
- c(P, {
867
- label: t(u)("inventory.transfer.form.type.title"),
868
- "model-value": R.value,
869
- "onUpdate:modelValue": l[1] || (l[1] = (C) => R.value = C),
867
+ b(P, {
868
+ label: e(u)("inventory.transfer.form.type.title"),
869
+ "model-value": A.value,
870
+ "onUpdate:modelValue": l[1] || (l[1] = (C) => A.value = C),
870
871
  items: [
871
872
  {
872
- label: t(u)("inventory.transfer.form.type.purchase"),
873
- value: t(X).enum.purchase,
874
- disabled: !t(T).locationOptionsTypePurchase.value.length,
875
- sublabel: t(T).locationOptionsTypePurchase.value.length ? void 0 : t(u)("inventory.transfer.form.noSupplierAvailable")
873
+ label: e(u)("inventory.transfer.form.type.purchase"),
874
+ value: e(X).enum.purchase,
875
+ disabled: !e(T).locationOptionsTypePurchase.value.length,
876
+ sublabel: e(T).locationOptionsTypePurchase.value.length ? void 0 : e(u)("inventory.transfer.form.noSupplierAvailable")
876
877
  },
877
878
  {
878
- label: t(u)("inventory.transfer.form.type.transfer"),
879
- value: t(X).enum.transfer,
880
- disabled: !t(T).locationOptionsTypeTransfer.value.length,
881
- sublabel: t(T).locationOptionsTypeTransfer.value.length ? void 0 : t(u)("inventory.transfer.form.noLocationAvailable")
879
+ label: e(u)("inventory.transfer.form.type.transfer"),
880
+ value: e(X).enum.transfer,
881
+ disabled: !e(T).locationOptionsTypeTransfer.value.length,
882
+ sublabel: e(T).locationOptionsTypeTransfer.value.length ? void 0 : e(u)("inventory.transfer.form.noLocationAvailable")
882
883
  }
883
884
  ],
884
- rules: [t(Te)(1)(U.value)]
885
+ rules: [e(we)(1)(q.value)]
885
886
  }, {
886
- default: B(() => [
887
- e("span", {
888
- class: re([
887
+ default: N(() => [
888
+ t("span", {
889
+ class: le([
889
890
  "line-clamp-1 fm-typo-en-body-lg-400",
890
891
  n.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
891
892
  ])
892
- }, I(t(ft)(R.value)), 3)
893
+ }, M(e(ft)(A.value)), 3)
893
894
  ]),
894
895
  _: 1
895
896
  }, 8, ["label", "model-value", "items", "rules"]),
896
- c(P, {
897
- label: R.value === t(X).enum.purchase ? t(u)("inventory.transfer.form.purchaseFrom") : t(u)("inventory.transfer.form.transferFrom"),
897
+ b(P, {
898
+ label: A.value === e(X).enum.purchase ? e(u)("inventory.transfer.form.purchaseFrom") : e(u)("inventory.transfer.form.transferFrom"),
898
899
  modelValue: p.value,
899
900
  "onUpdate:modelValue": l[2] || (l[2] = (C) => p.value = C),
900
- items: U.value
901
+ items: q.value
901
902
  }, {
902
- "menu-wrapper": B((C) => {
903
+ "menu-wrapper": N((C) => {
903
904
  var j;
904
905
  return [
905
- c(Vt, Ye(C, {
906
- items: U.value,
906
+ b(Vt, Ye(C, {
907
+ items: q.value,
907
908
  "model-value": (j = n.modelValue.purchaseOrder.supplier) == null ? void 0 : j._id
908
909
  }), null, 16, ["items", "model-value"])
909
910
  ];
910
911
  }),
911
- default: B(() => {
912
+ default: N(() => {
912
913
  var C;
913
914
  return [
914
- e("span", {
915
- class: re([
915
+ t("span", {
916
+ class: le([
916
917
  "line-clamp-1 fm-typo-en-body-lg-400",
917
918
  n.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
918
919
  ])
919
- }, I((C = U.value.find((j) => j.value === p.value)) == null ? void 0 : C.label), 3)
920
+ }, M((C = q.value.find((j) => j.value === p.value)) == null ? void 0 : C.label), 3)
920
921
  ];
921
922
  }),
922
923
  _: 1
923
924
  }, 8, ["label", "modelValue", "items"]),
924
- c(F, {
925
- label: t(u)("inventory.transfer.form.reference"),
925
+ b(F, {
926
+ label: e(u)("inventory.transfer.form.reference"),
926
927
  "label-mark": "optional",
927
- modelValue: t(s).purchaseOrder.ref,
928
- "onUpdate:modelValue": l[3] || (l[3] = (C) => t(s).purchaseOrder.ref = C)
928
+ modelValue: e(s).purchaseOrder.ref,
929
+ "onUpdate:modelValue": l[3] || (l[3] = (C) => e(s).purchaseOrder.ref = C)
929
930
  }, null, 8, ["label", "modelValue"]),
930
- c(z, {
931
- label: t(u)("inventory.transfer.form.remark"),
931
+ b(z, {
932
+ label: e(u)("inventory.transfer.form.remark"),
932
933
  "label-mark": "optional",
933
934
  "max-length": 240,
934
- modelValue: $.value,
935
- "onUpdate:modelValue": l[4] || (l[4] = (C) => $.value = C),
936
- class: re({ "text-fm-color-typo-disabled": n.disabled })
935
+ modelValue: I.value,
936
+ "onUpdate:modelValue": l[4] || (l[4] = (C) => I.value = C),
937
+ class: le({ "text-fm-color-typo-disabled": n.disabled })
937
938
  }, null, 8, ["label", "modelValue", "class"])
938
939
  ])
939
940
  ]),
940
- e("div", yo, [
941
- e("div", vo, [
942
- l[8] || (l[8] = e("div", { class: "flex-1 fm-typo-en-title-sm-600" }, "Locations", -1)),
943
- c(G, {
941
+ t("div", vo, [
942
+ t("div", bo, [
943
+ l[8] || (l[8] = t("div", { class: "flex-1 fm-typo-en-title-sm-600" }, "Locations", -1)),
944
+ b(G, {
944
945
  disabled: n.disabled,
945
946
  label: "Select location",
946
947
  "prepend-icon": "add",
947
948
  variant: "plain",
948
949
  class: "border-2 rounded-lg border-fm-color-primary",
949
- onClick: t(w)
950
+ onClick: e(w)
950
951
  }, null, 8, ["disabled", "onClick"])
951
952
  ]),
952
- c(D, {
953
- "column-defs": t(i),
954
- "row-data": t(g),
953
+ b(D, {
954
+ "column-defs": e(a),
955
+ "row-data": e(v),
955
956
  "shrink-at": 9999,
956
- onRowClick: t(w),
957
+ onRowClick: e(w),
957
958
  "hide-footer": ""
958
959
  }, null, 8, ["column-defs", "row-data", "onRowClick"]),
959
- e("div", bo, [
960
- c(A, {
960
+ t("div", ho, [
961
+ b(V, {
961
962
  "model-value": [
962
- (J = a.modelValue.purchaseOrder.supplier) == null ? void 0 : J._id,
963
- ...a.modelValue.locations ?? []
963
+ (J = r.modelValue.purchaseOrder.supplier) == null ? void 0 : J._id,
964
+ ...r.modelValue.locations ?? []
964
965
  ].join(","),
965
- rules: [O]
966
+ rules: [S]
966
967
  }, null, 8, ["model-value", "rules"])
967
968
  ])
968
969
  ]),
969
- e("div", go, [
970
- e("div", ho, [
971
- e("div", _o, I(t(u)("inventory.transfer.form.items.title")), 1),
972
- t(m).isEnabled ? (S(), ne(G, {
970
+ t("div", go, [
971
+ t("div", xo, [
972
+ t("div", _o, M(e(u)("inventory.transfer.form.items.title")), 1),
973
+ e(m).isEnabled ? (O(), ne(G, {
973
974
  key: 0,
974
975
  label: "Check NetSuite",
975
976
  "prepend-icon": "troubleshoot",
976
977
  variant: "secondary",
977
- onClick: b,
978
+ onClick: c,
978
979
  size: "md"
979
980
  })) : oe("", !0),
980
- c(G, {
981
+ b(G, {
981
982
  disabled: n.disabled,
982
- label: t(u)("inventory.transfer.form.items.addItem"),
983
+ label: e(u)("inventory.transfer.form.items.addItem"),
983
984
  "prepend-icon": "add",
984
985
  variant: "plain",
985
986
  class: "border-2 rounded-lg border-fm-color-primary",
@@ -987,44 +988,44 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
987
988
  size: "md"
988
989
  }, null, 8, ["disabled", "label"])
989
990
  ]),
990
- t(m).isEnabled ? (S(), L("div", xo, l[9] || (l[9] = [
991
- le(" NetSuite is enabled. "),
992
- e("ul", { style: { "list-style": "initial", "margin-left": "20px" } }, [
993
- e("li", null, ' When adding new item or changing UOM, the first match available custom code (if any) will be applied to "Code" for each item by default. '),
994
- e("li", null, ' You can also choose to change the code by selecting from the "NetSuite" button in each row. ')
991
+ e(m).isEnabled ? (O(), L("div", ko, l[9] || (l[9] = [
992
+ re(" NetSuite is enabled. "),
993
+ t("ul", { style: { "list-style": "initial", "margin-left": "20px" } }, [
994
+ t("li", null, ' When adding new item or changing UOM, the first match available custom code (if any) will be applied to "Code" for each item by default. '),
995
+ t("li", null, ' You can also choose to change the code by selecting from the "NetSuite" button in each row. ')
995
996
  ], -1),
996
- e("p", { class: "fm-typo-en-body-lg-600 mt-2" }, " If you use custom code for certain items, please make sure that the custom code is correct before saving the template. ", -1)
997
+ t("p", { class: "fm-typo-en-body-lg-600 mt-2" }, " If you use custom code for certain items, please make sure that the custom code is correct before saving the template. ", -1)
997
998
  ]))) : oe("", !0),
998
- e("div", ko, [
999
- e("p", wo, [
1000
- le(' Set "' + I(t(u)("inventory.transfer.form.items.table.DefaultAmount")) + '" to "0" to mark the item as ', 1),
1001
- l[10] || (l[10] = e("b", null, "optional", -1)),
1002
- l[11] || (l[11] = le(" when creating an order request. "))
999
+ t("div", wo, [
1000
+ t("p", To, [
1001
+ re(' Set "' + M(e(u)("inventory.transfer.form.items.table.DefaultAmount")) + '" to "0" to mark the item as ', 1),
1002
+ l[10] || (l[10] = t("b", null, "optional", -1)),
1003
+ l[11] || (l[11] = re(" when creating an order request. "))
1003
1004
  ]),
1004
- l[12] || (l[12] = e("p", null, ' You can leave "Max" empty to remove the limit on the maximum quantity of the item when creating an order request. ', -1))
1005
+ l[12] || (l[12] = t("p", null, ' You can leave "Max" empty to remove the limit on the maximum quantity of the item when creating an order request. ', -1))
1005
1006
  ]),
1006
- (S(), ne(D, {
1007
+ (O(), ne(D, {
1007
1008
  "column-defs": E.value,
1008
- "row-data": t(s).purchaseOrder.items,
1009
- key: t(s).purchaseOrder.items.map((C) => C.sku._id).join("."),
1009
+ "row-data": e(s).purchaseOrder.items,
1010
+ key: e(s).purchaseOrder.items.map((C) => C.sku._id).join("."),
1010
1011
  "hide-footer": "",
1011
- "page-size": t(s).purchaseOrder.items.length
1012
+ "page-size": e(s).purchaseOrder.items.length
1012
1013
  }, {
1013
- "table-row": B((C) => [
1014
- c(po, {
1014
+ "table-row": N((C) => [
1015
+ b(co, {
1015
1016
  row: C,
1016
1017
  errorMessage: _.value[C.index],
1017
1018
  "onUpdate:item": l[6] || (l[6] = (j) => W.value.updateItem(j)),
1018
1019
  disabled: n.disabled
1019
1020
  }, null, 8, ["row", "errorMessage", "disabled"])
1020
1021
  ]),
1021
- "list-row": B((C) => [
1022
- (S(), ne(Xe, {
1022
+ "list-row": N((C) => [
1023
+ (O(), ne(Xe, {
1023
1024
  row: C,
1024
- key: t(s).purchaseOrder.items.map((j) => j.sku._id).join(".")
1025
+ key: e(s).purchaseOrder.items.map((j) => j.sku._id).join(".")
1025
1026
  }, {
1026
- default: B((j) => [
1027
- c(ro, {
1027
+ default: N((j) => [
1028
+ b(io, {
1028
1029
  row: C,
1029
1030
  "cell-by-col-id": j,
1030
1031
  "onUpdate:item": l[7] || (l[7] = (ie) => W.value.updateItem(ie)),
@@ -1036,9 +1037,9 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1036
1037
  ]),
1037
1038
  _: 1
1038
1039
  }, 8, ["column-defs", "row-data", "page-size"])),
1039
- c(A, {
1040
- "model-value": t(s).purchaseOrder.items.length,
1041
- rules: [t(Te)(1)]
1040
+ b(V, {
1041
+ "model-value": e(s).purchaseOrder.items.length,
1042
+ rules: [e(we)(1)]
1042
1043
  }, null, 8, ["model-value", "rules"])
1043
1044
  ])
1044
1045
  ];
@@ -1047,62 +1048,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1047
1048
  }, 8, ["disabled"]);
1048
1049
  };
1049
1050
  }
1050
- }), Fo = { class: "flex w-full" }, Co = /* @__PURE__ */ ae({
1051
- __name: "FmConfirmationButton",
1052
- props: {
1053
- label: {},
1054
- loading: { type: Boolean },
1055
- confirmTitle: {},
1056
- confirmMessage: {}
1057
- },
1058
- emits: ["confirm"],
1059
- setup(f, { emit: h }) {
1060
- const y = f, a = h, r = H(!1);
1061
- function s() {
1062
- r.value = !1, a("confirm");
1063
- }
1064
- return (u, _) => {
1065
- const M = V("FmButton"), v = V("FmDialog");
1066
- return S(), L("div", null, [
1067
- c(M, {
1068
- label: y.label,
1069
- loading: y.loading,
1070
- onClick: _[0] || (_[0] = (o) => r.value = !0)
1071
- }, null, 8, ["label", "loading"]),
1072
- c(v, {
1073
- modelValue: r.value,
1074
- "onUpdate:modelValue": _[2] || (_[2] = (o) => r.value = o),
1075
- overlay: !0
1076
- }, {
1077
- "dialog-header": B(() => [
1078
- e("div", null, I(y.confirmTitle || "Confirm"), 1)
1079
- ]),
1080
- "dialog-footer": B(() => [
1081
- e("div", Fo, [
1082
- c(M, {
1083
- label: "Cancel",
1084
- variant: "tertiary",
1085
- onClick: _[1] || (_[1] = (o) => r.value = !1)
1086
- }),
1087
- c(M, {
1088
- class: "ml-auto",
1089
- label: "Confirm",
1090
- variant: "primary",
1091
- onClick: s
1092
- })
1093
- ])
1094
- ]),
1095
- default: B(() => [
1096
- xe(u.$slots, "dialog-content", {}, () => [
1097
- le(I(y.confirmMessage || "Are you sure you want to proceed?"), 1)
1098
- ])
1099
- ]),
1100
- _: 3
1101
- }, 8, ["modelValue"])
1102
- ]);
1103
- };
1104
- }
1105
- }), Io = { class: "flex items-center" }, Mo = { class: "fm-typo-en-title-md-800" }, $o = { class: "flex gap-4" }, So = /* @__PURE__ */ ae({
1051
+ }), Co = { class: "flex items-center" }, Io = { class: "fm-typo-en-title-md-800" }, Mo = { class: "flex gap-4" }, So = /* @__PURE__ */ ae({
1106
1052
  __name: "TransferTemplateDialog",
1107
1053
  props: /* @__PURE__ */ Le({
1108
1054
  mode: {},
@@ -1113,10 +1059,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1113
1059
  disabledModifiers: {}
1114
1060
  }),
1115
1061
  emits: /* @__PURE__ */ Le(["update:show", "submitted"], ["update:disabled"]),
1116
- setup(f, { expose: h, emit: y }) {
1062
+ setup(f, { expose: x, emit: h }) {
1117
1063
  var w;
1118
- const a = f, r = y, s = At(), u = vt(), { t: _ } = me(), M = Ke(a, "show");
1119
- function v() {
1064
+ const r = f, i = h, s = At(), u = vt(), { t: _ } = me(), $ = Ke(r, "show");
1065
+ function y() {
1120
1066
  return {
1121
1067
  _id: "",
1122
1068
  name: "",
@@ -1146,16 +1092,16 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1146
1092
  }
1147
1093
  };
1148
1094
  }
1149
- const o = H(a.modelValue ?? v()), d = H(((w = a.modelValue) == null ? void 0 : w._id) ?? `${Math.random()}`);
1150
- Ce(
1151
- () => a.show,
1152
- (i) => {
1153
- var g;
1154
- i && (o.value = a.modelValue ?? v(), d.value = ((g = a.modelValue) == null ? void 0 : g._id) ?? `${Math.random()}`);
1095
+ const o = H(r.modelValue ?? y()), d = H(((w = r.modelValue) == null ? void 0 : w._id) ?? `${Math.random()}`);
1096
+ Fe(
1097
+ () => r.show,
1098
+ (a) => {
1099
+ var v;
1100
+ a && (o.value = r.modelValue ?? y(), d.value = ((v = r.modelValue) == null ? void 0 : v._id) ?? `${Math.random()}`);
1155
1101
  }
1156
1102
  );
1157
- const m = nt(f, "disabled"), k = N(() => {
1158
- switch (a.mode) {
1103
+ const m = nt(f, "disabled"), k = B(() => {
1104
+ switch (r.mode) {
1159
1105
  case de.READ:
1160
1106
  return "";
1161
1107
  case de.CREATE:
@@ -1165,129 +1111,129 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1165
1111
  }
1166
1112
  return "";
1167
1113
  }), T = H();
1168
- h({
1114
+ x({
1169
1115
  validateInputs: () => {
1170
- var i, g;
1171
- (g = (i = T.value) == null ? void 0 : i.validateInputs) == null || g.call(i);
1116
+ var a, v;
1117
+ (v = (a = T.value) == null ? void 0 : a.validateInputs) == null || v.call(a);
1172
1118
  },
1173
1119
  resetInputsValidation: () => {
1174
- var i, g;
1175
- (g = (i = T.value) == null ? void 0 : i.resetInputsValidation) == null || g.call(i);
1120
+ var a, v;
1121
+ (v = (a = T.value) == null ? void 0 : a.resetInputsValidation) == null || v.call(a);
1176
1122
  },
1177
1123
  resetInputs: () => {
1178
- var i, g;
1179
- (g = (i = T.value) == null ? void 0 : i.resetInputs) == null || g.call(i);
1124
+ var a, v;
1125
+ (v = (a = T.value) == null ? void 0 : a.resetInputs) == null || v.call(a);
1180
1126
  }
1181
1127
  });
1182
- async function R() {
1183
- var g, O;
1184
- const i = o.value;
1185
- if (i) {
1186
- m.value = !0, (((g = i.purchaseOrder.supplier) == null ? void 0 : g.internal) === ye.enum.warehouse || ((O = i.purchaseOrder.supplier) == null ? void 0 : O.internal) === ye.enum.restaurant) && (i.purchaseOrder.items = i.purchaseOrder.items.map(
1187
- ({ totalCost: $, ...x }) => x
1128
+ async function A() {
1129
+ var v, S;
1130
+ const a = o.value;
1131
+ if (a) {
1132
+ m.value = !0, (((v = a.purchaseOrder.supplier) == null ? void 0 : v.internal) === ye.enum.warehouse || ((S = a.purchaseOrder.supplier) == null ? void 0 : S.internal) === ye.enum.restaurant) && (a.purchaseOrder.items = a.purchaseOrder.items.map(
1133
+ ({ totalCost: I, ...g }) => g
1188
1134
  ));
1189
1135
  try {
1190
- await s.createTemplate(i), await new Promise(($) => setTimeout($, 1e3)), u.open({
1136
+ await s.createTemplate(a), await new Promise((I) => setTimeout(I, 1e3)), u.open({
1191
1137
  title: _("inventory.transfer.template.create.success"),
1192
1138
  message: _("inventory.transfer.template.create.successMessage"),
1193
1139
  type: "success"
1194
- }), r("update:show", !1), r("submitted");
1195
- } catch ($) {
1140
+ }), i("update:show", !1), i("submitted");
1141
+ } catch (I) {
1196
1142
  u.open({
1197
1143
  title: _("inventory.transfer.template.create.error"),
1198
1144
  message: _("inventory.transfer.template.create.errorMessage"),
1199
1145
  type: "error"
1200
- }), console.error("Error in creating transfer template", $);
1146
+ }), console.error("Error in creating transfer template", I);
1201
1147
  } finally {
1202
1148
  m.value = !1;
1203
1149
  }
1204
1150
  }
1205
1151
  }
1206
- async function U() {
1207
- var g, O;
1208
- const i = o.value;
1209
- if (i) {
1210
- m.value = !0, (((g = i.purchaseOrder.supplier) == null ? void 0 : g.internal) === ye.enum.warehouse || ((O = i.purchaseOrder.supplier) == null ? void 0 : O.internal) === ye.enum.restaurant) && (i.purchaseOrder.items = i.purchaseOrder.items.map(
1211
- ({ totalCost: $, ...x }) => x
1152
+ async function q() {
1153
+ var v, S;
1154
+ const a = o.value;
1155
+ if (a) {
1156
+ m.value = !0, (((v = a.purchaseOrder.supplier) == null ? void 0 : v.internal) === ye.enum.warehouse || ((S = a.purchaseOrder.supplier) == null ? void 0 : S.internal) === ye.enum.restaurant) && (a.purchaseOrder.items = a.purchaseOrder.items.map(
1157
+ ({ totalCost: I, ...g }) => g
1212
1158
  ));
1213
1159
  try {
1214
- await s.updateTemplate(i), await new Promise(($) => setTimeout($, 1e3)), u.open({
1160
+ await s.updateTemplate(a), await new Promise((I) => setTimeout(I, 1e3)), u.open({
1215
1161
  title: _("inventory.transfer.template.update.success"),
1216
1162
  message: _("inventory.transfer.template.update.successMessage"),
1217
1163
  type: "success"
1218
- }), r("update:show", !1), r("submitted");
1219
- } catch ($) {
1164
+ }), i("update:show", !1), i("submitted");
1165
+ } catch (I) {
1220
1166
  u.open({
1221
1167
  title: _("inventory.transfer.template.update.error"),
1222
1168
  message: _("inventory.transfer.template.update.errorMessage"),
1223
1169
  type: "error"
1224
- }), console.error("Error in updating transfer template", $);
1170
+ }), console.error("Error in updating transfer template", I);
1225
1171
  } finally {
1226
1172
  m.value = !1;
1227
1173
  }
1228
1174
  }
1229
1175
  }
1230
1176
  function p() {
1231
- switch (a.mode) {
1177
+ switch (r.mode) {
1232
1178
  case de.CREATE:
1233
- return R();
1179
+ return A();
1234
1180
  case de.UPDATE:
1235
- return U();
1181
+ return q();
1236
1182
  }
1237
1183
  }
1238
- function b() {
1239
- var i, g;
1240
- (g = (i = T.value) == null ? void 0 : i.validateInputs) == null || g.call(i);
1184
+ function c() {
1185
+ var a, v;
1186
+ (v = (a = T.value) == null ? void 0 : a.validateInputs) == null || v.call(a);
1241
1187
  }
1242
- return (i, g) => {
1243
- const O = V("FmButton"), $ = V("FmSideSheet");
1244
- return S(), ne($, {
1245
- modelValue: t(M),
1246
- "onUpdate:modelValue": g[3] || (g[3] = (x) => He(M) ? M.value = x : null),
1188
+ return (a, v) => {
1189
+ const S = R("FmButton"), I = R("FmSideSheet");
1190
+ return O(), ne(I, {
1191
+ modelValue: e($),
1192
+ "onUpdate:modelValue": v[3] || (v[3] = (g) => He($) ? $.value = g : null),
1247
1193
  "dismiss-away": "",
1248
1194
  "close-button": "",
1249
1195
  "max-width": 1600
1250
1196
  }, {
1251
- "side-sheet-header": B(() => [
1252
- e("div", Io, [
1253
- e("div", Mo, I(k.value), 1)
1197
+ "side-sheet-header": N(() => [
1198
+ t("div", Co, [
1199
+ t("div", Io, M(k.value), 1)
1254
1200
  ])
1255
1201
  ]),
1256
- default: B(() => [
1257
- (S(), ne(To, {
1202
+ default: N(() => [
1203
+ (O(), ne(Fo, {
1258
1204
  class: "w-full",
1259
1205
  ref_key: "formRef",
1260
1206
  ref: T,
1261
1207
  onValidationSuccess: p,
1262
1208
  "model-value": o.value,
1263
- "onUpdate:modelValue": g[0] || (g[0] = (x) => o.value = x),
1209
+ "onUpdate:modelValue": v[0] || (v[0] = (g) => o.value = g),
1264
1210
  disabled: m.value,
1265
- "onUpdate:disabled": g[1] || (g[1] = (x) => m.value = x),
1211
+ "onUpdate:disabled": v[1] || (v[1] = (g) => m.value = g),
1266
1212
  key: d.value
1267
1213
  }, null, 8, ["model-value", "disabled"]))
1268
1214
  ]),
1269
- "side-sheet-footer": B(() => [
1270
- e("div", $o, [
1271
- c(Co, {
1215
+ "side-sheet-footer": N(() => [
1216
+ t("div", Mo, [
1217
+ b(Rt, {
1272
1218
  loading: m.value,
1273
- label: t(_)("common.save"),
1274
- "confirm-title": `Save ${a.mode === t(de).CREATE ? "Template" : "Changes"}`,
1275
- onConfirm: b
1219
+ label: e(_)("common.save"),
1220
+ "confirm-title": `Save ${r.mode === e(de).CREATE ? "Template" : "Changes"}`,
1221
+ onConfirm: c
1276
1222
  }, {
1277
- "dialog-content": B(() => g[4] || (g[4] = [
1278
- e("div", { class: "fm-typo-en-body-md-400 bg-fm-color-primary-oats p-8 rounded" }, [
1279
- le(" Warning: This action "),
1280
- e("span", { class: "text-fm-color-system-error-300" }, "will not"),
1281
- le(" create or update any order request, but only a template. ")
1223
+ "dialog-content": N(() => v[4] || (v[4] = [
1224
+ t("div", { class: "fm-typo-en-body-md-400 bg-fm-color-primary-oats p-8 rounded" }, [
1225
+ re(" Warning: This action "),
1226
+ t("span", { class: "text-fm-color-system-error-300" }, "will not"),
1227
+ re(" create or update any order request, but only a template. ")
1282
1228
  ], -1)
1283
1229
  ])),
1284
1230
  _: 1
1285
1231
  }, 8, ["loading", "label", "confirm-title"]),
1286
- c(O, {
1232
+ b(S, {
1287
1233
  disabled: m.value,
1288
1234
  variant: "tertiary",
1289
- label: t(_)("common.close"),
1290
- onClick: g[2] || (g[2] = (x) => r("update:show", !1))
1235
+ label: e(_)("common.close"),
1236
+ onClick: v[2] || (v[2] = (g) => i("update:show", !1))
1291
1237
  }, null, 8, ["disabled", "label"])
1292
1238
  ])
1293
1239
  ]),
@@ -1295,103 +1241,103 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1295
1241
  }, 8, ["modelValue"]);
1296
1242
  };
1297
1243
  }
1298
- }), Oo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, Do = { class: "flex justify-between" }, Vo = { class: "fm-typo-en-body-lg-600" }, Ao = { class: "fm-status-badge fm-status-badge-info-secondary" }, Ro = { class: "flex flex-col gap-8" }, Bo = { class: "flex flex-col gap-4" }, Uo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, qo = { class: "flex gap-1" }, Po = { class: "fm-typo-en-body-lg-600" }, Lo = {
1244
+ }), Oo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, $o = { class: "flex justify-between" }, Do = { class: "fm-typo-en-body-lg-600" }, Vo = { class: "fm-status-badge fm-status-badge-info-secondary" }, Ao = { class: "flex flex-col gap-8" }, Ro = { class: "flex flex-col gap-4" }, qo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Uo = { class: "flex gap-1" }, Po = { class: "fm-typo-en-body-lg-600" }, Bo = {
1299
1245
  key: 0,
1300
1246
  class: "flex flex-col gap-4"
1301
- }, No = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Eo = { class: "flex gap-1" }, zo = { class: "fm-typo-en-body-lg-600" }, jo = {
1247
+ }, Lo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, No = { class: "flex gap-1" }, Eo = { class: "fm-typo-en-body-lg-600" }, zo = {
1302
1248
  key: 1,
1303
1249
  class: "flex flex-col gap-4"
1304
- }, Qo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Yo = { class: "fm-typo-en-body-lg-600" }, Ho = {
1250
+ }, jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qo = { class: "fm-typo-en-body-lg-600" }, Yo = {
1305
1251
  key: 2,
1306
1252
  class: "flex flex-col gap-4"
1307
- }, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Go = { class: "fm-typo-en-body-lg-600" }, Ko = {
1253
+ }, Ho = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Wo = { class: "fm-typo-en-body-lg-600" }, Go = {
1308
1254
  key: 3,
1309
1255
  class: "flex flex-col gap-4"
1310
- }, Zo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Jo = { class: "fm-typo-en-body-lg-600" }, Xo = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, es = { class: "flex flex-col gap-8" }, ts = { class: "fm-typo-en-body-lg-600" }, os = { class: "flex w-full gap-4" }, ss = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, ns = { class: "fm-typo-en-body-lg-600 shrink-0" }, ls = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, as = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, rs = {
1256
+ }, Ko = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Zo = { class: "fm-typo-en-body-lg-600" }, Jo = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Xo = { class: "flex flex-col gap-8" }, es = { class: "fm-typo-en-body-lg-600" }, ts = { class: "flex w-full gap-4" }, os = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, ss = { class: "fm-typo-en-body-lg-600 shrink-0" }, ns = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, ls = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, rs = {
1311
1257
  key: 0,
1312
1258
  class: "shrink-0 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
1313
- }, is = {
1259
+ }, as = {
1314
1260
  key: 0,
1315
1261
  class: "flex gap-4 items-center"
1316
- }, us = { class: "flex flex-col gap-12" }, ds = { class: "flex flex-col gap-8" }, ms = { class: "flex gap-8 xs:flex-col" }, ps = /* @__PURE__ */ ae({
1262
+ }, is = { class: "flex flex-col gap-12" }, us = { class: "flex flex-col gap-8" }, ds = { class: "flex gap-8 xs:flex-col" }, ms = /* @__PURE__ */ ae({
1317
1263
  __name: "TransferTemplateDetails",
1318
1264
  props: {
1319
1265
  template: {},
1320
1266
  show: { type: Boolean }
1321
1267
  },
1322
1268
  emits: ["update:show", "action:edit"],
1323
- setup(f, { emit: h }) {
1324
- const y = f, a = h, r = ge(), { t: s } = me(), u = N(() => {
1269
+ setup(f, { emit: x }) {
1270
+ const h = f, r = x, i = he(), { t: s } = me(), u = B(() => {
1325
1271
  var m;
1326
- return (m = y.template) == null ? void 0 : m.purchaseOrder;
1272
+ return (m = h.template) == null ? void 0 : m.purchaseOrder;
1327
1273
  }), _ = [
1328
1274
  { accessorKey: "name", header: () => "Name" },
1329
1275
  { accessorKey: "type", header: () => "Type" }
1330
- ], M = H(""), v = N(
1276
+ ], $ = H(""), y = B(
1331
1277
  () => {
1332
- var m, k, T, R;
1333
- return ((k = (m = u.value) == null ? void 0 : m.supplier) == null ? void 0 : k.internal) === "restaurant" || ((R = (T = u.value) == null ? void 0 : T.supplier) == null ? void 0 : R.internal) === "warehouse" ? X.enum.transfer : X.enum.purchase;
1278
+ var m, k, T, A;
1279
+ return ((k = (m = u.value) == null ? void 0 : m.supplier) == null ? void 0 : k.internal) === "restaurant" || ((A = (T = u.value) == null ? void 0 : T.supplier) == null ? void 0 : A.internal) === "warehouse" ? X.enum.transfer : X.enum.purchase;
1334
1280
  }
1335
- ), o = H(!0), d = Ke(y, "show");
1281
+ ), o = H(!0), d = Ke(h, "show");
1336
1282
  return (m, k) => {
1337
- var g;
1338
- const T = V("FmMenuDivider"), R = V("FmCard"), U = V("FmIcon"), p = V("FmTextField"), b = V("FmTable"), w = V("FmButton"), i = V("FmSideSheet");
1339
- return S(), ne(i, {
1340
- header: t(s)("inventory.transfer.template.details.view", { template: (g = m.template) == null ? void 0 : g.name }),
1341
- modelValue: t(d),
1342
- "onUpdate:modelValue": k[2] || (k[2] = (O) => He(d) ? d.value = O : null),
1283
+ var v;
1284
+ const T = R("FmMenuDivider"), A = R("FmCard"), q = R("FmIcon"), p = R("FmTextField"), c = R("FmTable"), w = R("FmButton"), a = R("FmSideSheet");
1285
+ return O(), ne(a, {
1286
+ header: e(s)("inventory.transfer.template.details.view", { template: (v = m.template) == null ? void 0 : v.name }),
1287
+ modelValue: e(d),
1288
+ "onUpdate:modelValue": k[2] || (k[2] = (S) => He(d) ? d.value = S : null),
1343
1289
  "dismiss-away": o.value,
1344
1290
  "close-button": "",
1345
1291
  "max-width": 1200
1346
1292
  }, {
1347
- default: B(() => {
1348
- var O, $;
1293
+ default: N(() => {
1294
+ var S, I;
1349
1295
  return [
1350
- e("div", Oo, [
1351
- e("div", null, [
1352
- c(R, {
1296
+ t("div", Oo, [
1297
+ t("div", null, [
1298
+ b(A, {
1353
1299
  variant: "outlined",
1354
1300
  class: "flex flex-col gap-8 px-12 py-16"
1355
1301
  }, {
1356
- default: B(() => {
1357
- var x, W, te, E, q, Z, n, l, F;
1302
+ default: N(() => {
1303
+ var g, W, te, E, U, Z, n, l, F;
1358
1304
  return [
1359
- e("div", Do, [
1360
- e("div", Vo, I(t(s)("inventory.transfer.template.details.templateSummary")), 1),
1361
- e("div", Ao, I(t(s)(
1362
- `inventory.transfer.receiveRequest.details.type.${v.value.toLocaleLowerCase("en-US")}`
1305
+ t("div", $o, [
1306
+ t("div", Do, M(e(s)("inventory.transfer.template.details.templateSummary")), 1),
1307
+ t("div", Vo, M(e(s)(
1308
+ `inventory.transfer.receiveRequest.details.type.${y.value.toLocaleLowerCase("en-US")}`
1363
1309
  )), 1)
1364
1310
  ]),
1365
- c(T),
1366
- e("div", Ro, [
1367
- e("div", Bo, [
1368
- e("div", Uo, [
1369
- e("div", qo, I(t(s)("inventory.transfer.receiveRequest.details.createdAt")), 1)
1311
+ b(T),
1312
+ t("div", Ao, [
1313
+ t("div", Ro, [
1314
+ t("div", qo, [
1315
+ t("div", Uo, M(e(s)("inventory.transfer.receiveRequest.details.createdAt")), 1)
1370
1316
  ]),
1371
- e("div", Po, I(t(Rt)(((x = m.template) == null ? void 0 : x._id) ?? "")), 1)
1317
+ t("div", Po, M(e(qt)(((g = m.template) == null ? void 0 : g._id) ?? "")), 1)
1372
1318
  ]),
1373
- (W = m.template) != null && W.updatedAt ? (S(), L("div", Lo, [
1374
- e("div", No, [
1375
- e("div", Eo, I(t(s)("inventory.transfer.receiveRequest.details.updatedAt")), 1)
1319
+ (W = m.template) != null && W.updatedAt ? (O(), L("div", Bo, [
1320
+ t("div", Lo, [
1321
+ t("div", No, M(e(s)("inventory.transfer.receiveRequest.details.updatedAt")), 1)
1376
1322
  ]),
1377
- e("div", zo, [
1378
- le(I(t(Bt)(new Date(m.template.updatedAt))) + " ", 1),
1379
- (te = m.template.updatedBy) != null && te.name ? (S(), L(pe, { key: 0 }, [
1380
- le(" (" + I(m.template.updatedBy.name) + ") ", 1)
1323
+ t("div", Eo, [
1324
+ re(M(e(Ut)(new Date(m.template.updatedAt))) + " ", 1),
1325
+ (te = m.template.updatedBy) != null && te.name ? (O(), L(pe, { key: 0 }, [
1326
+ re(" (" + M(m.template.updatedBy.name) + ") ", 1)
1381
1327
  ], 64)) : oe("", !0)
1382
1328
  ])
1383
1329
  ])) : oe("", !0),
1384
- (q = (E = u.value) == null ? void 0 : E.supplier) != null && q.name ? (S(), L("div", jo, [
1385
- e("div", Qo, I(t(s)("inventory.transfer.receiveRequest.details.from")), 1),
1386
- e("div", Yo, I((n = (Z = u.value) == null ? void 0 : Z.supplier) == null ? void 0 : n.name), 1)
1330
+ (U = (E = u.value) == null ? void 0 : E.supplier) != null && U.name ? (O(), L("div", zo, [
1331
+ t("div", jo, M(e(s)("inventory.transfer.receiveRequest.details.from")), 1),
1332
+ t("div", Qo, M((n = (Z = u.value) == null ? void 0 : Z.supplier) == null ? void 0 : n.name), 1)
1387
1333
  ])) : oe("", !0),
1388
- (l = u.value) != null && l.ref ? (S(), L("div", Ho, [
1389
- e("div", Wo, I(t(s)("inventory.transfer.receiveRequest.details.reference")), 1),
1390
- e("div", Go, I(u.value.ref), 1)
1334
+ (l = u.value) != null && l.ref ? (O(), L("div", Yo, [
1335
+ t("div", Ho, M(e(s)("inventory.transfer.receiveRequest.details.reference")), 1),
1336
+ t("div", Wo, M(u.value.ref), 1)
1391
1337
  ])) : oe("", !0),
1392
- (F = u.value) != null && F.remark ? (S(), L("div", Ko, [
1393
- e("div", Zo, I(t(s)("inventory.transfer.receiveRequest.details.remark")), 1),
1394
- e("div", Jo, I(u.value.remark), 1)
1338
+ (F = u.value) != null && F.remark ? (O(), L("div", Go, [
1339
+ t("div", Ko, M(e(s)("inventory.transfer.receiveRequest.details.remark")), 1),
1340
+ t("div", Zo, M(u.value.remark), 1)
1395
1341
  ])) : oe("", !0)
1396
1342
  ])
1397
1343
  ];
@@ -1399,64 +1345,64 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1399
1345
  _: 1
1400
1346
  })
1401
1347
  ]),
1402
- e("div", Xo, [
1403
- e("div", es, [
1404
- e("div", ts, I(t(s)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
1405
- (S(!0), L(pe, null, Qe(((O = u.value) == null ? void 0 : O.items) ?? [], (x) => (S(), L("div", {
1406
- key: x.code,
1348
+ t("div", Jo, [
1349
+ t("div", Xo, [
1350
+ t("div", es, M(e(s)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
1351
+ (O(!0), L(pe, null, Qe(((S = u.value) == null ? void 0 : S.items) ?? [], (g) => (O(), L("div", {
1352
+ key: g.code,
1407
1353
  class: "flex flex-col"
1408
1354
  }, [
1409
- e("div", os, [
1410
- e("div", ss, I(x.name), 1),
1411
- k[3] || (k[3] = e("div", { class: "flex-1 min-w-32" }, null, -1)),
1412
- e("div", ns, I(t(dt)(x.quantity, x.sku.unit, x.measurement)), 1)
1355
+ t("div", ts, [
1356
+ t("div", os, M(g.name), 1),
1357
+ k[3] || (k[3] = t("div", { class: "flex-1 min-w-32" }, null, -1)),
1358
+ t("div", ss, M(e(dt)(g.quantity, g.sku.unit, g.measurement)), 1)
1413
1359
  ]),
1414
- e("div", ls, [
1415
- e("div", as, I(x.code), 1),
1416
- x.totalCost && t(r).enableTotalCost ? (S(), L("div", rs, " (" + I(t(Tt)(x.totalCost)) + ") ", 1)) : oe("", !0)
1360
+ t("div", ns, [
1361
+ t("div", ls, M(g.code), 1),
1362
+ g.totalCost && e(i).enableTotalCost ? (O(), L("div", rs, " (" + M(e(Tt)(g.totalCost)) + ") ", 1)) : oe("", !0)
1417
1363
  ]),
1418
- t(mt)(x) ? (S(), L("div", is, [
1419
- c(U, {
1364
+ e(mt)(g) ? (O(), L("div", as, [
1365
+ b(q, {
1420
1366
  name: "error",
1421
1367
  color: "system-error-300",
1422
1368
  size: "sm"
1423
1369
  }),
1424
- k[4] || (k[4] = e("div", { class: "fm-typo-en-body-sm-400 text-fm-color-system-error-400" }, " This item has invalid unit configuration. Apply update on this item. ", -1))
1370
+ k[4] || (k[4] = t("div", { class: "fm-typo-en-body-sm-400 text-fm-color-system-error-400" }, " This item has invalid unit configuration. Apply update on this item. ", -1))
1425
1371
  ])) : oe("", !0)
1426
1372
  ]))), 128))
1427
1373
  ])
1428
1374
  ]),
1429
- k[6] || (k[6] = e("div", null, null, -1)),
1430
- k[7] || (k[7] = e("div", null, null, -1)),
1431
- e("div", us, [
1432
- k[5] || (k[5] = e("div", { class: "flex flex-col" }, [
1433
- e("div", { class: "fm-typo-en-body-lg-600" }, "Enabled locations"),
1434
- e("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " This template is only usable for the following locations. ")
1375
+ k[6] || (k[6] = t("div", null, null, -1)),
1376
+ k[7] || (k[7] = t("div", null, null, -1)),
1377
+ t("div", is, [
1378
+ k[5] || (k[5] = t("div", { class: "flex flex-col" }, [
1379
+ t("div", { class: "fm-typo-en-body-lg-600" }, "Enabled locations"),
1380
+ t("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " This template is only usable for the following locations. ")
1435
1381
  ], -1)),
1436
- e("div", ds, [
1437
- c(p, {
1438
- modelValue: M.value,
1439
- "onUpdate:modelValue": k[0] || (k[0] = (x) => M.value = x),
1382
+ t("div", us, [
1383
+ b(p, {
1384
+ modelValue: $.value,
1385
+ "onUpdate:modelValue": k[0] || (k[0] = (g) => $.value = g),
1440
1386
  placeholder: "Filter locations",
1441
1387
  "prepend-icon": "search"
1442
1388
  }, null, 8, ["modelValue"]),
1443
- c(b, {
1389
+ b(c, {
1444
1390
  "hide-footer": "",
1445
1391
  style: { height: "500px" },
1446
1392
  "column-defs": _,
1447
- "search-value": M.value,
1448
- "row-data": (($ = y.template) == null ? void 0 : $.locations) ?? [{ name: "All locations" }]
1393
+ "search-value": $.value,
1394
+ "row-data": ((I = h.template) == null ? void 0 : I.locations) ?? [{ name: "All locations" }]
1449
1395
  }, null, 8, ["search-value", "row-data"])
1450
1396
  ])
1451
1397
  ])
1452
1398
  ])
1453
1399
  ];
1454
1400
  }),
1455
- "side-sheet-footer": B(() => [
1456
- e("div", ms, [
1457
- c(w, {
1458
- label: t(s)("common.edit"),
1459
- onClick: k[1] || (k[1] = (O) => a("action:edit")),
1401
+ "side-sheet-footer": N(() => [
1402
+ t("div", ds, [
1403
+ b(w, {
1404
+ label: e(s)("common.edit"),
1405
+ onClick: k[1] || (k[1] = (S) => r("action:edit")),
1460
1406
  variant: "tertiary"
1461
1407
  }, null, 8, ["label"])
1462
1408
  ])
@@ -1465,128 +1411,128 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1465
1411
  }, 8, ["header", "modelValue", "dismiss-away"]);
1466
1412
  };
1467
1413
  }
1468
- }), cs = { class: "flex-1 flex flex-col gap-8" }, fs = { class: "flex flex-col" }, ys = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, vs = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, bs = { class: "fm-typo-en-body-lg-400" }, gs = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, hs = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Qs = /* @__PURE__ */ ae({
1414
+ }), ps = { class: "flex-1 flex flex-col gap-8" }, cs = { class: "flex flex-col" }, fs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ys = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, vs = { class: "fm-typo-en-body-lg-400" }, bs = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, hs = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Qs = /* @__PURE__ */ ae({
1469
1415
  __name: "TransferTemplateView",
1470
1416
  setup(f) {
1471
- const { t: h } = me(), { createTemplate: y, viewTemplate: a, importTemplates: r, exportTemplates: s } = Ne(), { templateDialogProps: u, templateDetailsProps: _ } = ze(Ne()), M = pt(), { loading: v, templates: o } = ze(M), d = H(!1), m = it(), k = Ge(), { breakpoints: T } = bt();
1472
- Fe(M.fetchTemplates);
1473
- const R = N(
1474
- () => d.value || v.value || !k._currentLocation
1475
- ), U = N(() => o.value), p = H(""), b = N(() => T.value.xs || T.value.sm), w = N(() => b.value ? 10 : 20);
1476
- function i($) {
1477
- switch ($) {
1417
+ const { t: x } = me(), { createTemplate: h, viewTemplate: r, importTemplates: i, exportTemplates: s } = Ne(), { templateDialogProps: u, templateDetailsProps: _ } = ze(Ne()), $ = pt(), { loading: y, templates: o } = ze($), d = H(!1), m = it(), k = Ge(), { breakpoints: T } = bt();
1418
+ Te($.fetchTemplates);
1419
+ const A = B(
1420
+ () => d.value || y.value || !k._currentLocation
1421
+ ), q = B(() => o.value), p = H(""), c = B(() => T.value.xs || T.value.sm), w = B(() => c.value ? 10 : 20);
1422
+ function a(I) {
1423
+ switch (I) {
1478
1424
  case Ee.Add:
1479
- return y();
1425
+ return h();
1480
1426
  case "refresh":
1481
- return M.fetchTemplates();
1427
+ return $.fetchTemplates();
1482
1428
  case "import":
1483
- return r();
1429
+ return i();
1484
1430
  case "export":
1485
1431
  return s();
1486
1432
  }
1487
1433
  }
1488
- function g($) {
1489
- return $;
1434
+ function v(I) {
1435
+ return I;
1490
1436
  }
1491
- const O = N(() => [
1437
+ const S = B(() => [
1492
1438
  {
1493
- label: h("inventory.closing.template.create.title"),
1439
+ label: x("inventory.closing.template.create.title"),
1494
1440
  value: Ee.Add,
1495
1441
  isPrimary: !0,
1496
1442
  prependIcon: "add"
1497
1443
  },
1498
1444
  {
1499
- label: h("inventory.common.refresh"),
1445
+ label: x("inventory.common.refresh"),
1500
1446
  value: "refresh",
1501
1447
  isPrimary: !1
1502
1448
  },
1503
1449
  {
1504
- label: h("inventory.common.import"),
1450
+ label: x("inventory.common.import"),
1505
1451
  value: "import",
1506
1452
  isPrimary: !1
1507
1453
  },
1508
1454
  {
1509
- label: h("inventory.common.export"),
1455
+ label: x("inventory.common.export"),
1510
1456
  value: "export",
1511
1457
  isPrimary: !1
1512
1458
  }
1513
1459
  ]);
1514
- return ($, x) => {
1515
- const W = V("FmTable");
1516
- return S(), L(pe, null, [
1517
- c(ut, {
1518
- title: t(h)("inventory.transfer.template.title2"),
1519
- actions: O.value,
1520
- "onClick:action": i
1460
+ return (I, g) => {
1461
+ const W = R("FmTable");
1462
+ return O(), L(pe, null, [
1463
+ b(ut, {
1464
+ title: e(x)("inventory.transfer.template.title2"),
1465
+ actions: S.value,
1466
+ "onClick:action": a
1521
1467
  }, {
1522
- default: B(() => {
1468
+ default: N(() => {
1523
1469
  var te;
1524
1470
  return [
1525
- e("div", {
1526
- class: re([
1471
+ t("div", {
1472
+ class: le([
1527
1473
  "flex flex-col gap-8 max-h-full",
1528
1474
  {
1529
- "p-0": b.value,
1530
- "px-24 ": !b.value
1475
+ "p-0": c.value,
1476
+ "px-24 ": !c.value
1531
1477
  }
1532
1478
  ])
1533
1479
  }, [
1534
- c(yt, {
1480
+ b(yt, {
1535
1481
  searchable: "",
1536
1482
  search: p.value,
1537
- "onUpdate:search": x[0] || (x[0] = (E) => p.value = E)
1483
+ "onUpdate:search": g[0] || (g[0] = (E) => p.value = E)
1538
1484
  }, null, 8, ["search"]),
1539
- (S(), ne(W, {
1540
- style: ke(t(m).tableHeight),
1541
- "column-defs": t(M).columnDefs,
1542
- "row-data": U.value,
1485
+ (O(), ne(W, {
1486
+ style: _e(e(m).tableHeight),
1487
+ "column-defs": e($).columnDefs,
1488
+ "row-data": q.value,
1543
1489
  "search-value": p.value,
1544
- loading: R.value,
1545
- key: (te = t(k)._currentLocation) == null ? void 0 : te.dbName,
1546
- onRowClick: x[1] || (x[1] = (E) => t(a)(E.original)),
1490
+ loading: A.value,
1491
+ key: (te = e(k)._currentLocation) == null ? void 0 : te.dbName,
1492
+ onRowClick: g[1] || (g[1] = (E) => e(r)(E.original)),
1547
1493
  "page-size": w.value
1548
1494
  }, {
1549
- "list-row": B((E) => [
1550
- c(Xe, {
1495
+ "list-row": N((E) => [
1496
+ b(Xe, {
1551
1497
  row: E,
1552
- onRowClick: (q) => t(a)(q)
1498
+ onRowClick: (U) => e(r)(U)
1553
1499
  }, {
1554
- default: B((q) => {
1555
- var Z, n, l, F, P, z, G, D, A, K, J, C, j, ie, Ie, Me, $e, Se, Oe, De, ce, Ve, Ae, Re, Be, fe, Ue;
1500
+ default: N((U) => {
1501
+ var Z, n, l, F, P, z, G, D, V, K, J, C, j, ie, Ce, Ie, Me, Se, Oe, $e, ce, De, Ve, Ae, Re, fe, qe;
1556
1502
  return [
1557
- e("div", cs, [
1558
- e("div", fs, [
1559
- e("div", ys, [
1560
- c(t(ee), {
1561
- render: (l = (n = (Z = q._id) == null ? void 0 : Z.column) == null ? void 0 : n.columnDef) == null ? void 0 : l.cell,
1562
- props: (P = (F = q._id) == null ? void 0 : F.getContext) == null ? void 0 : P.call(F)
1503
+ t("div", ps, [
1504
+ t("div", cs, [
1505
+ t("div", fs, [
1506
+ b(e(ee), {
1507
+ render: (l = (n = (Z = U._id) == null ? void 0 : Z.column) == null ? void 0 : n.columnDef) == null ? void 0 : l.cell,
1508
+ props: (P = (F = U._id) == null ? void 0 : F.getContext) == null ? void 0 : P.call(F)
1563
1509
  }, null, 8, ["render", "props"])
1564
1510
  ]),
1565
- e("div", vs, [
1566
- c(t(ee), {
1567
- render: (D = (G = (z = q.name) == null ? void 0 : z.column) == null ? void 0 : G.columnDef) == null ? void 0 : D.cell,
1568
- props: (K = (A = q.name) == null ? void 0 : A.getContext) == null ? void 0 : K.call(A)
1511
+ t("div", ys, [
1512
+ b(e(ee), {
1513
+ render: (D = (G = (z = U.name) == null ? void 0 : z.column) == null ? void 0 : G.columnDef) == null ? void 0 : D.cell,
1514
+ props: (K = (V = U.name) == null ? void 0 : V.getContext) == null ? void 0 : K.call(V)
1569
1515
  }, null, 8, ["render", "props"])
1570
1516
  ]),
1571
- e("div", bs, [
1572
- c(t(ee), {
1573
- render: (j = (C = (J = q.supplier) == null ? void 0 : J.column) == null ? void 0 : C.columnDef) == null ? void 0 : j.cell,
1574
- props: (Ie = (ie = q.supplier) == null ? void 0 : ie.getContext) == null ? void 0 : Ie.call(ie)
1517
+ t("div", vs, [
1518
+ b(e(ee), {
1519
+ render: (j = (C = (J = U.supplier) == null ? void 0 : J.column) == null ? void 0 : C.columnDef) == null ? void 0 : j.cell,
1520
+ props: (Ce = (ie = U.supplier) == null ? void 0 : ie.getContext) == null ? void 0 : Ce.call(ie)
1575
1521
  }, null, 8, ["render", "props"])
1576
1522
  ]),
1577
- e("div", null, I((Me = E.original.locations) != null && Me.length ? `Enabled for ${($e = E.original.locations) == null ? void 0 : $e.length} outlets` : "Enabled for all outlets"), 1),
1578
- e("div", gs, I(E.original.purchaseOrder.items.length ? E.original.purchaseOrder.items.map((tt) => tt.name).join(", ") : "No items"), 1),
1579
- e("div", hs, [
1580
- c(t(ee), {
1581
- render: (De = (Oe = (Se = q.ref) == null ? void 0 : Se.column) == null ? void 0 : Oe.columnDef) == null ? void 0 : De.cell,
1582
- props: (Ve = (ce = q.ref) == null ? void 0 : ce.getContext) == null ? void 0 : Ve.call(ce)
1523
+ t("div", null, M((Ie = E.original.locations) != null && Ie.length ? `Enabled for ${(Me = E.original.locations) == null ? void 0 : Me.length} outlets` : "Enabled for all outlets"), 1),
1524
+ t("div", bs, M(E.original.purchaseOrder.items.length ? E.original.purchaseOrder.items.map((tt) => tt.name).join(", ") : "No items"), 1),
1525
+ t("div", hs, [
1526
+ b(e(ee), {
1527
+ render: ($e = (Oe = (Se = U.ref) == null ? void 0 : Se.column) == null ? void 0 : Oe.columnDef) == null ? void 0 : $e.cell,
1528
+ props: (De = (ce = U.ref) == null ? void 0 : ce.getContext) == null ? void 0 : De.call(ce)
1583
1529
  }, null, 8, ["render", "props"])
1584
1530
  ])
1585
1531
  ]),
1586
- e("div", null, [
1587
- c(t(ee), {
1588
- render: (Be = (Re = (Ae = q.type) == null ? void 0 : Ae.column) == null ? void 0 : Re.columnDef) == null ? void 0 : Be.cell,
1589
- props: (Ue = (fe = q.type) == null ? void 0 : fe.getContext) == null ? void 0 : Ue.call(fe)
1532
+ t("div", null, [
1533
+ b(e(ee), {
1534
+ render: (Re = (Ae = (Ve = U.type) == null ? void 0 : Ve.column) == null ? void 0 : Ae.columnDef) == null ? void 0 : Re.cell,
1535
+ props: (qe = (fe = U.type) == null ? void 0 : fe.getContext) == null ? void 0 : qe.call(fe)
1590
1536
  }, null, 8, ["render", "props"])
1591
1537
  ])
1592
1538
  ])
@@ -1602,10 +1548,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1602
1548
  }),
1603
1549
  _: 1
1604
1550
  }, 8, ["title", "actions"]),
1605
- (S(), ne(lt, { to: "body" }, [
1606
- c(ps, at(rt(t(_))), null, 16),
1607
- c(So, Ye(t(u), {
1608
- onSubmitted: x[2] || (x[2] = (te) => t(M).fetchTemplates())
1551
+ (O(), ne(lt, { to: "body" }, [
1552
+ b(ms, rt(at(e(_))), null, 16),
1553
+ b(So, Ye(e(u), {
1554
+ onSubmitted: g[2] || (g[2] = (te) => e($).fetchTemplates())
1609
1555
  }), null, 16)
1610
1556
  ]))
1611
1557
  ], 64);