@feedmepos/mf-inventory-portal 0.0.23-dev.19 → 0.0.23-dev.20

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 (77) hide show
  1. package/dist/{App-DY01VbHo.js → App-N2myASr3.js} +44 -41
  2. package/dist/{ApprovalView-DtwXb5T7.js → ApprovalView-B87DpnNq.js} +20 -23
  3. package/dist/{BindingsDialog-ClnnwUTV.js → BindingsDialog-DehCgt1T.js} +7 -7
  4. package/dist/{BindingsPicker-DbdkXiHx.js → BindingsPicker-BBtJ3rBB.js} +7 -8
  5. package/dist/{BindingsTable-Cqh3Ku0d.js → BindingsTable-CfHuy-K1.js} +16 -20
  6. package/dist/{ClosingDraftView-CzuMTeC1.js → ClosingDraftView-BYZ1mZrG.js} +190 -196
  7. package/dist/{ClosingTemplateView-CVQlOya4.js → ClosingTemplateView-CAL9jYaf.js} +49 -60
  8. package/dist/{FmDroppableField-8RzKjEdL.js → FmDroppableField-CC7RiBoR.js} +1 -1
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BO1wCa9i.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C4G9LaXv.js} +24 -25
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-sgvBxxkn.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BBf7jmJz.js} +56 -57
  11. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D7uvrzFU.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DjTvrLPs.js} +7 -7
  12. package/dist/{IngredientGroupView-DgDZnggI.js → IngredientGroupView-X0ST4tW9.js} +30 -37
  13. package/dist/{IngredientsView-SuCckJrj.js → IngredientsView-BUJXzpVr.js} +106 -112
  14. package/dist/{IntegrationView-CZQoHCkX.js → IntegrationView-QbuIwjec.js} +63 -65
  15. package/dist/{InventoryBindingForm-C-E3EINv.js → InventoryBindingForm-C1BR_h_3.js} +1 -1
  16. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-B3nsmCuj.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CRwcFskQ.js} +18 -20
  17. package/dist/{InventoryBindingSummary-DNiOKfO8.js → InventoryBindingSummary-gn3Gq1ok.js} +1 -1
  18. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CdYa8Pv2.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-GY3FFm5_.js} +1 -1
  19. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BwxgZ-vM.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DVwtuUg9.js} +8 -8
  20. package/dist/{PurchaseOrderPrintPreview-C6i2S9L-.js → PurchaseOrderPrintPreview-FuOYaO56.js} +13 -14
  21. package/dist/{ReceiveRequestView-BABjGvIn.js → ReceiveRequestView-BNz1brve.js} +66 -75
  22. package/dist/{RecipeView-CoMcIuHu.js → RecipeView-DRKTODfC.js} +58 -64
  23. package/dist/{StockView-DhJshtaj.js → StockView-DnMcfkGG.js} +80 -87
  24. package/dist/{SupplierView-hQtDIQzE.js → SupplierView-DAnnWZUN.js} +45 -52
  25. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DsJUSZsm.js → TransferDetails.vue_vue_type_script_setup_true_lang-BBARPa0S.js} +103 -110
  26. package/dist/{TransferTemplateView-GzwT4hp-.js → TransferTemplateView-2qlKwwKg.js} +217 -227
  27. package/dist/{UnitView-CRMF6RWu.js → UnitView-u5wZGetF.js} +103 -108
  28. package/dist/{WarehouseView-AVEDff0v.js → WarehouseView-Z80N7FJV.js} +77 -84
  29. package/dist/api/adjustment-template.d.ts +23 -0
  30. package/dist/app-Fc2FPGhO.js +58871 -0
  31. package/dist/app.d.ts +51 -0
  32. package/dist/app.js +2 -2
  33. package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
  34. package/dist/composable/defineDeepModel.d.ts +1 -1
  35. package/dist/{decimal-N5ymnwhP.js → decimal-BDD-e5Lb.js} +1 -1
  36. package/dist/{feature-Bfq8yWgS.js → feature-BMEyYowI.js} +1 -1
  37. package/dist/{format-unit-display-CXawcmvj.js → format-unit-display-DvlR_z--.js} +205 -212
  38. package/dist/{index-CcCqc9jx.js → index-CR22QBdu.js} +1 -1
  39. package/dist/{netsuite-DX6L1oLu.js → netsuite-CqMWgzKo.js} +9 -9
  40. package/dist/router/name.d.ts +1 -0
  41. package/dist/{stock-Btlxmf8R.js → stock-sIy40ix1.js} +7 -8
  42. package/dist/style.css +1 -1
  43. package/dist/supplier-Cf24JqTH.js +77 -0
  44. package/dist/tsconfig.app.tsbuildinfo +1 -1
  45. package/dist/{use-inventory-binding-dialog-BFqxWNzX.js → use-inventory-binding-dialog-Br9Uv9o8.js} +10 -11
  46. package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
  47. package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
  48. package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
  49. package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
  50. package/dist/views/adjustment-template/wastage-template/actions.d.ts +1295 -0
  51. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
  52. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
  53. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
  54. package/dist/views/adjustment-template/wastage-template/props.d.ts +29 -0
  55. package/dist/views/adjustment-template/wastage-template/table.d.ts +1273 -0
  56. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
  57. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  58. package/dist/{xlsx-C3L2eW52.js → xlsx-sL0sD2HQ.js} +1 -1
  59. package/dist/{xlsx.util-CJKLCuWK.js → xlsx.util-D2Tdwf8J.js} +1 -1
  60. package/package.json +3 -3
  61. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-m92y5x0G.js +0 -436
  62. package/dist/FmMultiselectDialog-Jr9uL_z_.js +0 -415
  63. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
  64. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  65. package/dist/app-ww5ibHkL.js +0 -33540
  66. package/dist/date2-D5MTVjlP.js +0 -117
  67. package/dist/dayjs.min-7pwGJ2aW.js +0 -282
  68. package/dist/defineDeepModel-DJODEpcR.js +0 -13
  69. package/dist/form-mode.enum-BKiNVH6A.js +0 -4
  70. package/dist/format-time-from-id-0UkRUr39.js +0 -15
  71. package/dist/fuzzy-DdOiOd-q.js +0 -41
  72. package/dist/index-Cin_fxtb.js +0 -45
  73. package/dist/index-gvJJ-xRY.js +0 -22283
  74. package/dist/row-action.enum-7rGLGZ5v.js +0 -55
  75. package/dist/rules-C83wiSGb.js +0 -203
  76. package/dist/supplier-CSzla-9I.js +0 -77
  77. package/dist/use-template-enabled-locations-2-CUkqC-cd.js +0 -86
@@ -1,25 +1,15 @@
1
- import { defineComponent as J, onMounted as ce, computed as D, ref as U, watch as pe, inject as Ze, resolveComponent as V, openBlock as R, createElementBlock as K, createElementVNode as t, createVNode as c, withCtx as q, renderSlot as Oe, withDirectives as Ve, normalizeClass as ie, vModelText as Ae, reactive as Je, h as Z, toDisplayString as O, unref as e, createBlock as W, mergeProps as Ue, isRef as Ee, createCommentVNode as Y, Fragment as qe, renderList as Xe, normalizeStyle as Ye, Teleport as et, normalizeProps as tt, guardReactiveProps as ot } from "vue";
2
- import { u as st, _ as lt, a as nt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-m92y5x0G.js";
1
+ import { defineComponent as J, onMounted as ce, computed as R, ref as U, watch as pe, inject as Ze, resolveComponent as V, openBlock as D, createElementBlock as K, createElementVNode as t, createVNode as c, withCtx as q, renderSlot as Oe, withDirectives as Ve, normalizeClass as ie, vModelText as Ae, reactive as Je, h as Z, toDisplayString as O, unref as e, createBlock as W, mergeProps as Ue, isRef as Ee, createCommentVNode as Y, Fragment as qe, renderList as Xe, normalizeStyle as Ye, Teleport as et, normalizeProps as tt, guardReactiveProps as ot } from "vue";
2
+ import { w as Ne, ar as ue, t as De, I as st, as as lt, at as nt, h as G, au as at, Q as Re, k as me, a as ze, G as re, z as rt, A as de, M as it, v as j, u as He, a7 as ut, s as Qe, x as mt, y as dt, c as ee, av as ne, a6 as ct, V as pt, p as ft, f as Pe, q as yt, r as vt } from "./app-Fc2FPGhO.js";
3
3
  import { useI18n as X } from "@feedmepos/mf-common";
4
- import { P as j, a as rt, f as at, t as it, b as Re, u as ut } from "./format-unit-display-CXawcmvj.js";
5
- import { R as De } from "./row-action.enum-7rGLGZ5v.js";
6
- import { a as Ne, u as ze, A as ne } from "./app-ww5ibHkL.js";
7
- import { components as re, useDialog as mt, useSnackbar as dt, useProxiedModel as je, useBreakpoints as ct } from "@feedmepos/ui-library";
8
- import { storeToRefs as Pe } from "pinia";
9
- import { F as ee } from "./form-mode.enum-BKiNVH6A.js";
10
- import { u as ue, t as Le, I as pt, n as ft, o as yt, a as G, p as vt, R as me, g as ae, c as bt, A as de, M as xt, b as _t, j as ht } from "./rules-C83wiSGb.js";
11
- import { d as He } from "./defineDeepModel-DJODEpcR.js";
12
- import { _ as gt, b as Ft, F as Tt, a as wt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-sgvBxxkn.js";
13
- import { u as Qe } from "./feature-Bfq8yWgS.js";
14
- import { u as Ke } from "./netsuite-DX6L1oLu.js";
15
- import { c as kt, u as St, _ as Ct } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BO1wCa9i.js";
16
- import { F as Be } from "./index-gvJJ-xRY.js";
17
- import { u as Mt } from "./supplier-CSzla-9I.js";
18
- import { F as $t } from "./FmMultiselectDialog-Jr9uL_z_.js";
19
- import { F as Q, _ as Ge } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
20
- import { u as It } from "./use-template-enabled-locations-2-CUkqC-cd.js";
21
- import { f as Ot } from "./format-time-from-id-0UkRUr39.js";
22
- const Vt = { class: "flex flex-col" }, At = { class: "flex flex-col" }, Rt = { class: "flex-1" }, Dt = { class: "flex items-center" }, Pt = { class: "flex-1" }, Lt = { class: "flex-1" }, Bt = /* @__PURE__ */ J({
4
+ import { P as H, a as bt, f as xt, t as _t, b as Le, u as ht } from "./format-unit-display-DvlR_z--.js";
5
+ import { components as ae, useDialog as gt, useSnackbar as Tt, useProxiedModel as je, useBreakpoints as Ft } from "@feedmepos/ui-library";
6
+ import { storeToRefs as Be } from "pinia";
7
+ import { _ as wt, b as kt, F as St, a as Ct } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-BBf7jmJz.js";
8
+ import { u as Ke } from "./feature-BMEyYowI.js";
9
+ import { u as Ge } from "./netsuite-CqMWgzKo.js";
10
+ import { c as Mt, u as $t, _ as It } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C4G9LaXv.js";
11
+ import { u as Ot } from "./supplier-Cf24JqTH.js";
12
+ const Vt = { class: "flex flex-col" }, At = { class: "flex flex-col" }, Dt = { class: "flex-1" }, Rt = { class: "flex items-center" }, Pt = { class: "flex-1" }, Lt = { class: "flex-1" }, Bt = /* @__PURE__ */ J({
23
13
  __name: "FmMinMaxInput",
24
14
  props: {
25
15
  rules: {},
@@ -57,40 +47,40 @@ const Vt = { class: "flex flex-col" }, At = { class: "flex flex-col" }, Rt = { c
57
47
  helperState: {}
58
48
  },
59
49
  setup(y) {
60
- const x = y, u = He("modelValue"), o = pt();
50
+ const x = y, u = Ne("modelValue"), o = st();
61
51
  ce(() => {
62
- const { min: p, max: a } = u ?? {};
63
- if (!(!p || !a) && p.precision !== a.precision) {
64
- const b = Math.max(p.precision, a.precision), r = ue(p, b), f = ue(a, b);
65
- u.min = r, u.max = f;
52
+ const { min: p, max: r } = u ?? {};
53
+ if (!(!p || !r) && p.precision !== r.precision) {
54
+ const b = Math.max(p.precision, r.precision), a = ue(p, b), f = ue(r, b);
55
+ u.min = a, u.max = f;
66
56
  }
67
57
  });
68
- const m = D(() => {
69
- const { min: p, max: a } = u ?? {};
70
- return Math.max((p == null ? void 0 : p.precision) ?? 0, (a == null ? void 0 : a.precision) ?? 0, x.precision ?? 0);
58
+ const m = R(() => {
59
+ const { min: p, max: r } = u ?? {};
60
+ return Math.max((p == null ? void 0 : p.precision) ?? 0, (r == null ? void 0 : r.precision) ?? 0, x.precision ?? 0);
71
61
  }), S = (p) => {
72
62
  if (!p) return "";
73
- const a = ft(p), b = m.value, r = ue(a, b);
74
- return yt(
75
- +G(r),
76
- r.precision
63
+ const r = lt(p), b = m.value, a = ue(r, b);
64
+ return nt(
65
+ +G(a),
66
+ a.precision
77
67
  );
78
68
  }, i = U(S(u.min)), l = U(S(u.max));
79
- pe([i, l], ([p, a]) => {
80
- const b = u ?? {}, r = o(p), f = o(a), w = m.value;
81
- if (p !== "" && r === !0) {
82
- const s = Le(+p, w);
69
+ pe([i, l], ([p, r]) => {
70
+ const b = u ?? {}, a = o(p), f = o(r), w = m.value;
71
+ if (p !== "" && a === !0) {
72
+ const s = De(+p, w);
83
73
  b.min = s;
84
74
  } else
85
75
  b.min = null;
86
- if (a !== "" && f === !0) {
87
- const s = Le(+a, w);
76
+ if (r !== "" && f === !0) {
77
+ const s = De(+r, w);
88
78
  b.max = s;
89
79
  } else
90
80
  b.max = null;
91
81
  u.min = b.min, u.max = b.max;
92
82
  });
93
- const d = Symbol.for("fm:form-state"), k = Ze(d, null), h = D(() => x.disabled ?? (k == null ? void 0 : k.getDisabled()) ?? !1), A = U(), T = U(), v = U(!1), g = U(!1), I = D(() => v.value || g.value), B = D(() => [...[
83
+ const d = Symbol.for("fm:form-state"), k = Ze(d, null), h = R(() => x.disabled ?? (k == null ? void 0 : k.getDisabled()) ?? !1), A = U(), F = U(), v = U(!1), g = U(!1), I = R(() => v.value || g.value), B = R(() => [...[
94
84
  function() {
95
85
  return typeof o(i.value) == "string" || typeof o(l.value) == "string" ? "Must be a number" : !0;
96
86
  },
@@ -98,11 +88,11 @@ const Vt = { class: "flex flex-col" }, At = { class: "flex flex-col" }, Rt = { c
98
88
  return !b || !b.min || !b.max ? !0 : +G(b.min) > +G(b.max) ? "Min must be less than or equal to max" : !0;
99
89
  }
100
90
  ], ...x.rules ?? []]);
101
- return (p, a) => {
102
- const b = V("FmLabel"), r = V("FmField"), f = V("FmFormGroup");
103
- return R(), K("div", Vt, [
91
+ return (p, r) => {
92
+ const b = V("FmLabel"), a = V("FmField"), f = V("FmFormGroup");
93
+ return D(), K("div", Vt, [
104
94
  t("div", At, [
105
- t("div", Rt, [
95
+ t("div", Dt, [
106
96
  c(b, {
107
97
  label: p.label,
108
98
  disabled: p.disabled,
@@ -110,19 +100,19 @@ const Vt = { class: "flex flex-col" }, At = { class: "flex flex-col" }, Rt = { c
110
100
  optional: p.labelMark === "optional"
111
101
  }, null, 8, ["label", "disabled", "required", "optional"])
112
102
  ]),
113
- c(r, { focused: I.value }, {
103
+ c(a, { focused: I.value }, {
114
104
  default: q(() => [
115
- t("div", Dt, [
105
+ t("div", Rt, [
116
106
  Oe(p.$slots, "prepend"),
117
- a[6] || (a[6] = t("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Min.", -1)),
107
+ r[6] || (r[6] = t("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Min.", -1)),
118
108
  t("div", Pt, [
119
109
  Ve(t("input", {
120
110
  type: "text",
121
111
  ref_key: "minInputRef",
122
112
  ref: A,
123
- onFocus: a[0] || (a[0] = () => v.value = !0),
124
- onBlur: a[1] || (a[1] = () => v.value = !1),
125
- "onUpdate:modelValue": a[2] || (a[2] = (w) => i.value = w),
113
+ onFocus: r[0] || (r[0] = () => v.value = !0),
114
+ onBlur: r[1] || (r[1] = () => v.value = !1),
115
+ "onUpdate:modelValue": r[2] || (r[2] = (w) => i.value = w),
126
116
  class: ie({
127
117
  "fm-text-field--input fm-typo-en-body-lg-400": !0,
128
118
  "text-fm-color-typo-primary": !h.value,
@@ -132,16 +122,16 @@ const Vt = { class: "flex flex-col" }, At = { class: "flex flex-col" }, Rt = { c
132
122
  [Ae, i.value]
133
123
  ])
134
124
  ]),
135
- a[7] || (a[7] = t("div", { class: "block h-32 mx-4 w-[1px] bg-fm-color-neutral-gray-200" }, null, -1)),
136
- a[8] || (a[8] = t("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Max.", -1)),
125
+ r[7] || (r[7] = t("div", { class: "block h-32 mx-4 w-[1px] bg-fm-color-neutral-gray-200" }, null, -1)),
126
+ r[8] || (r[8] = t("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Max.", -1)),
137
127
  t("div", Lt, [
138
128
  Ve(t("input", {
139
129
  type: "text",
140
130
  ref_key: "maxInputRef",
141
- ref: T,
142
- onFocus: a[3] || (a[3] = () => g.value = !0),
143
- onBlur: a[4] || (a[4] = () => g.value = !1),
144
- "onUpdate:modelValue": a[5] || (a[5] = (w) => l.value = w),
131
+ ref: F,
132
+ onFocus: r[3] || (r[3] = () => g.value = !0),
133
+ onBlur: r[4] || (r[4] = () => g.value = !1),
134
+ "onUpdate:modelValue": r[5] || (r[5] = (w) => l.value = w),
145
135
  class: ie({
146
136
  "fm-text-field--input fm-typo-en-body-lg-400": !0,
147
137
  "text-fm-color-typo-primary": !h.value,
@@ -180,7 +170,7 @@ function Et(y, x) {
180
170
  };
181
171
  }
182
172
  function qt(y) {
183
- const x = vt(y), u = G(y);
173
+ const x = at(y), u = G(y);
184
174
  return function(m) {
185
175
  const S = !(m != null && m.min) || x(m.min) === !0, i = !(m != null && m.max) || x(m.max) === !0;
186
176
  return !S && !i ? `Min & max must be a multiple of ${u}` : S ? i ? !0 : `Max must be a multiple of ${u}` : `Min must be a multiple of ${u}`;
@@ -188,14 +178,14 @@ function qt(y) {
188
178
  }
189
179
  var L = /* @__PURE__ */ ((y) => (y.Code = "Code", y.Name = "Name", y.DefaultAmount = "DefaultAmount", y.Limit = "Limit", y.MinimumAmount = "MinimumAmount", y.Step = "Step", y.Cost = "Cost", y.Delete = "Delete", y))(L || {});
190
180
  function Nt(y) {
191
- const { t: x } = X(), u = Ke(), o = Je({});
181
+ const { t: x } = X(), u = Ge(), o = Je({});
192
182
  ce(() => {
193
183
  for (const i of y.items) {
194
184
  if (!i.totalCost)
195
185
  continue;
196
- const l = kt(i.sku, i.quantity, i.measurement, {
186
+ const l = Mt(i.sku, i.quantity, i.measurement, {
197
187
  supplier: y.supplier
198
- }), d = i.totalCost ?? Be.reset();
188
+ }), d = i.totalCost ?? Re.reset();
199
189
  l ? o[i.sku._id] = l.amount !== d.amount || l.precision !== d.precision : o[i.sku._id] = !0;
200
190
  }
201
191
  });
@@ -207,7 +197,7 @@ function Nt(y) {
207
197
  size: 180,
208
198
  cell(i) {
209
199
  const l = i.row.original;
210
- return Z(re.FmTextField, {
200
+ return Z(ae.FmTextField, {
211
201
  modelValue: l.code,
212
202
  "onUpdate:modelValue": (d) => {
213
203
  y.updateItem({
@@ -228,7 +218,7 @@ function Nt(y) {
228
218
  minSize: 300,
229
219
  cell(i) {
230
220
  const l = i.row.original;
231
- return Z(re.FmTextField, {
221
+ return Z(ae.FmTextField, {
232
222
  modelValue: l.name,
233
223
  "onUpdate:modelValue": (d) => {
234
224
  y.updateItem({
@@ -249,11 +239,11 @@ function Nt(y) {
249
239
  minSize: 200,
250
240
  cell(i) {
251
241
  var v;
252
- const l = i.row.original, d = Ne(), k = d.skuById[l.sku._id], h = d.unitById[(v = k.unit) == null ? void 0 : v._id], A = h.measurements.find((g) => {
242
+ const l = i.row.original, d = ze(), k = d.skuById[l.sku._id], h = d.unitById[(v = k.unit) == null ? void 0 : v._id], A = h.measurements.find((g) => {
253
243
  var I;
254
244
  return ((I = l.measurement) == null ? void 0 : I.id) === g.id;
255
- }), T = l.sku.unit._id !== k.unit._id || !h || l.measurement && !A;
256
- return Z(gt, {
245
+ }), F = l.sku.unit._id !== k.unit._id || !h || l.measurement && !A;
246
+ return Z(wt, {
257
247
  style: {
258
248
  flex: "1 1 0%"
259
249
  },
@@ -281,21 +271,21 @@ function Nt(y) {
281
271
  });
282
272
  },
283
273
  rules: [
284
- Ft(l.quantityStep),
285
- Tt(
274
+ kt(l.quantityStep),
275
+ St(
286
276
  +G(
287
277
  l.minimumQuantity ?? {
288
278
  amount: 1,
289
279
  // NOTE: leave this reading from row.sku.unit and row.measurement instead,
290
- precision: ae(l.sku.unit, l.measurement)
280
+ precision: re(l.sku.unit, l.measurement)
291
281
  }
292
282
  )
293
283
  ),
294
- wt(
284
+ Ct(
295
285
  l.maximumQuantity ? +G(l.maximumQuantity) : 1 / 0
296
286
  ),
297
287
  function(I) {
298
- return T ? "This item is no longer valid due to change in unit. Please reapply unit." : !0;
288
+ return F ? "This item is no longer valid due to change in unit. Please reapply unit." : !0;
299
289
  }
300
290
  ],
301
291
  applyDefaultRules: !0
@@ -331,7 +321,7 @@ function Nt(y) {
331
321
  Et(
332
322
  +G({
333
323
  amount: 1,
334
- precision: ae(l.sku.unit, l.measurement)
324
+ precision: re(l.sku.unit, l.measurement)
335
325
  }),
336
326
  1 / 0
337
327
  )
@@ -347,21 +337,21 @@ function Nt(y) {
347
337
  minSize: 100,
348
338
  cell(i) {
349
339
  const l = i.row.original;
350
- return Z(re.FmTextField, {
351
- modelValue: G(l.quantityStep ?? Be.reset(), !1),
340
+ return Z(ae.FmTextField, {
341
+ modelValue: G(l.quantityStep ?? Re.reset(), !1),
352
342
  key: l.sku._id,
353
343
  "onUpdate:modelValue": (d) => {
354
344
  y.updateItem({
355
345
  ...l,
356
- quantityStep: bt(+d)
346
+ quantityStep: rt(+d)
357
347
  });
358
348
  },
359
349
  rules: [
360
350
  de({
361
351
  amount: 1,
362
- precision: ae(l.sku.unit, l.measurement)
352
+ precision: re(l.sku.unit, l.measurement)
363
353
  }),
364
- xt(l.sku.unit, l.measurement)
354
+ it(l.sku.unit, l.measurement)
365
355
  ]
366
356
  });
367
357
  },
@@ -372,7 +362,7 @@ function Nt(y) {
372
362
  header: "",
373
363
  cell(i) {
374
364
  const l = i.row.original;
375
- return Z(re.FmButton, {
365
+ return Z(ae.FmButton, {
376
366
  class: "delete-button",
377
367
  key: l.sku._id,
378
368
  type: "button",
@@ -394,10 +384,10 @@ function Nt(y) {
394
384
  }
395
385
  ];
396
386
  return {
397
- columnDefs: D(() => Qe().enableTotalCost && y.transferType === j.PURCHASE ? m : m.filter((l) => l.id !== "Cost"))
387
+ columnDefs: R(() => Ke().enableTotalCost && y.transferType === H.PURCHASE ? m : m.filter((l) => l.id !== "Cost"))
398
388
  };
399
389
  }
400
- const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-center" }, Ht = { class: "flex-1 flex gap-1 items-center" }, Qt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Kt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Gt = { class: "flex gap-8 w-full" }, Wt = { class: "flex-1 flex flex-col gap-4" }, Zt = { class: "flex-1 flex flex-col gap-4" }, Jt = { class: "flex gap-8 w-full" }, Xt = { class: "flex-1 flex flex-col gap-4" }, Yt = { class: "flex-1 flex flex-col gap-4" }, eo = { class: "flex gap-8 w-full" }, to = { class: "flex-1 flex flex-col gap-4" }, oo = /* @__PURE__ */ J({
390
+ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-center" }, Qt = { class: "flex-1 flex gap-1 items-center" }, jt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Kt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Gt = { class: "flex gap-8 w-full" }, Wt = { class: "flex-1 flex flex-col gap-4" }, Zt = { class: "flex-1 flex flex-col gap-4" }, Jt = { class: "flex gap-8 w-full" }, Xt = { class: "flex-1 flex flex-col gap-4" }, Yt = { class: "flex-1 flex flex-col gap-4" }, eo = { class: "flex gap-8 w-full" }, to = { class: "flex-1 flex flex-col gap-4" }, oo = /* @__PURE__ */ J({
401
391
  __name: "TransferTemplateItem",
402
392
  props: {
403
393
  cellByColId: {},
@@ -406,16 +396,16 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
406
396
  setup(y) {
407
397
  const { t: x } = X();
408
398
  return (u, o) => {
409
- var S, i, l, d, k, h, A, T, v, g, I, B, p, a, b, r, f, w, s, n, C, $, M, _, P, E, N, H, F, z;
399
+ var S, i, l, d, k, h, A, F, v, g, I, B, p, r, b, a, f, w, s, n, C, $, M, _, P, E, N, Q, T, z;
410
400
  const m = V("FmLabel");
411
- return R(), K("div", zt, [
412
- t("div", jt, [
413
- t("div", Ht, [
414
- t("span", Qt, " (" + O(u.row.original.sku.code) + ") ", 1),
401
+ return D(), K("div", zt, [
402
+ t("div", Ht, [
403
+ t("div", Qt, [
404
+ t("span", jt, " (" + O(u.row.original.sku.code) + ") ", 1),
415
405
  t("span", Kt, O(u.row.original.sku.name), 1)
416
406
  ]),
417
407
  t("div", null, [
418
- c(e(Q), {
408
+ c(e(j), {
419
409
  render: (l = (i = (S = u.cellByColId.Delete) == null ? void 0 : S.column) == null ? void 0 : i.columnDef) == null ? void 0 : l.cell,
420
410
  props: (k = (d = u.cellByColId.Delete) == null ? void 0 : d.getContext) == null ? void 0 : k.call(d)
421
411
  }, null, 8, ["render", "props"])
@@ -426,8 +416,8 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
426
416
  c(m, {
427
417
  label: e(x)(`inventory.transfer.form.items.table.${e(L).Code}`)
428
418
  }, null, 8, ["label"]),
429
- c(e(Q), {
430
- render: (T = (A = (h = u.cellByColId[e(L).Code]) == null ? void 0 : h.column) == null ? void 0 : A.columnDef) == null ? void 0 : T.cell,
419
+ c(e(j), {
420
+ render: (F = (A = (h = u.cellByColId[e(L).Code]) == null ? void 0 : h.column) == null ? void 0 : A.columnDef) == null ? void 0 : F.cell,
431
421
  props: (g = (v = u.cellByColId[e(L).Code]) == null ? void 0 : v.getContext) == null ? void 0 : g.call(v)
432
422
  }, null, 8, ["render", "props"]),
433
423
  o[0] || (o[0] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
@@ -436,9 +426,9 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
436
426
  c(m, {
437
427
  label: e(x)(`inventory.transfer.form.items.table.${e(L).Name}`)
438
428
  }, null, 8, ["label"]),
439
- c(e(Q), {
429
+ c(e(j), {
440
430
  render: (p = (B = (I = u.cellByColId[e(L).Name]) == null ? void 0 : I.column) == null ? void 0 : B.columnDef) == null ? void 0 : p.cell,
441
- props: (b = (a = u.cellByColId[e(L).Name]) == null ? void 0 : a.getContext) == null ? void 0 : b.call(a)
431
+ props: (b = (r = u.cellByColId[e(L).Name]) == null ? void 0 : r.getContext) == null ? void 0 : b.call(r)
442
432
  }, null, 8, ["render", "props"]),
443
433
  o[1] || (o[1] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
444
434
  ])
@@ -448,8 +438,8 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
448
438
  c(m, {
449
439
  label: e(x)(`inventory.transfer.form.items.table.${e(L).DefaultAmount}`)
450
440
  }, null, 8, ["label"]),
451
- c(e(Q), {
452
- render: (w = (f = (r = u.cellByColId[e(L).DefaultAmount]) == null ? void 0 : r.column) == null ? void 0 : f.columnDef) == null ? void 0 : w.cell,
441
+ c(e(j), {
442
+ render: (w = (f = (a = u.cellByColId[e(L).DefaultAmount]) == null ? void 0 : a.column) == null ? void 0 : f.columnDef) == null ? void 0 : w.cell,
453
443
  props: (n = (s = u.cellByColId[e(L).DefaultAmount]) == null ? void 0 : s.getContext) == null ? void 0 : n.call(s)
454
444
  }, null, 8, ["render", "props"]),
455
445
  o[2] || (o[2] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
@@ -458,7 +448,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
458
448
  c(m, {
459
449
  label: e(x)(`inventory.transfer.form.items.table.${e(L).Step}`)
460
450
  }, null, 8, ["label"]),
461
- c(e(Q), {
451
+ c(e(j), {
462
452
  render: (M = ($ = (C = u.cellByColId[e(L).Step]) == null ? void 0 : C.column) == null ? void 0 : $.columnDef) == null ? void 0 : M.cell,
463
453
  props: (P = (_ = u.cellByColId[e(L).Step]) == null ? void 0 : _.getContext) == null ? void 0 : P.call(_)
464
454
  }, null, 8, ["render", "props"]),
@@ -470,9 +460,9 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
470
460
  c(m, {
471
461
  label: e(x)(`inventory.transfer.form.items.table.${e(L).Limit}`)
472
462
  }, null, 8, ["label"]),
473
- c(e(Q), {
474
- render: (H = (N = (E = u.cellByColId[e(L).Limit]) == null ? void 0 : E.column) == null ? void 0 : N.columnDef) == null ? void 0 : H.cell,
475
- props: (z = (F = u.cellByColId[e(L).Limit]) == null ? void 0 : F.getContext) == null ? void 0 : z.call(F)
463
+ c(e(j), {
464
+ render: (Q = (N = (E = u.cellByColId[e(L).Limit]) == null ? void 0 : E.column) == null ? void 0 : N.columnDef) == null ? void 0 : Q.cell,
465
+ props: (z = (T = u.cellByColId[e(L).Limit]) == null ? void 0 : T.getContext) == null ? void 0 : z.call(T)
476
466
  }, null, 8, ["render", "props"]),
477
467
  o[4] || (o[4] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
478
468
  ])
@@ -480,14 +470,14 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
480
470
  ]);
481
471
  };
482
472
  }
483
- }), so = { class: "flex flex-col gap-16" }, lo = { class: "flex flex-col gap-24" }, no = { class: "flex flex-col gap-16" }, ro = { class: "flex items-center" }, ao = { class: "flex flex-col" }, io = { class: "flex flex-col gap-16" }, uo = { class: "flex" }, mo = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, co = /* @__PURE__ */ J({
473
+ }), so = { class: "flex flex-col gap-16" }, lo = { class: "flex flex-col gap-24" }, no = { class: "flex flex-col gap-16" }, ao = { class: "flex items-center" }, ro = { class: "flex flex-col" }, io = { class: "flex flex-col gap-16" }, uo = { class: "flex" }, mo = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, co = /* @__PURE__ */ J({
484
474
  __name: "TransferTemplateForm",
485
475
  props: {
486
476
  modelValue: {},
487
477
  disabled: { type: Boolean }
488
478
  },
489
479
  setup(y, { expose: x }) {
490
- const u = y, o = He(), { t: m } = X(), S = ze(), i = Ne(), l = Mt(), d = Ke();
480
+ const u = y, o = Ne(), { t: m } = X(), S = He(), i = ze(), l = Ot(), d = Ge();
491
481
  pe(
492
482
  () => u.modelValue,
493
483
  (s) => {
@@ -496,7 +486,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
496
486
  ), S.watchLocation(async () => {
497
487
  location && (o.purchaseOrder.supplier || (o.purchaseOrder.supplier = l.suppliers.find((s) => s) ?? o.purchaseOrder.supplier));
498
488
  });
499
- const k = mt(), h = St(
489
+ const k = gt(), h = $t(
500
490
  () => o.purchaseOrder,
501
491
  (s) => {
502
492
  o.purchaseOrder = {
@@ -504,17 +494,17 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
504
494
  supplier: s.supplier ?? (o == null ? void 0 : o.purchaseOrder.supplier)
505
495
  };
506
496
  }
507
- ), A = D({
497
+ ), A = R({
508
498
  get() {
509
499
  var s, n;
510
- return typeof ((n = (s = o.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : n.internal) == "string" ? j.TRANSFER : j.PURCHASE;
500
+ return typeof ((n = (s = o.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : n.internal) == "string" ? H.TRANSFER : H.PURCHASE;
511
501
  },
512
502
  set(s) {
513
503
  var C, $;
514
- const n = typeof (($ = (C = o.purchaseOrder) == null ? void 0 : C.supplier) == null ? void 0 : $.internal) == "string" ? j.TRANSFER : j.PURCHASE;
515
- s !== n && (o.purchaseOrder.supplier = s === j.PURCHASE ? h.locationOptionsTypePurchase.value[0] : h.locationOptionsTypeTransfer.value[0]);
504
+ const n = typeof (($ = (C = o.purchaseOrder) == null ? void 0 : C.supplier) == null ? void 0 : $.internal) == "string" ? H.TRANSFER : H.PURCHASE;
505
+ s !== n && (o.purchaseOrder.supplier = s === H.PURCHASE ? h.locationOptionsTypePurchase.value[0] : h.locationOptionsTypeTransfer.value[0]);
516
506
  }
517
- }), T = D(() => h.transferLocationOptions.value), v = D({
507
+ }), F = R(() => h.transferLocationOptions.value), v = R({
518
508
  get() {
519
509
  var s;
520
510
  return (s = o.purchaseOrder.supplier) == null ? void 0 : s._id;
@@ -526,7 +516,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
526
516
  promptSelectLocations: g,
527
517
  columnDefs: I,
528
518
  rowData: B
529
- } = It({
519
+ } = ut({
530
520
  getLocations() {
531
521
  return o.locations;
532
522
  },
@@ -541,7 +531,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
541
531
  return (($ = C.doc) == null ? void 0 : $._id) === ((M = o.purchaseOrder.supplier) == null ? void 0 : M._id);
542
532
  }) ? `Location ${(n = o.purchaseOrder.supplier) == null ? void 0 : n.name} must be removed because template cannot be used to transfer to itself.` : !0;
543
533
  }
544
- const a = D({
534
+ const r = R({
545
535
  get() {
546
536
  return o.purchaseOrder.remark ?? void 0;
547
537
  },
@@ -563,7 +553,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
563
553
  (n = (s = b.value) == null ? void 0 : s.resetInputs) == null || n.call(s);
564
554
  }
565
555
  });
566
- const r = Nt({
556
+ const a = Nt({
567
557
  updateItem: (s) => {
568
558
  o.purchaseOrder.items = o.purchaseOrder.items.map((n) => n.sku._id !== s.sku._id ? n : s);
569
559
  },
@@ -579,12 +569,12 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
579
569
  return o.purchaseOrder.items;
580
570
  },
581
571
  get transferType() {
582
- return j.PURCHASE;
572
+ return H.PURCHASE;
583
573
  },
584
574
  get disabled() {
585
575
  return u.disabled;
586
576
  }
587
- }), f = D(() => r.columnDefs.value);
577
+ }), f = R(() => a.columnDefs.value);
588
578
  function w() {
589
579
  const s = i.skus.map((C) => ({
590
580
  label: C.name,
@@ -597,7 +587,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
597
587
  k.open({
598
588
  title: m("inventory.transfer.form.items.selectItem"),
599
589
  closeButton: !0,
600
- contentComponent: $t,
590
+ contentComponent: mt,
601
591
  contentComponentProps: {
602
592
  modelValue: n,
603
593
  items: s,
@@ -614,22 +604,22 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
614
604
  }
615
605
  }).onPrimary((C) => {
616
606
  const $ = o.purchaseOrder.items ?? [], M = C.map((_) => {
617
- const P = $.find((F) => F.sku._id === _._id);
607
+ const P = $.find((T) => T.sku._id === _._id);
618
608
  if (P)
619
609
  return P;
620
610
  let E = _.code;
621
611
  if (d.isEnabled) {
622
- const F = d.getItemPKTCode(_);
623
- F && (E = F);
612
+ const T = d.getItemPKTCode(_);
613
+ T && (E = T);
624
614
  }
625
- const N = { amount: 1, precision: ae(_.unit) };
615
+ const N = { amount: 1, precision: re(_.unit) };
626
616
  return {
627
617
  sku: _,
628
618
  code: E,
629
619
  name: _.name,
630
620
  quantity: N,
631
621
  minimumQuantity: N,
632
- maximumQuantity: _t(N, {
622
+ maximumQuantity: dt(N, {
633
623
  amount: 100,
634
624
  precision: 0
635
625
  }),
@@ -641,14 +631,14 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
641
631
  }
642
632
  return (s, n) => {
643
633
  const C = V("FmTextField"), $ = V("FmSelect"), M = V("FmTextarea"), _ = V("FmButton"), P = V("FmTable"), E = V("FmFormGroup"), N = V("FmForm");
644
- return R(), W(N, {
634
+ return D(), W(N, {
645
635
  ref_key: "formRef",
646
636
  ref: b,
647
637
  class: "flex flex-col gap-32",
648
638
  disabled: s.disabled
649
639
  }, {
650
640
  default: q(() => {
651
- var H;
641
+ var Q;
652
642
  return [
653
643
  t("div", so, [
654
644
  t("div", lo, [
@@ -656,40 +646,40 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
656
646
  label: e(m)("inventory.transfer.form.name"),
657
647
  "label-mark": "required",
658
648
  modelValue: e(o).name,
659
- "onUpdate:modelValue": n[0] || (n[0] = (F) => e(o).name = F),
649
+ "onUpdate:modelValue": n[0] || (n[0] = (T) => e(o).name = T),
660
650
  rules: [e(me)()]
661
651
  }, null, 8, ["label", "modelValue", "rules"]),
662
652
  c($, {
663
653
  label: e(m)("inventory.transfer.form.type.title"),
664
654
  "model-value": A.value,
665
- "onUpdate:modelValue": n[1] || (n[1] = (F) => A.value = F),
655
+ "onUpdate:modelValue": n[1] || (n[1] = (T) => A.value = T),
666
656
  items: [
667
657
  {
668
658
  label: e(m)("inventory.transfer.form.type.purchase"),
669
- value: e(j).PURCHASE,
659
+ value: e(H).PURCHASE,
670
660
  disabled: !e(h).locationOptionsTypePurchase.value.length,
671
661
  sublabel: e(h).locationOptionsTypePurchase.value.length ? void 0 : e(m)("inventory.transfer.form.noSupplierAvailable")
672
662
  },
673
663
  {
674
664
  label: e(m)("inventory.transfer.form.type.transfer"),
675
- value: e(j).TRANSFER,
665
+ value: e(H).TRANSFER,
676
666
  disabled: !e(h).locationOptionsTypeTransfer.value.length,
677
667
  sublabel: e(h).locationOptionsTypeTransfer.value.length ? void 0 : e(m)("inventory.transfer.form.noLocationAvailable")
678
668
  }
679
669
  ],
680
- rules: [e(de)(1)(T.value)]
670
+ rules: [e(de)(1)(F.value)]
681
671
  }, null, 8, ["label", "model-value", "items", "rules"]),
682
672
  c($, {
683
- label: A.value === e(j).PURCHASE ? e(m)("inventory.transfer.form.purchaseFrom") : e(m)("inventory.transfer.form.transferFrom"),
673
+ label: A.value === e(H).PURCHASE ? e(m)("inventory.transfer.form.purchaseFrom") : e(m)("inventory.transfer.form.transferFrom"),
684
674
  modelValue: v.value,
685
- "onUpdate:modelValue": n[2] || (n[2] = (F) => v.value = F),
686
- items: T.value
675
+ "onUpdate:modelValue": n[2] || (n[2] = (T) => v.value = T),
676
+ items: F.value
687
677
  }, {
688
- "menu-wrapper": q((F) => {
678
+ "menu-wrapper": q((T) => {
689
679
  var z;
690
680
  return [
691
- c(Ct, Ue(F, {
692
- items: T.value,
681
+ c(It, Ue(T, {
682
+ items: F.value,
693
683
  "model-value": (z = s.modelValue.purchaseOrder.supplier) == null ? void 0 : z._id
694
684
  }), null, 16, ["items", "model-value"])
695
685
  ];
@@ -700,20 +690,20 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
700
690
  label: e(m)("inventory.transfer.form.reference"),
701
691
  "label-mark": "optional",
702
692
  modelValue: e(o).purchaseOrder.ref,
703
- "onUpdate:modelValue": n[3] || (n[3] = (F) => e(o).purchaseOrder.ref = F)
693
+ "onUpdate:modelValue": n[3] || (n[3] = (T) => e(o).purchaseOrder.ref = T)
704
694
  }, null, 8, ["label", "modelValue"]),
705
695
  c(M, {
706
696
  label: e(m)("inventory.transfer.form.remark"),
707
697
  "label-mark": "optional",
708
698
  "max-length": 240,
709
- modelValue: a.value,
710
- "onUpdate:modelValue": n[4] || (n[4] = (F) => a.value = F),
699
+ modelValue: r.value,
700
+ "onUpdate:modelValue": n[4] || (n[4] = (T) => r.value = T),
711
701
  class: ie({ "text-fm-color-typo-disabled": s.disabled })
712
702
  }, null, 8, ["label", "modelValue", "class"])
713
703
  ])
714
704
  ]),
715
705
  t("div", no, [
716
- t("div", ro, [
706
+ t("div", ao, [
717
707
  n[6] || (n[6] = t("div", { class: "flex-1 fm-typo-en-title-sm-600" }, "Locations", -1)),
718
708
  c(_, {
719
709
  disabled: s.disabled,
@@ -731,10 +721,10 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
731
721
  onRowClick: e(g),
732
722
  "hide-footer": ""
733
723
  }, null, 8, ["column-defs", "row-data", "onRowClick"]),
734
- t("div", ao, [
724
+ t("div", ro, [
735
725
  c(E, {
736
726
  "model-value": [
737
- (H = u.modelValue.purchaseOrder.supplier) == null ? void 0 : H._id,
727
+ (Q = u.modelValue.purchaseOrder.supplier) == null ? void 0 : Q._id,
738
728
  ...u.modelValue.locations ?? []
739
729
  ].join(","),
740
730
  rules: [p]
@@ -750,25 +740,25 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
750
740
  "prepend-icon": "add",
751
741
  variant: "plain",
752
742
  class: "border-2 rounded-lg border-fm-color-primary",
753
- onClick: n[5] || (n[5] = (F) => w()),
743
+ onClick: n[5] || (n[5] = (T) => w()),
754
744
  size: "md"
755
745
  }, null, 8, ["disabled", "label"])
756
746
  ]),
757
- (R(), W(P, {
747
+ (D(), W(P, {
758
748
  "column-defs": f.value,
759
749
  "row-data": e(o).purchaseOrder.items,
760
- key: e(o).purchaseOrder.items.map((F) => F.sku._id).join("."),
750
+ key: e(o).purchaseOrder.items.map((T) => T.sku._id).join("."),
761
751
  "hide-footer": "",
762
752
  "page-size": e(o).purchaseOrder.items.length
763
753
  }, {
764
- "list-row": q((F) => [
765
- (R(), W(Ge, {
766
- row: F,
754
+ "list-row": q((T) => [
755
+ (D(), W(Qe, {
756
+ row: T,
767
757
  key: e(o).purchaseOrder.items.map((z) => z.sku._id).join(".")
768
758
  }, {
769
759
  default: q((z) => [
770
760
  c(oo, {
771
- row: F,
761
+ row: T,
772
762
  "cell-by-col-id": z
773
763
  }, null, 8, ["row", "cell-by-col-id"])
774
764
  ]),
@@ -798,7 +788,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
798
788
  emits: ["update:show", "submitted"],
799
789
  setup(y, { expose: x, emit: u }) {
800
790
  var b;
801
- const o = y, m = u, S = rt(), i = dt(), { t: l } = X(), d = je(o, "show");
791
+ const o = y, m = u, S = bt(), i = Tt(), { t: l } = X(), d = je(o, "show");
802
792
  function k() {
803
793
  return {
804
794
  _id: "",
@@ -832,12 +822,12 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
832
822
  const h = U(o.modelValue ?? k()), A = U(((b = o.modelValue) == null ? void 0 : b._id) ?? `${Math.random()}`);
833
823
  pe(
834
824
  () => o.show,
835
- (r) => {
825
+ (a) => {
836
826
  var f;
837
- r && (h.value = o.modelValue ?? k(), A.value = ((f = o.modelValue) == null ? void 0 : f._id) ?? `${Math.random()}`);
827
+ a && (h.value = o.modelValue ?? k(), A.value = ((f = o.modelValue) == null ? void 0 : f._id) ?? `${Math.random()}`);
838
828
  }
839
829
  );
840
- const T = U(!1), v = D(() => {
830
+ const F = U(!1), v = R(() => {
841
831
  switch (o.mode) {
842
832
  case ee.READ:
843
833
  return "";
@@ -850,27 +840,27 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
850
840
  }), g = U();
851
841
  x({
852
842
  validateInputs: () => {
853
- var r, f;
854
- (f = (r = g.value) == null ? void 0 : r.validateInputs) == null || f.call(r);
843
+ var a, f;
844
+ (f = (a = g.value) == null ? void 0 : a.validateInputs) == null || f.call(a);
855
845
  },
856
846
  resetInputsValidation: () => {
857
- var r, f;
858
- (f = (r = g.value) == null ? void 0 : r.resetInputsValidation) == null || f.call(r);
847
+ var a, f;
848
+ (f = (a = g.value) == null ? void 0 : a.resetInputsValidation) == null || f.call(a);
859
849
  },
860
850
  resetInputs: () => {
861
- var r, f;
862
- (f = (r = g.value) == null ? void 0 : r.resetInputs) == null || f.call(r);
851
+ var a, f;
852
+ (f = (a = g.value) == null ? void 0 : a.resetInputs) == null || f.call(a);
863
853
  }
864
854
  });
865
855
  async function I() {
866
856
  var f, w;
867
- const r = h.value;
868
- if (r) {
869
- T.value = !0, (((f = r.purchaseOrder.supplier) == null ? void 0 : f.internal) === ne.enum.warehouse || ((w = r.purchaseOrder.supplier) == null ? void 0 : w.internal) === ne.enum.restaurant) && (r.purchaseOrder.items = r.purchaseOrder.items.map(
857
+ const a = h.value;
858
+ if (a) {
859
+ F.value = !0, (((f = a.purchaseOrder.supplier) == null ? void 0 : f.internal) === ne.enum.warehouse || ((w = a.purchaseOrder.supplier) == null ? void 0 : w.internal) === ne.enum.restaurant) && (a.purchaseOrder.items = a.purchaseOrder.items.map(
870
860
  ({ totalCost: s, ...n }) => n
871
861
  ));
872
862
  try {
873
- await S.createTemplate(r), await new Promise((s) => setTimeout(s, 1e3)), i.open({
863
+ await S.createTemplate(a), await new Promise((s) => setTimeout(s, 1e3)), i.open({
874
864
  title: l("inventory.transfer.template.create.success"),
875
865
  message: l("inventory.transfer.template.create.successMessage"),
876
866
  type: "success"
@@ -882,19 +872,19 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
882
872
  type: "error"
883
873
  }), console.error("Error in creating transfer template", s);
884
874
  } finally {
885
- T.value = !1;
875
+ F.value = !1;
886
876
  }
887
877
  }
888
878
  }
889
879
  async function B() {
890
880
  var f, w;
891
- const r = h.value;
892
- if (r) {
893
- T.value = !0, (((f = r.purchaseOrder.supplier) == null ? void 0 : f.internal) === ne.enum.warehouse || ((w = r.purchaseOrder.supplier) == null ? void 0 : w.internal) === ne.enum.restaurant) && (r.purchaseOrder.items = r.purchaseOrder.items.map(
881
+ const a = h.value;
882
+ if (a) {
883
+ F.value = !0, (((f = a.purchaseOrder.supplier) == null ? void 0 : f.internal) === ne.enum.warehouse || ((w = a.purchaseOrder.supplier) == null ? void 0 : w.internal) === ne.enum.restaurant) && (a.purchaseOrder.items = a.purchaseOrder.items.map(
894
884
  ({ totalCost: s, ...n }) => n
895
885
  ));
896
886
  try {
897
- await S.updateTemplate(r), await new Promise((s) => setTimeout(s, 1e3)), i.open({
887
+ await S.updateTemplate(a), await new Promise((s) => setTimeout(s, 1e3)), i.open({
898
888
  title: l("inventory.transfer.template.update.success"),
899
889
  message: l("inventory.transfer.template.update.successMessage"),
900
890
  type: "success"
@@ -906,7 +896,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
906
896
  type: "error"
907
897
  }), console.error("Error in updating transfer template", s);
908
898
  } finally {
909
- T.value = !1;
899
+ F.value = !1;
910
900
  }
911
901
  }
912
902
  }
@@ -918,13 +908,13 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
918
908
  return B();
919
909
  }
920
910
  }
921
- function a() {
922
- var r, f;
923
- (f = (r = g.value) == null ? void 0 : r.validateInputs) == null || f.call(r);
911
+ function r() {
912
+ var a, f;
913
+ (f = (a = g.value) == null ? void 0 : a.validateInputs) == null || f.call(a);
924
914
  }
925
- return (r, f) => {
915
+ return (a, f) => {
926
916
  const w = V("FmButton"), s = V("FmSideSheet");
927
- return R(), W(s, {
917
+ return D(), W(s, {
928
918
  modelValue: e(d),
929
919
  "onUpdate:modelValue": f[2] || (f[2] = (n) => Ee(d) ? d.value = n : null),
930
920
  "dismiss-away": "",
@@ -937,26 +927,26 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
937
927
  ])
938
928
  ]),
939
929
  default: q(() => [
940
- (R(), W(co, {
930
+ (D(), W(co, {
941
931
  class: "w-full",
942
932
  ref_key: "formRef",
943
933
  ref: g,
944
934
  onValidationSuccess: p,
945
935
  "model-value": h.value,
946
936
  "onUpdate:modelValue": f[0] || (f[0] = (n) => h.value = n),
947
- disabled: T.value,
937
+ disabled: F.value,
948
938
  key: A.value
949
939
  }, null, 8, ["model-value", "disabled"]))
950
940
  ]),
951
941
  "side-sheet-footer": q(() => [
952
942
  t("div", yo, [
953
943
  c(w, {
954
- loading: T.value,
944
+ loading: F.value,
955
945
  label: e(l)("common.save"),
956
- onClick: a
946
+ onClick: r
957
947
  }, null, 8, ["loading", "label"]),
958
948
  c(w, {
959
- disabled: T.value,
949
+ disabled: F.value,
960
950
  variant: "tertiary",
961
951
  label: e(l)("common.close"),
962
952
  onClick: f[1] || (f[1] = (n) => m("update:show", !1))
@@ -967,7 +957,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
967
957
  }, 8, ["modelValue"]);
968
958
  };
969
959
  }
970
- }), bo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, xo = { class: "flex justify-between" }, _o = { class: "fm-typo-en-body-lg-600" }, ho = { class: "fm-status-badge fm-status-badge-info-secondary" }, go = { class: "flex flex-col gap-8" }, Fo = { class: "flex flex-col gap-4" }, To = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, wo = { class: "flex gap-1" }, ko = { class: "fm-typo-en-body-lg-600" }, So = {
960
+ }), bo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, xo = { class: "flex justify-between" }, _o = { class: "fm-typo-en-body-lg-600" }, ho = { class: "fm-status-badge fm-status-badge-info-secondary" }, go = { class: "flex flex-col gap-8" }, To = { class: "flex flex-col gap-4" }, Fo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, wo = { class: "flex gap-1" }, ko = { class: "fm-typo-en-body-lg-600" }, So = {
971
961
  key: 0,
972
962
  class: "flex flex-col gap-4"
973
963
  }, Co = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Mo = { class: "fm-typo-en-body-lg-600" }, $o = {
@@ -976,13 +966,13 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
976
966
  }, Io = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Oo = { class: "fm-typo-en-body-lg-600" }, Vo = {
977
967
  key: 2,
978
968
  class: "flex flex-col gap-4"
979
- }, Ao = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ro = { class: "fm-typo-en-body-lg-600" }, Do = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Po = { class: "flex flex-col gap-8" }, Lo = { class: "fm-typo-en-body-lg-600" }, Bo = { class: "flex w-full gap-4" }, Uo = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, Eo = { class: "fm-typo-en-body-lg-600 shrink-0" }, qo = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, No = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, zo = {
969
+ }, Ao = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Do = { class: "fm-typo-en-body-lg-600" }, Ro = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Po = { class: "flex flex-col gap-8" }, Lo = { class: "fm-typo-en-body-lg-600" }, Bo = { class: "flex w-full gap-4" }, Uo = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, Eo = { class: "fm-typo-en-body-lg-600 shrink-0" }, qo = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, No = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, zo = {
980
970
  key: 0,
981
971
  class: "shrink-0 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
982
- }, jo = {
972
+ }, Ho = {
983
973
  key: 0,
984
974
  class: "flex gap-4 items-center"
985
- }, Ho = { class: "flex flex-col gap-12" }, Qo = { class: "flex flex-col gap-8" }, Ko = { class: "flex gap-8 xs:flex-col" }, Go = /* @__PURE__ */ J({
975
+ }, Qo = { class: "flex flex-col gap-12" }, jo = { class: "flex flex-col gap-8" }, Ko = { class: "flex gap-8 xs:flex-col" }, Go = /* @__PURE__ */ J({
986
976
  __name: "TransferTemplateDetails",
987
977
  props: {
988
978
  template: {},
@@ -990,23 +980,23 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
990
980
  },
991
981
  emits: ["update:show", "action:edit"],
992
982
  setup(y, { emit: x }) {
993
- const u = y, o = x, m = Qe(), { t: S } = X(), i = D(() => {
994
- var T;
995
- return (T = u.template) == null ? void 0 : T.purchaseOrder;
983
+ const u = y, o = x, m = Ke(), { t: S } = X(), i = R(() => {
984
+ var F;
985
+ return (F = u.template) == null ? void 0 : F.purchaseOrder;
996
986
  }), l = [
997
987
  { accessorKey: "name", header: () => "Name" },
998
988
  { accessorKey: "type", header: () => "Type" }
999
- ], d = U(""), k = D(
989
+ ], d = U(""), k = R(
1000
990
  () => {
1001
- var T, v, g, I;
1002
- return ((v = (T = i.value) == null ? void 0 : T.supplier) == null ? void 0 : v.internal) === "restaurant" || ((I = (g = i.value) == null ? void 0 : g.supplier) == null ? void 0 : I.internal) === "warehouse" ? j.TRANSFER : j.PURCHASE;
991
+ var F, v, g, I;
992
+ return ((v = (F = i.value) == null ? void 0 : F.supplier) == null ? void 0 : v.internal) === "restaurant" || ((I = (g = i.value) == null ? void 0 : g.supplier) == null ? void 0 : I.internal) === "warehouse" ? H.TRANSFER : H.PURCHASE;
1003
993
  }
1004
994
  ), h = U(!0), A = je(u, "show");
1005
- return (T, v) => {
995
+ return (F, v) => {
1006
996
  var f;
1007
- const g = V("FmMenuDivider"), I = V("FmCard"), B = V("FmIcon"), p = V("FmTextField"), a = V("FmTable"), b = V("FmButton"), r = V("FmSideSheet");
1008
- return R(), W(r, {
1009
- header: e(S)("inventory.transfer.template.details.view", { template: (f = T.template) == null ? void 0 : f.name }),
997
+ const g = V("FmMenuDivider"), I = V("FmCard"), B = V("FmIcon"), p = V("FmTextField"), r = V("FmTable"), b = V("FmButton"), a = V("FmSideSheet");
998
+ return D(), W(a, {
999
+ header: e(S)("inventory.transfer.template.details.view", { template: (f = F.template) == null ? void 0 : f.name }),
1010
1000
  modelValue: e(A),
1011
1001
  "onUpdate:modelValue": v[2] || (v[2] = (w) => Ee(A) ? A.value = w : null),
1012
1002
  "dismiss-away": h.value,
@@ -1033,23 +1023,23 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1033
1023
  ]),
1034
1024
  c(g),
1035
1025
  t("div", go, [
1036
- t("div", Fo, [
1037
- t("div", To, [
1026
+ t("div", To, [
1027
+ t("div", Fo, [
1038
1028
  t("div", wo, O(e(S)("inventory.transfer.receiveRequest.details.createdAt")), 1)
1039
1029
  ]),
1040
- t("div", ko, O(e(Ot)(((n = T.template) == null ? void 0 : n._id) ?? "")), 1)
1030
+ t("div", ko, O(e(ct)(((n = F.template) == null ? void 0 : n._id) ?? "")), 1)
1041
1031
  ]),
1042
- ($ = (C = i.value) == null ? void 0 : C.supplier) != null && $.name ? (R(), K("div", So, [
1032
+ ($ = (C = i.value) == null ? void 0 : C.supplier) != null && $.name ? (D(), K("div", So, [
1043
1033
  t("div", Co, O(e(S)("inventory.transfer.receiveRequest.details.from")), 1),
1044
1034
  t("div", Mo, O((_ = (M = i.value) == null ? void 0 : M.supplier) == null ? void 0 : _.name), 1)
1045
1035
  ])) : Y("", !0),
1046
- (P = i.value) != null && P.ref ? (R(), K("div", $o, [
1036
+ (P = i.value) != null && P.ref ? (D(), K("div", $o, [
1047
1037
  t("div", Io, O(e(S)("inventory.transfer.receiveRequest.details.reference")), 1),
1048
1038
  t("div", Oo, O(i.value.ref), 1)
1049
1039
  ])) : Y("", !0),
1050
- (E = i.value) != null && E.remark ? (R(), K("div", Vo, [
1040
+ (E = i.value) != null && E.remark ? (D(), K("div", Vo, [
1051
1041
  t("div", Ao, O(e(S)("inventory.transfer.receiveRequest.details.remark")), 1),
1052
- t("div", Ro, O(i.value.remark), 1)
1042
+ t("div", Do, O(i.value.remark), 1)
1053
1043
  ])) : Y("", !0)
1054
1044
  ])
1055
1045
  ];
@@ -1057,23 +1047,23 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1057
1047
  _: 1
1058
1048
  })
1059
1049
  ]),
1060
- t("div", Do, [
1050
+ t("div", Ro, [
1061
1051
  t("div", Po, [
1062
1052
  t("div", Lo, O(e(S)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
1063
- (R(!0), K(qe, null, Xe(((w = i.value) == null ? void 0 : w.items) ?? [], (n) => (R(), K("div", {
1053
+ (D(!0), K(qe, null, Xe(((w = i.value) == null ? void 0 : w.items) ?? [], (n) => (D(), K("div", {
1064
1054
  key: n.code,
1065
1055
  class: "flex flex-col"
1066
1056
  }, [
1067
1057
  t("div", Bo, [
1068
1058
  t("div", Uo, O(n.name), 1),
1069
1059
  v[3] || (v[3] = t("div", { class: "flex-1 min-w-32" }, null, -1)),
1070
- t("div", Eo, O(e(at)(n.quantity, n.sku.unit, n.measurement)), 1)
1060
+ t("div", Eo, O(e(xt)(n.quantity, n.sku.unit, n.measurement)), 1)
1071
1061
  ]),
1072
1062
  t("div", qo, [
1073
1063
  t("div", No, O(n.code), 1),
1074
- n.totalCost && e(m).enableTotalCost ? (R(), K("div", zo, " (" + O(e(ht)(n.totalCost)) + ") ", 1)) : Y("", !0)
1064
+ n.totalCost && e(m).enableTotalCost ? (D(), K("div", zo, " (" + O(e(pt)(n.totalCost)) + ") ", 1)) : Y("", !0)
1075
1065
  ]),
1076
- e(it)(n) ? (R(), K("div", jo, [
1066
+ e(_t)(n) ? (D(), K("div", Ho, [
1077
1067
  c(B, {
1078
1068
  name: "error",
1079
1069
  color: "system-error-300",
@@ -1086,19 +1076,19 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1086
1076
  ]),
1087
1077
  v[6] || (v[6] = t("div", null, null, -1)),
1088
1078
  v[7] || (v[7] = t("div", null, null, -1)),
1089
- t("div", Ho, [
1079
+ t("div", Qo, [
1090
1080
  v[5] || (v[5] = t("div", { class: "flex flex-col" }, [
1091
1081
  t("div", { class: "fm-typo-en-body-lg-600" }, "Enabled locations"),
1092
1082
  t("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " This template is only usable for the following locations. ")
1093
1083
  ], -1)),
1094
- t("div", Qo, [
1084
+ t("div", jo, [
1095
1085
  c(p, {
1096
1086
  modelValue: d.value,
1097
1087
  "onUpdate:modelValue": v[0] || (v[0] = (n) => d.value = n),
1098
1088
  placeholder: "Filter locations",
1099
1089
  "prepend-icon": "search"
1100
1090
  }, null, 8, ["modelValue"]),
1101
- c(a, {
1091
+ c(r, {
1102
1092
  "hide-footer": "",
1103
1093
  style: { height: "500px" },
1104
1094
  "column-defs": l,
@@ -1123,17 +1113,17 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1123
1113
  }, 8, ["header", "modelValue", "dismiss-away"]);
1124
1114
  };
1125
1115
  }
1126
- }), Wo = { class: "flex-1 flex flex-col gap-8" }, Zo = { class: "flex flex-col" }, Jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xo = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Yo = { class: "fm-typo-en-body-lg-400" }, es = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, ts = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Ts = /* @__PURE__ */ J({
1116
+ }), Wo = { class: "flex-1 flex flex-col gap-8" }, Zo = { class: "flex flex-col" }, Jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xo = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Yo = { class: "fm-typo-en-body-lg-400" }, es = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, ts = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, ps = /* @__PURE__ */ J({
1127
1117
  __name: "TransferTemplateView",
1128
1118
  setup(y) {
1129
- const { t: x } = X(), { createTemplate: u, viewTemplate: o, importTemplates: m, exportTemplates: S } = Re(), { templateDialogProps: i, templateDetailsProps: l } = Pe(Re()), d = ut(), { loading: k, templates: h } = Pe(d), A = U(!1), T = st(), v = ze(), { breakpoints: g } = ct();
1119
+ const { t: x } = X(), { createTemplate: u, viewTemplate: o, importTemplates: m, exportTemplates: S } = Le(), { templateDialogProps: i, templateDetailsProps: l } = Be(Le()), d = ht(), { loading: k, templates: h } = Be(d), A = U(!1), F = ft(), v = He(), { breakpoints: g } = Ft();
1130
1120
  ce(d.fetchTemplates);
1131
- const I = D(
1121
+ const I = R(
1132
1122
  () => A.value || k.value || !v._currentLocation
1133
- ), B = D(() => h.value), p = U(""), a = D(() => g.value.xs || g.value.sm), b = D(() => a.value ? 10 : 20);
1134
- function r(s) {
1123
+ ), B = R(() => h.value), p = U(""), r = R(() => g.value.xs || g.value.sm), b = R(() => r.value ? 10 : 20);
1124
+ function a(s) {
1135
1125
  switch (s) {
1136
- case De.Add:
1126
+ case Pe.Add:
1137
1127
  return u();
1138
1128
  case "refresh":
1139
1129
  return d.fetchTemplates();
@@ -1146,10 +1136,10 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1146
1136
  function f(s) {
1147
1137
  return s;
1148
1138
  }
1149
- const w = D(() => [
1139
+ const w = R(() => [
1150
1140
  {
1151
1141
  label: x("inventory.closing.template.create.title"),
1152
- value: De.Add,
1142
+ value: Pe.Add,
1153
1143
  isPrimary: !0,
1154
1144
  prependIcon: "add"
1155
1145
  },
@@ -1171,11 +1161,11 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1171
1161
  ]);
1172
1162
  return (s, n) => {
1173
1163
  const C = V("FmTable");
1174
- return R(), K(qe, null, [
1175
- c(lt, {
1164
+ return D(), K(qe, null, [
1165
+ c(yt, {
1176
1166
  title: e(x)("inventory.transfer.template.title2"),
1177
1167
  actions: w.value,
1178
- "onClick:action": r
1168
+ "onClick:action": a
1179
1169
  }, {
1180
1170
  default: q(() => {
1181
1171
  var $;
@@ -1184,18 +1174,18 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1184
1174
  class: ie([
1185
1175
  "flex flex-col gap-8 max-h-full",
1186
1176
  {
1187
- "p-0": a.value,
1188
- "px-24 ": !a.value
1177
+ "p-0": r.value,
1178
+ "px-24 ": !r.value
1189
1179
  }
1190
1180
  ])
1191
1181
  }, [
1192
- c(nt, {
1182
+ c(vt, {
1193
1183
  searchable: "",
1194
1184
  search: p.value,
1195
1185
  "onUpdate:search": n[0] || (n[0] = (M) => p.value = M)
1196
1186
  }, null, 8, ["search"]),
1197
- (R(), W(C, {
1198
- style: Ye(e(T).tableHeight),
1187
+ (D(), W(C, {
1188
+ style: Ye(e(F).tableHeight),
1199
1189
  "column-defs": e(d).columnDefs,
1200
1190
  "row-data": B.value,
1201
1191
  "search-value": p.value,
@@ -1205,44 +1195,44 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1205
1195
  "page-size": b.value
1206
1196
  }, {
1207
1197
  "list-row": q((M) => [
1208
- c(Ge, {
1198
+ c(Qe, {
1209
1199
  row: M,
1210
1200
  onRowClick: (_) => e(o)(_)
1211
1201
  }, {
1212
1202
  default: q((_) => {
1213
- var P, E, N, H, F, z, fe, ye, te, ve, be, xe, _e, oe, he, ge, Fe, Te, we, ke, se, Se, Ce, Me, $e, le, Ie;
1203
+ var P, E, N, Q, T, z, fe, ye, te, ve, be, xe, _e, oe, he, ge, Te, Fe, we, ke, se, Se, Ce, Me, $e, le, Ie;
1214
1204
  return [
1215
1205
  t("div", Wo, [
1216
1206
  t("div", Zo, [
1217
1207
  t("div", Jo, [
1218
- c(e(Q), {
1208
+ c(e(j), {
1219
1209
  render: (N = (E = (P = _._id) == null ? void 0 : P.column) == null ? void 0 : E.columnDef) == null ? void 0 : N.cell,
1220
- props: (F = (H = _._id) == null ? void 0 : H.getContext) == null ? void 0 : F.call(H)
1210
+ props: (T = (Q = _._id) == null ? void 0 : Q.getContext) == null ? void 0 : T.call(Q)
1221
1211
  }, null, 8, ["render", "props"])
1222
1212
  ]),
1223
1213
  t("div", Xo, [
1224
- c(e(Q), {
1214
+ c(e(j), {
1225
1215
  render: (ye = (fe = (z = _.name) == null ? void 0 : z.column) == null ? void 0 : fe.columnDef) == null ? void 0 : ye.cell,
1226
1216
  props: (ve = (te = _.name) == null ? void 0 : te.getContext) == null ? void 0 : ve.call(te)
1227
1217
  }, null, 8, ["render", "props"])
1228
1218
  ]),
1229
1219
  t("div", Yo, [
1230
- c(e(Q), {
1220
+ c(e(j), {
1231
1221
  render: (_e = (xe = (be = _.supplier) == null ? void 0 : be.column) == null ? void 0 : xe.columnDef) == null ? void 0 : _e.cell,
1232
1222
  props: (he = (oe = _.supplier) == null ? void 0 : oe.getContext) == null ? void 0 : he.call(oe)
1233
1223
  }, null, 8, ["render", "props"])
1234
1224
  ]),
1235
- t("div", null, O((ge = M.original.locations) != null && ge.length ? `Enabled for ${(Fe = M.original.locations) == null ? void 0 : Fe.length} outlets` : "Enabled for all outlets"), 1),
1225
+ t("div", null, O((ge = M.original.locations) != null && ge.length ? `Enabled for ${(Te = M.original.locations) == null ? void 0 : Te.length} outlets` : "Enabled for all outlets"), 1),
1236
1226
  t("div", es, O(M.original.purchaseOrder.items.length ? M.original.purchaseOrder.items.map((We) => We.name).join(", ") : "No items"), 1),
1237
1227
  t("div", ts, [
1238
- c(e(Q), {
1239
- render: (ke = (we = (Te = _.ref) == null ? void 0 : Te.column) == null ? void 0 : we.columnDef) == null ? void 0 : ke.cell,
1228
+ c(e(j), {
1229
+ render: (ke = (we = (Fe = _.ref) == null ? void 0 : Fe.column) == null ? void 0 : we.columnDef) == null ? void 0 : ke.cell,
1240
1230
  props: (Se = (se = _.ref) == null ? void 0 : se.getContext) == null ? void 0 : Se.call(se)
1241
1231
  }, null, 8, ["render", "props"])
1242
1232
  ])
1243
1233
  ]),
1244
1234
  t("div", null, [
1245
- c(e(Q), {
1235
+ c(e(j), {
1246
1236
  render: ($e = (Me = (Ce = _.type) == null ? void 0 : Ce.column) == null ? void 0 : Me.columnDef) == null ? void 0 : $e.cell,
1247
1237
  props: (Ie = (le = _.type) == null ? void 0 : le.getContext) == null ? void 0 : Ie.call(le)
1248
1238
  }, null, 8, ["render", "props"])
@@ -1260,7 +1250,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1260
1250
  }),
1261
1251
  _: 1
1262
1252
  }, 8, ["title", "actions"]),
1263
- (R(), W(et, { to: "body" }, [
1253
+ (D(), W(et, { to: "body" }, [
1264
1254
  c(Go, tt(ot(e(l))), null, 16),
1265
1255
  c(vo, Ue(e(i), {
1266
1256
  onSubmitted: n[2] || (n[2] = ($) => e(d).fetchTemplates())
@@ -1271,5 +1261,5 @@ const zt = { class: "flex flex-col gap-8 py-16" }, jt = { class: "flex items-cen
1271
1261
  }
1272
1262
  });
1273
1263
  export {
1274
- Ts as default
1264
+ ps as default
1275
1265
  };