@feedmepos/mf-inventory-portal 0.0.19-dev.3 → 0.0.19-dev.5

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 (66) hide show
  1. package/dist/{ApprovalView-CS7NtcBA.js → ApprovalView-DY_a4R25.js} +16 -15
  2. package/dist/{BindingsDialog-BA2w-qkY.js → BindingsDialog-GITQp9DQ.js} +1 -1
  3. package/dist/{BindingsPicker-wf7b30Bk.js → BindingsPicker-CmS01WWD.js} +5 -5
  4. package/dist/{BindingsTable-mqqSPDbO.js → BindingsTable-CsMAutCO.js} +1 -1
  5. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CViUEhuw.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BstbCK2r.js} +1 -1
  6. package/dist/{IngredientsView-BVX31o67.js → IngredientsView-BM218iE0.js} +26 -25
  7. package/dist/{IntegrationView-DFdl_238.js → IntegrationView-DrPzZ7YF.js} +2 -2
  8. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BENFVQkL.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BtY633D-.js} +1 -1
  9. package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-DBPQovO2.js +88 -0
  10. package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js +29 -0
  11. package/dist/{PurchaseOrderPrintPreview-06PokYt4.js → PurchaseOrderPrintPreview-s_pZiI6a.js} +11 -11
  12. package/dist/ReceiveRequestView-De2UMTFi.js +208 -0
  13. package/dist/{RecipeView-CiOb2lvU.js → RecipeView-CXH_9Jbb.js} +117 -116
  14. package/dist/{StockView-5LkTxYI2.js → StockView-Cld0Ss_r.js} +17 -16
  15. package/dist/{SupplierView-BAfC5Wcw.js → SupplierView-DtaCFERj.js} +6 -6
  16. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-kgcXwT9t.js +745 -0
  17. package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-C1YU60Mq.js +1269 -0
  18. package/dist/TransferTemplateView-BSmhw7Vl.js +1130 -0
  19. package/dist/{UnitView-wsbXOcbf.js → UnitView-BS9sJznU.js} +33 -33
  20. package/dist/{WarehouseView-DHhDNAk8.js → WarehouseView-D0xCjihu.js} +4 -4
  21. package/dist/api/purchase-order-template.d.ts +7 -0
  22. package/dist/{app-DNCC20Aq.js → app-Bq5a4Oca.js} +6097 -5889
  23. package/dist/app.d.ts +39 -0
  24. package/dist/app.js +7 -5
  25. package/dist/components/FmUnitInputProps.d.ts +2 -0
  26. package/dist/components/FmUnitInputRules.d.ts +1 -0
  27. package/dist/components/row-action.enum.d.ts +2 -0
  28. package/dist/composable/defineDeepModel.d.ts +2 -0
  29. package/dist/{decimal-DaXHxukU.js → decimal-Bk4WDsfO.js} +1 -1
  30. package/dist/helper/country.d.ts +2 -0
  31. package/dist/id-to-date-DOITPfk-.js +30 -0
  32. package/dist/layout-Dkdyeqv8.js +147 -0
  33. package/dist/purchase-order-transaction-type-std52lFO.js +295 -0
  34. package/dist/router/name.d.ts +1 -0
  35. package/dist/row-action.enum-7jVyol1k.js +36 -0
  36. package/dist/stores/supplier.d.ts +90 -7
  37. package/dist/style.css +1 -1
  38. package/dist/supplier-B1qyquXV.js +54 -0
  39. package/dist/tsconfig.app.tsbuildinfo +1 -1
  40. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +2 -0
  41. package/dist/views/ingredients/components/inventory-binding/InventoryBindingSummary.vue.d.ts +26 -0
  42. package/dist/views/ingredients/helper/calculate-default-cost.d.ts +9 -0
  43. package/dist/views/receive-request/components/transfer-dialog/TransferDialogProps.d.ts +1 -0
  44. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +2 -0
  45. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +3 -1
  46. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +6 -0
  47. package/dist/views/transfer-template/TransferTemplateView.vue.d.ts +2 -0
  48. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +22 -0
  49. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialogProps.d.ts +10 -0
  50. package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateForm.vue.d.ts +16 -0
  51. package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateFormProps.d.ts +7 -0
  52. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItem.vue.d.ts +18 -0
  53. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +116 -0
  54. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +112 -0
  55. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +470 -0
  56. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +289 -0
  57. package/dist/{xlsx-DaxqUL1h.js → xlsx-Bx1vSwYW.js} +1 -1
  58. package/dist/{xlsx.util-Dwiw0sTo.js → xlsx.util-DsOslDqG.js} +2 -2
  59. package/package.json +3 -3
  60. package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-BvadeWUz.js +0 -35
  61. package/dist/ReceiveRequestView-ck-05Ly7.js +0 -1394
  62. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-qZDMkkIZ.js +0 -1031
  63. package/dist/id-to-date-XiomI6dP.js +0 -121
  64. package/dist/layout-DvgFrTEG.js +0 -151
  65. package/dist/row-action.enum-BwQbURNh.js +0 -28
  66. package/dist/supplier-BepZrUgL.js +0 -65
@@ -1,17 +1,17 @@
1
- import { defineComponent as Y, ref as E, onMounted as se, resolveComponent as k, openBlock as x, createElementBlock as $, Fragment as le, createElementVNode as g, toDisplayString as ie, createVNode as v, createCommentVNode as H, computed as V, watch as re, createBlock as T, withCtx as A, unref as _, isRef as X, normalizeStyle as ce, Teleport as ue, normalizeProps as de, guardReactiveProps as me } from "vue";
2
- import { u as I, c as G, S as pe, a as q, R as fe, U as ve, _ as ye, e as Z, f as _e, j as ge } from "./app-DNCC20Aq.js";
3
- import { useDialog as be, useSnackbar as ne, useProxiedModel as ee, useBreakpoints as he } from "@feedmepos/ui-library";
4
- import { i as we, _ as Re } from "./is-linked-ingredient-error-C6AghEwR.js";
5
- import { F as R, D as te, R as N } from "./row-action.enum-BwQbURNh.js";
6
- import { _ as ae, t as xe, d as Ce } from "./xlsx.util-Dwiw0sTo.js";
7
- import { defineStore as Ee, storeToRefs as Fe } from "pinia";
8
- import { c as ke, _ as Ve, F as oe, u as Se } from "./layout-DvgFrTEG.js";
1
+ import { defineComponent as Y, ref as E, onMounted as se, resolveComponent as k, openBlock as x, createElementBlock as $, Fragment as le, createElementVNode as g, toDisplayString as re, createVNode as y, createCommentVNode as H, computed as V, watch as ie, createBlock as T, withCtx as A, unref as v, isRef as X, normalizeStyle as ce, Teleport as ue, normalizeProps as de, guardReactiveProps as me } from "vue";
2
+ import { u as I, c as G, S as pe, a as q, R as fe, U as ve, _ as ye, A as _e, e as Z, f as ge, j as be } from "./app-Bq5a4Oca.js";
3
+ import { useDialog as he, useSnackbar as ne, useProxiedModel as ee, useBreakpoints as we } from "@feedmepos/ui-library";
4
+ import { i as Re, _ as xe } from "./is-linked-ingredient-error-C6AghEwR.js";
5
+ import { F as R, D as te, R as N } from "./row-action.enum-7jVyol1k.js";
6
+ import { _ as ae, t as Ce, d as Ee } from "./xlsx.util-DsOslDqG.js";
7
+ import { defineStore as Fe, storeToRefs as ke } from "pinia";
8
+ import { c as Ve, _ as Se, F as oe, u as De } from "./layout-Dkdyeqv8.js";
9
9
  import { useI18n as j } from "@feedmepos/mf-common";
10
- import { _ as De, a as $e } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CViUEhuw.js";
11
- const Ae = {
10
+ import { _ as $e, a as Ae } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BstbCK2r.js";
11
+ const Ie = {
12
12
  key: 0,
13
13
  class: "flex flex-col items-center w-full h-full gap-24"
14
- }, Ie = /* @__PURE__ */ g("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading...", -1), Pe = { key: 1 }, Te = /* @__PURE__ */ g("br", null, null, -1), Me = { key: 0 }, Ue = /* @__PURE__ */ g("p", { class: "fm-typo-en-body-lg-600" }, "Affected menu items:", -1), Be = /* @__PURE__ */ Y({
14
+ }, Pe = /* @__PURE__ */ g("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading...", -1), Te = { key: 1 }, Me = /* @__PURE__ */ g("br", null, null, -1), Ue = { key: 0 }, Be = /* @__PURE__ */ g("p", { class: "fm-typo-en-body-lg-600" }, "Affected menu items:", -1), Le = /* @__PURE__ */ Y({
15
15
  __name: "DeleteDialog",
16
16
  props: {
17
17
  type: {},
@@ -25,25 +25,25 @@ const Ae = {
25
25
  n();
26
26
  });
27
27
  async function n() {
28
- var i, l;
29
- !s.value && ((i = d.data) != null && i._id) && (s.value = !0, p.value = await I().getAffectedMenu((l = d.data) == null ? void 0 : l._id), s.value = !1);
28
+ var r, l;
29
+ !s.value && ((r = d.data) != null && r._id) && (s.value = !0, p.value = await I().getAffectedMenu((l = d.data) == null ? void 0 : l._id), s.value = !1);
30
30
  }
31
- return (i, l) => {
31
+ return (r, l) => {
32
32
  const c = k("FmSpacer"), f = k("FmCircularProgress");
33
33
  return x(), $(le, null, [
34
- g("p", null, ie(i.message), 1),
35
- s.value ? (x(), $("div", Ae, [
36
- v(c),
34
+ g("p", null, re(r.message), 1),
35
+ s.value ? (x(), $("div", Ie, [
36
+ y(c),
37
37
  g("div", null, [
38
- v(f, { size: "xl" })
38
+ y(f, { size: "xl" })
39
39
  ]),
40
- Ie,
41
- v(c)
42
- ])) : (x(), $("div", Pe, [
43
- Te,
44
- p.value.length > 0 ? (x(), $("div", Me, [
45
- Ue,
46
- v(ae, {
40
+ Pe,
41
+ y(c)
42
+ ])) : (x(), $("div", Te, [
43
+ Me,
44
+ p.value.length > 0 ? (x(), $("div", Ue, [
45
+ Be,
46
+ y(ae, {
47
47
  name: "Menu",
48
48
  bindings: p.value
49
49
  }, null, 8, ["bindings"])
@@ -52,18 +52,18 @@ const Ae = {
52
52
  ], 64);
53
53
  };
54
54
  }
55
- }), K = Ee("recipeForm", function() {
56
- const d = be(), p = ne(), s = I(), n = E(!1), i = E();
55
+ }), K = Fe("recipeForm", function() {
56
+ const d = he(), p = ne(), s = I(), n = E(!1), r = E();
57
57
  function l() {
58
58
  const t = {
59
59
  recipe: {},
60
60
  mode: R.CREATE,
61
61
  show: !0,
62
62
  "onUpdate:show"(u) {
63
- i.value.show = u;
63
+ r.value.show = u;
64
64
  }
65
65
  };
66
- i.value = t;
66
+ r.value = t;
67
67
  }
68
68
  async function c(t) {
69
69
  const u = {
@@ -71,10 +71,10 @@ const Ae = {
71
71
  mode: R.UPDATE,
72
72
  show: !0,
73
73
  "onUpdate:show"(a) {
74
- i.value.show = a;
74
+ r.value.show = a;
75
75
  }
76
76
  };
77
- i.value = u;
77
+ r.value = u;
78
78
  }
79
79
  async function f(t) {
80
80
  n.value = !0;
@@ -85,9 +85,9 @@ const Ae = {
85
85
  type: "success"
86
86
  });
87
87
  } catch (u) {
88
- u instanceof pe && we(u) ? d.open({
88
+ u instanceof pe && Re(u) ? d.open({
89
89
  title: "Cannot delete recipe",
90
- contentComponent: Re,
90
+ contentComponent: xe,
91
91
  contentComponentProps: {
92
92
  subject: (t == null ? void 0 : t.name) ?? "",
93
93
  items: u.errorResponse.message
@@ -118,7 +118,7 @@ const Ae = {
118
118
  text: "Cancel",
119
119
  close: !0
120
120
  },
121
- contentComponent: Be,
121
+ contentComponent: Le,
122
122
  contentComponentProps: {
123
123
  type: "menu",
124
124
  data: t,
@@ -130,11 +130,11 @@ const Ae = {
130
130
  createRecipe: l,
131
131
  updateRecipe: c,
132
132
  deleteRecipe: m,
133
- recipeDialogProps: i,
133
+ recipeDialogProps: r,
134
134
  recipeViewLoading: n
135
135
  };
136
136
  });
137
- function Le() {
137
+ function ze() {
138
138
  const { updateRecipe: b, deleteRecipe: d } = K(), { t: p } = j();
139
139
  async function s(l, c) {
140
140
  const f = G(c);
@@ -162,7 +162,7 @@ function Le() {
162
162
  id: "action",
163
163
  header: "",
164
164
  cell(l) {
165
- return ke(
165
+ return Ve(
166
166
  [te[N.Edit], te[N.Delete]],
167
167
  (c) => {
168
168
  s(c, l.row.original.original);
@@ -177,7 +177,7 @@ function Le() {
177
177
  }
178
178
  }
179
179
  ];
180
- function i(l) {
180
+ function r(l) {
181
181
  const c = I();
182
182
  return l.map((f) => ({
183
183
  recipe: f.name,
@@ -189,15 +189,15 @@ function Le() {
189
189
  original: f
190
190
  }));
191
191
  }
192
- return { columnDefs: n, formatRowData: i };
192
+ return { columnDefs: n, formatRowData: r };
193
193
  }
194
- const ze = { class: "flex flex-col gap-40" }, Ne = {
194
+ const Ne = { class: "flex flex-col gap-40" }, Ye = {
195
195
  key: 0,
196
196
  class: "col-span-2 mt-16 border-1 border-fm-color-neutral-gray-200 fm-corner-radius-lg flex flex-col p-16 gap-16"
197
- }, Ye = {
197
+ }, je = {
198
198
  key: 0,
199
199
  class: "flex flex-col items-center w-full h-full gap-24"
200
- }, je = /* @__PURE__ */ g("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading...", -1), He = { key: 1 }, qe = /* @__PURE__ */ Y({
200
+ }, He = /* @__PURE__ */ g("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading...", -1), qe = { key: 1 }, Ke = /* @__PURE__ */ Y({
201
201
  __name: "RecipeForm",
202
202
  props: {
203
203
  mode: {},
@@ -207,7 +207,7 @@ const ze = { class: "flex flex-col gap-40" }, Ne = {
207
207
  emits: ["update:modelValue", "click:submit"],
208
208
  setup(b, { expose: d, emit: p }) {
209
209
  var F;
210
- const s = b, n = p, { t: i } = j(), l = V({
210
+ const s = b, n = p, { t: r } = j(), l = V({
211
211
  get() {
212
212
  var e;
213
213
  return ((e = s.modelValue) == null ? void 0 : e.name) ?? "";
@@ -245,16 +245,16 @@ const ze = { class: "flex flex-col gap-40" }, Ne = {
245
245
  }
246
246
  });
247
247
  const t = I(), u = E([]), a = E(!1), h = E(!1);
248
- re(a, async (e) => {
248
+ ie(a, async (e) => {
249
249
  C(e);
250
250
  });
251
251
  async function C(e) {
252
252
  var o, P;
253
253
  e && !h.value && ((o = s.modelValue) != null && o._id) && (h.value = !0, u.value = await t.getAffectedMenu((P = s.modelValue) == null ? void 0 : P._id), h.value = !1);
254
254
  }
255
- const r = V(
255
+ const i = V(
256
256
  () => t.recipes.map((e) => ({ label: e.name, value: e.name }))
257
- ), y = E((F = s.modelValue) == null ? void 0 : F.name);
257
+ ), _ = E((F = s.modelValue) == null ? void 0 : F.name);
258
258
  return (e, o) => {
259
259
  const P = k("FmTextField"), D = k("FmCard"), S = k("FmSwitch"), M = k("FmSpacer"), U = k("FmCircularProgress"), B = k("FmForm");
260
260
  return x(), T(B, {
@@ -263,39 +263,40 @@ const ze = { class: "flex flex-col gap-40" }, Ne = {
263
263
  onValidationSuccess: f
264
264
  }, {
265
265
  default: A(() => [
266
- g("div", ze, [
267
- v(P, {
266
+ g("div", Ne, [
267
+ y(P, {
268
268
  disabled: e.disabled,
269
- label: _(i)("inventory.recipe.name"),
269
+ label: v(r)("inventory.recipe.name"),
270
270
  "model-value": l.value,
271
271
  "onUpdate:modelValue": o[0] || (o[0] = (w) => l.value = w),
272
272
  rules: [
273
- _(fe)(),
274
- _(ve)(r.value, y.value, (w) => `[${w.value}] already exists`)
273
+ v(fe)(),
274
+ v(ve)(i.value, _.value, (w) => `[${w.value}] already exists`)
275
275
  ],
276
276
  "label-mark": "required"
277
277
  }, null, 8, ["disabled", "label", "model-value", "rules"]),
278
- v(D, {
278
+ y(D, {
279
279
  variant: "outlined",
280
280
  class: "p-16"
281
281
  }, {
282
282
  default: A(() => {
283
283
  var w;
284
284
  return [
285
- v(ye, {
285
+ y(ye, {
286
286
  id: (w = e.modelValue) == null ? void 0 : w._id,
287
287
  disabled: e.disabled,
288
288
  "model-value": c.value,
289
- "onUpdate:modelValue": o[1] || (o[1] = (L) => c.value = L)
290
- }, null, 8, ["id", "disabled", "model-value"])
289
+ "onUpdate:modelValue": o[1] || (o[1] = (L) => c.value = L),
290
+ rules: [v(_e)(1)]
291
+ }, null, 8, ["id", "disabled", "model-value", "rules"])
291
292
  ];
292
293
  }),
293
294
  _: 1
294
295
  })
295
296
  ]),
296
- e.mode !== _(R).CREATE ? (x(), $("div", Ne, [
297
+ e.mode !== v(R).CREATE ? (x(), $("div", Ye, [
297
298
  g("div", null, [
298
- v(S, {
299
+ y(S, {
299
300
  label: "Show binded items",
300
301
  modelValue: a.value,
301
302
  "onUpdate:modelValue": o[2] || (o[2] = (w) => a.value = w),
@@ -303,14 +304,14 @@ const ze = { class: "flex flex-col gap-40" }, Ne = {
303
304
  disabled: h.value
304
305
  }, null, 8, ["modelValue", "disabled"])
305
306
  ]),
306
- h.value ? (x(), $("div", Ye, [
307
- v(M),
307
+ h.value ? (x(), $("div", je, [
308
+ y(M),
308
309
  g("div", null, [
309
- v(U, { size: "xl" })
310
+ y(U, { size: "xl" })
310
311
  ]),
311
- je,
312
- v(M)
313
- ])) : (x(), $("div", He, [
312
+ He,
313
+ y(M)
314
+ ])) : (x(), $("div", qe, [
314
315
  a.value && u.value.length ? (x(), T(ae, {
315
316
  key: 0,
316
317
  name: "Menu",
@@ -323,7 +324,7 @@ const ze = { class: "flex flex-col gap-40" }, Ne = {
323
324
  }, 512);
324
325
  };
325
326
  }
326
- }), Ke = { class: "flex gap-4" }, Ge = /* @__PURE__ */ Y({
327
+ }), Ge = { class: "flex gap-4" }, Je = /* @__PURE__ */ Y({
327
328
  __name: "RecipeDialog",
328
329
  props: {
329
330
  show: { type: Boolean },
@@ -332,7 +333,7 @@ const ze = { class: "flex flex-col gap-40" }, Ne = {
332
333
  },
333
334
  emits: ["update:show"],
334
335
  setup(b) {
335
- const d = b, p = I(), s = ne(), { t: n } = j(), i = ee(d, "show"), l = ee(d, "recipe"), c = V(() => {
336
+ const d = b, p = I(), s = ne(), { t: n } = j(), r = ee(d, "show"), l = ee(d, "recipe"), c = V(() => {
336
337
  switch (d.mode) {
337
338
  case R.READ:
338
339
  return "";
@@ -356,14 +357,14 @@ const ze = { class: "flex flex-col gap-40" }, Ne = {
356
357
  async function u() {
357
358
  t.value = !0;
358
359
  try {
359
- const r = G(l.value);
360
- r.precision ?? (r.precision = 0), r.measurements ?? (r.measurements = []), await p.createRecipe(r), i.value = !1, s.open({
360
+ const i = G(l.value);
361
+ i.precision ?? (i.precision = 0), i.measurements ?? (i.measurements = []), await p.createRecipe(i), r.value = !1, s.open({
361
362
  title: n("common.success"),
362
363
  message: n("inventory.recipe.create.success", { name: l.value.name }),
363
364
  type: "success"
364
365
  });
365
- } catch (r) {
366
- r instanceof Z || s.open({
366
+ } catch (i) {
367
+ i instanceof Z || s.open({
367
368
  title: n("inventory.recipe.create.error.title"),
368
369
  message: n("inventory.recipe.create.error.message"),
369
370
  type: "error"
@@ -375,13 +376,13 @@ const ze = { class: "flex flex-col gap-40" }, Ne = {
375
376
  async function a() {
376
377
  t.value = !0;
377
378
  try {
378
- await p.updateRecipe(l.value), i.value = !1, s.open({
379
+ await p.updateRecipe(l.value), r.value = !1, s.open({
379
380
  title: n("common.success"),
380
381
  message: n("inventory.recipe.update.success", { name: l.value.name }),
381
382
  type: "success"
382
383
  });
383
- } catch (r) {
384
- r instanceof Z || s.open({
384
+ } catch (i) {
385
+ i instanceof Z || s.open({
385
386
  title: n("inventory.recipe.update.error.title"),
386
387
  message: n("inventory.recipe.update.error.message"),
387
388
  type: "error"
@@ -391,8 +392,8 @@ const ze = { class: "flex flex-col gap-40" }, Ne = {
391
392
  }
392
393
  }
393
394
  function h() {
394
- var r, y;
395
- (y = (r = m.value) == null ? void 0 : r.validateInputs) == null || y.call(r);
395
+ var i, _;
396
+ (_ = (i = m.value) == null ? void 0 : i.validateInputs) == null || _.call(i);
396
397
  }
397
398
  function C() {
398
399
  switch (d.mode) {
@@ -404,41 +405,41 @@ const ze = { class: "flex flex-col gap-40" }, Ne = {
404
405
  return u();
405
406
  }
406
407
  }
407
- return (r, y) => {
408
+ return (i, _) => {
408
409
  const F = k("FmButton"), e = k("FmSideSheet");
409
410
  return x(), T(e, {
410
- "model-value": _(i),
411
- "onUpdate:modelValue": y[3] || (y[3] = (o) => X(i) ? i.value = o : null),
411
+ "model-value": v(r),
412
+ "onUpdate:modelValue": _[3] || (_[3] = (o) => X(r) ? r.value = o : null),
412
413
  header: c.value,
413
414
  "close-button": "",
414
415
  "dismiss-away": "",
415
416
  "max-width": 500
416
417
  }, {
417
418
  "side-sheet-footer": A(() => [
418
- g("div", Ke, [
419
- v(F, {
419
+ g("div", Ge, [
420
+ y(F, {
420
421
  loading: t.value,
421
422
  label: f.value,
422
423
  onClick: h
423
424
  }, null, 8, ["loading", "label"]),
424
- v(F, {
425
+ y(F, {
425
426
  disabled: t.value,
426
- label: _(n)("common.close"),
427
+ label: v(n)("common.close"),
427
428
  variant: "tertiary",
428
- onClick: y[2] || (y[2] = (o) => i.value = !1)
429
+ onClick: _[2] || (_[2] = (o) => r.value = !1)
429
430
  }, null, 8, ["disabled", "label"])
430
431
  ])
431
432
  ]),
432
433
  default: A(() => [
433
- v(qe, {
434
+ y(Ke, {
434
435
  class: "w-full",
435
436
  ref_key: "hasValidationExpose",
436
437
  ref: m,
437
- modelValue: _(l),
438
- "onUpdate:modelValue": y[0] || (y[0] = (o) => X(l) ? l.value = o : null),
439
- mode: r.mode,
438
+ modelValue: v(l),
439
+ "onUpdate:modelValue": _[0] || (_[0] = (o) => X(l) ? l.value = o : null),
440
+ mode: i.mode,
440
441
  disabled: t.value,
441
- "onClick:submit": y[1] || (y[1] = (o) => C())
442
+ "onClick:submit": _[1] || (_[1] = (o) => C())
442
443
  }, null, 8, ["modelValue", "mode", "disabled"])
443
444
  ]),
444
445
  _: 1
@@ -446,7 +447,7 @@ const ze = { class: "flex flex-col gap-40" }, Ne = {
446
447
  };
447
448
  }
448
449
  });
449
- function Je() {
450
+ function Oe() {
450
451
  const b = I(), d = b.recipes, p = b.recipeById, s = b.skuById, n = d.flatMap((c, f) => {
451
452
  var m;
452
453
  if ((m = c.contains) != null && m.length) {
@@ -468,14 +469,14 @@ function Je() {
468
469
  ),
469
470
  ...u.map(
470
471
  (a, h) => {
471
- var C, r, y, F;
472
+ var C, i, _, F;
472
473
  return [
473
474
  !t.length && h === 0 ? c.name : "",
474
475
  "INGREDIENT",
475
476
  (C = s[a.id]) == null ? void 0 : C.code,
476
- (r = s[a.id]) == null ? void 0 : r.name,
477
+ (i = s[a.id]) == null ? void 0 : i.name,
477
478
  q(a.amount),
478
- a.measurement ? a.measurement.abbrev : (F = (y = s[a.id]) == null ? void 0 : y.unit) == null ? void 0 : F.abbrev
479
+ a.measurement ? a.measurement.abbrev : (F = (_ = s[a.id]) == null ? void 0 : _.unit) == null ? void 0 : F.abbrev
479
480
  ];
480
481
  }
481
482
  )
@@ -485,24 +486,24 @@ function Je() {
485
486
  ...f === 0 ? [] : [["", "", "", "", "", ""]],
486
487
  [c.name, "No bindings", "", "", "", ""]
487
488
  ];
488
- }), l = xe(n, ["Name", "Type", "Code", "Item", "Amount", "Unit"]);
489
- Ce(l, `RECIPE_${_e(/* @__PURE__ */ new Date(), "-", "-")}.xlsx`);
489
+ }), l = Ce(n, ["Name", "Type", "Code", "Item", "Amount", "Unit"]);
490
+ Ee(l, `RECIPE_${ge(/* @__PURE__ */ new Date(), "-", "-")}.xlsx`);
490
491
  }
491
- const Oe = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, Qe = { class: "flex flex-col py-8" }, We = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ct = /* @__PURE__ */ Y({
492
+ const Qe = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, We = { class: "flex flex-col py-8" }, Xe = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Ze = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ut = /* @__PURE__ */ Y({
492
493
  __name: "RecipeView",
493
494
  setup(b) {
494
- const d = I(), p = V(() => d.recipes), s = ge(), { createRecipe: n, updateRecipe: i } = K(), { recipeDialogProps: l, recipeViewLoading: c } = Fe(K()), { columnDefs: f, formatRowData: m } = Le(), t = V(() => m(p.value));
495
+ const d = I(), p = V(() => d.recipes), s = be(), { createRecipe: n, updateRecipe: r } = K(), { recipeDialogProps: l, recipeViewLoading: c } = ke(K()), { columnDefs: f, formatRowData: m } = ze(), t = V(() => m(p.value));
495
496
  function u(e) {
496
497
  e === "add" && n();
497
498
  }
498
- const a = E(""), h = V(() => c), { breakpoints: C } = he(), r = V(() => C.value.xs || C.value.sm ? 10 : 20), y = Se(), { t: F } = j();
499
+ const a = E(""), h = V(() => c.value), { breakpoints: C } = we(), i = V(() => C.value.xs || C.value.sm ? 10 : 20), _ = De(), { t: F } = j();
499
500
  return (e, o) => {
500
501
  const P = k("FmTable");
501
- return x(), T(De, {
502
- title: _(F)("inventory.recipe.title"),
502
+ return x(), T($e, {
503
+ title: v(F)("inventory.recipe.title"),
503
504
  actions: [
504
505
  {
505
- label: _(F)("inventory.recipe.create.title"),
506
+ label: v(F)("inventory.recipe.create.title"),
506
507
  value: "add",
507
508
  isPrimary: !0,
508
509
  prependIcon: "add"
@@ -511,40 +512,40 @@ const Oe = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, Qe =
511
512
  "onClick:action": u
512
513
  }, {
513
514
  default: A(() => [
514
- g("div", Oe, [
515
- v($e, {
515
+ g("div", Qe, [
516
+ y(Ae, {
516
517
  searchable: "",
517
518
  search: a.value,
518
519
  "onUpdate:search": o[0] || (o[0] = (D) => a.value = D),
519
- actions: [{ icon: "ios_share", onClick: _(Je) }]
520
+ actions: [{ icon: "ios_share", onClick: v(Oe) }]
520
521
  }, null, 8, ["search", "actions"]),
521
522
  (x(), T(P, {
522
- style: ce(_(y).tableHeight),
523
- "column-defs": _(f),
523
+ style: ce(v(_).tableHeight),
524
+ "column-defs": v(f),
524
525
  "row-data": t.value,
525
526
  "search-value": a.value,
526
- loading: !_(s)._currentLocation || h.value,
527
- onRowClick: o[1] || (o[1] = (D) => _(i)(D.original.original)),
527
+ loading: !v(s)._currentLocation || h.value,
528
+ onRowClick: o[1] || (o[1] = (D) => v(r)(D.original.original)),
528
529
  key: p.value.length,
529
- "page-size": r.value
530
+ "page-size": i.value
530
531
  }, {
531
532
  "list-row": A((D) => [
532
- v(Ve, {
533
+ y(Se, {
533
534
  row: D,
534
- onRowClick: (S) => _(i)(S.original)
535
+ onRowClick: (S) => v(r)(S.original)
535
536
  }, {
536
537
  default: A((S) => {
537
538
  var M, U, B, w, L, J, O, Q, z, W;
538
539
  return [
539
- g("div", Qe, [
540
- g("div", We, [
541
- v(_(oe), {
540
+ g("div", We, [
541
+ g("div", Xe, [
542
+ y(v(oe), {
542
543
  render: (B = (U = (M = S.recipe) == null ? void 0 : M.column) == null ? void 0 : U.columnDef) == null ? void 0 : B.cell,
543
544
  props: (L = (w = S.recipe) == null ? void 0 : w.getContext) == null ? void 0 : L.call(w)
544
545
  }, null, 8, ["render", "props"])
545
546
  ]),
546
- g("div", Xe, [
547
- v(_(oe), {
547
+ g("div", Ze, [
548
+ y(v(oe), {
548
549
  render: (Q = (O = (J = S.ingredients) == null ? void 0 : J.column) == null ? void 0 : O.columnDef) == null ? void 0 : Q.cell,
549
550
  props: (W = (z = S.ingredients) == null ? void 0 : z.getContext) == null ? void 0 : W.call(z)
550
551
  }, null, 8, ["render", "props"])
@@ -559,7 +560,7 @@ const Oe = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, Qe =
559
560
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
560
561
  ]),
561
562
  (x(), T(ue, { to: "body" }, [
562
- v(Ge, de(me(_(l))), null, 16)
563
+ y(Je, de(me(v(l))), null, 16)
563
564
  ]))
564
565
  ]),
565
566
  _: 1
@@ -568,5 +569,5 @@ const Oe = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, Qe =
568
569
  }
569
570
  });
570
571
  export {
571
- ct as default
572
+ ut as default
572
573
  };
@@ -1,17 +1,18 @@
1
1
  import { ref as R, defineComponent as re, computed as T, resolveComponent as D, openBlock as B, createBlock as O, withCtx as C, createElementVNode as n, normalizeClass as Ce, toDisplayString as g, createVNode as x, createElementBlock as L, Fragment as te, renderList as ae, unref as v, h as ye, watch as he, isRef as Ue, createCommentVNode as ee, reactive as it, onMounted as Je, normalizeStyle as Qe, createTextVNode as ve, Teleport as ut, normalizeProps as $e, mergeProps as we } from "vue";
2
- import { i as ct, _ as dt, a as mt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CViUEhuw.js";
3
- import { n as Xe, j as ue, o as pt, c as Pe, p as vt, u as Te, q as Oe, r as De, a as ie, k as ft, t as be, m as Me, A as yt, M as _t, l as fe, s as kt, v as Z, w as ht, x as ze, R as bt, y as gt, z as xt, B as Ze, D as q, E as St, f as et, G as je, H as $t, d as Ye, b as wt, J as Bt, K as Ft, C as Be, L as At, N as Vt, O as Ct, P as Dt } from "./app-DNCC20Aq.js";
2
+ import { i as ct, _ as dt, a as mt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BstbCK2r.js";
3
+ import { n as Xe, j as ue, o as pt, c as Pe, p as vt, u as Te, q as Oe, r as De, a as ie, k as ft, t as be, m as Me, A as yt, M as _t, l as fe, s as kt, v as Z, w as ht, x as ze, R as bt, y as gt, z as xt, B as Ze, D as q, E as St, f as et, G as je, H as $t, d as Ye, b as wt, J as Bt, K as Ft, C as Be, L as At, N as Vt, O as Ct, P as Dt } from "./app-Bq5a4Oca.js";
4
4
  import { useCoreStore as tt, useI18n as le } from "@feedmepos/mf-common";
5
5
  import { useSnackbar as de, useDialog as nt, useProxiedModel as Re, useBreakpoints as Mt } from "@feedmepos/ui-library";
6
- import { c as jt, _ as It, F as Ke, u as Ut } from "./layout-DvgFrTEG.js";
7
- import { g as ge } from "./decimal-DaXHxukU.js";
8
- import { e as Pt, _ as Tt, u as ot, i as st } from "./id-to-date-XiomI6dP.js";
9
- import { _ as Ie, S as Fe, g as at } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
6
+ import { c as jt, _ as It, F as Ke, u as Ut } from "./layout-Dkdyeqv8.js";
7
+ import { g as ge } from "./decimal-Bk4WDsfO.js";
8
+ import { e as Pt, i as ot } from "./id-to-date-DOITPfk-.js";
9
+ import { _ as Ie, S as Fe, g as st } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
10
+ import { _ as Tt } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
11
+ import { u as at, _ as Ge } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-DBPQovO2.js";
10
12
  import { defineStore as Rt } from "pinia";
11
- import { _ as Ht } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BENFVQkL.js";
13
+ import { _ as Ht } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BtY633D-.js";
12
14
  import { E as Et } from "./empty-placeholder-wf6-BWE8.js";
13
15
  import "./array-AvWd53LI.js";
14
- import { _ as Ge } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-BvadeWUz.js";
15
16
  const Se = Xe((c, d) => {
16
17
  const r = ue(), s = tt(), S = de();
17
18
  return d.onError(async (l) => {
@@ -255,7 +256,7 @@ const Yt = { class: "fm-typo-en-body-md-400 flex-grow" }, rt = /* @__PURE__ */ r
255
256
  }));
256
257
  }
257
258
  }), lt = Rt("stockActions", () => {
258
- const c = R(!1), d = ue(), r = He(), s = ot(), S = de(), l = nt(), { t: a } = le();
259
+ const c = R(!1), d = ue(), r = He(), s = at(), S = de(), l = nt(), { t: a } = le();
259
260
  async function i() {
260
261
  if (d._currentLocation) {
261
262
  c.value = !0;
@@ -575,7 +576,7 @@ const Jt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-80
575
576
  }
576
577
  function P(e) {
577
578
  const t = w.value.find((f) => f._id === e);
578
- return t ? at(t.unit, !0) : [];
579
+ return t ? st(t.unit, !0) : [];
579
580
  }
580
581
  function N(e, t) {
581
582
  const f = P(e), m = f.find((_) => _.value === t) ?? f.find((_) => _.value === null);
@@ -811,7 +812,7 @@ const Ve = {
811
812
  label: ht(u),
812
813
  value: u
813
814
  }))
814
- ), l = T(() => at(r.modelValue.doc.unit, !0)), a = T({
815
+ ), l = T(() => st(r.modelValue.doc.unit, !0)), a = T({
815
816
  get() {
816
817
  return r.modelValue.type ?? Z.enum.PURCHASE;
817
818
  },
@@ -1162,7 +1163,7 @@ const Ve = {
1162
1163
  return ((A = (w = o.skus) == null ? void 0 : w.map) == null ? void 0 : A.call(w, (b) => ({
1163
1164
  ...b,
1164
1165
  ref: o.ref,
1165
- backdateFrom: o.effectiveAt != null ? st(o._id) : null
1166
+ backdateFrom: o.effectiveAt != null ? ot(o._id) : null
1166
1167
  }))) ?? [];
1167
1168
  }
1168
1169
  ).flatMap((o) => {
@@ -1381,7 +1382,7 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1381
1382
  function H(e, t) {
1382
1383
  const f = e.reduce(
1383
1384
  (m, _) => {
1384
- const y = _.effectiveAt ?? st(_._id);
1385
+ const y = _.effectiveAt ?? ot(_._id);
1385
1386
  if (!y)
1386
1387
  return m;
1387
1388
  const V = M(new Date(y), t);
@@ -1735,10 +1736,10 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1735
1736
  }, 8, ["modelValue"]);
1736
1737
  };
1737
1738
  }
1738
- }), Io = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 h-full" }, Uo = { class: "flex flex-col gap-8" }, Po = { class: "flex flex-col" }, To = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ro = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Zo = /* @__PURE__ */ re({
1739
+ }), Io = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 h-full" }, Uo = { class: "flex flex-col gap-8" }, Po = { class: "flex flex-col" }, To = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ro = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, es = /* @__PURE__ */ re({
1739
1740
  __name: "StockView",
1740
1741
  setup(c) {
1741
- const { t: d } = le(), r = Te(), s = ue(), S = He(), l = lt(), a = ot(), { columnDefs: i } = qt();
1742
+ const { t: d } = le(), r = Te(), s = ue(), S = He(), l = lt(), a = at(), { columnDefs: i } = qt();
1742
1743
  s.watchLocation(u);
1743
1744
  const h = R(!1), k = de();
1744
1745
  async function u() {
@@ -1872,5 +1873,5 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1872
1873
  }
1873
1874
  });
1874
1875
  export {
1875
- Zo as default
1876
+ es as default
1876
1877
  };
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as O, mergeModels as ge, computed as S, useModel as _e, resolveComponent as N, openBlock as $, createElementBlock as E, createElementVNode as d, createVNode as v, withCtx as R, toDisplayString as F, unref as l, Fragment as he, renderList as Se, ref as P, createBlock as T, createCommentVNode as ve, isRef as ie, normalizeStyle as xe, Teleport as ke } from "vue";
2
- import { u as fe } from "./supplier-BepZrUgL.js";
3
- import { D as me, R as j, F as I } from "./row-action.enum-BwQbURNh.js";
4
- import { c as we, _ as Ce, F as G, u as Ie } from "./layout-DvgFrTEG.js";
5
- import { c as Q, u as ye, a3 as Me, d as pe, g as $e, y as Ae, C as J, h as Ue, R as A, b as De, j as Re } from "./app-DNCC20Aq.js";
2
+ import { u as fe } from "./supplier-B1qyquXV.js";
3
+ import { D as me, R as j, F as I } from "./row-action.enum-7jVyol1k.js";
4
+ import { c as we, _ as Ce, F as G, u as Ie } from "./layout-Dkdyeqv8.js";
5
+ import { c as Q, u as ye, a0 as Me, d as pe, g as $e, y as Ae, C as J, h as Ue, R as A, b as De, j as Re } from "./app-Bq5a4Oca.js";
6
6
  import { useI18n as B, useCoreStore as Fe } from "@feedmepos/mf-common";
7
7
  import { useDialog as be, useSnackbar as Ve, useProxiedModel as ce, useBreakpoints as Ne } from "@feedmepos/ui-library";
8
- import { _ as Pe, a as Ee } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CViUEhuw.js";
9
- import { _ as Te } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-BvadeWUz.js";
8
+ import { _ as Pe, a as Ee } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BstbCK2r.js";
9
+ import { _ as Te } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
10
10
  function Be(U, C) {
11
11
  const { t: _ } = B();
12
12
  function s(f, n) {