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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/{App-Cr-n7HVf.js → App-Bu28H-qV.js} +66 -63
  2. package/dist/{ApprovalView-BYHDmt9W.js → ApprovalView-Cgb6Getu.js} +20 -20
  3. package/dist/{BindingsDialog-CI0nYM1_.js → BindingsDialog-DGtPuzr1.js} +2 -2
  4. package/dist/{BindingsPicker-BVzF3C8O.js → BindingsPicker-BamL3_Vk.js} +3 -3
  5. package/dist/{BindingsTable-B21_9L2o.js → BindingsTable-C9FeglE4.js} +1 -1
  6. package/dist/{ClosingDraftView-k2Vsz8-W.js → ClosingDraftView-C_B1u3g1.js} +47 -47
  7. package/dist/{ClosingTemplateView-BLda7tYC.js → ClosingTemplateView-BxK3yAV4.js} +21 -21
  8. package/dist/{FmCustomAttribute.vue_vue_type_script_setup_true_lang-DUDOaU6F.js → FmCustomAttribute.vue_vue_type_script_setup_true_lang-DAWPJ65s.js} +11 -11
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CXuer_x5.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D1PU7pae.js} +7 -7
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-Ds3yBf9U.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D1AIFe-0.js} +37 -37
  11. package/dist/{IngredientGroupView-CgZ4YT3i.js → IngredientGroupView-S7ps5Bsc.js} +1 -1
  12. package/dist/{IngredientsView-tPERrF9O.js → IngredientsView-BesGBkXM.js} +14 -15
  13. package/dist/{IntegrationView-CoF_rdWv.js → IntegrationView-Bkf7zGLw.js} +1 -1
  14. package/dist/{InventoryBindingForm-BSnofTIL.js → InventoryBindingForm-DHwTsR2G.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-4d9oz7Xh.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CseHejfD.js} +51 -51
  16. package/dist/{InventoryBindingSummary-qm9ZUFny.js → InventoryBindingSummary-COybHYsZ.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CQY98Hj6.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Cgv6gv2x.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-NUkiVop4.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BGJNkqYH.js} +6 -6
  19. package/dist/PublishView-2EcaLsU2.js +192 -0
  20. package/dist/{PurchaseOrderPrintPreview-CIWiq2NB.js → PurchaseOrderPrintPreview-DPFfFQQd.js} +5 -5
  21. package/dist/ReceiveRequestView-Dnl79p8h.js +1843 -0
  22. package/dist/{RecipeView-CzWlx1Xv.js → RecipeView-CmaMGv6N.js} +25 -25
  23. package/dist/{StockView-IPXGJNN8.js → StockView-CLw8un14.js} +121 -122
  24. package/dist/{SupplierView-DuL3NXc0.js → SupplierView-DLcZ6HDt.js} +11 -12
  25. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-82Bu89OE.js → TransferDetails.vue_vue_type_script_setup_true_lang-DgwS1KTx.js} +137 -137
  26. package/dist/{TransferTemplateView-BEaRafuO.js → TransferTemplateView-BRDq2_Zw.js} +81 -82
  27. package/dist/{UnitView-Cwo0mthQ.js → UnitView-rJrXqu8W.js} +14 -14
  28. package/dist/{WarehouseView-DzjQrpyv.js → WarehouseView-BwSLmicZ.js} +33 -33
  29. package/dist/api/inventory.d.ts +4 -0
  30. package/dist/{app-CpuFfqWF.js → app-F909rQ5n.js} +12512 -11478
  31. package/dist/app.d.ts +24 -0
  32. package/dist/app.js +1 -1
  33. package/dist/{decimal-bSGrDlvd.js → decimal-0pQSNdVz.js} +1 -1
  34. package/dist/{format-unit-display-D4gi2D-O.js → format-unit-display-CM40cl03.js} +60 -60
  35. package/dist/{index-Cn1ato-l.js → index-DzA11XLY.js} +88 -88
  36. package/dist/{index-COeURijn.js → index-rBUXpqWE.js} +3 -3
  37. package/dist/layout/SingleColumnLayout.vue.d.ts +1 -0
  38. package/dist/router/name.d.ts +1 -0
  39. package/dist/{stock-B1Rchi6n.js → stock-c68S1hmD.js} +3 -3
  40. package/dist/stores/feature.d.ts +34 -2
  41. package/dist/stores/location.d.ts +29 -1
  42. package/dist/{supplier-CeY_Gro-.js → supplier-CPuz6JVf.js} +1 -1
  43. package/dist/tsconfig.app.tsbuildinfo +1 -1
  44. package/dist/{use-inventory-binding-dialog-BXqY40wn.js → use-inventory-binding-dialog-DjlU5nUb.js} +1 -1
  45. package/dist/views/adjustment-template/wastage-template/actions.d.ts +48 -0
  46. package/dist/views/adjustment-template/wastage-template/table.d.ts +48 -0
  47. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +8 -0
  48. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +48 -0
  49. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +48 -0
  50. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +48 -0
  51. package/dist/views/publish/PublishView.vue.d.ts +2 -0
  52. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +16 -0
  53. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +24 -0
  54. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +24 -0
  55. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +4 -0
  56. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -0
  57. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -0
  58. package/dist/vue-i18n-BiavdzKQ.js +2365 -0
  59. package/package.json +1 -1
  60. package/dist/ReceiveRequestView-Dgt3FeGb.js +0 -4205
  61. package/dist/feature-D8aRYGen.js +0 -962
@@ -1,21 +1,20 @@
1
- import { defineComponent as re, ref as R, computed as I, resolveComponent as B, openBlock as $, createBlock as z, withCtx as D, createElementVNode as n, normalizeClass as he, toDisplayString as k, createVNode as g, createElementBlock as O, Fragment as ne, renderList as ae, unref as u, h as ye, watch as ke, isRef as je, createCommentVNode as te, reactive as at, onMounted as Ge, normalizeStyle as Je, createTextVNode as pe, Teleport as rt, normalizeProps as Se, mergeProps as we } from "vue";
2
- import { u as ce, N as lt, e as Ue, f as it, a as Ie, F as Le, O as Ce, i as ie, J as ut, t as ge, L as Me, A as ct, M as dt, K as ve, P as mt, Q as ee, T as pt, V as ze, l as vt, H as ft, W as yt, X as _t, Y as Qe, Z as G, $ as ht, q as Xe, a0 as De, a1 as kt, a2 as gt, n as Ne, a3 as bt, a4 as xt, C as Fe, a5 as St, a6 as wt, a7 as Ft, y as $t, _ as At, z as Vt, B as Ct, E as Ye } from "./app-CpuFfqWF.js";
3
- import { u as Pe, a as Te } from "./stock-B1Rchi6n.js";
4
- import { g as be } from "./decimal-bSGrDlvd.js";
5
- import { e as Mt, u as Ze, i as et, _ as Ke } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-NUkiVop4.js";
1
+ import { defineComponent as re, ref as H, computed as I, resolveComponent as B, openBlock as $, createBlock as z, withCtx as D, createElementVNode as n, normalizeClass as he, toDisplayString as k, createVNode as g, createElementBlock as O, Fragment as ne, renderList as ae, unref as u, h as ye, watch as ke, isRef as je, createCommentVNode as te, reactive as at, onMounted as qe, normalizeStyle as Je, createTextVNode as pe, Teleport as rt, normalizeProps as Se, mergeProps as we } from "vue";
2
+ import { u as ce, O as lt, f as Ue, h as it, a as Ie, F as Le, P as Ce, j as ie, K as ut, t as ge, N as Me, A as ct, M as dt, L as ve, Q as mt, T as ee, V as pt, W as ze, m as vt, J as ft, X as yt, Y as _t, Z as Qe, $ as q, a0 as ht, r as Xe, a1 as De, a2 as kt, a3 as gt, o as Ne, c as bt, a4 as xt, a5 as St, C as Fe, a6 as wt, a7 as Ft, a8 as $t, z as At, _ as Vt, B as Ct, E as Mt, G as Ye } from "./app-F909rQ5n.js";
3
+ import { u as Pe, a as Te } from "./stock-c68S1hmD.js";
4
+ import { g as be } from "./decimal-0pQSNdVz.js";
5
+ import { e as Dt, u as Ze, i as et, _ as Ke } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-BGJNkqYH.js";
6
6
  import { _ as Be, S as $e, g as tt } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
7
- import { _ as Dt } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
8
- import { useI18n as le, useCoreStore as Bt } from "@feedmepos/mf-common";
9
- import { useSnackbar as fe, useDialog as nt, useProxiedModel as He, useBreakpoints as jt } from "@feedmepos/ui-library";
10
- import { defineStore as Ut } from "pinia";
11
- import { u as It } from "./use-inventory-binding-dialog-BXqY40wn.js";
12
- import { _ as Pt } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CQY98Hj6.js";
13
- import { E as Tt } from "./empty-placeholder-wf6-BWE8.js";
14
- import "./index-Cn1ato-l.js";
7
+ import { _ as Bt } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
8
+ import { useI18n as le, useCoreStore as jt } from "@feedmepos/mf-common";
9
+ import { useSnackbar as fe, useDialog as nt, useProxiedModel as Re, useBreakpoints as Ut } from "@feedmepos/ui-library";
10
+ import { defineStore as It } from "pinia";
11
+ import { u as Pt } from "./use-inventory-binding-dialog-DjlU5nUb.js";
12
+ import { _ as Tt } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Cgv6gv2x.js";
13
+ import { E as Rt } from "./empty-placeholder-wf6-BWE8.js";
14
+ import "./index-DzA11XLY.js";
15
15
  import "./array-hChJVZLE.js";
16
- import { u as Ht } from "./feature-D8aRYGen.js";
17
16
  var _e = /* @__PURE__ */ ((p) => (p.History = "History", p.Convert = "Convert", p.Adjust = "Adjust", p))(_e || {});
18
- const Rt = [
17
+ const Ht = [
19
18
  {
20
19
  translationKey: "inventory.stock.action.history",
21
20
  color: "text-neutral-700",
@@ -47,7 +46,7 @@ async function Ot(p) {
47
46
  / /g,
48
47
  "_"
49
48
  )}_${lt().format("DD_MM_YYYY_HHmm")}.xlsx`;
50
- await Mt(
49
+ await Dt(
51
50
  [
52
51
  {
53
52
  name: "stock",
@@ -114,7 +113,7 @@ const Lt = { class: "fm-typo-en-body-md-400 flex-grow" }, ot = /* @__PURE__ */ r
114
113
  const a = h(s.sku);
115
114
  b ? localStorage.setItem(a, b) : localStorage.setItem(a, s.unit._id), x.value = xe(s.sku, s.unit);
116
115
  }
117
- const s = p, x = R(xe(s.sku, s.unit)), y = I(() => {
116
+ const s = p, x = H(xe(s.sku, s.unit)), y = I(() => {
118
117
  const { measurements: b } = s.unit;
119
118
  return [
120
119
  {
@@ -135,7 +134,7 @@ const Lt = { class: "fm-typo-en-body-md-400 flex-grow" }, ot = /* @__PURE__ */ r
135
134
  var b;
136
135
  return ((b = y.value.find((a) => c(a))) == null ? void 0 : b.label) ?? "";
137
136
  }
138
- ), F = R(!1);
137
+ ), F = H(!1);
139
138
  return (b, a) => {
140
139
  const o = B("FmIcon"), S = B("FmMenuItem"), A = B("FmMenu");
141
140
  return $(), z(A, {
@@ -173,15 +172,15 @@ const Lt = { class: "fm-typo-en-body-md-400 flex-grow" }, ot = /* @__PURE__ */ r
173
172
  __name: "StockHeaderPreview",
174
173
  setup(p) {
175
174
  const { t: h } = le();
176
- return (r, s) => ($(), z(Dt, null, {
175
+ return (r, s) => ($(), z(Bt, null, {
177
176
  default: D(() => [
178
177
  n("div", zt, k(u(h)("inventory.stock.prediction.daysRemaining")), 1)
179
178
  ]),
180
179
  _: 1
181
180
  }));
182
181
  }
183
- }), st = Ut("stockActions", () => {
184
- const p = R(!1), h = ce(), r = Pe(), s = Ze(), x = fe(), y = nt(), { t: c } = le();
182
+ }), st = It("stockActions", () => {
183
+ const p = H(!1), h = ce(), r = Pe(), s = Ze(), x = fe(), y = nt(), { t: c } = le();
185
184
  async function d() {
186
185
  if (h._currentLocation) {
187
186
  p.value = !0;
@@ -198,7 +197,7 @@ const Lt = { class: "fm-typo-en-body-md-400 flex-grow" }, ot = /* @__PURE__ */ r
198
197
  }
199
198
  }
200
199
  }
201
- const F = R();
200
+ const F = H();
202
201
  async function b(i) {
203
202
  var w, M, P;
204
203
  if (!!!((M = (w = i.convert) == null ? void 0 : w.inventoryBindings) != null && M.length)) {
@@ -221,7 +220,7 @@ const Lt = { class: "fm-typo-en-body-md-400 flex-grow" }, ot = /* @__PURE__ */ r
221
220
  };
222
221
  F.value = C;
223
222
  }
224
- const a = R();
223
+ const a = H();
225
224
  async function o(i) {
226
225
  const j = {
227
226
  stock: i,
@@ -235,7 +234,7 @@ const Lt = { class: "fm-typo-en-body-md-400 flex-grow" }, ot = /* @__PURE__ */ r
235
234
  };
236
235
  a.value = j;
237
236
  }
238
- const S = R();
237
+ const S = H();
239
238
  async function A(i) {
240
239
  const j = {
241
240
  sku: i,
@@ -325,7 +324,7 @@ function Yt() {
325
324
  cell(x) {
326
325
  var y;
327
326
  return it(
328
- ((y = p._currentLocation) == null ? void 0 : y.type) === "restaurant" ? Rt : Et,
327
+ ((y = p._currentLocation) == null ? void 0 : y.type) === "restaurant" ? Ht : Et,
329
328
  (c) => h.onActionMenu(c, x.row.original)
330
329
  );
331
330
  },
@@ -373,10 +372,10 @@ const Kt = {
373
372
  return this;
374
373
  }
375
374
  };
376
- function We(p) {
375
+ function Ge(p) {
377
376
  return { ...Kt, context: p };
378
377
  }
379
- const Wt = { class: "flex items-center" }, qt = { class: "fm-typo-en-title-md-800" }, Gt = { class: "flex flex-col gap-24 w-full" }, Jt = { class: "flex flex-col gap-8" }, Qt = { class: "fm-typo-en-body-lg-600" }, Xt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary flex-grow" }, Zt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-error" }, en = { class: "flex flex-col p-16 gap-8" }, tn = { class: "flex flex-col gap-4" }, nn = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary bg-fm-color-neutral-gray-100 border-b py-12 px-16" }, on = { class: "grid grid-cols-[auto_100px_100px_48px] xs:grid-cols-[auto_80px_120px_48px] gap-8 px-8 items-center" }, sn = { class: "xs:col-span-3" }, an = { class: "flex gap-8" }, rn = /* @__PURE__ */ re({
378
+ const Gt = { class: "flex items-center" }, Wt = { class: "fm-typo-en-title-md-800" }, qt = { class: "flex flex-col gap-24 w-full" }, Jt = { class: "flex flex-col gap-8" }, Qt = { class: "fm-typo-en-body-lg-600" }, Xt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary flex-grow" }, Zt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-error" }, en = { class: "flex flex-col p-16 gap-8" }, tn = { class: "flex flex-col gap-4" }, nn = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary bg-fm-color-neutral-gray-100 border-b py-12 px-16" }, on = { class: "grid grid-cols-[auto_100px_100px_48px] xs:grid-cols-[auto_80px_120px_48px] gap-8 px-8 items-center" }, sn = { class: "xs:col-span-3" }, an = { class: "flex gap-8" }, rn = /* @__PURE__ */ re({
380
379
  __name: "ConvertSkuDialog",
381
380
  props: {
382
381
  sku: {},
@@ -385,7 +384,7 @@ const Wt = { class: "flex items-center" }, qt = { class: "fm-typo-en-title-md-80
385
384
  },
386
385
  emits: ["update:show", "submitted"],
387
386
  setup(p, { expose: h, emit: r }) {
388
- const s = p, x = r, y = It(), c = Ie(), d = Te(), F = fe(), { t: b } = le(), a = R(0), o = R(null), S = I(() => c.skus), A = I(
387
+ const s = p, x = r, y = Pt(), c = Ie(), d = Te(), F = fe(), { t: b } = le(), a = H(0), o = H(null), S = I(() => c.skus), A = I(
389
388
  () => {
390
389
  var t, e;
391
390
  return (((e = (t = s.sku) == null ? void 0 : t.convert) == null ? void 0 : e.inventoryBindings) ?? []).filter(
@@ -399,7 +398,7 @@ const Wt = { class: "flex items-center" }, qt = { class: "fm-typo-en-title-md-80
399
398
  set(t) {
400
399
  t ? o.value = Ue(A.value) : (o.value = null, a.value = Math.min(a.value, s.maxCount ?? 0));
401
400
  }
402
- }), i = R(!1);
401
+ }), i = H(!1);
403
402
  ke([() => s.show], ([t]) => {
404
403
  t && (a.value = 0);
405
404
  });
@@ -409,7 +408,7 @@ const Wt = { class: "flex items-center" }, qt = { class: "fm-typo-en-title-md-80
409
408
  function E(t) {
410
409
  if (o.value)
411
410
  return !0;
412
- const e = We(t).isInteger().max(s.maxCount ?? 0).error ?? "";
411
+ const e = Ge(t).isInteger().max(s.maxCount ?? 0).error ?? "";
413
412
  return e || !0;
414
413
  }
415
414
  function C(t) {
@@ -418,7 +417,7 @@ const Wt = { class: "flex items-center" }, qt = { class: "fm-typo-en-title-md-80
418
417
  var N;
419
418
  return V.id === ((N = s.sku.convert) == null ? void 0 : N.measurement);
420
419
  }) ?? null : null, m = Ce(s.sku.unit, e), l = mt(+t);
421
- return We(l).isInteger().max(m).error ? "Precision cannot be more than " + m : !0;
420
+ return Ge(l).isInteger().max(m).error ? "Precision cannot be more than " + m : !0;
422
421
  }
423
422
  const w = I(
424
423
  () => {
@@ -432,8 +431,8 @@ const Wt = { class: "flex items-center" }, qt = { class: "fm-typo-en-title-md-80
432
431
  var m, l, f;
433
432
  const t = (l = (m = s.sku.convert) == null ? void 0 : m.inventoryBindings) == null ? void 0 : l.filter((v) => v.type === "SKU");
434
433
  return (f = o.value ?? t) == null ? void 0 : f.map((v) => {
435
- var Z, q, se, Re, Ee;
436
- const V = c.skus.find((me) => me._id === v.id), N = ((Z = v.measurement) == null ? void 0 : Z.abbrev) ?? ((q = V == null ? void 0 : V.unit) == null ? void 0 : q.abbrev), X = (se = s.sku.convert) != null && se.measurement ? s.sku.unit.measurements.find((me) => {
434
+ var Z, W, se, He, Ee;
435
+ const V = c.skus.find((me) => me._id === v.id), N = ((Z = v.measurement) == null ? void 0 : Z.abbrev) ?? ((W = V == null ? void 0 : V.unit) == null ? void 0 : W.abbrev), X = (se = s.sku.convert) != null && se.measurement ? s.sku.unit.measurements.find((me) => {
437
436
  var Oe;
438
437
  return me.id === ((Oe = s.sku.convert) == null ? void 0 : Oe.measurement);
439
438
  }) ?? null : null, de = Ce(s.sku.unit, X), U = C(`${a.value}`) === !0 ? ie(
@@ -442,14 +441,14 @@ const Wt = { class: "flex items-center" }, qt = { class: "fm-typo-en-title-md-80
442
441
  ge(+a.value, de)
443
442
  ),
444
443
  !1
445
- ) : "0", W = (Ee = (Re = o.value) == null ? void 0 : Re.find((me) => me.id === (V == null ? void 0 : V._id))) == null ? void 0 : Ee.amount, J = W ? ie(W, !1) : null;
444
+ ) : "0", G = (Ee = (He = o.value) == null ? void 0 : He.find((me) => me.id === (V == null ? void 0 : V._id))) == null ? void 0 : Ee.amount, J = G ? ie(G, !1) : null;
446
445
  return {
447
446
  sku: V,
448
447
  convertAmount: J ?? U,
449
448
  abbrev: N
450
449
  };
451
450
  });
452
- }), P = R();
451
+ }), P = H();
453
452
  h({
454
453
  validateInputs: () => {
455
454
  var t, e;
@@ -464,7 +463,7 @@ const Wt = { class: "flex items-center" }, qt = { class: "fm-typo-en-title-md-80
464
463
  (e = (t = P.value) == null ? void 0 : t.resetInputs) == null || e.call(t);
465
464
  }
466
465
  });
467
- const T = He(s, "show");
466
+ const T = Re(s, "show");
468
467
  async function Q(t, e, m) {
469
468
  i.value = !0;
470
469
  try {
@@ -503,7 +502,7 @@ const Wt = { class: "flex items-center" }, qt = { class: "fm-typo-en-title-md-80
503
502
  const e = S.value.find((m) => m._id === t);
504
503
  return e ? tt(e.unit, !0) : [];
505
504
  }
506
- function H(t, e) {
505
+ function R(t, e) {
507
506
  const m = L(t), l = m.find((f) => f.value === e) ?? m.find((f) => f.value === null);
508
507
  return l ? {
509
508
  ...l,
@@ -552,12 +551,12 @@ const Wt = { class: "flex items-center" }, qt = { class: "fm-typo-en-title-md-80
552
551
  "max-width": 500
553
552
  }, {
554
553
  "side-sheet-header": D(() => [
555
- n("div", Wt, [
556
- n("div", qt, k(u(b)("inventory.stock.convert.title", { name: t.sku.name })), 1)
554
+ n("div", Gt, [
555
+ n("div", Wt, k(u(b)("inventory.stock.convert.title", { name: t.sku.name })), 1)
557
556
  ])
558
557
  ]),
559
558
  default: D(() => [
560
- n("div", Gt, [
559
+ n("div", qt, [
561
560
  g(l, {
562
561
  ref_key: "formRef",
563
562
  ref: P,
@@ -584,9 +583,9 @@ const Wt = { class: "flex items-center" }, qt = { class: "fm-typo-en-title-md-80
584
583
  n("div", Jt, [
585
584
  n("div", Qt, k(u(b)("inventory.stock.convert.deductionSummary")), 1),
586
585
  ($(!0), O(ne, null, ae(M.value, (U) => {
587
- var W, J;
586
+ var G, J;
588
587
  return $(), O("div", {
589
- key: (W = U.sku) == null ? void 0 : W._id,
588
+ key: (G = U.sku) == null ? void 0 : G._id,
590
589
  class: "flex items-center"
591
590
  }, [
592
591
  n("div", Xt, k((J = U.sku) == null ? void 0 : J.name), 1),
@@ -620,14 +619,14 @@ const Wt = { class: "flex items-center" }, qt = { class: "fm-typo-en-title-md-80
620
619
  modelValue: +u(ie)(U.amount ?? { amount: 1, precision: 0 }),
621
620
  rules: [
622
621
  u(dt)(
623
- S.value.find((W) => W._id === U.id).unit,
622
+ S.value.find((G) => G._id === U.id).unit,
624
623
  U.measurement
625
624
  ),
626
625
  u(Me)(0)
627
626
  ]
628
627
  }, {
629
- default: D(({ invalid: W }) => {
630
- var J, Z, q;
628
+ default: D(({ invalid: G }) => {
629
+ var J, Z, W;
631
630
  return [
632
631
  n("div", on, [
633
632
  n("div", sn, k((J = S.value.find((se) => se._id === U.id)) == null ? void 0 : J.name), 1),
@@ -638,15 +637,15 @@ const Wt = { class: "flex items-center" }, qt = { class: "fm-typo-en-title-md-80
638
637
  U.amount ?? { amount: 1, precision: 0 }
639
638
  ),
640
639
  "onUpdate:modelValue": (se) => Y(U.id, se, o.value ?? []),
641
- invalid: W
640
+ invalid: G
642
641
  }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"]),
643
642
  g(N, {
644
643
  disabled: i.value,
645
644
  class: "translate-y-[2px]",
646
645
  items: L(U.id),
647
- "model-value": (q = H(U.id, (Z = U.measurement) == null ? void 0 : Z.id)) == null ? void 0 : q.value,
646
+ "model-value": (W = R(U.id, (Z = U.measurement) == null ? void 0 : Z.id)) == null ? void 0 : W.value,
648
647
  "onUpdate:modelValue": (se) => K(U.id, se, o.value ?? []),
649
- invalid: W
648
+ invalid: G
650
649
  }, {
651
650
  "helper-text": D(() => e[4] || (e[4] = [])),
652
651
  _: 2
@@ -685,8 +684,8 @@ const Wt = { class: "flex items-center" }, qt = { class: "fm-typo-en-title-md-80
685
684
  loading: i.value,
686
685
  label: u(b)("inventory.stock.convert.convertButton"),
687
686
  onClick: e[2] || (e[2] = (U) => {
688
- var W, J;
689
- return (J = (W = P.value) == null ? void 0 : W.validateInputs) == null ? void 0 : J.call(W);
687
+ var G, J;
688
+ return (J = (G = P.value) == null ? void 0 : G.validateInputs) == null ? void 0 : J.call(G);
690
689
  })
691
690
  }, null, 8, ["loading", "label"])
692
691
  ])
@@ -700,7 +699,7 @@ function Ae(p, h) {
700
699
  const r = ge(p, h);
701
700
  return { ...r, amount: -r.amount };
702
701
  }
703
- function qe(p, h) {
702
+ function We(p, h) {
704
703
  return ge(Math.abs(p), h);
705
704
  }
706
705
  const Ve = {
@@ -718,11 +717,11 @@ const Ve = {
718
717
  },
719
718
  [ee.enum.EXTRA]: {
720
719
  label: "Extra",
721
- toAdjustmentAmount: qe
720
+ toAdjustmentAmount: We
722
721
  },
723
722
  [ee.enum.PURCHASE]: {
724
723
  label: "Purchase",
725
- toAdjustmentAmount: qe
724
+ toAdjustmentAmount: We
726
725
  }
727
726
  }, ln = { class: "col-span-2 flex" }, un = { class: "fm-typo-en-body-lg-600 flex-1" }, cn = /* @__PURE__ */ re({
728
727
  __name: "AdjustedItemForm",
@@ -814,7 +813,7 @@ const Ve = {
814
813
  rules: [u(vt)()],
815
814
  "label-mark": "required"
816
815
  }, null, 8, ["disabled", "items", "modelValue", "rules"]),
817
- g(Pt, {
816
+ g(Tt, {
818
817
  disabled: a.disabled,
819
818
  label: "Amount",
820
819
  step: +u(ie)({
@@ -853,11 +852,11 @@ const Ve = {
853
852
  },
854
853
  emits: ["update:show", "submitted"],
855
854
  setup(p, { expose: h, emit: r }) {
856
- const s = p, x = r, y = Ie(), c = nt(), d = Te(), F = fe(), b = R(!1), { t: a } = le();
855
+ const s = p, x = r, y = Ie(), c = nt(), d = Te(), F = fe(), b = H(!1), { t: a } = le();
857
856
  function o() {
858
857
  i(Ue(_));
859
858
  }
860
- const S = R();
859
+ const S = H();
861
860
  h({
862
861
  validateInputs: () => {
863
862
  var C, w;
@@ -872,7 +871,7 @@ const Ve = {
872
871
  (w = (C = S.value) == null ? void 0 : C.resetInputs) == null || w.call(C);
873
872
  }
874
873
  });
875
- const A = He(s, "show"), _ = at({
874
+ const A = Re(s, "show"), _ = at({
876
875
  remark: "",
877
876
  adjustments: [
878
877
  {
@@ -1000,8 +999,8 @@ const Ve = {
1000
999
  ($(!0), O(ne, null, ae(_.adjustments, (Y, L) => ($(), z(cn, {
1001
1000
  key: Y.id,
1002
1001
  modelValue: _.adjustments[L],
1003
- "onUpdate:modelValue": (H) => _.adjustments[L] = H,
1004
- "onClick:delete": (H) => E(L)
1002
+ "onUpdate:modelValue": (R) => _.adjustments[L] = R,
1003
+ "onClick:delete": (R) => E(L)
1005
1004
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onClick:delete"]))), 128))
1006
1005
  ]),
1007
1006
  _: 1
@@ -1013,8 +1012,8 @@ const Ve = {
1013
1012
  label: u(a)("inventory.stock.adjust.adjustButton"),
1014
1013
  loading: b.value,
1015
1014
  onClick: w[1] || (w[1] = (Y) => {
1016
- var L, H;
1017
- return (H = (L = S.value) == null ? void 0 : L.validateInputs) == null ? void 0 : H.call(L);
1015
+ var L, R;
1016
+ return (R = (L = S.value) == null ? void 0 : L.validateInputs) == null ? void 0 : R.call(L);
1018
1017
  })
1019
1018
  }, null, 8, ["label", "loading"])
1020
1019
  ])
@@ -1057,8 +1056,8 @@ const Ve = {
1057
1056
  bills: { default: () => [] }
1058
1057
  },
1059
1058
  setup(p) {
1060
- const h = p, r = R(!1), s = R(), x = R(null), y = I(() => x.value === null ? "unset" : r.value ? `${x.value}px` : "0px");
1061
- Ge(() => {
1059
+ const h = p, r = H(!1), s = H(), x = H(null), y = I(() => x.value === null ? "unset" : r.value ? `${x.value}px` : "0px");
1060
+ qe(() => {
1062
1061
  var b;
1063
1062
  x.value = ((b = s.value) == null ? void 0 : b.scrollHeight) || 0;
1064
1063
  });
@@ -1074,7 +1073,7 @@ const Ve = {
1074
1073
  }
1075
1074
  return Object.entries(o).reduce(
1076
1075
  (i, [j, E]) => (i[j] = /// comment, because without it formatter makes code uglier
1077
- `${G.toFormatString({
1076
+ `${q.toFormatString({
1078
1077
  value: E,
1079
1078
  precision: 4
1080
1079
  })} ${a.unit.abbrev}`, i),
@@ -1097,7 +1096,7 @@ const Ve = {
1097
1096
  return o.amounts.map((i) => {
1098
1097
  var j;
1099
1098
  return {
1100
- amount: `${G.toFormatString({ value: i.amount, precision: 4 })} ${((j = i.measurement) == null ? void 0 : j.abbrev) ?? o.sku.unit.abbrev}`,
1099
+ amount: `${q.toFormatString({ value: i.amount, precision: 4 })} ${((j = i.measurement) == null ? void 0 : j.abbrev) ?? o.sku.unit.abbrev}`,
1101
1100
  backdateFrom: o.backdateFrom,
1102
1101
  name: i.type,
1103
1102
  remark: i.remark || A || "",
@@ -1206,7 +1205,7 @@ function Cn(p, h) {
1206
1205
  );
1207
1206
  if (!h)
1208
1207
  return Object.entries(r).reduce(
1209
- (c, [d]) => (c[d] = G.fromNumber(0), c),
1208
+ (c, [d]) => (c[d] = q.fromNumber(0), c),
1210
1209
  {}
1211
1210
  );
1212
1211
  const x = p.flatMap((c) => {
@@ -1214,8 +1213,8 @@ function Cn(p, h) {
1214
1213
  return ((d = c.skus) == null ? void 0 : d.filter((F) => F.sku._id === h._id)) ?? [];
1215
1214
  }).flatMap((c) => c.amounts);
1216
1215
  for (const c of x) {
1217
- const d = c.measurement ? G.multiply([c.measurement.conversion, c.amount]) : c.amount;
1218
- r[y = c.type] ?? (r[y] = { amount: 0, precision: 0 }), r[c.type] = G.add([d, r[c.type]]);
1216
+ const d = c.measurement ? q.multiply([c.measurement.conversion, c.amount]) : c.amount;
1217
+ r[y = c.type] ?? (r[y] = { amount: 0, precision: 0 }), r[c.type] = q.add([d, r[c.type]]);
1219
1218
  }
1220
1219
  return Object.entries(r).reduce(
1221
1220
  (c, [d, F]) => {
@@ -1224,7 +1223,7 @@ function Cn(p, h) {
1224
1223
  amount: Math.abs(F.amount)
1225
1224
  };
1226
1225
  return c[d] = /// comment, because without it formatter makes code uglier
1227
- `${G.toFormatString({
1226
+ `${q.toFormatString({
1228
1227
  value: b,
1229
1228
  precision: 4
1230
1229
  })} ${h.unit.abbrev}`, c;
@@ -1248,11 +1247,11 @@ function Mn(p, h) {
1248
1247
  for (const d of c) {
1249
1248
  if (d.type !== ee.Enum.SALES)
1250
1249
  continue;
1251
- const F = d.measurement ? G.multiply([d.measurement.conversion, d.amount]) : d.amount;
1252
- r ?? (r = G.fromNumber(0)), r = G.add([r, F]);
1250
+ const F = d.measurement ? q.multiply([d.measurement.conversion, d.amount]) : d.amount;
1251
+ r ?? (r = q.fromNumber(0)), r = q.add([r, F]);
1253
1252
  }
1254
1253
  }
1255
- return r != null ? (r.amount = Math.abs(r.amount), `${G.toFormatString({
1254
+ return r != null ? (r.amount = Math.abs(r.amount), `${q.toFormatString({
1256
1255
  value: r,
1257
1256
  precision: 4
1258
1257
  })} ${h.unit.abbrev}`) : null;
@@ -1260,13 +1259,13 @@ function Mn(p, h) {
1260
1259
  const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = { class: "flex-1 line-clamp-2" }, jn = { class: "flex flex-col gap-32 w-full h-full" }, Un = { class: "flex items-center relative gap-4" }, In = { class: "flex-1" }, Pn = {
1261
1260
  key: 0,
1262
1261
  class: "flex-1 flex flex-col items-center gap-16"
1263
- }, Tn = { class: "fm-typo-en-body-lg-400 translate-x-4" }, Hn = {
1262
+ }, Tn = { class: "fm-typo-en-body-lg-400 translate-x-4" }, Rn = {
1264
1263
  key: 1,
1265
1264
  class: "flex flex-col gap-12"
1266
- }, Rn = { class: "pb-16" }, En = { class: "fm-typo-cn-body-lg-600" }, On = {
1265
+ }, Hn = { class: "pb-16" }, En = { class: "fm-typo-cn-body-lg-600" }, On = {
1267
1266
  class: "grid gap-12 fm-typo-en-body-md-400",
1268
1267
  style: { "grid-template-columns": "auto auto auto", "grid-auto-rows": "1fr" }
1269
- }, Ln = { class: "flex flex-col gap-1" }, zn = { class: "text-fm-color-typo-secondary" }, Nn = { class: "font-bold" }, Yn = { class: "flex flex-col gap-1" }, Kn = { class: "text-fm-color-typo-secondary flex" }, Wn = { class: "font-bold" }, qn = { class: "flex flex-col gap-1" }, Gn = { class: "text-fm-color-typo-secondary" }, 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 = {
1268
+ }, Ln = { class: "flex flex-col gap-1" }, zn = { class: "text-fm-color-typo-secondary" }, Nn = { class: "font-bold" }, Yn = { class: "flex flex-col gap-1" }, Kn = { class: "text-fm-color-typo-secondary flex" }, Gn = { class: "font-bold" }, Wn = { class: "flex flex-col gap-1" }, qn = { class: "text-fm-color-typo-secondary" }, 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 = {
1270
1269
  key: 0,
1271
1270
  class: "flex flex-col gap-8"
1272
1271
  }, _o = { class: "flex" }, ho = { class: "flex-1 flex flex-col gap-1" }, ko = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, go = { class: "font-bold" }, bo = { class: "flex-1 flex flex-col gap-1" }, xo = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, So = { class: "flex flex-col gap-1" }, wo = { class: "font-bold" }, Fo = {
@@ -1280,7 +1279,7 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1280
1279
  },
1281
1280
  emits: ["update:show"],
1282
1281
  setup(p) {
1283
- const h = Bt(), r = Pe(), s = Te(), x = _n(), y = ce(), c = Ht(), { t: d } = le(), F = p, b = R(!1), a = fe(), o = R(kt(0));
1282
+ const h = jt(), r = Pe(), s = Te(), x = _n(), y = ce(), c = bt(), { t: d } = le(), F = p, b = H(!1), a = fe(), o = H(kt(0));
1284
1283
  async function S() {
1285
1284
  b.value = !0;
1286
1285
  try {
@@ -1295,14 +1294,14 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1295
1294
  b.value = !1;
1296
1295
  }
1297
1296
  }
1298
- Ge(() => {
1297
+ qe(() => {
1299
1298
  S();
1300
1299
  }), ke([() => o.value, () => F.sku], () => {
1301
1300
  S();
1302
1301
  });
1303
- const A = R([]), _ = R([]), i = R(new Array());
1302
+ const A = H([]), _ = H([]), i = H(new Array());
1304
1303
  function j(t, e) {
1305
- return e === "day" ? Ft(t) : Xe(t);
1304
+ return e === "day" ? $t(t) : Xe(t);
1306
1305
  }
1307
1306
  function E(t, e) {
1308
1307
  const m = t.reduce(
@@ -1323,8 +1322,8 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1323
1322
  async function C() {
1324
1323
  let t = await s.readStockAdjustment(
1325
1324
  F.sku._id,
1326
- bt(new Date(o.value.startDate)).toISOString(),
1327
- xt(new Date(o.value.endDate)).toISOString()
1325
+ xt(new Date(o.value.startDate)).toISOString(),
1326
+ St(new Date(o.value.endDate)).toISOString()
1328
1327
  );
1329
1328
  A.value = t;
1330
1329
  const e = t.filter(({ ref: m }) => m == null ? void 0 : m.startsWith("bill_")).map(({ ref: m }) => m);
@@ -1357,7 +1356,7 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1357
1356
  amount: 0,
1358
1357
  precision: 0
1359
1358
  }, e = F.sku;
1360
- return e ? `${G.toFormatString({
1359
+ return e ? `${q.toFormatString({
1361
1360
  value: t,
1362
1361
  precision: 4
1363
1362
  })} ${e.unit.abbrev}` : "";
@@ -1370,7 +1369,7 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1370
1369
  amount: 0,
1371
1370
  precision: 0
1372
1371
  }, e = F.sku;
1373
- return e ? `${G.toFormatString({ value: t, precision: 4 })} ${e.unit.abbrev}` : "";
1372
+ return e ? `${q.toFormatString({ value: t, precision: 4 })} ${e.unit.abbrev}` : "";
1374
1373
  });
1375
1374
  function Y(t) {
1376
1375
  switch (t) {
@@ -1410,8 +1409,8 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1410
1409
  );
1411
1410
  return De(e, !1, e.precision);
1412
1411
  });
1413
- function H() {
1414
- const { startDate: t, endDate: e } = St(o.value);
1412
+ function R() {
1413
+ const { startDate: t, endDate: e } = wt(o.value);
1415
1414
  t !== null && e !== null && (o.value = {
1416
1415
  startDate: t,
1417
1416
  endDate: e
@@ -1425,7 +1424,7 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1425
1424
  return f == null ? void 0 : f.toCostBalances;
1426
1425
  });
1427
1426
  return t ? {
1428
- ...t.reduce((l, f) => G.add([l, G.fromDinero(f.cost)]), {
1427
+ ...t.reduce((l, f) => q.add([l, q.fromDinero(f.cost)]), {
1429
1428
  amount: 0,
1430
1429
  precision: 0
1431
1430
  }),
@@ -1433,15 +1432,15 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1433
1432
  } : "No data";
1434
1433
  });
1435
1434
  function ue() {
1436
- const { startDate: t, endDate: e } = wt(o.value);
1435
+ const { startDate: t, endDate: e } = Ft(o.value);
1437
1436
  t !== null && e !== null && (o.value = {
1438
1437
  startDate: t,
1439
1438
  endDate: e
1440
1439
  });
1441
1440
  }
1442
- const oe = He(F, "show");
1441
+ const oe = Re(F, "show");
1443
1442
  return (t, e) => {
1444
- const m = B("FmButton"), l = B("FmField"), f = B("FmDateRangePicker"), v = B("FmSpacer"), V = B("FmCircularProgress"), N = B("FmIcon"), X = B("FmTooltip"), de = B("FmMenuDivider"), U = B("FmCardSection"), W = B("FmCard"), J = B("FmSideSheet");
1443
+ const m = B("FmButton"), l = B("FmField"), f = B("FmDateRangePicker"), v = B("FmSpacer"), V = B("FmCircularProgress"), N = B("FmIcon"), X = B("FmTooltip"), de = B("FmMenuDivider"), U = B("FmCardSection"), G = B("FmCard"), J = B("FmSideSheet");
1445
1444
  return $(), z(J, {
1446
1445
  "dismiss-away": "",
1447
1446
  modelValue: u(oe),
@@ -1467,16 +1466,16 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1467
1466
  n("div", In, [
1468
1467
  g(f, {
1469
1468
  modelValue: o.value,
1470
- "onUpdate:modelValue": e[1] || (e[1] = (q) => o.value = q),
1469
+ "onUpdate:modelValue": e[1] || (e[1] = (W) => o.value = W),
1471
1470
  "show-predefined-range": "",
1472
1471
  "start-label": "",
1473
1472
  "end-label": "",
1474
1473
  "z-index": 50
1475
1474
  }, {
1476
- "trigger-button": D(({ opened: q }) => [
1475
+ "trigger-button": D(({ opened: W }) => [
1477
1476
  g(l, {
1478
1477
  "prepend-icon": "calendar_month",
1479
- focused: q
1478
+ focused: W
1480
1479
  }, {
1481
1480
  default: D(() => [
1482
1481
  pe(k(o.value.startDate) + " - " + k(o.value.endDate), 1)
@@ -1489,12 +1488,12 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1489
1488
  ]),
1490
1489
  g(m, {
1491
1490
  variant: "tertiary",
1492
- onClick: e[2] || (e[2] = (q) => H()),
1491
+ onClick: e[2] || (e[2] = (W) => R()),
1493
1492
  "prepend-icon": "navigate_before"
1494
1493
  }),
1495
1494
  g(m, {
1496
1495
  variant: "tertiary",
1497
- onClick: e[3] || (e[3] = (q) => ue()),
1496
+ onClick: e[3] || (e[3] = (W) => ue()),
1498
1497
  "prepend-icon": "navigate_next"
1499
1498
  })
1500
1499
  ]),
@@ -1504,12 +1503,12 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1504
1503
  n("div", Tn, k(u(d)("inventory.stock.history.loading")), 1),
1505
1504
  g(v),
1506
1505
  g(v)
1507
- ])) : _.value && ((Z = _.value) == null ? void 0 : Z.length) > 0 ? ($(), O("div", Hn, [
1508
- g(W, { variant: "outlined" }, {
1506
+ ])) : _.value && ((Z = _.value) == null ? void 0 : Z.length) > 0 ? ($(), O("div", Rn, [
1507
+ g(G, { variant: "outlined" }, {
1509
1508
  default: D(() => [
1510
1509
  g(U, { class: "flex flex-col gap-4" }, {
1511
1510
  default: D(() => [
1512
- n("div", Rn, [
1511
+ n("div", Hn, [
1513
1512
  n("div", En, k(u(d)("inventory.stock.history.summary.title")), 1)
1514
1513
  ]),
1515
1514
  n("div", On, [
@@ -1536,10 +1535,10 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1536
1535
  _: 1
1537
1536
  }, 8, ["content"])) : te("", !0)
1538
1537
  ]),
1539
- n("div", Wn, k(M.value.SALES), 1)
1538
+ n("div", Gn, k(M.value.SALES), 1)
1540
1539
  ]),
1541
- n("div", qn, [
1542
- n("div", Gn, k(u(d)("inventory.stock.history.summary.totalLose")), 1),
1540
+ n("div", Wn, [
1541
+ n("div", qn, k(u(d)("inventory.stock.history.summary.totalLose")), 1),
1543
1542
  n("div", Jn, k(M.value.LOSE), 1)
1544
1543
  ]),
1545
1544
  n("div", Qn, [
@@ -1631,12 +1630,12 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1631
1630
  _: 1
1632
1631
  }),
1633
1632
  e[5] || (e[5] = n("div", null, null, -1)),
1634
- ($(!0), O(ne, null, ae(_.value, (q) => ($(), O(ne, {
1635
- key: q.date
1633
+ ($(!0), O(ne, null, ae(_.value, (W) => ($(), O(ne, {
1634
+ key: W.date
1636
1635
  }, [
1637
1636
  t.sku ? ($(), z(Vn, {
1638
1637
  key: 0,
1639
- record: q,
1638
+ record: W,
1640
1639
  sku: t.sku,
1641
1640
  bills: i.value
1642
1641
  }, null, 8, ["record", "sku", "bills"])) : te("", !0)
@@ -1645,7 +1644,7 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1645
1644
  g(v),
1646
1645
  n("div", null, [
1647
1646
  n("img", {
1648
- src: u(Tt),
1647
+ src: u(Rt),
1649
1648
  alt: "List is empty"
1650
1649
  }, null, 8, $o)
1651
1650
  ]),
@@ -1661,12 +1660,12 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1661
1660
  }, 8, ["modelValue"]);
1662
1661
  };
1663
1662
  }
1664
- }), Mo = { class: "flex flex-col gap-8" }, Do = { class: "flex flex-col" }, Bo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, jo = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Jo = /* @__PURE__ */ re({
1663
+ }), Mo = { class: "flex flex-col gap-8" }, Do = { class: "flex flex-col" }, Bo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, jo = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, qo = /* @__PURE__ */ re({
1665
1664
  __name: "StockView",
1666
1665
  setup(p) {
1667
1666
  const { t: h } = le(), r = Ie(), s = ce(), x = Pe(), y = st(), c = Ze(), { columnDefs: d } = Yt();
1668
1667
  s.watchLocation(a);
1669
- const F = R(!1), b = fe();
1668
+ const F = H(!1), b = fe();
1670
1669
  async function a() {
1671
1670
  if (s._currentLocation) {
1672
1671
  F.value = !0;
@@ -1685,7 +1684,7 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1685
1684
  }
1686
1685
  const o = I(
1687
1686
  () => r.skus.map((w) => {
1688
- var Y, L, H;
1687
+ var Y, L, R;
1689
1688
  const M = w.trackingMeasurement;
1690
1689
  let P = (L = (Y = x.stockBalance.skus) == null ? void 0 : Y.find(
1691
1690
  (K) => K.id === w._id
@@ -1699,10 +1698,10 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1699
1698
  precision: 0
1700
1699
  },
1701
1700
  day: (T == null ? void 0 : T.depletionDays) ?? void 0,
1702
- trackingUnitAbbrev: M ? ((H = w.unit.measurements.find((K) => K.id === M)) == null ? void 0 : H.abbrev) ?? "" : w.unit.abbrev
1701
+ trackingUnitAbbrev: M ? ((R = w.unit.measurements.find((K) => K.id === M)) == null ? void 0 : R.abbrev) ?? "" : w.unit.abbrev
1703
1702
  };
1704
1703
  })
1705
- ), S = R(""), { breakpoints: A } = jt(), _ = I(() => A.value.xs || A.value.sm), i = I(() => _.value ? 10 : 20), j = $t(), E = I(() => [
1704
+ ), S = H(""), { breakpoints: A } = Ut(), _ = I(() => A.value.xs || A.value.sm), i = I(() => _.value ? 10 : 20), j = At(), E = I(() => [
1706
1705
  {
1707
1706
  label: "Refresh",
1708
1707
  value: "refresh"
@@ -1722,7 +1721,7 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1722
1721
  }
1723
1722
  return (w, M) => {
1724
1723
  const P = B("FmTable");
1725
- return $(), z(At, {
1724
+ return $(), z(Vt, {
1726
1725
  title: u(h)("inventory.stock.title"),
1727
1726
  actions: E.value,
1728
1727
  "onClick:action": C
@@ -1739,11 +1738,11 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1739
1738
  }
1740
1739
  ])
1741
1740
  }, [
1742
- g(Vt, {
1741
+ g(Ct, {
1743
1742
  searchable: "",
1744
1743
  "change-location": "",
1745
1744
  search: S.value,
1746
- "onUpdate:search": M[0] || (M[0] = (H) => S.value = H)
1745
+ "onUpdate:search": M[0] || (M[0] = (R) => S.value = R)
1747
1746
  }, null, 8, ["search"]),
1748
1747
  ($(), z(P, {
1749
1748
  style: Je(u(j).tableHeight),
@@ -1752,12 +1751,12 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1752
1751
  "search-value": S.value,
1753
1752
  loading: F.value || !u(s)._currentLocation,
1754
1753
  key: (T = u(s)._currentLocation) == null ? void 0 : T.dbName,
1755
- onRowClick: M[1] || (M[1] = (H) => u(y).showSkuHistory(H.original)),
1754
+ onRowClick: M[1] || (M[1] = (R) => u(y).showSkuHistory(R.original)),
1756
1755
  "page-size": i.value
1757
1756
  }, {
1758
- "list-row": D((H) => [
1759
- g(Ct, {
1760
- row: H,
1757
+ "list-row": D((R) => [
1758
+ g(Mt, {
1759
+ row: R,
1761
1760
  onRowClick: u(y).showSkuHistory
1762
1761
  }, {
1763
1762
  default: D((K) => {
@@ -1780,16 +1779,16 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1780
1779
  ]),
1781
1780
  n("div", null, [
1782
1781
  g(Be, {
1783
- days: H.original.day
1782
+ days: R.original.day
1784
1783
  }, null, 8, ["days"])
1785
1784
  ]),
1786
1785
  n("div", null, [
1787
1786
  g(ot, {
1788
1787
  class: "xs:w-[160px]",
1789
- unit: H.original.unit,
1790
- sku: H.original,
1791
- amount: H.original.balance,
1792
- "default-tracking-measurement": H.original.trackingMeasurement ?? void 0
1788
+ unit: R.original.unit,
1789
+ sku: R.original,
1790
+ amount: R.original.balance,
1791
+ "default-tracking-measurement": R.original.trackingMeasurement ?? void 0
1793
1792
  }, null, 8, ["unit", "sku", "amount", "default-tracking-measurement"])
1794
1793
  ])
1795
1794
  ])
@@ -1814,5 +1813,5 @@ const Dn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Bn = {
1814
1813
  }
1815
1814
  });
1816
1815
  export {
1817
- Jo as default
1816
+ qo as default
1818
1817
  };