@feedmepos/mf-inventory-portal 0.0.23-dev.42 → 0.0.23-dev.44

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 (61) hide show
  1. package/dist/{App-Cr-n7HVf.js → App-Bu28H-qV.js} +66 -63
  2. package/dist/{ApprovalView-BYHDmt9W.js → ApprovalView-Cgb6Getu.js} +20 -20
  3. package/dist/{BindingsDialog-CI0nYM1_.js → BindingsDialog-DGtPuzr1.js} +2 -2
  4. package/dist/{BindingsPicker-BVzF3C8O.js → BindingsPicker-BamL3_Vk.js} +3 -3
  5. package/dist/{BindingsTable-B21_9L2o.js → BindingsTable-C9FeglE4.js} +1 -1
  6. package/dist/{ClosingDraftView-k2Vsz8-W.js → ClosingDraftView-C_B1u3g1.js} +47 -47
  7. package/dist/{ClosingTemplateView-BLda7tYC.js → ClosingTemplateView-BxK3yAV4.js} +21 -21
  8. package/dist/{FmCustomAttribute.vue_vue_type_script_setup_true_lang-DUDOaU6F.js → FmCustomAttribute.vue_vue_type_script_setup_true_lang-DAWPJ65s.js} +11 -11
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CXuer_x5.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D1PU7pae.js} +7 -7
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-Ds3yBf9U.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D1AIFe-0.js} +37 -37
  11. package/dist/{IngredientGroupView-CgZ4YT3i.js → IngredientGroupView-S7ps5Bsc.js} +1 -1
  12. package/dist/{IngredientsView-tPERrF9O.js → IngredientsView-BesGBkXM.js} +14 -15
  13. package/dist/{IntegrationView-CoF_rdWv.js → IntegrationView-Bkf7zGLw.js} +1 -1
  14. package/dist/{InventoryBindingForm-BSnofTIL.js → InventoryBindingForm-DHwTsR2G.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-4d9oz7Xh.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CseHejfD.js} +51 -51
  16. package/dist/{InventoryBindingSummary-qm9ZUFny.js → InventoryBindingSummary-COybHYsZ.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CQY98Hj6.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Cgv6gv2x.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-NUkiVop4.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BGJNkqYH.js} +6 -6
  19. package/dist/PublishView-2EcaLsU2.js +192 -0
  20. package/dist/{PurchaseOrderPrintPreview-CIWiq2NB.js → PurchaseOrderPrintPreview-DPFfFQQd.js} +5 -5
  21. package/dist/ReceiveRequestView-Dnl79p8h.js +1843 -0
  22. package/dist/{RecipeView-CzWlx1Xv.js → RecipeView-CmaMGv6N.js} +25 -25
  23. package/dist/{StockView-IPXGJNN8.js → StockView-CLw8un14.js} +121 -122
  24. package/dist/{SupplierView-DuL3NXc0.js → SupplierView-DLcZ6HDt.js} +11 -12
  25. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-82Bu89OE.js → TransferDetails.vue_vue_type_script_setup_true_lang-DgwS1KTx.js} +137 -137
  26. package/dist/{TransferTemplateView-BEaRafuO.js → TransferTemplateView-BRDq2_Zw.js} +81 -82
  27. package/dist/{UnitView-Cwo0mthQ.js → UnitView-rJrXqu8W.js} +14 -14
  28. package/dist/{WarehouseView-DzjQrpyv.js → WarehouseView-BwSLmicZ.js} +33 -33
  29. package/dist/api/inventory.d.ts +4 -0
  30. package/dist/{app-CpuFfqWF.js → app-F909rQ5n.js} +12512 -11478
  31. package/dist/app.d.ts +24 -0
  32. package/dist/app.js +1 -1
  33. package/dist/{decimal-bSGrDlvd.js → decimal-0pQSNdVz.js} +1 -1
  34. package/dist/{format-unit-display-D4gi2D-O.js → format-unit-display-CM40cl03.js} +60 -60
  35. package/dist/{index-Cn1ato-l.js → index-DzA11XLY.js} +88 -88
  36. package/dist/{index-COeURijn.js → index-rBUXpqWE.js} +3 -3
  37. package/dist/layout/SingleColumnLayout.vue.d.ts +1 -0
  38. package/dist/router/name.d.ts +1 -0
  39. package/dist/{stock-B1Rchi6n.js → stock-c68S1hmD.js} +3 -3
  40. package/dist/stores/feature.d.ts +34 -2
  41. package/dist/stores/location.d.ts +29 -1
  42. package/dist/{supplier-CeY_Gro-.js → supplier-CPuz6JVf.js} +1 -1
  43. package/dist/tsconfig.app.tsbuildinfo +1 -1
  44. package/dist/{use-inventory-binding-dialog-BXqY40wn.js → use-inventory-binding-dialog-DjlU5nUb.js} +1 -1
  45. package/dist/views/adjustment-template/wastage-template/actions.d.ts +48 -0
  46. package/dist/views/adjustment-template/wastage-template/table.d.ts +48 -0
  47. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +8 -0
  48. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +48 -0
  49. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +48 -0
  50. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +48 -0
  51. package/dist/views/publish/PublishView.vue.d.ts +2 -0
  52. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +16 -0
  53. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +24 -0
  54. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +24 -0
  55. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +4 -0
  56. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -0
  57. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -0
  58. package/dist/vue-i18n-BiavdzKQ.js +2365 -0
  59. package/package.json +1 -1
  60. package/dist/ReceiveRequestView-Dgt3FeGb.js +0 -4205
  61. package/dist/feature-D8aRYGen.js +0 -962
@@ -1,14 +1,13 @@
1
- import { defineComponent as J, onMounted as ce, computed as R, ref as E, watch as pe, inject as Ze, resolveComponent as V, openBlock as D, createElementBlock as K, createElementVNode as t, createVNode as c, withCtx as q, renderSlot as Oe, withDirectives as Ve, normalizeClass as ie, vModelText as Ae, reactive as Je, h as Z, toDisplayString as O, unref as e, createBlock as W, mergeProps as Ee, isRef as Ue, createCommentVNode as Y, Fragment as qe, renderList as Xe, normalizeStyle as Ye, Teleport as et, normalizeProps as tt, guardReactiveProps as ot } from "vue";
2
- import { G as Ne, ax as ue, t as De, I as st, ay as lt, az as nt, i as G, aA as at, b as ze, Z as Re, l as me, a as He, O as re, K as rt, A as de, M as it, E as Q, u as je, ab as ut, B as Qe, H as mt, J as dt, d as ee, aB as ne, a8 as ct, a0 as pt, y as ft, h as Pe, _ as yt, z as vt } from "./app-CpuFfqWF.js";
1
+ import { defineComponent as Z, onMounted as ce, computed as R, ref as E, watch as pe, inject as Je, resolveComponent as V, openBlock as D, createElementBlock as K, createElementVNode as t, createVNode as c, withCtx as q, renderSlot as Oe, withDirectives as Ve, normalizeClass as ie, vModelText as Ae, reactive as Ze, h as J, toDisplayString as O, unref as e, createBlock as W, mergeProps as Ee, isRef as Ue, createCommentVNode as Y, Fragment as qe, renderList as Xe, normalizeStyle as Ye, Teleport as et, normalizeProps as tt, guardReactiveProps as ot } from "vue";
2
+ import { H as Ne, ay as ue, t as De, I as st, az as lt, aA as nt, j as G, aB as at, b as ze, $ as Re, m as me, a as He, P as re, L as rt, A as de, M as it, c as je, G as Q, u as Qe, ac as ut, E as Ke, J as mt, K as dt, e as ee, aC as ne, a9 as ct, a1 as pt, z as ft, i as Pe, _ as yt, B as vt } from "./app-F909rQ5n.js";
3
3
  import { useI18n as X } from "@feedmepos/mf-common";
4
- import { P as H, a as bt, f as xt, t as _t, b as Le, u as ht } from "./format-unit-display-D4gi2D-O.js";
5
- import { components as ae, useDialog as gt, useSnackbar as Tt, useProxiedModel as Ke, useBreakpoints as Ft } from "@feedmepos/ui-library";
4
+ import { P as H, a as bt, f as xt, t as _t, b as Le, u as ht } from "./format-unit-display-CM40cl03.js";
5
+ import { components as ae, useDialog as gt, useSnackbar as Tt, useProxiedModel as Ge, useBreakpoints as Ft } from "@feedmepos/ui-library";
6
6
  import { storeToRefs as Be } from "pinia";
7
- import { _ as wt, b as kt, F as St, a as Ct } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-Ds3yBf9U.js";
8
- import { u as Ge } from "./feature-D8aRYGen.js";
9
- import { c as Mt, u as $t, _ as It } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CXuer_x5.js";
10
- import { u as Ot } from "./supplier-CeY_Gro-.js";
11
- const Vt = { class: "flex flex-col" }, At = { class: "flex flex-col" }, Dt = { class: "flex-1" }, Rt = { class: "flex items-center" }, Pt = { class: "flex-1" }, Lt = { class: "flex-1" }, Bt = /* @__PURE__ */ J({
7
+ import { _ as wt, b as kt, F as Ct, a as St } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-D1AIFe-0.js";
8
+ import { c as Mt, u as $t, _ as It } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D1PU7pae.js";
9
+ import { u as Ot } from "./supplier-CPuz6JVf.js";
10
+ const Vt = { class: "flex flex-col" }, At = { class: "flex flex-col" }, Dt = { class: "flex-1" }, Rt = { class: "flex items-center" }, Pt = { class: "flex-1" }, Lt = { class: "flex-1" }, Bt = /* @__PURE__ */ Z({
12
11
  __name: "FmMinMaxInput",
13
12
  props: {
14
13
  rules: {},
@@ -57,14 +56,14 @@ const Vt = { class: "flex flex-col" }, At = { class: "flex flex-col" }, Dt = { c
57
56
  const m = R(() => {
58
57
  const { min: p, max: r } = u ?? {};
59
58
  return Math.max((p == null ? void 0 : p.precision) ?? 0, (r == null ? void 0 : r.precision) ?? 0, x.precision ?? 0);
60
- }), S = (p) => {
59
+ }), C = (p) => {
61
60
  if (!p) return "";
62
61
  const r = lt(p), b = m.value, a = ue(r, b);
63
62
  return nt(
64
63
  +G(a),
65
64
  a.precision
66
65
  );
67
- }, i = E(S(u.min)), l = E(S(u.max));
66
+ }, i = E(C(u.min)), l = E(C(u.max));
68
67
  pe([i, l], ([p, r]) => {
69
68
  const b = u ?? {}, a = o(p), f = o(r), w = m.value;
70
69
  if (p !== "" && a === !0) {
@@ -79,7 +78,7 @@ const Vt = { class: "flex flex-col" }, At = { class: "flex flex-col" }, Dt = { c
79
78
  b.max = null;
80
79
  u.min = b.min, u.max = b.max;
81
80
  });
82
- const d = Symbol.for("fm:form-state"), k = Ze(d, null), h = R(() => x.disabled ?? (k == null ? void 0 : k.getDisabled()) ?? !1), A = E(), F = E(), v = E(!1), g = E(!1), I = R(() => v.value || g.value), B = R(() => [...[
81
+ const d = Symbol.for("fm:form-state"), k = Je(d, null), h = R(() => x.disabled ?? (k == null ? void 0 : k.getDisabled()) ?? !1), A = E(), F = E(), v = E(!1), g = E(!1), I = R(() => v.value || g.value), B = R(() => [...[
83
82
  function() {
84
83
  return typeof o(i.value) == "string" || typeof o(l.value) == "string" ? "Must be a number" : !0;
85
84
  },
@@ -171,13 +170,13 @@ function Ut(y, x) {
171
170
  function qt(y) {
172
171
  const x = at(y), u = G(y);
173
172
  return function(m) {
174
- const S = !(m != null && m.min) || x(m.min) === !0, i = !(m != null && m.max) || x(m.max) === !0;
175
- return !S && !i ? `Min & max must be a multiple of ${u}` : S ? i ? !0 : `Max must be a multiple of ${u}` : `Min must be a multiple of ${u}`;
173
+ const C = !(m != null && m.min) || x(m.min) === !0, i = !(m != null && m.max) || x(m.max) === !0;
174
+ return !C && !i ? `Min & max must be a multiple of ${u}` : C ? i ? !0 : `Max must be a multiple of ${u}` : `Min must be a multiple of ${u}`;
176
175
  };
177
176
  }
178
177
  var L = /* @__PURE__ */ ((y) => (y.Code = "Code", y.Name = "Name", y.DefaultAmount = "DefaultAmount", y.Limit = "Limit", y.MinimumAmount = "MinimumAmount", y.Step = "Step", y.Cost = "Cost", y.Delete = "Delete", y))(L || {});
179
178
  function Nt(y) {
180
- const { t: x } = X(), u = ze(), o = Je({});
179
+ const { t: x } = X(), u = ze(), o = Ze({});
181
180
  ce(() => {
182
181
  for (const i of y.items) {
183
182
  if (!i.totalCost)
@@ -196,7 +195,7 @@ function Nt(y) {
196
195
  size: 180,
197
196
  cell(i) {
198
197
  const l = i.row.original;
199
- return Z(ae.FmTextField, {
198
+ return J(ae.FmTextField, {
200
199
  modelValue: l.code,
201
200
  "onUpdate:modelValue": (d) => {
202
201
  y.updateItem({
@@ -217,7 +216,7 @@ function Nt(y) {
217
216
  minSize: 300,
218
217
  cell(i) {
219
218
  const l = i.row.original;
220
- return Z(ae.FmTextField, {
219
+ return J(ae.FmTextField, {
221
220
  modelValue: l.name,
222
221
  "onUpdate:modelValue": (d) => {
223
222
  y.updateItem({
@@ -242,7 +241,7 @@ function Nt(y) {
242
241
  var I;
243
242
  return ((I = l.measurement) == null ? void 0 : I.id) === g.id;
244
243
  }), F = l.sku.unit._id !== k.unit._id || !h || l.measurement && !A;
245
- return Z(wt, {
244
+ return J(wt, {
246
245
  style: {
247
246
  flex: "1 1 0%"
248
247
  },
@@ -271,7 +270,7 @@ function Nt(y) {
271
270
  },
272
271
  rules: [
273
272
  kt(l.quantityStep),
274
- St(
273
+ Ct(
275
274
  +G(
276
275
  l.minimumQuantity ?? {
277
276
  amount: 1,
@@ -280,7 +279,7 @@ function Nt(y) {
280
279
  }
281
280
  )
282
281
  ),
283
- Ct(
282
+ St(
284
283
  l.maximumQuantity ? +G(l.maximumQuantity) : 1 / 0
285
284
  ),
286
285
  function(I) {
@@ -299,7 +298,7 @@ function Nt(y) {
299
298
  minSize: 280,
300
299
  cell(i) {
301
300
  const l = i.row.original;
302
- return Z(Bt, {
301
+ return J(Bt, {
303
302
  style: {
304
303
  flex: "1 1 0%"
305
304
  },
@@ -336,7 +335,7 @@ function Nt(y) {
336
335
  minSize: 100,
337
336
  cell(i) {
338
337
  const l = i.row.original;
339
- return Z(ae.FmTextField, {
338
+ return J(ae.FmTextField, {
340
339
  modelValue: G(l.quantityStep ?? Re.reset(), !1),
341
340
  key: l.sku._id,
342
341
  "onUpdate:modelValue": (d) => {
@@ -361,7 +360,7 @@ function Nt(y) {
361
360
  header: "",
362
361
  cell(i) {
363
362
  const l = i.row.original;
364
- return Z(ae.FmButton, {
363
+ return J(ae.FmButton, {
365
364
  class: "delete-button",
366
365
  key: l.sku._id,
367
366
  type: "button",
@@ -383,10 +382,10 @@ function Nt(y) {
383
382
  }
384
383
  ];
385
384
  return {
386
- columnDefs: R(() => Ge().enableTotalCost && y.transferType === H.PURCHASE ? m : m.filter((l) => l.id !== "Cost"))
385
+ columnDefs: R(() => je().enableTotalCost && y.transferType === H.PURCHASE ? m : m.filter((l) => l.id !== "Cost"))
387
386
  };
388
387
  }
389
- const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-center" }, jt = { class: "flex-1 flex gap-1 items-center" }, Qt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Kt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Gt = { class: "flex gap-8 w-full" }, Wt = { class: "flex-1 flex flex-col gap-4" }, Zt = { class: "flex-1 flex flex-col gap-4" }, Jt = { class: "flex gap-8 w-full" }, Xt = { class: "flex-1 flex flex-col gap-4" }, Yt = { class: "flex-1 flex flex-col gap-4" }, eo = { class: "flex gap-8 w-full" }, to = { class: "flex-1 flex flex-col gap-4" }, oo = /* @__PURE__ */ J({
388
+ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-center" }, jt = { class: "flex-1 flex gap-1 items-center" }, Qt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Kt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Gt = { class: "flex gap-8 w-full" }, Wt = { class: "flex-1 flex flex-col gap-4" }, Jt = { class: "flex-1 flex flex-col gap-4" }, Zt = { class: "flex gap-8 w-full" }, Xt = { class: "flex-1 flex flex-col gap-4" }, Yt = { class: "flex-1 flex flex-col gap-4" }, eo = { class: "flex gap-8 w-full" }, to = { class: "flex-1 flex flex-col gap-4" }, oo = /* @__PURE__ */ Z({
390
389
  __name: "TransferTemplateItem",
391
390
  props: {
392
391
  cellByColId: {},
@@ -395,7 +394,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
395
394
  setup(y) {
396
395
  const { t: x } = X();
397
396
  return (u, o) => {
398
- var S, i, l, d, k, h, A, F, v, g, I, B, p, r, b, a, f, w, s, n, C, $, M, _, P, U, N, j, T, z;
397
+ var C, i, l, d, k, h, A, F, v, g, I, B, p, r, b, a, f, w, s, n, S, $, M, _, P, U, N, j, T, z;
399
398
  const m = V("FmLabel");
400
399
  return D(), K("div", zt, [
401
400
  t("div", Ht, [
@@ -405,7 +404,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
405
404
  ]),
406
405
  t("div", null, [
407
406
  c(e(Q), {
408
- render: (l = (i = (S = u.cellByColId.Delete) == null ? void 0 : S.column) == null ? void 0 : i.columnDef) == null ? void 0 : l.cell,
407
+ render: (l = (i = (C = u.cellByColId.Delete) == null ? void 0 : C.column) == null ? void 0 : i.columnDef) == null ? void 0 : l.cell,
409
408
  props: (k = (d = u.cellByColId.Delete) == null ? void 0 : d.getContext) == null ? void 0 : k.call(d)
410
409
  }, null, 8, ["render", "props"])
411
410
  ])
@@ -421,7 +420,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
421
420
  }, null, 8, ["render", "props"]),
422
421
  o[0] || (o[0] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
423
422
  ]),
424
- t("div", Zt, [
423
+ t("div", Jt, [
425
424
  c(m, {
426
425
  label: e(x)(`inventory.transfer.form.items.table.${e(L).Name}`)
427
426
  }, null, 8, ["label"]),
@@ -432,7 +431,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
432
431
  o[1] || (o[1] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
433
432
  ])
434
433
  ]),
435
- t("div", Jt, [
434
+ t("div", Zt, [
436
435
  t("div", Xt, [
437
436
  c(m, {
438
437
  label: e(x)(`inventory.transfer.form.items.table.${e(L).DefaultAmount}`)
@@ -448,7 +447,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
448
447
  label: e(x)(`inventory.transfer.form.items.table.${e(L).Step}`)
449
448
  }, null, 8, ["label"]),
450
449
  c(e(Q), {
451
- render: (M = ($ = (C = u.cellByColId[e(L).Step]) == null ? void 0 : C.column) == null ? void 0 : $.columnDef) == null ? void 0 : M.cell,
450
+ render: (M = ($ = (S = u.cellByColId[e(L).Step]) == null ? void 0 : S.column) == null ? void 0 : $.columnDef) == null ? void 0 : M.cell,
452
451
  props: (P = (_ = u.cellByColId[e(L).Step]) == null ? void 0 : _.getContext) == null ? void 0 : P.call(_)
453
452
  }, null, 8, ["render", "props"]),
454
453
  o[3] || (o[3] = t("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
@@ -469,20 +468,20 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
469
468
  ]);
470
469
  };
471
470
  }
472
- }), so = { class: "flex flex-col gap-16" }, lo = { class: "flex flex-col gap-24" }, no = { class: "flex flex-col gap-16" }, ao = { class: "flex items-center" }, ro = { class: "flex flex-col" }, io = { class: "flex flex-col gap-16" }, uo = { class: "flex" }, mo = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, co = /* @__PURE__ */ J({
471
+ }), so = { class: "flex flex-col gap-16" }, lo = { class: "flex flex-col gap-24" }, no = { class: "flex flex-col gap-16" }, ao = { class: "flex items-center" }, ro = { class: "flex flex-col" }, io = { class: "flex flex-col gap-16" }, uo = { class: "flex" }, mo = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, co = /* @__PURE__ */ Z({
473
472
  __name: "TransferTemplateForm",
474
473
  props: {
475
474
  modelValue: {},
476
475
  disabled: { type: Boolean }
477
476
  },
478
477
  setup(y, { expose: x }) {
479
- const u = y, o = Ne(), { t: m } = X(), S = je(), i = He(), l = Ot(), d = ze();
478
+ const u = y, o = Ne(), { t: m } = X(), C = Qe(), i = He(), l = Ot(), d = ze();
480
479
  pe(
481
480
  () => u.modelValue,
482
481
  (s) => {
483
482
  console.log("TransferTemplateForm.model", s);
484
483
  }
485
- ), S.watchLocation(async () => {
484
+ ), C.watchLocation(async () => {
486
485
  location && (o.purchaseOrder.supplier || (o.purchaseOrder.supplier = l.suppliers.find((s) => s) ?? o.purchaseOrder.supplier));
487
486
  });
488
487
  const k = gt(), h = $t(
@@ -499,8 +498,8 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
499
498
  return typeof ((n = (s = o.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : n.internal) == "string" ? H.TRANSFER : H.PURCHASE;
500
499
  },
501
500
  set(s) {
502
- var C, $;
503
- const n = typeof (($ = (C = o.purchaseOrder) == null ? void 0 : C.supplier) == null ? void 0 : $.internal) == "string" ? H.TRANSFER : H.PURCHASE;
501
+ var S, $;
502
+ const n = typeof (($ = (S = o.purchaseOrder) == null ? void 0 : S.supplier) == null ? void 0 : $.internal) == "string" ? H.TRANSFER : H.PURCHASE;
504
503
  s !== n && (o.purchaseOrder.supplier = s === H.PURCHASE ? h.locationOptionsTypePurchase.value[0] : h.locationOptionsTypeTransfer.value[0]);
505
504
  }
506
505
  }), F = R(() => h.transferLocationOptions.value), v = R({
@@ -525,9 +524,9 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
525
524
  });
526
525
  function p() {
527
526
  var s, n;
528
- return (s = o.locations) != null && s.find((C) => {
527
+ return (s = o.locations) != null && s.find((S) => {
529
528
  var $, M;
530
- return (($ = C.doc) == null ? void 0 : $._id) === ((M = o.purchaseOrder.supplier) == null ? void 0 : M._id);
529
+ return (($ = S.doc) == null ? void 0 : $._id) === ((M = o.purchaseOrder.supplier) == null ? void 0 : M._id);
531
530
  }) ? `Location ${(n = o.purchaseOrder.supplier) == null ? void 0 : n.name} must be removed because template cannot be used to transfer to itself.` : !0;
532
531
  }
533
532
  const r = R({
@@ -575,14 +574,14 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
575
574
  }
576
575
  }), f = R(() => a.columnDefs.value);
577
576
  function w() {
578
- const s = i.skus.map((C) => ({
579
- label: C.name,
580
- sublabel: C.code,
581
- value: C
582
- })), n = s.filter((C) => {
577
+ const s = i.skus.map((S) => ({
578
+ label: S.name,
579
+ sublabel: S.code,
580
+ value: S
581
+ })), n = s.filter((S) => {
583
582
  var $;
584
- return ($ = o.purchaseOrder.items) == null ? void 0 : $.find((M) => M.sku._id === C.value._id);
585
- }).map((C) => C.value);
583
+ return ($ = o.purchaseOrder.items) == null ? void 0 : $.find((M) => M.sku._id === S.value._id);
584
+ }).map((S) => S.value);
586
585
  k.open({
587
586
  title: m("inventory.transfer.form.items.selectItem"),
588
587
  closeButton: !0,
@@ -601,8 +600,8 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
601
600
  close: !0,
602
601
  variant: "tertiary"
603
602
  }
604
- }).onPrimary((C) => {
605
- const $ = o.purchaseOrder.items ?? [], M = C.map((_) => {
603
+ }).onPrimary((S) => {
604
+ const $ = o.purchaseOrder.items ?? [], M = S.map((_) => {
606
605
  const P = $.find((T) => T.sku._id === _._id);
607
606
  if (P)
608
607
  return P;
@@ -629,7 +628,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
629
628
  });
630
629
  }
631
630
  return (s, n) => {
632
- const C = V("FmTextField"), $ = V("FmSelect"), M = V("FmTextarea"), _ = V("FmButton"), P = V("FmTable"), U = V("FmFormGroup"), N = V("FmForm");
631
+ const S = V("FmTextField"), $ = V("FmSelect"), M = V("FmTextarea"), _ = V("FmButton"), P = V("FmTable"), U = V("FmFormGroup"), N = V("FmForm");
633
632
  return D(), W(N, {
634
633
  ref_key: "formRef",
635
634
  ref: b,
@@ -641,7 +640,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
641
640
  return [
642
641
  t("div", so, [
643
642
  t("div", lo, [
644
- c(C, {
643
+ c(S, {
645
644
  label: e(m)("inventory.transfer.form.name"),
646
645
  "label-mark": "required",
647
646
  modelValue: e(o).name,
@@ -685,7 +684,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
685
684
  }),
686
685
  _: 1
687
686
  }, 8, ["label", "modelValue", "items"]),
688
- c(C, {
687
+ c(S, {
689
688
  label: e(m)("inventory.transfer.form.reference"),
690
689
  "label-mark": "optional",
691
690
  modelValue: e(o).purchaseOrder.ref,
@@ -751,7 +750,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
751
750
  "page-size": e(o).purchaseOrder.items.length
752
751
  }, {
753
752
  "list-row": q((T) => [
754
- (D(), W(Qe, {
753
+ (D(), W(Ke, {
755
754
  row: T,
756
755
  key: e(o).purchaseOrder.items.map((z) => z.sku._id).join(".")
757
756
  }, {
@@ -777,7 +776,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
777
776
  }, 8, ["disabled"]);
778
777
  };
779
778
  }
780
- }), po = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-800" }, yo = { class: "flex gap-4" }, vo = /* @__PURE__ */ J({
779
+ }), po = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-800" }, yo = { class: "flex gap-4" }, vo = /* @__PURE__ */ Z({
781
780
  __name: "TransferTemplateDialog",
782
781
  props: {
783
782
  mode: {},
@@ -787,7 +786,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
787
786
  emits: ["update:show", "submitted"],
788
787
  setup(y, { expose: x, emit: u }) {
789
788
  var b;
790
- const o = y, m = u, S = bt(), i = Tt(), { t: l } = X(), d = Ke(o, "show");
789
+ const o = y, m = u, C = bt(), i = Tt(), { t: l } = X(), d = Ge(o, "show");
791
790
  function k() {
792
791
  return {
793
792
  _id: "",
@@ -859,7 +858,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
859
858
  ({ totalCost: s, ...n }) => n
860
859
  ));
861
860
  try {
862
- await S.createTemplate(a), await new Promise((s) => setTimeout(s, 1e3)), i.open({
861
+ await C.createTemplate(a), await new Promise((s) => setTimeout(s, 1e3)), i.open({
863
862
  title: l("inventory.transfer.template.create.success"),
864
863
  message: l("inventory.transfer.template.create.successMessage"),
865
864
  type: "success"
@@ -883,7 +882,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
883
882
  ({ totalCost: s, ...n }) => n
884
883
  ));
885
884
  try {
886
- await S.updateTemplate(a), await new Promise((s) => setTimeout(s, 1e3)), i.open({
885
+ await C.updateTemplate(a), await new Promise((s) => setTimeout(s, 1e3)), i.open({
887
886
  title: l("inventory.transfer.template.update.success"),
888
887
  message: l("inventory.transfer.template.update.successMessage"),
889
888
  type: "success"
@@ -956,10 +955,10 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
956
955
  }, 8, ["modelValue"]);
957
956
  };
958
957
  }
959
- }), bo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, xo = { class: "flex justify-between" }, _o = { class: "fm-typo-en-body-lg-600" }, ho = { class: "fm-status-badge fm-status-badge-info-secondary" }, go = { class: "flex flex-col gap-8" }, To = { class: "flex flex-col gap-4" }, Fo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, wo = { class: "flex gap-1" }, ko = { class: "fm-typo-en-body-lg-600" }, So = {
958
+ }), bo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, xo = { class: "flex justify-between" }, _o = { class: "fm-typo-en-body-lg-600" }, ho = { class: "fm-status-badge fm-status-badge-info-secondary" }, go = { class: "flex flex-col gap-8" }, To = { class: "flex flex-col gap-4" }, Fo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, wo = { class: "flex gap-1" }, ko = { class: "fm-typo-en-body-lg-600" }, Co = {
960
959
  key: 0,
961
960
  class: "flex flex-col gap-4"
962
- }, Co = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Mo = { class: "fm-typo-en-body-lg-600" }, $o = {
961
+ }, So = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Mo = { class: "fm-typo-en-body-lg-600" }, $o = {
963
962
  key: 1,
964
963
  class: "flex flex-col gap-4"
965
964
  }, Io = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Oo = { class: "fm-typo-en-body-lg-600" }, Vo = {
@@ -971,7 +970,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
971
970
  }, Ho = {
972
971
  key: 0,
973
972
  class: "flex gap-4 items-center"
974
- }, jo = { class: "flex flex-col gap-12" }, Qo = { class: "flex flex-col gap-8" }, Ko = { class: "flex gap-8 xs:flex-col" }, Go = /* @__PURE__ */ J({
973
+ }, jo = { class: "flex flex-col gap-12" }, Qo = { class: "flex flex-col gap-8" }, Ko = { class: "flex gap-8 xs:flex-col" }, Go = /* @__PURE__ */ Z({
975
974
  __name: "TransferTemplateDetails",
976
975
  props: {
977
976
  template: {},
@@ -979,7 +978,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
979
978
  },
980
979
  emits: ["update:show", "action:edit"],
981
980
  setup(y, { emit: x }) {
982
- const u = y, o = x, m = Ge(), { t: S } = X(), i = R(() => {
981
+ const u = y, o = x, m = je(), { t: C } = X(), i = R(() => {
983
982
  var F;
984
983
  return (F = u.template) == null ? void 0 : F.purchaseOrder;
985
984
  }), l = [
@@ -990,12 +989,12 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
990
989
  var F, v, g, I;
991
990
  return ((v = (F = i.value) == null ? void 0 : F.supplier) == null ? void 0 : v.internal) === "restaurant" || ((I = (g = i.value) == null ? void 0 : g.supplier) == null ? void 0 : I.internal) === "warehouse" ? H.TRANSFER : H.PURCHASE;
992
991
  }
993
- ), h = E(!0), A = Ke(u, "show");
992
+ ), h = E(!0), A = Ge(u, "show");
994
993
  return (F, v) => {
995
994
  var f;
996
995
  const g = V("FmMenuDivider"), I = V("FmCard"), B = V("FmIcon"), p = V("FmTextField"), r = V("FmTable"), b = V("FmButton"), a = V("FmSideSheet");
997
996
  return D(), W(a, {
998
- header: e(S)("inventory.transfer.template.details.view", { template: (f = F.template) == null ? void 0 : f.name }),
997
+ header: e(C)("inventory.transfer.template.details.view", { template: (f = F.template) == null ? void 0 : f.name }),
999
998
  modelValue: e(A),
1000
999
  "onUpdate:modelValue": v[2] || (v[2] = (w) => Ue(A) ? A.value = w : null),
1001
1000
  "dismiss-away": h.value,
@@ -1012,11 +1011,11 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
1012
1011
  class: "flex flex-col gap-8 px-12 py-16"
1013
1012
  }, {
1014
1013
  default: q(() => {
1015
- var n, C, $, M, _, P, U;
1014
+ var n, S, $, M, _, P, U;
1016
1015
  return [
1017
1016
  t("div", xo, [
1018
- t("div", _o, O(e(S)("inventory.transfer.template.details.templateSummary")), 1),
1019
- t("div", ho, O(e(S)(
1017
+ t("div", _o, O(e(C)("inventory.transfer.template.details.templateSummary")), 1),
1018
+ t("div", ho, O(e(C)(
1020
1019
  `inventory.transfer.receiveRequest.details.type.${k.value.toLocaleLowerCase("en-US")}`
1021
1020
  )), 1)
1022
1021
  ]),
@@ -1024,20 +1023,20 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
1024
1023
  t("div", go, [
1025
1024
  t("div", To, [
1026
1025
  t("div", Fo, [
1027
- t("div", wo, O(e(S)("inventory.transfer.receiveRequest.details.createdAt")), 1)
1026
+ t("div", wo, O(e(C)("inventory.transfer.receiveRequest.details.createdAt")), 1)
1028
1027
  ]),
1029
1028
  t("div", ko, O(e(ct)(((n = F.template) == null ? void 0 : n._id) ?? "")), 1)
1030
1029
  ]),
1031
- ($ = (C = i.value) == null ? void 0 : C.supplier) != null && $.name ? (D(), K("div", So, [
1032
- t("div", Co, O(e(S)("inventory.transfer.receiveRequest.details.from")), 1),
1030
+ ($ = (S = i.value) == null ? void 0 : S.supplier) != null && $.name ? (D(), K("div", Co, [
1031
+ t("div", So, O(e(C)("inventory.transfer.receiveRequest.details.from")), 1),
1033
1032
  t("div", Mo, O((_ = (M = i.value) == null ? void 0 : M.supplier) == null ? void 0 : _.name), 1)
1034
1033
  ])) : Y("", !0),
1035
1034
  (P = i.value) != null && P.ref ? (D(), K("div", $o, [
1036
- t("div", Io, O(e(S)("inventory.transfer.receiveRequest.details.reference")), 1),
1035
+ t("div", Io, O(e(C)("inventory.transfer.receiveRequest.details.reference")), 1),
1037
1036
  t("div", Oo, O(i.value.ref), 1)
1038
1037
  ])) : Y("", !0),
1039
1038
  (U = i.value) != null && U.remark ? (D(), K("div", Vo, [
1040
- t("div", Ao, O(e(S)("inventory.transfer.receiveRequest.details.remark")), 1),
1039
+ t("div", Ao, O(e(C)("inventory.transfer.receiveRequest.details.remark")), 1),
1041
1040
  t("div", Do, O(i.value.remark), 1)
1042
1041
  ])) : Y("", !0)
1043
1042
  ])
@@ -1048,7 +1047,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
1048
1047
  ]),
1049
1048
  t("div", Ro, [
1050
1049
  t("div", Po, [
1051
- t("div", Lo, O(e(S)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
1050
+ t("div", Lo, O(e(C)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
1052
1051
  (D(!0), K(qe, null, Xe(((w = i.value) == null ? void 0 : w.items) ?? [], (n) => (D(), K("div", {
1053
1052
  key: n.code,
1054
1053
  class: "flex flex-col"
@@ -1102,7 +1101,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
1102
1101
  "side-sheet-footer": q(() => [
1103
1102
  t("div", Ko, [
1104
1103
  c(b, {
1105
- label: e(S)("common.edit"),
1104
+ label: e(C)("common.edit"),
1106
1105
  onClick: v[1] || (v[1] = (w) => o("action:edit")),
1107
1106
  variant: "tertiary"
1108
1107
  }, null, 8, ["label"])
@@ -1112,10 +1111,10 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
1112
1111
  }, 8, ["header", "modelValue", "dismiss-away"]);
1113
1112
  };
1114
1113
  }
1115
- }), Wo = { class: "flex-1 flex flex-col gap-8" }, Zo = { class: "flex flex-col" }, Jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xo = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Yo = { class: "fm-typo-en-body-lg-400" }, es = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, ts = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, cs = /* @__PURE__ */ J({
1114
+ }), Wo = { class: "flex-1 flex flex-col gap-8" }, Jo = { class: "flex flex-col" }, Zo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xo = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Yo = { class: "fm-typo-en-body-lg-400" }, es = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, ts = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, ds = /* @__PURE__ */ Z({
1116
1115
  __name: "TransferTemplateView",
1117
1116
  setup(y) {
1118
- const { t: x } = X(), { createTemplate: u, viewTemplate: o, importTemplates: m, exportTemplates: S } = Le(), { templateDialogProps: i, templateDetailsProps: l } = Be(Le()), d = ht(), { loading: k, templates: h } = Be(d), A = E(!1), F = ft(), v = je(), { breakpoints: g } = Ft();
1117
+ const { t: x } = X(), { createTemplate: u, viewTemplate: o, importTemplates: m, exportTemplates: C } = Le(), { templateDialogProps: i, templateDetailsProps: l } = Be(Le()), d = ht(), { loading: k, templates: h } = Be(d), A = E(!1), F = ft(), v = Qe(), { breakpoints: g } = Ft();
1119
1118
  ce(d.fetchTemplates);
1120
1119
  const I = R(
1121
1120
  () => A.value || k.value || !v._currentLocation
@@ -1129,7 +1128,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
1129
1128
  case "import":
1130
1129
  return m();
1131
1130
  case "export":
1132
- return S();
1131
+ return C();
1133
1132
  }
1134
1133
  }
1135
1134
  function f(s) {
@@ -1159,7 +1158,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
1159
1158
  }
1160
1159
  ]);
1161
1160
  return (s, n) => {
1162
- const C = V("FmTable");
1161
+ const S = V("FmTable");
1163
1162
  return D(), K(qe, null, [
1164
1163
  c(yt, {
1165
1164
  title: e(x)("inventory.transfer.template.title2"),
@@ -1183,7 +1182,7 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
1183
1182
  search: p.value,
1184
1183
  "onUpdate:search": n[0] || (n[0] = (M) => p.value = M)
1185
1184
  }, null, 8, ["search"]),
1186
- (D(), W(C, {
1185
+ (D(), W(S, {
1187
1186
  style: Ye(e(F).tableHeight),
1188
1187
  "column-defs": e(d).columnDefs,
1189
1188
  "row-data": B.value,
@@ -1194,16 +1193,16 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
1194
1193
  "page-size": b.value
1195
1194
  }, {
1196
1195
  "list-row": q((M) => [
1197
- c(Qe, {
1196
+ c(Ke, {
1198
1197
  row: M,
1199
1198
  onRowClick: (_) => e(o)(_)
1200
1199
  }, {
1201
1200
  default: q((_) => {
1202
- var P, U, N, j, T, z, fe, ye, te, ve, be, xe, _e, oe, he, ge, Te, Fe, we, ke, se, Se, Ce, Me, $e, le, Ie;
1201
+ var P, U, N, j, T, z, fe, ye, te, ve, be, xe, _e, oe, he, ge, Te, Fe, we, ke, se, Ce, Se, Me, $e, le, Ie;
1203
1202
  return [
1204
1203
  t("div", Wo, [
1205
- t("div", Zo, [
1206
- t("div", Jo, [
1204
+ t("div", Jo, [
1205
+ t("div", Zo, [
1207
1206
  c(e(Q), {
1208
1207
  render: (N = (U = (P = _._id) == null ? void 0 : P.column) == null ? void 0 : U.columnDef) == null ? void 0 : N.cell,
1209
1208
  props: (T = (j = _._id) == null ? void 0 : j.getContext) == null ? void 0 : T.call(j)
@@ -1226,13 +1225,13 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
1226
1225
  t("div", ts, [
1227
1226
  c(e(Q), {
1228
1227
  render: (ke = (we = (Fe = _.ref) == null ? void 0 : Fe.column) == null ? void 0 : we.columnDef) == null ? void 0 : ke.cell,
1229
- props: (Se = (se = _.ref) == null ? void 0 : se.getContext) == null ? void 0 : Se.call(se)
1228
+ props: (Ce = (se = _.ref) == null ? void 0 : se.getContext) == null ? void 0 : Ce.call(se)
1230
1229
  }, null, 8, ["render", "props"])
1231
1230
  ])
1232
1231
  ]),
1233
1232
  t("div", null, [
1234
1233
  c(e(Q), {
1235
- render: ($e = (Me = (Ce = _.type) == null ? void 0 : Ce.column) == null ? void 0 : Me.columnDef) == null ? void 0 : $e.cell,
1234
+ render: ($e = (Me = (Se = _.type) == null ? void 0 : Se.column) == null ? void 0 : Me.columnDef) == null ? void 0 : $e.cell,
1236
1235
  props: (Ie = (le = _.type) == null ? void 0 : le.getContext) == null ? void 0 : Ie.call(le)
1237
1236
  }, null, 8, ["render", "props"])
1238
1237
  ])
@@ -1260,5 +1259,5 @@ const zt = { class: "flex flex-col gap-8 py-16" }, Ht = { class: "flex items-cen
1260
1259
  }
1261
1260
  });
1262
1261
  export {
1263
- cs as default
1262
+ ds as default
1264
1263
  };
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as H, computed as g, openBlock as v, createElementBlock as C, createElementVNode as l, Fragment as j, renderList as q, toDisplayString as V, createCommentVNode as Y, ref as M, resolveComponent as $, createBlock as T, withCtx as A, createVNode as y, unref as o, isRef as ee, normalizeClass as re, normalizeStyle as ie, Teleport as ue, normalizeProps as de, guardReactiveProps as me } from "vue";
2
- import { a as K, d as w, S as ce, f as pe, D as te, h as L, e as le, l as N, A as fe, i as J, K as ve, L as ye, o as ne, u as be, b as ge, y as xe, _ as _e, z as he, B as Ve, E as Ue } from "./app-CpuFfqWF.js";
2
+ import { a as G, e as w, S as ce, h as pe, D as te, i as L, f as le, m as N, A as fe, j as J, L as ve, N as ye, p as ne, u as be, b as ge, z as xe, _ as _e, B as he, E as Ve, G as Ue } from "./app-F909rQ5n.js";
3
3
  import { useDialog as we, useSnackbar as se, useProxiedModel as oe, useBreakpoints as Ce } from "@feedmepos/ui-library";
4
4
  import { i as Se, _ as ke } from "./is-linked-ingredient-error-fJ2TJb3z.js";
5
5
  import { defineStore as Ee, storeToRefs as Fe } from "pinia";
6
- import { useI18n as G } from "@feedmepos/mf-common";
7
- import { F as $e } from "./decimal-bSGrDlvd.js";
8
- import { _ as Ie } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CQY98Hj6.js";
6
+ import { useI18n as K } from "@feedmepos/mf-common";
7
+ import { F as $e } from "./decimal-0pQSNdVz.js";
8
+ import { _ as Ie } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Cgv6gv2x.js";
9
9
  const De = { class: "flex flex-col gap-8" }, Ae = {
10
10
  key: 0,
11
11
  class: "flex flex-col"
@@ -30,7 +30,7 @@ const De = { class: "flex flex-col gap-8" }, Ae = {
30
30
  unit: {}
31
31
  },
32
32
  setup(k) {
33
- const f = k, b = K(), i = g(() => b.validateUnitUsage(f.unit)), r = g(() => i.value.filter((c) => c.from === "INGREDIENT")), s = g(() => i.value.filter((c) => c.from === "RECIPE")), d = g(() => i.value.filter((c) => c.from === "MENU"));
33
+ const f = k, b = G(), i = g(() => b.validateUnitUsage(f.unit)), r = g(() => i.value.filter((c) => c.from === "INGREDIENT")), s = g(() => i.value.filter((c) => c.from === "RECIPE")), d = g(() => i.value.filter((c) => c.from === "MENU"));
34
34
  return (c, p) => (v(), C("div", De, [
35
35
  p[3] || (p[3] = l("div", { class: "fm-typo-en-body-md-400" }, "Sorry, this unit is used in the following modules:", -1)),
36
36
  r.value.length ? (v(), C("div", Ae, [
@@ -93,7 +93,7 @@ const De = { class: "flex flex-col gap-8" }, Ae = {
93
93
  ]));
94
94
  }
95
95
  }), Q = Ee("unitForm", function() {
96
- const f = we(), b = se(), i = K(), r = M(!1), s = M();
96
+ const f = we(), b = se(), i = G(), r = M(!1), s = M();
97
97
  function d() {
98
98
  const n = {
99
99
  unit: {},
@@ -187,7 +187,7 @@ const De = { class: "flex flex-col gap-8" }, Ae = {
187
187
  };
188
188
  });
189
189
  function qe() {
190
- const { updateUnit: k, deleteUnit: f } = Q(), { t: b } = G();
190
+ const { updateUnit: k, deleteUnit: f } = Q(), { t: b } = K();
191
191
  async function i(s, d) {
192
192
  const c = le(d);
193
193
  if (s === L.Edit) {
@@ -232,7 +232,7 @@ function qe() {
232
232
  }
233
233
  ] };
234
234
  }
235
- const He = { class: "flex flex-col gap-24" }, Ke = { class: "flex gap-24" }, Ge = { class: "flex-1" }, Oe = { class: "flex-1" }, Ye = { class: "flex" }, Je = { class: "flex items-center" }, Qe = { class: "fm-typo-en-body-lg-600 flex-grow" }, We = { class: "flex flex-col gap-24" }, Xe = { class: "flex gap-24" }, Ze = { class: "flex-1" }, et = { class: "flex-1" }, tt = /* @__PURE__ */ H({
235
+ const He = { class: "flex flex-col gap-24" }, Ge = { class: "flex gap-24" }, Ke = { class: "flex-1" }, Oe = { class: "flex-1" }, Ye = { class: "flex" }, Je = { class: "flex items-center" }, Qe = { class: "fm-typo-en-body-lg-600 flex-grow" }, We = { class: "flex flex-col gap-24" }, Xe = { class: "flex gap-24" }, Ze = { class: "flex-1" }, et = { class: "flex-1" }, tt = /* @__PURE__ */ H({
236
236
  __name: "UnitForm",
237
237
  props: {
238
238
  mode: {},
@@ -241,7 +241,7 @@ const He = { class: "flex flex-col gap-24" }, Ke = { class: "flex gap-24" }, Ge
241
241
  },
242
242
  emits: ["update:modelValue", "click:submit"],
243
243
  setup(k, { expose: f, emit: b }) {
244
- const i = k, r = b, { t: s } = G();
244
+ const i = k, r = b, { t: s } = K();
245
245
  function d() {
246
246
  r("click:submit");
247
247
  }
@@ -327,8 +327,8 @@ const He = { class: "flex flex-col gap-24" }, Ke = { class: "flex gap-24" }, Ge
327
327
  var E;
328
328
  return [
329
329
  l("div", He, [
330
- l("div", Ke, [
331
- l("div", Ge, [
330
+ l("div", Ge, [
331
+ l("div", Ke, [
332
332
  y(m, {
333
333
  disabled: e.disabled,
334
334
  label: o(s)("inventory.unit.name"),
@@ -450,7 +450,7 @@ const He = { class: "flex flex-col gap-24" }, Ke = { class: "flex gap-24" }, Ge
450
450
  },
451
451
  emits: ["update:show"],
452
452
  setup(k) {
453
- const f = k, b = K(), i = se(), { t: r } = G(), s = oe(f, "show"), d = oe(f, "unit"), c = g(() => {
453
+ const f = k, b = G(), i = se(), { t: r } = K(), s = oe(f, "show"), d = oe(f, "unit"), c = g(() => {
454
454
  switch (f.mode) {
455
455
  case w.READ:
456
456
  return "";
@@ -566,11 +566,11 @@ const He = { class: "flex flex-col gap-24" }, Ke = { class: "flex gap-24" }, Ge
566
566
  }), lt = { class: "flex flex-col py-8" }, st = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, vt = /* @__PURE__ */ H({
567
567
  __name: "UnitView",
568
568
  setup(k) {
569
- const f = K(), b = be(), i = ge(), r = g(() => f.units), { createUnit: s, updateUnit: d } = Q(), { unitDialogProps: c, unitViewLoading: p } = Fe(Q()), { columnDefs: a } = qe();
569
+ const f = G(), b = be(), i = ge(), r = g(() => f.units), { createUnit: s, updateUnit: d } = Q(), { unitDialogProps: c, unitViewLoading: p } = Fe(Q()), { columnDefs: a } = qe();
570
570
  function n(D) {
571
571
  D === "add" && s();
572
572
  }
573
- const u = M(""), x = g(() => p.value), { breakpoints: _ } = Ce(), e = g(() => _.value.xs || _.value.sm), t = g(() => e.value ? 10 : 20), m = xe(), { t: I } = G();
573
+ const u = M(""), x = g(() => p.value), { breakpoints: _ } = Ce(), e = g(() => _.value.xs || _.value.sm), t = g(() => e.value ? 10 : 20), m = xe(), { t: I } = K();
574
574
  return (D, U) => {
575
575
  const O = $("FmTable");
576
576
  return v(), T(_e, {