@feedmepos/mf-inventory-portal 0.0.25-dev.50 → 0.0.25-dev.52

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 (44) hide show
  1. package/dist/{App-B7fIlPKw.js → App-DkPiRPu7.js} +34 -34
  2. package/dist/{ApprovalView-Dp20w8em.js → ApprovalView-BEF-qPdZ.js} +20 -20
  3. package/dist/{BindingsDialog-BIHCuoDe.js → BindingsDialog-B6vjaPiA.js} +4 -4
  4. package/dist/{BindingsPicker-DoM1Dh1y.js → BindingsPicker-BmWf3j6H.js} +7 -7
  5. package/dist/{BindingsTable-ChJYIxrf.js → BindingsTable-VVNmzkzf.js} +1 -1
  6. package/dist/{ClosingDraftView-L4EHR0Sb.js → ClosingDraftView-C6sNEHK5.js} +120 -120
  7. package/dist/{ClosingTemplateView-CFVINyCr.js → ClosingTemplateView-5k8R-fMI.js} +285 -285
  8. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Dn-DgO81.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DclFOxv5.js} +37 -37
  9. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CdWkJ2U-.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BFqAE1ZI.js} +32 -32
  10. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BN2ec0EU.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DwAyTAFy.js} +1 -1
  11. package/dist/{IngredientGroupView-Vz6XV_-q.js → IngredientGroupView-DAeurvqt.js} +1 -1
  12. package/dist/{IngredientsView-D1lmg_97.js → IngredientsView-Ca8fShPE.js} +4 -4
  13. package/dist/{IntegrationView-CfDmLYwt.js → IntegrationView-Db4XlQvK.js} +62 -62
  14. package/dist/{InventoryBindingForm-C68ZfWme.js → InventoryBindingForm-BTtpF1P5.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Bd13FqsE.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-ByJPHKqO.js} +15 -15
  16. package/dist/{InventoryBindingSummary-DT9cg2b4.js → InventoryBindingSummary-Bb5gN9Bu.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BfhvXVHK.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D4vUOy_R.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Dvj1F-DM.js → PremiumBadge.vue_vue_type_script_setup_true_lang-fFfOjNOU.js} +3 -3
  19. package/dist/{PublishView-DMzULnCX.js → PublishView-BqE9qfwb.js} +25 -25
  20. package/dist/{PurchaseOrderPrintPreview-D6wcth8H.js → PurchaseOrderPrintPreview-Cp6a-P8I.js} +1 -1
  21. package/dist/{ReceiveRequestView-DsX41zj-.js → ReceiveRequestView-DKPPCyAU.js} +52 -52
  22. package/dist/{RecipeView-DlKk9-tm.js → RecipeView-BEsrqzuU.js} +3 -3
  23. package/dist/{StockView-CNmvVK0V.js → StockView-DplJi2OM.js} +573 -569
  24. package/dist/{SupplierView-BcoOgM67.js → SupplierView-DL3D84U2.js} +7 -7
  25. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CDDvq_mI.js → TransferDetails.vue_vue_type_script_setup_true_lang-BzFkrRui.js} +120 -120
  26. package/dist/{TransferTemplateView-BI96LQfP.js → TransferTemplateView-DakAYozL.js} +153 -153
  27. package/dist/{UnitView-BF2eBWtF.js → UnitView-C_Wqv69Z.js} +3 -3
  28. package/dist/{WarehouseView-joOR4EsJ.js → WarehouseView-CeoVZ9cs.js} +19 -19
  29. package/dist/{app-DavuMSpS.js → app-CulzKCFs.js} +6375 -5538
  30. package/dist/app.d.ts +842 -0
  31. package/dist/app.js +1 -1
  32. package/dist/{decimal-C_LJTg2_.js → decimal-DdjfkmJS.js} +1 -1
  33. package/dist/{feature-D3M-bziy.js → feature-jwErVPVw.js} +1 -1
  34. package/dist/{format-unit-display-BebmN2s-.js → format-unit-display-BMC3HZ0N.js} +30 -30
  35. package/dist/helper/number.d.ts +1 -1
  36. package/dist/{index-DzshvJTA.js → index-BDCZItPF.js} +1 -1
  37. package/dist/{index-BDEeA1dY.js → index-C7-QVxlo.js} +1 -1
  38. package/dist/{stock-CHVVTrSI.js → stock-Czw9__W8.js} +1 -1
  39. package/dist/{supplier-Ddl4sUpm.js → supplier-f0XPCLm-.js} +1 -1
  40. package/dist/tsconfig.app.tsbuildinfo +1 -1
  41. package/dist/{use-ingredient-select-dialog-Z6bbIKfM.js → use-ingredient-select-dialog-DDeNnPW0.js} +1 -1
  42. package/dist/{use-inventory-binding-dialog-Dj45RBWc.js → use-inventory-binding-dialog-BTE0Ceov.js} +1 -1
  43. package/dist/{vue-i18n-Cak3W4nS.js → vue-i18n-B0gOxrrS.js} +153 -153
  44. package/package.json +3 -3
@@ -1,14 +1,14 @@
1
- import { defineComponent as ae, onMounted as xe, computed as H, ref as z, watch as be, inject as Ye, resolveComponent as A, openBlock as C, createElementBlock as N, createElementVNode as l, createVNode as m, withCtx as L, renderSlot as Ae, withDirectives as Ue, normalizeClass as ne, vModelText as Pe, reactive as et, h as le, toDisplayString as D, unref as e, createCommentVNode as se, Fragment as me, renderList as Te, normalizeStyle as He, createBlock as ee, mergeProps as Qe, isRef as ke, createSlots as tt, Teleport as ot, normalizeProps as lt, guardReactiveProps as st } from "vue";
2
- import { G as je, aC as he, t as Le, I as nt, aD as at, aE as rt, i as te, aF as it, b as ut, a as Ke, Z as Be, l as ge, O as ve, K as fe, A as _e, M as dt, E as J, u as Ge, af as mt, T as pt, ag as ct, C as We, d as de, aG as ye, ac as ft, a0 as yt, z as vt, h as qe, _ as bt, B as ht } from "./app-DavuMSpS.js";
1
+ import { defineComponent as ae, onMounted as xe, computed as H, ref as z, watch as be, inject as Ye, resolveComponent as R, openBlock as C, createElementBlock as N, createElementVNode as l, createVNode as m, withCtx as L, renderSlot as Re, withDirectives as Ue, normalizeClass as ne, vModelText as Pe, reactive as et, h as le, toDisplayString as D, unref as e, createCommentVNode as se, Fragment as me, renderList as Te, normalizeStyle as He, createBlock as ee, mergeProps as Qe, isRef as ke, createSlots as tt, Teleport as ot, normalizeProps as lt, guardReactiveProps as st } from "vue";
2
+ import { G as je, aD as he, t as Le, I as nt, aE as at, aF as rt, i as te, aG as it, b as ut, a as Ke, $ as Be, l as ge, P as ve, K as fe, A as _e, M as dt, E as J, u as Ge, ag as mt, V as pt, ah as ct, C as We, d as de, aH as ye, ad as ft, a1 as yt, z as vt, h as qe, _ as bt, B as ht } from "./app-CulzKCFs.js";
3
3
  import { useI18n as ue } from "@feedmepos/mf-common";
4
- import { P as Y, a as gt, f as _t, t as xt, b as Ee, u as Tt } from "./format-unit-display-BebmN2s-.js";
4
+ import { P as Y, a as gt, f as _t, t as xt, b as Ee, u as Tt } from "./format-unit-display-BMC3HZ0N.js";
5
5
  import { components as ie, useSnackbar as kt, useProxiedModel as Ze, useBreakpoints as wt } from "@feedmepos/ui-library";
6
6
  import { defineStore as Ft, storeToRefs as Ne } from "pinia";
7
- import { _ as Ct, b as It, F as St, a as $t } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-CdWkJ2U-.js";
8
- import { c as Ot, u as Mt, _ as Vt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Dn-DgO81.js";
9
- import { u as Dt } from "./supplier-Ddl4sUpm.js";
10
- import { u as Rt } from "./use-ingredient-select-dialog-Z6bbIKfM.js";
11
- import { u as At } from "./feature-D3M-bziy.js";
7
+ import { _ as Ct, b as It, F as St, a as $t } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-BFqAE1ZI.js";
8
+ import { c as Mt, u as Ot, _ as Vt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DclFOxv5.js";
9
+ import { u as Dt } from "./supplier-f0XPCLm-.js";
10
+ import { u as At } from "./use-ingredient-select-dialog-DDeNnPW0.js";
11
+ import { u as Rt } from "./feature-jwErVPVw.js";
12
12
  const Ut = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Lt = { class: "flex-1" }, Bt = { class: "flex items-center" }, qt = { class: "flex-1" }, Et = { class: "flex-1" }, Nt = /* @__PURE__ */ ae({
13
13
  __name: "FmMinMaxInput",
14
14
  props: {
@@ -47,17 +47,17 @@ const Ut = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Lt = { c
47
47
  helperState: {}
48
48
  },
49
49
  setup(c) {
50
- const y = c, v = je("modelValue"), t = nt();
50
+ const f = c, v = je("modelValue"), t = nt();
51
51
  xe(() => {
52
52
  const { min: p, max: d } = v ?? {};
53
53
  if (!(!p || !d) && p.precision !== d.precision) {
54
- const g = Math.max(p.precision, d.precision), i = he(p, g), f = he(d, g);
55
- v.min = i, v.max = f;
54
+ const g = Math.max(p.precision, d.precision), i = he(p, g), y = he(d, g);
55
+ v.min = i, v.max = y;
56
56
  }
57
57
  });
58
58
  const r = H(() => {
59
59
  const { min: p, max: d } = v ?? {};
60
- return Math.max((p == null ? void 0 : p.precision) ?? 0, (d == null ? void 0 : d.precision) ?? 0, y.precision ?? 0);
60
+ return Math.max((p == null ? void 0 : p.precision) ?? 0, (d == null ? void 0 : d.precision) ?? 0, f.precision ?? 0);
61
61
  }), u = (p) => {
62
62
  if (!p) return "";
63
63
  const d = at(p), g = r.value, i = he(d, g);
@@ -67,29 +67,29 @@ const Ut = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Lt = { c
67
67
  );
68
68
  }, o = z(u(v.min)), a = z(u(v.max));
69
69
  be([o, a], ([p, d]) => {
70
- const g = v ?? {}, i = t(p), f = t(d), V = r.value;
70
+ const g = v ?? {}, i = t(p), y = t(d), V = r.value;
71
71
  if (p !== "" && i === !0) {
72
72
  const F = Le(+p, V);
73
73
  g.min = F;
74
74
  } else
75
75
  g.min = null;
76
- if (d !== "" && f === !0) {
76
+ if (d !== "" && y === !0) {
77
77
  const F = Le(+d, V);
78
78
  g.max = F;
79
79
  } else
80
80
  g.max = null;
81
81
  v.min = g.min, v.max = g.max;
82
82
  });
83
- const h = Symbol.for("fm:form-state"), _ = Ye(h, null), M = H(() => y.disabled ?? (_ == null ? void 0 : _.getDisabled()) ?? !1), B = z(), I = z(), $ = z(!1), w = z(!1), O = H(() => $.value || w.value), b = H(() => [...[
83
+ const h = Symbol.for("fm:form-state"), _ = Ye(h, null), O = H(() => f.disabled ?? (_ == null ? void 0 : _.getDisabled()) ?? !1), B = z(), I = z(), $ = z(!1), w = z(!1), M = H(() => $.value || w.value), b = H(() => [...[
84
84
  function() {
85
85
  return typeof t(o.value) == "string" || typeof t(a.value) == "string" ? "Must be a number" : !0;
86
86
  },
87
87
  function(g) {
88
88
  return !g || !g.min || !g.max ? !0 : +te(g.min) > +te(g.max) ? "Min must be less than or equal to max" : !0;
89
89
  }
90
- ], ...y.rules ?? []]);
90
+ ], ...f.rules ?? []]);
91
91
  return (p, d) => {
92
- const g = A("FmLabel"), i = A("FmField"), f = A("FmFormGroup");
92
+ const g = R("FmLabel"), i = R("FmField"), y = R("FmFormGroup");
93
93
  return C(), N("div", Ut, [
94
94
  l("div", Pt, [
95
95
  l("div", Lt, [
@@ -100,10 +100,10 @@ const Ut = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Lt = { c
100
100
  optional: p.labelMark === "optional"
101
101
  }, null, 8, ["label", "disabled", "required", "optional"])
102
102
  ]),
103
- m(i, { focused: O.value }, {
103
+ m(i, { focused: M.value }, {
104
104
  default: L(() => [
105
105
  l("div", Bt, [
106
- Ae(p.$slots, "prepend"),
106
+ Re(p.$slots, "prepend"),
107
107
  d[6] || (d[6] = l("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Min.", -1)),
108
108
  l("div", qt, [
109
109
  Ue(l("input", {
@@ -115,8 +115,8 @@ const Ut = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Lt = { c
115
115
  "onUpdate:modelValue": d[2] || (d[2] = (V) => o.value = V),
116
116
  class: ne({
117
117
  "fm-text-field--input fm-typo-en-body-lg-400": !0,
118
- "text-fm-color-typo-primary": !M.value,
119
- "text-fm-color-typo-disabled": M.value
118
+ "text-fm-color-typo-primary": !O.value,
119
+ "text-fm-color-typo-disabled": O.value
120
120
  })
121
121
  }, null, 34), [
122
122
  [Pe, o.value]
@@ -134,20 +134,20 @@ const Ut = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Lt = { c
134
134
  "onUpdate:modelValue": d[5] || (d[5] = (V) => a.value = V),
135
135
  class: ne({
136
136
  "fm-text-field--input fm-typo-en-body-lg-400": !0,
137
- "text-fm-color-typo-primary": !M.value,
138
- "text-fm-color-typo-disabled": M.value
137
+ "text-fm-color-typo-primary": !O.value,
138
+ "text-fm-color-typo-disabled": O.value
139
139
  })
140
140
  }, null, 34), [
141
141
  [Pe, a.value]
142
142
  ])
143
143
  ]),
144
- Ae(p.$slots, "append")
144
+ Re(p.$slots, "append")
145
145
  ])
146
146
  ]),
147
147
  _: 3
148
148
  }, 8, ["focused"])
149
149
  ]),
150
- m(f, {
150
+ m(y, {
151
151
  class: "flex-1",
152
152
  "model-value": p.modelValue,
153
153
  info: p.labelInfo,
@@ -159,26 +159,26 @@ const Ut = { class: "flex flex-col" }, Pt = { class: "flex flex-col" }, Lt = { c
159
159
  };
160
160
  }
161
161
  });
162
- function zt({ min: c, max: y } = { min: !0, max: !0 }) {
162
+ function zt({ min: c, max: f } = { min: !0, max: !0 }) {
163
163
  return function(t) {
164
- return !t || !t.min && c != !1 || !t.max && y != !1 ? "Required" : !0;
164
+ return !t || !t.min && c != !1 || !t.max && f != !1 ? "Required" : !0;
165
165
  };
166
166
  }
167
- function Ht(c, y) {
167
+ function Ht(c, f) {
168
168
  return function(t) {
169
- return !t || !t.min || !t.max ? !0 : +te(t.min) < c ? `Must be between ${c} and ${y}` : +te(t.max) > y ? `Must be between ${c} and ${y}` : !0;
169
+ return !t || !t.min || !t.max ? !0 : +te(t.min) < c ? `Must be between ${c} and ${f}` : +te(t.max) > f ? `Must be between ${c} and ${f}` : !0;
170
170
  };
171
171
  }
172
172
  function Qt(c) {
173
- const y = it(c), v = te(c);
173
+ const f = it(c), v = te(c);
174
174
  return function(r) {
175
- const u = !(r != null && r.min) || y(r.min) === !0, o = !(r != null && r.max) || y(r.max) === !0;
175
+ const u = !(r != null && r.min) || f(r.min) === !0, o = !(r != null && r.max) || f(r.max) === !0;
176
176
  return !u && !o ? `Min & max must be a multiple of ${v}` : u ? o ? !0 : `Max must be a multiple of ${v}` : `Min must be a multiple of ${v}`;
177
177
  };
178
178
  }
179
179
  const Je = Ft("transfer-template-helper", () => {
180
180
  const c = ut();
181
- function y(v, t, r, u, o) {
181
+ function f(v, t, r, u, o) {
182
182
  var h;
183
183
  if (!r) {
184
184
  o == null || o("Unit is not valid");
@@ -197,18 +197,18 @@ const Je = Ft("transfer-template-helper", () => {
197
197
  });
198
198
  }
199
199
  return {
200
- validateUnitInput: y
200
+ validateUnitInput: f
201
201
  };
202
202
  });
203
203
  var j = /* @__PURE__ */ ((c) => (c.Code = "Code", c.Name = "Name", c.DefaultAmount = "DefaultAmount", c.Limit = "Limit", c.Step = "Step", c.Cost = "Cost", c.Delete = "Delete", c))(j || {});
204
204
  const ze = Je();
205
205
  function jt(c) {
206
- const { t: y } = ue(), v = Ke(), t = et({});
206
+ const { t: f } = ue(), v = Ke(), t = et({});
207
207
  return xe(() => {
208
208
  for (const u of c.items) {
209
209
  if (!u.totalCost)
210
210
  continue;
211
- const o = Ot(u.sku, u.quantity, u.measurement, {
211
+ const o = Mt(u.sku, u.quantity, u.measurement, {
212
212
  supplier: c.supplier
213
213
  }), a = u.totalCost ?? Be.reset();
214
214
  o ? t[u.sku._id] = o.amount !== a.amount || o.precision !== a.precision : t[u.sku._id] = !0;
@@ -217,7 +217,7 @@ function jt(c) {
217
217
  columnDefs: [
218
218
  {
219
219
  id: "Code",
220
- header: () => y("inventory.transfer.form.items.table.Code"),
220
+ header: () => f("inventory.transfer.form.items.table.Code"),
221
221
  accessorKey: "code",
222
222
  size: 180,
223
223
  cell(u) {
@@ -239,7 +239,7 @@ function jt(c) {
239
239
  },
240
240
  {
241
241
  id: "Name",
242
- header: () => y("inventory.transfer.form.items.table.Name"),
242
+ header: () => f("inventory.transfer.form.items.table.Name"),
243
243
  minSize: 300,
244
244
  cell(u) {
245
245
  const o = u.row.original;
@@ -260,14 +260,14 @@ function jt(c) {
260
260
  },
261
261
  {
262
262
  id: "DefaultAmount",
263
- header: () => y("inventory.transfer.form.items.table.DefaultAmount"),
263
+ header: () => f("inventory.transfer.form.items.table.DefaultAmount"),
264
264
  minSize: 200,
265
265
  cell(u) {
266
266
  var B;
267
267
  const o = u.row.original, a = v.skuById[o.sku._id], h = v.unitById[(B = a.unit) == null ? void 0 : B._id], _ = h.measurements.find((I) => {
268
268
  var $;
269
269
  return (($ = o.measurement) == null ? void 0 : $.id) === I.id;
270
- }), M = o.sku.unit._id !== a.unit._id || !h || o.measurement && !_;
270
+ }), O = o.sku.unit._id !== a.unit._id || !h || o.measurement && !_;
271
271
  return le(Ct, {
272
272
  style: {
273
273
  flex: "1 1 0%"
@@ -313,7 +313,7 @@ function jt(c) {
313
313
  o.maximumQuantity ? +te(o.maximumQuantity) : 1 / 0
314
314
  ),
315
315
  function($) {
316
- return M ? "This item is no longer valid due to change in unit. Please reapply unit." : !0;
316
+ return O ? "This item is no longer valid due to change in unit. Please reapply unit." : !0;
317
317
  }
318
318
  ],
319
319
  applyDefaultRules: !0
@@ -361,7 +361,7 @@ function jt(c) {
361
361
  },
362
362
  {
363
363
  id: "Step",
364
- header: () => y("inventory.transfer.form.items.table.Step"),
364
+ header: () => f("inventory.transfer.form.items.table.Step"),
365
365
  minSize: 100,
366
366
  cell(u) {
367
367
  const o = u.row.original;
@@ -469,13 +469,13 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
469
469
  row: {}
470
470
  },
471
471
  setup(c) {
472
- const { t: y } = ue();
472
+ const { t: f } = ue();
473
473
  function v(t) {
474
474
  return t;
475
475
  }
476
476
  return (t, r) => {
477
- var o, a, h, _, M, B, I, $, w, O, b, p, d, g, i, f, V, F, S, Z, W, E, U, s, n, T, R, K, q, k;
478
- const u = A("FmLabel");
477
+ var o, a, h, _, O, B, I, $, w, M, b, p, d, g, i, y, V, F, S, Z, W, E, U, s, n, T, A, K, q, k;
478
+ const u = R("FmLabel");
479
479
  return C(), N("div", Kt, [
480
480
  l("div", Gt, [
481
481
  l("div", Wt, [
@@ -485,24 +485,24 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
485
485
  l("div", null, [
486
486
  m(e(J), {
487
487
  render: (h = (a = (o = t.cellByColId.Delete) == null ? void 0 : o.column) == null ? void 0 : a.columnDef) == null ? void 0 : h.cell,
488
- props: (M = (_ = t.cellByColId.Delete) == null ? void 0 : _.getContext) == null ? void 0 : M.call(_)
488
+ props: (O = (_ = t.cellByColId.Delete) == null ? void 0 : _.getContext) == null ? void 0 : O.call(_)
489
489
  }, null, 8, ["render", "props"])
490
490
  ])
491
491
  ]),
492
492
  l("div", Xt, [
493
493
  l("div", Yt, [
494
494
  m(u, {
495
- label: e(y)(`inventory.transfer.form.items.table.${e(j).Code}`)
495
+ label: e(f)(`inventory.transfer.form.items.table.${e(j).Code}`)
496
496
  }, null, 8, ["label"]),
497
497
  m(e(J), {
498
498
  render: ($ = (I = (B = t.cellByColId[e(j).Code]) == null ? void 0 : B.column) == null ? void 0 : I.columnDef) == null ? void 0 : $.cell,
499
- props: (O = (w = t.cellByColId[e(j).Code]) == null ? void 0 : w.getContext) == null ? void 0 : O.call(w)
499
+ props: (M = (w = t.cellByColId[e(j).Code]) == null ? void 0 : w.getContext) == null ? void 0 : M.call(w)
500
500
  }, null, 8, ["render", "props"]),
501
501
  r[0] || (r[0] = l("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
502
502
  ]),
503
503
  l("div", eo, [
504
504
  m(u, {
505
- label: e(y)(`inventory.transfer.form.items.table.${e(j).Name}`)
505
+ label: e(f)(`inventory.transfer.form.items.table.${e(j).Name}`)
506
506
  }, null, 8, ["label"]),
507
507
  m(e(J), {
508
508
  render: (d = (p = (b = t.cellByColId[e(j).Name]) == null ? void 0 : b.column) == null ? void 0 : p.columnDef) == null ? void 0 : d.cell,
@@ -514,17 +514,17 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
514
514
  t.row.original ? (C(), N("div", to, [
515
515
  l("div", oo, [
516
516
  m(u, {
517
- label: e(y)(`inventory.transfer.form.items.table.${e(j).DefaultAmount}`)
517
+ label: e(f)(`inventory.transfer.form.items.table.${e(j).DefaultAmount}`)
518
518
  }, null, 8, ["label"]),
519
519
  m(e(J), {
520
- render: (F = (V = (f = t.cellByColId[e(j).DefaultAmount]) == null ? void 0 : f.column) == null ? void 0 : V.columnDef) == null ? void 0 : F.cell,
520
+ render: (F = (V = (y = t.cellByColId[e(j).DefaultAmount]) == null ? void 0 : y.column) == null ? void 0 : V.columnDef) == null ? void 0 : F.cell,
521
521
  props: (Z = (S = t.cellByColId[e(j).DefaultAmount]) == null ? void 0 : S.getContext) == null ? void 0 : Z.call(S)
522
522
  }, null, 8, ["render", "props"]),
523
523
  r[2] || (r[2] = l("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
524
524
  ]),
525
525
  l("div", lo, [
526
526
  m(u, {
527
- label: e(y)(`inventory.transfer.form.items.table.${e(j).Step}`)
527
+ label: e(f)(`inventory.transfer.form.items.table.${e(j).Step}`)
528
528
  }, null, 8, ["label"]),
529
529
  m(e(J), {
530
530
  render: (U = (E = (W = t.cellByColId[e(j).Step]) == null ? void 0 : W.column) == null ? void 0 : E.columnDef) == null ? void 0 : U.cell,
@@ -536,10 +536,10 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
536
536
  l("div", so, [
537
537
  l("div", no, [
538
538
  m(u, {
539
- label: e(y)(`inventory.transfer.form.items.table.${e(j).Limit}`)
539
+ label: e(f)(`inventory.transfer.form.items.table.${e(j).Limit}`)
540
540
  }, null, 8, ["label"]),
541
541
  m(e(J), {
542
- render: (K = (R = (T = t.cellByColId[e(j).Limit]) == null ? void 0 : T.column) == null ? void 0 : R.columnDef) == null ? void 0 : K.cell,
542
+ render: (K = (A = (T = t.cellByColId[e(j).Limit]) == null ? void 0 : T.column) == null ? void 0 : A.columnDef) == null ? void 0 : K.cell,
543
543
  props: (k = (q = t.cellByColId[e(j).Limit]) == null ? void 0 : q.getContext) == null ? void 0 : k.call(q)
544
544
  }, null, 8, ["render", "props"]),
545
545
  r[4] || (r[4] = l("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
@@ -556,7 +556,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
556
556
  },
557
557
  emits: ["update:item"],
558
558
  setup(c) {
559
- function y(v) {
559
+ function f(v) {
560
560
  return v.column.columnDef.meta;
561
561
  }
562
562
  return (v, t) => (C(), N("tr", ro, [
@@ -564,11 +564,11 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
564
564
  var u, o, a, h, _;
565
565
  return C(), N("td", {
566
566
  key: r.id,
567
- class: ne(["text-fm-color-typo-primary", ((u = y(r)) == null ? void 0 : u.cellClass) ?? "px-16"]),
567
+ class: ne(["text-fm-color-typo-primary", ((u = f(r)) == null ? void 0 : u.cellClass) ?? "px-16"]),
568
568
  style: He({
569
- width: (o = y(r)) != null && o.width ? (a = y(r)) == null ? void 0 : a.width : r.column.getSize() !== 0 ? `${r.column.getSize()}px` : void 0,
570
- maxWidth: (h = y(r)) == null ? void 0 : h.maxWidth,
571
- textAlign: ((_ = y(r)) == null ? void 0 : _.textAlign) ?? "left"
569
+ width: (o = f(r)) != null && o.width ? (a = f(r)) == null ? void 0 : a.width : r.column.getSize() !== 0 ? `${r.column.getSize()}px` : void 0,
570
+ maxWidth: (h = f(r)) == null ? void 0 : h.maxWidth,
571
+ textAlign: ((_ = f(r)) == null ? void 0 : _.textAlign) ?? "left"
572
572
  })
573
573
  }, [
574
574
  l("span", io, [
@@ -593,7 +593,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
593
593
  modelValue: {},
594
594
  disabled: { type: Boolean }
595
595
  },
596
- setup(c, { expose: y }) {
596
+ setup(c, { expose: f }) {
597
597
  const v = c, t = je(), { t: r } = ue(), u = Ge(), o = Ke(), a = Dt(), h = Je();
598
598
  be(
599
599
  () => v.modelValue,
@@ -609,7 +609,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
609
609
  ), u.watchLocation(async () => {
610
610
  location && (t.purchaseOrder.supplier || (t.purchaseOrder.supplier = a.suppliers.find((s) => s) ?? t.purchaseOrder.supplier));
611
611
  });
612
- const _ = Mt(
612
+ const _ = Ot(
613
613
  () => t.purchaseOrder,
614
614
  (s) => {
615
615
  t.purchaseOrder = {
@@ -617,14 +617,14 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
617
617
  supplier: s.supplier ?? (t == null ? void 0 : t.purchaseOrder.supplier)
618
618
  };
619
619
  }
620
- ), M = H({
620
+ ), O = H({
621
621
  get() {
622
622
  var s, n;
623
623
  return typeof ((n = (s = t.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : n.internal) == "string" ? Y.TRANSFER : Y.PURCHASE;
624
624
  },
625
625
  set(s) {
626
- var T, R;
627
- const n = typeof ((R = (T = t.purchaseOrder) == null ? void 0 : T.supplier) == null ? void 0 : R.internal) == "string" ? Y.TRANSFER : Y.PURCHASE;
626
+ var T, A;
627
+ const n = typeof ((A = (T = t.purchaseOrder) == null ? void 0 : T.supplier) == null ? void 0 : A.internal) == "string" ? Y.TRANSFER : Y.PURCHASE;
628
628
  s !== n && (t.purchaseOrder.supplier = s === Y.PURCHASE ? _.locationOptionsTypePurchase.value[0] : _.locationOptionsTypeTransfer.value[0]);
629
629
  }
630
630
  }), B = H(() => _.transferLocationOptions.value), I = H({
@@ -638,13 +638,13 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
638
638
  }), {
639
639
  promptSelectLocations: $,
640
640
  columnDefs: w,
641
- rowData: O,
641
+ rowData: M,
642
642
  hasCustomTag: b,
643
643
  locationTagModel: p,
644
644
  locationTagAutocomplete: d,
645
645
  pushLocationTag: g,
646
646
  removeLocationTag: i,
647
- locationTagError: f
647
+ locationTagError: y
648
648
  } = mt({
649
649
  getLocations() {
650
650
  return t.locations;
@@ -662,8 +662,8 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
662
662
  function V() {
663
663
  var s, n;
664
664
  return (s = t.locations) != null && s.find((T) => {
665
- var R, K;
666
- return ((R = T.doc) == null ? void 0 : R._id) === ((K = t.purchaseOrder.supplier) == null ? void 0 : K._id);
665
+ var A, K;
666
+ return ((A = T.doc) == null ? void 0 : A._id) === ((K = t.purchaseOrder.supplier) == null ? void 0 : K._id);
667
667
  }) ? `Location ${(n = t.purchaseOrder.supplier) == null ? void 0 : n.name} must be removed because template cannot be used to transfer to itself.` : !0;
668
668
  }
669
669
  const F = H({
@@ -674,7 +674,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
674
674
  t.purchaseOrder.remark = s;
675
675
  }
676
676
  }), S = z();
677
- y({
677
+ f({
678
678
  validateInputs: () => {
679
679
  var s, n;
680
680
  (n = (s = S.value) == null ? void 0 : s.validateInputs) == null || n.call(s);
@@ -722,7 +722,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
722
722
  get disabled() {
723
723
  return v.disabled;
724
724
  }
725
- }), { promptSelectIngredients: E } = Rt();
725
+ }), { promptSelectIngredients: E } = At();
726
726
  async function U() {
727
727
  const n = o.skus.map((k) => ({
728
728
  label: k.name,
@@ -731,7 +731,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
731
731
  })).filter((k) => {
732
732
  var P;
733
733
  return (P = t.purchaseOrder.items) == null ? void 0 : P.find((Q) => Q.sku._id === k.value._id);
734
- }).map((k) => k.value), T = t.purchaseOrder.items ?? [], R = await E(
734
+ }).map((k) => k.value), T = t.purchaseOrder.items ?? [], A = await E(
735
735
  n.map((k) => k._id),
736
736
  (k) => {
737
737
  const P = o.skuById[k], Q = T.find((x) => x.sku._id === P._id);
@@ -764,21 +764,21 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
764
764
  ), oe;
765
765
  }
766
766
  );
767
- if (!R) return;
768
- const K = R.map((k) => k.sku._id), q = [];
767
+ if (!A) return;
768
+ const K = A.map((k) => k.sku._id), q = [];
769
769
  for (const k of K) {
770
770
  const P = T.filter((Q) => Q.sku._id === k);
771
771
  if (P.length > 0)
772
772
  q.push(...P);
773
773
  else {
774
- const Q = R.find((X) => X.sku._id === k);
774
+ const Q = A.find((X) => X.sku._id === k);
775
775
  Q && q.push(Q);
776
776
  }
777
777
  }
778
778
  q.sort((k, P) => k.sku.code.localeCompare(P.sku.code)), t.purchaseOrder.items = q;
779
779
  }
780
780
  return (s, n) => {
781
- const T = A("FmTextField"), R = A("FmSelect"), K = A("FmTextarea"), q = A("FmButton"), k = A("FmTable"), P = A("FmFormGroup"), Q = A("FmChip"), X = A("FmForm");
781
+ const T = R("FmTextField"), A = R("FmSelect"), K = R("FmTextarea"), q = R("FmButton"), k = R("FmTable"), P = R("FmFormGroup"), Q = R("FmChip"), X = R("FmForm");
782
782
  return C(), ee(X, {
783
783
  ref_key: "formRef",
784
784
  ref: S,
@@ -797,10 +797,10 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
797
797
  "onUpdate:modelValue": n[0] || (n[0] = (x) => e(t).name = x),
798
798
  rules: [e(ge)()]
799
799
  }, null, 8, ["label", "modelValue", "rules"]),
800
- m(R, {
800
+ m(A, {
801
801
  label: e(r)("inventory.transfer.form.type.title"),
802
- "model-value": M.value,
803
- "onUpdate:modelValue": n[1] || (n[1] = (x) => M.value = x),
802
+ "model-value": O.value,
803
+ "onUpdate:modelValue": n[1] || (n[1] = (x) => O.value = x),
804
804
  items: [
805
805
  {
806
806
  label: e(r)("inventory.transfer.form.type.purchase"),
@@ -823,12 +823,12 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
823
823
  "line-clamp-1 fm-typo-en-body-lg-400",
824
824
  s.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
825
825
  ])
826
- }, D(e(pt)(M.value)), 3)
826
+ }, D(e(pt)(O.value)), 3)
827
827
  ]),
828
828
  _: 1
829
829
  }, 8, ["label", "model-value", "items", "rules"]),
830
- m(R, {
831
- label: M.value === e(Y).PURCHASE ? e(r)("inventory.transfer.form.purchaseFrom") : e(r)("inventory.transfer.form.transferFrom"),
830
+ m(A, {
831
+ label: O.value === e(Y).PURCHASE ? e(r)("inventory.transfer.form.purchaseFrom") : e(r)("inventory.transfer.form.transferFrom"),
832
832
  modelValue: I.value,
833
833
  "onUpdate:modelValue": n[2] || (n[2] = (x) => I.value = x),
834
834
  items: B.value
@@ -885,7 +885,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
885
885
  ]),
886
886
  m(k, {
887
887
  "column-defs": e(w),
888
- "row-data": e(O),
888
+ "row-data": e(M),
889
889
  "shrink-at": 9999,
890
890
  onRowClick: e($),
891
891
  "hide-footer": ""
@@ -910,7 +910,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
910
910
  }, tt({
911
911
  "helper-text": L(() => [
912
912
  l("div", vo, [
913
- e(f) ? (C(), N("div", bo, D(e(f)), 1)) : (C(), N("div", ho, " This will match all locations under these values. Tag is configured in the restaurant/warehouse settings. ")),
913
+ e(y) ? (C(), N("div", bo, D(e(y)), 1)) : (C(), N("div", ho, " This will match all locations under these values. Tag is configured in the restaurant/warehouse settings. ")),
914
914
  l("div", go, [
915
915
  (C(!0), N(me, null, Te(s.modelValue.locationTags, (x, G) => (C(), ee(Q, {
916
916
  key: G,
@@ -1003,7 +1003,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1003
1003
  show: { type: Boolean }
1004
1004
  },
1005
1005
  emits: ["update:show", "submitted"],
1006
- setup(c, { expose: y, emit: v }) {
1006
+ setup(c, { expose: f, emit: v }) {
1007
1007
  var g;
1008
1008
  const t = c, r = v, u = gt(), o = kt(), { t: a } = ue(), h = Ze(t, "show");
1009
1009
  function _() {
@@ -1036,12 +1036,12 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1036
1036
  }
1037
1037
  };
1038
1038
  }
1039
- const M = z(t.modelValue ?? _()), B = z(((g = t.modelValue) == null ? void 0 : g._id) ?? `${Math.random()}`);
1039
+ const O = z(t.modelValue ?? _()), B = z(((g = t.modelValue) == null ? void 0 : g._id) ?? `${Math.random()}`);
1040
1040
  be(
1041
1041
  () => t.show,
1042
1042
  (i) => {
1043
- var f;
1044
- i && (M.value = t.modelValue ?? _(), B.value = ((f = t.modelValue) == null ? void 0 : f._id) ?? `${Math.random()}`);
1043
+ var y;
1044
+ i && (O.value = t.modelValue ?? _(), B.value = ((y = t.modelValue) == null ? void 0 : y._id) ?? `${Math.random()}`);
1045
1045
  }
1046
1046
  );
1047
1047
  const I = z(!1), $ = H(() => {
@@ -1055,25 +1055,25 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1055
1055
  }
1056
1056
  return "";
1057
1057
  }), w = z();
1058
- y({
1058
+ f({
1059
1059
  validateInputs: () => {
1060
- var i, f;
1061
- (f = (i = w.value) == null ? void 0 : i.validateInputs) == null || f.call(i);
1060
+ var i, y;
1061
+ (y = (i = w.value) == null ? void 0 : i.validateInputs) == null || y.call(i);
1062
1062
  },
1063
1063
  resetInputsValidation: () => {
1064
- var i, f;
1065
- (f = (i = w.value) == null ? void 0 : i.resetInputsValidation) == null || f.call(i);
1064
+ var i, y;
1065
+ (y = (i = w.value) == null ? void 0 : i.resetInputsValidation) == null || y.call(i);
1066
1066
  },
1067
1067
  resetInputs: () => {
1068
- var i, f;
1069
- (f = (i = w.value) == null ? void 0 : i.resetInputs) == null || f.call(i);
1068
+ var i, y;
1069
+ (y = (i = w.value) == null ? void 0 : i.resetInputs) == null || y.call(i);
1070
1070
  }
1071
1071
  });
1072
- async function O() {
1073
- var f, V;
1074
- const i = M.value;
1072
+ async function M() {
1073
+ var y, V;
1074
+ const i = O.value;
1075
1075
  if (i) {
1076
- I.value = !0, (((f = i.purchaseOrder.supplier) == null ? void 0 : f.internal) === ye.enum.warehouse || ((V = i.purchaseOrder.supplier) == null ? void 0 : V.internal) === ye.enum.restaurant) && (i.purchaseOrder.items = i.purchaseOrder.items.map(
1076
+ I.value = !0, (((y = i.purchaseOrder.supplier) == null ? void 0 : y.internal) === ye.enum.warehouse || ((V = i.purchaseOrder.supplier) == null ? void 0 : V.internal) === ye.enum.restaurant) && (i.purchaseOrder.items = i.purchaseOrder.items.map(
1077
1077
  ({ totalCost: F, ...S }) => S
1078
1078
  ));
1079
1079
  try {
@@ -1094,10 +1094,10 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1094
1094
  }
1095
1095
  }
1096
1096
  async function b() {
1097
- var f, V;
1098
- const i = M.value;
1097
+ var y, V;
1098
+ const i = O.value;
1099
1099
  if (i) {
1100
- I.value = !0, (((f = i.purchaseOrder.supplier) == null ? void 0 : f.internal) === ye.enum.warehouse || ((V = i.purchaseOrder.supplier) == null ? void 0 : V.internal) === ye.enum.restaurant) && (i.purchaseOrder.items = i.purchaseOrder.items.map(
1100
+ I.value = !0, (((y = i.purchaseOrder.supplier) == null ? void 0 : y.internal) === ye.enum.warehouse || ((V = i.purchaseOrder.supplier) == null ? void 0 : V.internal) === ye.enum.restaurant) && (i.purchaseOrder.items = i.purchaseOrder.items.map(
1101
1101
  ({ totalCost: F, ...S }) => S
1102
1102
  ));
1103
1103
  try {
@@ -1120,20 +1120,20 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1120
1120
  function p() {
1121
1121
  switch (t.mode) {
1122
1122
  case de.CREATE:
1123
- return O();
1123
+ return M();
1124
1124
  case de.UPDATE:
1125
1125
  return b();
1126
1126
  }
1127
1127
  }
1128
1128
  function d() {
1129
- var i, f;
1130
- (f = (i = w.value) == null ? void 0 : i.validateInputs) == null || f.call(i);
1129
+ var i, y;
1130
+ (y = (i = w.value) == null ? void 0 : i.validateInputs) == null || y.call(i);
1131
1131
  }
1132
- return (i, f) => {
1133
- const V = A("FmButton"), F = A("FmSideSheet");
1132
+ return (i, y) => {
1133
+ const V = R("FmButton"), F = R("FmSideSheet");
1134
1134
  return C(), ee(F, {
1135
1135
  modelValue: e(h),
1136
- "onUpdate:modelValue": f[2] || (f[2] = (S) => ke(h) ? h.value = S : null),
1136
+ "onUpdate:modelValue": y[2] || (y[2] = (S) => ke(h) ? h.value = S : null),
1137
1137
  "dismiss-away": "",
1138
1138
  "close-button": "",
1139
1139
  "max-width": 1200
@@ -1149,8 +1149,8 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1149
1149
  ref_key: "formRef",
1150
1150
  ref: w,
1151
1151
  onValidationSuccess: p,
1152
- "model-value": M.value,
1153
- "onUpdate:modelValue": f[0] || (f[0] = (S) => M.value = S),
1152
+ "model-value": O.value,
1153
+ "onUpdate:modelValue": y[0] || (y[0] = (S) => O.value = S),
1154
1154
  disabled: I.value,
1155
1155
  key: B.value
1156
1156
  }, null, 8, ["model-value", "disabled"]))
@@ -1166,7 +1166,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1166
1166
  disabled: I.value,
1167
1167
  variant: "tertiary",
1168
1168
  label: e(a)("common.close"),
1169
- onClick: f[1] || (f[1] = (S) => r("update:show", !1))
1169
+ onClick: y[1] || (y[1] = (S) => r("update:show", !1))
1170
1170
  }, null, 8, ["disabled", "label"])
1171
1171
  ])
1172
1172
  ]),
@@ -1174,7 +1174,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1174
1174
  }, 8, ["modelValue"]);
1175
1175
  };
1176
1176
  }
1177
- }), So = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, $o = { class: "flex justify-between" }, Oo = { class: "fm-typo-en-body-lg-600" }, Mo = { class: "fm-status-badge fm-status-badge-info-secondary" }, Vo = { class: "flex flex-col gap-8" }, Do = { class: "flex flex-col gap-4" }, Ro = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ao = { class: "flex gap-1" }, Uo = { class: "fm-typo-en-body-lg-600" }, Po = {
1177
+ }), So = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, $o = { class: "flex justify-between" }, Mo = { class: "fm-typo-en-body-lg-600" }, Oo = { class: "fm-status-badge fm-status-badge-info-secondary" }, Vo = { class: "flex flex-col gap-8" }, Do = { class: "flex flex-col gap-4" }, Ao = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ro = { class: "flex gap-1" }, Uo = { class: "fm-typo-en-body-lg-600" }, Po = {
1178
1178
  key: 0,
1179
1179
  class: "flex flex-col gap-4"
1180
1180
  }, Lo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Bo = { class: "fm-typo-en-body-lg-600" }, qo = {
@@ -1196,33 +1196,33 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1196
1196
  show: { type: Boolean }
1197
1197
  },
1198
1198
  emits: ["update:show", "action:edit"],
1199
- setup(c, { emit: y }) {
1200
- const v = c, t = y, r = At(), { t: u } = ue(), o = H(() => {
1201
- var O;
1202
- return (O = v.template) == null ? void 0 : O.purchaseOrder;
1199
+ setup(c, { emit: f }) {
1200
+ const v = c, t = f, r = Rt(), { t: u } = ue(), o = H(() => {
1201
+ var M;
1202
+ return (M = v.template) == null ? void 0 : M.purchaseOrder;
1203
1203
  }), a = z(""), h = [
1204
1204
  { accessorKey: "name", header: () => "Name" },
1205
1205
  { accessorKey: "type", header: () => "Type" }
1206
- ], _ = z(""), M = H(
1206
+ ], _ = z(""), O = H(
1207
1207
  () => {
1208
- var O, b, p, d;
1209
- return ((b = (O = o.value) == null ? void 0 : O.supplier) == null ? void 0 : b.internal) === "restaurant" || ((d = (p = o.value) == null ? void 0 : p.supplier) == null ? void 0 : d.internal) === "warehouse" ? Y.TRANSFER : Y.PURCHASE;
1208
+ var M, b, p, d;
1209
+ return ((b = (M = o.value) == null ? void 0 : M.supplier) == null ? void 0 : b.internal) === "restaurant" || ((d = (p = o.value) == null ? void 0 : p.supplier) == null ? void 0 : d.internal) === "warehouse" ? Y.TRANSFER : Y.PURCHASE;
1210
1210
  }
1211
1211
  ), B = z(!0), I = Ze(v, "show"), $ = z(!1);
1212
1212
  be(
1213
1213
  () => v.show,
1214
- (O) => {
1215
- O && ($.value = !0, setTimeout(() => $.value = !1, 300));
1214
+ (M) => {
1215
+ M && ($.value = !0, setTimeout(() => $.value = !1, 300));
1216
1216
  }
1217
1217
  );
1218
- function w(O) {
1219
- return O.original;
1218
+ function w(M) {
1219
+ return M.original;
1220
1220
  }
1221
- return (O, b) => {
1221
+ return (M, b) => {
1222
1222
  var Z;
1223
- const p = A("FmMenuDivider"), d = A("FmCard"), g = A("FmTextField"), i = A("FmIcon"), f = A("FmTable"), V = A("FmChip"), F = A("FmButton"), S = A("FmSideSheet");
1223
+ const p = R("FmMenuDivider"), d = R("FmCard"), g = R("FmTextField"), i = R("FmIcon"), y = R("FmTable"), V = R("FmChip"), F = R("FmButton"), S = R("FmSideSheet");
1224
1224
  return C(), ee(S, {
1225
- header: e(u)("inventory.transfer.template.details.view", { template: (Z = O.template) == null ? void 0 : Z.name }),
1225
+ header: e(u)("inventory.transfer.template.details.view", { template: (Z = M.template) == null ? void 0 : Z.name }),
1226
1226
  modelValue: e(I),
1227
1227
  "onUpdate:modelValue": b[3] || (b[3] = (W) => ke(I) ? I.value = W : null),
1228
1228
  "dismiss-away": B.value,
@@ -1239,25 +1239,25 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1239
1239
  class: "flex flex-col gap-8 px-12 py-16"
1240
1240
  }, {
1241
1241
  default: L(() => {
1242
- var s, n, T, R, K, q, k;
1242
+ var s, n, T, A, K, q, k;
1243
1243
  return [
1244
1244
  l("div", $o, [
1245
- l("div", Oo, D(e(u)("inventory.transfer.template.details.templateSummary")), 1),
1246
- l("div", Mo, D(e(u)(
1247
- `inventory.transfer.receiveRequest.details.type.${M.value.toLocaleLowerCase("en-US")}`
1245
+ l("div", Mo, D(e(u)("inventory.transfer.template.details.templateSummary")), 1),
1246
+ l("div", Oo, D(e(u)(
1247
+ `inventory.transfer.receiveRequest.details.type.${O.value.toLocaleLowerCase("en-US")}`
1248
1248
  )), 1)
1249
1249
  ]),
1250
1250
  m(p),
1251
1251
  l("div", Vo, [
1252
1252
  l("div", Do, [
1253
- l("div", Ro, [
1254
- l("div", Ao, D(e(u)("inventory.transfer.receiveRequest.details.createdAt")), 1)
1253
+ l("div", Ao, [
1254
+ l("div", Ro, D(e(u)("inventory.transfer.receiveRequest.details.createdAt")), 1)
1255
1255
  ]),
1256
- l("div", Uo, D(e(ft)(((s = O.template) == null ? void 0 : s._id) ?? "")), 1)
1256
+ l("div", Uo, D(e(ft)(((s = M.template) == null ? void 0 : s._id) ?? "")), 1)
1257
1257
  ]),
1258
1258
  (T = (n = o.value) == null ? void 0 : n.supplier) != null && T.name ? (C(), N("div", Po, [
1259
1259
  l("div", Lo, D(e(u)("inventory.transfer.receiveRequest.details.from")), 1),
1260
- l("div", Bo, D((K = (R = o.value) == null ? void 0 : R.supplier) == null ? void 0 : K.name), 1)
1260
+ l("div", Bo, D((K = (A = o.value) == null ? void 0 : A.supplier) == null ? void 0 : K.name), 1)
1261
1261
  ])) : se("", !0),
1262
1262
  (q = o.value) != null && q.ref ? (C(), N("div", qo, [
1263
1263
  l("div", Eo, D(e(u)("inventory.transfer.receiveRequest.details.reference")), 1),
@@ -1282,10 +1282,10 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1282
1282
  placeholder: "Filter items"
1283
1283
  }, null, 8, ["modelValue"]),
1284
1284
  l("div", Wo, [
1285
- m(f, {
1285
+ m(y, {
1286
1286
  "shrink-at": -1,
1287
1287
  "column-defs": [{ accessorKey: "code" }, { accessorKey: "name" }],
1288
- "row-data": ((W = O.template) == null ? void 0 : W.purchaseOrder.items) ?? [],
1288
+ "row-data": ((W = M.template) == null ? void 0 : W.purchaseOrder.items) ?? [],
1289
1289
  "search-value": a.value,
1290
1290
  "force-mobile-footer": "",
1291
1291
  "hide-header-row": "",
@@ -1324,13 +1324,13 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1324
1324
  b[10] || (b[10] = l("div", null, null, -1)),
1325
1325
  b[11] || (b[11] = l("div", null, null, -1)),
1326
1326
  l("div", sl, [
1327
- (E = O.template) != null && E.locationTags ? (C(), N(me, { key: 0 }, [
1327
+ (E = M.template) != null && E.locationTags ? (C(), N(me, { key: 0 }, [
1328
1328
  b[6] || (b[6] = l("div", { class: "flex flex-col" }, [
1329
1329
  l("div", { class: "fm-typo-en-body-lg-600" }, "Enabled location tags"),
1330
1330
  l("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " This template is enabled for the following location tags. ")
1331
1331
  ], -1)),
1332
1332
  l("div", nl, [
1333
- (C(!0), N(me, null, Te(O.template.locationTags, (s, n) => (C(), ee(V, {
1333
+ (C(!0), N(me, null, Te(M.template.locationTags, (s, n) => (C(), ee(V, {
1334
1334
  label: s,
1335
1335
  key: n
1336
1336
  }, null, 8, ["label"]))), 128))
@@ -1349,7 +1349,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1349
1349
  placeholder: "Filter locations",
1350
1350
  "prepend-icon": "search"
1351
1351
  }, null, 8, ["modelValue"]),
1352
- m(f, {
1352
+ m(y, {
1353
1353
  "hide-footer": "",
1354
1354
  style: { height: "500px" },
1355
1355
  "column-defs": h,
@@ -1377,11 +1377,11 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1377
1377
  }), ul = { class: "flex-1 flex flex-col gap-8" }, dl = { class: "flex flex-col" }, ml = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pl = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, cl = { class: "fm-typo-en-body-lg-400" }, fl = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, yl = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Il = /* @__PURE__ */ ae({
1378
1378
  __name: "TransferTemplateView",
1379
1379
  setup(c) {
1380
- const { t: y } = ue(), { createTemplate: v, viewTemplate: t, importTemplates: r, exportTemplates: u } = Ee(), { templateDialogProps: o, templateDetailsProps: a } = Ne(Ee()), h = Tt(), { loading: _, templates: M } = Ne(h), B = z(!1), I = vt(), $ = Ge(), { breakpoints: w } = wt();
1380
+ const { t: f } = ue(), { createTemplate: v, viewTemplate: t, importTemplates: r, exportTemplates: u } = Ee(), { templateDialogProps: o, templateDetailsProps: a } = Ne(Ee()), h = Tt(), { loading: _, templates: O } = Ne(h), B = z(!1), I = vt(), $ = Ge(), { breakpoints: w } = wt();
1381
1381
  xe(h.fetchTemplates);
1382
- const O = H(
1382
+ const M = H(
1383
1383
  () => B.value || _.value || !$._currentLocation
1384
- ), b = H(() => M.value), p = z(""), d = H(() => w.value.xs || w.value.sm), g = H(() => d.value ? 10 : 20);
1384
+ ), b = H(() => O.value), p = z(""), d = H(() => w.value.xs || w.value.sm), g = H(() => d.value ? 10 : 20);
1385
1385
  function i(F) {
1386
1386
  switch (F) {
1387
1387
  case qe.Add:
@@ -1394,37 +1394,37 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1394
1394
  return u();
1395
1395
  }
1396
1396
  }
1397
- function f(F) {
1397
+ function y(F) {
1398
1398
  return F;
1399
1399
  }
1400
1400
  const V = H(() => [
1401
1401
  {
1402
- label: y("inventory.closing.template.create.title"),
1402
+ label: f("inventory.closing.template.create.title"),
1403
1403
  value: qe.Add,
1404
1404
  isPrimary: !0,
1405
1405
  prependIcon: "add"
1406
1406
  },
1407
1407
  {
1408
- label: "Refresh",
1408
+ label: f("inventory.common.refresh"),
1409
1409
  value: "refresh",
1410
1410
  isPrimary: !1
1411
1411
  },
1412
1412
  {
1413
- label: "Import",
1413
+ label: f("inventory.common.import"),
1414
1414
  value: "import",
1415
1415
  isPrimary: !1
1416
1416
  },
1417
1417
  {
1418
- label: "Export",
1418
+ label: f("inventory.common.export"),
1419
1419
  value: "export",
1420
1420
  isPrimary: !1
1421
1421
  }
1422
1422
  ]);
1423
1423
  return (F, S) => {
1424
- const Z = A("FmTable");
1424
+ const Z = R("FmTable");
1425
1425
  return C(), N(me, null, [
1426
1426
  m(bt, {
1427
- title: e(y)("inventory.transfer.template.title2"),
1427
+ title: e(f)("inventory.transfer.template.title2"),
1428
1428
  actions: V.value,
1429
1429
  "onClick:action": i
1430
1430
  }, {
@@ -1450,7 +1450,7 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1450
1450
  "column-defs": e(h).columnDefs,
1451
1451
  "row-data": b.value,
1452
1452
  "search-value": p.value,
1453
- loading: O.value,
1453
+ loading: M.value,
1454
1454
  key: (W = e($)._currentLocation) == null ? void 0 : W.dbName,
1455
1455
  onRowClick: S[1] || (S[1] = (E) => e(t)(E.original)),
1456
1456
  "page-size": g.value
@@ -1461,14 +1461,14 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1461
1461
  onRowClick: (U) => e(t)(U)
1462
1462
  }, {
1463
1463
  default: L((U) => {
1464
- var s, n, T, R, K, q, k, P, Q, X, oe, x, G, re, we, Fe, Ce, Ie, Se, $e, pe, Oe, Me, Ve, De, ce, Re;
1464
+ var s, n, T, A, K, q, k, P, Q, X, oe, x, G, re, we, Fe, Ce, Ie, Se, $e, pe, Me, Oe, Ve, De, ce, Ae;
1465
1465
  return [
1466
1466
  l("div", ul, [
1467
1467
  l("div", dl, [
1468
1468
  l("div", ml, [
1469
1469
  m(e(J), {
1470
1470
  render: (T = (n = (s = U._id) == null ? void 0 : s.column) == null ? void 0 : n.columnDef) == null ? void 0 : T.cell,
1471
- props: (K = (R = U._id) == null ? void 0 : R.getContext) == null ? void 0 : K.call(R)
1471
+ props: (K = (A = U._id) == null ? void 0 : A.getContext) == null ? void 0 : K.call(A)
1472
1472
  }, null, 8, ["render", "props"])
1473
1473
  ]),
1474
1474
  l("div", pl, [
@@ -1488,14 +1488,14 @@ const Kt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
1488
1488
  l("div", yl, [
1489
1489
  m(e(J), {
1490
1490
  render: ($e = (Se = (Ie = U.ref) == null ? void 0 : Ie.column) == null ? void 0 : Se.columnDef) == null ? void 0 : $e.cell,
1491
- props: (Oe = (pe = U.ref) == null ? void 0 : pe.getContext) == null ? void 0 : Oe.call(pe)
1491
+ props: (Me = (pe = U.ref) == null ? void 0 : pe.getContext) == null ? void 0 : Me.call(pe)
1492
1492
  }, null, 8, ["render", "props"])
1493
1493
  ])
1494
1494
  ]),
1495
1495
  l("div", null, [
1496
1496
  m(e(J), {
1497
- render: (De = (Ve = (Me = U.type) == null ? void 0 : Me.column) == null ? void 0 : Ve.columnDef) == null ? void 0 : De.cell,
1498
- props: (Re = (ce = U.type) == null ? void 0 : ce.getContext) == null ? void 0 : Re.call(ce)
1497
+ render: (De = (Ve = (Oe = U.type) == null ? void 0 : Oe.column) == null ? void 0 : Ve.columnDef) == null ? void 0 : De.cell,
1498
+ props: (Ae = (ce = U.type) == null ? void 0 : ce.getContext) == null ? void 0 : Ae.call(ce)
1499
1499
  }, null, 8, ["render", "props"])
1500
1500
  ])
1501
1501
  ])