@feedmepos/mf-inventory-portal 0.0.6 → 0.0.7-dev.1

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 (36) hide show
  1. package/dist/{ApprovalView-7XAT5-7o.js → ApprovalView-BYZcvkso.js} +6 -6
  2. package/dist/{BindingsDialog-DgHuffxZ.js → BindingsDialog-pdS86VDU.js} +2 -2
  3. package/dist/{BindingsPicker-CdG1FKt3.js → BindingsPicker-D891Cfzu.js} +2 -2
  4. package/dist/{BindingsTable-DnhyMeyT.js → BindingsTable-tmr6QwLk.js} +3 -3
  5. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-aicACi6T.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-Bss0q2Zt.js} +1 -1
  6. package/dist/{FmMultiselectDialog.vue_vue_type_script_setup_true_lang-BeCBc3ie.js → FmMultiselectDialog.vue_vue_type_script_setup_true_lang-BHcLUkdm.js} +2 -2
  7. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DS9A38-m.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BIww2Noe.js} +1 -1
  8. package/dist/{IngredientsView-CC2M-Oxt.js → IngredientsView-BH6G7830.js} +69 -69
  9. package/dist/{IntegrationView-C0eXkb_X.js → IntegrationView-CfJn6Fzn.js} +3 -3
  10. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BqkpGRQG.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-39U8Iavr.js} +5 -5
  11. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DZshbzqT.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-nDxqau1g.js} +1 -1
  12. package/dist/{PurchaseOrderPrintPreview-BChxLASs.js → PurchaseOrderPrintPreview-Db2U_IQL.js} +1 -1
  13. package/dist/{ReceiveRequestView-B2T-K9on.js → ReceiveRequestView-CgVfcS8C.js} +11 -11
  14. package/dist/{RecipeView-DGS0-kll.js → RecipeView-C9_Y_A9b.js} +58 -58
  15. package/dist/{StockView-Byeg5Lmo.js → StockView-CoUI3Faj.js} +226 -229
  16. package/dist/{SupplierView-C-qEfLPr.js → SupplierView-CNq6wVfN.js} +7 -7
  17. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BQvyTSZC.js → TransferDetails.vue_vue_type_script_setup_true_lang-Cmajrg-9.js} +5 -5
  18. package/dist/{UnitView-zTo6Jwgy.js → UnitView-Buyp4Gnc.js} +190 -177
  19. package/dist/{WarehouseView-h92-OZ8y.js → WarehouseView-DbUib0PR.js} +3 -3
  20. package/dist/{app-D_R27XfK.js → app-DM4Thqjw.js} +10314 -10308
  21. package/dist/app.js +1 -1
  22. package/dist/core.d.ts +3 -3
  23. package/dist/{date2-CsVyh2xw.js → date2-DpU4LDaP.js} +1 -1
  24. package/dist/{dayjs.min-DJF3Prun.js → dayjs.min-D4Q_pHH9.js} +145 -145
  25. package/dist/{decimal-esXdd4p7.js → decimal-M4vjE6Br.js} +1 -1
  26. package/dist/{fuzzy-5drv5SZI.js → fuzzy-fD_FTJWH.js} +1 -1
  27. package/dist/{init-date-range-BWVT2UgA.js → init-date-range-DJ1Nl5TB.js} +1 -1
  28. package/dist/{layout-Cf3iZuvk.js → layout-kY567oHX.js} +1 -1
  29. package/dist/{rules-QzzL5oLu.js → rules-CVxh5XVG.js} +1 -1
  30. package/dist/{stock-estimate-DqJKQ1Jf.js → stock-estimate-lkaYlz7I.js} +2 -2
  31. package/dist/style.css +1 -1
  32. package/dist/{supplier-Df899fpy.js → supplier-evd71Y1H.js} +1 -1
  33. package/dist/tsconfig.app.tsbuildinfo +1 -1
  34. package/dist/{use-inventory-binding-dialog-CYQrVeOf.js → use-inventory-binding-dialog-CGuXojFC.js} +2 -2
  35. package/dist/{xlsx-DqpZNivg.js → xlsx-DpBw8KA4.js} +636 -636
  36. package/package.json +8 -3
@@ -1,15 +1,15 @@
1
- import { defineComponent as N, ref as R, onMounted as le, resolveComponent as x, openBlock as w, createElementBlock as A, Fragment as ie, createElementVNode as g, toDisplayString as re, createVNode as v, createCommentVNode as j, computed as S, watch as ce, createBlock as T, withCtx as $, unref as b, isRef as Z, normalizeStyle as ue, Teleport as de, normalizeProps as me, guardReactiveProps as pe } from "vue";
2
- import { u as I, c as K, S as fe, b as ee, e as ve } from "./app-D_R27XfK.js";
1
+ import { defineComponent as N, ref as R, onMounted as le, resolveComponent as x, openBlock as w, createElementBlock as A, Fragment as re, createElementVNode as g, toDisplayString as ie, createVNode as v, createCommentVNode as j, computed as S, watch as ce, createBlock as T, withCtx as $, unref as b, isRef as Z, normalizeStyle as ue, Teleport as de, normalizeProps as me, guardReactiveProps as pe } from "vue";
2
+ import { u as I, c as K, S as fe, b as ee, e as ve } from "./app-DM4Thqjw.js";
3
3
  import { useDialog as _e, useSnackbar as ae, useProxiedModel as te, useBreakpoints as ye } from "@feedmepos/ui-library";
4
4
  import { i as ge, _ as be } from "./is-linked-ingredient-error-C6AghEwR.js";
5
5
  import { F as h, D as oe, R as z } from "./row-action.enum-BwQbURNh.js";
6
- import { _ as se } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-DS9A38-m.js";
7
- import { c as he, _ as we, F as ne, u as xe } from "./layout-Cf3iZuvk.js";
8
- import { a as q, f as Re } from "./date2-CsVyh2xw.js";
6
+ import { _ as se } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-BIww2Noe.js";
7
+ import { c as he, _ as we, F as ne, u as xe } from "./layout-kY567oHX.js";
8
+ import { a as q, f as Re } from "./date2-DpU4LDaP.js";
9
9
  import { _ as ke } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CFjO4TPG.js";
10
- import { R as Ce, U as Ee } from "./rules-QzzL5oLu.js";
11
- import { _ as Se } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-BqkpGRQG.js";
12
- import { u as H, w as Fe } from "./xlsx-DqpZNivg.js";
10
+ import { R as Ce, U as Ee } from "./rules-CVxh5XVG.js";
11
+ import { _ as Se } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-39U8Iavr.js";
12
+ import { u as H, w as Fe } from "./xlsx-DpBw8KA4.js";
13
13
  const Ve = {
14
14
  key: 0,
15
15
  class: "flex flex-col items-center w-full h-full gap-24"
@@ -24,16 +24,16 @@ const Ve = {
24
24
  setup(p) {
25
25
  const u = p, f = R(u.bindedItems || []), n = R(!1);
26
26
  le(() => {
27
- r();
27
+ i();
28
28
  });
29
- async function r() {
29
+ async function i() {
30
30
  var a, d;
31
31
  !n.value && ((a = u.data) != null && a._id) && (n.value = !0, f.value = await I().getAffectedMenu((d = u.data) == null ? void 0 : d._id), n.value = !1);
32
32
  }
33
33
  return (a, d) => {
34
34
  const l = x("FmSpacer"), c = x("FmCircularProgress");
35
- return w(), A(ie, null, [
36
- g("p", null, re(a.message), 1),
35
+ return w(), A(re, null, [
36
+ g("p", null, ie(a.message), 1),
37
37
  n.value ? (w(), A("div", Ve, [
38
38
  v(l),
39
39
  g("div", null, [
@@ -56,28 +56,28 @@ const Ve = {
56
56
  }
57
57
  });
58
58
  function Me() {
59
- const p = _e(), u = ae(), f = I(), n = R(!1), r = R();
59
+ const p = _e(), u = ae(), f = I(), n = R(!1), i = R();
60
60
  function a() {
61
61
  const e = {
62
62
  recipe: {},
63
63
  mode: h.CREATE,
64
64
  show: !0,
65
- "onUpdate:show"(i) {
66
- r.value.show = i;
65
+ "onUpdate:show"(r) {
66
+ i.value.show = r;
67
67
  }
68
68
  };
69
- r.value = e;
69
+ i.value = e;
70
70
  }
71
71
  async function d(e) {
72
- const i = {
72
+ const r = {
73
73
  recipe: K(e),
74
74
  mode: h.UPDATE,
75
75
  show: !0,
76
76
  "onUpdate:show"(y) {
77
- r.value.show = y;
77
+ i.value.show = y;
78
78
  }
79
79
  };
80
- r.value = i;
80
+ i.value = r;
81
81
  }
82
82
  async function l(e) {
83
83
  n.value = !0;
@@ -87,23 +87,23 @@ function Me() {
87
87
  message: `Deleted ${e.name}`,
88
88
  type: "success"
89
89
  });
90
- } catch (i) {
91
- i instanceof fe && ge(i) ? p.open({
90
+ } catch (r) {
91
+ r instanceof fe && ge(r) ? p.open({
92
92
  title: "Cannot delete recipe",
93
93
  contentComponent: be,
94
94
  contentComponentProps: {
95
95
  subject: (e == null ? void 0 : e.name) ?? "",
96
- items: i.errorResponse.message
96
+ items: r.errorResponse.message
97
97
  },
98
98
  secondaryActions: {
99
99
  text: "Close",
100
100
  close: !0
101
101
  }
102
- }) : console.log("unable to delete recipe", i), u.open({
102
+ }) : console.log("unable to delete recipe", r), u.open({
103
103
  title: `Cannot delete ${e == null ? void 0 : e.name}`,
104
104
  message: "Please try again.",
105
105
  type: "error"
106
- }), console.error("failed to delete recipe", i);
106
+ }), console.error("failed to delete recipe", r);
107
107
  } finally {
108
108
  n.value = !1;
109
109
  }
@@ -133,7 +133,7 @@ function Me() {
133
133
  createRecipe: a,
134
134
  updateRecipe: d,
135
135
  deleteRecipe: c,
136
- recipeDialogProps: r,
136
+ recipeDialogProps: i,
137
137
  recipeViewLoading: n
138
138
  };
139
139
  }
@@ -182,19 +182,19 @@ function Ue({
182
182
  }
183
183
  }
184
184
  ];
185
- function r(a) {
185
+ function i(a) {
186
186
  const d = I();
187
187
  return a.map((l) => ({
188
188
  recipe: l.name,
189
189
  ingredients: l.contains.map((c) => {
190
- var i, y;
190
+ var r, y;
191
191
  const e = d.skuById[c.id];
192
- return e ? `${e.name} (${q(c.amount)}${((i = c.measurement) == null ? void 0 : i.abbrev) ?? ((y = e == null ? void 0 : e.unit) == null ? void 0 : y.abbrev)})` : null;
192
+ return e ? `${e.name} (${q(c.amount)}${((r = c.measurement) == null ? void 0 : r.abbrev) ?? ((y = e == null ? void 0 : e.unit) == null ? void 0 : y.abbrev)})` : null;
193
193
  }).filter((c) => c).join(", "),
194
194
  original: l
195
195
  }));
196
196
  }
197
- return { columnDefs: n, formatRowData: r };
197
+ return { columnDefs: n, formatRowData: i };
198
198
  }
199
199
  const Be = { class: "flex flex-col gap-40" }, Le = {
200
200
  key: 0,
@@ -212,14 +212,14 @@ const Be = { class: "flex flex-col gap-40" }, Le = {
212
212
  emits: ["update:modelValue", "click:submit"],
213
213
  setup(p, { expose: u, emit: f }) {
214
214
  var C;
215
- const n = p, r = f, a = S({
215
+ const n = p, i = f, a = S({
216
216
  get() {
217
217
  var t;
218
218
  return ((t = n.modelValue) == null ? void 0 : t.name) ?? "";
219
219
  },
220
220
  set(t) {
221
221
  const o = n.modelValue ?? {};
222
- o.name = t, r("update:modelValue", o);
222
+ o.name = t, i("update:modelValue", o);
223
223
  }
224
224
  }), d = S({
225
225
  get() {
@@ -228,11 +228,11 @@ const Be = { class: "flex flex-col gap-40" }, Le = {
228
228
  },
229
229
  set(t) {
230
230
  const o = n.modelValue ?? {};
231
- o.contains = t, r("update:modelValue", o);
231
+ o.contains = t, i("update:modelValue", o);
232
232
  }
233
233
  });
234
234
  function l() {
235
- r("click:submit");
235
+ i("click:submit");
236
236
  }
237
237
  const c = R();
238
238
  u({
@@ -249,13 +249,13 @@ const Be = { class: "flex flex-col gap-40" }, Le = {
249
249
  (o = (t = c.value) == null ? void 0 : t.resetInputs) == null || o.call(t);
250
250
  }
251
251
  });
252
- const e = I(), i = R([]), y = R(!1), m = R(!1);
252
+ const e = I(), r = R([]), y = R(!1), m = R(!1);
253
253
  ce(y, async (t) => {
254
254
  k(t);
255
255
  });
256
256
  async function k(t) {
257
257
  var o, V;
258
- t && !m.value && ((o = n.modelValue) != null && o._id) && (m.value = !0, i.value = await e.getAffectedMenu((V = n.modelValue) == null ? void 0 : V._id), m.value = !1);
258
+ t && !m.value && ((o = n.modelValue) != null && o._id) && (m.value = !0, r.value = await e.getAffectedMenu((V = n.modelValue) == null ? void 0 : V._id), m.value = !1);
259
259
  }
260
260
  const s = S(
261
261
  () => e.recipes.map((t) => ({ label: t.name, value: t.name }))
@@ -316,10 +316,10 @@ const Be = { class: "flex flex-col gap-40" }, Le = {
316
316
  Ne,
317
317
  v(M)
318
318
  ])) : (w(), A("div", Ye, [
319
- y.value && i.value.length ? (w(), T(se, {
319
+ y.value && r.value.length ? (w(), T(se, {
320
320
  key: 0,
321
321
  name: "Menu",
322
- bindings: i.value
322
+ bindings: r.value
323
323
  }, null, 8, ["bindings"])) : j("", !0)
324
324
  ]))
325
325
  ])) : j("", !0)
@@ -337,14 +337,14 @@ const Be = { class: "flex flex-col gap-40" }, Le = {
337
337
  },
338
338
  emits: ["update:show"],
339
339
  setup(p) {
340
- const u = p, f = I(), n = ae(), r = te(u, "show"), a = te(u, "recipe"), d = S(() => {
340
+ const u = p, f = I(), n = ae(), i = te(u, "show"), a = te(u, "recipe"), d = S(() => {
341
341
  switch (u.mode) {
342
342
  case h.READ:
343
- return "View Recipe";
343
+ return "View recipe";
344
344
  case h.UPDATE:
345
- return "Edit Recipe";
345
+ return "Edit recipe";
346
346
  case h.CREATE:
347
- return "Add Recipe";
347
+ return "Add recipe";
348
348
  }
349
349
  return "";
350
350
  }), l = S(() => {
@@ -358,11 +358,11 @@ const Be = { class: "flex flex-col gap-40" }, Le = {
358
358
  }
359
359
  return "";
360
360
  }), c = R(), e = R(!1);
361
- async function i() {
361
+ async function r() {
362
362
  e.value = !0;
363
363
  try {
364
364
  const s = K(a.value);
365
- s.precision ?? (s.precision = 0), s.measurements ?? (s.measurements = []), await f.createRecipe(s), r.value = !1, n.open({
365
+ s.precision ?? (s.precision = 0), s.measurements ?? (s.measurements = []), await f.createRecipe(s), i.value = !1, n.open({
366
366
  title: "Success",
367
367
  message: "Created " + a.value.name,
368
368
  type: "success"
@@ -380,7 +380,7 @@ const Be = { class: "flex flex-col gap-40" }, Le = {
380
380
  async function y() {
381
381
  e.value = !0;
382
382
  try {
383
- await f.updateRecipe(a.value), r.value = !1, n.open({
383
+ await f.updateRecipe(a.value), i.value = !1, n.open({
384
384
  title: "Success",
385
385
  message: "Updated " + a.value.name,
386
386
  type: "success"
@@ -406,14 +406,14 @@ const Be = { class: "flex flex-col gap-40" }, Le = {
406
406
  case h.UPDATE:
407
407
  return y();
408
408
  case h.CREATE:
409
- return i();
409
+ return r();
410
410
  }
411
411
  }
412
412
  return (s, _) => {
413
413
  const C = x("FmButton"), t = x("FmSideSheet");
414
414
  return w(), T(t, {
415
- "model-value": b(r),
416
- "onUpdate:modelValue": _[3] || (_[3] = (o) => Z(r) ? r.value = o : null),
415
+ "model-value": b(i),
416
+ "onUpdate:modelValue": _[3] || (_[3] = (o) => Z(i) ? i.value = o : null),
417
417
  header: d.value,
418
418
  "close-button": "",
419
419
  "dismiss-away": "",
@@ -430,7 +430,7 @@ const Be = { class: "flex flex-col gap-40" }, Le = {
430
430
  disabled: e.value,
431
431
  label: "Close",
432
432
  variant: "tertiary",
433
- onClick: _[2] || (_[2] = (o) => r.value = !1)
433
+ onClick: _[2] || (_[2] = (o) => i.value = !1)
434
434
  }, null, 8, ["disabled"])
435
435
  ])
436
436
  ]),
@@ -452,8 +452,8 @@ const Be = { class: "flex flex-col gap-40" }, Le = {
452
452
  }
453
453
  });
454
454
  function Ke(p, u, f = "Sheet1") {
455
- const n = H.aoa_to_sheet([u, ...p]), r = p.reduce((l, c) => Math.max(l, c.length), 0), a = Array.from({ length: r }).map((l, c) => {
456
- const e = p.map((i) => `${i[c]}`).reduce((i, y) => Math.max(i, y.length), 0);
455
+ const n = H.aoa_to_sheet([u, ...p]), i = p.reduce((l, c) => Math.max(l, c.length), 0), a = Array.from({ length: i }).map((l, c) => {
456
+ const e = p.map((r) => `${r[c]}`).reduce((r, y) => Math.max(r, y.length), 0);
457
457
  return {
458
458
  wch: Math.max(e, 5)
459
459
  };
@@ -466,13 +466,13 @@ function Xe(p, u) {
466
466
  Fe(p, u, { compression: !0 });
467
467
  }
468
468
  function Ge() {
469
- const p = I(), u = p.recipes, f = p.recipeById, n = p.skuById, r = u.flatMap((l, c) => {
469
+ const p = I(), u = p.recipes, f = p.recipeById, n = p.skuById, i = u.flatMap((l, c) => {
470
470
  var e;
471
471
  if ((e = l.contains) != null && e.length) {
472
- const i = l.contains.filter((m) => m.type === "RECIPE"), y = l.contains.filter((m) => m.type === "SKU");
472
+ const r = l.contains.filter((m) => m.type === "RECIPE"), y = l.contains.filter((m) => m.type === "SKU");
473
473
  return [
474
474
  ...c === 0 ? [] : [["", "", "", "", ""]],
475
- ...i.map(
475
+ ...r.map(
476
476
  (m, k) => {
477
477
  var s;
478
478
  return [
@@ -488,7 +488,7 @@ function Ge() {
488
488
  (m, k) => {
489
489
  var s, _, C;
490
490
  return [
491
- !i.length && k === 0 ? l.name : "",
491
+ !r.length && k === 0 ? l.name : "",
492
492
  "INGREDIENT",
493
493
  (s = n[m.id]) == null ? void 0 : s.name,
494
494
  q(m.amount),
@@ -502,18 +502,18 @@ function Ge() {
502
502
  ...c === 0 ? [] : [["", "", "", "", ""]],
503
503
  [l.name, "No bindings", "", "", ""]
504
504
  ];
505
- }), d = Ke(r, ["Name", "Type", "Item", "Amount", "Unit"]);
505
+ }), d = Ke(i, ["Name", "Type", "Item", "Amount", "Unit"]);
506
506
  Xe(d, `RECIPE_${Re(/* @__PURE__ */ new Date(), "-", "-")}.xlsx`);
507
507
  }
508
508
  const Je = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, Oe = { class: "px-8 flex items-center xs:gap-0 xs:flex-col-reverse sm:gap-0 sm:flex-col-reverse" }, Qe = { class: "flex-1 w-full" }, We = { class: "flex flex-col py-8" }, Ze = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, et = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pt = /* @__PURE__ */ N({
509
509
  __name: "RecipeView",
510
510
  setup(p) {
511
- const u = I(), f = S(() => u.recipes), n = ve(), { createRecipe: r, updateRecipe: a, deleteRecipe: d, recipeDialogProps: l, recipeViewLoading: c } = Me(), { columnDefs: e, formatRowData: i } = Ue({
511
+ const u = I(), f = S(() => u.recipes), n = ve(), { createRecipe: i, updateRecipe: a, deleteRecipe: d, recipeDialogProps: l, recipeViewLoading: c } = Me(), { columnDefs: e, formatRowData: r } = Ue({
512
512
  updateRecipe: a,
513
513
  deleteRecipe: d
514
- }), y = S(() => i(f.value));
514
+ }), y = S(() => r(f.value));
515
515
  function m(V) {
516
- V === "add" && r();
516
+ V === "add" && i();
517
517
  }
518
518
  const k = R(""), s = S(() => c.value), _ = {
519
519
  label: "Export",