@feedmepos/mf-inventory-portal 0.0.19-dev.10 → 0.0.19-dev.11

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 (43) hide show
  1. package/dist/{ApprovalView-BgTTFiOw.js → ApprovalView-BtgtZgDY.js} +5 -5
  2. package/dist/{BindingsDialog-BROnpXEI.js → BindingsDialog-DDqu7p2z.js} +1 -1
  3. package/dist/{BindingsPicker-aQHfS_vY.js → BindingsPicker-BDhn5Do7.js} +1 -1
  4. package/dist/{BindingsTable-DvtIQMFk.js → BindingsTable-C5R7orsB.js} +1 -1
  5. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DR9YAhaJ.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D0sbKAX9.js} +1 -1
  6. package/dist/{IngredientsView-BgAQCCD-.js → IngredientsView-Ac52Wd12.js} +5 -5
  7. package/dist/{IntegrationView-DEBb_X5K.js → IntegrationView-6mJtJK-d.js} +2 -2
  8. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-VF3PDSzP.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C2BFaTg-.js} +1 -1
  9. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BIRzNfFN.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CL0RBLOF.js} +1 -1
  10. package/dist/{PurchaseOrderPrintPreview-D2zNGZhx.js → PurchaseOrderPrintPreview-UzrsJ0AN.js} +10 -10
  11. package/dist/{ReceiveRequestView-Dc5JlUMC.js → ReceiveRequestView-DW9u9TJZ.js} +7 -7
  12. package/dist/{RecipeView-C1DBn8pW.js → RecipeView-W15pCZKU.js} +5 -5
  13. package/dist/{StockView-6wi6BEOE.js → StockView-BqEe-OIX.js} +167 -167
  14. package/dist/{SupplierView-CS7YdL5Q.js → SupplierView-CGr2N-e7.js} +5 -5
  15. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DupNA58V.js +739 -0
  16. package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-COVncBoC.js +1676 -0
  17. package/dist/TransferTemplateView-HgaSR8L8.js +1101 -0
  18. package/dist/{UnitView-BUdKTKch.js → UnitView-C07Yrynl.js} +6 -6
  19. package/dist/{WarehouseView-BbreEn79.js → WarehouseView-DL-8j9vX.js} +4 -4
  20. package/dist/{app-B3oV5Muh.js → app-B1MZZxUg.js} +97 -22
  21. package/dist/app.d.ts +74 -0
  22. package/dist/app.js +1 -1
  23. package/dist/components/row-action.enum.d.ts +3 -1
  24. package/dist/{decimal-DzjRPmPY.js → decimal-BXf_WdLk.js} +1 -1
  25. package/dist/{id-to-date-CG1QobkF.js → id-to-date-Dlovyec6.js} +1 -1
  26. package/dist/layout-BJjS48J5.js +151 -0
  27. package/dist/{purchase-order-transaction-type-D-GMrgDp.js → purchase-order-transaction-type-CMIu0jrP.js} +92 -87
  28. package/dist/row-action.enum-PMKMRrZR.js +50 -0
  29. package/dist/{supplier-BE_AQA4h.js → supplier-IDQmZ4VM.js} +1 -1
  30. package/dist/tsconfig.app.tsbuildinfo +1 -1
  31. package/dist/views/stock/helper/stock-row-action.d.ts +2 -2
  32. package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetails.vue.d.ts +20 -0
  33. package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetailsProps.d.ts +9 -0
  34. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +1 -0
  35. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +445 -1
  36. package/dist/{xlsx-BGXLmGtO.js → xlsx-CfdXcS72.js} +1 -1
  37. package/dist/{xlsx.util-DxU-P-ww.js → xlsx.util-C5Wx4IUs.js} +2 -2
  38. package/package.json +2 -2
  39. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CBbbXOhl.js +0 -745
  40. package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-CWEypKBc.js +0 -1662
  41. package/dist/TransferTemplateView-C1hmdeKM.js +0 -933
  42. package/dist/layout-qEWDq5Vs.js +0 -147
  43. package/dist/row-action.enum-7jVyol1k.js +0 -36
@@ -1,17 +1,17 @@
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-DR9YAhaJ.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-B3oV5Muh.js";
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 b, 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-D0sbKAX9.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 ge, 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 gt, y as bt, 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-B1MZZxUg.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-qEWDq5Vs.js";
7
- import { g as ge } from "./decimal-DzjRPmPY.js";
8
- import { e as Pt, i as ot } from "./id-to-date-CG1QobkF.js";
6
+ import { c as jt, _ as It, F as Ke, u as Ut } from "./layout-BJjS48J5.js";
7
+ import { g as be } from "./decimal-BXf_WdLk.js";
8
+ import { e as Pt, i as ot } from "./id-to-date-Dlovyec6.js";
9
9
  import { _ as Ie, S as Fe, g as st } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
10
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-BIRzNfFN.js";
11
+ import { u as at, _ as Ge } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-CL0RBLOF.js";
12
12
  import { defineStore as Rt } from "pinia";
13
- import { _ as Ht } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-VF3PDSzP.js";
14
- import { E as Et } from "./empty-placeholder-wf6-BWE8.js";
13
+ import { _ as Et } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C2BFaTg-.js";
14
+ import { E as Ht } from "./empty-placeholder-wf6-BWE8.js";
15
15
  import "./array-AvWd53LI.js";
16
16
  const Se = Xe((c, d) => {
17
17
  const r = ue(), s = tt(), S = de();
@@ -72,7 +72,7 @@ function Lt() {
72
72
  productBalance: []
73
73
  };
74
74
  }
75
- const _e = R(Lt()), He = () => {
75
+ const _e = R(Lt()), Ee = () => {
76
76
  const c = Se();
77
77
  return {
78
78
  // state
@@ -100,20 +100,20 @@ const _e = R(Lt()), He = () => {
100
100
  var ke = /* @__PURE__ */ ((c) => (c.History = "History", c.Convert = "Convert", c.Adjust = "Adjust", c))(ke || {});
101
101
  const Nt = [
102
102
  {
103
- label: "History",
103
+ translationKey: "inventory.stock.action.history",
104
104
  color: "text-neutral-700"
105
105
  }
106
106
  ], Ot = [
107
107
  {
108
- label: "History",
108
+ translationKey: "inventory.stock.action.history",
109
109
  color: "text-neutral-700"
110
110
  },
111
111
  {
112
- label: "Convert",
112
+ translationKey: "inventory.stock.action.convert",
113
113
  color: "text-neutral-700"
114
114
  },
115
115
  {
116
- label: "Adjust",
116
+ translationKey: "inventory.stock.action.adjust",
117
117
  color: "text-neutral-700"
118
118
  }
119
119
  ];
@@ -140,7 +140,7 @@ async function zt(c) {
140
140
  name: "Balance",
141
141
  selector: (s) => {
142
142
  const S = xe(s, s.unit);
143
- return S.type === "unit" ? ge(s.balance, s.unit, null, !1) : ge(s.balance, s.unit, S.measurement, !1);
143
+ return S.type === "unit" ? be(s.balance, s.unit, null, !1) : be(s.balance, s.unit, S.measurement, !1);
144
144
  }
145
145
  },
146
146
  {
@@ -193,11 +193,11 @@ const Yt = { class: "fm-typo-en-body-md-400 flex-grow" }, rt = /* @__PURE__ */ r
193
193
  const { measurements: k } = s.unit;
194
194
  return [
195
195
  {
196
- label: `${ge(s.amount, s.unit)}`,
196
+ label: `${be(s.amount, s.unit)}`,
197
197
  value: null
198
198
  },
199
199
  ...k.map(({ id: u }) => ({
200
- label: `${ge(s.amount, s.unit, u)}`,
200
+ label: `${be(s.amount, s.unit, u)}`,
201
201
  value: u
202
202
  }))
203
203
  ];
@@ -215,7 +215,7 @@ const Yt = { class: "fm-typo-en-body-md-400 flex-grow" }, rt = /* @__PURE__ */ r
215
215
  const o = D("FmIcon"), w = D("FmMenuItem"), A = D("FmMenu");
216
216
  return B(), O(A, {
217
217
  "stop-click-propagation": "",
218
- onMenuChanged: u[0] || (u[0] = (b) => h.value = b)
218
+ onMenuChanged: u[0] || (u[0] = (g) => h.value = g)
219
219
  }, {
220
220
  "menu-button": C(() => [
221
221
  n("button", {
@@ -225,7 +225,7 @@ const Yt = { class: "fm-typo-en-body-md-400 flex-grow" }, rt = /* @__PURE__ */ r
225
225
  h.value ? "border-fm-color-primary" : "border-fm-color-neutral-gray-100"
226
226
  ])
227
227
  }, [
228
- n("div", Yt, g(i.value), 1),
228
+ n("div", Yt, b(i.value), 1),
229
229
  x(o, {
230
230
  class: "text-fm-color-neutral-gray-400",
231
231
  name: "expand_more"
@@ -233,11 +233,11 @@ const Yt = { class: "fm-typo-en-body-md-400 flex-grow" }, rt = /* @__PURE__ */ r
233
233
  ], 2)
234
234
  ]),
235
235
  default: C(() => [
236
- (B(!0), L(te, null, ae(l.value, (b) => (B(), O(w, {
237
- key: b.value ?? 0,
238
- label: b.label,
239
- "model-value": a(b),
240
- onClick: (p) => r(b.value)
236
+ (B(!0), L(te, null, ae(l.value, (g) => (B(), O(w, {
237
+ key: g.value ?? 0,
238
+ label: g.label,
239
+ "model-value": a(g),
240
+ onClick: (p) => r(g.value)
241
241
  }, null, 8, ["label", "model-value", "onClick"]))), 128))
242
242
  ]),
243
243
  _: 1
@@ -250,13 +250,13 @@ const Yt = { class: "fm-typo-en-body-md-400 flex-grow" }, rt = /* @__PURE__ */ r
250
250
  const { t: d } = le();
251
251
  return (r, s) => (B(), O(Tt, null, {
252
252
  default: C(() => [
253
- n("div", Kt, g(v(d)("inventory.stock.prediction.daysRemaining")), 1)
253
+ n("div", Kt, b(v(d)("inventory.stock.prediction.daysRemaining")), 1)
254
254
  ]),
255
255
  _: 1
256
256
  }));
257
257
  }
258
258
  }), lt = Rt("stockActions", () => {
259
- const c = R(!1), d = ue(), r = He(), s = at(), S = de(), l = nt(), { t: a } = le();
259
+ const c = R(!1), d = ue(), r = Ee(), s = at(), S = de(), l = nt(), { t: a } = le();
260
260
  async function i() {
261
261
  if (d._currentLocation) {
262
262
  c.value = !0;
@@ -284,11 +284,11 @@ const Yt = { class: "fm-typo-en-body-md-400 flex-grow" }, rt = /* @__PURE__ */ r
284
284
  return;
285
285
  }
286
286
  const $ = {
287
- maxCount: ((I = r.productBalance.find(({ id: E }) => E === p._id)) == null ? void 0 : I.count) || 0,
287
+ maxCount: ((I = r.productBalance.find(({ id: H }) => H === p._id)) == null ? void 0 : I.count) || 0,
288
288
  sku: p,
289
289
  show: !0,
290
- "onUpdate:show"(E) {
291
- h.value.show = E;
290
+ "onUpdate:show"(H) {
291
+ h.value.show = H;
292
292
  },
293
293
  onSubmitted() {
294
294
  i();
@@ -301,8 +301,8 @@ const Yt = { class: "fm-typo-en-body-md-400 flex-grow" }, rt = /* @__PURE__ */ r
301
301
  const M = {
302
302
  stock: p,
303
303
  show: !0,
304
- "onUpdate:show"(H) {
305
- u.value.show = H;
304
+ "onUpdate:show"(E) {
305
+ u.value.show = E;
306
306
  },
307
307
  onSubmitted() {
308
308
  i();
@@ -315,29 +315,29 @@ const Yt = { class: "fm-typo-en-body-md-400 flex-grow" }, rt = /* @__PURE__ */ r
315
315
  const M = {
316
316
  sku: p,
317
317
  show: !0,
318
- "onUpdate:show"(H) {
319
- w.value.show = H;
318
+ "onUpdate:show"(E) {
319
+ w.value.show = E;
320
320
  }
321
321
  };
322
322
  w.value = M;
323
323
  }
324
- function b(p, M) {
325
- const H = Pe(M);
324
+ function g(p, M) {
325
+ const E = Pe(M);
326
326
  switch (p) {
327
327
  case ke.History:
328
- A(H);
328
+ A(E);
329
329
  return;
330
330
  case ke.Convert:
331
- k(H);
331
+ k(E);
332
332
  return;
333
333
  case ke.Adjust:
334
- o(H);
334
+ o(E);
335
335
  return;
336
336
  }
337
337
  }
338
338
  return {
339
339
  fetchStockBalance: i,
340
- onActionMenu: b,
340
+ onActionMenu: g,
341
341
  stockHistoryProps: w,
342
342
  showSkuHistory: A,
343
343
  convertSkuDialogProps: h,
@@ -467,7 +467,7 @@ const Jt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-80
467
467
  (f) => f.type === Oe.enum.SKU
468
468
  );
469
469
  }
470
- ), b = T({
470
+ ), g = T({
471
471
  get() {
472
472
  return !!o.value;
473
473
  },
@@ -479,9 +479,9 @@ const Jt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-80
479
479
  e && (u.value = 0);
480
480
  });
481
481
  function M() {
482
- W(s.sku, be(u.value), o.value);
482
+ W(s.sku, ge(u.value), o.value);
483
483
  }
484
- function H(e) {
484
+ function E(e) {
485
485
  if (o.value)
486
486
  return !0;
487
487
  const t = qe(e).isInteger().max(s.maxCount ?? 0).error ?? "";
@@ -507,17 +507,17 @@ const Jt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-80
507
507
  var f, m, _;
508
508
  const e = (m = (f = s.sku.convert) == null ? void 0 : f.inventoryBindings) == null ? void 0 : m.filter((y) => y.type === "SKU");
509
509
  return (_ = o.value ?? e) == null ? void 0 : _.map((y) => {
510
- var X, G, se, Ee, Le;
510
+ var X, G, se, He, Le;
511
511
  const V = a.skus.find((pe) => pe._id === y.id), K = ((X = y.measurement) == null ? void 0 : X.abbrev) ?? ((G = V == null ? void 0 : V.unit) == null ? void 0 : G.abbrev), Q = (se = s.sku.convert) != null && se.measurement ? s.sku.unit.measurements.find((pe) => {
512
512
  var Ne;
513
513
  return pe.id === ((Ne = s.sku.convert) == null ? void 0 : Ne.measurement);
514
514
  }) ?? null : null, me = De(s.sku.unit, Q), U = $(`${u.value}`) === !0 ? ie(
515
515
  ft(
516
516
  y.amount,
517
- be(+u.value, me)
517
+ ge(+u.value, me)
518
518
  ),
519
519
  !1
520
- ) : "0", Y = (Le = (Ee = o.value) == null ? void 0 : Ee.find((pe) => pe.id === (V == null ? void 0 : V._id))) == null ? void 0 : Le.amount, J = Y ? ie(Y, !1) : null;
520
+ ) : "0", Y = (Le = (He = o.value) == null ? void 0 : He.find((pe) => pe.id === (V == null ? void 0 : V._id))) == null ? void 0 : Le.amount, J = Y ? ie(Y, !1) : null;
521
521
  return {
522
522
  sku: V,
523
523
  convertAmount: J ?? U,
@@ -539,7 +539,7 @@ const Jt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-80
539
539
  (t = (e = I.value) == null ? void 0 : e.resetInputs) == null || t.call(e);
540
540
  }
541
541
  });
542
- const E = Re(s, "show");
542
+ const H = Re(s, "show");
543
543
  async function W(e, t, f) {
544
544
  p.value = !0;
545
545
  try {
@@ -622,13 +622,13 @@ const Jt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-80
622
622
  const f = D("FmTextField"), m = D("FmForm"), _ = D("FmCard"), y = D("FmSwitch"), V = D("FmFormGroup"), K = D("FmSelect"), Q = D("FmButton"), me = D("FmSideSheet");
623
623
  return B(), O(me, {
624
624
  "dismiss-away": "",
625
- modelValue: v(E),
626
- "onUpdate:modelValue": t[3] || (t[3] = (U) => Ue(E) ? E.value = U : null),
625
+ modelValue: v(H),
626
+ "onUpdate:modelValue": t[3] || (t[3] = (U) => Ue(H) ? H.value = U : null),
627
627
  "max-width": 500
628
628
  }, {
629
629
  "side-sheet-header": C(() => [
630
630
  n("div", Jt, [
631
- n("div", Qt, g(v(k)("inventory.stock.convert.title", { name: e.sku.name })), 1)
631
+ n("div", Qt, b(v(k)("inventory.stock.convert.title", { name: e.sku.name })), 1)
632
632
  ])
633
633
  ]),
634
634
  default: C(() => [
@@ -644,7 +644,7 @@ const Jt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-80
644
644
  "model-value": u.value,
645
645
  "onUpdate:modelValue": t[0] || (t[0] = (U) => u.value = U),
646
646
  label: v(k)("inventory.stock.convert.amount"),
647
- rules: [H, $, v(Me)(0)],
647
+ rules: [E, $, v(Me)(0)],
648
648
  "append-text": F.value,
649
649
  "helper-text": o.value ? void 0 : `Max ${e.maxCount} ${F.value}`
650
650
  }, null, 8, ["disabled", "model-value", "label", "rules", "append-text", "helper-text"])
@@ -657,15 +657,15 @@ const Jt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-80
657
657
  }, {
658
658
  default: C(() => [
659
659
  n("div", Zt, [
660
- n("div", en, g(v(k)("inventory.stock.convert.deductionSummary")), 1),
660
+ n("div", en, b(v(k)("inventory.stock.convert.deductionSummary")), 1),
661
661
  (B(!0), L(te, null, ae(j.value, (U) => {
662
662
  var Y, J;
663
663
  return B(), L("div", {
664
664
  key: (Y = U.sku) == null ? void 0 : Y._id,
665
665
  class: "flex items-center"
666
666
  }, [
667
- n("div", tn, g((J = U.sku) == null ? void 0 : J.name), 1),
668
- n("div", nn, " -" + g(U.convertAmount) + " " + g(U.abbrev), 1)
667
+ n("div", tn, b((J = U.sku) == null ? void 0 : J.name), 1),
668
+ n("div", nn, " -" + b(U.convertAmount) + " " + b(U.abbrev), 1)
669
669
  ]);
670
670
  }), 128))
671
671
  ])
@@ -677,18 +677,18 @@ const Jt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-80
677
677
  n("div", on, [
678
678
  x(y, {
679
679
  value: "",
680
- modelValue: b.value,
681
- "onUpdate:modelValue": t[1] || (t[1] = (U) => b.value = U),
680
+ modelValue: g.value,
681
+ "onUpdate:modelValue": t[1] || (t[1] = (U) => g.value = U),
682
682
  label: v(k)("inventory.stock.convert.overrideDeduction"),
683
683
  "label-placement": "right"
684
684
  }, null, 8, ["modelValue", "label"]),
685
- b.value ? (B(), L(te, { key: 0 }, [
685
+ g.value ? (B(), L(te, { key: 0 }, [
686
686
  x(V, {
687
687
  modelValue: o.value,
688
688
  rules: [v(yt)(1, "Must have at least one ingredient binding")]
689
689
  }, null, 8, ["modelValue", "rules"]),
690
690
  n("div", sn, [
691
- n("div", an, g(v(k)("inventory.stock.convert.ingredients")), 1),
691
+ n("div", an, b(v(k)("inventory.stock.convert.ingredients")), 1),
692
692
  (B(!0), L(te, null, ae(o.value, (U) => (B(), O(V, {
693
693
  key: U.id,
694
694
  disabled: p.value,
@@ -705,7 +705,7 @@ const Jt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-80
705
705
  var J, X, G;
706
706
  return [
707
707
  n("div", rn, [
708
- n("div", ln, g((J = w.value.find((se) => se._id === U.id)) == null ? void 0 : J.name), 1),
708
+ n("div", ln, b((J = w.value.find((se) => se._id === U.id)) == null ? void 0 : J.name), 1),
709
709
  x(f, {
710
710
  class: "xs:col-span-2",
711
711
  disabled: p.value,
@@ -772,11 +772,11 @@ const Jt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-80
772
772
  }
773
773
  });
774
774
  function Ae(c, d) {
775
- const r = be(c, d);
775
+ const r = ge(c, d);
776
776
  return { ...r, amount: -r.amount };
777
777
  }
778
778
  function We(c, d) {
779
- return be(Math.abs(c), d);
779
+ return ge(Math.abs(c), d);
780
780
  }
781
781
  const Ve = {
782
782
  [Z.enum.DAMAGE]: {
@@ -851,7 +851,7 @@ const Ve = {
851
851
  const o = {
852
852
  ...r.modelValue
853
853
  };
854
- o.measurement = ((A = (w = r.modelValue.doc.unit) == null ? void 0 : w.measurements) == null ? void 0 : A.find((b) => b.id === u)) ?? null, s("update:modelValue", o);
854
+ o.measurement = ((A = (w = r.modelValue.doc.unit) == null ? void 0 : w.measurements) == null ? void 0 : A.find((g) => g.id === u)) ?? null, s("update:modelValue", o);
855
855
  }
856
856
  }), k = T({
857
857
  get() {
@@ -865,14 +865,14 @@ const Ve = {
865
865
  }
866
866
  });
867
867
  return (u, o) => {
868
- const w = D("FmButton"), A = D("FmSelect"), b = D("FmTextarea"), p = D("FmCard");
868
+ const w = D("FmButton"), A = D("FmSelect"), g = D("FmTextarea"), p = D("FmCard");
869
869
  return B(), O(p, {
870
870
  variant: "outlined",
871
871
  class: "grid grid-cols-2 gap-8 p-16"
872
872
  }, {
873
873
  default: C(() => [
874
874
  n("div", dn, [
875
- n("div", mn, g(u.modelValue.doc.name), 1),
875
+ n("div", mn, b(u.modelValue.doc.name), 1),
876
876
  x(w, {
877
877
  variant: "tertiary",
878
878
  "prepend-icon": "delete",
@@ -886,10 +886,10 @@ const Ve = {
886
886
  items: S.value,
887
887
  modelValue: a.value,
888
888
  "onUpdate:modelValue": o[1] || (o[1] = (M) => a.value = M),
889
- rules: [v(bt)()],
889
+ rules: [v(gt)()],
890
890
  "label-mark": "required"
891
891
  }, null, 8, ["disabled", "items", "modelValue", "rules"]),
892
- x(Ht, {
892
+ x(Et, {
893
893
  disabled: u.disabled,
894
894
  label: "Amount",
895
895
  step: +v(ie)({
@@ -907,7 +907,7 @@ const Ve = {
907
907
  modelValue: h.value,
908
908
  "onUpdate:modelValue": o[3] || (o[3] = (M) => h.value = M)
909
909
  }, null, 8, ["disabled", "items", "modelValue"]),
910
- x(b, {
910
+ x(g, {
911
911
  class: "col-span-2",
912
912
  disabled: u.disabled,
913
913
  label: "Remark",
@@ -930,7 +930,7 @@ const Ve = {
930
930
  setup(c, { expose: d, emit: r }) {
931
931
  const s = c, S = r, l = Te(), a = nt(), i = Se(), h = de(), k = R(!1), { t: u } = le();
932
932
  function o() {
933
- p(Pe(b));
933
+ p(Pe(g));
934
934
  }
935
935
  const w = R();
936
936
  d({
@@ -947,7 +947,7 @@ const Ve = {
947
947
  (F = ($ = w.value) == null ? void 0 : $.resetInputs) == null || F.call($);
948
948
  }
949
949
  });
950
- const A = Re(s, "show"), b = it({
950
+ const A = Re(s, "show"), g = it({
951
951
  remark: "",
952
952
  adjustments: [
953
953
  {
@@ -961,7 +961,7 @@ const Ve = {
961
961
  ]
962
962
  });
963
963
  he([() => s.show], ([$]) => {
964
- $ && (b.remark = "", b.adjustments = [
964
+ $ && (g.remark = "", g.adjustments = [
965
965
  {
966
966
  id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
967
967
  type: Z.enum.PURCHASE,
@@ -977,9 +977,9 @@ const Ve = {
977
977
  try {
978
978
  await i.adjustSku({
979
979
  remark: $.remark,
980
- adjustments: $.adjustments.map(({ doc: F, remark: j, type: I, amount: E, measurement: W }) => ({
980
+ adjustments: $.adjustments.map(({ doc: F, remark: j, type: I, amount: H, measurement: W }) => ({
981
981
  id: F._id,
982
- amount: E,
982
+ amount: H,
983
983
  measurement: W,
984
984
  remark: j,
985
985
  doc: F,
@@ -1001,10 +1001,10 @@ const Ve = {
1001
1001
  label: j.name,
1002
1002
  sublabel: j.code,
1003
1003
  value: j._id
1004
- })), F = $.filter((j) => b.adjustments.find((I) => I.doc._id === j.value)).map((j) => j.value);
1004
+ })), F = $.filter((j) => g.adjustments.find((I) => I.doc._id === j.value)).map((j) => j.value);
1005
1005
  a.open({
1006
1006
  title: "Select ingredients",
1007
- contentComponent: gt,
1007
+ contentComponent: bt,
1008
1008
  contentComponentProps: {
1009
1009
  items: $,
1010
1010
  modelValue: F
@@ -1022,11 +1022,11 @@ const Ve = {
1022
1022
  variant: "tertiary"
1023
1023
  }
1024
1024
  }).onPrimary((j) => {
1025
- b.adjustments = j.map(
1026
- (I) => b.adjustments.find((E) => E.doc._id === I) ?? {
1025
+ g.adjustments = j.map(
1026
+ (I) => g.adjustments.find((H) => H.doc._id === I) ?? {
1027
1027
  id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
1028
1028
  type: Z.enum.PURCHASE,
1029
- doc: l.skus.find((E) => E._id === I),
1029
+ doc: l.skus.find((H) => H._id === I),
1030
1030
  measurement: null,
1031
1031
  remark: "",
1032
1032
  amount: fe(1)
@@ -1034,11 +1034,11 @@ const Ve = {
1034
1034
  );
1035
1035
  });
1036
1036
  }
1037
- function H($) {
1038
- b.adjustments.splice($, 1);
1037
+ function E($) {
1038
+ g.adjustments.splice($, 1);
1039
1039
  }
1040
1040
  return ($, F) => {
1041
- const j = D("FmTextarea"), I = D("FmButton"), E = D("FmForm"), W = D("FmSideSheet");
1041
+ const j = D("FmTextarea"), I = D("FmButton"), H = D("FmForm"), W = D("FmSideSheet");
1042
1042
  return B(), O(W, {
1043
1043
  modelValue: v(A),
1044
1044
  "onUpdate:modelValue": F[2] || (F[2] = (z) => Ue(A) ? A.value = z : null),
@@ -1047,11 +1047,11 @@ const Ve = {
1047
1047
  }, {
1048
1048
  "side-sheet-header": C(() => [
1049
1049
  n("div", vn, [
1050
- n("div", fn, g(v(u)("inventory.stock.adjust.title")), 1)
1050
+ n("div", fn, b(v(u)("inventory.stock.adjust.title")), 1)
1051
1051
  ])
1052
1052
  ]),
1053
1053
  default: C(() => [
1054
- x(E, {
1054
+ x(H, {
1055
1055
  class: "w-full flex flex-col gap-12",
1056
1056
  ref_key: "formRef",
1057
1057
  ref: w,
@@ -1060,11 +1060,11 @@ const Ve = {
1060
1060
  default: C(() => [
1061
1061
  x(j, {
1062
1062
  label: v(u)("inventory.stock.adjust.remark"),
1063
- modelValue: b.remark,
1064
- "onUpdate:modelValue": F[0] || (F[0] = (z) => b.remark = z)
1063
+ modelValue: g.remark,
1064
+ "onUpdate:modelValue": F[0] || (F[0] = (z) => g.remark = z)
1065
1065
  }, null, 8, ["label", "modelValue"]),
1066
1066
  n("div", yn, [
1067
- n("div", _n, g(v(u)("inventory.stock.adjust.adjustedItems")), 1),
1067
+ n("div", _n, b(v(u)("inventory.stock.adjust.adjustedItems")), 1),
1068
1068
  x(I, {
1069
1069
  "prepend-icon": "add",
1070
1070
  variant: "tertiary",
@@ -1072,11 +1072,11 @@ const Ve = {
1072
1072
  onClick: M
1073
1073
  })
1074
1074
  ]),
1075
- (B(!0), L(te, null, ae(b.adjustments, (z, P) => (B(), O(pn, {
1075
+ (B(!0), L(te, null, ae(g.adjustments, (z, P) => (B(), O(pn, {
1076
1076
  key: z.id,
1077
- modelValue: b.adjustments[P],
1078
- "onUpdate:modelValue": (N) => b.adjustments[P] = N,
1079
- "onClick:delete": (N) => H(P)
1077
+ modelValue: g.adjustments[P],
1078
+ "onUpdate:modelValue": (N) => g.adjustments[P] = N,
1079
+ "onClick:delete": (N) => E(P)
1080
1080
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onClick:delete"]))), 128))
1081
1081
  ]),
1082
1082
  _: 1
@@ -1098,7 +1098,7 @@ const Ve = {
1098
1098
  }, 8, ["modelValue"]);
1099
1099
  };
1100
1100
  }
1101
- }), bn = Xe((c, d) => ({
1101
+ }), gn = Xe((c, d) => ({
1102
1102
  // TODO: remove once latest inventory backend has been push
1103
1103
  async findBillsByBusinessId(r, s, S) {
1104
1104
  const l = `${c.businessesBackendUrl}/${r}/reports/find-many`, a = {
@@ -1115,7 +1115,7 @@ const Ve = {
1115
1115
  };
1116
1116
  return await d.post(l, a);
1117
1117
  }
1118
- })), gn = { class: "p-16" }, xn = { class: "fm-typo-en-body-md-600 flex-grow" }, Sn = { class: "flex-grow text-fm-color-typo-secondary" }, $n = {
1118
+ })), bn = { class: "p-16" }, xn = { class: "fm-typo-en-body-md-600 flex-grow" }, Sn = { class: "flex-grow text-fm-color-typo-secondary" }, $n = {
1119
1119
  key: 0,
1120
1120
  class: "my-5"
1121
1121
  }, wn = { class: "text-neutral-400" }, Bn = { class: "flex-grow" }, Fn = { class: "flex gap-1" }, An = { class: "flex flex-col gap-1" }, Vn = {
@@ -1138,19 +1138,19 @@ const Ve = {
1138
1138
  S.value = ((k = s.value) == null ? void 0 : k.scrollHeight) || 0;
1139
1139
  });
1140
1140
  const a = T(() => {
1141
- var b;
1141
+ var g;
1142
1142
  const k = d.record.adjustments, u = d.sku, o = {}, A = k.flatMap((p) => {
1143
1143
  var M;
1144
- return ((M = p.skus) == null ? void 0 : M.filter((H) => H.sku._id === u._id)) ?? [];
1144
+ return ((M = p.skus) == null ? void 0 : M.filter((E) => E.sku._id === u._id)) ?? [];
1145
1145
  }).flatMap((p) => p.amounts);
1146
1146
  for (const p of A) {
1147
1147
  const M = p.measurement ? xt(p.measurement.conversion, p.amount) : p.amount;
1148
- o[b = p.type] ?? (o[b] = { amount: 0, precision: 0 }), o[p.type] = Ze(M, o[p.type]);
1148
+ o[g = p.type] ?? (o[g] = { amount: 0, precision: 0 }), o[p.type] = Ze(M, o[p.type]);
1149
1149
  }
1150
1150
  return Object.entries(o).reduce(
1151
- (p, [M, H]) => (p[M] = /// comment, because without it formatter makes code uglier
1151
+ (p, [M, E]) => (p[M] = /// comment, because without it formatter makes code uglier
1152
1152
  `${q.toFormatString({
1153
- value: H,
1153
+ value: E,
1154
1154
  precision: 4
1155
1155
  })} ${u.unit.abbrev}`, p),
1156
1156
  {}
@@ -1160,15 +1160,15 @@ const Ve = {
1160
1160
  adjustments: u.flatMap(
1161
1161
  (o) => {
1162
1162
  var w, A;
1163
- return ((A = (w = o.skus) == null ? void 0 : w.map) == null ? void 0 : A.call(w, (b) => ({
1164
- ...b,
1163
+ return ((A = (w = o.skus) == null ? void 0 : w.map) == null ? void 0 : A.call(w, (g) => ({
1164
+ ...g,
1165
1165
  ref: o.ref,
1166
1166
  backdateFrom: o.effectiveAt != null ? ot(o._id) : null
1167
1167
  }))) ?? [];
1168
1168
  }
1169
1169
  ).flatMap((o) => {
1170
- var b;
1171
- const w = (b = d.bills.find((p) => p._id === o.ref)) == null ? void 0 : b.seqNumber, A = w ? i("inventory.stock.record.bill", [w]) : "";
1170
+ var g;
1171
+ const w = (g = d.bills.find((p) => p._id === o.ref)) == null ? void 0 : g.seqNumber, A = w ? i("inventory.stock.record.bill", [w]) : "";
1172
1172
  return o.amounts.map((p) => {
1173
1173
  var M;
1174
1174
  return {
@@ -1185,31 +1185,31 @@ const Ve = {
1185
1185
  const o = D("FmIcon"), w = D("FmTooltip"), A = D("FmCard");
1186
1186
  return B(), O(A, { variant: "outlined" }, {
1187
1187
  default: C(() => [
1188
- n("div", gn, [
1188
+ n("div", bn, [
1189
1189
  n("div", {
1190
1190
  class: "flex items-center cursor-pointer mb-1",
1191
- onClick: u[0] || (u[0] = (b) => r.value = !r.value)
1191
+ onClick: u[0] || (u[0] = (g) => r.value = !r.value)
1192
1192
  }, [
1193
- n("div", xn, g(k.record.date), 1),
1193
+ n("div", xn, b(k.record.date), 1),
1194
1194
  x(o, {
1195
1195
  name: r.value ? "expand_more" : "expand_less",
1196
1196
  color: "#777777",
1197
1197
  size: "md"
1198
1198
  }, null, 8, ["name"])
1199
1199
  ]),
1200
- (B(!0), L(te, null, ae(a.value, (b, p) => (B(), L("div", {
1200
+ (B(!0), L(te, null, ae(a.value, (g, p) => (B(), L("div", {
1201
1201
  key: p,
1202
1202
  class: "flex flex-row py-1",
1203
1203
  style: { "font-size": "0.8rem" }
1204
1204
  }, [
1205
- n("div", Sn, g(v(i)(`inventory.inventoryAdjustment.type.${p}`)), 1),
1205
+ n("div", Sn, b(v(i)(`inventory.inventoryAdjustment.type.${p}`)), 1),
1206
1206
  n("div", {
1207
1207
  class: Ce({
1208
- "text-fm-color-typo-error": b.startsWith("-"),
1209
- "text-fm-color-typo-success": !b.startsWith("-"),
1208
+ "text-fm-color-typo-error": g.startsWith("-"),
1209
+ "text-fm-color-typo-success": !g.startsWith("-"),
1210
1210
  "ml-auto": !0
1211
1211
  })
1212
- }, g(b), 3)
1212
+ }, b(g), 3)
1213
1213
  ]))), 128)),
1214
1214
  n("div", {
1215
1215
  ref_key: "detailRef",
@@ -1222,18 +1222,18 @@ const Ve = {
1222
1222
  })
1223
1223
  }, [
1224
1224
  h.value.length ? (B(), L("hr", $n)) : ee("", !0),
1225
- (B(!0), L(te, null, ae(h.value, (b) => (B(), L("div", {
1226
- key: b.time,
1225
+ (B(!0), L(te, null, ae(h.value, (g) => (B(), L("div", {
1226
+ key: g.time,
1227
1227
  class: "flex gap-1 w-full"
1228
1228
  }, [
1229
- n("div", wn, g(b.time), 1),
1229
+ n("div", wn, b(g.time), 1),
1230
1230
  n("div", Bn, [
1231
- (B(!0), L(te, null, ae(b.adjustments, (p) => (B(), L("div", {
1231
+ (B(!0), L(te, null, ae(g.adjustments, (p) => (B(), L("div", {
1232
1232
  key: p.name,
1233
1233
  class: "flex gap-1"
1234
1234
  }, [
1235
1235
  n("div", Fn, [
1236
- ve(g(v(i)(`inventory.inventoryAdjustment.type.${p.name}`)) + " ", 1),
1236
+ ve(b(v(i)(`inventory.inventoryAdjustment.type.${p.name}`)) + " ", 1),
1237
1237
  p.backdateFrom ? (B(), O(w, {
1238
1238
  key: 0,
1239
1239
  variant: "plain",
@@ -1241,7 +1241,7 @@ const Ve = {
1241
1241
  "z-index": 50
1242
1242
  }, {
1243
1243
  content: C(() => [
1244
- n("div", An, g(v(i)("inventory.stock.record.backdate", [v(et)(new Date(p.backdateFrom))])), 1)
1244
+ n("div", An, b(v(i)("inventory.stock.record.backdate", [v(et)(new Date(p.backdateFrom))])), 1)
1245
1245
  ]),
1246
1246
  default: C(() => [
1247
1247
  x(o, {
@@ -1252,7 +1252,7 @@ const Ve = {
1252
1252
  ]),
1253
1253
  _: 2
1254
1254
  }, 1024)) : ee("", !0),
1255
- p.remark ? (B(), L("span", Vn, " # " + g(p.remark), 1)) : ee("", !0)
1255
+ p.remark ? (B(), L("span", Vn, " # " + b(p.remark), 1)) : ee("", !0)
1256
1256
  ]),
1257
1257
  n("div", {
1258
1258
  class: Ce({
@@ -1260,8 +1260,8 @@ const Ve = {
1260
1260
  "text-fm-color-typo-success": !p.amount.startsWith("-"),
1261
1261
  "ml-auto": !0
1262
1262
  })
1263
- }, g(p.amount), 3),
1264
- p.cost ? (B(), L("div", Cn, " (" + g(v(je)(p.cost, !1, p.cost.precision)) + ") ", 1)) : ee("", !0)
1263
+ }, b(p.amount), 3),
1264
+ p.cost ? (B(), L("div", Cn, " (" + b(v(je)(p.cost, !1, p.cost.precision)) + ") ", 1)) : ee("", !0)
1265
1265
  ]))), 128))
1266
1266
  ])
1267
1267
  ]))), 128))
@@ -1332,10 +1332,10 @@ function jn(c, d) {
1332
1332
  precision: 4
1333
1333
  })} ${d.unit.abbrev}`) : null;
1334
1334
  }
1335
- const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = { class: "flex-1 line-clamp-2" }, Pn = { class: "flex flex-col gap-32 w-full h-full" }, Tn = { class: "flex items-center relative gap-4" }, Rn = { class: "flex-1" }, Hn = {
1335
+ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = { class: "flex-1 line-clamp-2" }, Pn = { class: "flex flex-col gap-32 w-full h-full" }, Tn = { class: "flex items-center relative gap-4" }, Rn = { class: "flex-1" }, En = {
1336
1336
  key: 0,
1337
1337
  class: "flex-1 flex flex-col items-center gap-16"
1338
- }, En = { class: "fm-typo-en-body-lg-400 translate-x-4" }, Ln = {
1338
+ }, Hn = { class: "fm-typo-en-body-lg-400 translate-x-4" }, Ln = {
1339
1339
  key: 1,
1340
1340
  class: "flex flex-col gap-12"
1341
1341
  }, Nn = { class: "pb-16" }, On = { class: "fm-typo-cn-body-lg-600" }, zn = {
@@ -1344,7 +1344,7 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1344
1344
  }, Yn = { class: "flex flex-col gap-1" }, Kn = { class: "text-fm-color-typo-secondary" }, Gn = { class: "font-bold" }, qn = { class: "flex flex-col gap-1" }, Wn = { class: "text-fm-color-typo-secondary flex" }, Jn = { class: "font-bold" }, Qn = { class: "flex flex-col gap-1" }, Xn = { class: "text-fm-color-typo-secondary" }, Zn = { class: "font-bold" }, eo = { class: "flex flex-col gap-1" }, to = { class: "text-fm-color-typo-secondary" }, no = { class: "font-bold" }, oo = { class: "flex flex-col gap-1" }, so = { class: "text-fm-color-typo-secondary" }, ao = { class: "font-bold" }, ro = { class: "flex flex-col gap-1" }, lo = { class: "text-fm-color-typo-secondary" }, io = { class: "font-bold" }, uo = { class: "flex flex-col gap-1" }, co = { class: "text-fm-color-typo-secondary" }, mo = { class: "font-bold" }, po = { class: "flex flex-col gap-1" }, vo = { class: "text-fm-color-typo-secondary" }, fo = { class: "font-bold" }, yo = { class: "flex flex-col gap-1" }, _o = { class: "text-fm-color-typo-secondary" }, ko = { class: "font-bold" }, ho = {
1345
1345
  key: 0,
1346
1346
  class: "flex flex-col gap-8"
1347
- }, bo = { class: "flex" }, go = { class: "flex-1 flex flex-col gap-1" }, xo = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, So = { class: "font-bold" }, $o = { class: "flex-1 flex flex-col gap-1" }, wo = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, Bo = { class: "flex flex-col gap-1" }, Fo = { class: "font-bold" }, Ao = /* @__PURE__ */ n("div", null, null, -1), Vo = {
1347
+ }, go = { class: "flex" }, bo = { class: "flex-1 flex flex-col gap-1" }, xo = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, So = { class: "font-bold" }, $o = { class: "flex-1 flex flex-col gap-1" }, wo = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, Bo = { class: "flex flex-col gap-1" }, Fo = { class: "font-bold" }, Ao = /* @__PURE__ */ n("div", null, null, -1), Vo = {
1348
1348
  key: 2,
1349
1349
  class: "flex-1 flex flex-col items-center gap-8"
1350
1350
  }, Co = ["src"], Do = { class: "font-bold text-lg" }, Mo = { class: "text-xs text-neutral-400 text-center" }, jo = /* @__PURE__ */ re({
@@ -1355,7 +1355,7 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1355
1355
  },
1356
1356
  emits: ["update:show"],
1357
1357
  setup(c) {
1358
- const d = tt(), r = He(), s = Se(), S = bn(), l = ue(), a = wt(), { t: i } = le(), h = c, k = R(!1), u = de(), o = R(ct(0));
1358
+ const d = tt(), r = Ee(), s = Se(), S = gn(), l = ue(), a = wt(), { t: i } = le(), h = c, k = R(!1), u = de(), o = R(ct(0));
1359
1359
  async function w() {
1360
1360
  k.value = !0;
1361
1361
  try {
@@ -1375,11 +1375,11 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1375
1375
  }), he([() => o.value, () => h.sku], () => {
1376
1376
  w();
1377
1377
  });
1378
- const A = R([]), b = R([]), p = R(new Array());
1378
+ const A = R([]), g = R([]), p = R(new Array());
1379
1379
  function M(e, t) {
1380
1380
  return t === "day" ? Ct(e) : et(e);
1381
1381
  }
1382
- function H(e, t) {
1382
+ function E(e, t) {
1383
1383
  const f = e.reduce(
1384
1384
  (m, _) => {
1385
1385
  const y = _.effectiveAt ?? ot(_._id);
@@ -1403,10 +1403,10 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1403
1403
  );
1404
1404
  A.value = e;
1405
1405
  const t = e.filter(({ ref: f }) => f == null ? void 0 : f.startsWith("bill_")).map(({ ref: f }) => f);
1406
- await F(t), b.value = H(e, "day").map(({ date: f, adjustments: m }) => ({
1406
+ await F(t), g.value = E(e, "day").map(({ date: f, adjustments: m }) => ({
1407
1407
  date: f,
1408
1408
  adjustments: m,
1409
- adjustmentsByTime: H(m, "minute")
1409
+ adjustmentsByTime: E(m, "minute")
1410
1410
  }));
1411
1411
  }
1412
1412
  async function F(e) {
@@ -1423,7 +1423,7 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1423
1423
  }), I = T(() => {
1424
1424
  const e = A.value, t = h.sku;
1425
1425
  return jn(e, t);
1426
- }), E = T(() => {
1426
+ }), H = T(() => {
1427
1427
  const e = [...A.value].computeFirst((f) => {
1428
1428
  var _, y;
1429
1429
  const m = (y = (_ = f.skus) == null ? void 0 : _.find) == null ? void 0 : y.call(_, (V) => V.sku._id === h.sku._id);
@@ -1526,7 +1526,7 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1526
1526
  }, {
1527
1527
  "side-sheet-header": C(() => [
1528
1528
  n("div", In, [
1529
- n("div", Un, g(v(i)("inventory.stock.history.title", [e.sku.name])), 1),
1529
+ n("div", Un, b(v(i)("inventory.stock.history.title", [e.sku.name])), 1),
1530
1530
  x(f, {
1531
1531
  variant: "tertiary",
1532
1532
  "prepend-icon": "close",
@@ -1554,7 +1554,7 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1554
1554
  focused: G
1555
1555
  }, {
1556
1556
  default: C(() => [
1557
- ve(g(o.value.startDate) + " - " + g(o.value.endDate), 1)
1557
+ ve(b(o.value.startDate) + " - " + b(o.value.endDate), 1)
1558
1558
  ]),
1559
1559
  _: 2
1560
1560
  }, 1032, ["focused"])
@@ -1573,28 +1573,28 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1573
1573
  "prepend-icon": "navigate_next"
1574
1574
  })
1575
1575
  ]),
1576
- k.value ? (B(), L("div", Hn, [
1576
+ k.value ? (B(), L("div", En, [
1577
1577
  x(y),
1578
1578
  x(V, { size: "xl" }),
1579
- n("div", En, g(v(i)("inventory.stock.history.loading")), 1),
1579
+ n("div", Hn, b(v(i)("inventory.stock.history.loading")), 1),
1580
1580
  x(y),
1581
1581
  x(y)
1582
- ])) : b.value && ((X = b.value) == null ? void 0 : X.length) > 0 ? (B(), L("div", Ln, [
1582
+ ])) : g.value && ((X = g.value) == null ? void 0 : X.length) > 0 ? (B(), L("div", Ln, [
1583
1583
  x(Y, { variant: "outlined" }, {
1584
1584
  default: C(() => [
1585
1585
  x(U, { class: "flex flex-col gap-4" }, {
1586
1586
  default: C(() => [
1587
1587
  n("div", Nn, [
1588
- n("div", On, g(v(i)("inventory.stock.history.summary.title")), 1)
1588
+ n("div", On, b(v(i)("inventory.stock.history.summary.title")), 1)
1589
1589
  ]),
1590
1590
  n("div", zn, [
1591
1591
  n("div", Yn, [
1592
- n("div", Kn, g(v(i)("inventory.stock.history.summary.totalPurchase")), 1),
1593
- n("div", Gn, g(j.value.PURCHASE), 1)
1592
+ n("div", Kn, b(v(i)("inventory.stock.history.summary.totalPurchase")), 1),
1593
+ n("div", Gn, b(j.value.PURCHASE), 1)
1594
1594
  ]),
1595
1595
  n("div", qn, [
1596
1596
  n("div", Wn, [
1597
- ve(g(v(i)("inventory.stock.history.summary.totalSales")) + "  ", 1),
1597
+ ve(b(v(i)("inventory.stock.history.summary.totalSales")) + "  ", 1),
1598
1598
  I.value != null ? (B(), O(Q, {
1599
1599
  key: 0,
1600
1600
  variant: "plain",
@@ -1611,45 +1611,45 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1611
1611
  _: 1
1612
1612
  }, 8, ["content"])) : ee("", !0)
1613
1613
  ]),
1614
- n("div", Jn, g(j.value.SALES), 1)
1614
+ n("div", Jn, b(j.value.SALES), 1)
1615
1615
  ]),
1616
1616
  n("div", Qn, [
1617
- n("div", Xn, g(v(i)("inventory.stock.history.summary.totalLose")), 1),
1618
- n("div", Zn, g(j.value.LOSE), 1)
1617
+ n("div", Xn, b(v(i)("inventory.stock.history.summary.totalLose")), 1),
1618
+ n("div", Zn, b(j.value.LOSE), 1)
1619
1619
  ]),
1620
1620
  n("div", eo, [
1621
- n("div", to, g(v(i)("inventory.stock.history.summary.totalRequest")), 1),
1622
- n("div", no, g(j.value.REQUEST), 1)
1621
+ n("div", to, b(v(i)("inventory.stock.history.summary.totalRequest")), 1),
1622
+ n("div", no, b(j.value.REQUEST), 1)
1623
1623
  ]),
1624
1624
  n("div", oo, [
1625
- n("div", so, g(v(i)("inventory.stock.history.summary.totalReceive")), 1),
1626
- n("div", ao, g(j.value.RECEIVE), 1)
1625
+ n("div", so, b(v(i)("inventory.stock.history.summary.totalReceive")), 1),
1626
+ n("div", ao, b(j.value.RECEIVE), 1)
1627
1627
  ]),
1628
1628
  n("div", ro, [
1629
- n("div", lo, g(v(i)("inventory.stock.history.summary.totalConvert")), 1),
1630
- n("div", io, g(j.value.CONVERT), 1)
1629
+ n("div", lo, b(v(i)("inventory.stock.history.summary.totalConvert")), 1),
1630
+ n("div", io, b(j.value.CONVERT), 1)
1631
1631
  ]),
1632
1632
  n("div", uo, [
1633
- n("div", co, g(v(i)("inventory.stock.history.summary.totalDamage")), 1),
1634
- n("div", mo, g(j.value.DAMAGE), 1)
1633
+ n("div", co, b(v(i)("inventory.stock.history.summary.totalDamage")), 1),
1634
+ n("div", mo, b(j.value.DAMAGE), 1)
1635
1635
  ]),
1636
1636
  n("div", po, [
1637
- n("div", vo, g(v(i)("inventory.stock.history.summary.openingBalance")), 1),
1638
- n("div", fo, g(E.value), 1)
1637
+ n("div", vo, b(v(i)("inventory.stock.history.summary.openingBalance")), 1),
1638
+ n("div", fo, b(H.value), 1)
1639
1639
  ]),
1640
1640
  n("div", yo, [
1641
- n("div", _o, g(v(i)("inventory.stock.history.summary.lastStockBalance")), 1),
1642
- n("div", ko, g(W.value), 1)
1641
+ n("div", _o, b(v(i)("inventory.stock.history.summary.lastStockBalance")), 1),
1642
+ n("div", ko, b(W.value), 1)
1643
1643
  ])
1644
1644
  ]),
1645
1645
  v(a).enableTotalCost ? (B(), L("div", ho, [
1646
1646
  x(me, { class: "w-full" }),
1647
- n("div", bo, [
1648
- n("div", go, [
1647
+ n("div", go, [
1648
+ n("div", bo, [
1649
1649
  x(Ge, { "z-index": 50 }, {
1650
1650
  default: C(() => [
1651
1651
  n("div", xo, [
1652
- ve(g(v(i)("inventory.stock.history.estimatedValue")) + " ", 1),
1652
+ ve(b(v(i)("inventory.stock.history.estimatedValue")) + " ", 1),
1653
1653
  x(Q, {
1654
1654
  variant: "plain",
1655
1655
  placement: "top",
@@ -1668,20 +1668,20 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1668
1668
  ]),
1669
1669
  _: 1
1670
1670
  }),
1671
- n("div", So, g(typeof ne.value != "string" ? v(je)(ne.value, !1, ne.value.precision) : ne.value), 1)
1671
+ n("div", So, b(typeof ne.value != "string" ? v(je)(ne.value, !1, ne.value.precision) : ne.value), 1)
1672
1672
  ]),
1673
1673
  n("div", $o, [
1674
1674
  x(Ge, { "z-index": 50 }, {
1675
1675
  default: C(() => [
1676
1676
  n("div", wo, [
1677
- ve(g(v(i)("inventory.stock.history.costSold")) + " ", 1),
1677
+ ve(b(v(i)("inventory.stock.history.costSold")) + " ", 1),
1678
1678
  x(Q, {
1679
1679
  variant: "plain",
1680
1680
  placement: "top",
1681
1681
  "z-index": 50
1682
1682
  }, {
1683
1683
  content: C(() => [
1684
- n("div", Bo, g(v(i)("inventory.stock.history.costSoldTooltip")), 1)
1684
+ n("div", Bo, b(v(i)("inventory.stock.history.costSoldTooltip")), 1)
1685
1685
  ]),
1686
1686
  default: C(() => [
1687
1687
  x(K, {
@@ -1695,7 +1695,7 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1695
1695
  ]),
1696
1696
  _: 1
1697
1697
  }),
1698
- n("div", Fo, g(P.value), 1)
1698
+ n("div", Fo, b(P.value), 1)
1699
1699
  ])
1700
1700
  ])
1701
1701
  ])) : ee("", !0)
@@ -1706,7 +1706,7 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1706
1706
  _: 1
1707
1707
  }),
1708
1708
  Ao,
1709
- (B(!0), L(te, null, ae(b.value, (G) => (B(), L(te, {
1709
+ (B(!0), L(te, null, ae(g.value, (G) => (B(), L(te, {
1710
1710
  key: G.date
1711
1711
  }, [
1712
1712
  e.sku ? (B(), O(Dn, {
@@ -1720,12 +1720,12 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1720
1720
  x(y),
1721
1721
  n("div", null, [
1722
1722
  n("img", {
1723
- src: v(Et),
1723
+ src: v(Ht),
1724
1724
  alt: "List is empty"
1725
1725
  }, null, 8, Co)
1726
1726
  ]),
1727
- n("div", Do, g(v(i)("inventory.stock.history.noRecords")), 1),
1728
- n("div", Mo, g(v(i)("inventory.stock.history.changeDateRange")), 1),
1727
+ n("div", Do, b(v(i)("inventory.stock.history.noRecords")), 1),
1728
+ n("div", Mo, b(v(i)("inventory.stock.history.changeDateRange")), 1),
1729
1729
  x(y),
1730
1730
  x(y)
1731
1731
  ]))
@@ -1739,7 +1739,7 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1739
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({
1740
1740
  __name: "StockView",
1741
1741
  setup(c) {
1742
- const { t: d } = le(), r = Te(), s = ue(), S = He(), l = lt(), a = at(), { columnDefs: i } = qt();
1742
+ const { t: d } = le(), r = Te(), s = ue(), S = Ee(), l = lt(), a = at(), { columnDefs: i } = qt();
1743
1743
  s.watchLocation(u);
1744
1744
  const h = R(!1), k = de();
1745
1745
  async function u() {
@@ -1777,12 +1777,12 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1777
1777
  trackingUnitAbbrev: F ? ((P = $.unit.measurements.find((N) => N.id === F)) == null ? void 0 : P.abbrev) ?? "" : $.unit.abbrev
1778
1778
  };
1779
1779
  })
1780
- ), w = R(""), { breakpoints: A } = Mt(), b = T(() => A.value.xs || A.value.sm ? 10 : 20), p = Ut(), M = T(
1780
+ ), w = R(""), { breakpoints: A } = Mt(), g = T(() => A.value.xs || A.value.sm ? 10 : 20), p = Ut(), M = T(
1781
1781
  () => {
1782
1782
  var $;
1783
1783
  return (($ = s._currentLocation) == null ? void 0 : $.type) === Dt.restaurant;
1784
1784
  }
1785
- ), H = T(() => {
1785
+ ), E = T(() => {
1786
1786
  const $ = [
1787
1787
  { icon: "ios_share", onClick: () => zt(o.value) }
1788
1788
  ];
@@ -1794,7 +1794,7 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1794
1794
  title: v(d)("inventory.stock.title")
1795
1795
  }, {
1796
1796
  default: C(() => {
1797
- var I, E, W, z;
1797
+ var I, H, W, z;
1798
1798
  return [
1799
1799
  n("div", Io, [
1800
1800
  x(mt, {
@@ -1802,7 +1802,7 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1802
1802
  "change-location": "",
1803
1803
  search: w.value,
1804
1804
  "onUpdate:search": F[0] || (F[0] = (P) => w.value = P),
1805
- actions: H.value
1805
+ actions: E.value
1806
1806
  }, null, 8, ["search", "actions"]),
1807
1807
  (B(), O(j, {
1808
1808
  style: Qe(v(p).tableHeight),
@@ -1812,7 +1812,7 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1812
1812
  loading: h.value || !v(s)._currentLocation,
1813
1813
  key: (I = v(s)._currentLocation) == null ? void 0 : I.dbName,
1814
1814
  onRowClick: F[1] || (F[1] = (P) => v(l).showSkuHistory(P.original)),
1815
- "page-size": b.value
1815
+ "page-size": g.value
1816
1816
  }, {
1817
1817
  "list-row": C((P) => [
1818
1818
  x(It, {
@@ -1861,7 +1861,7 @@ const In = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Un = {
1861
1861
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
1862
1862
  ]),
1863
1863
  (B(), O(ut, { to: "body" }, [
1864
- (E = v(l).stockHistoryProps) != null && E.sku ? (B(), O(jo, $e(we({ key: 0 }, v(l).stockHistoryProps)), null, 16)) : ee("", !0),
1864
+ (H = v(l).stockHistoryProps) != null && H.sku ? (B(), O(jo, $e(we({ key: 0 }, v(l).stockHistoryProps)), null, 16)) : ee("", !0),
1865
1865
  (W = v(l).convertSkuDialogProps) != null && W.sku ? (B(), O(cn, $e(we({ key: 1 }, v(l).convertSkuDialogProps)), null, 16)) : ee("", !0),
1866
1866
  (z = v(l).adjustSkuDialogProps) != null && z.stock ? (B(), O(hn, $e(we({ key: 2 }, v(l).adjustSkuDialogProps)), null, 16)) : ee("", !0)
1867
1867
  ]))