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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/{App-EK7lJDXt.js → App-DsW9zwH-.js} +3 -3
  2. package/dist/{ApprovalView-5wa67Pp2.js → ApprovalView-Dvyp3wel.js} +5 -5
  3. package/dist/{BindingsDialog-DNvqgfca.js → BindingsDialog-YBp__WSV.js} +2 -2
  4. package/dist/{BindingsPicker-B0In-fby.js → BindingsPicker-DlBjt-Ba.js} +2 -2
  5. package/dist/{BindingsTable-Dnj3lmqy.js → BindingsTable-CTRzUUB-.js} +3 -3
  6. package/dist/ClosingDraftView-6c7X_KiP.js +2410 -0
  7. package/dist/{ClosingHistoryView-CIzyFAlH.js → ClosingHistoryView-bOwlkF4Q.js} +3 -3
  8. package/dist/{ClosingTemplateView-6HX9oUcC.js → ClosingTemplateView-CA-f8FAh.js} +14 -14
  9. package/dist/{DeliveryOrderPrintPreview-MWn3Ar1T.js → DeliveryOrderPrintPreview-DmjK4cj3.js} +1 -1
  10. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C7YYLOYE.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B813CRxg.js} +4 -4
  11. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CQiU_sGW.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-lgr6bbOW.js} +2 -2
  12. package/dist/{FmMultiselectDialog-BkjI4JGz.js → FmMultiselectDialog-26pdE-k-.js} +1 -1
  13. package/dist/{FmMultiselectDialog-CtiU1Dtg.js → FmMultiselectDialog-72g5JwZ9.js} +2 -2
  14. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-LyzPCbxS.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CQAnQxH8.js} +3 -3
  15. package/dist/{ImportView-7iS_eKvv.js → ImportView-4mjAMfeB.js} +6 -6
  16. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BgY8Q64y.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CDodN-Rh.js} +1 -1
  17. package/dist/{IngredientGroupView-_U4bC7ki.js → IngredientGroupView-DmcHEj63.js} +5 -5
  18. package/dist/{IngredientsView-vNdlqPpT.js → IngredientsView-BDPANb85.js} +14 -14
  19. package/dist/{IntegrationView-cWl5050X.js → IntegrationView-pyqYL2jb.js} +12 -12
  20. package/dist/{InventoryBindingForm-Bze5ZhbJ.js → InventoryBindingForm-DSbRfb3F.js} +1 -1
  21. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CouXpFs-.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-KfPb4N5d.js} +4 -4
  22. package/dist/{InventoryBindingSummary-4bU5QfqT.js → InventoryBindingSummary-BcGBSNvn.js} +1 -1
  23. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BpELQhv-.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Dgauy-iB.js} +1 -1
  24. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CG5hkfB7.js → PremiumBadge.vue_vue_type_script_setup_true_lang-B53Hy6EY.js} +2 -2
  25. package/dist/{PublishView-Dl2oTfzU.js → PublishView-CJBqs89f.js} +3 -3
  26. package/dist/{PurchaseOrderPrintPreview-GQjxju0E.js → PurchaseOrderPrintPreview-BKvf3c7F.js} +1 -1
  27. package/dist/{ReceiveRequestView-B9aW_X5r.js → ReceiveRequestView-DwclAVDm.js} +18 -18
  28. package/dist/{RecipeView-BRtYb-YG.js → RecipeView-CYIOyih-.js} +8 -8
  29. package/dist/{StockView-BA2ZFlTp.js → StockView-loAHU_aR.js} +15 -15
  30. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-g4FkX2mO.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CNIpGt9s.js} +1 -1
  31. package/dist/{SupplierView-CmvDHCn1.js → SupplierView-D0h-AaRw.js} +11 -11
  32. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-COP5SYtT.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-D1UE7aKR.js} +2 -2
  33. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Cs93Vtov.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DhqGYaf-.js} +1 -1
  34. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-De-0zviY.js → TransferDetails.vue_vue_type_script_setup_true_lang-D-g6cXC3.js} +14 -14
  35. package/dist/{TransferTemplateView-CJnlocMY.js → TransferTemplateView-dvekbFPc.js} +412 -412
  36. package/dist/{UnitView-BL9YToD9.js → UnitView-BJPDHJ1t.js} +6 -6
  37. package/dist/{WarehouseView-C83stFZt.js → WarehouseView-DfBC9bn5.js} +5 -5
  38. package/dist/{WastageTemplateView-BBZH-mKL.js → WastageTemplateView-D7txOfrr.js} +14 -14
  39. package/dist/{app-C41vbTKc.js → app-DZ9CIN-l.js} +22 -22
  40. package/dist/app.js +1 -1
  41. package/dist/{closing-template-Cgnip54N.js → closing-template-Bhuuo6RL.js} +1 -1
  42. package/dist/{date2-CMZo42ry.js → date2-D0I4_co0.js} +1 -1
  43. package/dist/{dayjs.min-VxvOpK4l.js → dayjs.min-DyYDX3Ns.js} +1 -1
  44. package/dist/{decimal-Bny34Eba.js → decimal-CpLUQcWa.js} +2 -2
  45. package/dist/{defineDeepModel-BAFlxgb7.js → defineDeepModel-CBc_F4eu.js} +1 -1
  46. package/dist/{duplicate-template-BtuFXv7t.js → duplicate-template-BIMQgrkD.js} +1 -1
  47. package/dist/{feature-DLwvVno7.js → feature-CjK6Ds77.js} +2 -2
  48. package/dist/{format-time-from-id-CZXW775p.js → format-time-from-id-9kP1kaTe.js} +1 -1
  49. package/dist/{format-unit-display-DuO3ios0.js → format-unit-display-De_mv7m7.js} +10 -10
  50. package/dist/{import-export.helper-C_pu3Vto.js → import-export.helper-BcEjyb3B.js} +5 -5
  51. package/dist/{index-B0PBI5Di.js → index-B1bw59a2.js} +1 -1
  52. package/dist/{index-GSUBHLP8.js → index-BcRb-JAY.js} +3 -3
  53. package/dist/{index-BprWbUJy.js → index-CJRR1JAe.js} +1 -1
  54. package/dist/{lodash-hzb22w2h.js → lodash-AfG_nKQX.js} +1 -1
  55. package/dist/{netsuite-yK572svg.js → netsuite-d7P730Bm.js} +3 -3
  56. package/dist/{purchase-order-template-CAmTt86P.js → purchase-order-template-J9nWMrS2.js} +1 -1
  57. package/dist/{rules-D2ifX1qj.js → rules-9v8VtDWl.js} +3 -3
  58. package/dist/{stock-BS7XBKNg.js → stock-C2_qYIxU.js} +1 -1
  59. package/dist/{stock-S6w8LDdV.js → stock-Cjj5e8_a.js} +3 -3
  60. package/dist/{supplier-CAFKaGyu.js → supplier-Ds2vZ4qg.js} +2 -2
  61. package/dist/tsconfig.app.tsbuildinfo +1 -1
  62. package/dist/{use-ingredient-select-dialog-DuNV0Qev.js → use-ingredient-select-dialog-CAKpgkQ9.js} +2 -2
  63. package/dist/{use-inventory-binding-dialog-CXnHmvy1.js → use-inventory-binding-dialog-D98L2Cuv.js} +2 -2
  64. package/dist/{use-template-enabled-locations-2-gzV64awF.js → use-template-enabled-locations-2-DrUrir8n.js} +2 -2
  65. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftApprovalDialog.vue.d.ts +2 -10
  66. package/dist/{vue-i18n-ChDJFBbd.js → vue-i18n-CNwuZJlQ.js} +258 -258
  67. package/dist/{xlsx-RW9YZaa8.js → xlsx-BfWdatQl.js} +1 -1
  68. package/dist/{xlsx.util-D-mF9Cdj.js → xlsx.util-sMO_ulne.js} +1 -1
  69. package/package.json +3 -3
  70. package/dist/ClosingDraftView-DMeJEGFR.js +0 -2372
@@ -1,26 +1,26 @@
1
- import { defineComponent as ae, onMounted as Te, computed as N, ref as H, watch as Fe, inject as ot, resolveComponent as V, openBlock as S, createElementBlock as L, createElementVNode as e, createVNode as m, withCtx as B, renderSlot as _e, withDirectives as Ue, normalizeClass as re, vModelText as qe, reactive as st, h as Q, toDisplayString as M, unref as t, createCommentVNode as oe, Fragment as pe, normalizeStyle as xe, renderList as Qe, createBlock as le, mergeProps as Ye, createTextVNode as ne, mergeModels as Pe, useModel as lt, isRef as He, Teleport as nt, normalizeProps as at, guardReactiveProps as rt } from "vue";
1
+ import { defineComponent as ae, onMounted as Te, computed as N, ref as H, watch as Fe, inject as ot, resolveComponent as V, openBlock as S, createElementBlock as L, createElementVNode as e, createVNode as c, withCtx as B, renderSlot as _e, withDirectives as Ue, normalizeClass as re, vModelText as qe, reactive as st, h as Q, toDisplayString as I, unref as t, createCommentVNode as oe, Fragment as pe, normalizeStyle as xe, renderList as Qe, createBlock as ne, mergeProps as Ye, createTextVNode as le, mergeModels as Pe, useModel as nt, isRef as He, Teleport as lt, normalizeProps as at, guardReactiveProps as rt } from "vue";
2
2
  import { u as it, _ as ut } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
3
3
  import { useI18n as me } from "@feedmepos/mf-common";
4
- import { f as dt, t as mt, u as Le, a as pt } from "./format-unit-display-DuO3ios0.js";
4
+ import { f as dt, t as mt, u as Le, a as pt } from "./format-unit-display-De_mv7m7.js";
5
5
  import { R as Ne } from "./row-action.enum-BcW_L_nE.js";
6
- import { a as We, s as Ee, t as X, u as Ge, v as ct, k as ye } from "./app-C41vbTKc.js";
7
- import { _ as ft } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CQiU_sGW.js";
6
+ import { a as We, s as Ee, t as X, u as Ge, v as ct, k as ye } from "./app-DZ9CIN-l.js";
7
+ import { _ as ft } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-lgr6bbOW.js";
8
8
  import { components as ue, useSnackbar as yt, useProxiedModel as Ke, useBreakpoints as vt } from "@feedmepos/ui-library";
9
9
  import { defineStore as bt, storeToRefs as ze } from "pinia";
10
10
  import { F as de } from "./form-mode.enum-BKiNVH6A.js";
11
- import { u as he, t as je, I as gt, b as ht, n as _t, a as se, c as xt, R as ke, g as be, d as ve, A as we, M as kt, e as wt } from "./rules-D2ifX1qj.js";
12
- import { d as Ze } from "./defineDeepModel-BAFlxgb7.js";
13
- import { _ as Tt, F as Ft, a as Ct, b as It } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-LyzPCbxS.js";
14
- import { u as ge } from "./feature-DLwvVno7.js";
15
- import { c as Mt, u as $t, _ as St } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C7YYLOYE.js";
16
- import { u as Je } from "./netsuite-yK572svg.js";
17
- import { u as Ot } from "./supplier-CAFKaGyu.js";
18
- import { u as Dt } from "./use-ingredient-select-dialog-DuNV0Qev.js";
11
+ import { u as he, t as je, I as gt, b as ht, n as _t, a as se, c as xt, R as ke, g as be, d as ve, A as we, M as kt, e as wt } from "./rules-9v8VtDWl.js";
12
+ import { d as Ze } from "./defineDeepModel-CBc_F4eu.js";
13
+ import { _ as Tt, F as Ft, a as Ct, b as It } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-CQAnQxH8.js";
14
+ import { u as ge } from "./feature-CjK6Ds77.js";
15
+ import { c as Mt, u as $t, _ as St } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B813CRxg.js";
16
+ import { u as Je } from "./netsuite-d7P730Bm.js";
17
+ import { u as Ot } from "./supplier-Ds2vZ4qg.js";
18
+ import { u as Dt } from "./use-ingredient-select-dialog-CAKpgkQ9.js";
19
19
  import { F as ee, _ as Xe } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-cfFHDIwQ.js";
20
- import { u as Vt } from "./use-template-enabled-locations-2-gzV64awF.js";
21
- import { u as At } from "./purchase-order-template-CAmTt86P.js";
22
- import { f as Rt } from "./format-time-from-id-CZXW775p.js";
23
- import { f as Bt } from "./date2-CMZo42ry.js";
20
+ import { u as Vt } from "./use-template-enabled-locations-2-DrUrir8n.js";
21
+ import { u as At } from "./purchase-order-template-J9nWMrS2.js";
22
+ import { f as Rt } from "./format-time-from-id-9kP1kaTe.js";
23
+ import { f as Bt } from "./date2-D0I4_co0.js";
24
24
  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({
25
25
  __name: "FmMinMaxInput",
26
26
  props: {
@@ -58,41 +58,41 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Pt = { c
58
58
  helperText: {},
59
59
  helperState: {}
60
60
  },
61
- setup(p) {
62
- const h = p, v = Ze("modelValue"), a = gt();
61
+ setup(f) {
62
+ const h = f, y = Ze("modelValue"), a = gt();
63
63
  Te(() => {
64
- const { min: d, max: y } = v ?? {};
65
- if (!(!d || !y) && d.precision !== y.precision) {
66
- const w = Math.max(d.precision, y.precision), i = he(d, w), g = he(y, w);
67
- v.min = i, v.max = g;
64
+ const { min: p, max: b } = y ?? {};
65
+ if (!(!p || !b) && p.precision !== b.precision) {
66
+ const w = Math.max(p.precision, b.precision), i = he(p, w), g = he(b, w);
67
+ y.min = i, y.max = g;
68
68
  }
69
69
  });
70
70
  const r = N(() => {
71
- const { min: d, max: y } = v ?? {};
72
- return Math.max((d == null ? void 0 : d.precision) ?? 0, (y == null ? void 0 : y.precision) ?? 0, h.precision ?? 0);
73
- }), s = (d) => {
74
- if (!d) return "";
75
- const y = ht(d), w = r.value, i = he(y, w);
71
+ const { min: p, max: b } = y ?? {};
72
+ return Math.max((p == null ? void 0 : p.precision) ?? 0, (b == null ? void 0 : b.precision) ?? 0, h.precision ?? 0);
73
+ }), s = (p) => {
74
+ if (!p) return "";
75
+ const b = ht(p), w = r.value, i = he(b, w);
76
76
  return _t(
77
77
  +se(i),
78
78
  i.precision
79
79
  );
80
- }, u = H(s(v.min)), _ = H(s(v.max));
81
- Fe([u, _], ([d, y]) => {
82
- const w = v ?? {}, i = a(d), g = a(y), O = r.value;
83
- if (d !== "" && i === !0) {
84
- const $ = je(+d, O);
80
+ }, u = H(s(y.min)), _ = H(s(y.max));
81
+ Fe([u, _], ([p, b]) => {
82
+ const w = y ?? {}, i = a(p), g = a(b), O = r.value;
83
+ if (p !== "" && i === !0) {
84
+ const $ = je(+p, O);
85
85
  w.min = $;
86
86
  } else
87
87
  w.min = null;
88
- if (y !== "" && g === !0) {
89
- const $ = je(+y, O);
88
+ if (b !== "" && g === !0) {
89
+ const $ = je(+b, O);
90
90
  w.max = $;
91
91
  } else
92
92
  w.max = null;
93
- v.min = w.min, v.max = w.max;
93
+ y.min = w.min, y.max = w.max;
94
94
  });
95
- const C = Symbol.for("fm:form-state"), c = ot(C, null), o = N(() => h.disabled ?? (c == null ? void 0 : c.getDisabled()) ?? !1), f = H(), b = H(), k = H(!1), T = H(!1), R = N(() => k.value || T.value), U = N(() => [...[
95
+ 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(() => [...[
96
96
  function() {
97
97
  return typeof a(u.value) == "string" || typeof a(_.value) == "string" ? "Must be a number" : !0;
98
98
  },
@@ -100,31 +100,31 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Pt = { c
100
100
  return !w || !w.min || !w.max ? !0 : +se(w.min) > +se(w.max) ? "Min must be less than or equal to max" : !0;
101
101
  }
102
102
  ], ...h.rules ?? []]);
103
- return (d, y) => {
103
+ return (p, b) => {
104
104
  const w = V("FmLabel"), i = V("FmField"), g = V("FmFormGroup");
105
105
  return S(), L("div", Ut, [
106
106
  e("div", qt, [
107
107
  e("div", Pt, [
108
- m(w, {
109
- label: d.label,
110
- disabled: d.disabled,
111
- required: d.labelMark === "required",
112
- optional: d.labelMark === "optional"
108
+ c(w, {
109
+ label: p.label,
110
+ disabled: p.disabled,
111
+ required: p.labelMark === "required",
112
+ optional: p.labelMark === "optional"
113
113
  }, null, 8, ["label", "disabled", "required", "optional"])
114
114
  ]),
115
- m(i, { focused: R.value }, {
115
+ c(i, { focused: R.value }, {
116
116
  default: B(() => [
117
117
  e("div", Lt, [
118
- _e(d.$slots, "prepend"),
119
- y[6] || (y[6] = e("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Min.", -1)),
118
+ _e(p.$slots, "prepend"),
119
+ b[6] || (b[6] = e("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Min.", -1)),
120
120
  e("div", Nt, [
121
121
  Ue(e("input", {
122
122
  type: "text",
123
123
  ref_key: "minInputRef",
124
- ref: f,
125
- onFocus: y[0] || (y[0] = () => k.value = !0),
126
- onBlur: y[1] || (y[1] = () => k.value = !1),
127
- "onUpdate:modelValue": y[2] || (y[2] = (O) => u.value = O),
124
+ ref: d,
125
+ onFocus: b[0] || (b[0] = () => k.value = !0),
126
+ onBlur: b[1] || (b[1] = () => k.value = !1),
127
+ "onUpdate:modelValue": b[2] || (b[2] = (O) => u.value = O),
128
128
  class: re({
129
129
  "fm-text-field--input fm-typo-en-body-lg-400": !0,
130
130
  "text-fm-color-typo-primary": !o.value,
@@ -134,16 +134,16 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Pt = { c
134
134
  [qe, u.value]
135
135
  ])
136
136
  ]),
137
- y[7] || (y[7] = e("div", { class: "block h-32 mx-4 w-[1px] bg-fm-color-neutral-gray-200" }, null, -1)),
138
- y[8] || (y[8] = e("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Max.", -1)),
137
+ b[7] || (b[7] = e("div", { class: "block h-32 mx-4 w-[1px] bg-fm-color-neutral-gray-200" }, null, -1)),
138
+ b[8] || (b[8] = e("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Max.", -1)),
139
139
  e("div", Et, [
140
140
  Ue(e("input", {
141
141
  type: "text",
142
142
  ref_key: "maxInputRef",
143
- ref: b,
144
- onFocus: y[3] || (y[3] = () => T.value = !0),
145
- onBlur: y[4] || (y[4] = () => T.value = !1),
146
- "onUpdate:modelValue": y[5] || (y[5] = (O) => _.value = O),
143
+ ref: m,
144
+ onFocus: b[3] || (b[3] = () => T.value = !0),
145
+ onBlur: b[4] || (b[4] = () => T.value = !1),
146
+ "onUpdate:modelValue": b[5] || (b[5] = (O) => _.value = O),
147
147
  class: re({
148
148
  "fm-text-field--input fm-typo-en-body-lg-400": !0,
149
149
  "text-fm-color-typo-primary": !o.value,
@@ -153,56 +153,56 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Pt = { c
153
153
  [qe, _.value]
154
154
  ])
155
155
  ]),
156
- _e(d.$slots, "append")
156
+ _e(p.$slots, "append")
157
157
  ])
158
158
  ]),
159
159
  _: 3
160
160
  }, 8, ["focused"])
161
161
  ]),
162
- m(g, {
162
+ c(g, {
163
163
  class: "flex-1",
164
- "model-value": d.modelValue,
165
- info: d.labelInfo,
164
+ "model-value": p.modelValue,
165
+ info: p.labelInfo,
166
166
  rules: U.value,
167
- "helper-text": d.helperText,
168
- "helper-state": d.helperState
167
+ "helper-text": p.helperText,
168
+ "helper-state": p.helperState
169
169
  }, null, 8, ["model-value", "info", "rules", "helper-text", "helper-state"])
170
170
  ]);
171
171
  };
172
172
  }
173
173
  });
174
- function jt({ min: p, max: h } = { min: !0, max: !0 }) {
174
+ function jt({ min: f, max: h } = { min: !0, max: !0 }) {
175
175
  return function(a) {
176
- return !a || !a.min && p != !1 || !a.max && h != !1 ? "Required" : !0;
176
+ return !a || !a.min && f != !1 || !a.max && h != !1 ? "Required" : !0;
177
177
  };
178
178
  }
179
- function Qt(p, h) {
179
+ function Qt(f, h) {
180
180
  return function(a) {
181
- return !a || !a.min || !a.max ? !0 : +se(a.min) < p ? `Must be between ${p} and ${h}` : +se(a.max) > h ? `Must be between ${p} and ${h}` : !0;
181
+ 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
182
  };
183
183
  }
184
- function Yt(p) {
185
- const h = xt(p), v = se(p);
184
+ function Yt(f) {
185
+ const h = xt(f), y = se(f);
186
186
  return function(r) {
187
187
  const s = !(r != null && r.min) || h(r.min) === !0, u = !(r != null && r.max) || h(r.max) === !0;
188
- return !s && !u ? `Min & max must be a multiple of ${v}` : s ? u ? !0 : `Max must be a multiple of ${v}` : `Min must be a multiple of ${v}`;
188
+ 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}`;
189
189
  };
190
190
  }
191
191
  const et = bt("netsuite-custom-field-helper", () => {
192
- const p = Je();
193
- function h(v, a, r, s, u) {
194
- var C;
192
+ const f = Je();
193
+ function h(y, a, r, s, u) {
194
+ var v, o, d;
195
195
  if (!r) {
196
196
  u == null || u("Unit is not valid");
197
197
  return;
198
198
  }
199
- let _ = v.code;
200
- if (p.isEnabled) {
201
- const c = p.getItemCustomCode(a, (C = r.measurement) == null ? void 0 : C.id);
202
- c && (_ = c);
199
+ let _ = y.code;
200
+ if (((v = y.measurement) == null ? void 0 : v.id) !== ((o = r.measurement) == null ? void 0 : o.id) && f.isEnabled) {
201
+ const m = f.getItemCustomCode(a, (d = r.measurement) == null ? void 0 : d.id);
202
+ m && (_ = m);
203
203
  }
204
204
  s({
205
- ...v,
205
+ ...y,
206
206
  quantity: r.amount,
207
207
  measurement: r.measurement ?? null,
208
208
  code: _
@@ -212,29 +212,29 @@ const et = bt("netsuite-custom-field-helper", () => {
212
212
  validateUnitInput: h
213
213
  };
214
214
  });
215
- var Y = /* @__PURE__ */ ((p) => (p.Code = "Code", p.Name = "Name", p.DefaultAmount = "DefaultAmount", p.Limit = "Limit", p.Step = "Step", p.Cost = "Cost", p.Delete = "Delete", p))(Y || {});
216
- function Ht(p, h = {}) {
217
- const { t: v } = me(), a = We(), r = ge(), s = st({}), u = et();
215
+ 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 || {});
216
+ function Ht(f, h = {}) {
217
+ const { t: y } = me(), a = We(), r = ge(), s = st({}), u = et();
218
218
  Te(() => {
219
- for (const c of p.items) {
220
- if (!c.totalCost)
219
+ for (const v of f.items) {
220
+ if (!v.totalCost)
221
221
  continue;
222
222
  const { cost: o } = Mt(
223
- c.sku,
224
- c.quantity,
225
- c.measurement,
223
+ v.sku,
224
+ v.quantity,
225
+ v.measurement,
226
226
  {
227
- supplier: p.supplier
227
+ supplier: f.supplier
228
228
  }
229
- ), f = c.totalCost ?? Ee.reset();
230
- o ? s[c.sku._id] = o.amount !== f.amount || o.precision !== f.precision : s[c.sku._id] = !0;
229
+ ), d = v.totalCost ?? Ee.reset();
230
+ o ? s[v.sku._id] = o.amount !== d.amount || o.precision !== d.precision : s[v.sku._id] = !0;
231
231
  }
232
232
  });
233
233
  const _ = [
234
234
  {
235
235
  id: "Code",
236
236
  header: () => Q("div", { class: "flex-col" }, [
237
- Q("div", v("inventory.transfer.form.items.table.Code")),
237
+ Q("div", y("inventory.transfer.form.items.table.Code")),
238
238
  Q(
239
239
  "div",
240
240
  { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
@@ -243,15 +243,15 @@ function Ht(p, h = {}) {
243
243
  ]),
244
244
  accessorKey: "code",
245
245
  size: 180,
246
- cell(c) {
247
- const o = c.row.original;
246
+ cell(v) {
247
+ const o = v.row.original;
248
248
  return Q("div", [
249
249
  Q(ue.FmTextField, {
250
250
  modelValue: o.code,
251
- "onUpdate:modelValue": (f) => {
252
- p.updateItem({
251
+ "onUpdate:modelValue": (d) => {
252
+ f.updateItem({
253
253
  ...o,
254
- code: f
254
+ code: d
255
255
  });
256
256
  },
257
257
  helperText: o.sku.code,
@@ -266,7 +266,7 @@ function Ht(p, h = {}) {
266
266
  {
267
267
  id: "Name",
268
268
  header: () => Q("div", { class: "flex-col" }, [
269
- Q("div", v("inventory.transfer.form.items.table.Name")),
269
+ Q("div", y("inventory.transfer.form.items.table.Name")),
270
270
  Q(
271
271
  "div",
272
272
  { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
@@ -274,15 +274,15 @@ function Ht(p, h = {}) {
274
274
  )
275
275
  ]),
276
276
  minSize: 300,
277
- cell(c) {
278
- const o = c.row.original;
277
+ cell(v) {
278
+ const o = v.row.original;
279
279
  return Q("div", [
280
280
  Q(ue.FmTextField, {
281
281
  modelValue: o.name,
282
- "onUpdate:modelValue": (f) => {
283
- p.updateItem({
282
+ "onUpdate:modelValue": (d) => {
283
+ f.updateItem({
284
284
  ...o,
285
- name: f
285
+ name: d
286
286
  });
287
287
  },
288
288
  helperText: o.sku.name,
@@ -296,14 +296,14 @@ function Ht(p, h = {}) {
296
296
  },
297
297
  {
298
298
  id: "DefaultAmount",
299
- header: () => v("inventory.transfer.form.items.table.DefaultAmount"),
299
+ header: () => y("inventory.transfer.form.items.table.DefaultAmount"),
300
300
  minSize: 200,
301
- cell(c) {
301
+ cell(v) {
302
302
  var R;
303
- const o = c.row.original, f = a.skuById[o.sku._id], b = a.unitById[(R = f.unit) == null ? void 0 : R._id], k = b.measurements.find((U) => {
304
- var d;
305
- return ((d = o.measurement) == null ? void 0 : d.id) === U.id;
306
- }), T = o.sku.unit._id !== f.unit._id || !b || o.measurement && !k;
303
+ 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) => {
304
+ var p;
305
+ return ((p = o.measurement) == null ? void 0 : p.id) === U.id;
306
+ }), T = o.sku.unit._id !== d.unit._id || !m || o.measurement && !k;
307
307
  return Q(Tt, {
308
308
  style: {
309
309
  flex: "1 1 0%"
@@ -311,22 +311,22 @@ function Ht(p, h = {}) {
311
311
  modelValue: {
312
312
  amount: o.quantity ?? { amount: 1, precision: 0 },
313
313
  // NOTE: leave this reading from row.sku.unit and row.measurement instead,
314
- measurement: o.measurement ?? (o.sku.unit._id !== f.unit._id ? { ...o.sku.unit, id: "", conversion: { amount: 1, precision: 0 } } : null)
314
+ measurement: o.measurement ?? (o.sku.unit._id !== d.unit._id ? { ...o.sku.unit, id: "", conversion: { amount: 1, precision: 0 } } : null)
315
315
  },
316
- disabled: p.disabled,
316
+ disabled: f.disabled,
317
317
  key: o.sku._id,
318
- unit: b,
318
+ unit: m,
319
319
  "onUpdate:modelValue": (U) => {
320
320
  u.validateUnitInput(
321
321
  o,
322
- f,
322
+ d,
323
323
  U,
324
- (d) => {
325
- p.updateItem({
324
+ (p) => {
325
+ f.updateItem({
326
326
  ...o,
327
- code: d.code,
328
- quantity: d.quantity,
329
- measurement: d.measurement
327
+ code: p.code,
328
+ quantity: p.quantity,
329
+ measurement: p.measurement
330
330
  });
331
331
  }
332
332
  );
@@ -347,7 +347,7 @@ function Ht(p, h = {}) {
347
347
  It(
348
348
  o.maximumQuantity ? +se(o.maximumQuantity) : 1 / 0
349
349
  ),
350
- function(d) {
350
+ function(p) {
351
351
  return T ? "This item is no longer valid due to change in unit. Please reapply unit." : !0;
352
352
  }
353
353
  ],
@@ -361,8 +361,8 @@ function Ht(p, h = {}) {
361
361
  header: () => "Limit",
362
362
  // TODO: i18n,
363
363
  minSize: 280,
364
- cell(c) {
365
- const o = c.row.original;
364
+ cell(v) {
365
+ const o = v.row.original;
366
366
  return Q(zt, {
367
367
  style: {
368
368
  flex: "1 1 0%"
@@ -371,12 +371,12 @@ function Ht(p, h = {}) {
371
371
  min: o.minimumQuantity,
372
372
  max: o.maximumQuantity
373
373
  },
374
- disabled: p.disabled,
374
+ disabled: f.disabled,
375
375
  key: o.sku._id,
376
376
  unit: o.sku.unit,
377
- "onUpdate:modelValue": (f) => {
378
- const b = { ...o };
379
- f != null && f.min ? b.minimumQuantity = f.min : b.minimumQuantity = null, f != null && f.max ? b.maximumQuantity = f.max : b.maximumQuantity = null, p.updateItem(b);
377
+ "onUpdate:modelValue": (d) => {
378
+ const m = { ...o };
379
+ 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);
380
380
  },
381
381
  rules: [
382
382
  jt({ max: !1 }),
@@ -396,17 +396,17 @@ function Ht(p, h = {}) {
396
396
  },
397
397
  {
398
398
  id: "Step",
399
- header: () => v("inventory.transfer.form.items.table.Step"),
399
+ header: () => y("inventory.transfer.form.items.table.Step"),
400
400
  minSize: 100,
401
- cell(c) {
402
- const o = c.row.original;
401
+ cell(v) {
402
+ const o = v.row.original;
403
403
  return Q(ue.FmTextField, {
404
404
  modelValue: se(o.quantityStep ?? Ee.reset(), !1),
405
405
  key: o.sku._id,
406
- "onUpdate:modelValue": (f) => {
407
- p.updateItem({
406
+ "onUpdate:modelValue": (d) => {
407
+ f.updateItem({
408
408
  ...o,
409
- quantityStep: ve(+f)
409
+ quantityStep: ve(+d)
410
410
  });
411
411
  },
412
412
  rules: [
@@ -423,8 +423,8 @@ function Ht(p, h = {}) {
423
423
  {
424
424
  id: "Delete",
425
425
  header: "",
426
- cell(c) {
427
- const o = c.row.original;
426
+ cell(v) {
427
+ const o = v.row.original;
428
428
  return Q("div", { class: "flex items-center" }, [
429
429
  r.usePurchaseOrderV2 ? Q(
430
430
  ue.FmTooltip,
@@ -440,9 +440,9 @@ function Ht(p, h = {}) {
440
440
  icon: "add_circle",
441
441
  variant: "tertiary",
442
442
  size: "md",
443
- disabled: p.disabled,
443
+ disabled: f.disabled,
444
444
  onClick: async () => {
445
- const f = {
445
+ const d = {
446
446
  id: crypto.randomUUID(),
447
447
  sku: o.sku,
448
448
  code: o.sku.code,
@@ -452,16 +452,16 @@ function Ht(p, h = {}) {
452
452
  minimumQuantity: ve(1)
453
453
  };
454
454
  u.validateUnitInput(
455
- f,
455
+ d,
456
456
  o.sku,
457
457
  {
458
- amount: f.quantity,
458
+ amount: d.quantity,
459
459
  measurement: null
460
460
  },
461
- (b) => {
462
- f.code = b.code;
461
+ (m) => {
462
+ d.code = m.code;
463
463
  }
464
- ), p.duplicateItem(f);
464
+ ), f.duplicateItem(d);
465
465
  }
466
466
  });
467
467
  },
@@ -477,9 +477,9 @@ function Ht(p, h = {}) {
477
477
  icon: "delete",
478
478
  variant: "tertiary",
479
479
  size: "md",
480
- disabled: p.disabled,
480
+ disabled: f.disabled,
481
481
  onClick: () => {
482
- p.deleteItem(o);
482
+ f.deleteItem(o);
483
483
  }
484
484
  })
485
485
  ]);
@@ -494,64 +494,64 @@ function Ht(p, h = {}) {
494
494
  ];
495
495
  return {
496
496
  columnDefs: N(() => {
497
- const c = ge(), o = [..._];
497
+ const v = ge(), o = [..._];
498
498
  if (Object.keys(h).length > 0)
499
- for (const [f, b] of Object.entries(h))
500
- o.splice(Number(f), 0, {
501
- ...b,
502
- id: f
499
+ for (const [d, m] of Object.entries(h))
500
+ o.splice(Number(d), 0, {
501
+ ...m,
502
+ id: d
503
503
  });
504
- return c.enableTotalCost && p.transferType === X.enum.purchase ? o : o.filter((f) => f.id !== "Cost");
504
+ return v.enableTotalCost && f.transferType === X.enum.purchase ? o : o.filter((d) => d.id !== "Cost");
505
505
  })
506
506
  };
507
507
  }
508
508
  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 = {
509
509
  key: 0,
510
510
  class: "flex gap-8 w-full"
511
- }, so = { class: "flex-1 flex flex-col gap-4" }, lo = { class: "flex-1 flex flex-col gap-4" }, no = { class: "flex gap-8 w-full" }, ao = { class: "flex-1 flex flex-col gap-4" }, ro = /* @__PURE__ */ ae({
511
+ }, 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({
512
512
  __name: "TransferTemplateItem",
513
513
  props: {
514
514
  cellByColId: {},
515
515
  row: {}
516
516
  },
517
- setup(p) {
517
+ setup(f) {
518
518
  const { t: h } = me();
519
- function v(a) {
519
+ function y(a) {
520
520
  return a;
521
521
  }
522
522
  return (a, r) => {
523
- var u, _, C, c, o, f, b, k, T, R, U, d, y, w, i, g, O, $, x, W, te, E, q, Z, l, n, F, P, z, G;
523
+ 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;
524
524
  const s = V("FmLabel");
525
525
  return S(), L("div", Wt, [
526
526
  e("div", Gt, [
527
527
  e("div", Kt, [
528
- e("span", Zt, " (" + M(a.row.original.sku.code) + ") ", 1),
529
- e("span", Jt, M(a.row.original.sku.name), 1)
528
+ e("span", Zt, " (" + I(a.row.original.sku.code) + ") ", 1),
529
+ e("span", Jt, I(a.row.original.sku.name), 1)
530
530
  ]),
531
531
  e("div", null, [
532
- m(t(ee), {
533
- render: (C = (_ = (u = a.cellByColId.Delete) == null ? void 0 : u.column) == null ? void 0 : _.columnDef) == null ? void 0 : C.cell,
534
- props: (o = (c = a.cellByColId.Delete) == null ? void 0 : c.getContext) == null ? void 0 : o.call(c)
532
+ c(t(ee), {
533
+ render: (M = (_ = (u = a.cellByColId.Delete) == null ? void 0 : u.column) == null ? void 0 : _.columnDef) == null ? void 0 : M.cell,
534
+ props: (o = (v = a.cellByColId.Delete) == null ? void 0 : v.getContext) == null ? void 0 : o.call(v)
535
535
  }, null, 8, ["render", "props"])
536
536
  ])
537
537
  ]),
538
538
  e("div", Xt, [
539
539
  e("div", eo, [
540
- m(s, {
540
+ c(s, {
541
541
  label: t(h)(`inventory.transfer.form.items.table.${t(Y).Code}`)
542
542
  }, null, 8, ["label"]),
543
- m(t(ee), {
544
- render: (k = (b = (f = a.cellByColId[t(Y).Code]) == null ? void 0 : f.column) == null ? void 0 : b.columnDef) == null ? void 0 : k.cell,
543
+ c(t(ee), {
544
+ render: (k = (m = (d = a.cellByColId[t(Y).Code]) == null ? void 0 : d.column) == null ? void 0 : m.columnDef) == null ? void 0 : k.cell,
545
545
  props: (R = (T = a.cellByColId[t(Y).Code]) == null ? void 0 : T.getContext) == null ? void 0 : R.call(T)
546
546
  }, null, 8, ["render", "props"]),
547
547
  r[0] || (r[0] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
548
548
  ]),
549
549
  e("div", to, [
550
- m(s, {
550
+ c(s, {
551
551
  label: t(h)(`inventory.transfer.form.items.table.${t(Y).Name}`)
552
552
  }, null, 8, ["label"]),
553
- m(t(ee), {
554
- render: (y = (d = (U = a.cellByColId[t(Y).Name]) == null ? void 0 : U.column) == null ? void 0 : d.columnDef) == null ? void 0 : y.cell,
553
+ c(t(ee), {
554
+ render: (b = (p = (U = a.cellByColId[t(Y).Name]) == null ? void 0 : U.column) == null ? void 0 : p.columnDef) == null ? void 0 : b.cell,
555
555
  props: (i = (w = a.cellByColId[t(Y).Name]) == null ? void 0 : w.getContext) == null ? void 0 : i.call(w)
556
556
  }, null, 8, ["render", "props"]),
557
557
  r[1] || (r[1] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
@@ -559,33 +559,33 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
559
559
  ]),
560
560
  a.row.original ? (S(), L("div", oo, [
561
561
  e("div", so, [
562
- m(s, {
562
+ c(s, {
563
563
  label: t(h)(`inventory.transfer.form.items.table.${t(Y).DefaultAmount}`)
564
564
  }, null, 8, ["label"]),
565
- m(t(ee), {
565
+ c(t(ee), {
566
566
  render: ($ = (O = (g = a.cellByColId[t(Y).DefaultAmount]) == null ? void 0 : g.column) == null ? void 0 : O.columnDef) == null ? void 0 : $.cell,
567
567
  props: (W = (x = a.cellByColId[t(Y).DefaultAmount]) == null ? void 0 : x.getContext) == null ? void 0 : W.call(x)
568
568
  }, null, 8, ["render", "props"]),
569
569
  r[2] || (r[2] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
570
570
  ]),
571
- e("div", lo, [
572
- m(s, {
571
+ e("div", no, [
572
+ c(s, {
573
573
  label: t(h)(`inventory.transfer.form.items.table.${t(Y).Step}`)
574
574
  }, null, 8, ["label"]),
575
- m(t(ee), {
575
+ c(t(ee), {
576
576
  render: (q = (E = (te = a.cellByColId[t(Y).Step]) == null ? void 0 : te.column) == null ? void 0 : E.columnDef) == null ? void 0 : q.cell,
577
- props: (l = (Z = a.cellByColId[t(Y).Step]) == null ? void 0 : Z.getContext) == null ? void 0 : l.call(Z)
577
+ props: (n = (Z = a.cellByColId[t(Y).Step]) == null ? void 0 : Z.getContext) == null ? void 0 : n.call(Z)
578
578
  }, null, 8, ["render", "props"]),
579
579
  r[3] || (r[3] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
580
580
  ])
581
581
  ])) : oe("", !0),
582
- e("div", no, [
582
+ e("div", lo, [
583
583
  e("div", ao, [
584
- m(s, {
584
+ c(s, {
585
585
  label: t(h)(`inventory.transfer.form.items.table.${t(Y).Limit}`)
586
586
  }, null, 8, ["label"]),
587
- m(t(ee), {
588
- render: (P = (F = (n = a.cellByColId[t(Y).Limit]) == null ? void 0 : n.column) == null ? void 0 : F.columnDef) == null ? void 0 : P.cell,
587
+ c(t(ee), {
588
+ render: (P = (F = (l = a.cellByColId[t(Y).Limit]) == null ? void 0 : l.column) == null ? void 0 : F.columnDef) == null ? void 0 : P.cell,
589
589
  props: (G = (z = a.cellByColId[t(Y).Limit]) == null ? void 0 : z.getContext) == null ? void 0 : G.call(z)
590
590
  }, null, 8, ["render", "props"]),
591
591
  r[4] || (r[4] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
@@ -602,28 +602,28 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
602
602
  errorMessage: {}
603
603
  },
604
604
  emits: ["update:item"],
605
- setup(p) {
606
- function h(v) {
607
- return v.column.columnDef.meta;
605
+ setup(f) {
606
+ function h(y) {
607
+ return y.column.columnDef.meta;
608
608
  }
609
- return (v, a) => (S(), L(pe, null, [
609
+ return (y, a) => (S(), L(pe, null, [
610
610
  e("tr", {
611
611
  class: "hover:bg-fm-color-opacity-sm border-b border-fm-color-neutral-gray-100",
612
- style: xe({ backgroundColor: v.errorMessage ? "#ffd6d6" : void 0 })
612
+ style: xe({ backgroundColor: y.errorMessage ? "#ffd6d6" : void 0 })
613
613
  }, [
614
- (S(!0), L(pe, null, Qe(v.row.getVisibleCells(), (r) => {
615
- var s, u, _, C, c;
614
+ (S(!0), L(pe, null, Qe(y.row.getVisibleCells(), (r) => {
615
+ var s, u, _, M, v;
616
616
  return S(), L("td", {
617
617
  key: r.id,
618
618
  class: re(["text-fm-color-typo-primary", ((s = h(r)) == null ? void 0 : s.cellClass) ?? "px-16", "py-2"]),
619
619
  style: xe({
620
620
  width: (u = h(r)) != null && u.width ? (_ = h(r)) == null ? void 0 : _.width : r.column.getSize() !== 0 ? `${r.column.getSize()}px` : void 0,
621
- maxWidth: (C = h(r)) == null ? void 0 : C.maxWidth,
622
- textAlign: ((c = h(r)) == null ? void 0 : c.textAlign) ?? "left"
621
+ maxWidth: (M = h(r)) == null ? void 0 : M.maxWidth,
622
+ textAlign: ((v = h(r)) == null ? void 0 : v.textAlign) ?? "left"
623
623
  })
624
624
  }, [
625
625
  e("span", io, [
626
- m(t(ee), {
626
+ c(t(ee), {
627
627
  props: r.getContext(),
628
628
  render: r.column.columnDef.cell
629
629
  }, null, 8, ["props", "render"])
@@ -631,11 +631,11 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
631
631
  ], 6);
632
632
  }), 128))
633
633
  ], 4),
634
- v.errorMessage ? (S(), L("tr", uo, [
634
+ y.errorMessage ? (S(), L("tr", uo, [
635
635
  e("td", {
636
- colspan: v.row.getVisibleCells().length,
636
+ colspan: y.row.getVisibleCells().length,
637
637
  class: "text-red-600 px-16 py-2"
638
- }, M(v.errorMessage), 9, mo)
638
+ }, I(y.errorMessage), 9, mo)
639
639
  ])) : oe("", !0)
640
640
  ], 64));
641
641
  }
@@ -649,51 +649,51 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
649
649
  disabled: { type: Boolean }
650
650
  },
651
651
  emits: ["update:disabled"],
652
- setup(p, { expose: h, emit: v }) {
653
- const a = p, r = v, s = Ze(), { t: u } = me(), _ = H({}), C = Ge(), c = We(), o = Ot(), f = ge(), b = Je(), k = et();
652
+ setup(f, { expose: h, emit: y }) {
653
+ const a = f, r = y, s = Ze(), { t: u } = me(), _ = H({}), M = Ge(), v = We(), o = Ot(), d = ge(), m = Je(), k = et();
654
654
  Fe(
655
655
  () => s.purchaseOrder.items.length,
656
656
  () => {
657
657
  _.value = {};
658
658
  }
659
- ), C.watchLocation(async () => {
660
- location && (s.purchaseOrder.supplier || (s.purchaseOrder.supplier = o.suppliers.find((l) => l) ?? s.purchaseOrder.supplier));
659
+ ), M.watchLocation(async () => {
660
+ location && (s.purchaseOrder.supplier || (s.purchaseOrder.supplier = o.suppliers.find((n) => n) ?? s.purchaseOrder.supplier));
661
661
  });
662
662
  const T = $t(
663
663
  () => s.purchaseOrder,
664
- (l) => {
664
+ (n) => {
665
665
  s.purchaseOrder = {
666
666
  ...s.purchaseOrder,
667
- supplier: l.supplier ?? (s == null ? void 0 : s.purchaseOrder.supplier)
667
+ supplier: n.supplier ?? (s == null ? void 0 : s.purchaseOrder.supplier)
668
668
  };
669
669
  }
670
670
  ), R = N({
671
671
  get() {
672
- var l, n;
673
- return typeof ((n = (l = s.purchaseOrder) == null ? void 0 : l.supplier) == null ? void 0 : n.internal) == "string" ? X.enum.transfer : X.enum.purchase;
672
+ var n, l;
673
+ return typeof ((l = (n = s.purchaseOrder) == null ? void 0 : n.supplier) == null ? void 0 : l.internal) == "string" ? X.enum.transfer : X.enum.purchase;
674
674
  },
675
- set(l) {
675
+ set(n) {
676
676
  var F, P;
677
- const n = typeof ((P = (F = s.purchaseOrder) == null ? void 0 : F.supplier) == null ? void 0 : P.internal) == "string" ? X.enum.transfer : X.enum.purchase;
678
- l !== n && (s.purchaseOrder.supplier = l === X.enum.purchase ? T.locationOptionsTypePurchase.value[0] : T.locationOptionsTypeTransfer.value[0]);
677
+ const l = typeof ((P = (F = s.purchaseOrder) == null ? void 0 : F.supplier) == null ? void 0 : P.internal) == "string" ? X.enum.transfer : X.enum.purchase;
678
+ n !== l && (s.purchaseOrder.supplier = n === X.enum.purchase ? T.locationOptionsTypePurchase.value[0] : T.locationOptionsTypeTransfer.value[0]);
679
679
  }
680
- }), U = N(() => T.transferLocationOptions.value), d = N({
680
+ }), U = N(() => T.transferLocationOptions.value), p = N({
681
681
  get() {
682
- var l;
683
- return (l = s.purchaseOrder.supplier) == null ? void 0 : l._id;
682
+ var n;
683
+ return (n = s.purchaseOrder.supplier) == null ? void 0 : n._id;
684
684
  },
685
- set(l) {
686
- T.transferLocationModel.value = l;
685
+ set(n) {
686
+ T.transferLocationModel.value = n;
687
687
  }
688
688
  });
689
- async function y() {
690
- const l = await b.checkCustomFieldCodes({
689
+ async function b() {
690
+ const n = await m.checkCustomFieldCodes({
691
691
  beforeStart: async () => {
692
692
  r("update:disabled", !0);
693
693
  },
694
694
  templateItems: s.purchaseOrder.items
695
695
  });
696
- _.value = l, r("update:disabled", !1);
696
+ _.value = n, r("update:disabled", !1);
697
697
  }
698
698
  const {
699
699
  promptSelectLocations: w,
@@ -703,56 +703,56 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
703
703
  getLocations() {
704
704
  return s.locations;
705
705
  },
706
- setLocations(l) {
707
- s.locations = l;
706
+ setLocations(n) {
707
+ s.locations = n;
708
708
  }
709
709
  });
710
710
  function O() {
711
- var l, n;
712
- return (l = s.locations) != null && l.find((F) => {
711
+ var n, l;
712
+ return (n = s.locations) != null && n.find((F) => {
713
713
  var P, z;
714
714
  return ((P = F.doc) == null ? void 0 : P._id) === ((z = s.purchaseOrder.supplier) == null ? void 0 : z._id);
715
- }) ? `Location ${(n = s.purchaseOrder.supplier) == null ? void 0 : n.name} must be removed because template cannot be used to transfer to itself.` : !0;
715
+ }) ? `Location ${(l = s.purchaseOrder.supplier) == null ? void 0 : l.name} must be removed because template cannot be used to transfer to itself.` : !0;
716
716
  }
717
717
  const $ = N({
718
718
  get() {
719
719
  return s.purchaseOrder.remark ?? void 0;
720
720
  },
721
- set(l) {
722
- s.purchaseOrder.remark = l;
721
+ set(n) {
722
+ s.purchaseOrder.remark = n;
723
723
  }
724
724
  }), x = H();
725
725
  h({
726
726
  validateInputs: () => {
727
- var l, n;
728
- (n = (l = x.value) == null ? void 0 : l.validateInputs) == null || n.call(l);
727
+ var n, l;
728
+ (l = (n = x.value) == null ? void 0 : n.validateInputs) == null || l.call(n);
729
729
  },
730
730
  resetInputsValidation: () => {
731
- var l, n;
732
- (n = (l = x.value) == null ? void 0 : l.resetInputsValidation) == null || n.call(l);
731
+ var n, l;
732
+ (l = (n = x.value) == null ? void 0 : n.resetInputsValidation) == null || l.call(n);
733
733
  },
734
734
  resetInputs: () => {
735
- var l, n;
736
- (n = (l = x.value) == null ? void 0 : l.resetInputs) == null || n.call(l);
735
+ var n, l;
736
+ (l = (n = x.value) == null ? void 0 : n.resetInputs) == null || l.call(n);
737
737
  }
738
738
  });
739
739
  const W = N(() => ({
740
- duplicateItem: (l) => {
740
+ duplicateItem: (n) => {
741
741
  s.purchaseOrder.items = [
742
742
  ...s.purchaseOrder.items,
743
743
  {
744
- ...l
744
+ ...n
745
745
  }
746
746
  ];
747
747
  },
748
- updateItem: (l) => {
749
- let n = [];
750
- l.id ? n = s.purchaseOrder.items.map((F) => F.id !== l.id ? F : l) : n = s.purchaseOrder.items.map((F) => F.sku._id !== l.sku._id ? F : l), s.purchaseOrder.items = n;
748
+ updateItem: (n) => {
749
+ let l = [];
750
+ n.id ? l = s.purchaseOrder.items.map((F) => F.id !== n.id ? F : n) : l = s.purchaseOrder.items.map((F) => F.sku._id !== n.sku._id ? F : n), s.purchaseOrder.items = l;
751
751
  },
752
- deleteItem: (l) => {
753
- console.log(l.id);
754
- let n = [];
755
- l.id ? n = s.purchaseOrder.items.filter((F) => F.id !== l.id) : n = s.purchaseOrder.items.filter((F) => F.sku._id !== l.sku._id), s.purchaseOrder.items = n;
752
+ deleteItem: (n) => {
753
+ console.log(n.id);
754
+ let l = [];
755
+ 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;
756
756
  }
757
757
  })), te = Ht(
758
758
  {
@@ -772,13 +772,13 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
772
772
  return a.disabled;
773
773
  }
774
774
  },
775
- b.transferTemplateColumnDefs({
776
- onUpdate: (l, n, F, P) => {
777
- if (l < 0 || l >= s.purchaseOrder.items.length) return;
778
- const z = s.purchaseOrder.items[l];
775
+ m.transferTemplateColumnDefs({
776
+ onUpdate: (n, l, F, P) => {
777
+ if (n < 0 || n >= s.purchaseOrder.items.length) return;
778
+ const z = s.purchaseOrder.items[n];
779
779
  z && W.value.updateItem({
780
780
  ...z,
781
- sku: n,
781
+ sku: l,
782
782
  // Sku might be outdated, so we need to update it
783
783
  code: F,
784
784
  measurement: P
@@ -787,7 +787,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
787
787
  })
788
788
  ), E = N(() => te.columnDefs.value), { promptSelectIngredients: q } = Dt();
789
789
  async function Z() {
790
- const n = c.skus.map((D) => ({
790
+ const l = v.skus.map((D) => ({
791
791
  label: D.name,
792
792
  sublabel: D.code,
793
793
  value: D
@@ -795,14 +795,14 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
795
795
  var A;
796
796
  return (A = s.purchaseOrder.items) == null ? void 0 : A.find((K) => K.sku._id === D.value._id);
797
797
  }).map((D) => D.value), F = s.purchaseOrder.items ?? [], P = await q(
798
- n.map((D) => D._id),
798
+ l.map((D) => D._id),
799
799
  (D) => {
800
- const A = c.skuById[D], K = F.find((j) => j.sku._id === A._id);
800
+ const A = v.skuById[D], K = F.find((j) => j.sku._id === A._id);
801
801
  if (K)
802
802
  return K;
803
803
  const J = { amount: 1, precision: be(A.unit) };
804
- let I = {
805
- id: f.usePurchaseOrderV2 ? crypto.randomUUID() : void 0,
804
+ let C = {
805
+ id: d.usePurchaseOrderV2 ? crypto.randomUUID() : void 0,
806
806
  sku: A,
807
807
  code: A.code,
808
808
  name: A.name,
@@ -815,16 +815,16 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
815
815
  quantityStep: J
816
816
  };
817
817
  return k.validateUnitInput(
818
- I,
818
+ C,
819
819
  A,
820
820
  {
821
821
  amount: J,
822
822
  measurement: null
823
823
  },
824
824
  (j) => {
825
- I.code = j.code;
825
+ C.code = j.code;
826
826
  }
827
- ), I;
827
+ ), C;
828
828
  }
829
829
  );
830
830
  if (!P) return;
@@ -840,30 +840,30 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
840
840
  }
841
841
  G.sort((D, A) => D.sku.code.localeCompare(A.sku.code)), s.purchaseOrder.items = G;
842
842
  }
843
- return (l, n) => {
843
+ return (n, l) => {
844
844
  const F = V("FmTextField"), P = V("FmSelect"), z = V("FmTextarea"), G = V("FmButton"), D = V("FmTable"), A = V("FmFormGroup"), K = V("FmForm");
845
- return S(), le(K, {
845
+ return S(), ne(K, {
846
846
  ref_key: "formRef",
847
847
  ref: x,
848
848
  class: "flex flex-col gap-32",
849
- disabled: l.disabled
849
+ disabled: n.disabled
850
850
  }, {
851
851
  default: B(() => {
852
852
  var J;
853
853
  return [
854
854
  e("div", co, [
855
855
  e("div", fo, [
856
- m(F, {
856
+ c(F, {
857
857
  label: t(u)("inventory.transfer.form.name"),
858
858
  "label-mark": "required",
859
859
  modelValue: t(s).name,
860
- "onUpdate:modelValue": n[0] || (n[0] = (I) => t(s).name = I),
860
+ "onUpdate:modelValue": l[0] || (l[0] = (C) => t(s).name = C),
861
861
  rules: [t(ke)()]
862
862
  }, null, 8, ["label", "modelValue", "rules"]),
863
- m(P, {
863
+ c(P, {
864
864
  label: t(u)("inventory.transfer.form.type.title"),
865
865
  "model-value": R.value,
866
- "onUpdate:modelValue": n[1] || (n[1] = (I) => R.value = I),
866
+ "onUpdate:modelValue": l[1] || (l[1] = (C) => R.value = C),
867
867
  items: [
868
868
  {
869
869
  label: t(u)("inventory.transfer.form.type.purchase"),
@@ -884,61 +884,61 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
884
884
  e("span", {
885
885
  class: re([
886
886
  "line-clamp-1 fm-typo-en-body-lg-400",
887
- l.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
887
+ n.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
888
888
  ])
889
- }, M(t(ct)(R.value)), 3)
889
+ }, I(t(ct)(R.value)), 3)
890
890
  ]),
891
891
  _: 1
892
892
  }, 8, ["label", "model-value", "items", "rules"]),
893
- m(P, {
893
+ c(P, {
894
894
  label: R.value === t(X).enum.purchase ? t(u)("inventory.transfer.form.purchaseFrom") : t(u)("inventory.transfer.form.transferFrom"),
895
- modelValue: d.value,
896
- "onUpdate:modelValue": n[2] || (n[2] = (I) => d.value = I),
895
+ modelValue: p.value,
896
+ "onUpdate:modelValue": l[2] || (l[2] = (C) => p.value = C),
897
897
  items: U.value
898
898
  }, {
899
- "menu-wrapper": B((I) => {
899
+ "menu-wrapper": B((C) => {
900
900
  var j;
901
901
  return [
902
- m(St, Ye(I, {
902
+ c(St, Ye(C, {
903
903
  items: U.value,
904
- "model-value": (j = l.modelValue.purchaseOrder.supplier) == null ? void 0 : j._id
904
+ "model-value": (j = n.modelValue.purchaseOrder.supplier) == null ? void 0 : j._id
905
905
  }), null, 16, ["items", "model-value"])
906
906
  ];
907
907
  }),
908
908
  default: B(() => {
909
- var I;
909
+ var C;
910
910
  return [
911
911
  e("span", {
912
912
  class: re([
913
913
  "line-clamp-1 fm-typo-en-body-lg-400",
914
- l.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
914
+ n.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
915
915
  ])
916
- }, M((I = U.value.find((j) => j.value === d.value)) == null ? void 0 : I.label), 3)
916
+ }, I((C = U.value.find((j) => j.value === p.value)) == null ? void 0 : C.label), 3)
917
917
  ];
918
918
  }),
919
919
  _: 1
920
920
  }, 8, ["label", "modelValue", "items"]),
921
- m(F, {
921
+ c(F, {
922
922
  label: t(u)("inventory.transfer.form.reference"),
923
923
  "label-mark": "optional",
924
924
  modelValue: t(s).purchaseOrder.ref,
925
- "onUpdate:modelValue": n[3] || (n[3] = (I) => t(s).purchaseOrder.ref = I)
925
+ "onUpdate:modelValue": l[3] || (l[3] = (C) => t(s).purchaseOrder.ref = C)
926
926
  }, null, 8, ["label", "modelValue"]),
927
- m(z, {
927
+ c(z, {
928
928
  label: t(u)("inventory.transfer.form.remark"),
929
929
  "label-mark": "optional",
930
930
  "max-length": 240,
931
931
  modelValue: $.value,
932
- "onUpdate:modelValue": n[4] || (n[4] = (I) => $.value = I),
933
- class: re({ "text-fm-color-typo-disabled": l.disabled })
932
+ "onUpdate:modelValue": l[4] || (l[4] = (C) => $.value = C),
933
+ class: re({ "text-fm-color-typo-disabled": n.disabled })
934
934
  }, null, 8, ["label", "modelValue", "class"])
935
935
  ])
936
936
  ]),
937
937
  e("div", yo, [
938
938
  e("div", vo, [
939
- n[8] || (n[8] = e("div", { class: "flex-1 fm-typo-en-title-sm-600" }, "Locations", -1)),
940
- m(G, {
941
- disabled: l.disabled,
939
+ l[8] || (l[8] = e("div", { class: "flex-1 fm-typo-en-title-sm-600" }, "Locations", -1)),
940
+ c(G, {
941
+ disabled: n.disabled,
942
942
  label: "Select location",
943
943
  "prepend-icon": "add",
944
944
  variant: "plain",
@@ -946,7 +946,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
946
946
  onClick: t(w)
947
947
  }, null, 8, ["disabled", "onClick"])
948
948
  ]),
949
- m(D, {
949
+ c(D, {
950
950
  "column-defs": t(i),
951
951
  "row-data": t(g),
952
952
  "shrink-at": 9999,
@@ -954,7 +954,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
954
954
  "hide-footer": ""
955
955
  }, null, 8, ["column-defs", "row-data", "onRowClick"]),
956
956
  e("div", bo, [
957
- m(A, {
957
+ c(A, {
958
958
  "model-value": [
959
959
  (J = a.modelValue.purchaseOrder.supplier) == null ? void 0 : J._id,
960
960
  ...a.modelValue.locations ?? []
@@ -965,27 +965,27 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
965
965
  ]),
966
966
  e("div", go, [
967
967
  e("div", ho, [
968
- e("div", _o, M(t(u)("inventory.transfer.form.items.title")), 1),
969
- t(b).isEnabled ? (S(), le(G, {
968
+ e("div", _o, I(t(u)("inventory.transfer.form.items.title")), 1),
969
+ t(m).isEnabled ? (S(), ne(G, {
970
970
  key: 0,
971
971
  label: "Check NetSuite",
972
972
  "prepend-icon": "troubleshoot",
973
973
  variant: "secondary",
974
- onClick: y,
974
+ onClick: b,
975
975
  size: "md"
976
976
  })) : oe("", !0),
977
- m(G, {
978
- disabled: l.disabled,
977
+ c(G, {
978
+ disabled: n.disabled,
979
979
  label: t(u)("inventory.transfer.form.items.addItem"),
980
980
  "prepend-icon": "add",
981
981
  variant: "plain",
982
982
  class: "border-2 rounded-lg border-fm-color-primary",
983
- onClick: n[5] || (n[5] = (I) => Z()),
983
+ onClick: l[5] || (l[5] = (C) => Z()),
984
984
  size: "md"
985
985
  }, null, 8, ["disabled", "label"])
986
986
  ]),
987
- t(b).isEnabled ? (S(), L("div", xo, n[9] || (n[9] = [
988
- ne(" NetSuite is enabled. "),
987
+ t(m).isEnabled ? (S(), L("div", xo, l[9] || (l[9] = [
988
+ le(" NetSuite is enabled. "),
989
989
  e("ul", { style: { "list-style": "initial", "margin-left": "20px" } }, [
990
990
  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. '),
991
991
  e("li", null, ' You can also choose to change the code by selecting from the "NetSuite" button in each row. ')
@@ -994,38 +994,38 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
994
994
  ]))) : oe("", !0),
995
995
  e("div", ko, [
996
996
  e("p", wo, [
997
- ne(' Set "' + M(t(u)("inventory.transfer.form.items.table.DefaultAmount")) + '" to "0" to mark the item as ', 1),
998
- n[10] || (n[10] = e("b", null, "optional", -1)),
999
- n[11] || (n[11] = ne(" when creating an order request. "))
997
+ le(' Set "' + I(t(u)("inventory.transfer.form.items.table.DefaultAmount")) + '" to "0" to mark the item as ', 1),
998
+ l[10] || (l[10] = e("b", null, "optional", -1)),
999
+ l[11] || (l[11] = le(" when creating an order request. "))
1000
1000
  ]),
1001
- n[12] || (n[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))
1001
+ 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))
1002
1002
  ]),
1003
- (S(), le(D, {
1003
+ (S(), ne(D, {
1004
1004
  "column-defs": E.value,
1005
1005
  "row-data": t(s).purchaseOrder.items,
1006
- key: t(s).purchaseOrder.items.map((I) => I.sku._id).join("."),
1006
+ key: t(s).purchaseOrder.items.map((C) => C.sku._id).join("."),
1007
1007
  "hide-footer": "",
1008
1008
  "page-size": t(s).purchaseOrder.items.length
1009
1009
  }, {
1010
- "table-row": B((I) => [
1011
- m(po, {
1012
- row: I,
1013
- errorMessage: _.value[I.index],
1014
- "onUpdate:item": n[6] || (n[6] = (j) => W.value.updateItem(j)),
1015
- disabled: l.disabled
1010
+ "table-row": B((C) => [
1011
+ c(po, {
1012
+ row: C,
1013
+ errorMessage: _.value[C.index],
1014
+ "onUpdate:item": l[6] || (l[6] = (j) => W.value.updateItem(j)),
1015
+ disabled: n.disabled
1016
1016
  }, null, 8, ["row", "errorMessage", "disabled"])
1017
1017
  ]),
1018
- "list-row": B((I) => [
1019
- (S(), le(Xe, {
1020
- row: I,
1018
+ "list-row": B((C) => [
1019
+ (S(), ne(Xe, {
1020
+ row: C,
1021
1021
  key: t(s).purchaseOrder.items.map((j) => j.sku._id).join(".")
1022
1022
  }, {
1023
1023
  default: B((j) => [
1024
- m(ro, {
1025
- row: I,
1024
+ c(ro, {
1025
+ row: C,
1026
1026
  "cell-by-col-id": j,
1027
- "onUpdate:item": n[7] || (n[7] = (ie) => W.value.updateItem(ie)),
1028
- disabled: l.disabled
1027
+ "onUpdate:item": l[7] || (l[7] = (ie) => W.value.updateItem(ie)),
1028
+ disabled: n.disabled
1029
1029
  }, null, 8, ["row", "cell-by-col-id", "disabled"])
1030
1030
  ]),
1031
1031
  _: 2
@@ -1033,7 +1033,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1033
1033
  ]),
1034
1034
  _: 1
1035
1035
  }, 8, ["column-defs", "row-data", "page-size"])),
1036
- m(A, {
1036
+ c(A, {
1037
1037
  "model-value": t(s).purchaseOrder.items.length,
1038
1038
  rules: [t(we)(1)]
1039
1039
  }, null, 8, ["model-value", "rules"])
@@ -1053,35 +1053,35 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1053
1053
  confirmMessage: {}
1054
1054
  },
1055
1055
  emits: ["confirm"],
1056
- setup(p, { emit: h }) {
1057
- const v = p, a = h, r = H(!1);
1056
+ setup(f, { emit: h }) {
1057
+ const y = f, a = h, r = H(!1);
1058
1058
  function s() {
1059
1059
  r.value = !1, a("confirm");
1060
1060
  }
1061
1061
  return (u, _) => {
1062
- const C = V("FmButton"), c = V("FmDialog");
1062
+ const M = V("FmButton"), v = V("FmDialog");
1063
1063
  return S(), L("div", null, [
1064
- m(C, {
1065
- label: v.label,
1066
- loading: v.loading,
1064
+ c(M, {
1065
+ label: y.label,
1066
+ loading: y.loading,
1067
1067
  onClick: _[0] || (_[0] = (o) => r.value = !0)
1068
1068
  }, null, 8, ["label", "loading"]),
1069
- m(c, {
1069
+ c(v, {
1070
1070
  modelValue: r.value,
1071
1071
  "onUpdate:modelValue": _[2] || (_[2] = (o) => r.value = o),
1072
1072
  overlay: !0
1073
1073
  }, {
1074
1074
  "dialog-header": B(() => [
1075
- e("div", null, M(v.confirmTitle || "Confirm"), 1)
1075
+ e("div", null, I(y.confirmTitle || "Confirm"), 1)
1076
1076
  ]),
1077
1077
  "dialog-footer": B(() => [
1078
1078
  e("div", Fo, [
1079
- m(C, {
1079
+ c(M, {
1080
1080
  label: "Cancel",
1081
1081
  variant: "tertiary",
1082
1082
  onClick: _[1] || (_[1] = (o) => r.value = !1)
1083
1083
  }),
1084
- m(C, {
1084
+ c(M, {
1085
1085
  class: "ml-auto",
1086
1086
  label: "Confirm",
1087
1087
  variant: "primary",
@@ -1091,7 +1091,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1091
1091
  ]),
1092
1092
  default: B(() => [
1093
1093
  _e(u.$slots, "dialog-content", {}, () => [
1094
- ne(M(v.confirmMessage || "Are you sure you want to proceed?"), 1)
1094
+ le(I(y.confirmMessage || "Are you sure you want to proceed?"), 1)
1095
1095
  ])
1096
1096
  ]),
1097
1097
  _: 3
@@ -1110,10 +1110,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1110
1110
  disabledModifiers: {}
1111
1111
  }),
1112
1112
  emits: /* @__PURE__ */ Pe(["update:show", "submitted"], ["update:disabled"]),
1113
- setup(p, { expose: h, emit: v }) {
1113
+ setup(f, { expose: h, emit: y }) {
1114
1114
  var w;
1115
- const a = p, r = v, s = At(), u = yt(), { t: _ } = me(), C = Ke(a, "show");
1116
- function c() {
1115
+ const a = f, r = y, s = At(), u = yt(), { t: _ } = me(), M = Ke(a, "show");
1116
+ function v() {
1117
1117
  return {
1118
1118
  _id: "",
1119
1119
  name: "",
@@ -1143,15 +1143,15 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1143
1143
  }
1144
1144
  };
1145
1145
  }
1146
- const o = H(a.modelValue ?? c()), f = H(((w = a.modelValue) == null ? void 0 : w._id) ?? `${Math.random()}`);
1146
+ const o = H(a.modelValue ?? v()), d = H(((w = a.modelValue) == null ? void 0 : w._id) ?? `${Math.random()}`);
1147
1147
  Fe(
1148
1148
  () => a.show,
1149
1149
  (i) => {
1150
1150
  var g;
1151
- i && (o.value = a.modelValue ?? c(), f.value = ((g = a.modelValue) == null ? void 0 : g._id) ?? `${Math.random()}`);
1151
+ i && (o.value = a.modelValue ?? v(), d.value = ((g = a.modelValue) == null ? void 0 : g._id) ?? `${Math.random()}`);
1152
1152
  }
1153
1153
  );
1154
- const b = lt(p, "disabled"), k = N(() => {
1154
+ const m = nt(f, "disabled"), k = N(() => {
1155
1155
  switch (a.mode) {
1156
1156
  case de.READ:
1157
1157
  return "";
@@ -1180,7 +1180,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1180
1180
  var g, O;
1181
1181
  const i = o.value;
1182
1182
  if (i) {
1183
- b.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(
1183
+ 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(
1184
1184
  ({ totalCost: $, ...x }) => x
1185
1185
  ));
1186
1186
  try {
@@ -1196,7 +1196,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1196
1196
  type: "error"
1197
1197
  }), console.error("Error in creating transfer template", $);
1198
1198
  } finally {
1199
- b.value = !1;
1199
+ m.value = !1;
1200
1200
  }
1201
1201
  }
1202
1202
  }
@@ -1204,7 +1204,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1204
1204
  var g, O;
1205
1205
  const i = o.value;
1206
1206
  if (i) {
1207
- b.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(
1207
+ 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(
1208
1208
  ({ totalCost: $, ...x }) => x
1209
1209
  ));
1210
1210
  try {
@@ -1220,11 +1220,11 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1220
1220
  type: "error"
1221
1221
  }), console.error("Error in updating transfer template", $);
1222
1222
  } finally {
1223
- b.value = !1;
1223
+ m.value = !1;
1224
1224
  }
1225
1225
  }
1226
1226
  }
1227
- function d() {
1227
+ function p() {
1228
1228
  switch (a.mode) {
1229
1229
  case de.CREATE:
1230
1230
  return R();
@@ -1232,56 +1232,56 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1232
1232
  return U();
1233
1233
  }
1234
1234
  }
1235
- function y() {
1235
+ function b() {
1236
1236
  var i, g;
1237
1237
  (g = (i = T.value) == null ? void 0 : i.validateInputs) == null || g.call(i);
1238
1238
  }
1239
1239
  return (i, g) => {
1240
1240
  const O = V("FmButton"), $ = V("FmSideSheet");
1241
- return S(), le($, {
1242
- modelValue: t(C),
1243
- "onUpdate:modelValue": g[3] || (g[3] = (x) => He(C) ? C.value = x : null),
1241
+ return S(), ne($, {
1242
+ modelValue: t(M),
1243
+ "onUpdate:modelValue": g[3] || (g[3] = (x) => He(M) ? M.value = x : null),
1244
1244
  "dismiss-away": "",
1245
1245
  "close-button": "",
1246
1246
  "max-width": 1600
1247
1247
  }, {
1248
1248
  "side-sheet-header": B(() => [
1249
1249
  e("div", Io, [
1250
- e("div", Mo, M(k.value), 1)
1250
+ e("div", Mo, I(k.value), 1)
1251
1251
  ])
1252
1252
  ]),
1253
1253
  default: B(() => [
1254
- (S(), le(To, {
1254
+ (S(), ne(To, {
1255
1255
  class: "w-full",
1256
1256
  ref_key: "formRef",
1257
1257
  ref: T,
1258
- onValidationSuccess: d,
1258
+ onValidationSuccess: p,
1259
1259
  "model-value": o.value,
1260
1260
  "onUpdate:modelValue": g[0] || (g[0] = (x) => o.value = x),
1261
- disabled: b.value,
1262
- "onUpdate:disabled": g[1] || (g[1] = (x) => b.value = x),
1263
- key: f.value
1261
+ disabled: m.value,
1262
+ "onUpdate:disabled": g[1] || (g[1] = (x) => m.value = x),
1263
+ key: d.value
1264
1264
  }, null, 8, ["model-value", "disabled"]))
1265
1265
  ]),
1266
1266
  "side-sheet-footer": B(() => [
1267
1267
  e("div", $o, [
1268
- m(Co, {
1269
- loading: b.value,
1268
+ c(Co, {
1269
+ loading: m.value,
1270
1270
  label: t(_)("common.save"),
1271
1271
  "confirm-title": `Save ${a.mode === t(de).CREATE ? "Template" : "Changes"}`,
1272
- onConfirm: y
1272
+ onConfirm: b
1273
1273
  }, {
1274
1274
  "dialog-content": B(() => g[4] || (g[4] = [
1275
1275
  e("div", { class: "fm-typo-en-body-md-400 bg-fm-color-primary-oats p-8 rounded" }, [
1276
- ne(" Warning: This action "),
1276
+ le(" Warning: This action "),
1277
1277
  e("span", { class: "text-fm-color-system-error-300" }, "will not"),
1278
- ne(" create or update any order request, but only a template. ")
1278
+ le(" create or update any order request, but only a template. ")
1279
1279
  ], -1)
1280
1280
  ])),
1281
1281
  _: 1
1282
1282
  }, 8, ["loading", "label", "confirm-title"]),
1283
- m(O, {
1284
- disabled: b.value,
1283
+ c(O, {
1284
+ disabled: m.value,
1285
1285
  variant: "tertiary",
1286
1286
  label: t(_)("common.close"),
1287
1287
  onClick: g[2] || (g[2] = (x) => r("update:show", !1))
@@ -1304,7 +1304,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1304
1304
  }, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Go = { class: "fm-typo-en-body-lg-600" }, Ko = {
1305
1305
  key: 3,
1306
1306
  class: "flex flex-col gap-4"
1307
- }, 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" }, ls = { class: "fm-typo-en-body-lg-600 shrink-0" }, ns = { 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 = {
1307
+ }, 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 = {
1308
1308
  key: 0,
1309
1309
  class: "shrink-0 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
1310
1310
  }, is = {
@@ -1317,26 +1317,26 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1317
1317
  show: { type: Boolean }
1318
1318
  },
1319
1319
  emits: ["update:show", "action:edit"],
1320
- setup(p, { emit: h }) {
1321
- const v = p, a = h, r = ge(), { t: s } = me(), u = N(() => {
1322
- var b;
1323
- return (b = v.template) == null ? void 0 : b.purchaseOrder;
1320
+ setup(f, { emit: h }) {
1321
+ const y = f, a = h, r = ge(), { t: s } = me(), u = N(() => {
1322
+ var m;
1323
+ return (m = y.template) == null ? void 0 : m.purchaseOrder;
1324
1324
  }), _ = [
1325
1325
  { accessorKey: "name", header: () => "Name" },
1326
1326
  { accessorKey: "type", header: () => "Type" }
1327
- ], C = H(""), c = N(
1327
+ ], M = H(""), v = N(
1328
1328
  () => {
1329
- var b, k, T, R;
1330
- return ((k = (b = u.value) == null ? void 0 : b.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;
1329
+ var m, k, T, R;
1330
+ 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;
1331
1331
  }
1332
- ), o = H(!0), f = Ke(v, "show");
1333
- return (b, k) => {
1332
+ ), o = H(!0), d = Ke(y, "show");
1333
+ return (m, k) => {
1334
1334
  var g;
1335
- const T = V("FmMenuDivider"), R = V("FmCard"), U = V("FmIcon"), d = V("FmTextField"), y = V("FmTable"), w = V("FmButton"), i = V("FmSideSheet");
1336
- return S(), le(i, {
1337
- header: t(s)("inventory.transfer.template.details.view", { template: (g = b.template) == null ? void 0 : g.name }),
1338
- modelValue: t(f),
1339
- "onUpdate:modelValue": k[2] || (k[2] = (O) => He(f) ? f.value = O : null),
1335
+ const T = V("FmMenuDivider"), R = V("FmCard"), U = V("FmIcon"), p = V("FmTextField"), b = V("FmTable"), w = V("FmButton"), i = V("FmSideSheet");
1336
+ return S(), ne(i, {
1337
+ header: t(s)("inventory.transfer.template.details.view", { template: (g = m.template) == null ? void 0 : g.name }),
1338
+ modelValue: t(d),
1339
+ "onUpdate:modelValue": k[2] || (k[2] = (O) => He(d) ? d.value = O : null),
1340
1340
  "dismiss-away": o.value,
1341
1341
  "close-button": "",
1342
1342
  "max-width": 1200
@@ -1346,49 +1346,49 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1346
1346
  return [
1347
1347
  e("div", Oo, [
1348
1348
  e("div", null, [
1349
- m(R, {
1349
+ c(R, {
1350
1350
  variant: "outlined",
1351
1351
  class: "flex flex-col gap-8 px-12 py-16"
1352
1352
  }, {
1353
1353
  default: B(() => {
1354
- var x, W, te, E, q, Z, l, n, F;
1354
+ var x, W, te, E, q, Z, n, l, F;
1355
1355
  return [
1356
1356
  e("div", Do, [
1357
- e("div", Vo, M(t(s)("inventory.transfer.template.details.templateSummary")), 1),
1358
- e("div", Ao, M(t(s)(
1359
- `inventory.transfer.receiveRequest.details.type.${c.value.toLocaleLowerCase("en-US")}`
1357
+ e("div", Vo, I(t(s)("inventory.transfer.template.details.templateSummary")), 1),
1358
+ e("div", Ao, I(t(s)(
1359
+ `inventory.transfer.receiveRequest.details.type.${v.value.toLocaleLowerCase("en-US")}`
1360
1360
  )), 1)
1361
1361
  ]),
1362
- m(T),
1362
+ c(T),
1363
1363
  e("div", Ro, [
1364
1364
  e("div", Bo, [
1365
1365
  e("div", Uo, [
1366
- e("div", qo, M(t(s)("inventory.transfer.receiveRequest.details.createdAt")), 1)
1366
+ e("div", qo, I(t(s)("inventory.transfer.receiveRequest.details.createdAt")), 1)
1367
1367
  ]),
1368
- e("div", Po, M(t(Rt)(((x = b.template) == null ? void 0 : x._id) ?? "")), 1)
1368
+ e("div", Po, I(t(Rt)(((x = m.template) == null ? void 0 : x._id) ?? "")), 1)
1369
1369
  ]),
1370
- (W = b.template) != null && W.updatedAt ? (S(), L("div", Lo, [
1370
+ (W = m.template) != null && W.updatedAt ? (S(), L("div", Lo, [
1371
1371
  e("div", No, [
1372
- e("div", Eo, M(t(s)("inventory.transfer.receiveRequest.details.updatedAt")), 1)
1372
+ e("div", Eo, I(t(s)("inventory.transfer.receiveRequest.details.updatedAt")), 1)
1373
1373
  ]),
1374
1374
  e("div", zo, [
1375
- ne(M(t(Bt)(new Date(b.template.updatedAt))) + " ", 1),
1376
- (te = b.template.updatedBy) != null && te.name ? (S(), L(pe, { key: 0 }, [
1377
- ne(" (" + M(b.template.updatedBy.name) + ") ", 1)
1375
+ le(I(t(Bt)(new Date(m.template.updatedAt))) + " ", 1),
1376
+ (te = m.template.updatedBy) != null && te.name ? (S(), L(pe, { key: 0 }, [
1377
+ le(" (" + I(m.template.updatedBy.name) + ") ", 1)
1378
1378
  ], 64)) : oe("", !0)
1379
1379
  ])
1380
1380
  ])) : oe("", !0),
1381
1381
  (q = (E = u.value) == null ? void 0 : E.supplier) != null && q.name ? (S(), L("div", jo, [
1382
- e("div", Qo, M(t(s)("inventory.transfer.receiveRequest.details.from")), 1),
1383
- e("div", Yo, M((l = (Z = u.value) == null ? void 0 : Z.supplier) == null ? void 0 : l.name), 1)
1382
+ e("div", Qo, I(t(s)("inventory.transfer.receiveRequest.details.from")), 1),
1383
+ e("div", Yo, I((n = (Z = u.value) == null ? void 0 : Z.supplier) == null ? void 0 : n.name), 1)
1384
1384
  ])) : oe("", !0),
1385
- (n = u.value) != null && n.ref ? (S(), L("div", Ho, [
1386
- e("div", Wo, M(t(s)("inventory.transfer.receiveRequest.details.reference")), 1),
1387
- e("div", Go, M(u.value.ref), 1)
1385
+ (l = u.value) != null && l.ref ? (S(), L("div", Ho, [
1386
+ e("div", Wo, I(t(s)("inventory.transfer.receiveRequest.details.reference")), 1),
1387
+ e("div", Go, I(u.value.ref), 1)
1388
1388
  ])) : oe("", !0),
1389
1389
  (F = u.value) != null && F.remark ? (S(), L("div", Ko, [
1390
- e("div", Zo, M(t(s)("inventory.transfer.receiveRequest.details.remark")), 1),
1391
- e("div", Jo, M(u.value.remark), 1)
1390
+ e("div", Zo, I(t(s)("inventory.transfer.receiveRequest.details.remark")), 1),
1391
+ e("div", Jo, I(u.value.remark), 1)
1392
1392
  ])) : oe("", !0)
1393
1393
  ])
1394
1394
  ];
@@ -1398,22 +1398,22 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1398
1398
  ]),
1399
1399
  e("div", Xo, [
1400
1400
  e("div", es, [
1401
- e("div", ts, M(t(s)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
1401
+ e("div", ts, I(t(s)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
1402
1402
  (S(!0), L(pe, null, Qe(((O = u.value) == null ? void 0 : O.items) ?? [], (x) => (S(), L("div", {
1403
1403
  key: x.code,
1404
1404
  class: "flex flex-col"
1405
1405
  }, [
1406
1406
  e("div", os, [
1407
- e("div", ss, M(x.name), 1),
1407
+ e("div", ss, I(x.name), 1),
1408
1408
  k[3] || (k[3] = e("div", { class: "flex-1 min-w-32" }, null, -1)),
1409
- e("div", ls, M(t(dt)(x.quantity, x.sku.unit, x.measurement)), 1)
1409
+ e("div", ns, I(t(dt)(x.quantity, x.sku.unit, x.measurement)), 1)
1410
1410
  ]),
1411
- e("div", ns, [
1412
- e("div", as, M(x.code), 1),
1413
- x.totalCost && t(r).enableTotalCost ? (S(), L("div", rs, " (" + M(t(wt)(x.totalCost)) + ") ", 1)) : oe("", !0)
1411
+ e("div", ls, [
1412
+ e("div", as, I(x.code), 1),
1413
+ x.totalCost && t(r).enableTotalCost ? (S(), L("div", rs, " (" + I(t(wt)(x.totalCost)) + ") ", 1)) : oe("", !0)
1414
1414
  ]),
1415
1415
  t(mt)(x) ? (S(), L("div", is, [
1416
- m(U, {
1416
+ c(U, {
1417
1417
  name: "error",
1418
1418
  color: "system-error-300",
1419
1419
  size: "sm"
@@ -1431,18 +1431,18 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1431
1431
  e("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " This template is only usable for the following locations. ")
1432
1432
  ], -1)),
1433
1433
  e("div", ds, [
1434
- m(d, {
1435
- modelValue: C.value,
1436
- "onUpdate:modelValue": k[0] || (k[0] = (x) => C.value = x),
1434
+ c(p, {
1435
+ modelValue: M.value,
1436
+ "onUpdate:modelValue": k[0] || (k[0] = (x) => M.value = x),
1437
1437
  placeholder: "Filter locations",
1438
1438
  "prepend-icon": "search"
1439
1439
  }, null, 8, ["modelValue"]),
1440
- m(y, {
1440
+ c(b, {
1441
1441
  "hide-footer": "",
1442
1442
  style: { height: "500px" },
1443
1443
  "column-defs": _,
1444
- "search-value": C.value,
1445
- "row-data": (($ = v.template) == null ? void 0 : $.locations) ?? [{ name: "All locations" }]
1444
+ "search-value": M.value,
1445
+ "row-data": (($ = y.template) == null ? void 0 : $.locations) ?? [{ name: "All locations" }]
1446
1446
  }, null, 8, ["search-value", "row-data"])
1447
1447
  ])
1448
1448
  ])
@@ -1451,7 +1451,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1451
1451
  }),
1452
1452
  "side-sheet-footer": B(() => [
1453
1453
  e("div", ms, [
1454
- m(w, {
1454
+ c(w, {
1455
1455
  label: t(s)("common.edit"),
1456
1456
  onClick: k[1] || (k[1] = (O) => a("action:edit")),
1457
1457
  variant: "tertiary"
@@ -1464,18 +1464,18 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1464
1464
  }
1465
1465
  }), 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" }, zs = /* @__PURE__ */ ae({
1466
1466
  __name: "TransferTemplateView",
1467
- setup(p) {
1468
- const { t: h } = me(), { createTemplate: v, viewTemplate: a, importTemplates: r, exportTemplates: s } = Le(), { templateDialogProps: u, templateDetailsProps: _ } = ze(Le()), C = pt(), { loading: c, templates: o } = ze(C), f = H(!1), b = it(), k = Ge(), { breakpoints: T } = vt();
1469
- Te(C.fetchTemplates);
1467
+ setup(f) {
1468
+ const { t: h } = me(), { createTemplate: y, viewTemplate: a, importTemplates: r, exportTemplates: s } = Le(), { templateDialogProps: u, templateDetailsProps: _ } = ze(Le()), M = pt(), { loading: v, templates: o } = ze(M), d = H(!1), m = it(), k = Ge(), { breakpoints: T } = vt();
1469
+ Te(M.fetchTemplates);
1470
1470
  const R = N(
1471
- () => f.value || c.value || !k._currentLocation
1472
- ), U = N(() => o.value), d = H(""), y = N(() => T.value.xs || T.value.sm), w = N(() => y.value ? 10 : 20);
1471
+ () => d.value || v.value || !k._currentLocation
1472
+ ), U = N(() => o.value), p = H(""), b = N(() => T.value.xs || T.value.sm), w = N(() => b.value ? 10 : 20);
1473
1473
  function i($) {
1474
1474
  switch ($) {
1475
1475
  case Ne.Add:
1476
- return v();
1476
+ return y();
1477
1477
  case "refresh":
1478
- return C.fetchTemplates();
1478
+ return M.fetchTemplates();
1479
1479
  case "import":
1480
1480
  return r();
1481
1481
  case "export":
@@ -1511,7 +1511,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1511
1511
  return ($, x) => {
1512
1512
  const W = V("FmTable");
1513
1513
  return S(), L(pe, null, [
1514
- m(ut, {
1514
+ c(ut, {
1515
1515
  title: t(h)("inventory.transfer.template.title2"),
1516
1516
  actions: O.value,
1517
1517
  "onClick:action": i
@@ -1523,65 +1523,65 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1523
1523
  class: re([
1524
1524
  "flex flex-col gap-8 max-h-full",
1525
1525
  {
1526
- "p-0": y.value,
1527
- "px-24 ": !y.value
1526
+ "p-0": b.value,
1527
+ "px-24 ": !b.value
1528
1528
  }
1529
1529
  ])
1530
1530
  }, [
1531
- m(ft, {
1531
+ c(ft, {
1532
1532
  searchable: "",
1533
- search: d.value,
1534
- "onUpdate:search": x[0] || (x[0] = (E) => d.value = E)
1533
+ search: p.value,
1534
+ "onUpdate:search": x[0] || (x[0] = (E) => p.value = E)
1535
1535
  }, null, 8, ["search"]),
1536
- (S(), le(W, {
1537
- style: xe(t(b).tableHeight),
1538
- "column-defs": t(C).columnDefs,
1536
+ (S(), ne(W, {
1537
+ style: xe(t(m).tableHeight),
1538
+ "column-defs": t(M).columnDefs,
1539
1539
  "row-data": U.value,
1540
- "search-value": d.value,
1540
+ "search-value": p.value,
1541
1541
  loading: R.value,
1542
1542
  key: (te = t(k)._currentLocation) == null ? void 0 : te.dbName,
1543
1543
  onRowClick: x[1] || (x[1] = (E) => t(a)(E.original)),
1544
1544
  "page-size": w.value
1545
1545
  }, {
1546
1546
  "list-row": B((E) => [
1547
- m(Xe, {
1547
+ c(Xe, {
1548
1548
  row: E,
1549
1549
  onRowClick: (q) => t(a)(q)
1550
1550
  }, {
1551
1551
  default: B((q) => {
1552
- var Z, l, n, F, P, z, G, D, A, K, J, I, j, ie, Ce, Ie, Me, $e, Se, Oe, ce, De, Ve, Ae, Re, fe, Be;
1552
+ var Z, n, l, F, P, z, G, D, A, K, J, C, j, ie, Ce, Ie, Me, $e, Se, Oe, ce, De, Ve, Ae, Re, fe, Be;
1553
1553
  return [
1554
1554
  e("div", cs, [
1555
1555
  e("div", fs, [
1556
1556
  e("div", ys, [
1557
- m(t(ee), {
1558
- render: (n = (l = (Z = q._id) == null ? void 0 : Z.column) == null ? void 0 : l.columnDef) == null ? void 0 : n.cell,
1557
+ c(t(ee), {
1558
+ render: (l = (n = (Z = q._id) == null ? void 0 : Z.column) == null ? void 0 : n.columnDef) == null ? void 0 : l.cell,
1559
1559
  props: (P = (F = q._id) == null ? void 0 : F.getContext) == null ? void 0 : P.call(F)
1560
1560
  }, null, 8, ["render", "props"])
1561
1561
  ]),
1562
1562
  e("div", vs, [
1563
- m(t(ee), {
1563
+ c(t(ee), {
1564
1564
  render: (D = (G = (z = q.name) == null ? void 0 : z.column) == null ? void 0 : G.columnDef) == null ? void 0 : D.cell,
1565
1565
  props: (K = (A = q.name) == null ? void 0 : A.getContext) == null ? void 0 : K.call(A)
1566
1566
  }, null, 8, ["render", "props"])
1567
1567
  ]),
1568
1568
  e("div", bs, [
1569
- m(t(ee), {
1570
- render: (j = (I = (J = q.supplier) == null ? void 0 : J.column) == null ? void 0 : I.columnDef) == null ? void 0 : j.cell,
1569
+ c(t(ee), {
1570
+ render: (j = (C = (J = q.supplier) == null ? void 0 : J.column) == null ? void 0 : C.columnDef) == null ? void 0 : j.cell,
1571
1571
  props: (Ce = (ie = q.supplier) == null ? void 0 : ie.getContext) == null ? void 0 : Ce.call(ie)
1572
1572
  }, null, 8, ["render", "props"])
1573
1573
  ]),
1574
- e("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),
1575
- e("div", gs, M(E.original.purchaseOrder.items.length ? E.original.purchaseOrder.items.map((tt) => tt.name).join(", ") : "No items"), 1),
1574
+ e("div", null, I((Ie = E.original.locations) != null && Ie.length ? `Enabled for ${(Me = E.original.locations) == null ? void 0 : Me.length} outlets` : "Enabled for all outlets"), 1),
1575
+ e("div", gs, I(E.original.purchaseOrder.items.length ? E.original.purchaseOrder.items.map((tt) => tt.name).join(", ") : "No items"), 1),
1576
1576
  e("div", hs, [
1577
- m(t(ee), {
1577
+ c(t(ee), {
1578
1578
  render: (Oe = (Se = ($e = q.ref) == null ? void 0 : $e.column) == null ? void 0 : Se.columnDef) == null ? void 0 : Oe.cell,
1579
1579
  props: (De = (ce = q.ref) == null ? void 0 : ce.getContext) == null ? void 0 : De.call(ce)
1580
1580
  }, null, 8, ["render", "props"])
1581
1581
  ])
1582
1582
  ]),
1583
1583
  e("div", null, [
1584
- m(t(ee), {
1584
+ c(t(ee), {
1585
1585
  render: (Re = (Ae = (Ve = q.type) == null ? void 0 : Ve.column) == null ? void 0 : Ae.columnDef) == null ? void 0 : Re.cell,
1586
1586
  props: (Be = (fe = q.type) == null ? void 0 : fe.getContext) == null ? void 0 : Be.call(fe)
1587
1587
  }, null, 8, ["render", "props"])
@@ -1599,10 +1599,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1599
1599
  }),
1600
1600
  _: 1
1601
1601
  }, 8, ["title", "actions"]),
1602
- (S(), le(nt, { to: "body" }, [
1603
- m(ps, at(rt(t(_))), null, 16),
1604
- m(So, Ye(t(u), {
1605
- onSubmitted: x[2] || (x[2] = (te) => t(C).fetchTemplates())
1602
+ (S(), ne(lt, { to: "body" }, [
1603
+ c(ps, at(rt(t(_))), null, 16),
1604
+ c(So, Ye(t(u), {
1605
+ onSubmitted: x[2] || (x[2] = (te) => t(M).fetchTemplates())
1606
1606
  }), null, 16)
1607
1607
  ]))
1608
1608
  ], 64);