@feedmepos/mf-inventory-portal 1.2.22-dev.1 → 1.2.22-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/{App-CVo40hoN.js → App-DtwLZ9Ng.js} +1 -1
  2. package/dist/{ApprovalView-B99YGXOt.js → ApprovalView-DTiPzA1y.js} +9 -9
  3. package/dist/{BindingsDialog-DGFYmVX9.js → BindingsDialog--1wB_TX2.js} +2 -2
  4. package/dist/{BindingsPicker-CVWxRkDE.js → BindingsPicker-JjZfjlvz.js} +9 -9
  5. package/dist/{BindingsTable-Cxs_cQrM.js → BindingsTable-M2CGWdTD.js} +1 -1
  6. package/dist/{ClosingDraftView-gBO5Icdy.js → ClosingDraftView-B800NjEZ.js} +101 -101
  7. package/dist/ClosingTemplateView-B1TVIzzy.js +2001 -0
  8. package/dist/{DeliveryOrderPrintPreview-D-H7S-4t.js → DeliveryOrderPrintPreview-CUXfCixj.js} +8 -8
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BsPMd4IE.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bdw3Q4Dz.js} +33 -33
  10. package/dist/{FmMultiselectDialog-DXVvibUU.js → FmMultiselectDialog-CyYcvvyg.js} +1 -1
  11. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-Dq8lMkNV.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D-FDSjxY.js} +49 -49
  12. package/dist/{ImportView-DUPfQshy.js → ImportView-BR7JpsG8.js} +27 -27
  13. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DxLVS1Ar.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bae5DUA9.js} +8 -8
  14. package/dist/{IngredientGroupView-CqPl6RZI.js → IngredientGroupView-c6XH5Fzg.js} +17 -17
  15. package/dist/{IngredientsView--7ro7P7J.js → IngredientsView-D4JiQ6Bp.js} +72 -73
  16. package/dist/{IntegrationView-BZnq8gYp.js → IntegrationView-BdOTe6FG.js} +3 -3
  17. package/dist/{InventoryBindingForm-DASUGZuO.js → InventoryBindingForm-kqrZutMr.js} +1 -1
  18. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-l_EgNW0u.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DZ-Mr8-U.js} +12 -12
  19. package/dist/{InventoryBindingSummary-BoUAsK9S.js → InventoryBindingSummary-D4p9cOiy.js} +1 -1
  20. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DimqJCjO.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Bj_2aQiY.js} +1 -1
  21. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C_wNgXUC.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CX9H2gLU.js} +7 -7
  22. package/dist/{PublishView-B-Zal--Y.js → PublishView-DcQQtuF8.js} +10 -10
  23. package/dist/{PurchaseOrderPrintPreview-CoXu4VO-.js → PurchaseOrderPrintPreview-Ueo4Yftu.js} +13 -13
  24. package/dist/{ReceiveRequestView-B7rprDy7.js → ReceiveRequestView-Cikz66hY.js} +115 -115
  25. package/dist/{RecipeView-BbMlUt0v.js → RecipeView-DL1kKy2w.js} +50 -50
  26. package/dist/{StockView-Bko2-Rzd.js → StockView-DzaCcxc5.js} +7 -7
  27. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DONtcweN.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DP5AFZM2.js} +1 -1
  28. package/dist/{SupplierView-D4hAT4CW.js → SupplierView-CJuI_jPc.js} +93 -93
  29. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BoZEbHkN.js +3233 -0
  30. package/dist/{TransferTemplateView-BLWYhdZG.js → TransferTemplateView-DiGdnr0-.js} +140 -140
  31. package/dist/{UnitView-Boi_sRGP.js → UnitView-CA2isH5r.js} +44 -44
  32. package/dist/{WarehouseView-B1aAyncU.js → WarehouseView-BMUJN1D1.js} +66 -66
  33. package/dist/api/adjustment-template.d.ts +1 -0
  34. package/dist/api/closing-template.d.ts +1 -0
  35. package/dist/{app-C4dN86_k.js → app-DdrL4md8.js} +8229 -7971
  36. package/dist/app.js +4 -4
  37. package/dist/{decimal-Cf4voIJl.js → decimal-DJjE7Vf3.js} +1 -1
  38. package/dist/{format-unit-display-CjsVuoHS.js → format-unit-display-CK-PNM0G.js} +33 -33
  39. package/dist/{import-export.helper-DmouV6nF.js → import-export.helper-CJeCekEB.js} +6 -6
  40. package/dist/{index-DK93lkR_.js → index-Crgf6sCC.js} +1 -1
  41. package/dist/{index-D2C87f4k.js → index-D4F6boO1.js} +1 -1
  42. package/dist/{purchase-order-template-CQcIyT35.js → purchase-order-template-BOLP3UzN.js} +1 -1
  43. package/dist/{stock-CRKwCBhd.js → stock-DqL6z9wL.js} +1 -1
  44. package/dist/{supplier-BGeDlnSm.js → supplier-CW3GGX9U.js} +1 -1
  45. package/dist/tsconfig.app.tsbuildinfo +1 -1
  46. package/dist/{use-ingredient-select-dialog-Dg3hbUaX.js → use-ingredient-select-dialog-CrCo-DHA.js} +1 -1
  47. package/dist/{use-inventory-binding-dialog-DRCiAYUs.js → use-inventory-binding-dialog-RdX9Q4q9.js} +1 -1
  48. package/dist/views/adjustment-template/wastage-template/actions.d.ts +60 -0
  49. package/dist/views/adjustment-template/wastage-template/table.d.ts +60 -0
  50. package/dist/views/receive-request/components/delivery-order-form/SystemTrailDialog.vue.d.ts +8 -4
  51. package/package.json +4 -4
  52. package/dist/ClosingTemplateView-C61_1m3k.js +0 -1970
  53. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Cr30q-Ft.js +0 -3394
  54. package/dist/closing-template-CNtgIoiQ.js +0 -53
@@ -1,15 +1,15 @@
1
- import { defineComponent as ae, onMounted as Te, computed as E, 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 P, renderSlot as xe, withDirectives as Ue, normalizeClass as re, vModelText as qe, 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 Be, useModel as lt, isRef as Ye, Teleport as nt, normalizeProps as at, guardReactiveProps as rt } from "vue";
2
- import { P as We, aP as he, t as Ne, O as it, aQ as ut, aR as dt, l as se, aS as mt, b as Ge, a as Ke, Z as Ee, c as ge, q as ke, y as be, $ as ye, A as we, M as pt, K as ee, u as Ze, at as ct, a5 as ft, J as Je, e as ue, z as ve, am as yt, X as vt, ae as bt, E as gt, j as Le, G as ht, I as xt } from "./app-C4dN86_k.js";
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, aS as he, t as Ne, P as it, aT as ut, aU as dt, n as se, aV 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-DdrL4md8.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-CjsVuoHS.js";
4
+ import { P as X, f as _t, t as kt, a as ze, u as wt } from "./format-unit-display-CK-PNM0G.js";
5
5
  import { components as de, useSnackbar as Tt, useProxiedModel as Xe, useBreakpoints as Ct } from "@feedmepos/ui-library";
6
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-Dq8lMkNV.js";
8
- import { c as Ot, u as Dt, _ as Vt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BsPMd4IE.js";
9
- import { u as At } from "./supplier-BGeDlnSm.js";
10
- import { u as Rt } from "./use-ingredient-select-dialog-Dg3hbUaX.js";
11
- import { u as Pt } from "./purchase-order-template-CQcIyT35.js";
12
- const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Bt = { class: "flex-1" }, Nt = { class: "flex items-center" }, Et = { class: "flex-1" }, Lt = { class: "flex-1" }, zt = /* @__PURE__ */ ae({
7
+ import { _ as St, b as It, F as $t, a as Mt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-D-FDSjxY.js";
8
+ import { c as Ot, u as Dt, _ as Vt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bdw3Q4Dz.js";
9
+ import { u as At } from "./supplier-CW3GGX9U.js";
10
+ import { u as Rt } from "./use-ingredient-select-dialog-CrCo-DHA.js";
11
+ import { u as Ut } from "./purchase-order-template-BOLP3UzN.js";
12
+ 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
13
  __name: "FmMinMaxInput",
14
14
  props: {
15
15
  rules: {},
@@ -55,7 +55,7 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Bt = { c
55
55
  v.min = i, v.max = g;
56
56
  }
57
57
  });
58
- const r = E(() => {
58
+ const r = L(() => {
59
59
  const { min: d, max: y } = v ?? {};
60
60
  return Math.max((d == null ? void 0 : d.precision) ?? 0, (y == null ? void 0 : y.precision) ?? 0, h.precision ?? 0);
61
61
  }), s = (d) => {
@@ -80,7 +80,7 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Bt = { c
80
80
  w.max = null;
81
81
  v.min = w.min, v.max = w.max;
82
82
  });
83
- const F = Symbol.for("fm:form-state"), c = ot(F, null), o = E(() => h.disabled ?? (c == null ? void 0 : c.getDisabled()) ?? !1), f = Y(), b = Y(), k = Y(!1), T = Y(!1), R = E(() => k.value || T.value), U = E(() => [...[
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(() => [...[
84
84
  function() {
85
85
  return typeof a(u.value) == "string" || typeof a(x.value) == "string" ? "Must be a number" : !0;
86
86
  },
@@ -90,9 +90,9 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Bt = { c
90
90
  ], ...h.rules ?? []]);
91
91
  return (d, y) => {
92
92
  const w = V("FmLabel"), i = V("FmField"), g = V("FmFormGroup");
93
- return M(), N("div", Ut, [
94
- e("div", qt, [
95
- e("div", Bt, [
93
+ return M(), N("div", Pt, [
94
+ e("div", Bt, [
95
+ e("div", qt, [
96
96
  m(w, {
97
97
  label: d.label,
98
98
  disabled: d.disabled,
@@ -101,12 +101,12 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Bt = { c
101
101
  }, null, 8, ["label", "disabled", "required", "optional"])
102
102
  ]),
103
103
  m(i, { focused: R.value }, {
104
- default: P(() => [
104
+ default: U(() => [
105
105
  e("div", Nt, [
106
106
  xe(d.$slots, "prepend"),
107
107
  y[6] || (y[6] = e("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Min.", -1)),
108
- e("div", Et, [
109
- Ue(e("input", {
108
+ e("div", Lt, [
109
+ Pe(e("input", {
110
110
  type: "text",
111
111
  ref_key: "minInputRef",
112
112
  ref: f,
@@ -119,13 +119,13 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Bt = { c
119
119
  "text-fm-color-typo-disabled": o.value
120
120
  })
121
121
  }, null, 34), [
122
- [qe, u.value]
122
+ [Be, u.value]
123
123
  ])
124
124
  ]),
125
125
  y[7] || (y[7] = e("div", { class: "block h-32 mx-4 w-[1px] bg-fm-color-neutral-gray-200" }, null, -1)),
126
126
  y[8] || (y[8] = e("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Max.", -1)),
127
- e("div", Lt, [
128
- Ue(e("input", {
127
+ e("div", Et, [
128
+ Pe(e("input", {
129
129
  type: "text",
130
130
  ref_key: "maxInputRef",
131
131
  ref: b,
@@ -138,7 +138,7 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Bt = { c
138
138
  "text-fm-color-typo-disabled": o.value
139
139
  })
140
140
  }, null, 34), [
141
- [qe, x.value]
141
+ [Be, x.value]
142
142
  ])
143
143
  ]),
144
144
  xe(d.$slots, "append")
@@ -151,7 +151,7 @@ const Ut = { class: "flex flex-col" }, qt = { class: "flex flex-col" }, Bt = { c
151
151
  class: "flex-1",
152
152
  "model-value": d.modelValue,
153
153
  info: d.labelInfo,
154
- rules: U.value,
154
+ rules: P.value,
155
155
  "helper-text": d.helperText,
156
156
  "helper-state": d.helperState
157
157
  }, null, 8, ["model-value", "info", "rules", "helper-text", "helper-state"])
@@ -214,7 +214,7 @@ function Yt(p, h = {}) {
214
214
  {
215
215
  supplier: p.supplier
216
216
  }
217
- ), f = c.totalCost ?? Ee.reset();
217
+ ), f = c.totalCost ?? Le.reset();
218
218
  o ? s[c.sku._id] = o.amount !== f.amount || o.precision !== f.precision : s[c.sku._id] = !0;
219
219
  }
220
220
  });
@@ -288,9 +288,9 @@ function Yt(p, h = {}) {
288
288
  minSize: 200,
289
289
  cell(c) {
290
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((U) => {
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) => {
292
292
  var d;
293
- return ((d = o.measurement) == null ? void 0 : d.id) === U.id;
293
+ return ((d = o.measurement) == null ? void 0 : d.id) === P.id;
294
294
  }), T = o.sku.unit._id !== f.unit._id || !b || o.measurement && !k;
295
295
  return j(St, {
296
296
  style: {
@@ -304,11 +304,11 @@ function Yt(p, h = {}) {
304
304
  disabled: p.disabled,
305
305
  key: o.sku._id,
306
306
  unit: b,
307
- "onUpdate:modelValue": (U) => {
307
+ "onUpdate:modelValue": (P) => {
308
308
  u.validateUnitInput(
309
309
  o,
310
310
  f,
311
- U,
311
+ P,
312
312
  (d) => {
313
313
  p.updateItem({
314
314
  ...o,
@@ -389,7 +389,7 @@ function Yt(p, h = {}) {
389
389
  cell(c) {
390
390
  const o = c.row.original;
391
391
  return j(de.FmTextField, {
392
- modelValue: se(o.quantityStep ?? Ee.reset(), !1),
392
+ modelValue: se(o.quantityStep ?? Le.reset(), !1),
393
393
  key: o.sku._id,
394
394
  "onUpdate:modelValue": (f) => {
395
395
  p.updateItem({
@@ -481,7 +481,7 @@ function Yt(p, h = {}) {
481
481
  }
482
482
  ];
483
483
  return {
484
- columnDefs: E(() => {
484
+ columnDefs: L(() => {
485
485
  const c = ge(), o = [...x];
486
486
  if (Object.keys(h).length > 0)
487
487
  for (const [f, b] of Object.entries(h))
@@ -493,7 +493,7 @@ function Yt(p, h = {}) {
493
493
  })
494
494
  };
495
495
  }
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" }, 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 = {
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 = {
497
497
  key: 0,
498
498
  class: "flex gap-8 w-full"
499
499
  }, 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,13 +508,13 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
508
508
  return a;
509
509
  }
510
510
  return (a, r) => {
511
- var u, x, F, c, o, f, b, k, T, R, U, d, y, w, i, g, O, $, _, W, te, L, q, Z, l, n, C, B, z, G;
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;
512
512
  const s = V("FmLabel");
513
513
  return M(), N("div", Wt, [
514
514
  e("div", Gt, [
515
515
  e("div", Kt, [
516
- e("span", Zt, " (" + I(a.row.original.sku.code) + ") ", 1),
517
- e("span", Jt, I(a.row.original.sku.name), 1)
516
+ e("span", Jt, " (" + I(a.row.original.sku.code) + ") ", 1),
517
+ e("span", Zt, I(a.row.original.sku.name), 1)
518
518
  ]),
519
519
  e("div", null, [
520
520
  m(t(ee), {
@@ -539,7 +539,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
539
539
  label: t(h)(`inventory.transfer.form.items.table.${t(Q).Name}`)
540
540
  }, null, 8, ["label"]),
541
541
  m(t(ee), {
542
- render: (y = (d = (U = a.cellByColId[t(Q).Name]) == null ? void 0 : U.column) == null ? void 0 : d.columnDef) == null ? void 0 : y.cell,
542
+ render: (y = (d = (P = a.cellByColId[t(Q).Name]) == null ? void 0 : P.column) == null ? void 0 : d.columnDef) == null ? void 0 : y.cell,
543
543
  props: (i = (w = a.cellByColId[t(Q).Name]) == null ? void 0 : w.getContext) == null ? void 0 : i.call(w)
544
544
  }, null, 8, ["render", "props"]),
545
545
  r[1] || (r[1] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
@@ -561,8 +561,8 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
561
561
  label: t(h)(`inventory.transfer.form.items.table.${t(Q).Step}`)
562
562
  }, null, 8, ["label"]),
563
563
  m(t(ee), {
564
- render: (q = (L = (te = a.cellByColId[t(Q).Step]) == null ? void 0 : te.column) == null ? void 0 : L.columnDef) == null ? void 0 : q.cell,
565
- props: (l = (Z = a.cellByColId[t(Q).Step]) == null ? void 0 : Z.getContext) == null ? void 0 : l.call(Z)
564
+ 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)
566
566
  }, null, 8, ["render", "props"]),
567
567
  r[3] || (r[3] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
568
568
  ])
@@ -573,7 +573,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
573
573
  label: t(h)(`inventory.transfer.form.items.table.${t(Q).Limit}`)
574
574
  }, null, 8, ["label"]),
575
575
  m(t(ee), {
576
- render: (B = (C = (n = a.cellByColId[t(Q).Limit]) == null ? void 0 : n.column) == null ? void 0 : C.columnDef) == null ? void 0 : B.cell,
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,
577
577
  props: (G = (z = a.cellByColId[t(Q).Limit]) == null ? void 0 : z.getContext) == null ? void 0 : G.call(z)
578
578
  }, null, 8, ["render", "props"]),
579
579
  r[4] || (r[4] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
@@ -638,7 +638,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
638
638
  },
639
639
  emits: ["update:disabled"],
640
640
  setup(p, { expose: h, emit: v }) {
641
- const a = p, r = v, s = We(), { t: u } = me(), x = Y({}), F = Ze(), c = Ke(), o = At(), f = ge(), b = Ge(), k = et();
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
642
  Ce(
643
643
  () => s.purchaseOrder.items.length,
644
644
  () => {
@@ -655,17 +655,17 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
655
655
  supplier: l.supplier ?? (s == null ? void 0 : s.purchaseOrder.supplier)
656
656
  };
657
657
  }
658
- ), R = E({
658
+ ), R = L({
659
659
  get() {
660
660
  var l, n;
661
661
  return typeof ((n = (l = s.purchaseOrder) == null ? void 0 : l.supplier) == null ? void 0 : n.internal) == "string" ? X.TRANSFER : X.PURCHASE;
662
662
  },
663
663
  set(l) {
664
- var C, B;
665
- const n = typeof ((B = (C = s.purchaseOrder) == null ? void 0 : C.supplier) == null ? void 0 : B.internal) == "string" ? X.TRANSFER : X.PURCHASE;
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;
666
666
  l !== n && (s.purchaseOrder.supplier = l === X.PURCHASE ? T.locationOptionsTypePurchase.value[0] : T.locationOptionsTypeTransfer.value[0]);
667
667
  }
668
- }), U = E(() => T.transferLocationOptions.value), d = E({
668
+ }), P = L(() => T.transferLocationOptions.value), d = L({
669
669
  get() {
670
670
  var l;
671
671
  return (l = s.purchaseOrder.supplier) == null ? void 0 : l._id;
@@ -698,11 +698,11 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
698
698
  function O() {
699
699
  var l, n;
700
700
  return (l = s.locations) != null && l.find((C) => {
701
- var B, z;
702
- return ((B = C.doc) == null ? void 0 : B._id) === ((z = s.purchaseOrder.supplier) == null ? void 0 : z._id);
701
+ var q, z;
702
+ return ((q = C.doc) == null ? void 0 : q._id) === ((z = s.purchaseOrder.supplier) == null ? void 0 : z._id);
703
703
  }) ? `Location ${(n = s.purchaseOrder.supplier) == null ? void 0 : n.name} must be removed because template cannot be used to transfer to itself.` : !0;
704
704
  }
705
- const $ = E({
705
+ const $ = L({
706
706
  get() {
707
707
  return s.purchaseOrder.remark ?? void 0;
708
708
  },
@@ -724,7 +724,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
724
724
  (n = (l = _.value) == null ? void 0 : l.resetInputs) == null || n.call(l);
725
725
  }
726
726
  });
727
- const W = E(() => ({
727
+ const W = L(() => ({
728
728
  duplicateItem: (l) => {
729
729
  s.purchaseOrder.items = [
730
730
  ...s.purchaseOrder.items,
@@ -761,7 +761,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
761
761
  }
762
762
  },
763
763
  b.transferTemplateColumnDefs({
764
- onUpdate: (l, n, C, B) => {
764
+ onUpdate: (l, n, C, q) => {
765
765
  if (l < 0 || l >= s.purchaseOrder.items.length) return;
766
766
  const z = s.purchaseOrder.items[l];
767
767
  z && W.value.updateItem({
@@ -769,12 +769,12 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
769
769
  sku: n,
770
770
  // Sku might be outdated, so we need to update it
771
771
  code: C,
772
- measurement: B
772
+ measurement: q
773
773
  });
774
774
  }
775
775
  })
776
- ), L = E(() => te.columnDefs.value), { promptSelectIngredients: q } = Rt();
777
- async function Z() {
776
+ ), E = L(() => te.columnDefs.value), { promptSelectIngredients: B } = Rt();
777
+ async function J() {
778
778
  const n = c.skus.map((D) => ({
779
779
  label: D.name,
780
780
  sublabel: D.code,
@@ -782,31 +782,31 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
782
782
  })).filter((D) => {
783
783
  var A;
784
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 ?? [], B = await q(
785
+ }).map((D) => D.value), C = s.purchaseOrder.items ?? [], q = await B(
786
786
  n.map((D) => D._id),
787
787
  (D) => {
788
788
  const A = c.skuById[D], K = C.find((H) => H.sku._id === A._id);
789
789
  if (K)
790
790
  return K;
791
- const J = { amount: 1, precision: be(A.unit) };
791
+ const Z = { amount: 1, precision: be(A.unit) };
792
792
  let S = {
793
793
  id: f.usePurchaseOrderV2 ? crypto.randomUUID() : void 0,
794
794
  sku: A,
795
795
  code: A.code,
796
796
  name: A.name,
797
- quantity: J,
798
- minimumQuantity: J,
797
+ quantity: Z,
798
+ minimumQuantity: Z,
799
799
  // maximumQuantity: adjustmentAmountMultiplyDecimal(minimumQuantity, {
800
800
  // amount: 100,
801
801
  // precision: 0
802
802
  // }),
803
- quantityStep: J
803
+ quantityStep: Z
804
804
  };
805
805
  return k.validateUnitInput(
806
806
  S,
807
807
  A,
808
808
  {
809
- amount: J,
809
+ amount: Z,
810
810
  measurement: null
811
811
  },
812
812
  (H) => {
@@ -815,29 +815,29 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
815
815
  ), S;
816
816
  }
817
817
  );
818
- if (!B) return;
819
- const z = B.map((D) => D.sku._id), G = [];
818
+ if (!q) return;
819
+ const z = q.map((D) => D.sku._id), G = [];
820
820
  for (const D of z) {
821
821
  const A = C.filter((K) => K.sku._id === D);
822
822
  if (A.length > 0)
823
823
  G.push(...A);
824
824
  else {
825
- const K = B.find((J) => J.sku._id === D);
825
+ const K = q.find((Z) => Z.sku._id === D);
826
826
  K && G.push(K);
827
827
  }
828
828
  }
829
829
  G.sort((D, A) => D.sku.code.localeCompare(A.sku.code)), s.purchaseOrder.items = G;
830
830
  }
831
831
  return (l, n) => {
832
- const C = V("FmTextField"), B = V("FmSelect"), z = V("FmTextarea"), G = V("FmButton"), D = V("FmTable"), A = V("FmFormGroup"), K = V("FmForm");
832
+ const C = V("FmTextField"), q = V("FmSelect"), z = V("FmTextarea"), G = V("FmButton"), D = V("FmTable"), A = V("FmFormGroup"), K = V("FmForm");
833
833
  return M(), le(K, {
834
834
  ref_key: "formRef",
835
835
  ref: _,
836
836
  class: "flex flex-col gap-32",
837
837
  disabled: l.disabled
838
838
  }, {
839
- default: P(() => {
840
- var J;
839
+ default: U(() => {
840
+ var Z;
841
841
  return [
842
842
  e("div", co, [
843
843
  e("div", fo, [
@@ -848,7 +848,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
848
848
  "onUpdate:modelValue": n[0] || (n[0] = (S) => t(s).name = S),
849
849
  rules: [t(ke)()]
850
850
  }, null, 8, ["label", "modelValue", "rules"]),
851
- m(B, {
851
+ m(q, {
852
852
  label: t(u)("inventory.transfer.form.type.title"),
853
853
  "model-value": R.value,
854
854
  "onUpdate:modelValue": n[1] || (n[1] = (S) => R.value = S),
@@ -866,9 +866,9 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
866
866
  sublabel: t(T).locationOptionsTypeTransfer.value.length ? void 0 : t(u)("inventory.transfer.form.noLocationAvailable")
867
867
  }
868
868
  ],
869
- rules: [t(we)(1)(U.value)]
869
+ rules: [t(we)(1)(P.value)]
870
870
  }, {
871
- default: P(() => [
871
+ default: U(() => [
872
872
  e("span", {
873
873
  class: re([
874
874
  "line-clamp-1 fm-typo-en-body-lg-400",
@@ -878,22 +878,22 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
878
878
  ]),
879
879
  _: 1
880
880
  }, 8, ["label", "model-value", "items", "rules"]),
881
- m(B, {
881
+ m(q, {
882
882
  label: R.value === t(X).PURCHASE ? t(u)("inventory.transfer.form.purchaseFrom") : t(u)("inventory.transfer.form.transferFrom"),
883
883
  modelValue: d.value,
884
884
  "onUpdate:modelValue": n[2] || (n[2] = (S) => d.value = S),
885
- items: U.value
885
+ items: P.value
886
886
  }, {
887
- "menu-wrapper": P((S) => {
887
+ "menu-wrapper": U((S) => {
888
888
  var H;
889
889
  return [
890
890
  m(Vt, Qe(S, {
891
- items: U.value,
891
+ items: P.value,
892
892
  "model-value": (H = l.modelValue.purchaseOrder.supplier) == null ? void 0 : H._id
893
893
  }), null, 16, ["items", "model-value"])
894
894
  ];
895
895
  }),
896
- default: P(() => {
896
+ default: U(() => {
897
897
  var S;
898
898
  return [
899
899
  e("span", {
@@ -901,7 +901,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
901
901
  "line-clamp-1 fm-typo-en-body-lg-400",
902
902
  l.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
903
903
  ])
904
- }, I((S = U.value.find((H) => H.value === d.value)) == null ? void 0 : S.label), 3)
904
+ }, I((S = P.value.find((H) => H.value === d.value)) == null ? void 0 : S.label), 3)
905
905
  ];
906
906
  }),
907
907
  _: 1
@@ -944,7 +944,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
944
944
  e("div", bo, [
945
945
  m(A, {
946
946
  "model-value": [
947
- (J = a.modelValue.purchaseOrder.supplier) == null ? void 0 : J._id,
947
+ (Z = a.modelValue.purchaseOrder.supplier) == null ? void 0 : Z._id,
948
948
  ...a.modelValue.locations ?? []
949
949
  ].join(","),
950
950
  rules: [O]
@@ -968,7 +968,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
968
968
  "prepend-icon": "add",
969
969
  variant: "plain",
970
970
  class: "border-2 rounded-lg border-fm-color-primary",
971
- onClick: n[5] || (n[5] = (S) => Z()),
971
+ onClick: n[5] || (n[5] = (S) => J()),
972
972
  size: "md"
973
973
  }, null, 8, ["disabled", "label"])
974
974
  ]),
@@ -992,13 +992,13 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
992
992
  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
993
  ]),
994
994
  (M(), le(D, {
995
- "column-defs": L.value,
995
+ "column-defs": E.value,
996
996
  "row-data": t(s).purchaseOrder.items,
997
997
  key: t(s).purchaseOrder.items.map((S) => S.sku._id).join("."),
998
998
  "hide-footer": "",
999
999
  "page-size": t(s).purchaseOrder.items.length
1000
1000
  }, {
1001
- "table-row": P((S) => [
1001
+ "table-row": U((S) => [
1002
1002
  m(po, {
1003
1003
  row: S,
1004
1004
  errorMessage: x.value[S.index],
@@ -1006,12 +1006,12 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1006
1006
  disabled: l.disabled
1007
1007
  }, null, 8, ["row", "errorMessage", "disabled"])
1008
1008
  ]),
1009
- "list-row": P((S) => [
1010
- (M(), le(Je, {
1009
+ "list-row": U((S) => [
1010
+ (M(), le(Ze, {
1011
1011
  row: S,
1012
1012
  key: t(s).purchaseOrder.items.map((H) => H.sku._id).join(".")
1013
1013
  }, {
1014
- default: P((H) => [
1014
+ default: U((H) => [
1015
1015
  m(ro, {
1016
1016
  row: S,
1017
1017
  "cell-by-col-id": H,
@@ -1062,10 +1062,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1062
1062
  "onUpdate:modelValue": x[2] || (x[2] = (o) => r.value = o),
1063
1063
  overlay: !0
1064
1064
  }, {
1065
- "dialog-header": P(() => [
1065
+ "dialog-header": U(() => [
1066
1066
  e("div", null, I(v.confirmTitle || "Confirm"), 1)
1067
1067
  ]),
1068
- "dialog-footer": P(() => [
1068
+ "dialog-footer": U(() => [
1069
1069
  e("div", Co, [
1070
1070
  m(F, {
1071
1071
  label: "Cancel",
@@ -1080,7 +1080,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1080
1080
  })
1081
1081
  ])
1082
1082
  ]),
1083
- default: P(() => [
1083
+ default: U(() => [
1084
1084
  xe(u.$slots, "dialog-content", {}, () => [
1085
1085
  ne(I(v.confirmMessage || "Are you sure you want to proceed?"), 1)
1086
1086
  ])
@@ -1092,7 +1092,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1092
1092
  }
1093
1093
  }), So = { class: "flex items-center" }, Io = { class: "fm-typo-en-title-md-800" }, $o = { class: "flex gap-4" }, Mo = /* @__PURE__ */ ae({
1094
1094
  __name: "TransferTemplateDialog",
1095
- props: /* @__PURE__ */ Be({
1095
+ props: /* @__PURE__ */ qe({
1096
1096
  mode: {},
1097
1097
  modelValue: {},
1098
1098
  show: { type: Boolean }
@@ -1100,10 +1100,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1100
1100
  disabled: { type: Boolean },
1101
1101
  disabledModifiers: {}
1102
1102
  }),
1103
- emits: /* @__PURE__ */ Be(["update:show", "submitted"], ["update:disabled"]),
1103
+ emits: /* @__PURE__ */ qe(["update:show", "submitted"], ["update:disabled"]),
1104
1104
  setup(p, { expose: h, emit: v }) {
1105
1105
  var w;
1106
- const a = p, r = v, s = Pt(), u = Tt(), { t: x } = me(), F = Xe(a, "show");
1106
+ const a = p, r = v, s = Ut(), u = Tt(), { t: x } = me(), F = Xe(a, "show");
1107
1107
  function c() {
1108
1108
  return {
1109
1109
  _id: "",
@@ -1142,7 +1142,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1142
1142
  i && (o.value = a.modelValue ?? c(), f.value = ((g = a.modelValue) == null ? void 0 : g._id) ?? `${Math.random()}`);
1143
1143
  }
1144
1144
  );
1145
- const b = lt(p, "disabled"), k = E(() => {
1145
+ const b = lt(p, "disabled"), k = L(() => {
1146
1146
  switch (a.mode) {
1147
1147
  case ue.READ:
1148
1148
  return "";
@@ -1191,7 +1191,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1191
1191
  }
1192
1192
  }
1193
1193
  }
1194
- async function U() {
1194
+ async function P() {
1195
1195
  var g, O;
1196
1196
  const i = o.value;
1197
1197
  if (i) {
@@ -1220,7 +1220,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1220
1220
  case ue.CREATE:
1221
1221
  return R();
1222
1222
  case ue.UPDATE:
1223
- return U();
1223
+ return P();
1224
1224
  }
1225
1225
  }
1226
1226
  function y() {
@@ -1236,12 +1236,12 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1236
1236
  "close-button": "",
1237
1237
  "max-width": 1600
1238
1238
  }, {
1239
- "side-sheet-header": P(() => [
1239
+ "side-sheet-header": U(() => [
1240
1240
  e("div", So, [
1241
1241
  e("div", Io, I(k.value), 1)
1242
1242
  ])
1243
1243
  ]),
1244
- default: P(() => [
1244
+ default: U(() => [
1245
1245
  (M(), le(To, {
1246
1246
  class: "w-full",
1247
1247
  ref_key: "formRef",
@@ -1254,7 +1254,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1254
1254
  key: f.value
1255
1255
  }, null, 8, ["model-value", "disabled"]))
1256
1256
  ]),
1257
- "side-sheet-footer": P(() => [
1257
+ "side-sheet-footer": U(() => [
1258
1258
  e("div", $o, [
1259
1259
  m(Fo, {
1260
1260
  loading: b.value,
@@ -1262,7 +1262,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1262
1262
  "confirm-title": `Save ${a.mode === t(ue).CREATE ? "Template" : "Changes"}`,
1263
1263
  onConfirm: y
1264
1264
  }, {
1265
- "dialog-content": P(() => g[4] || (g[4] = [
1265
+ "dialog-content": U(() => g[4] || (g[4] = [
1266
1266
  e("div", { class: "fm-typo-en-body-md-400 bg-fm-color-primary-oats p-8 rounded" }, [
1267
1267
  ne(" Warning: This action "),
1268
1268
  e("span", { class: "text-fm-color-system-error-300" }, "will not"),
@@ -1283,10 +1283,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1283
1283
  }, 8, ["modelValue"]);
1284
1284
  };
1285
1285
  }
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" }, Po = { class: "flex flex-col gap-4" }, Uo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, qo = { class: "flex gap-1" }, Bo = { class: "fm-typo-en-body-lg-600" }, No = {
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 = {
1287
1287
  key: 0,
1288
1288
  class: "flex flex-col gap-4"
1289
- }, Eo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Lo = { class: "flex gap-1" }, zo = { class: "fm-typo-en-body-lg-600" }, Ho = {
1289
+ }, 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 = {
1290
1290
  key: 1,
1291
1291
  class: "flex flex-col gap-4"
1292
1292
  }, jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qo = { class: "fm-typo-en-body-lg-600" }, Yo = {
@@ -1295,7 +1295,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1295
1295
  }, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Go = { class: "fm-typo-en-body-lg-600" }, Ko = {
1296
1296
  key: 3,
1297
1297
  class: "flex flex-col gap-4"
1298
- }, 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 = {
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 = {
1299
1299
  key: 0,
1300
1300
  class: "shrink-0 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
1301
1301
  }, is = {
@@ -1309,13 +1309,13 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1309
1309
  },
1310
1310
  emits: ["update:show", "action:edit"],
1311
1311
  setup(p, { emit: h }) {
1312
- const v = p, a = h, r = ge(), { t: s } = me(), u = E(() => {
1312
+ const v = p, a = h, r = ge(), { t: s } = me(), u = L(() => {
1313
1313
  var b;
1314
1314
  return (b = v.template) == null ? void 0 : b.purchaseOrder;
1315
1315
  }), x = [
1316
1316
  { accessorKey: "name", header: () => "Name" },
1317
1317
  { accessorKey: "type", header: () => "Type" }
1318
- ], F = Y(""), c = E(
1318
+ ], F = Y(""), c = L(
1319
1319
  () => {
1320
1320
  var b, k, T, R;
1321
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;
@@ -1323,7 +1323,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1323
1323
  ), o = Y(!0), f = Xe(v, "show");
1324
1324
  return (b, k) => {
1325
1325
  var g;
1326
- const T = V("FmMenuDivider"), R = V("FmCard"), U = V("FmIcon"), d = V("FmTextField"), y = V("FmTable"), w = V("FmButton"), i = V("FmSideSheet");
1326
+ const T = V("FmMenuDivider"), R = V("FmCard"), P = V("FmIcon"), d = V("FmTextField"), y = V("FmTable"), w = V("FmButton"), i = V("FmSideSheet");
1327
1327
  return M(), le(i, {
1328
1328
  header: t(s)("inventory.transfer.template.details.view", { template: (g = b.template) == null ? void 0 : g.name }),
1329
1329
  modelValue: t(f),
@@ -1332,7 +1332,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1332
1332
  "close-button": "",
1333
1333
  "max-width": 1200
1334
1334
  }, {
1335
- default: P(() => {
1335
+ default: U(() => {
1336
1336
  var O, $;
1337
1337
  return [
1338
1338
  e("div", Oo, [
@@ -1341,8 +1341,8 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1341
1341
  variant: "outlined",
1342
1342
  class: "flex flex-col gap-8 px-12 py-16"
1343
1343
  }, {
1344
- default: P(() => {
1345
- var _, W, te, L, q, Z, l, n, C;
1344
+ default: U(() => {
1345
+ var _, W, te, E, B, J, l, n, C;
1346
1346
  return [
1347
1347
  e("div", Do, [
1348
1348
  e("div", Vo, I(t(s)("inventory.transfer.template.details.templateSummary")), 1),
@@ -1352,15 +1352,15 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1352
1352
  ]),
1353
1353
  m(T),
1354
1354
  e("div", Ro, [
1355
- e("div", Po, [
1356
- e("div", Uo, [
1357
- e("div", qo, I(t(s)("inventory.transfer.receiveRequest.details.createdAt")), 1)
1355
+ e("div", Uo, [
1356
+ e("div", Po, [
1357
+ e("div", Bo, I(t(s)("inventory.transfer.receiveRequest.details.createdAt")), 1)
1358
1358
  ]),
1359
- e("div", Bo, I(t(yt)(((_ = b.template) == null ? void 0 : _._id) ?? "")), 1)
1359
+ e("div", qo, I(t(yt)(((_ = b.template) == null ? void 0 : _._id) ?? "")), 1)
1360
1360
  ]),
1361
1361
  (W = b.template) != null && W.updatedAt ? (M(), N("div", No, [
1362
- e("div", Eo, [
1363
- e("div", Lo, I(t(s)("inventory.transfer.receiveRequest.details.updatedAt")), 1)
1362
+ e("div", Lo, [
1363
+ e("div", Eo, I(t(s)("inventory.transfer.receiveRequest.details.updatedAt")), 1)
1364
1364
  ]),
1365
1365
  e("div", zo, [
1366
1366
  ne(I(t(vt)(new Date(b.template.updatedAt))) + " ", 1),
@@ -1369,17 +1369,17 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1369
1369
  ], 64)) : oe("", !0)
1370
1370
  ])
1371
1371
  ])) : oe("", !0),
1372
- (q = (L = u.value) == null ? void 0 : L.supplier) != null && q.name ? (M(), N("div", Ho, [
1372
+ (B = (E = u.value) == null ? void 0 : E.supplier) != null && B.name ? (M(), N("div", Ho, [
1373
1373
  e("div", jo, I(t(s)("inventory.transfer.receiveRequest.details.from")), 1),
1374
- e("div", Qo, I((l = (Z = u.value) == null ? void 0 : Z.supplier) == null ? void 0 : l.name), 1)
1374
+ e("div", Qo, I((l = (J = u.value) == null ? void 0 : J.supplier) == null ? void 0 : l.name), 1)
1375
1375
  ])) : oe("", !0),
1376
1376
  (n = u.value) != null && n.ref ? (M(), N("div", Yo, [
1377
1377
  e("div", Wo, I(t(s)("inventory.transfer.receiveRequest.details.reference")), 1),
1378
1378
  e("div", Go, I(u.value.ref), 1)
1379
1379
  ])) : oe("", !0),
1380
1380
  (C = u.value) != null && C.remark ? (M(), N("div", Ko, [
1381
- e("div", Zo, I(t(s)("inventory.transfer.receiveRequest.details.remark")), 1),
1382
- e("div", Jo, I(u.value.remark), 1)
1381
+ e("div", Jo, I(t(s)("inventory.transfer.receiveRequest.details.remark")), 1),
1382
+ e("div", Zo, I(u.value.remark), 1)
1383
1383
  ])) : oe("", !0)
1384
1384
  ])
1385
1385
  ];
@@ -1404,7 +1404,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1404
1404
  _.totalCost && t(r).enableTotalCost ? (M(), N("div", rs, " (" + I(t(bt)(_.totalCost)) + ") ", 1)) : oe("", !0)
1405
1405
  ]),
1406
1406
  t(kt)(_) ? (M(), N("div", is, [
1407
- m(U, {
1407
+ m(P, {
1408
1408
  name: "error",
1409
1409
  color: "system-error-300",
1410
1410
  size: "sm"
@@ -1440,7 +1440,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1440
1440
  ])
1441
1441
  ];
1442
1442
  }),
1443
- "side-sheet-footer": P(() => [
1443
+ "side-sheet-footer": U(() => [
1444
1444
  e("div", ms, [
1445
1445
  m(w, {
1446
1446
  label: t(s)("common.edit"),
@@ -1456,14 +1456,14 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1456
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({
1457
1457
  __name: "TransferTemplateView",
1458
1458
  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 = Ze(), { breakpoints: T } = Ct();
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
1460
  Te(F.fetchTemplates);
1461
- const R = E(
1461
+ const R = L(
1462
1462
  () => f.value || c.value || !k._currentLocation
1463
- ), U = E(() => o.value), d = Y(""), y = E(() => T.value.xs || T.value.sm), w = E(() => y.value ? 10 : 20);
1463
+ ), P = L(() => o.value), d = Y(""), y = L(() => T.value.xs || T.value.sm), w = L(() => y.value ? 10 : 20);
1464
1464
  function i($) {
1465
1465
  switch ($) {
1466
- case Le.Add:
1466
+ case Ee.Add:
1467
1467
  return v();
1468
1468
  case "refresh":
1469
1469
  return F.fetchTemplates();
@@ -1476,10 +1476,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1476
1476
  function g($) {
1477
1477
  return $;
1478
1478
  }
1479
- const O = E(() => [
1479
+ const O = L(() => [
1480
1480
  {
1481
1481
  label: h("inventory.closing.template.create.title"),
1482
- value: Le.Add,
1482
+ value: Ee.Add,
1483
1483
  isPrimary: !0,
1484
1484
  prependIcon: "add"
1485
1485
  },
@@ -1507,7 +1507,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1507
1507
  actions: O.value,
1508
1508
  "onClick:action": i
1509
1509
  }, {
1510
- default: P(() => {
1510
+ default: U(() => {
1511
1511
  var te;
1512
1512
  return [
1513
1513
  e("div", {
@@ -1522,59 +1522,59 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1522
1522
  m(xt, {
1523
1523
  searchable: "",
1524
1524
  search: d.value,
1525
- "onUpdate:search": _[0] || (_[0] = (L) => d.value = L)
1525
+ "onUpdate:search": _[0] || (_[0] = (E) => d.value = E)
1526
1526
  }, null, 8, ["search"]),
1527
1527
  (M(), le(W, {
1528
1528
  style: _e(t(b).tableHeight),
1529
1529
  "column-defs": t(F).columnDefs,
1530
- "row-data": U.value,
1530
+ "row-data": P.value,
1531
1531
  "search-value": d.value,
1532
1532
  loading: R.value,
1533
1533
  key: (te = t(k)._currentLocation) == null ? void 0 : te.dbName,
1534
- onRowClick: _[1] || (_[1] = (L) => t(a)(L.original)),
1534
+ onRowClick: _[1] || (_[1] = (E) => t(a)(E.original)),
1535
1535
  "page-size": w.value
1536
1536
  }, {
1537
- "list-row": P((L) => [
1538
- m(Je, {
1539
- row: L,
1540
- onRowClick: (q) => t(a)(q)
1537
+ "list-row": U((E) => [
1538
+ m(Ze, {
1539
+ row: E,
1540
+ onRowClick: (B) => t(a)(B)
1541
1541
  }, {
1542
- default: P((q) => {
1543
- var Z, l, n, C, B, z, G, D, A, K, J, S, H, ie, Fe, Se, Ie, $e, Me, Oe, ce, De, Ve, Ae, Re, fe, Pe;
1542
+ 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;
1544
1544
  return [
1545
1545
  e("div", cs, [
1546
1546
  e("div", fs, [
1547
1547
  e("div", ys, [
1548
1548
  m(t(ee), {
1549
- render: (n = (l = (Z = q._id) == null ? void 0 : Z.column) == null ? void 0 : l.columnDef) == null ? void 0 : n.cell,
1550
- props: (B = (C = q._id) == null ? void 0 : C.getContext) == null ? void 0 : B.call(C)
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)
1551
1551
  }, null, 8, ["render", "props"])
1552
1552
  ]),
1553
1553
  e("div", vs, [
1554
1554
  m(t(ee), {
1555
- render: (D = (G = (z = q.name) == null ? void 0 : z.column) == null ? void 0 : G.columnDef) == null ? void 0 : D.cell,
1556
- props: (K = (A = q.name) == null ? void 0 : A.getContext) == null ? void 0 : K.call(A)
1555
+ 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)
1557
1557
  }, null, 8, ["render", "props"])
1558
1558
  ]),
1559
1559
  e("div", bs, [
1560
1560
  m(t(ee), {
1561
- render: (H = (S = (J = q.supplier) == null ? void 0 : J.column) == null ? void 0 : S.columnDef) == null ? void 0 : H.cell,
1562
- props: (Fe = (ie = q.supplier) == null ? void 0 : ie.getContext) == null ? void 0 : Fe.call(ie)
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)
1563
1563
  }, null, 8, ["render", "props"])
1564
1564
  ]),
1565
- e("div", null, I((Se = L.original.locations) != null && Se.length ? `Enabled for ${(Ie = L.original.locations) == null ? void 0 : Ie.length} outlets` : "Enabled for all outlets"), 1),
1566
- e("div", gs, I(L.original.purchaseOrder.items.length ? L.original.purchaseOrder.items.map((tt) => tt.name).join(", ") : "No items"), 1),
1565
+ 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
+ e("div", gs, I(E.original.purchaseOrder.items.length ? E.original.purchaseOrder.items.map((tt) => tt.name).join(", ") : "No items"), 1),
1567
1567
  e("div", hs, [
1568
1568
  m(t(ee), {
1569
- render: (Oe = (Me = ($e = q.ref) == null ? void 0 : $e.column) == null ? void 0 : Me.columnDef) == null ? void 0 : Oe.cell,
1570
- props: (De = (ce = q.ref) == null ? void 0 : ce.getContext) == null ? void 0 : De.call(ce)
1569
+ render: (Oe = (Me = ($e = B.ref) == null ? void 0 : $e.column) == null ? void 0 : Me.columnDef) == null ? void 0 : Oe.cell,
1570
+ props: (De = (ce = B.ref) == null ? void 0 : ce.getContext) == null ? void 0 : De.call(ce)
1571
1571
  }, null, 8, ["render", "props"])
1572
1572
  ])
1573
1573
  ]),
1574
1574
  e("div", null, [
1575
1575
  m(t(ee), {
1576
- render: (Re = (Ae = (Ve = q.type) == null ? void 0 : Ve.column) == null ? void 0 : Ae.columnDef) == null ? void 0 : Re.cell,
1577
- props: (Pe = (fe = q.type) == null ? void 0 : fe.getContext) == null ? void 0 : Pe.call(fe)
1576
+ render: (Re = (Ae = (Ve = B.type) == null ? void 0 : Ve.column) == null ? void 0 : Ae.columnDef) == null ? void 0 : Re.cell,
1577
+ props: (Ue = (fe = B.type) == null ? void 0 : fe.getContext) == null ? void 0 : Ue.call(fe)
1578
1578
  }, null, 8, ["render", "props"])
1579
1579
  ])
1580
1580
  ])