@feedmepos/mf-inventory-portal 0.0.23-dev.19 → 0.0.23-dev.20

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 (77) hide show
  1. package/dist/{App-DY01VbHo.js → App-N2myASr3.js} +44 -41
  2. package/dist/{ApprovalView-DtwXb5T7.js → ApprovalView-B87DpnNq.js} +20 -23
  3. package/dist/{BindingsDialog-ClnnwUTV.js → BindingsDialog-DehCgt1T.js} +7 -7
  4. package/dist/{BindingsPicker-DbdkXiHx.js → BindingsPicker-BBtJ3rBB.js} +7 -8
  5. package/dist/{BindingsTable-Cqh3Ku0d.js → BindingsTable-CfHuy-K1.js} +16 -20
  6. package/dist/{ClosingDraftView-CzuMTeC1.js → ClosingDraftView-BYZ1mZrG.js} +190 -196
  7. package/dist/{ClosingTemplateView-CVQlOya4.js → ClosingTemplateView-CAL9jYaf.js} +49 -60
  8. package/dist/{FmDroppableField-8RzKjEdL.js → FmDroppableField-CC7RiBoR.js} +1 -1
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BO1wCa9i.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C4G9LaXv.js} +24 -25
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-sgvBxxkn.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BBf7jmJz.js} +56 -57
  11. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D7uvrzFU.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DjTvrLPs.js} +7 -7
  12. package/dist/{IngredientGroupView-DgDZnggI.js → IngredientGroupView-X0ST4tW9.js} +30 -37
  13. package/dist/{IngredientsView-SuCckJrj.js → IngredientsView-BUJXzpVr.js} +106 -112
  14. package/dist/{IntegrationView-CZQoHCkX.js → IntegrationView-QbuIwjec.js} +63 -65
  15. package/dist/{InventoryBindingForm-C-E3EINv.js → InventoryBindingForm-C1BR_h_3.js} +1 -1
  16. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-B3nsmCuj.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CRwcFskQ.js} +18 -20
  17. package/dist/{InventoryBindingSummary-DNiOKfO8.js → InventoryBindingSummary-gn3Gq1ok.js} +1 -1
  18. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CdYa8Pv2.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-GY3FFm5_.js} +1 -1
  19. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BwxgZ-vM.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DVwtuUg9.js} +8 -8
  20. package/dist/{PurchaseOrderPrintPreview-C6i2S9L-.js → PurchaseOrderPrintPreview-FuOYaO56.js} +13 -14
  21. package/dist/{ReceiveRequestView-BABjGvIn.js → ReceiveRequestView-BNz1brve.js} +66 -75
  22. package/dist/{RecipeView-CoMcIuHu.js → RecipeView-DRKTODfC.js} +58 -64
  23. package/dist/{StockView-DhJshtaj.js → StockView-DnMcfkGG.js} +80 -87
  24. package/dist/{SupplierView-hQtDIQzE.js → SupplierView-DAnnWZUN.js} +45 -52
  25. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DsJUSZsm.js → TransferDetails.vue_vue_type_script_setup_true_lang-BBARPa0S.js} +103 -110
  26. package/dist/{TransferTemplateView-GzwT4hp-.js → TransferTemplateView-2qlKwwKg.js} +217 -227
  27. package/dist/{UnitView-CRMF6RWu.js → UnitView-u5wZGetF.js} +103 -108
  28. package/dist/{WarehouseView-AVEDff0v.js → WarehouseView-Z80N7FJV.js} +77 -84
  29. package/dist/api/adjustment-template.d.ts +23 -0
  30. package/dist/app-Fc2FPGhO.js +58871 -0
  31. package/dist/app.d.ts +51 -0
  32. package/dist/app.js +2 -2
  33. package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
  34. package/dist/composable/defineDeepModel.d.ts +1 -1
  35. package/dist/{decimal-N5ymnwhP.js → decimal-BDD-e5Lb.js} +1 -1
  36. package/dist/{feature-Bfq8yWgS.js → feature-BMEyYowI.js} +1 -1
  37. package/dist/{format-unit-display-CXawcmvj.js → format-unit-display-DvlR_z--.js} +205 -212
  38. package/dist/{index-CcCqc9jx.js → index-CR22QBdu.js} +1 -1
  39. package/dist/{netsuite-DX6L1oLu.js → netsuite-CqMWgzKo.js} +9 -9
  40. package/dist/router/name.d.ts +1 -0
  41. package/dist/{stock-Btlxmf8R.js → stock-sIy40ix1.js} +7 -8
  42. package/dist/style.css +1 -1
  43. package/dist/supplier-Cf24JqTH.js +77 -0
  44. package/dist/tsconfig.app.tsbuildinfo +1 -1
  45. package/dist/{use-inventory-binding-dialog-BFqxWNzX.js → use-inventory-binding-dialog-Br9Uv9o8.js} +10 -11
  46. package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
  47. package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
  48. package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
  49. package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
  50. package/dist/views/adjustment-template/wastage-template/actions.d.ts +1295 -0
  51. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
  52. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
  53. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
  54. package/dist/views/adjustment-template/wastage-template/props.d.ts +29 -0
  55. package/dist/views/adjustment-template/wastage-template/table.d.ts +1273 -0
  56. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
  57. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  58. package/dist/{xlsx-C3L2eW52.js → xlsx-sL0sD2HQ.js} +1 -1
  59. package/dist/{xlsx.util-CJKLCuWK.js → xlsx.util-D2Tdwf8J.js} +1 -1
  60. package/package.json +3 -3
  61. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-m92y5x0G.js +0 -436
  62. package/dist/FmMultiselectDialog-Jr9uL_z_.js +0 -415
  63. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
  64. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  65. package/dist/app-ww5ibHkL.js +0 -33540
  66. package/dist/date2-D5MTVjlP.js +0 -117
  67. package/dist/dayjs.min-7pwGJ2aW.js +0 -282
  68. package/dist/defineDeepModel-DJODEpcR.js +0 -13
  69. package/dist/form-mode.enum-BKiNVH6A.js +0 -4
  70. package/dist/format-time-from-id-0UkRUr39.js +0 -15
  71. package/dist/fuzzy-DdOiOd-q.js +0 -41
  72. package/dist/index-Cin_fxtb.js +0 -45
  73. package/dist/index-gvJJ-xRY.js +0 -22283
  74. package/dist/row-action.enum-7rGLGZ5v.js +0 -55
  75. package/dist/rules-C83wiSGb.js +0 -203
  76. package/dist/supplier-CSzla-9I.js +0 -77
  77. package/dist/use-template-enabled-locations-2-CUkqC-cd.js +0 -86
@@ -1,25 +1,18 @@
1
1
  import { defineComponent as mn, ref as Q, computed as w, resolveComponent as U, openBlock as B, createBlock as ne, withCtx as N, createElementVNode as m, normalizeClass as go, toDisplayString as I, createVNode as C, createElementBlock as ee, Fragment as Ue, renderList as an, unref as y, h as ro, watch as bo, isRef as Ei, createCommentVNode as Ce, reactive as va, onMounted as gr, normalizeStyle as br, createTextVNode as yt, Teleport as Pa, normalizeProps as Jo, mergeProps as xo } from "vue";
2
- import { i as Ia, u as Ca, _ as Aa, a as Ma } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-m92y5x0G.js";
3
- import { u as Qn, c as yi, a as fi, F as Zi, j as Ie, s as Ba, k as Da, l as r, m as b, n as Er, o as ao, f as Xi, C as ei } from "./app-ww5ibHkL.js";
4
- import { u as Ri, a as hi } from "./stock-Btlxmf8R.js";
5
- import { c as pa, _ as ja, F as Qi } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
6
- import { g as Eo } from "./decimal-N5ymnwhP.js";
7
- import { d as Na } from "./dayjs.min-7pwGJ2aW.js";
8
- import { e as Ua, u as yr, i as fr, _ as Ji } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-BwxgZ-vM.js";
9
- import { _ as _i, S as ni, g as Rr } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
10
- import { _ as ka } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
11
- import { useI18n as zn, useCoreStore as La } from "@feedmepos/mf-common";
12
- import { useSnackbar as Tt, useDialog as hr, useProxiedModel as Ti, useBreakpoints as Ga } from "@feedmepos/ui-library";
13
- import { defineStore as Ya } from "pinia";
14
- import { g as mi, a as On, b as Va, t as yo, d as zi, A as Ha, M as wa, c as ft, e as $a, f as xi, R as Ka, h as qa, i as Tr, j as Fi, k as Wa } from "./rules-C83wiSGb.js";
15
- import { u as Za } from "./use-inventory-binding-dialog-BFqxWNzX.js";
16
- import { F as Xa } from "./FmMultiselectDialog-Jr9uL_z_.js";
17
- import { F as ge } from "./index-gvJJ-xRY.js";
18
- import { _ as Qa } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CdYa8Pv2.js";
19
- import { a as Ja, f as Sr, t as xa, b as ed, p as nd, n as td, c as od } from "./date2-D5MTVjlP.js";
2
+ import { u as Qn, E as Ia, d as yi, e as Ca, a as fi, F as Zi, G as _i, h as On, y as Aa, t as Eo, B as mi, A as Ma, M as Ba, z as ft, H as Da, J as Ie, K as pa, L as Xi, k as ja, x as Na, N as Ua, O as ka, P as Er, Q as ge, T as La, n as yr, V as zi, W as r, X as b, Y as fr, Z as ao, $ as Ga, a0 as Ya, l as Qi, a1 as Va, a2 as Ha, C as ei, a3 as wa, a4 as $a, a5 as Ka, p as qa, q as Wa, r as Za, s as Xa, v as Ji } from "./app-Fc2FPGhO.js";
3
+ import { u as Ri, a as hi } from "./stock-sIy40ix1.js";
4
+ import { g as yo } from "./decimal-BDD-e5Lb.js";
5
+ import { e as Qa, u as Rr, i as hr, _ as xi } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-DVwtuUg9.js";
6
+ import { _ as Fi, S as ni, g as Tr } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
7
+ import { _ as Ja } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
8
+ import { useI18n as zn, useCoreStore as xa } from "@feedmepos/mf-common";
9
+ import { useSnackbar as Tt, useDialog as Sr, useProxiedModel as Ti, useBreakpoints as ed } from "@feedmepos/ui-library";
10
+ import { defineStore as nd } from "pinia";
11
+ import { u as td } from "./use-inventory-binding-dialog-Br9Uv9o8.js";
12
+ import { _ as od } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-GY3FFm5_.js";
20
13
  import { E as id } from "./empty-placeholder-wf6-BWE8.js";
21
14
  import "./array-hChJVZLE.js";
22
- import { u as rd } from "./feature-Bfq8yWgS.js";
15
+ import { u as rd } from "./feature-BMEyYowI.js";
23
16
  var zo = /* @__PURE__ */ ((n) => (n.History = "History", n.Convert = "Convert", n.Adjust = "Adjust", n))(zo || {});
24
17
  const ad = [
25
18
  {
@@ -52,8 +45,8 @@ async function ld(n) {
52
45
  const e = `${(Qn().currentLocation.name || "").replace(
53
46
  / /g,
54
47
  "_"
55
- )}_${Na().format("DD_MM_YYYY_HHmm")}.xlsx`;
56
- await Ua(
48
+ )}_${Ia().format("DD_MM_YYYY_HHmm")}.xlsx`;
49
+ await Qa(
57
50
  [
58
51
  {
59
52
  name: "stock",
@@ -71,7 +64,7 @@ async function ld(n) {
71
64
  name: "Balance",
72
65
  selector: (o) => {
73
66
  const i = fo(o, o.unit);
74
- return i.type === "unit" ? Eo(o.balance, o.unit, null, !1) : Eo(o.balance, o.unit, i.measurement, !1);
67
+ return i.type === "unit" ? yo(o.balance, o.unit, null, !1) : yo(o.balance, o.unit, i.measurement, !1);
75
68
  }
76
69
  },
77
70
  {
@@ -124,11 +117,11 @@ const sd = { class: "fm-typo-en-body-md-400 flex-grow" }, Or = /* @__PURE__ */ m
124
117
  const { measurements: z } = o.unit;
125
118
  return [
126
119
  {
127
- label: `${Eo(o.amount, o.unit)}`,
120
+ label: `${yo(o.amount, o.unit)}`,
128
121
  value: null
129
122
  },
130
123
  ...z.map(({ id: s }) => ({
131
- label: `${Eo(o.amount, o.unit, s)}`,
124
+ label: `${yo(o.amount, o.unit, s)}`,
132
125
  value: s
133
126
  }))
134
127
  ];
@@ -179,15 +172,15 @@ const sd = { class: "fm-typo-en-body-md-400 flex-grow" }, Or = /* @__PURE__ */ m
179
172
  __name: "StockHeaderPreview",
180
173
  setup(n) {
181
174
  const { t } = zn();
182
- return (e, o) => (B(), ne(ka, null, {
175
+ return (e, o) => (B(), ne(Ja, null, {
183
176
  default: N(() => [
184
177
  m("div", ud, I(y(t)("inventory.stock.prediction.daysRemaining")), 1)
185
178
  ]),
186
179
  _: 1
187
180
  }));
188
181
  }
189
- }), vr = Ya("stockActions", () => {
190
- const n = Q(!1), t = Qn(), e = Ri(), o = yr(), i = Tt(), d = hr(), { t: a } = zn();
182
+ }), vr = nd("stockActions", () => {
183
+ const n = Q(!1), t = Qn(), e = Ri(), o = Rr(), i = Tt(), d = Sr(), { t: a } = zn();
191
184
  async function l() {
192
185
  if (t._currentLocation) {
193
186
  n.value = !0;
@@ -315,11 +308,11 @@ function _d() {
315
308
  var s, u;
316
309
  const d = i.row.original.day, a = (s = i.row.original.thresholds) == null ? void 0 : s.low, l = (u = i.row.original.thresholds) == null ? void 0 : u.mid;
317
310
  if (typeof d != "number" || typeof a != "number" || typeof l != "number")
318
- return ro(_i, {
311
+ return ro(Fi, {
319
312
  days: d
320
313
  });
321
314
  const F = d <= a ? ni.low : d <= l ? ni.mid : ni.high;
322
- return ro(_i, {
315
+ return ro(Fi, {
323
316
  days: d,
324
317
  level: F
325
318
  });
@@ -330,7 +323,7 @@ function _d() {
330
323
  id: "action",
331
324
  cell(i) {
332
325
  var d;
333
- return pa(
326
+ return Ca(
334
327
  ((d = n._currentLocation) == null ? void 0 : d.type) === "restaurant" ? ad : dd,
335
328
  (a) => t.onActionMenu(a, i.row.original)
336
329
  );
@@ -391,7 +384,7 @@ const zd = { class: "flex items-center" }, Fd = { class: "fm-typo-en-title-md-80
391
384
  },
392
385
  emits: ["update:show", "submitted"],
393
386
  setup(n, { expose: t, emit: e }) {
394
- const o = n, i = e, d = Za(), a = fi(), l = hi(), F = Tt(), { t: z } = zn(), s = Q(0), u = Q(null), R = w(() => a.skus), v = w(
387
+ const o = n, i = e, d = td(), a = fi(), l = hi(), F = Tt(), { t: z } = zn(), s = Q(0), u = Q(null), R = w(() => a.skus), v = w(
395
388
  () => {
396
389
  var _, c;
397
390
  return (((c = (_ = o.sku) == null ? void 0 : _.convert) == null ? void 0 : c.inventoryBindings) ?? []).filter(
@@ -410,7 +403,7 @@ const zd = { class: "flex items-center" }, Fd = { class: "fm-typo-en-title-md-80
410
403
  _ && (s.value = 0);
411
404
  });
412
405
  function A() {
413
- _e(o.sku, yo(s.value), u.value);
406
+ _e(o.sku, Eo(s.value), u.value);
414
407
  }
415
408
  function L(_) {
416
409
  if (u.value)
@@ -423,7 +416,7 @@ const zd = { class: "flex items-center" }, Fd = { class: "fm-typo-en-title-md-80
423
416
  const c = (S = o.sku.convert) != null && S.measurement ? o.sku.unit.measurements.find((j) => {
424
417
  var oe;
425
418
  return j.id === ((oe = o.sku.convert) == null ? void 0 : oe.measurement);
426
- }) ?? null : null, h = mi(o.sku.unit, c), E = $a(+_);
419
+ }) ?? null : null, h = _i(o.sku.unit, c), E = Da(+_);
427
420
  return er(E).isInteger().max(h).error ? "Precision cannot be more than " + h : !0;
428
421
  }
429
422
  const T = w(
@@ -442,10 +435,10 @@ const zd = { class: "flex items-center" }, Fd = { class: "fm-typo-en-title-md-80
442
435
  const j = a.skus.find((zt) => zt._id === S.id), oe = ((Pe = S.measurement) == null ? void 0 : Pe.abbrev) ?? ((me = j == null ? void 0 : j.unit) == null ? void 0 : me.abbrev), ve = (we = o.sku.convert) != null && we.measurement ? o.sku.unit.measurements.find((zt) => {
443
436
  var Wi;
444
437
  return zt.id === ((Wi = o.sku.convert) == null ? void 0 : Wi.measurement);
445
- }) ?? null : null, mt = mi(o.sku.unit, ve), Y = D(`${s.value}`) === !0 ? On(
446
- Va(
438
+ }) ?? null : null, mt = _i(o.sku.unit, ve), Y = D(`${s.value}`) === !0 ? On(
439
+ Aa(
447
440
  S.amount,
448
- yo(+s.value, mt)
441
+ Eo(+s.value, mt)
449
442
  ),
450
443
  !1
451
444
  ) : "0", re = (qi = (Ki = u.value) == null ? void 0 : Ki.find((zt) => zt.id === (j == null ? void 0 : j._id))) == null ? void 0 : qi.amount, Te = re ? On(re, !1) : null;
@@ -507,7 +500,7 @@ const zd = { class: "flex items-center" }, Fd = { class: "fm-typo-en-title-md-80
507
500
  }
508
501
  function J(_) {
509
502
  const c = R.value.find((h) => h._id === _);
510
- return c ? Rr(c.unit, !0) : [];
503
+ return c ? Tr(c.unit, !0) : [];
511
504
  }
512
505
  function K(_, c) {
513
506
  const h = J(_), E = h.find((O) => O.value === c) ?? h.find((O) => O.value === null);
@@ -575,7 +568,7 @@ const zd = { class: "flex items-center" }, Fd = { class: "fm-typo-en-title-md-80
575
568
  "model-value": s.value,
576
569
  "onUpdate:modelValue": c[0] || (c[0] = (Y) => s.value = Y),
577
570
  label: y(z)("inventory.stock.convert.amount"),
578
- rules: [L, D, y(zi)(0)],
571
+ rules: [L, D, y(mi)(0)],
579
572
  "append-text": T.value,
580
573
  "helper-text": u.value ? void 0 : `Max ${_.maxCount} ${T.value}`
581
574
  }, null, 8, ["disabled", "model-value", "label", "rules", "append-text", "helper-text"])
@@ -616,7 +609,7 @@ const zd = { class: "flex items-center" }, Fd = { class: "fm-typo-en-title-md-80
616
609
  f.value ? (B(), ee(Ue, { key: 0 }, [
617
610
  C(j, {
618
611
  modelValue: u.value,
619
- rules: [y(Ha)(1, "Must have at least one ingredient binding")]
612
+ rules: [y(Ma)(1, "Must have at least one ingredient binding")]
620
613
  }, null, 8, ["modelValue", "rules"]),
621
614
  m("div", hd, [
622
615
  m("div", Td, I(y(z)("inventory.stock.convert.ingredients")), 1),
@@ -625,11 +618,11 @@ const zd = { class: "flex items-center" }, Fd = { class: "fm-typo-en-title-md-80
625
618
  disabled: g.value,
626
619
  modelValue: +y(On)(Y.amount ?? { amount: 1, precision: 0 }),
627
620
  rules: [
628
- y(wa)(
621
+ y(Ba)(
629
622
  R.value.find((re) => re._id === Y.id).unit,
630
623
  Y.measurement
631
624
  ),
632
- y(zi)(0)
625
+ y(mi)(0)
633
626
  ]
634
627
  }, {
635
628
  default: N(({ invalid: re }) => {
@@ -703,11 +696,11 @@ const zd = { class: "flex items-center" }, Fd = { class: "fm-typo-en-title-md-80
703
696
  }
704
697
  });
705
698
  function ti(n, t) {
706
- const e = yo(n, t);
699
+ const e = Eo(n, t);
707
700
  return { ...e, amount: -e.amount };
708
701
  }
709
702
  function nr(n, t) {
710
- return yo(Math.abs(n), t);
703
+ return Eo(Math.abs(n), t);
711
704
  }
712
705
  const oi = {
713
706
  [Ie.enum.DAMAGE]: {
@@ -740,10 +733,10 @@ const oi = {
740
733
  setup(n, { emit: t }) {
741
734
  const e = n, o = t, i = w(
742
735
  () => Object.keys(oi).map((s) => ({
743
- label: Ba(s),
736
+ label: pa(s),
744
737
  value: s
745
738
  }))
746
- ), d = w(() => Rr(e.modelValue.doc.unit, !0)), a = w({
739
+ ), d = w(() => Tr(e.modelValue.doc.unit, !0)), a = w({
747
740
  get() {
748
741
  return e.modelValue.type ?? Ie.enum.PURCHASE;
749
742
  },
@@ -752,7 +745,7 @@ const oi = {
752
745
  ...e.modelValue
753
746
  };
754
747
  u.type = s;
755
- const R = xi(e.modelValue.amount);
748
+ const R = Xi(e.modelValue.amount);
756
749
  u.amount = oi[u.type].toAdjustmentAmount(
757
750
  +On(R),
758
751
  R.precision
@@ -760,7 +753,7 @@ const oi = {
760
753
  }
761
754
  }), l = w({
762
755
  get() {
763
- const s = xi(e.modelValue.amount);
756
+ const s = Xi(e.modelValue.amount);
764
757
  return +On(s);
765
758
  },
766
759
  set(s) {
@@ -817,19 +810,19 @@ const oi = {
817
810
  items: i.value,
818
811
  modelValue: a.value,
819
812
  "onUpdate:modelValue": u[1] || (u[1] = (A) => a.value = A),
820
- rules: [y(Ka)()],
813
+ rules: [y(ja)()],
821
814
  "label-mark": "required"
822
815
  }, null, 8, ["disabled", "items", "modelValue", "rules"]),
823
- C(Qa, {
816
+ C(od, {
824
817
  disabled: s.disabled,
825
818
  label: "Amount",
826
819
  step: +y(On)({
827
820
  amount: 1,
828
- precision: y(mi)(s.modelValue.doc.unit, s.modelValue.measurement)
821
+ precision: y(_i)(s.modelValue.doc.unit, s.modelValue.measurement)
829
822
  }),
830
823
  modelValue: l.value,
831
824
  "onUpdate:modelValue": u[2] || (u[2] = (A) => l.value = A),
832
- rules: [y(zi)(0)]
825
+ rules: [y(mi)(0)]
833
826
  }, null, 8, ["disabled", "step", "modelValue", "rules"]),
834
827
  C(v, {
835
828
  disabled: s.disabled,
@@ -859,7 +852,7 @@ const oi = {
859
852
  },
860
853
  emits: ["update:show", "submitted"],
861
854
  setup(n, { expose: t, emit: e }) {
862
- const o = n, i = e, d = fi(), a = hr(), l = hi(), F = Tt(), z = Q(!1), { t: s } = zn();
855
+ const o = n, i = e, d = fi(), a = Sr(), l = hi(), F = Tt(), z = Q(!1), { t: s } = zn();
863
856
  function u() {
864
857
  g(yi(f));
865
858
  }
@@ -935,7 +928,7 @@ const oi = {
935
928
  })), T = D.filter((p) => f.adjustments.find((G) => G.doc._id === p.value)).map((p) => p.value);
936
929
  a.open({
937
930
  title: "Select ingredients",
938
- contentComponent: Xa,
931
+ contentComponent: Na,
939
932
  contentComponentProps: {
940
933
  items: D,
941
934
  modelValue: T
@@ -1029,7 +1022,7 @@ const oi = {
1029
1022
  }, 8, ["modelValue"]);
1030
1023
  };
1031
1024
  }
1032
- }), Ud = Da((n, t) => ({
1025
+ }), Ud = Ua((n, t) => ({
1033
1026
  // TODO: remove once latest inventory backend has been push
1034
1027
  async findBillsByBusinessId(e, o, i) {
1035
1028
  const d = `${n.businessesBackendUrl}/${e}/reports/find-many`, a = {
@@ -1075,8 +1068,8 @@ const oi = {
1075
1068
  return ((A = g.skus) == null ? void 0 : A.filter((L) => L.sku._id === s._id)) ?? [];
1076
1069
  }).flatMap((g) => g.amounts);
1077
1070
  for (const g of v) {
1078
- const A = g.measurement ? qa(g.measurement.conversion, g.amount) : g.amount;
1079
- u[f = g.type] ?? (u[f] = { amount: 0, precision: 0 }), u[g.type] = Tr(A, u[g.type]);
1071
+ const A = g.measurement ? ka(g.measurement.conversion, g.amount) : g.amount;
1072
+ u[f = g.type] ?? (u[f] = { amount: 0, precision: 0 }), u[g.type] = Er(A, u[g.type]);
1080
1073
  }
1081
1074
  return Object.entries(u).reduce(
1082
1075
  (g, [A, L]) => (g[A] = /// comment, because without it formatter makes code uglier
@@ -1087,14 +1080,14 @@ const oi = {
1087
1080
  {}
1088
1081
  );
1089
1082
  }), { t: l } = zn(), F = w(() => t.record.adjustmentsByTime.map(({ date: z, adjustments: s }) => ({
1090
- time: Ja(new Date(z)),
1083
+ time: La(new Date(z)),
1091
1084
  adjustments: s.flatMap(
1092
1085
  (u) => {
1093
1086
  var R, v;
1094
1087
  return ((v = (R = u.skus) == null ? void 0 : R.map) == null ? void 0 : v.call(R, (f) => ({
1095
1088
  ...f,
1096
1089
  ref: u.ref,
1097
- backdateFrom: u.effectiveAt != null ? fr(u._id) : null
1090
+ backdateFrom: u.effectiveAt != null ? hr(u._id) : null
1098
1091
  }))) ?? [];
1099
1092
  }
1100
1093
  ).flatMap((u) => {
@@ -1172,7 +1165,7 @@ const oi = {
1172
1165
  "z-index": 50
1173
1166
  }, {
1174
1167
  content: N(() => [
1175
- m("div", $d, I(y(l)("inventory.stock.record.backdate", [y(Sr)(new Date(g.backdateFrom))])), 1)
1168
+ m("div", $d, I(y(l)("inventory.stock.record.backdate", [y(yr)(new Date(g.backdateFrom))])), 1)
1176
1169
  ]),
1177
1170
  default: N(() => [
1178
1171
  C(u, {
@@ -1192,7 +1185,7 @@ const oi = {
1192
1185
  "ml-auto": !0
1193
1186
  })
1194
1187
  }, I(g.amount), 3),
1195
- g.cost ? (B(), ee("div", qd, " (" + I(y(Fi)(g.cost, !1, g.cost.precision)) + ") ", 1)) : Ce("", !0)
1188
+ g.cost ? (B(), ee("div", qd, " (" + I(y(zi)(g.cost, !1, g.cost.precision)) + ") ", 1)) : Ce("", !0)
1196
1189
  ]))), 128))
1197
1190
  ])
1198
1191
  ]))), 128))
@@ -1442,7 +1435,7 @@ var be = {};
1442
1435
  var Re = {}, Se = {};
1443
1436
  Object.defineProperty(Se, "__esModule", { value: !0 });
1444
1437
  Se.F_CHECKOUT_TYPE = Se.F_PAYMENT_ISSUER = Se.F_PAYMENT_NAME = Se.F_ONLINE_PAYMENT_CHANNEL_TYPE = void 0;
1445
- const tr = Er, ho = r;
1438
+ const tr = fr, ho = r;
1446
1439
  Se.F_ONLINE_PAYMENT_CHANNEL_TYPE = ho.z.enum([
1447
1440
  "Internet Banking",
1448
1441
  "Credit Card",
@@ -5185,7 +5178,7 @@ var Ui = {};
5185
5178
  var ki = {}, Me = {};
5186
5179
  Object.defineProperty(Me, "__esModule", { value: !0 });
5187
5180
  Me.RM_PAYMENT_TRANSACTION_ITEM_STATUS = Me.RM_PAYMENY_METHOD = Me.RM_REGION = Me.RM_CURRENCY_TYPE = void 0;
5188
- const Yo = r, Li = Er;
5181
+ const Yo = r, Li = fr;
5189
5182
  Me.RM_CURRENCY_TYPE = Yo.z.nativeEnum(Li.RM.CurrencyType);
5190
5183
  Me.RM_REGION = Yo.z.enum([
5191
5184
  "MALAYSIA",
@@ -7139,7 +7132,7 @@ const Zs = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Xs = {
7139
7132
  },
7140
7133
  emits: ["update:show"],
7141
7134
  setup(n) {
7142
- const t = La(), e = Ri(), o = hi(), i = Ud(), d = Qn(), a = rd(), { t: l } = zn(), F = n, z = Q(!1), s = Tt(), u = Q(Ia(0));
7135
+ const t = xa(), e = Ri(), o = hi(), i = Ud(), d = Qn(), a = rd(), { t: l } = zn(), F = n, z = Q(!1), s = Tt(), u = Q(Ga(0));
7143
7136
  async function R() {
7144
7137
  z.value = !0;
7145
7138
  try {
@@ -7161,12 +7154,12 @@ const Zs = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Xs = {
7161
7154
  });
7162
7155
  const v = Q([]), f = Q([]), g = Q(new Array());
7163
7156
  function A(_, c) {
7164
- return c === "day" ? od(_) : Sr(_);
7157
+ return c === "day" ? Ka(_) : yr(_);
7165
7158
  }
7166
7159
  function L(_, c) {
7167
7160
  const h = _.reduce(
7168
7161
  (E, O) => {
7169
- const S = O.effectiveAt ?? fr(O._id);
7162
+ const S = O.effectiveAt ?? hr(O._id);
7170
7163
  if (!S)
7171
7164
  return E;
7172
7165
  const j = A(new Date(S), c);
@@ -7182,8 +7175,8 @@ const Zs = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Xs = {
7182
7175
  async function D() {
7183
7176
  let _ = await o.readStockAdjustment(
7184
7177
  F.sku._id,
7185
- xa(new Date(u.value.startDate)).toISOString(),
7186
- ed(new Date(u.value.endDate)).toISOString()
7178
+ Va(new Date(u.value.startDate)).toISOString(),
7179
+ Ha(new Date(u.value.endDate)).toISOString()
7187
7180
  );
7188
7181
  v.value = _;
7189
7182
  const c = _.filter(({ ref: h }) => h == null ? void 0 : h.startsWith("bill_")).map(({ ref: h }) => h);
@@ -7253,24 +7246,24 @@ const Zs = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Xs = {
7253
7246
  const S = O.cost;
7254
7247
  if (!S) return E;
7255
7248
  const j = {
7256
- ...Wa(E, Math.max(E.precision, S.precision)),
7249
+ ...Ya(E, Math.max(E.precision, S.precision)),
7257
7250
  currency: S.currency
7258
7251
  };
7259
7252
  return {
7260
- ...Tr(j, S),
7253
+ ...Er(j, S),
7261
7254
  currency: E.currency
7262
7255
  };
7263
7256
  },
7264
7257
  {
7265
7258
  amount: 0,
7266
7259
  precision: 0,
7267
- currency: k(((h = t.currentCountry) == null ? void 0 : h.value) ?? Xi)
7260
+ currency: k(((h = t.currentCountry) == null ? void 0 : h.value) ?? Qi)
7268
7261
  }
7269
7262
  );
7270
- return Fi(c, !1, c.precision);
7263
+ return zi(c, !1, c.precision);
7271
7264
  });
7272
7265
  function K() {
7273
- const { startDate: _, endDate: c } = nd(u.value);
7266
+ const { startDate: _, endDate: c } = wa(u.value);
7274
7267
  _ !== null && c !== null && (u.value = {
7275
7268
  startDate: _,
7276
7269
  endDate: c
@@ -7288,11 +7281,11 @@ const Zs = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Xs = {
7288
7281
  amount: 0,
7289
7282
  precision: 0
7290
7283
  }),
7291
- currency: k(((h = t.currentCountry) == null ? void 0 : h.value) ?? Xi)
7284
+ currency: k(((h = t.currentCountry) == null ? void 0 : h.value) ?? Qi)
7292
7285
  } : "No data";
7293
7286
  });
7294
7287
  function wn() {
7295
- const { startDate: _, endDate: c } = td(u.value);
7288
+ const { startDate: _, endDate: c } = $a(u.value);
7296
7289
  _ !== null && c !== null && (u.value = {
7297
7290
  startDate: _,
7298
7291
  endDate: c
@@ -7430,7 +7423,7 @@ const Zs = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Xs = {
7430
7423
  C(mt, { class: "w-full" }),
7431
7424
  m("div", pu, [
7432
7425
  m("div", ju, [
7433
- C(Ji, { "z-index": 50 }, {
7426
+ C(xi, { "z-index": 50 }, {
7434
7427
  default: N(() => [
7435
7428
  m("div", Nu, [
7436
7429
  yt(I(y(l)("inventory.stock.history.estimatedValue")) + " ", 1),
@@ -7452,10 +7445,10 @@ const Zs = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Xs = {
7452
7445
  ]),
7453
7446
  _: 1
7454
7447
  }),
7455
- m("div", Uu, I(typeof ie.value != "string" ? y(Fi)(ie.value, !1, ie.value.precision) : ie.value), 1)
7448
+ m("div", Uu, I(typeof ie.value != "string" ? y(zi)(ie.value, !1, ie.value.precision) : ie.value), 1)
7456
7449
  ]),
7457
7450
  m("div", ku, [
7458
- C(Ji, { "z-index": 50 }, {
7451
+ C(xi, { "z-index": 50 }, {
7459
7452
  default: N(() => [
7460
7453
  m("div", Lu, [
7461
7454
  yt(I(y(l)("inventory.stock.history.costSold")) + " ", 1),
@@ -7520,10 +7513,10 @@ const Zs = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Xs = {
7520
7513
  }, 8, ["modelValue"]);
7521
7514
  };
7522
7515
  }
7523
- }), qu = { class: "flex flex-col gap-8" }, Wu = { class: "flex flex-col" }, Zu = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xu = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, yc = /* @__PURE__ */ mn({
7516
+ }), qu = { class: "flex flex-col gap-8" }, Wu = { class: "flex flex-col" }, Zu = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xu = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, _c = /* @__PURE__ */ mn({
7524
7517
  __name: "StockView",
7525
7518
  setup(n) {
7526
- const { t } = zn(), e = fi(), o = Qn(), i = Ri(), d = vr(), a = yr(), { columnDefs: l } = _d();
7519
+ const { t } = zn(), e = fi(), o = Qn(), i = Ri(), d = vr(), a = Rr(), { columnDefs: l } = _d();
7527
7520
  o.watchLocation(s);
7528
7521
  const F = Q(!1), z = Tt();
7529
7522
  async function s() {
@@ -7561,7 +7554,7 @@ const Zs = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Xs = {
7561
7554
  trackingUnitAbbrev: p ? ((K = T.unit.measurements.find((ie) => ie.id === p)) == null ? void 0 : K.abbrev) ?? "" : T.unit.abbrev
7562
7555
  };
7563
7556
  })
7564
- ), R = Q(""), { breakpoints: v } = Ga(), f = w(() => v.value.xs || v.value.sm), g = w(() => f.value ? 10 : 20), A = Ca(), L = w(() => [
7557
+ ), R = Q(""), { breakpoints: v } = ed(), f = w(() => v.value.xs || v.value.sm), g = w(() => f.value ? 10 : 20), A = qa(), L = w(() => [
7565
7558
  {
7566
7559
  label: "Refresh",
7567
7560
  value: "refresh"
@@ -7581,7 +7574,7 @@ const Zs = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Xs = {
7581
7574
  }
7582
7575
  return (T, p) => {
7583
7576
  const G = U("FmTable");
7584
- return B(), ne(Aa, {
7577
+ return B(), ne(Wa, {
7585
7578
  title: y(t)("inventory.stock.title"),
7586
7579
  actions: L.value,
7587
7580
  "onClick:action": D
@@ -7598,7 +7591,7 @@ const Zs = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Xs = {
7598
7591
  }
7599
7592
  ])
7600
7593
  }, [
7601
- C(Ma, {
7594
+ C(Za, {
7602
7595
  searchable: "",
7603
7596
  "change-location": "",
7604
7597
  search: R.value,
@@ -7615,7 +7608,7 @@ const Zs = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Xs = {
7615
7608
  "page-size": g.value
7616
7609
  }, {
7617
7610
  "list-row": N((K) => [
7618
- C(ja, {
7611
+ C(Xa, {
7619
7612
  row: K,
7620
7613
  onRowClick: y(d).showSkuHistory
7621
7614
  }, {
@@ -7625,20 +7618,20 @@ const Zs = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Xs = {
7625
7618
  m("div", qu, [
7626
7619
  m("div", Wu, [
7627
7620
  m("div", Zu, [
7628
- C(y(Qi), {
7621
+ C(y(Ji), {
7629
7622
  render: (_ = (He = (wn = ie.code) == null ? void 0 : wn.column) == null ? void 0 : He.columnDef) == null ? void 0 : _.cell,
7630
7623
  props: (h = (c = ie.code) == null ? void 0 : c.getContext) == null ? void 0 : h.call(c)
7631
7624
  }, null, 8, ["render", "props"])
7632
7625
  ]),
7633
7626
  m("div", Xu, [
7634
- C(y(Qi), {
7627
+ C(y(Ji), {
7635
7628
  render: (S = (O = (E = ie.name) == null ? void 0 : E.column) == null ? void 0 : O.columnDef) == null ? void 0 : S.cell,
7636
7629
  props: (oe = (j = ie.name) == null ? void 0 : j.getContext) == null ? void 0 : oe.call(j)
7637
7630
  }, null, 8, ["render", "props"])
7638
7631
  ])
7639
7632
  ]),
7640
7633
  m("div", null, [
7641
- C(_i, {
7634
+ C(Fi, {
7642
7635
  days: K.original.day
7643
7636
  }, null, 8, ["days"])
7644
7637
  ]),
@@ -7673,5 +7666,5 @@ const Zs = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Xs = {
7673
7666
  }
7674
7667
  });
7675
7668
  export {
7676
- yc as default
7669
+ _c as default
7677
7670
  };