@feedmepos/mf-inventory-portal 1.2.29 → 1.2.30

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 (80) hide show
  1. package/dist/{App-BcetoQcK.js → App-CZJre5y8.js} +56 -54
  2. package/dist/{ApprovalView-CyRCctkZ.js → ApprovalView-CnxHxojY.js} +34 -28
  3. package/dist/{BindingsDialog-DLN2RPYo.js → BindingsDialog-C6lCOPNs.js} +2 -2
  4. package/dist/{BindingsPicker-CDtYeSVh.js → BindingsPicker-DZtFKLQ5.js} +6 -5
  5. package/dist/{BindingsTable-C19Bm8d6.js → BindingsTable-BmQGLuJ4.js} +28 -24
  6. package/dist/{ClosingDraftView-DBFIR6Xv.js → ClosingDraftView-KLtlh31f.js} +184 -176
  7. package/dist/{ClosingHistoryView-BEZOwsPz.js → ClosingHistoryView-Rf1yMhMj.js} +43 -41
  8. package/dist/{ClosingTemplateView-COifu0I6.js → ClosingTemplateView-C_IiKnGx.js} +116 -98
  9. package/dist/{DeliveryOrderPrintPreview-lBFtH_Rm.js → DeliveryOrderPrintPreview-UF7V005U.js} +15 -14
  10. package/dist/FmDroppableField-J0xUsOTV.js +154 -0
  11. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BhhmWaOl.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BcMvEdc0.js} +74 -72
  12. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CqAeF0wL.js +279 -0
  13. package/dist/{FmMultiselectDialog-CBYvYJnE.js → FmMultiselectDialog-B0aKuf2o.js} +1 -1
  14. package/dist/FmMultiselectDialog-BasrjBFA.js +597 -0
  15. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CLuceimk.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CaYJJkXz.js} +51 -49
  16. package/dist/{ImportView-DYNjmjys.js → ImportView-DRSoz0uM.js} +81 -74
  17. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BXefPowE.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DA8SlWPy.js} +5 -5
  18. package/dist/{IngredientGroupView-CNzK_dDv.js → IngredientGroupView-D5Laak2-.js} +73 -65
  19. package/dist/{IngredientsView-BnrA0ijB.js → IngredientsView-TG3fPQhR.js} +358 -345
  20. package/dist/{IntegrationView-DwcP5MgB.js → IntegrationView-CElpjyo7.js} +219 -209
  21. package/dist/{InventoryBindingForm-DeqdcXzm.js → InventoryBindingForm-CBgxRYBd.js} +1 -1
  22. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-FuPTxo7z.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Ys5GBHoQ.js} +41 -40
  23. package/dist/{InventoryBindingSummary-Dp0bshzL.js → InventoryBindingSummary-OK3vNWhi.js} +1 -1
  24. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DLvWaFvA.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-9QRntUlk.js} +5 -5
  25. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-tLW9bojI.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Bc01NoOn.js} +22 -21
  26. package/dist/{PublishView-CxIU1aI4.js → PublishView-CLMfiLjP.js} +26 -23
  27. package/dist/{PurchaseOrderPrintPreview-DWxp3cFM.js → PurchaseOrderPrintPreview-Dy77yWDC.js} +10 -9
  28. package/dist/{ReceiveRequestView-CF9ingct.js → ReceiveRequestView-BhD-NaHE.js} +324 -308
  29. package/dist/{RecipeView-B87vakmu.js → RecipeView-RWaO94w_.js} +73 -64
  30. package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-DY7TaxPK.js +251 -0
  31. package/dist/{StockView-XJY3690u.js → StockView-D5t8OxaG.js} +292 -282
  32. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DY1iRl1F.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-3Asf1TGd.js} +1 -1
  33. package/dist/{SupplierView-Y2NqnJ6-.js → SupplierView-DiospFKq.js} +92 -80
  34. package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang-DfCHteOF.js +177 -0
  35. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +135 -0
  36. package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CNtvx-LA.js +123 -0
  37. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-l0qRNa0W.js → TransferDetails.vue_vue_type_script_setup_true_lang-p959Op4k.js} +318 -305
  38. package/dist/{TransferTemplateView-DBlasHGY.js → TransferTemplateView-ePZFdZ0p.js} +228 -216
  39. package/dist/{UnitView-C8z90hHr.js → UnitView-Banlxw7y.js} +70 -63
  40. package/dist/{WarehouseView-egtnCnzo.js → WarehouseView-BL-p5hbi.js} +123 -114
  41. package/dist/WastageTemplateView-B1pmSuW0.js +2288 -0
  42. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  43. package/dist/app-EpEEb8EO.js +64040 -0
  44. package/dist/app-rgirz_52.js +8024 -0
  45. package/dist/app.js +6 -6
  46. package/dist/closing-template-zIjwO1_E.js +117 -0
  47. package/dist/date2-Dnc8Y81g.js +116 -0
  48. package/dist/dayjs.min-TdUgzmww.js +282 -0
  49. package/dist/{decimal-CLM3HUsc.js → decimal-C6s3GvGb.js} +4 -3
  50. package/dist/defineDeepModel-BSaaXVBF.js +19 -0
  51. package/dist/duplicate-template-Bw0H416G.js +34 -0
  52. package/dist/feature-C95Hao53.js +20162 -0
  53. package/dist/form-mode.enum-BKiNVH6A.js +4 -0
  54. package/dist/format-time-from-id-DlbHo6kY.js +15 -0
  55. package/dist/{format-unit-display-BWoznxQp.js → format-unit-display-QBS54q0R.js} +308 -297
  56. package/dist/{import-export.helper-DgKnsYRB.js → import-export.helper-CUKCKtP7.js} +56 -52
  57. package/dist/index-CFn_9RMm.js +45 -0
  58. package/dist/{index-CK61uHgW.js → index-S9Ak__QC.js} +1 -1
  59. package/dist/{index-tMZSFG5r.js → index-goD-WGVb.js} +16 -14
  60. package/dist/lodash-gq8IrP4j.js +3678 -0
  61. package/dist/netsuite-CnhAKyAO.js +4316 -0
  62. package/dist/{purchase-order-template-D7dkJMqf.js → purchase-order-template-CBIpWdEW.js} +1 -1
  63. package/dist/router/shared.spec.d.ts +1 -0
  64. package/dist/row-action.enum-BcW_L_nE.js +67 -0
  65. package/dist/rules-DKklsaS1.js +201 -0
  66. package/dist/{stock-B3EEUmkF.js → stock-3K93Mif9.js} +1 -1
  67. package/dist/{stock-DYBHa0KN.js → stock-BW8fen3H.js} +11 -10
  68. package/dist/style.css +1 -1
  69. package/dist/{supplier-CY7Hj_a2.js → supplier-CObCSfot.js} +27 -26
  70. package/dist/tsconfig.app.tsbuildinfo +1 -1
  71. package/dist/{use-ingredient-select-dialog-Dlv7Eowu.js → use-ingredient-select-dialog-DwvQiaVW.js} +4 -3
  72. package/dist/{use-inventory-binding-dialog-DOSfDQte.js → use-inventory-binding-dialog-CuLEHLDM.js} +4 -3
  73. package/dist/use-template-enabled-locations-2-DkUJeppb.js +111 -0
  74. package/dist/views/adjustment-template/wastage-template/table.d.ts +1 -1
  75. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +1 -1
  76. package/dist/vue-i18n-CUznvVzc.js +2365 -0
  77. package/dist/xlsx-bT1p3YVR.js +24004 -0
  78. package/dist/xlsx.util-Cr9DpDFb.js +78 -0
  79. package/package.json +6 -6
  80. package/dist/app-B5p73NM9.js +0 -130949
@@ -1,14 +1,26 @@
1
- import { defineComponent as ae, onMounted as Te, computed as L, ref as Y, watch as Ce, inject as ot, resolveComponent as V, openBlock as M, createElementBlock as N, createElementVNode as e, createVNode as m, withCtx as U, renderSlot as xe, withDirectives as Pe, normalizeClass as re, vModelText as Be, reactive as st, h as j, toDisplayString as I, unref as t, createCommentVNode as oe, Fragment as pe, normalizeStyle as _e, renderList as je, createBlock as le, mergeProps as Qe, createTextVNode as ne, mergeModels as qe, useModel as lt, isRef as Ye, Teleport as nt, normalizeProps as at, guardReactiveProps as rt } from "vue";
2
- import { Q as We, aT as he, t as Ne, P as it, aU as ut, aV as dt, n as se, aW as mt, b as Ge, a as Ke, $ as Le, c as ge, r as ke, z as be, a0 as ye, A as we, M as pt, L as ee, u as Je, au as ct, a6 as ft, K as Ze, e as ue, B as ve, an as yt, Y as vt, af as bt, G as gt, j as Ee, I as ht, J as xt } from "./app-B5p73NM9.js";
1
+ import { defineComponent as ae, onMounted as Te, computed as L, ref as Y, watch as Fe, inject as ot, resolveComponent as V, openBlock as $, createElementBlock as N, createElementVNode as e, createVNode as m, withCtx as U, renderSlot as xe, withDirectives as Pe, normalizeClass as re, vModelText as Be, reactive as st, h as j, toDisplayString as I, unref as t, createCommentVNode as oe, Fragment as pe, normalizeStyle as _e, renderList as je, createBlock as le, mergeProps as Qe, createTextVNode as ne, mergeModels as qe, useModel as lt, isRef as Ye, Teleport as nt, normalizeProps as at, guardReactiveProps as rt } from "vue";
2
+ import { u as it, _ as ut } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DY7TaxPK.js";
3
3
  import { useI18n as me } from "@feedmepos/mf-common";
4
- import { P as X, f as _t, t as kt, a as ze, u as wt } from "./format-unit-display-BWoznxQp.js";
5
- import { components as de, useSnackbar as Tt, useProxiedModel as Xe, useBreakpoints as Ct } from "@feedmepos/ui-library";
6
- import { defineStore as Ft, storeToRefs as He } from "pinia";
7
- import { _ as St, b as It, F as $t, a as Mt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-CLuceimk.js";
8
- import { c as Ot, u as Dt, _ as Vt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BhhmWaOl.js";
9
- import { u as At } from "./supplier-CY7Hj_a2.js";
10
- import { u as Rt } from "./use-ingredient-select-dialog-Dlv7Eowu.js";
11
- import { u as Ut } from "./purchase-order-template-D7dkJMqf.js";
4
+ import { P as X, f as dt, t as mt, u as Ne, a as pt } from "./format-unit-display-QBS54q0R.js";
5
+ import { R as Le } from "./row-action.enum-BcW_L_nE.js";
6
+ import { a as We, s as Ee, u as Ge, t as ct, k as ye } from "./app-EpEEb8EO.js";
7
+ import { _ as ft } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CqAeF0wL.js";
8
+ import { components as ue, useSnackbar as yt, useProxiedModel as Ke, useBreakpoints as vt } from "@feedmepos/ui-library";
9
+ import { defineStore as bt, storeToRefs as ze } from "pinia";
10
+ import { F as de } from "./form-mode.enum-BKiNVH6A.js";
11
+ import { u as he, t as He, I as gt, b as ht, n as xt, a as se, c as _t, R as ke, g as be, d as ve, A as we, M as kt, e as wt } from "./rules-DKklsaS1.js";
12
+ import { d as Ze } from "./defineDeepModel-BSaaXVBF.js";
13
+ import { _ as Tt, F as Ft, a as Ct, b as St } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-CaYJJkXz.js";
14
+ import { u as ge } from "./feature-C95Hao53.js";
15
+ import { c as It, u as Mt, _ as $t } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BcMvEdc0.js";
16
+ import { u as Je } from "./netsuite-CnhAKyAO.js";
17
+ import { u as Ot } from "./supplier-CObCSfot.js";
18
+ import { u as Dt } from "./use-ingredient-select-dialog-DwvQiaVW.js";
19
+ import { F as ee, _ as Xe } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
20
+ import { u as Vt } from "./use-template-enabled-locations-2-DkUJeppb.js";
21
+ import { u as Rt } from "./purchase-order-template-CBIpWdEW.js";
22
+ import { f as At } from "./format-time-from-id-DlbHo6kY.js";
23
+ import { f as Ut } from "./date2-Dnc8Y81g.js";
12
24
  const Pt = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { class: "flex-1" }, Nt = { class: "flex items-center" }, Lt = { class: "flex-1" }, Et = { class: "flex-1" }, zt = /* @__PURE__ */ ae({
13
25
  __name: "FmMinMaxInput",
14
26
  props: {
@@ -47,7 +59,7 @@ const Pt = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { c
47
59
  helperState: {}
48
60
  },
49
61
  setup(p) {
50
- const h = p, v = We("modelValue"), a = it();
62
+ const h = p, v = Ze("modelValue"), a = gt();
51
63
  Te(() => {
52
64
  const { min: d, max: y } = v ?? {};
53
65
  if (!(!d || !y) && d.precision !== y.precision) {
@@ -60,27 +72,27 @@ const Pt = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { c
60
72
  return Math.max((d == null ? void 0 : d.precision) ?? 0, (y == null ? void 0 : y.precision) ?? 0, h.precision ?? 0);
61
73
  }), s = (d) => {
62
74
  if (!d) return "";
63
- const y = ut(d), w = r.value, i = he(y, w);
64
- return dt(
75
+ const y = ht(d), w = r.value, i = he(y, w);
76
+ return xt(
65
77
  +se(i),
66
78
  i.precision
67
79
  );
68
80
  }, u = Y(s(v.min)), x = Y(s(v.max));
69
- Ce([u, x], ([d, y]) => {
81
+ Fe([u, x], ([d, y]) => {
70
82
  const w = v ?? {}, i = a(d), g = a(y), O = r.value;
71
83
  if (d !== "" && i === !0) {
72
- const $ = Ne(+d, O);
73
- w.min = $;
84
+ const M = He(+d, O);
85
+ w.min = M;
74
86
  } else
75
87
  w.min = null;
76
88
  if (y !== "" && g === !0) {
77
- const $ = Ne(+y, O);
78
- w.max = $;
89
+ const M = He(+y, O);
90
+ w.max = M;
79
91
  } else
80
92
  w.max = null;
81
93
  v.min = w.min, v.max = w.max;
82
94
  });
83
- const F = Symbol.for("fm:form-state"), c = ot(F, null), o = L(() => h.disabled ?? (c == null ? void 0 : c.getDisabled()) ?? !1), f = Y(), b = Y(), k = Y(!1), T = Y(!1), R = L(() => k.value || T.value), P = L(() => [...[
95
+ const C = Symbol.for("fm:form-state"), c = ot(C, null), o = L(() => h.disabled ?? (c == null ? void 0 : c.getDisabled()) ?? !1), f = Y(), b = Y(), k = Y(!1), T = Y(!1), A = L(() => k.value || T.value), P = L(() => [...[
84
96
  function() {
85
97
  return typeof a(u.value) == "string" || typeof a(x.value) == "string" ? "Must be a number" : !0;
86
98
  },
@@ -90,7 +102,7 @@ const Pt = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { c
90
102
  ], ...h.rules ?? []]);
91
103
  return (d, y) => {
92
104
  const w = V("FmLabel"), i = V("FmField"), g = V("FmFormGroup");
93
- return M(), N("div", Pt, [
105
+ return $(), N("div", Pt, [
94
106
  e("div", Bt, [
95
107
  e("div", qt, [
96
108
  m(w, {
@@ -100,7 +112,7 @@ const Pt = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { c
100
112
  optional: d.labelMark === "optional"
101
113
  }, null, 8, ["label", "disabled", "required", "optional"])
102
114
  ]),
103
- m(i, { focused: R.value }, {
115
+ m(i, { focused: A.value }, {
104
116
  default: U(() => [
105
117
  e("div", Nt, [
106
118
  xe(d.$slots, "prepend"),
@@ -170,23 +182,23 @@ function jt(p, h) {
170
182
  };
171
183
  }
172
184
  function Qt(p) {
173
- const h = mt(p), v = se(p);
185
+ const h = _t(p), v = se(p);
174
186
  return function(r) {
175
187
  const s = !(r != null && r.min) || h(r.min) === !0, u = !(r != null && r.max) || h(r.max) === !0;
176
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}`;
177
189
  };
178
190
  }
179
- const et = Ft("netsuite-custom-field-helper", () => {
180
- const p = Ge();
191
+ const et = bt("netsuite-custom-field-helper", () => {
192
+ const p = Je();
181
193
  function h(v, a, r, s, u) {
182
- var F;
194
+ var C;
183
195
  if (!r) {
184
196
  u == null || u("Unit is not valid");
185
197
  return;
186
198
  }
187
199
  let x = v.code;
188
200
  if (p.isEnabled) {
189
- const c = p.getItemCustomCode(a, (F = r.measurement) == null ? void 0 : F.id);
201
+ const c = p.getItemCustomCode(a, (C = r.measurement) == null ? void 0 : C.id);
190
202
  c && (x = c);
191
203
  }
192
204
  s({
@@ -202,19 +214,19 @@ const et = Ft("netsuite-custom-field-helper", () => {
202
214
  });
203
215
  var Q = /* @__PURE__ */ ((p) => (p.Code = "Code", p.Name = "Name", p.DefaultAmount = "DefaultAmount", p.Limit = "Limit", p.Step = "Step", p.Cost = "Cost", p.Delete = "Delete", p))(Q || {});
204
216
  function Yt(p, h = {}) {
205
- const { t: v } = me(), a = Ke(), r = ge(), s = st({}), u = et();
217
+ const { t: v } = me(), a = We(), r = ge(), s = st({}), u = et();
206
218
  Te(() => {
207
219
  for (const c of p.items) {
208
220
  if (!c.totalCost)
209
221
  continue;
210
- const { cost: o } = Ot(
222
+ const { cost: o } = It(
211
223
  c.sku,
212
224
  c.quantity,
213
225
  c.measurement,
214
226
  {
215
227
  supplier: p.supplier
216
228
  }
217
- ), f = c.totalCost ?? Le.reset();
229
+ ), f = c.totalCost ?? Ee.reset();
218
230
  o ? s[c.sku._id] = o.amount !== f.amount || o.precision !== f.precision : s[c.sku._id] = !0;
219
231
  }
220
232
  });
@@ -234,7 +246,7 @@ function Yt(p, h = {}) {
234
246
  cell(c) {
235
247
  const o = c.row.original;
236
248
  return j("div", [
237
- j(de.FmTextField, {
249
+ j(ue.FmTextField, {
238
250
  modelValue: o.code,
239
251
  "onUpdate:modelValue": (f) => {
240
252
  p.updateItem({
@@ -265,7 +277,7 @@ function Yt(p, h = {}) {
265
277
  cell(c) {
266
278
  const o = c.row.original;
267
279
  return j("div", [
268
- j(de.FmTextField, {
280
+ j(ue.FmTextField, {
269
281
  modelValue: o.name,
270
282
  "onUpdate:modelValue": (f) => {
271
283
  p.updateItem({
@@ -287,12 +299,12 @@ function Yt(p, h = {}) {
287
299
  header: () => v("inventory.transfer.form.items.table.DefaultAmount"),
288
300
  minSize: 200,
289
301
  cell(c) {
290
- var R;
291
- 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((P) => {
302
+ var A;
303
+ const o = c.row.original, f = a.skuById[o.sku._id], b = a.unitById[(A = f.unit) == null ? void 0 : A._id], k = b.measurements.find((P) => {
292
304
  var d;
293
305
  return ((d = o.measurement) == null ? void 0 : d.id) === P.id;
294
306
  }), T = o.sku.unit._id !== f.unit._id || !b || o.measurement && !k;
295
- return j(St, {
307
+ return j(Tt, {
296
308
  style: {
297
309
  flex: "1 1 0%"
298
310
  },
@@ -320,9 +332,9 @@ function Yt(p, h = {}) {
320
332
  );
321
333
  },
322
334
  rules: [
323
- It(o.quantityStep),
335
+ Ft(o.quantityStep),
324
336
  ...+se(o.quantity) ? [
325
- $t(
337
+ Ct(
326
338
  +se(
327
339
  o.minimumQuantity ?? {
328
340
  amount: 1,
@@ -332,7 +344,7 @@ function Yt(p, h = {}) {
332
344
  )
333
345
  )
334
346
  ] : [],
335
- Mt(
347
+ St(
336
348
  o.maximumQuantity ? +se(o.maximumQuantity) : 1 / 0
337
349
  ),
338
350
  function(d) {
@@ -388,13 +400,13 @@ function Yt(p, h = {}) {
388
400
  minSize: 100,
389
401
  cell(c) {
390
402
  const o = c.row.original;
391
- return j(de.FmTextField, {
392
- modelValue: se(o.quantityStep ?? Le.reset(), !1),
403
+ return j(ue.FmTextField, {
404
+ modelValue: se(o.quantityStep ?? Ee.reset(), !1),
393
405
  key: o.sku._id,
394
406
  "onUpdate:modelValue": (f) => {
395
407
  p.updateItem({
396
408
  ...o,
397
- quantityStep: ye(+f)
409
+ quantityStep: ve(+f)
398
410
  });
399
411
  },
400
412
  rules: [
@@ -402,7 +414,7 @@ function Yt(p, h = {}) {
402
414
  amount: 1,
403
415
  precision: be(o.sku.unit, o.measurement)
404
416
  }),
405
- pt(o.sku.unit, o.measurement)
417
+ kt(o.sku.unit, o.measurement)
406
418
  ]
407
419
  });
408
420
  },
@@ -415,14 +427,14 @@ function Yt(p, h = {}) {
415
427
  const o = c.row.original;
416
428
  return j("div", { class: "flex items-center" }, [
417
429
  r.usePurchaseOrderV2 ? j(
418
- de.FmTooltip,
430
+ ue.FmTooltip,
419
431
  {
420
432
  zIndex: 50,
421
433
  placement: "left"
422
434
  },
423
435
  {
424
436
  default() {
425
- return j(de.FmButton, {
437
+ return j(ue.FmButton, {
426
438
  key: o.sku._id,
427
439
  type: "button",
428
440
  icon: "add_circle",
@@ -435,9 +447,9 @@ function Yt(p, h = {}) {
435
447
  sku: o.sku,
436
448
  code: o.sku.code,
437
449
  name: o.sku.name,
438
- quantity: ye(1),
439
- quantityStep: ye(1),
440
- minimumQuantity: ye(1)
450
+ quantity: ve(1),
451
+ quantityStep: ve(1),
452
+ minimumQuantity: ve(1)
441
453
  };
442
454
  u.validateUnitInput(
443
455
  f,
@@ -458,7 +470,7 @@ function Yt(p, h = {}) {
458
470
  }
459
471
  }
460
472
  ) : null,
461
- j(de.FmButton, {
473
+ j(ue.FmButton, {
462
474
  class: "delete-button",
463
475
  key: o.sku._id,
464
476
  type: "button",
@@ -493,7 +505,7 @@ function Yt(p, h = {}) {
493
505
  })
494
506
  };
495
507
  }
496
- const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-center" }, Kt = { class: "flex-1 flex gap-1 items-center" }, Jt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Zt = { 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 = {
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 = {
497
509
  key: 0,
498
510
  class: "flex gap-8 w-full"
499
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({
@@ -508,17 +520,17 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
508
520
  return a;
509
521
  }
510
522
  return (a, r) => {
511
- var u, x, F, c, o, f, b, k, T, R, P, d, y, w, i, g, O, $, _, W, te, E, B, J, l, n, C, q, z, G;
523
+ var u, x, C, c, o, f, b, k, T, A, P, d, y, w, i, g, O, M, _, W, te, E, B, Z, l, n, F, q, z, G;
512
524
  const s = V("FmLabel");
513
- return M(), N("div", Wt, [
525
+ return $(), N("div", Wt, [
514
526
  e("div", Gt, [
515
527
  e("div", Kt, [
516
- e("span", Jt, " (" + I(a.row.original.sku.code) + ") ", 1),
517
- e("span", Zt, I(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)
518
530
  ]),
519
531
  e("div", null, [
520
532
  m(t(ee), {
521
- render: (F = (x = (u = a.cellByColId.Delete) == null ? void 0 : u.column) == null ? void 0 : x.columnDef) == null ? void 0 : F.cell,
533
+ render: (C = (x = (u = a.cellByColId.Delete) == null ? void 0 : u.column) == null ? void 0 : x.columnDef) == null ? void 0 : C.cell,
522
534
  props: (o = (c = a.cellByColId.Delete) == null ? void 0 : c.getContext) == null ? void 0 : o.call(c)
523
535
  }, null, 8, ["render", "props"])
524
536
  ])
@@ -530,7 +542,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
530
542
  }, null, 8, ["label"]),
531
543
  m(t(ee), {
532
544
  render: (k = (b = (f = a.cellByColId[t(Q).Code]) == null ? void 0 : f.column) == null ? void 0 : b.columnDef) == null ? void 0 : k.cell,
533
- props: (R = (T = a.cellByColId[t(Q).Code]) == null ? void 0 : T.getContext) == null ? void 0 : R.call(T)
545
+ props: (A = (T = a.cellByColId[t(Q).Code]) == null ? void 0 : T.getContext) == null ? void 0 : A.call(T)
534
546
  }, null, 8, ["render", "props"]),
535
547
  r[0] || (r[0] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
536
548
  ]),
@@ -545,13 +557,13 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
545
557
  r[1] || (r[1] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
546
558
  ])
547
559
  ]),
548
- a.row.original ? (M(), N("div", oo, [
560
+ a.row.original ? ($(), N("div", oo, [
549
561
  e("div", so, [
550
562
  m(s, {
551
563
  label: t(h)(`inventory.transfer.form.items.table.${t(Q).DefaultAmount}`)
552
564
  }, null, 8, ["label"]),
553
565
  m(t(ee), {
554
- render: ($ = (O = (g = a.cellByColId[t(Q).DefaultAmount]) == null ? void 0 : g.column) == null ? void 0 : O.columnDef) == null ? void 0 : $.cell,
566
+ render: (M = (O = (g = a.cellByColId[t(Q).DefaultAmount]) == null ? void 0 : g.column) == null ? void 0 : O.columnDef) == null ? void 0 : M.cell,
555
567
  props: (W = (_ = a.cellByColId[t(Q).DefaultAmount]) == null ? void 0 : _.getContext) == null ? void 0 : W.call(_)
556
568
  }, null, 8, ["render", "props"]),
557
569
  r[2] || (r[2] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
@@ -562,7 +574,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
562
574
  }, null, 8, ["label"]),
563
575
  m(t(ee), {
564
576
  render: (B = (E = (te = a.cellByColId[t(Q).Step]) == null ? void 0 : te.column) == null ? void 0 : E.columnDef) == null ? void 0 : B.cell,
565
- props: (l = (J = a.cellByColId[t(Q).Step]) == null ? void 0 : J.getContext) == null ? void 0 : l.call(J)
577
+ props: (l = (Z = a.cellByColId[t(Q).Step]) == null ? void 0 : Z.getContext) == null ? void 0 : l.call(Z)
566
578
  }, null, 8, ["render", "props"]),
567
579
  r[3] || (r[3] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
568
580
  ])
@@ -573,7 +585,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
573
585
  label: t(h)(`inventory.transfer.form.items.table.${t(Q).Limit}`)
574
586
  }, null, 8, ["label"]),
575
587
  m(t(ee), {
576
- render: (q = (C = (n = a.cellByColId[t(Q).Limit]) == null ? void 0 : n.column) == null ? void 0 : C.columnDef) == null ? void 0 : q.cell,
588
+ render: (q = (F = (n = a.cellByColId[t(Q).Limit]) == null ? void 0 : n.column) == null ? void 0 : F.columnDef) == null ? void 0 : q.cell,
577
589
  props: (G = (z = a.cellByColId[t(Q).Limit]) == null ? void 0 : z.getContext) == null ? void 0 : G.call(z)
578
590
  }, null, 8, ["render", "props"]),
579
591
  r[4] || (r[4] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
@@ -594,19 +606,19 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
594
606
  function h(v) {
595
607
  return v.column.columnDef.meta;
596
608
  }
597
- return (v, a) => (M(), N(pe, null, [
609
+ return (v, a) => ($(), N(pe, null, [
598
610
  e("tr", {
599
611
  class: "hover:bg-fm-color-opacity-sm border-b border-fm-color-neutral-gray-100",
600
612
  style: _e({ backgroundColor: v.errorMessage ? "#ffd6d6" : void 0 })
601
613
  }, [
602
- (M(!0), N(pe, null, je(v.row.getVisibleCells(), (r) => {
603
- var s, u, x, F, c;
604
- return M(), N("td", {
614
+ ($(!0), N(pe, null, je(v.row.getVisibleCells(), (r) => {
615
+ var s, u, x, C, c;
616
+ return $(), N("td", {
605
617
  key: r.id,
606
618
  class: re(["text-fm-color-typo-primary", ((s = h(r)) == null ? void 0 : s.cellClass) ?? "px-16", "py-2"]),
607
619
  style: _e({
608
620
  width: (u = h(r)) != null && u.width ? (x = h(r)) == null ? void 0 : x.width : r.column.getSize() !== 0 ? `${r.column.getSize()}px` : void 0,
609
- maxWidth: (F = h(r)) == null ? void 0 : F.maxWidth,
621
+ maxWidth: (C = h(r)) == null ? void 0 : C.maxWidth,
610
622
  textAlign: ((c = h(r)) == null ? void 0 : c.textAlign) ?? "left"
611
623
  })
612
624
  }, [
@@ -619,7 +631,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
619
631
  ], 6);
620
632
  }), 128))
621
633
  ], 4),
622
- v.errorMessage ? (M(), N("tr", uo, [
634
+ v.errorMessage ? ($(), N("tr", uo, [
623
635
  e("td", {
624
636
  colspan: v.row.getVisibleCells().length,
625
637
  class: "text-red-600 px-16 py-2"
@@ -638,16 +650,16 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
638
650
  },
639
651
  emits: ["update:disabled"],
640
652
  setup(p, { expose: h, emit: v }) {
641
- const a = p, r = v, s = We(), { t: u } = me(), x = Y({}), F = Je(), c = Ke(), o = At(), f = ge(), b = Ge(), k = et();
642
- Ce(
653
+ const a = p, r = v, s = Ze(), { t: u } = me(), x = Y({}), C = Ge(), c = We(), o = Ot(), f = ge(), b = Je(), k = et();
654
+ Fe(
643
655
  () => s.purchaseOrder.items.length,
644
656
  () => {
645
657
  x.value = {};
646
658
  }
647
- ), F.watchLocation(async () => {
659
+ ), C.watchLocation(async () => {
648
660
  location && (s.purchaseOrder.supplier || (s.purchaseOrder.supplier = o.suppliers.find((l) => l) ?? s.purchaseOrder.supplier));
649
661
  });
650
- const T = Dt(
662
+ const T = Mt(
651
663
  () => s.purchaseOrder,
652
664
  (l) => {
653
665
  s.purchaseOrder = {
@@ -655,14 +667,14 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
655
667
  supplier: l.supplier ?? (s == null ? void 0 : s.purchaseOrder.supplier)
656
668
  };
657
669
  }
658
- ), R = L({
670
+ ), A = L({
659
671
  get() {
660
672
  var l, n;
661
673
  return typeof ((n = (l = s.purchaseOrder) == null ? void 0 : l.supplier) == null ? void 0 : n.internal) == "string" ? X.TRANSFER : X.PURCHASE;
662
674
  },
663
675
  set(l) {
664
- var C, q;
665
- const n = typeof ((q = (C = s.purchaseOrder) == null ? void 0 : C.supplier) == null ? void 0 : q.internal) == "string" ? X.TRANSFER : X.PURCHASE;
676
+ var F, q;
677
+ const n = typeof ((q = (F = s.purchaseOrder) == null ? void 0 : F.supplier) == null ? void 0 : q.internal) == "string" ? X.TRANSFER : X.PURCHASE;
666
678
  l !== n && (s.purchaseOrder.supplier = l === X.PURCHASE ? T.locationOptionsTypePurchase.value[0] : T.locationOptionsTypeTransfer.value[0]);
667
679
  }
668
680
  }), P = L(() => T.transferLocationOptions.value), d = L({
@@ -687,7 +699,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
687
699
  promptSelectLocations: w,
688
700
  columnDefs: i,
689
701
  rowData: g
690
- } = ct({
702
+ } = Vt({
691
703
  getLocations() {
692
704
  return s.locations;
693
705
  },
@@ -697,12 +709,12 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
697
709
  });
698
710
  function O() {
699
711
  var l, n;
700
- return (l = s.locations) != null && l.find((C) => {
712
+ return (l = s.locations) != null && l.find((F) => {
701
713
  var q, z;
702
- return ((q = C.doc) == null ? void 0 : q._id) === ((z = s.purchaseOrder.supplier) == null ? void 0 : z._id);
714
+ return ((q = F.doc) == null ? void 0 : q._id) === ((z = s.purchaseOrder.supplier) == null ? void 0 : z._id);
703
715
  }) ? `Location ${(n = s.purchaseOrder.supplier) == null ? void 0 : n.name} must be removed because template cannot be used to transfer to itself.` : !0;
704
716
  }
705
- const $ = L({
717
+ const M = L({
706
718
  get() {
707
719
  return s.purchaseOrder.remark ?? void 0;
708
720
  },
@@ -735,12 +747,12 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
735
747
  },
736
748
  updateItem: (l) => {
737
749
  let n = [];
738
- l.id ? n = s.purchaseOrder.items.map((C) => C.id !== l.id ? C : l) : n = s.purchaseOrder.items.map((C) => C.sku._id !== l.sku._id ? C : l), s.purchaseOrder.items = 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;
739
751
  },
740
752
  deleteItem: (l) => {
741
753
  console.log(l.id);
742
754
  let n = [];
743
- l.id ? n = s.purchaseOrder.items.filter((C) => C.id !== l.id) : n = s.purchaseOrder.items.filter((C) => C.sku._id !== l.sku._id), s.purchaseOrder.items = 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;
744
756
  }
745
757
  })), te = Yt(
746
758
  {
@@ -761,52 +773,52 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
761
773
  }
762
774
  },
763
775
  b.transferTemplateColumnDefs({
764
- onUpdate: (l, n, C, q) => {
776
+ onUpdate: (l, n, F, q) => {
765
777
  if (l < 0 || l >= s.purchaseOrder.items.length) return;
766
778
  const z = s.purchaseOrder.items[l];
767
779
  z && W.value.updateItem({
768
780
  ...z,
769
781
  sku: n,
770
782
  // Sku might be outdated, so we need to update it
771
- code: C,
783
+ code: F,
772
784
  measurement: q
773
785
  });
774
786
  }
775
787
  })
776
- ), E = L(() => te.columnDefs.value), { promptSelectIngredients: B } = Rt();
777
- async function J() {
788
+ ), E = L(() => te.columnDefs.value), { promptSelectIngredients: B } = Dt();
789
+ async function Z() {
778
790
  const n = c.skus.map((D) => ({
779
791
  label: D.name,
780
792
  sublabel: D.code,
781
793
  value: D
782
794
  })).filter((D) => {
783
- var A;
784
- return (A = s.purchaseOrder.items) == null ? void 0 : A.find((K) => K.sku._id === D.value._id);
785
- }).map((D) => D.value), C = s.purchaseOrder.items ?? [], q = await B(
795
+ var R;
796
+ return (R = s.purchaseOrder.items) == null ? void 0 : R.find((K) => K.sku._id === D.value._id);
797
+ }).map((D) => D.value), F = s.purchaseOrder.items ?? [], q = await B(
786
798
  n.map((D) => D._id),
787
799
  (D) => {
788
- const A = c.skuById[D], K = C.find((H) => H.sku._id === A._id);
800
+ const R = c.skuById[D], K = F.find((H) => H.sku._id === R._id);
789
801
  if (K)
790
802
  return K;
791
- const Z = { amount: 1, precision: be(A.unit) };
803
+ const J = { amount: 1, precision: be(R.unit) };
792
804
  let S = {
793
805
  id: f.usePurchaseOrderV2 ? crypto.randomUUID() : void 0,
794
- sku: A,
795
- code: A.code,
796
- name: A.name,
797
- quantity: Z,
798
- minimumQuantity: Z,
806
+ sku: R,
807
+ code: R.code,
808
+ name: R.name,
809
+ quantity: J,
810
+ minimumQuantity: J,
799
811
  // maximumQuantity: adjustmentAmountMultiplyDecimal(minimumQuantity, {
800
812
  // amount: 100,
801
813
  // precision: 0
802
814
  // }),
803
- quantityStep: Z
815
+ quantityStep: J
804
816
  };
805
817
  return k.validateUnitInput(
806
818
  S,
807
- A,
819
+ R,
808
820
  {
809
- amount: Z,
821
+ amount: J,
810
822
  measurement: null
811
823
  },
812
824
  (H) => {
@@ -818,30 +830,30 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
818
830
  if (!q) return;
819
831
  const z = q.map((D) => D.sku._id), G = [];
820
832
  for (const D of z) {
821
- const A = C.filter((K) => K.sku._id === D);
822
- if (A.length > 0)
823
- G.push(...A);
833
+ const R = F.filter((K) => K.sku._id === D);
834
+ if (R.length > 0)
835
+ G.push(...R);
824
836
  else {
825
- const K = q.find((Z) => Z.sku._id === D);
837
+ const K = q.find((J) => J.sku._id === D);
826
838
  K && G.push(K);
827
839
  }
828
840
  }
829
- G.sort((D, A) => D.sku.code.localeCompare(A.sku.code)), s.purchaseOrder.items = G;
841
+ G.sort((D, R) => D.sku.code.localeCompare(R.sku.code)), s.purchaseOrder.items = G;
830
842
  }
831
843
  return (l, n) => {
832
- const C = V("FmTextField"), q = V("FmSelect"), z = V("FmTextarea"), G = V("FmButton"), D = V("FmTable"), A = V("FmFormGroup"), K = V("FmForm");
833
- return M(), le(K, {
844
+ const F = V("FmTextField"), q = V("FmSelect"), z = V("FmTextarea"), G = V("FmButton"), D = V("FmTable"), R = V("FmFormGroup"), K = V("FmForm");
845
+ return $(), le(K, {
834
846
  ref_key: "formRef",
835
847
  ref: _,
836
848
  class: "flex flex-col gap-32",
837
849
  disabled: l.disabled
838
850
  }, {
839
851
  default: U(() => {
840
- var Z;
852
+ var J;
841
853
  return [
842
854
  e("div", co, [
843
855
  e("div", fo, [
844
- m(C, {
856
+ m(F, {
845
857
  label: t(u)("inventory.transfer.form.name"),
846
858
  "label-mark": "required",
847
859
  modelValue: t(s).name,
@@ -850,8 +862,8 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
850
862
  }, null, 8, ["label", "modelValue", "rules"]),
851
863
  m(q, {
852
864
  label: t(u)("inventory.transfer.form.type.title"),
853
- "model-value": R.value,
854
- "onUpdate:modelValue": n[1] || (n[1] = (S) => R.value = S),
865
+ "model-value": A.value,
866
+ "onUpdate:modelValue": n[1] || (n[1] = (S) => A.value = S),
855
867
  items: [
856
868
  {
857
869
  label: t(u)("inventory.transfer.form.type.purchase"),
@@ -874,12 +886,12 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
874
886
  "line-clamp-1 fm-typo-en-body-lg-400",
875
887
  l.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
876
888
  ])
877
- }, I(t(ft)(R.value)), 3)
889
+ }, I(t(ct)(A.value)), 3)
878
890
  ]),
879
891
  _: 1
880
892
  }, 8, ["label", "model-value", "items", "rules"]),
881
893
  m(q, {
882
- label: R.value === t(X).PURCHASE ? t(u)("inventory.transfer.form.purchaseFrom") : t(u)("inventory.transfer.form.transferFrom"),
894
+ label: A.value === t(X).PURCHASE ? t(u)("inventory.transfer.form.purchaseFrom") : t(u)("inventory.transfer.form.transferFrom"),
883
895
  modelValue: d.value,
884
896
  "onUpdate:modelValue": n[2] || (n[2] = (S) => d.value = S),
885
897
  items: P.value
@@ -887,7 +899,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
887
899
  "menu-wrapper": U((S) => {
888
900
  var H;
889
901
  return [
890
- m(Vt, Qe(S, {
902
+ m($t, Qe(S, {
891
903
  items: P.value,
892
904
  "model-value": (H = l.modelValue.purchaseOrder.supplier) == null ? void 0 : H._id
893
905
  }), null, 16, ["items", "model-value"])
@@ -906,7 +918,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
906
918
  }),
907
919
  _: 1
908
920
  }, 8, ["label", "modelValue", "items"]),
909
- m(C, {
921
+ m(F, {
910
922
  label: t(u)("inventory.transfer.form.reference"),
911
923
  "label-mark": "optional",
912
924
  modelValue: t(s).purchaseOrder.ref,
@@ -916,8 +928,8 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
916
928
  label: t(u)("inventory.transfer.form.remark"),
917
929
  "label-mark": "optional",
918
930
  "max-length": 240,
919
- modelValue: $.value,
920
- "onUpdate:modelValue": n[4] || (n[4] = (S) => $.value = S),
931
+ modelValue: M.value,
932
+ "onUpdate:modelValue": n[4] || (n[4] = (S) => M.value = S),
921
933
  class: re({ "text-fm-color-typo-disabled": l.disabled })
922
934
  }, null, 8, ["label", "modelValue", "class"])
923
935
  ])
@@ -942,9 +954,9 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
942
954
  "hide-footer": ""
943
955
  }, null, 8, ["column-defs", "row-data", "onRowClick"]),
944
956
  e("div", bo, [
945
- m(A, {
957
+ m(R, {
946
958
  "model-value": [
947
- (Z = a.modelValue.purchaseOrder.supplier) == null ? void 0 : Z._id,
959
+ (J = a.modelValue.purchaseOrder.supplier) == null ? void 0 : J._id,
948
960
  ...a.modelValue.locations ?? []
949
961
  ].join(","),
950
962
  rules: [O]
@@ -954,7 +966,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
954
966
  e("div", go, [
955
967
  e("div", ho, [
956
968
  e("div", xo, I(t(u)("inventory.transfer.form.items.title")), 1),
957
- t(b).isEnabled ? (M(), le(G, {
969
+ t(b).isEnabled ? ($(), le(G, {
958
970
  key: 0,
959
971
  label: "Check NetSuite",
960
972
  "prepend-icon": "troubleshoot",
@@ -968,11 +980,11 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
968
980
  "prepend-icon": "add",
969
981
  variant: "plain",
970
982
  class: "border-2 rounded-lg border-fm-color-primary",
971
- onClick: n[5] || (n[5] = (S) => J()),
983
+ onClick: n[5] || (n[5] = (S) => Z()),
972
984
  size: "md"
973
985
  }, null, 8, ["disabled", "label"])
974
986
  ]),
975
- t(b).isEnabled ? (M(), N("div", _o, n[9] || (n[9] = [
987
+ t(b).isEnabled ? ($(), N("div", _o, n[9] || (n[9] = [
976
988
  ne(" NetSuite is enabled. "),
977
989
  e("ul", { style: { "list-style": "initial", "margin-left": "20px" } }, [
978
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,7 +1003,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
991
1003
  ]),
992
1004
  n[13] || (n[13] = 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))
993
1005
  ]),
994
- (M(), le(D, {
1006
+ ($(), le(D, {
995
1007
  "column-defs": E.value,
996
1008
  "row-data": t(s).purchaseOrder.items,
997
1009
  key: t(s).purchaseOrder.items.map((S) => S.sku._id).join("."),
@@ -1007,7 +1019,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1007
1019
  }, null, 8, ["row", "errorMessage", "disabled"])
1008
1020
  ]),
1009
1021
  "list-row": U((S) => [
1010
- (M(), le(Ze, {
1022
+ ($(), le(Xe, {
1011
1023
  row: S,
1012
1024
  key: t(s).purchaseOrder.items.map((H) => H.sku._id).join(".")
1013
1025
  }, {
@@ -1024,7 +1036,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1024
1036
  ]),
1025
1037
  _: 1
1026
1038
  }, 8, ["column-defs", "row-data", "page-size"])),
1027
- m(A, {
1039
+ m(R, {
1028
1040
  "model-value": t(s).purchaseOrder.items.length,
1029
1041
  rules: [t(we)(1)]
1030
1042
  }, null, 8, ["model-value", "rules"])
@@ -1035,7 +1047,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1035
1047
  }, 8, ["disabled"]);
1036
1048
  };
1037
1049
  }
1038
- }), Co = { class: "flex w-full" }, Fo = /* @__PURE__ */ ae({
1050
+ }), Fo = { class: "flex w-full" }, Co = /* @__PURE__ */ ae({
1039
1051
  __name: "FmConfirmationButton",
1040
1052
  props: {
1041
1053
  label: {},
@@ -1050,9 +1062,9 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1050
1062
  r.value = !1, a("confirm");
1051
1063
  }
1052
1064
  return (u, x) => {
1053
- const F = V("FmButton"), c = V("FmDialog");
1054
- return M(), N("div", null, [
1055
- m(F, {
1065
+ const C = V("FmButton"), c = V("FmDialog");
1066
+ return $(), N("div", null, [
1067
+ m(C, {
1056
1068
  label: v.label,
1057
1069
  loading: v.loading,
1058
1070
  onClick: x[0] || (x[0] = (o) => r.value = !0)
@@ -1066,13 +1078,13 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1066
1078
  e("div", null, I(v.confirmTitle || "Confirm"), 1)
1067
1079
  ]),
1068
1080
  "dialog-footer": U(() => [
1069
- e("div", Co, [
1070
- m(F, {
1081
+ e("div", Fo, [
1082
+ m(C, {
1071
1083
  label: "Cancel",
1072
1084
  variant: "tertiary",
1073
1085
  onClick: x[1] || (x[1] = (o) => r.value = !1)
1074
1086
  }),
1075
- m(F, {
1087
+ m(C, {
1076
1088
  class: "ml-auto",
1077
1089
  label: "Confirm",
1078
1090
  variant: "primary",
@@ -1090,7 +1102,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1090
1102
  ]);
1091
1103
  };
1092
1104
  }
1093
- }), So = { class: "flex items-center" }, Io = { class: "fm-typo-en-title-md-800" }, $o = { class: "flex gap-4" }, Mo = /* @__PURE__ */ ae({
1105
+ }), So = { class: "flex items-center" }, Io = { class: "fm-typo-en-title-md-800" }, Mo = { class: "flex gap-4" }, $o = /* @__PURE__ */ ae({
1094
1106
  __name: "TransferTemplateDialog",
1095
1107
  props: /* @__PURE__ */ qe({
1096
1108
  mode: {},
@@ -1103,7 +1115,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1103
1115
  emits: /* @__PURE__ */ qe(["update:show", "submitted"], ["update:disabled"]),
1104
1116
  setup(p, { expose: h, emit: v }) {
1105
1117
  var w;
1106
- const a = p, r = v, s = Ut(), u = Tt(), { t: x } = me(), F = Xe(a, "show");
1118
+ const a = p, r = v, s = Rt(), u = yt(), { t: x } = me(), C = Ke(a, "show");
1107
1119
  function c() {
1108
1120
  return {
1109
1121
  _id: "",
@@ -1135,7 +1147,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1135
1147
  };
1136
1148
  }
1137
1149
  const o = Y(a.modelValue ?? c()), f = Y(((w = a.modelValue) == null ? void 0 : w._id) ?? `${Math.random()}`);
1138
- Ce(
1150
+ Fe(
1139
1151
  () => a.show,
1140
1152
  (i) => {
1141
1153
  var g;
@@ -1144,11 +1156,11 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1144
1156
  );
1145
1157
  const b = lt(p, "disabled"), k = L(() => {
1146
1158
  switch (a.mode) {
1147
- case ue.READ:
1159
+ case de.READ:
1148
1160
  return "";
1149
- case ue.CREATE:
1161
+ case de.CREATE:
1150
1162
  return x("inventory.transfer.template.create.title");
1151
- case ue.UPDATE:
1163
+ case de.UPDATE:
1152
1164
  return x("inventory.transfer.template.update.title");
1153
1165
  }
1154
1166
  return "";
@@ -1167,25 +1179,25 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1167
1179
  (g = (i = T.value) == null ? void 0 : i.resetInputs) == null || g.call(i);
1168
1180
  }
1169
1181
  });
1170
- async function R() {
1182
+ async function A() {
1171
1183
  var g, O;
1172
1184
  const i = o.value;
1173
1185
  if (i) {
1174
- b.value = !0, (((g = i.purchaseOrder.supplier) == null ? void 0 : g.internal) === ve.enum.warehouse || ((O = i.purchaseOrder.supplier) == null ? void 0 : O.internal) === ve.enum.restaurant) && (i.purchaseOrder.items = i.purchaseOrder.items.map(
1175
- ({ totalCost: $, ..._ }) => _
1186
+ 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(
1187
+ ({ totalCost: M, ..._ }) => _
1176
1188
  ));
1177
1189
  try {
1178
- await s.createTemplate(i), await new Promise(($) => setTimeout($, 1e3)), u.open({
1190
+ await s.createTemplate(i), await new Promise((M) => setTimeout(M, 1e3)), u.open({
1179
1191
  title: x("inventory.transfer.template.create.success"),
1180
1192
  message: x("inventory.transfer.template.create.successMessage"),
1181
1193
  type: "success"
1182
1194
  }), r("update:show", !1), r("submitted");
1183
- } catch ($) {
1195
+ } catch (M) {
1184
1196
  u.open({
1185
1197
  title: x("inventory.transfer.template.create.error"),
1186
1198
  message: x("inventory.transfer.template.create.errorMessage"),
1187
1199
  type: "error"
1188
- }), console.error("Error in creating transfer template", $);
1200
+ }), console.error("Error in creating transfer template", M);
1189
1201
  } finally {
1190
1202
  b.value = !1;
1191
1203
  }
@@ -1195,21 +1207,21 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1195
1207
  var g, O;
1196
1208
  const i = o.value;
1197
1209
  if (i) {
1198
- b.value = !0, (((g = i.purchaseOrder.supplier) == null ? void 0 : g.internal) === ve.enum.warehouse || ((O = i.purchaseOrder.supplier) == null ? void 0 : O.internal) === ve.enum.restaurant) && (i.purchaseOrder.items = i.purchaseOrder.items.map(
1199
- ({ totalCost: $, ..._ }) => _
1210
+ 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(
1211
+ ({ totalCost: M, ..._ }) => _
1200
1212
  ));
1201
1213
  try {
1202
- await s.updateTemplate(i), await new Promise(($) => setTimeout($, 1e3)), u.open({
1214
+ await s.updateTemplate(i), await new Promise((M) => setTimeout(M, 1e3)), u.open({
1203
1215
  title: x("inventory.transfer.template.update.success"),
1204
1216
  message: x("inventory.transfer.template.update.successMessage"),
1205
1217
  type: "success"
1206
1218
  }), r("update:show", !1), r("submitted");
1207
- } catch ($) {
1219
+ } catch (M) {
1208
1220
  u.open({
1209
1221
  title: x("inventory.transfer.template.update.error"),
1210
1222
  message: x("inventory.transfer.template.update.errorMessage"),
1211
1223
  type: "error"
1212
- }), console.error("Error in updating transfer template", $);
1224
+ }), console.error("Error in updating transfer template", M);
1213
1225
  } finally {
1214
1226
  b.value = !1;
1215
1227
  }
@@ -1217,9 +1229,9 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1217
1229
  }
1218
1230
  function d() {
1219
1231
  switch (a.mode) {
1220
- case ue.CREATE:
1221
- return R();
1222
- case ue.UPDATE:
1232
+ case de.CREATE:
1233
+ return A();
1234
+ case de.UPDATE:
1223
1235
  return P();
1224
1236
  }
1225
1237
  }
@@ -1228,10 +1240,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1228
1240
  (g = (i = T.value) == null ? void 0 : i.validateInputs) == null || g.call(i);
1229
1241
  }
1230
1242
  return (i, g) => {
1231
- const O = V("FmButton"), $ = V("FmSideSheet");
1232
- return M(), le($, {
1233
- modelValue: t(F),
1234
- "onUpdate:modelValue": g[3] || (g[3] = (_) => Ye(F) ? F.value = _ : null),
1243
+ const O = V("FmButton"), M = V("FmSideSheet");
1244
+ return $(), le(M, {
1245
+ modelValue: t(C),
1246
+ "onUpdate:modelValue": g[3] || (g[3] = (_) => Ye(C) ? C.value = _ : null),
1235
1247
  "dismiss-away": "",
1236
1248
  "close-button": "",
1237
1249
  "max-width": 1600
@@ -1242,7 +1254,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1242
1254
  ])
1243
1255
  ]),
1244
1256
  default: U(() => [
1245
- (M(), le(To, {
1257
+ ($(), le(To, {
1246
1258
  class: "w-full",
1247
1259
  ref_key: "formRef",
1248
1260
  ref: T,
@@ -1255,11 +1267,11 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1255
1267
  }, null, 8, ["model-value", "disabled"]))
1256
1268
  ]),
1257
1269
  "side-sheet-footer": U(() => [
1258
- e("div", $o, [
1259
- m(Fo, {
1270
+ e("div", Mo, [
1271
+ m(Co, {
1260
1272
  loading: b.value,
1261
1273
  label: t(x)("common.save"),
1262
- "confirm-title": `Save ${a.mode === t(ue).CREATE ? "Template" : "Changes"}`,
1274
+ "confirm-title": `Save ${a.mode === t(de).CREATE ? "Template" : "Changes"}`,
1263
1275
  onConfirm: y
1264
1276
  }, {
1265
1277
  "dialog-content": U(() => g[4] || (g[4] = [
@@ -1283,7 +1295,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1283
1295
  }, 8, ["modelValue"]);
1284
1296
  };
1285
1297
  }
1286
- }), Oo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, Do = { class: "flex justify-between" }, Vo = { class: "fm-typo-en-body-lg-600" }, Ao = { class: "fm-status-badge fm-status-badge-info-secondary" }, Ro = { class: "flex flex-col gap-8" }, Uo = { class: "flex flex-col gap-4" }, Po = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Bo = { class: "flex gap-1" }, qo = { class: "fm-typo-en-body-lg-600" }, No = {
1298
+ }), Oo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, Do = { class: "flex justify-between" }, Vo = { class: "fm-typo-en-body-lg-600" }, Ro = { class: "fm-status-badge fm-status-badge-info-secondary" }, Ao = { class: "flex flex-col gap-8" }, Uo = { class: "flex flex-col gap-4" }, Po = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Bo = { class: "flex gap-1" }, qo = { class: "fm-typo-en-body-lg-600" }, No = {
1287
1299
  key: 0,
1288
1300
  class: "flex flex-col gap-4"
1289
1301
  }, Lo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Eo = { class: "flex gap-1" }, zo = { class: "fm-typo-en-body-lg-600" }, Ho = {
@@ -1295,7 +1307,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1295
1307
  }, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Go = { class: "fm-typo-en-body-lg-600" }, Ko = {
1296
1308
  key: 3,
1297
1309
  class: "flex flex-col gap-4"
1298
- }, Jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Zo = { 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 = {
1310
+ }, Zo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Jo = { class: "fm-typo-en-body-lg-600" }, Xo = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, es = { class: "flex flex-col gap-8" }, ts = { class: "fm-typo-en-body-lg-600" }, os = { class: "flex w-full gap-4" }, ss = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, 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 = {
1299
1311
  key: 0,
1300
1312
  class: "shrink-0 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
1301
1313
  }, is = {
@@ -1315,16 +1327,16 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1315
1327
  }), x = [
1316
1328
  { accessorKey: "name", header: () => "Name" },
1317
1329
  { accessorKey: "type", header: () => "Type" }
1318
- ], F = Y(""), c = L(
1330
+ ], C = Y(""), c = L(
1319
1331
  () => {
1320
- var b, k, T, R;
1321
- 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.TRANSFER : X.PURCHASE;
1332
+ var b, k, T, A;
1333
+ return ((k = (b = u.value) == null ? void 0 : b.supplier) == null ? void 0 : k.internal) === "restaurant" || ((A = (T = u.value) == null ? void 0 : T.supplier) == null ? void 0 : A.internal) === "warehouse" ? X.TRANSFER : X.PURCHASE;
1322
1334
  }
1323
- ), o = Y(!0), f = Xe(v, "show");
1335
+ ), o = Y(!0), f = Ke(v, "show");
1324
1336
  return (b, k) => {
1325
1337
  var g;
1326
- const T = V("FmMenuDivider"), R = V("FmCard"), P = V("FmIcon"), d = V("FmTextField"), y = V("FmTable"), w = V("FmButton"), i = V("FmSideSheet");
1327
- return M(), le(i, {
1338
+ const T = V("FmMenuDivider"), A = V("FmCard"), P = V("FmIcon"), d = V("FmTextField"), y = V("FmTable"), w = V("FmButton"), i = V("FmSideSheet");
1339
+ return $(), le(i, {
1328
1340
  header: t(s)("inventory.transfer.template.details.view", { template: (g = b.template) == null ? void 0 : g.name }),
1329
1341
  modelValue: t(f),
1330
1342
  "onUpdate:modelValue": k[2] || (k[2] = (O) => Ye(f) ? f.value = O : null),
@@ -1333,53 +1345,53 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1333
1345
  "max-width": 1200
1334
1346
  }, {
1335
1347
  default: U(() => {
1336
- var O, $;
1348
+ var O, M;
1337
1349
  return [
1338
1350
  e("div", Oo, [
1339
1351
  e("div", null, [
1340
- m(R, {
1352
+ m(A, {
1341
1353
  variant: "outlined",
1342
1354
  class: "flex flex-col gap-8 px-12 py-16"
1343
1355
  }, {
1344
1356
  default: U(() => {
1345
- var _, W, te, E, B, J, l, n, C;
1357
+ var _, W, te, E, B, Z, l, n, F;
1346
1358
  return [
1347
1359
  e("div", Do, [
1348
1360
  e("div", Vo, I(t(s)("inventory.transfer.template.details.templateSummary")), 1),
1349
- e("div", Ao, I(t(s)(
1361
+ e("div", Ro, I(t(s)(
1350
1362
  `inventory.transfer.receiveRequest.details.type.${c.value.toLocaleLowerCase("en-US")}`
1351
1363
  )), 1)
1352
1364
  ]),
1353
1365
  m(T),
1354
- e("div", Ro, [
1366
+ e("div", Ao, [
1355
1367
  e("div", Uo, [
1356
1368
  e("div", Po, [
1357
1369
  e("div", Bo, I(t(s)("inventory.transfer.receiveRequest.details.createdAt")), 1)
1358
1370
  ]),
1359
- e("div", qo, I(t(yt)(((_ = b.template) == null ? void 0 : _._id) ?? "")), 1)
1371
+ e("div", qo, I(t(At)(((_ = b.template) == null ? void 0 : _._id) ?? "")), 1)
1360
1372
  ]),
1361
- (W = b.template) != null && W.updatedAt ? (M(), N("div", No, [
1373
+ (W = b.template) != null && W.updatedAt ? ($(), N("div", No, [
1362
1374
  e("div", Lo, [
1363
1375
  e("div", Eo, I(t(s)("inventory.transfer.receiveRequest.details.updatedAt")), 1)
1364
1376
  ]),
1365
1377
  e("div", zo, [
1366
- ne(I(t(vt)(new Date(b.template.updatedAt))) + " ", 1),
1367
- (te = b.template.updatedBy) != null && te.name ? (M(), N(pe, { key: 0 }, [
1378
+ ne(I(t(Ut)(new Date(b.template.updatedAt))) + " ", 1),
1379
+ (te = b.template.updatedBy) != null && te.name ? ($(), N(pe, { key: 0 }, [
1368
1380
  ne(" (" + I(b.template.updatedBy.name) + ") ", 1)
1369
1381
  ], 64)) : oe("", !0)
1370
1382
  ])
1371
1383
  ])) : oe("", !0),
1372
- (B = (E = u.value) == null ? void 0 : E.supplier) != null && B.name ? (M(), N("div", Ho, [
1384
+ (B = (E = u.value) == null ? void 0 : E.supplier) != null && B.name ? ($(), N("div", Ho, [
1373
1385
  e("div", jo, I(t(s)("inventory.transfer.receiveRequest.details.from")), 1),
1374
- e("div", Qo, I((l = (J = u.value) == null ? void 0 : J.supplier) == null ? void 0 : l.name), 1)
1386
+ e("div", Qo, I((l = (Z = u.value) == null ? void 0 : Z.supplier) == null ? void 0 : l.name), 1)
1375
1387
  ])) : oe("", !0),
1376
- (n = u.value) != null && n.ref ? (M(), N("div", Yo, [
1388
+ (n = u.value) != null && n.ref ? ($(), N("div", Yo, [
1377
1389
  e("div", Wo, I(t(s)("inventory.transfer.receiveRequest.details.reference")), 1),
1378
1390
  e("div", Go, I(u.value.ref), 1)
1379
1391
  ])) : oe("", !0),
1380
- (C = u.value) != null && C.remark ? (M(), N("div", Ko, [
1381
- e("div", Jo, I(t(s)("inventory.transfer.receiveRequest.details.remark")), 1),
1382
- e("div", Zo, I(u.value.remark), 1)
1392
+ (F = u.value) != null && F.remark ? ($(), N("div", Ko, [
1393
+ e("div", Zo, I(t(s)("inventory.transfer.receiveRequest.details.remark")), 1),
1394
+ e("div", Jo, I(u.value.remark), 1)
1383
1395
  ])) : oe("", !0)
1384
1396
  ])
1385
1397
  ];
@@ -1390,20 +1402,20 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1390
1402
  e("div", Xo, [
1391
1403
  e("div", es, [
1392
1404
  e("div", ts, I(t(s)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
1393
- (M(!0), N(pe, null, je(((O = u.value) == null ? void 0 : O.items) ?? [], (_) => (M(), N("div", {
1405
+ ($(!0), N(pe, null, je(((O = u.value) == null ? void 0 : O.items) ?? [], (_) => ($(), N("div", {
1394
1406
  key: _.code,
1395
1407
  class: "flex flex-col"
1396
1408
  }, [
1397
1409
  e("div", os, [
1398
1410
  e("div", ss, I(_.name), 1),
1399
1411
  k[3] || (k[3] = e("div", { class: "flex-1 min-w-32" }, null, -1)),
1400
- e("div", ls, I(t(_t)(_.quantity, _.sku.unit, _.measurement)), 1)
1412
+ e("div", ls, I(t(dt)(_.quantity, _.sku.unit, _.measurement)), 1)
1401
1413
  ]),
1402
1414
  e("div", ns, [
1403
1415
  e("div", as, I(_.code), 1),
1404
- _.totalCost && t(r).enableTotalCost ? (M(), N("div", rs, " (" + I(t(bt)(_.totalCost)) + ") ", 1)) : oe("", !0)
1416
+ _.totalCost && t(r).enableTotalCost ? ($(), N("div", rs, " (" + I(t(wt)(_.totalCost)) + ") ", 1)) : oe("", !0)
1405
1417
  ]),
1406
- t(kt)(_) ? (M(), N("div", is, [
1418
+ t(mt)(_) ? ($(), N("div", is, [
1407
1419
  m(P, {
1408
1420
  name: "error",
1409
1421
  color: "system-error-300",
@@ -1423,8 +1435,8 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1423
1435
  ], -1)),
1424
1436
  e("div", ds, [
1425
1437
  m(d, {
1426
- modelValue: F.value,
1427
- "onUpdate:modelValue": k[0] || (k[0] = (_) => F.value = _),
1438
+ modelValue: C.value,
1439
+ "onUpdate:modelValue": k[0] || (k[0] = (_) => C.value = _),
1428
1440
  placeholder: "Filter locations",
1429
1441
  "prepend-icon": "search"
1430
1442
  }, null, 8, ["modelValue"]),
@@ -1432,8 +1444,8 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1432
1444
  "hide-footer": "",
1433
1445
  style: { height: "500px" },
1434
1446
  "column-defs": x,
1435
- "search-value": F.value,
1436
- "row-data": (($ = v.template) == null ? void 0 : $.locations) ?? [{ name: "All locations" }]
1447
+ "search-value": C.value,
1448
+ "row-data": ((M = v.template) == null ? void 0 : M.locations) ?? [{ name: "All locations" }]
1437
1449
  }, null, 8, ["search-value", "row-data"])
1438
1450
  ])
1439
1451
  ])
@@ -1453,33 +1465,33 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1453
1465
  }, 8, ["header", "modelValue", "dismiss-away"]);
1454
1466
  };
1455
1467
  }
1456
- }), 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" }, Os = /* @__PURE__ */ ae({
1468
+ }), cs = { class: "flex-1 flex flex-col gap-8" }, fs = { class: "flex flex-col" }, ys = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, vs = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, bs = { class: "fm-typo-en-body-lg-400" }, gs = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, hs = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, zs = /* @__PURE__ */ ae({
1457
1469
  __name: "TransferTemplateView",
1458
1470
  setup(p) {
1459
- const { t: h } = me(), { createTemplate: v, viewTemplate: a, importTemplates: r, exportTemplates: s } = ze(), { templateDialogProps: u, templateDetailsProps: x } = He(ze()), F = wt(), { loading: c, templates: o } = He(F), f = Y(!1), b = gt(), k = Je(), { breakpoints: T } = Ct();
1460
- Te(F.fetchTemplates);
1461
- const R = L(
1471
+ const { t: h } = me(), { createTemplate: v, viewTemplate: a, importTemplates: r, exportTemplates: s } = Ne(), { templateDialogProps: u, templateDetailsProps: x } = ze(Ne()), C = pt(), { loading: c, templates: o } = ze(C), f = Y(!1), b = it(), k = Ge(), { breakpoints: T } = vt();
1472
+ Te(C.fetchTemplates);
1473
+ const A = L(
1462
1474
  () => f.value || c.value || !k._currentLocation
1463
1475
  ), P = L(() => o.value), d = Y(""), y = L(() => T.value.xs || T.value.sm), w = L(() => y.value ? 10 : 20);
1464
- function i($) {
1465
- switch ($) {
1466
- case Ee.Add:
1476
+ function i(M) {
1477
+ switch (M) {
1478
+ case Le.Add:
1467
1479
  return v();
1468
1480
  case "refresh":
1469
- return F.fetchTemplates();
1481
+ return C.fetchTemplates();
1470
1482
  case "import":
1471
1483
  return r();
1472
1484
  case "export":
1473
1485
  return s();
1474
1486
  }
1475
1487
  }
1476
- function g($) {
1477
- return $;
1488
+ function g(M) {
1489
+ return M;
1478
1490
  }
1479
1491
  const O = L(() => [
1480
1492
  {
1481
1493
  label: h("inventory.closing.template.create.title"),
1482
- value: Ee.Add,
1494
+ value: Le.Add,
1483
1495
  isPrimary: !0,
1484
1496
  prependIcon: "add"
1485
1497
  },
@@ -1499,10 +1511,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1499
1511
  isPrimary: !1
1500
1512
  }
1501
1513
  ]);
1502
- return ($, _) => {
1514
+ return (M, _) => {
1503
1515
  const W = V("FmTable");
1504
- return M(), N(pe, null, [
1505
- m(ht, {
1516
+ return $(), N(pe, null, [
1517
+ m(ut, {
1506
1518
  title: t(h)("inventory.transfer.template.title2"),
1507
1519
  actions: O.value,
1508
1520
  "onClick:action": i
@@ -1519,61 +1531,61 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1519
1531
  }
1520
1532
  ])
1521
1533
  }, [
1522
- m(xt, {
1534
+ m(ft, {
1523
1535
  searchable: "",
1524
1536
  search: d.value,
1525
1537
  "onUpdate:search": _[0] || (_[0] = (E) => d.value = E)
1526
1538
  }, null, 8, ["search"]),
1527
- (M(), le(W, {
1539
+ ($(), le(W, {
1528
1540
  style: _e(t(b).tableHeight),
1529
- "column-defs": t(F).columnDefs,
1541
+ "column-defs": t(C).columnDefs,
1530
1542
  "row-data": P.value,
1531
1543
  "search-value": d.value,
1532
- loading: R.value,
1544
+ loading: A.value,
1533
1545
  key: (te = t(k)._currentLocation) == null ? void 0 : te.dbName,
1534
1546
  onRowClick: _[1] || (_[1] = (E) => t(a)(E.original)),
1535
1547
  "page-size": w.value
1536
1548
  }, {
1537
1549
  "list-row": U((E) => [
1538
- m(Ze, {
1550
+ m(Xe, {
1539
1551
  row: E,
1540
1552
  onRowClick: (B) => t(a)(B)
1541
1553
  }, {
1542
1554
  default: U((B) => {
1543
- var J, l, n, C, q, z, G, D, A, K, Z, S, H, ie, Fe, Se, Ie, $e, Me, Oe, ce, De, Ve, Ae, Re, fe, Ue;
1555
+ var Z, l, n, F, q, z, G, D, R, K, J, S, H, ie, Ce, Se, Ie, Me, $e, Oe, ce, De, Ve, Re, Ae, fe, Ue;
1544
1556
  return [
1545
1557
  e("div", cs, [
1546
1558
  e("div", fs, [
1547
1559
  e("div", ys, [
1548
1560
  m(t(ee), {
1549
- render: (n = (l = (J = B._id) == null ? void 0 : J.column) == null ? void 0 : l.columnDef) == null ? void 0 : n.cell,
1550
- props: (q = (C = B._id) == null ? void 0 : C.getContext) == null ? void 0 : q.call(C)
1561
+ render: (n = (l = (Z = B._id) == null ? void 0 : Z.column) == null ? void 0 : l.columnDef) == null ? void 0 : n.cell,
1562
+ props: (q = (F = B._id) == null ? void 0 : F.getContext) == null ? void 0 : q.call(F)
1551
1563
  }, null, 8, ["render", "props"])
1552
1564
  ]),
1553
1565
  e("div", vs, [
1554
1566
  m(t(ee), {
1555
1567
  render: (D = (G = (z = B.name) == null ? void 0 : z.column) == null ? void 0 : G.columnDef) == null ? void 0 : D.cell,
1556
- props: (K = (A = B.name) == null ? void 0 : A.getContext) == null ? void 0 : K.call(A)
1568
+ props: (K = (R = B.name) == null ? void 0 : R.getContext) == null ? void 0 : K.call(R)
1557
1569
  }, null, 8, ["render", "props"])
1558
1570
  ]),
1559
1571
  e("div", bs, [
1560
1572
  m(t(ee), {
1561
- render: (H = (S = (Z = B.supplier) == null ? void 0 : Z.column) == null ? void 0 : S.columnDef) == null ? void 0 : H.cell,
1562
- props: (Fe = (ie = B.supplier) == null ? void 0 : ie.getContext) == null ? void 0 : Fe.call(ie)
1573
+ render: (H = (S = (J = B.supplier) == null ? void 0 : J.column) == null ? void 0 : S.columnDef) == null ? void 0 : H.cell,
1574
+ props: (Ce = (ie = B.supplier) == null ? void 0 : ie.getContext) == null ? void 0 : Ce.call(ie)
1563
1575
  }, null, 8, ["render", "props"])
1564
1576
  ]),
1565
1577
  e("div", null, I((Se = E.original.locations) != null && Se.length ? `Enabled for ${(Ie = E.original.locations) == null ? void 0 : Ie.length} outlets` : "Enabled for all outlets"), 1),
1566
1578
  e("div", gs, I(E.original.purchaseOrder.items.length ? E.original.purchaseOrder.items.map((tt) => tt.name).join(", ") : "No items"), 1),
1567
1579
  e("div", hs, [
1568
1580
  m(t(ee), {
1569
- render: (Oe = (Me = ($e = B.ref) == null ? void 0 : $e.column) == null ? void 0 : Me.columnDef) == null ? void 0 : Oe.cell,
1581
+ render: (Oe = ($e = (Me = B.ref) == null ? void 0 : Me.column) == null ? void 0 : $e.columnDef) == null ? void 0 : Oe.cell,
1570
1582
  props: (De = (ce = B.ref) == null ? void 0 : ce.getContext) == null ? void 0 : De.call(ce)
1571
1583
  }, null, 8, ["render", "props"])
1572
1584
  ])
1573
1585
  ]),
1574
1586
  e("div", null, [
1575
1587
  m(t(ee), {
1576
- render: (Re = (Ae = (Ve = B.type) == null ? void 0 : Ve.column) == null ? void 0 : Ae.columnDef) == null ? void 0 : Re.cell,
1588
+ render: (Ae = (Re = (Ve = B.type) == null ? void 0 : Ve.column) == null ? void 0 : Re.columnDef) == null ? void 0 : Ae.cell,
1577
1589
  props: (Ue = (fe = B.type) == null ? void 0 : fe.getContext) == null ? void 0 : Ue.call(fe)
1578
1590
  }, null, 8, ["render", "props"])
1579
1591
  ])
@@ -1590,10 +1602,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1590
1602
  }),
1591
1603
  _: 1
1592
1604
  }, 8, ["title", "actions"]),
1593
- (M(), le(nt, { to: "body" }, [
1605
+ ($(), le(nt, { to: "body" }, [
1594
1606
  m(ps, at(rt(t(x))), null, 16),
1595
- m(Mo, Qe(t(u), {
1596
- onSubmitted: _[2] || (_[2] = (te) => t(F).fetchTemplates())
1607
+ m($o, Qe(t(u), {
1608
+ onSubmitted: _[2] || (_[2] = (te) => t(C).fetchTemplates())
1597
1609
  }), null, 16)
1598
1610
  ]))
1599
1611
  ], 64);
@@ -1601,5 +1613,5 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1601
1613
  }
1602
1614
  });
1603
1615
  export {
1604
- Os as default
1616
+ zs as default
1605
1617
  };