@feedmepos/mf-inventory-portal 1.3.14-dev.1 → 1.3.14-dev.2

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 (90) hide show
  1. package/dist/App-D1_jkD6L.js +309 -0
  2. package/dist/{ApprovalView-BxioAXpO.js → ApprovalView-CfF2FqsE.js} +12 -12
  3. package/dist/{BindingsDialog-Dn_hP7Ji.js → BindingsDialog-H-juP-az.js} +2 -2
  4. package/dist/{BindingsPicker-BEXOUaoI.js → BindingsPicker-ClruHF7p.js} +2 -2
  5. package/dist/{BindingsTable-CsRLA5J_.js → BindingsTable-Bx9pbFOO.js} +3 -3
  6. package/dist/{ClosingDraftView-DoH9ZcGA.js → ClosingDraftView-DN97Tao5.js} +137 -137
  7. package/dist/{ClosingHistoryView-BWf_gIrc.js → ClosingHistoryView-DsRYUqa2.js} +32 -32
  8. package/dist/{ClosingTemplateView-BKRxzvQX.js → ClosingTemplateView-f9zfsxCu.js} +14 -14
  9. package/dist/DefaultView-COVVxOrF.js +31 -0
  10. package/dist/{DeliveryOrderPrintPreview-HzspgQXj.js → DeliveryOrderPrintPreview-BMK4kBCQ.js} +11 -11
  11. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DstxeP1q.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bqj_Ygmo.js} +23 -23
  12. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-E9FFFhwx.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CK1ha_AY.js} +2 -2
  13. package/dist/{FmMultiselectDialog-3uKA-o0f.js → FmMultiselectDialog-BazT9oUX.js} +1 -1
  14. package/dist/{FmMultiselectDialog-uFZKKIiO.js → FmMultiselectDialog-_gUuhudi.js} +16 -16
  15. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-C1KGaqi7.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BBtAgdsA.js} +18 -18
  16. package/dist/{ImportView-zrNDzp3k.js → ImportView-jpkwuCXO.js} +6 -6
  17. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-B2vMgXVZ.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DLJnF4do.js} +1 -1
  18. package/dist/{IngredientGroupView-HcAKvPur.js → IngredientGroupView-x3t1hyNn.js} +5 -5
  19. package/dist/{IngredientsView-CRB5UN-e.js → IngredientsView-BzWTnlb4.js} +15 -15
  20. package/dist/{IntegrationExplorerView-k3IHeiOU.js → IntegrationExplorerView-Bca3owbx.js} +5 -5
  21. package/dist/{IntegrationView-B3WeQTDB.js → IntegrationView-Dh1c4Qyo.js} +81 -81
  22. package/dist/{InventoryBindingForm-B-7SQKl2.js → InventoryBindingForm-B1sI1TGZ.js} +1 -1
  23. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DhPu_GyE.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-7NeE7Xos.js} +15 -15
  24. package/dist/{InventoryBindingSummary-Swi6A3W2.js → InventoryBindingSummary-R8zHPc52.js} +1 -1
  25. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Duv0At06.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DMJVh7Nt.js} +1 -1
  26. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang--gt60IlU.js → PremiumBadge.vue_vue_type_script_setup_true_lang-ChC9sEIk.js} +5 -5
  27. package/dist/{PublishView-B9HJT61I.js → PublishView-Bqp8Ww4J.js} +13 -13
  28. package/dist/{PurchaseOrderPrintPreview-sClUXkgt.js → PurchaseOrderPrintPreview-D7TCn8U-.js} +11 -11
  29. package/dist/{ReceiveRequestView-BbS55juS.js → ReceiveRequestView-oNBVAMYu.js} +23 -23
  30. package/dist/{RecipeView-BH3asOD4.js → RecipeView-D8Mvgji9.js} +50 -50
  31. package/dist/{SettingsView-BJAMNNhr.js → SettingsView-BJScLK9z.js} +30 -30
  32. package/dist/{StockView-DMLFY7d1.js → StockView-CRRdVCcD.js} +143 -143
  33. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DeiLMVin.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DUKv_LV6.js} +1 -1
  34. package/dist/{SupplierView-C3uBrEcc.js → SupplierView-DdBBIV8W.js} +12 -12
  35. package/dist/{SurchargeView-S9ByD9Nd.js → SurchargeView-DisBUPIs.js} +16 -16
  36. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-ha60Wy7z.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CZ3Q3BAf.js} +2 -2
  37. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CfyCEElN.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CC7F5HVc.js} +1 -1
  38. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CKfs-ns0.js → TransferDetails.vue_vue_type_script_setup_true_lang-BLlg1Vka.js} +212 -212
  39. package/dist/{TransferTemplateView-zbn5CGiZ.js → TransferTemplateView-7ICJMF9z.js} +17 -17
  40. package/dist/{UnitCostHistoryView-LhvAybS8.js → UnitCostHistoryView-BMRDBQ58.js} +4 -4
  41. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-E2QCl521.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-mNXHzLN3.js} +4 -4
  42. package/dist/{UnitView-6oUdlUVo.js → UnitView-uUUYOjYn.js} +24 -24
  43. package/dist/{WarehouseView-DQFe99KT.js → WarehouseView-BfMf_iuj.js} +25 -25
  44. package/dist/{WastageTemplateView-BiYZqiT2.js → WastageTemplateView-BQYjJGZ-.js} +14 -14
  45. package/dist/{app-SnX9gL_k.js → app-B_zMegJc.js} +4571 -4564
  46. package/dist/app.d.ts +16 -0
  47. package/dist/app.js +1 -1
  48. package/dist/{closing-template-Ch--jBk-.js → closing-template-9vhx5Ji1.js} +1 -1
  49. package/dist/composable/useInventoryAccess.d.ts +11 -0
  50. package/dist/composable/useNavigationMenu.d.ts +14 -0
  51. package/dist/{date2-CGqqJOqr.js → date2-BMCS_Dsc.js} +1 -1
  52. package/dist/{dayjs.min-JnfBpNSN.js → dayjs.min-Dl26OaXo.js} +16 -16
  53. package/dist/{decimal-C-2MQYNP.js → decimal-e6OK2jkR.js} +2 -2
  54. package/dist/{defineDeepModel-CUJCBuvw.js → defineDeepModel-BvLlwxnd.js} +1 -1
  55. package/dist/{duplicate-template-BXg5EQRC.js → duplicate-template-Cnhu8Rxw.js} +1 -1
  56. package/dist/{empty-placeholder-wf6-BWE8.js → empty-placeholder-B0QU467o.js} +1 -1
  57. package/dist/{export-DUsFBcmf.js → export-CGvyGmeo.js} +1 -1
  58. package/dist/{feature-gkhmly57.js → feature-Do41WWzx.js} +23 -23
  59. package/dist/{format-time-from-id-D1RhcKfL.js → format-time-from-id-CqX_KaUG.js} +1 -1
  60. package/dist/{format-unit-display-DXs_-yEW.js → format-unit-display-D8qWmRXP.js} +11 -11
  61. package/dist/{import-export.helper-B84wW0eo.js → import-export.helper-85V8Ib5e.js} +6 -6
  62. package/dist/{index-Dp1GAjHf.js → index-C-CwnjUn.js} +3 -3
  63. package/dist/{index-artVJVqL.js → index-Cg3aLEhT.js} +1 -1
  64. package/dist/{index-D3XgyMwL.js → index-CtUF9Nsv.js} +1 -1
  65. package/dist/{inventory-core-dart.default-Bu1oVkLC.js → inventory-core-dart.default-B64FzAla.js} +1 -1
  66. package/dist/{lodash-DZbYS5Vn.js → lodash-U9ycVPlv.js} +1 -1
  67. package/dist/{lz-string-nX96TtT6.js → lz-string-0CgVsQoC.js} +13 -13
  68. package/dist/{netsuite-DQkJKCH9.js → netsuite-Du7-sXJt.js} +77 -77
  69. package/dist/{number-gRrApZRj.js → number-iJAzDfmj.js} +7 -7
  70. package/dist/{predefined-templates-D9bzSOz_.js → predefined-templates-LlSrXOXm.js} +1 -1
  71. package/dist/{purchase-order-template-BiE_We2X.js → purchase-order-template-DFuXb0rr.js} +1 -1
  72. package/dist/{recalculationUtils-zNt-EW5S.js → recalculationUtils-DWPnMW1G.js} +1 -1
  73. package/dist/router/name.d.ts +1 -0
  74. package/dist/{rules-CWFFr_mA.js → rules-DefSKiUN.js} +2 -2
  75. package/dist/{stock-C-34Vuxz.js → stock-BfF6peMd.js} +3 -3
  76. package/dist/{stock-V4Oy4QHQ.js → stock-Cx1BwdWs.js} +1 -1
  77. package/dist/{supplier-DbYagMhS.js → supplier-CU3iqdGr.js} +16 -16
  78. package/dist/{surcharge-CcvvfLHB.js → surcharge-D77J5opH.js} +12 -12
  79. package/dist/tsconfig.app.tsbuildinfo +1 -1
  80. package/dist/{use-ingredient-select-dialog-B4jFgJ5b.js → use-ingredient-select-dialog-B-jxV-79.js} +2 -2
  81. package/dist/{use-inventory-binding-dialog-20flYyGE.js → use-inventory-binding-dialog-BdTd5qPl.js} +2 -2
  82. package/dist/{use-template-enabled-locations-CpDMbAGF.js → use-template-enabled-locations-vFvaCjlH.js} +2 -2
  83. package/dist/{useHrmPermission-CZW6u2TS.js → useHrmPermission-CekUhyck.js} +4 -4
  84. package/dist/useNavigationMenu-BiLWMIip.js +162 -0
  85. package/dist/views/DefaultView.vue.d.ts +2 -0
  86. package/dist/{vue-i18n-CUrz9OVK.js → vue-i18n-C3_OsgSl.js} +372 -372
  87. package/dist/{xlsx-DBsOBE1z.js → xlsx-o7n1whCa.js} +398 -398
  88. package/dist/{xlsx.util-xziohm10.js → xlsx.util-D6nPboPW.js} +1 -1
  89. package/package.json +4 -4
  90. package/dist/App-Cb6qfRCz.js +0 -445
@@ -1,32 +1,32 @@
1
- import { defineComponent as me, openBlock as V, createBlock as Q, withCtx as R, createElementVNode as e, toDisplayString as i, unref as s, ref as z, h as ge, computed as Y, watch as Fe, resolveComponent as P, isRef as Ue, createVNode as v, createElementBlock as G, Fragment as ie, renderList as de, createCommentVNode as te, normalizeClass as Ie, reactive as dt, mergeModels as Ze, useModel as xt, onMounted as qe, createTextVNode as pe, normalizeStyle as mt, watchEffect as St, renderSlot as et, Teleport as wt, normalizeProps as Le, mergeProps as ze } from "vue";
1
+ import { defineComponent as me, openBlock as V, createBlock as Q, withCtx as R, createElementVNode as e, toDisplayString as i, unref as s, ref as z, h as ge, computed as Y, watch as Fe, resolveComponent as U, isRef as Pe, createVNode as v, createElementBlock as G, Fragment as ie, renderList as de, createCommentVNode as te, normalizeClass as Ie, reactive as dt, mergeModels as Ze, useModel as xt, onMounted as qe, createTextVNode as pe, normalizeStyle as mt, watchEffect as St, renderSlot as et, Teleport as wt, normalizeProps as Le, mergeProps as ze } from "vue";
2
2
  import { u as At, _ as Ft } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-sUxHOj47.js";
3
- import { u as Ve, c as Ee, a as Re, F as tt, y as $t, I as ne, x as Vt, p as jt, G as Ct, A as J, i as je, j as ot, f as nt, O as xe, P as Ce } from "./app-SnX9gL_k.js";
4
- import { u as Oe } from "./stock-C-34Vuxz.js";
3
+ import { u as Ve, c as Ee, a as Re, F as tt, t as $t, D as ne, s as Vt, m as jt, B as Ct, w as J, f as je, h as ot, d as nt, J as xe, K as Ce } from "./app-B_zMegJc.js";
4
+ import { u as Ne } from "./stock-BfF6peMd.js";
5
5
  import { c as Dt } from "./component-kqxARxvM.js";
6
- import { _ as ft, o as Bt } from "./UnitDisplayControl.vue_vue_type_script_setup_true_lang-E2QCl521.js";
7
- import { _ as Ke, S as Ge, g as pt, a as Mt } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DeiLMVin.js";
6
+ import { _ as ft, o as Bt } from "./UnitDisplayControl.vue_vue_type_script_setup_true_lang-mNXHzLN3.js";
7
+ import { _ as Ke, S as Ge, g as pt, a as Mt } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DUKv_LV6.js";
8
8
  import { _ as It } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
9
9
  import { useI18n as fe, useCoreStore as Xe } from "@feedmepos/mf-common";
10
- import { u as vt, i as Te, _ as st } from "./PremiumBadge.vue_vue_type_script_setup_true_lang--gt60IlU.js";
11
- import { useSnackbar as we, useDialog as Ne, useProxiedModel as Ye, useBreakpoints as Tt } from "@feedmepos/ui-library";
10
+ import { u as vt, i as Te, _ as st } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-ChC9sEIk.js";
11
+ import { useSnackbar as we, useDialog as Oe, useProxiedModel as Ye, useBreakpoints as Tt } from "@feedmepos/ui-library";
12
12
  import { defineStore as Ht } from "pinia";
13
13
  import { F as Je } from "./FmAdminBadge-DjnBAgyv.js";
14
- import { g as $e, a as he, e as Pt, t as He, c as Se, f as Ut, h as at, i as yt, j as Qe, d as Be, k as Et } from "./number-gRrApZRj.js";
15
- import { u as Ae } from "./stock-V4Oy4QHQ.js";
16
- import { c as Pe, A as Rt, M as Ot, R as Nt } from "./rules-CWFFr_mA.js";
17
- import { u as Yt } from "./use-inventory-binding-dialog-20flYyGE.js";
18
- import { a as _t } from "./FmMultiselectDialog-uFZKKIiO.js";
19
- import { d as ke } from "./dayjs.min-JnfBpNSN.js";
20
- import { _ as Lt } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Duv0At06.js";
21
- import { g as zt } from "./decimal-C-2MQYNP.js";
22
- import { a as Gt, c as Wt, f as kt, t as rt, d as lt, p as Kt, n as qt, b as Xt } from "./date2-CGqqJOqr.js";
23
- import { i as Jt, _ as Qt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-E9FFFhwx.js";
24
- import { E as Zt } from "./empty-placeholder-wf6-BWE8.js";
25
- import { F as _e } from "./inventory-core-dart.default-Bu1oVkLC.js";
26
- import { u as eo } from "./feature-gkhmly57.js";
27
- import { u as ht } from "./useHrmPermission-CZW6u2TS.js";
14
+ import { g as $e, a as he, e as Ut, t as He, c as Se, f as Pt, h as at, i as yt, j as Qe, d as Be, k as Et } from "./number-iJAzDfmj.js";
15
+ import { u as Ae } from "./stock-Cx1BwdWs.js";
16
+ import { c as Ue, A as Rt, M as Nt, R as Ot } from "./rules-DefSKiUN.js";
17
+ import { u as Yt } from "./use-inventory-binding-dialog-BdTd5qPl.js";
18
+ import { a as _t } from "./FmMultiselectDialog-_gUuhudi.js";
19
+ import { d as ke } from "./dayjs.min-Dl26OaXo.js";
20
+ import { _ as Lt } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DMJVh7Nt.js";
21
+ import { g as zt } from "./decimal-e6OK2jkR.js";
22
+ import { a as Gt, c as Wt, f as kt, t as rt, d as lt, p as Kt, n as qt, b as Xt } from "./date2-BMCS_Dsc.js";
23
+ import { i as Jt, _ as Qt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CK1ha_AY.js";
24
+ import { _ as Zt } from "./empty-placeholder-B0QU467o.js";
25
+ import { F as _e } from "./inventory-core-dart.default-B64FzAla.js";
26
+ import { u as eo } from "./feature-Do41WWzx.js";
27
+ import { u as ht } from "./useHrmPermission-CekUhyck.js";
28
28
  import { _ as to, F as it } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js";
29
- import { u as oo } from "./netsuite-DQkJKCH9.js";
29
+ import { u as oo } from "./netsuite-Du7-sXJt.js";
30
30
  import { P as no, J as so } from "./app-DiX-EfV6.js";
31
31
  var Me = /* @__PURE__ */ ((A) => (A.History = "History", A.Convert = "Convert", A.Adjust = "Adjust", A))(Me || {});
32
32
  const ao = [
@@ -67,7 +67,7 @@ const ao = [
67
67
  }));
68
68
  }
69
69
  }), bt = Ht("stockActions", () => {
70
- const A = z(!1), u = Ve(), _ = Oe(), p = vt(), C = we(), j = Ne(), { t: c } = fe();
70
+ const A = z(!1), u = Ve(), _ = Ne(), p = vt(), C = we(), j = Oe(), { t: c } = fe();
71
71
  async function r() {
72
72
  if (u._currentLocation) {
73
73
  A.value = !0;
@@ -321,11 +321,11 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
321
321
  return $ || !0;
322
322
  }
323
323
  function o(F) {
324
- var O;
325
- const $ = (O = p.sku.convert) != null && O.measurement ? p.sku.unit.measurements.find((y) => {
324
+ var N;
325
+ const $ = (N = p.sku.convert) != null && N.measurement ? p.sku.unit.measurements.find((y) => {
326
326
  var m;
327
327
  return y.id === ((m = p.sku.convert) == null ? void 0 : m.measurement);
328
- }) ?? null : null, E = $e(p.sku.unit, $), D = Ut(+F);
328
+ }) ?? null : null, E = $e(p.sku.unit, $), D = Pt(+F);
329
329
  return ut(D).isInteger().max(E).error ? "Precision cannot be more than " + E : !0;
330
330
  }
331
331
  const x = Y(
@@ -343,22 +343,22 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
343
343
  skus: c.skus,
344
344
  skuGroups: c.skuGroups,
345
345
  recipes: c.recipes
346
- }).inventoryBindings.filter((O) => "success" in O && O.success).map((O) => O).map((O) => O.binding);
347
- return (K = l.value ?? $) == null ? void 0 : K.map((O) => {
346
+ }).inventoryBindings.filter((N) => "success" in N && N.success).map((N) => N).map((N) => N.binding);
347
+ return (K = l.value ?? $) == null ? void 0 : K.map((N) => {
348
348
  var Z, ae, q, ee, re;
349
- const y = c.skus.find((le) => le._id === O.id), m = ((Z = O.measurement) == null ? void 0 : Z.abbrev) ?? ((ae = y == null ? void 0 : y.unit) == null ? void 0 : ae.abbrev), B = (q = p.sku.convert) != null && q.measurement ? p.sku.unit.measurements.find((le) => {
349
+ const y = c.skus.find((le) => le._id === N.id), m = ((Z = N.measurement) == null ? void 0 : Z.abbrev) ?? ((ae = y == null ? void 0 : y.unit) == null ? void 0 : ae.abbrev), B = (q = p.sku.convert) != null && q.measurement ? p.sku.unit.measurements.find((le) => {
350
350
  var ve;
351
351
  return le.id === ((ve = p.sku.convert) == null ? void 0 : ve.measurement);
352
352
  }) ?? null : null, w = $e(p.sku.unit, B), a = o(`${M.value}`) === !0 ? he(
353
- Pt(
354
- O.amount,
353
+ Ut(
354
+ N.amount,
355
355
  He(+M.value, w)
356
356
  ),
357
357
  !1
358
- ) : "0", f = (re = (ee = l.value) == null ? void 0 : ee.find((le) => le.id === (y == null ? void 0 : y._id))) == null ? void 0 : re.amount, N = f ? he(f, !1) : null;
358
+ ) : "0", f = (re = (ee = l.value) == null ? void 0 : ee.find((le) => le.id === (y == null ? void 0 : y._id))) == null ? void 0 : re.amount, O = f ? he(f, !1) : null;
359
359
  return {
360
360
  sku: y,
361
- convertAmount: N ?? a,
361
+ convertAmount: O ?? a,
362
362
  abbrev: m
363
363
  };
364
364
  });
@@ -410,14 +410,14 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
410
410
  function W(F, $, E) {
411
411
  const D = +$;
412
412
  let K = E;
413
- $.length > 0 && isFinite(D) ? K = E.map((O) => (O.id !== F || (O.amount = Se(D)), O)) : K = E.map((O) => (O.id !== F || (O.amount = { amount: 0, precision: 0 }), O)), l.value = K;
413
+ $.length > 0 && isFinite(D) ? K = E.map((N) => (N.id !== F || (N.amount = Se(D)), N)) : K = E.map((N) => (N.id !== F || (N.amount = { amount: 0, precision: 0 }), N)), l.value = K;
414
414
  }
415
- function U(F) {
415
+ function P(F) {
416
416
  const $ = d.value.find((E) => E._id === F);
417
417
  return $ ? pt($.unit, !0) : [];
418
418
  }
419
419
  function oe(F, $) {
420
- const E = U(F), D = E.find((K) => K.value === $) ?? E.find((K) => K.value === null);
420
+ const E = P(F), D = E.find((K) => K.value === $) ?? E.find((K) => K.value === null);
421
421
  return D ? {
422
422
  ...D,
423
423
  label: D.abbrev
@@ -428,10 +428,10 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
428
428
  if ($ === null)
429
429
  D = E.map((K) => (K.id !== F || (K.measurement = null), K)) ?? [];
430
430
  else {
431
- const K = d.value.find((O) => O._id === F);
432
- D = E.map((O) => {
431
+ const K = d.value.find((N) => N._id === F);
432
+ D = E.map((N) => {
433
433
  var y, m;
434
- return O.id !== F || (O.measurement = (m = (y = K == null ? void 0 : K.unit) == null ? void 0 : y.measurements) == null ? void 0 : m.find((B) => B.id === $)), O;
434
+ return N.id !== F || (N.measurement = (m = (y = K == null ? void 0 : K.unit) == null ? void 0 : y.measurements) == null ? void 0 : m.find((B) => B.id === $)), N;
435
435
  }) ?? [];
436
436
  }
437
437
  l.value = D;
@@ -457,11 +457,11 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
457
457
  F || (l.value = null, M.value = 0);
458
458
  }
459
459
  ), (F, $) => {
460
- const E = P("FmTextField"), D = P("FmForm"), K = P("FmCard"), O = P("FmSwitch"), y = P("FmFormGroup"), m = P("FmSelect"), B = P("FmButton"), w = P("FmSideSheet");
460
+ const E = U("FmTextField"), D = U("FmForm"), K = U("FmCard"), N = U("FmSwitch"), y = U("FmFormGroup"), m = U("FmSelect"), B = U("FmButton"), w = U("FmSideSheet");
461
461
  return V(), Q(w, {
462
462
  "dismiss-away": "",
463
463
  modelValue: s(I),
464
- "onUpdate:modelValue": $[3] || ($[3] = (a) => Ue(I) ? I.value = a : null),
464
+ "onUpdate:modelValue": $[3] || ($[3] = (a) => Pe(I) ? I.value = a : null),
465
465
  "max-width": 500
466
466
  }, {
467
467
  "side-sheet-header": R(() => [
@@ -482,7 +482,7 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
482
482
  "model-value": M.value,
483
483
  "onUpdate:modelValue": $[0] || ($[0] = (a) => M.value = a),
484
484
  label: s(L)("inventory.stock.convert.amount"),
485
- rules: [t, o, s(Pe)(0)],
485
+ rules: [t, o, s(Ue)(0)],
486
486
  "append-text": x.value,
487
487
  "helper-text": l.value ? void 0 : `Max ${F.maxCount} ${x.value}`
488
488
  }, null, 8, ["disabled", "model-value", "label", "rules", "append-text", "helper-text"])
@@ -497,12 +497,12 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
497
497
  e("div", vo, [
498
498
  e("div", yo, i(s(L)("inventory.stock.convert.deductionSummary")), 1),
499
499
  (V(!0), G(ie, null, de(S.value, (a) => {
500
- var f, N;
500
+ var f, O;
501
501
  return V(), G("div", {
502
502
  key: (f = a.sku) == null ? void 0 : f._id,
503
503
  class: "flex items-center"
504
504
  }, [
505
- e("div", _o, i((N = a.sku) == null ? void 0 : N.name), 1),
505
+ e("div", _o, i((O = a.sku) == null ? void 0 : O.name), 1),
506
506
  e("div", ko, " -" + i(a.convertAmount) + " " + i(a.abbrev), 1)
507
507
  ]);
508
508
  }), 128))
@@ -513,7 +513,7 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
513
513
  v(K, { variant: "outlined" }, {
514
514
  default: R(() => [
515
515
  e("div", ho, [
516
- v(O, {
516
+ v(N, {
517
517
  value: "",
518
518
  modelValue: h.value,
519
519
  "onUpdate:modelValue": $[1] || ($[1] = (a) => h.value = a),
@@ -532,18 +532,18 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
532
532
  disabled: b.value,
533
533
  modelValue: +s(he)(a.amount ?? { amount: 1, precision: 0 }),
534
534
  rules: [
535
- s(Ot)(
535
+ s(Nt)(
536
536
  d.value.find((f) => f._id === a.id).unit,
537
537
  a.measurement
538
538
  ),
539
- s(Pe)(0)
539
+ s(Ue)(0)
540
540
  ]
541
541
  }, {
542
542
  default: R(({ invalid: f }) => {
543
- var N, Z, ae;
543
+ var O, Z, ae;
544
544
  return [
545
545
  e("div", xo, [
546
- e("div", So, i((N = d.value.find((q) => q._id === a.id)) == null ? void 0 : N.name), 1),
546
+ e("div", So, i((O = d.value.find((q) => q._id === a.id)) == null ? void 0 : O.name), 1),
547
547
  v(E, {
548
548
  class: "xs:col-span-2",
549
549
  disabled: b.value,
@@ -556,7 +556,7 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
556
556
  v(m, {
557
557
  disabled: b.value,
558
558
  class: "translate-y-[2px]",
559
- items: U(a.id),
559
+ items: P(a.id),
560
560
  "model-value": (ae = oe(a.id, (Z = a.measurement) == null ? void 0 : Z.id)) == null ? void 0 : ae.value,
561
561
  "onUpdate:modelValue": (q) => X(a.id, q, l.value ?? []),
562
562
  invalid: f
@@ -598,8 +598,8 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
598
598
  loading: b.value,
599
599
  label: s(L)("inventory.stock.convert.convertButton"),
600
600
  onClick: $[2] || ($[2] = (a) => {
601
- var f, N;
602
- return (N = (f = g.value) == null ? void 0 : f.validateInputs) == null ? void 0 : N.call(f);
601
+ var f, O;
602
+ return (O = (f = g.value) == null ? void 0 : f.validateInputs) == null ? void 0 : O.call(f);
603
603
  })
604
604
  }, null, 8, ["loading", "label"])
605
605
  ])
@@ -649,7 +649,7 @@ const We = {
649
649
  },
650
650
  emits: ["update:modelValue", "click:delete"],
651
651
  setup(A, { emit: u }) {
652
- const _ = A, p = u, { t: C } = fe(), j = Oe(), c = Y(
652
+ const _ = A, p = u, { t: C } = fe(), j = Ne(), c = Y(
653
653
  () => Object.keys(We).map((t) => ({
654
654
  label: Vt(t),
655
655
  value: t
@@ -718,7 +718,7 @@ const We = {
718
718
  () => zt(h.value, _.modelValue.doc.unit)
719
719
  ), n = Y(() => H.value.amount < 0);
720
720
  return (t, o) => {
721
- const x = P("FmButton"), S = P("FmSelect"), g = P("FmTextarea"), I = P("FmCard");
721
+ const x = U("FmButton"), S = U("FmSelect"), g = U("FmTextarea"), I = U("FmCard");
722
722
  return V(), Q(I, {
723
723
  variant: "outlined",
724
724
  class: "grid grid-cols-2 gap-8 p-16"
@@ -742,7 +742,7 @@ const We = {
742
742
  items: c.value,
743
743
  modelValue: k.value,
744
744
  "onUpdate:modelValue": o[1] || (o[1] = (T) => k.value = T),
745
- rules: [s(Nt)()],
745
+ rules: [s(Ot)()],
746
746
  "label-mark": "required"
747
747
  }, null, 8, ["disabled", "items", "modelValue", "rules"]),
748
748
  v(Lt, {
@@ -754,7 +754,7 @@ const We = {
754
754
  }),
755
755
  modelValue: L.value,
756
756
  "onUpdate:modelValue": o[2] || (o[2] = (T) => L.value = T),
757
- rules: [s(Pe)(0)]
757
+ rules: [s(Ue)(0)]
758
758
  }, null, 8, ["disabled", "step", "modelValue", "rules"]),
759
759
  v(S, {
760
760
  disabled: t.disabled,
@@ -782,7 +782,7 @@ const We = {
782
782
  });
783
783
  };
784
784
  }
785
- }), Bo = { class: "flex items-center" }, Mo = { class: "fm-typo-en-title-md-800" }, Io = { class: "flex items-center" }, To = { class: "fm-typo-en-title-sm-800 flex-1" }, Ho = { class: "flex gap-8" }, Po = /* @__PURE__ */ me({
785
+ }), Bo = { class: "flex items-center" }, Mo = { class: "fm-typo-en-title-md-800" }, Io = { class: "flex items-center" }, To = { class: "fm-typo-en-title-sm-800 flex-1" }, Ho = { class: "flex gap-8" }, Uo = /* @__PURE__ */ me({
786
786
  __name: "AdjustSkuDialog",
787
787
  props: {
788
788
  stock: {},
@@ -790,7 +790,7 @@ const We = {
790
790
  },
791
791
  emits: ["update:show", "submitted"],
792
792
  setup(A, { expose: u, emit: _ }) {
793
- const p = A, C = _, j = Re(), c = Ne(), r = Ae(), k = we(), L = z(!1), { t: M } = fe();
793
+ const p = A, C = _, j = Re(), c = Oe(), r = Ae(), k = we(), L = z(!1), { t: M } = fe();
794
794
  function l() {
795
795
  b(Ee(h));
796
796
  }
@@ -900,10 +900,10 @@ const We = {
900
900
  h.adjustments.splice(o, 1);
901
901
  }
902
902
  return (o, x) => {
903
- const S = P("FmTextarea"), g = P("FmButton"), I = P("FmForm"), T = P("FmSideSheet");
903
+ const S = U("FmTextarea"), g = U("FmButton"), I = U("FmForm"), T = U("FmSideSheet");
904
904
  return V(), Q(T, {
905
905
  modelValue: s(H),
906
- "onUpdate:modelValue": x[2] || (x[2] = (W) => Ue(H) ? H.value = W : null),
906
+ "onUpdate:modelValue": x[2] || (x[2] = (W) => Pe(H) ? H.value = W : null),
907
907
  "dismiss-away": "",
908
908
  "max-width": 500
909
909
  }, {
@@ -934,11 +934,11 @@ const We = {
934
934
  onClick: n
935
935
  })
936
936
  ]),
937
- (V(!0), G(ie, null, de(h.adjustments, (W, U) => (V(), Q(gt, {
937
+ (V(!0), G(ie, null, de(h.adjustments, (W, P) => (V(), Q(gt, {
938
938
  key: W.id,
939
- modelValue: h.adjustments[U],
940
- "onUpdate:modelValue": (oe) => h.adjustments[U] = oe,
941
- "onClick:delete": (oe) => t(U)
939
+ modelValue: h.adjustments[P],
940
+ "onUpdate:modelValue": (oe) => h.adjustments[P] = oe,
941
+ "onClick:delete": (oe) => t(P)
942
942
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onClick:delete"]))), 128))
943
943
  ]),
944
944
  _: 1
@@ -950,8 +950,8 @@ const We = {
950
950
  label: s(M)("inventory.stock.adjust.adjustButton"),
951
951
  loading: L.value,
952
952
  onClick: x[1] || (x[1] = (W) => {
953
- var U, oe;
954
- return (oe = (U = d.value) == null ? void 0 : U.validateInputs) == null ? void 0 : oe.call(U);
953
+ var P, oe;
954
+ return (oe = (P = d.value) == null ? void 0 : P.validateInputs) == null ? void 0 : oe.call(P);
955
955
  })
956
956
  }, null, 8, ["label", "loading"])
957
957
  ])
@@ -960,14 +960,14 @@ const We = {
960
960
  }, 8, ["modelValue"]);
961
961
  };
962
962
  }
963
- }), Uo = { class: "flex items-center w-full gap-8" }, Eo = { class: "fm-typo-en-title-md-800 flex-1" }, Ro = { class: "flex flex-col gap-16" }, Oo = { class: "flex flex-col gap-4" }, No = { class: "fm-typo-en-body-md-600" }, Yo = { class: "flex gap-8 items-start" }, Lo = { class: "flex-1 min-w-0" }, zo = { class: "flex-1 min-w-0" }, Go = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Wo = { class: "flex items-center" }, Ko = { class: "fm-typo-en-title-sm-800 flex-1" }, qo = { class: "flex gap-8" }, Xo = /* @__PURE__ */ me({
963
+ }), Po = { class: "flex items-center w-full gap-8" }, Eo = { class: "fm-typo-en-title-md-800 flex-1" }, Ro = { class: "flex flex-col gap-16" }, No = { class: "flex flex-col gap-4" }, Oo = { class: "fm-typo-en-body-md-600" }, Yo = { class: "flex gap-8 items-start" }, Lo = { class: "flex-1 min-w-0" }, zo = { class: "flex-1 min-w-0" }, Go = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Wo = { class: "flex items-center" }, Ko = { class: "fm-typo-en-title-sm-800 flex-1" }, qo = { class: "flex gap-8" }, Xo = /* @__PURE__ */ me({
964
964
  __name: "StockAdjustmentSideSheet",
965
965
  props: {
966
966
  show: { type: Boolean }
967
967
  },
968
968
  emits: ["update:show", "submitted"],
969
969
  setup(A, { emit: u }) {
970
- const _ = A, p = u, { t: C } = fe(), j = Re(), c = Ae(), r = Ne(), k = we(), L = Ye(_, "show"), M = z(!1), l = dt({
970
+ const _ = A, p = u, { t: C } = fe(), j = Re(), c = Ae(), r = Oe(), k = we(), L = Ye(_, "show"), M = z(!1), l = dt({
971
971
  remark: "",
972
972
  effectiveAt: /* @__PURE__ */ new Date(),
973
973
  adjustments: []
@@ -1047,9 +1047,9 @@ const We = {
1047
1047
  M.value = !0;
1048
1048
  try {
1049
1049
  const S = l.adjustments.map(
1050
- ({ doc: I, remark: T, type: W, amount: U, measurement: oe }) => ({
1050
+ ({ doc: I, remark: T, type: W, amount: P, measurement: oe }) => ({
1051
1051
  id: I._id,
1052
- amount: U,
1052
+ amount: P,
1053
1053
  measurement: oe,
1054
1054
  remark: T,
1055
1055
  doc: I,
@@ -1072,16 +1072,16 @@ const We = {
1072
1072
  }
1073
1073
  }
1074
1074
  return (S, g) => {
1075
- const I = P("FmTextarea"), T = P("FmDatePicker"), W = P("FmTimePicker"), U = P("FmButton"), oe = P("FmSideSheet");
1075
+ const I = U("FmTextarea"), T = U("FmDatePicker"), W = U("FmTimePicker"), P = U("FmButton"), oe = U("FmSideSheet");
1076
1076
  return V(), Q(oe, {
1077
1077
  modelValue: s(L),
1078
- "onUpdate:modelValue": g[4] || (g[4] = (X) => Ue(L) ? L.value = X : null),
1078
+ "onUpdate:modelValue": g[4] || (g[4] = (X) => Pe(L) ? L.value = X : null),
1079
1079
  "dismiss-away": "",
1080
1080
  "max-width": 560,
1081
1081
  onAfterEnter: b
1082
1082
  }, {
1083
1083
  "side-sheet-header": R(() => [
1084
- e("div", Uo, [
1084
+ e("div", Po, [
1085
1085
  e("div", Eo, i(s(C)("inventory.stock.stock_adjustment.title")), 1)
1086
1086
  ])
1087
1087
  ]),
@@ -1093,8 +1093,8 @@ const We = {
1093
1093
  "onUpdate:modelValue": g[0] || (g[0] = (X) => l.remark = X),
1094
1094
  "label-mark": "optional"
1095
1095
  }, null, 8, ["label", "modelValue"]),
1096
- e("div", Oo, [
1097
- e("label", No, i(s(C)("inventory.stock.stock_adjustment.effectiveAt")), 1),
1096
+ e("div", No, [
1097
+ e("label", Oo, i(s(C)("inventory.stock.stock_adjustment.effectiveAt")), 1),
1098
1098
  e("div", Yo, [
1099
1099
  e("div", Lo, [
1100
1100
  v(T, {
@@ -1118,7 +1118,7 @@ const We = {
1118
1118
  ]),
1119
1119
  e("div", Wo, [
1120
1120
  e("div", Ko, i(s(C)("inventory.stock.adjust.adjustedItems")), 1),
1121
- v(U, {
1121
+ v(P, {
1122
1122
  "prepend-icon": "add",
1123
1123
  variant: "tertiary",
1124
1124
  size: "md",
@@ -1135,12 +1135,12 @@ const We = {
1135
1135
  ]),
1136
1136
  "side-sheet-footer": R(() => [
1137
1137
  e("div", qo, [
1138
- v(U, {
1138
+ v(P, {
1139
1139
  label: s(C)("common.confirm"),
1140
1140
  loading: M.value,
1141
1141
  onClick: x
1142
1142
  }, null, 8, ["label", "loading"]),
1143
- v(U, {
1143
+ v(P, {
1144
1144
  label: s(C)("common.close"),
1145
1145
  variant: "tertiary",
1146
1146
  onClick: g[3] || (g[3] = (X) => p("update:show", !1))
@@ -1211,8 +1211,8 @@ const We = {
1211
1211
  const { skuId: t, idx: o, unit: x, measurement: S } = n;
1212
1212
  return Y({
1213
1213
  get: () => {
1214
- var T, W, U;
1215
- const g = (U = (W = (T = j.value) == null ? void 0 : T[t]) == null ? void 0 : W[o]) == null ? void 0 : U.amount;
1214
+ var T, W, P;
1215
+ const g = (P = (W = (T = j.value) == null ? void 0 : T[t]) == null ? void 0 : W[o]) == null ? void 0 : P.amount;
1216
1216
  return g ? Number(_e.toFormatString({ value: g })) : 0;
1217
1217
  },
1218
1218
  set: (g) => {
@@ -1242,17 +1242,17 @@ const We = {
1242
1242
  return o ? _e.toFormatString({ value: o }) : "N/A";
1243
1243
  }
1244
1244
  return (n, t) => {
1245
- const o = P("FmIcon"), x = P("FmStepperField"), S = P("FmCard"), g = P("FmForm"), I = P("FmSpacer"), T = P("FmButton"), W = P("FmDialog");
1245
+ const o = U("FmIcon"), x = U("FmStepperField"), S = U("FmCard"), g = U("FmForm"), I = U("FmSpacer"), T = U("FmButton"), W = U("FmDialog");
1246
1246
  return V(), Q(W, {
1247
1247
  modelValue: k.value,
1248
- "onUpdate:modelValue": t[4] || (t[4] = (U) => k.value = U),
1248
+ "onUpdate:modelValue": t[4] || (t[4] = (P) => k.value = P),
1249
1249
  overlay: !0
1250
1250
  }, {
1251
1251
  "dialog-button": R(() => [
1252
1252
  v(Je, null, {
1253
1253
  default: R(() => [
1254
1254
  e("button", {
1255
- onClick: t[0] || (t[0] = (U) => k.value = !0),
1255
+ onClick: t[0] || (t[0] = (P) => k.value = !0),
1256
1256
  class: "rounded-md hover:bg-gray-100 transition-colors"
1257
1257
  }, [
1258
1258
  v(o, {
@@ -1277,7 +1277,7 @@ const We = {
1277
1277
  label: "Close",
1278
1278
  size: "md",
1279
1279
  variant: "tertiary",
1280
- onClick: t[3] || (t[3] = (U) => k.value = !1)
1280
+ onClick: t[3] || (t[3] = (P) => k.value = !1)
1281
1281
  }),
1282
1282
  v(T, {
1283
1283
  class: "sm:w-full xs:w-full",
@@ -1309,16 +1309,16 @@ const We = {
1309
1309
  pe(" " + i(s(Gt)(s(Ct)(L.value._id))), 1)
1310
1310
  ]),
1311
1311
  e("div", en, [
1312
- (V(!0), G(ie, null, de(L.value.skus, (U, oe) => (V(), G(ie, { key: oe }, [
1313
- (V(!0), G(ie, null, de(U.amounts, (X, ue) => (V(), Q(S, {
1312
+ (V(!0), G(ie, null, de(L.value.skus, (P, oe) => (V(), G(ie, { key: oe }, [
1313
+ (V(!0), G(ie, null, de(P.amounts, (X, ue) => (V(), Q(S, {
1314
1314
  key: ue,
1315
1315
  variant: "outlined",
1316
1316
  class: "p-2"
1317
1317
  }, {
1318
1318
  default: R(() => [
1319
1319
  e("div", tn, [
1320
- e("span", on, i(U.sku.code), 1),
1321
- e("span", null, i(U.sku.name), 1)
1320
+ e("span", on, i(P.sku.code), 1),
1321
+ e("span", null, i(P.sku.name), 1)
1322
1322
  ]),
1323
1323
  t[12] || (t[12] = e("hr", { class: "m-2" }, null, -1)),
1324
1324
  e("div", nn, [
@@ -1327,27 +1327,27 @@ const We = {
1327
1327
  ]),
1328
1328
  e("div", sn, [
1329
1329
  t[9] || (t[9] = e("span", { class: "fm-typo-en-body-lg-600" }, "Current amount:", -1)),
1330
- e("span", null, i(s(_e).toFormatString({ value: X.amount })) + " " + i(h(U, X)), 1)
1330
+ e("span", null, i(s(_e).toFormatString({ value: X.amount })) + " " + i(h(P, X)), 1)
1331
1331
  ]),
1332
1332
  v(x, {
1333
- "max-fraction-digits": s($e)(U.sku.unit),
1333
+ "max-fraction-digits": s($e)(P.sku.unit),
1334
1334
  "model-value": d({
1335
- skuId: U.sku._id,
1335
+ skuId: P.sku._id,
1336
1336
  idx: ue,
1337
- unit: U.sku.unit
1337
+ unit: P.sku.unit
1338
1338
  }).value,
1339
1339
  "onUpdate:modelValue": (se) => d({
1340
- skuId: U.sku._id,
1340
+ skuId: P.sku._id,
1341
1341
  idx: ue,
1342
- unit: U.sku.unit
1342
+ unit: P.sku.unit
1343
1343
  }).value = se,
1344
1344
  class: "mb-3",
1345
1345
  label: "Adjust Amount (Leave 0 to skip)",
1346
1346
  "helper-text": `Max: ${H(X.amount)}`,
1347
- "append-text": h(U, X),
1347
+ "append-text": h(P, X),
1348
1348
  rules: [
1349
1349
  (se) => se <= H(X.amount) || `Cannot be more than ${H(X.amount)}`,
1350
- s(Pe)(-1)
1350
+ s(Ue)(-1)
1351
1351
  ]
1352
1352
  }, null, 8, ["max-fraction-digits", "model-value", "onUpdate:modelValue", "helper-text", "append-text", "rules"]),
1353
1353
  e("div", an, [
@@ -1357,12 +1357,12 @@ const We = {
1357
1357
  X.amount,
1358
1358
  s(_e).fromNumber(
1359
1359
  d({
1360
- skuId: U.sku._id,
1360
+ skuId: P.sku._id,
1361
1361
  idx: ue,
1362
- unit: U.sku.unit
1362
+ unit: P.sku.unit
1363
1363
  }).value
1364
1364
  )
1365
- )) + " " + i(h(U, X)), 1)
1365
+ )) + " " + i(h(P, X)), 1)
1366
1366
  ])
1367
1367
  ]),
1368
1368
  _: 2
@@ -1496,7 +1496,7 @@ const We = {
1496
1496
  })
1497
1497
  })));
1498
1498
  return (M, l) => {
1499
- const d = P("FmIcon"), H = P("FmTooltip"), h = P("FmCard");
1499
+ const d = U("FmIcon"), H = U("FmTooltip"), h = U("FmCard");
1500
1500
  return V(), Q(h, { variant: "outlined" }, {
1501
1501
  default: R(() => [
1502
1502
  e("div", cn, [
@@ -1663,10 +1663,10 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
1663
1663
  }, Mn = { class: "fm-typo-en-body-lg-400 translate-x-4" }, In = {
1664
1664
  key: 1,
1665
1665
  class: "flex flex-col gap-12"
1666
- }, Tn = { class: "pb-16" }, Hn = { class: "fm-typo-cn-body-lg-600" }, Pn = {
1666
+ }, Tn = { class: "pb-16" }, Hn = { class: "fm-typo-cn-body-lg-600" }, Un = {
1667
1667
  class: "grid gap-12 fm-typo-en-body-md-400",
1668
1668
  style: { "grid-template-columns": "auto auto auto", "grid-auto-rows": "1fr" }
1669
- }, Un = { class: "flex flex-col gap-1" }, En = { class: "text-fm-color-typo-secondary" }, Rn = { class: "font-bold" }, On = { class: "flex flex-col gap-1" }, Nn = { class: "text-fm-color-typo-secondary flex" }, Yn = { class: "font-bold" }, Ln = { class: "flex flex-col gap-1" }, zn = { class: "text-fm-color-typo-secondary" }, Gn = { class: "font-bold" }, Wn = { class: "flex flex-col gap-1" }, Kn = { class: "text-fm-color-typo-secondary" }, qn = { class: "font-bold" }, Xn = { class: "flex flex-col gap-1" }, Jn = { class: "text-fm-color-typo-secondary" }, Qn = { class: "font-bold" }, Zn = { class: "flex flex-col gap-1" }, es = { class: "text-fm-color-typo-secondary" }, ts = { class: "font-bold" }, os = { class: "flex flex-col gap-1" }, ns = { class: "text-fm-color-typo-secondary" }, ss = { class: "font-bold" }, as = { class: "flex flex-col gap-1" }, rs = { class: "text-fm-color-typo-secondary" }, ls = { class: "font-bold" }, is = { class: "flex flex-col gap-1" }, us = { class: "text-fm-color-typo-secondary" }, cs = { class: "font-bold" }, ds = {
1669
+ }, Pn = { class: "flex flex-col gap-1" }, En = { class: "text-fm-color-typo-secondary" }, Rn = { class: "font-bold" }, Nn = { class: "flex flex-col gap-1" }, On = { class: "text-fm-color-typo-secondary flex" }, Yn = { class: "font-bold" }, Ln = { class: "flex flex-col gap-1" }, zn = { class: "text-fm-color-typo-secondary" }, Gn = { class: "font-bold" }, Wn = { class: "flex flex-col gap-1" }, Kn = { class: "text-fm-color-typo-secondary" }, qn = { class: "font-bold" }, Xn = { class: "flex flex-col gap-1" }, Jn = { class: "text-fm-color-typo-secondary" }, Qn = { class: "font-bold" }, Zn = { class: "flex flex-col gap-1" }, es = { class: "text-fm-color-typo-secondary" }, ts = { class: "font-bold" }, os = { class: "flex flex-col gap-1" }, ns = { class: "text-fm-color-typo-secondary" }, ss = { class: "font-bold" }, as = { class: "flex flex-col gap-1" }, rs = { class: "text-fm-color-typo-secondary" }, ls = { class: "font-bold" }, is = { class: "flex flex-col gap-1" }, us = { class: "text-fm-color-typo-secondary" }, cs = { class: "font-bold" }, ds = {
1670
1670
  key: 0,
1671
1671
  class: "flex flex-col gap-8"
1672
1672
  }, ms = { class: "flex" }, fs = { class: "flex-1 flex flex-col gap-1" }, ps = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, vs = { class: "font-bold" }, ys = { class: "flex-1 flex flex-col gap-1" }, _s = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, ks = { class: "flex flex-col gap-1" }, hs = { class: "font-bold" }, bs = {
@@ -1680,7 +1680,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
1680
1680
  },
1681
1681
  emits: ["update:show"],
1682
1682
  setup(A) {
1683
- const u = Xe(), _ = Oe(), p = Ae(), C = Jo(), j = Ve(), c = eo(), { t: r } = fe(), k = A, L = z(!1), M = we(), l = z("adjustment"), d = z([
1683
+ const u = Xe(), _ = Ne(), p = Ae(), C = Jo(), j = Ve(), c = eo(), { t: r } = fe(), k = A, L = z(!1), M = we(), l = z("adjustment"), d = z([
1684
1684
  { label: "Adjustment (Default)", value: "adjustment" }
1685
1685
  ]), H = z([]), h = z(Jt(0));
1686
1686
  async function b() {
@@ -1712,8 +1712,8 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
1712
1712
  const f = a.effectiveAt ?? Te(a._id);
1713
1713
  if (!f)
1714
1714
  return w;
1715
- const N = x(new Date(f), m);
1716
- return w[N] ?? (w[N] = []), w[N].push(a), w;
1715
+ const O = x(new Date(f), m);
1716
+ return w[O] ?? (w[O] = []), w[O].push(a), w;
1717
1717
  },
1718
1718
  {}
1719
1719
  );
@@ -1772,10 +1772,10 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
1772
1772
  }), W = Y(() => {
1773
1773
  const y = n.value, m = k.sku;
1774
1774
  return Fn(y, m);
1775
- }), U = Y(() => {
1775
+ }), P = Y(() => {
1776
1776
  const y = [...n.value].computeFirst((B) => {
1777
1777
  var a, f;
1778
- const w = (f = (a = B.skus) == null ? void 0 : a.find) == null ? void 0 : f.call(a, (N) => N.sku._id === k.sku._id);
1778
+ const w = (f = (a = B.skus) == null ? void 0 : a.find) == null ? void 0 : f.call(a, (O) => O.sku._id === k.sku._id);
1779
1779
  return w == null ? void 0 : w.fromBalance;
1780
1780
  }) ?? {
1781
1781
  amount: 0,
@@ -1788,7 +1788,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
1788
1788
  }), oe = Y(() => {
1789
1789
  const y = [...n.value].reverse().computeFirst((B) => {
1790
1790
  var a, f;
1791
- const w = (f = (a = B.skus) == null ? void 0 : a.find) == null ? void 0 : f.call(a, (N) => N.sku._id === k.sku._id);
1791
+ const w = (f = (a = B.skus) == null ? void 0 : a.find) == null ? void 0 : f.call(a, (O) => O.sku._id === k.sku._id);
1792
1792
  return w == null ? void 0 : w.toBalance;
1793
1793
  }) ?? {
1794
1794
  amount: 0,
@@ -1804,12 +1804,12 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
1804
1804
  (w, a) => {
1805
1805
  const f = a.cost;
1806
1806
  if (!f) return w;
1807
- const N = {
1807
+ const O = {
1808
1808
  ...Et(w, Math.max(w.precision, f.precision)),
1809
1809
  currency: f.currency
1810
1810
  };
1811
1811
  return {
1812
- ...Qe(N, f),
1812
+ ...Qe(O, f),
1813
1813
  currency: w.currency
1814
1814
  };
1815
1815
  },
@@ -1837,15 +1837,15 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
1837
1837
  );
1838
1838
  if (B.length === 0) return null;
1839
1839
  const w = B.find((f) => {
1840
- const N = f.meta;
1841
- return (N == null ? void 0 : N.adjustmentId) === y;
1840
+ const O = f.meta;
1841
+ return (O == null ? void 0 : O.adjustmentId) === y;
1842
1842
  });
1843
1843
  if (w) return w.cost;
1844
- const a = [...B].filter((f) => new Date(f.snapshotAt) <= new Date(m)).sort((f, N) => new Date(N.snapshotAt).getTime() - new Date(f.snapshotAt).getTime());
1844
+ const a = [...B].filter((f) => new Date(f.snapshotAt) <= new Date(m)).sort((f, O) => new Date(O.snapshotAt).getTime() - new Date(f.snapshotAt).getTime());
1845
1845
  return a.length > 0 ? a[0].cost : null;
1846
1846
  }
1847
1847
  const $ = Y(() => {
1848
- var w, a, f, N, Z, ae;
1848
+ var w, a, f, O, Z, ae;
1849
1849
  const y = [...n.value].reverse().find((q) => {
1850
1850
  var ee, re;
1851
1851
  return (re = (ee = q.skus) == null ? void 0 : ee.find) == null ? void 0 : re.call(ee, (le) => le.sku._id === k.sku._id);
@@ -1861,7 +1861,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
1861
1861
  }, re = q.amount, le = re.amount == 0 ? J.fromNumber(0) : J.divide([ee, re]);
1862
1862
  return {
1863
1863
  ...J.multiply([le, B]),
1864
- currency: ((N = q.cost) == null ? void 0 : N.currency) || je(((Z = u.currentCountry) == null ? void 0 : Z.value) ?? ot)
1864
+ currency: ((O = q.cost) == null ? void 0 : O.currency) || je(((Z = u.currentCountry) == null ? void 0 : Z.value) ?? ot)
1865
1865
  };
1866
1866
  } else {
1867
1867
  const q = y.effectiveAt ?? Te(y._id), ee = F(
@@ -1878,8 +1878,8 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
1878
1878
  }), E = Y(() => {
1879
1879
  var B;
1880
1880
  const y = [...n.value].reverse().computeFirst((w) => {
1881
- var f, N;
1882
- const a = (N = (f = w.skus) == null ? void 0 : f.find) == null ? void 0 : N.call(f, (Z) => Z.sku._id === k.sku._id);
1881
+ var f, O;
1882
+ const a = (O = (f = w.skus) == null ? void 0 : f.find) == null ? void 0 : O.call(f, (Z) => Z.sku._id === k.sku._id);
1883
1883
  return a == null ? void 0 : a.toCostBalances;
1884
1884
  });
1885
1885
  return y ? {
@@ -1897,13 +1897,13 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
1897
1897
  endDate: m
1898
1898
  });
1899
1899
  }
1900
- const O = Ye(k, "show");
1900
+ const N = Ye(k, "show");
1901
1901
  return (y, m) => {
1902
- const B = P("FmButton"), w = P("FmField"), a = P("FmDateRangePicker"), f = P("FmSpacer"), N = P("FmCircularProgress"), Z = P("FmIcon"), ae = P("FmTooltip"), q = P("FmMenuDivider"), ee = P("FmChip"), re = P("FmSelect"), le = P("FmCardSection"), ve = P("FmCard"), be = P("FmSideSheet");
1902
+ const B = U("FmButton"), w = U("FmField"), a = U("FmDateRangePicker"), f = U("FmSpacer"), O = U("FmCircularProgress"), Z = U("FmIcon"), ae = U("FmTooltip"), q = U("FmMenuDivider"), ee = U("FmChip"), re = U("FmSelect"), le = U("FmCardSection"), ve = U("FmCard"), be = U("FmSideSheet");
1903
1903
  return V(), Q(be, {
1904
1904
  "dismiss-away": "",
1905
- modelValue: s(O),
1906
- "onUpdate:modelValue": m[5] || (m[5] = (ye) => Ue(O) ? O.value = ye : null),
1905
+ modelValue: s(N),
1906
+ "onUpdate:modelValue": m[5] || (m[5] = (ye) => Pe(N) ? N.value = ye : null),
1907
1907
  "close-button": !1,
1908
1908
  "max-width": 560
1909
1909
  }, {
@@ -1913,7 +1913,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
1913
1913
  v(B, {
1914
1914
  variant: "tertiary",
1915
1915
  "prepend-icon": "close",
1916
- onClick: m[0] || (m[0] = (ye) => O.value = !1)
1916
+ onClick: m[0] || (m[0] = (ye) => N.value = !1)
1917
1917
  })
1918
1918
  ])
1919
1919
  ]),
@@ -1958,7 +1958,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
1958
1958
  ]),
1959
1959
  L.value ? (V(), G("div", Bn, [
1960
1960
  v(f),
1961
- v(N, { size: "xl" }),
1961
+ v(O, { size: "xl" }),
1962
1962
  e("div", Mn, i(s(r)("inventory.stock.history.loading")), 1),
1963
1963
  v(f),
1964
1964
  v(f)
@@ -1970,13 +1970,13 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
1970
1970
  e("div", Tn, [
1971
1971
  e("div", Hn, i(s(r)("inventory.stock.history.summary.title")), 1)
1972
1972
  ]),
1973
- e("div", Pn, [
1974
- e("div", Un, [
1973
+ e("div", Un, [
1974
+ e("div", Pn, [
1975
1975
  e("div", En, i(s(r)("inventory.stock.history.summary.totalPurchase")), 1),
1976
1976
  e("div", Rn, i(T.value.PURCHASE), 1)
1977
1977
  ]),
1978
- e("div", On, [
1979
- e("div", Nn, [
1978
+ e("div", Nn, [
1979
+ e("div", On, [
1980
1980
  pe(i(s(r)("inventory.stock.history.summary.totalSales")) + "  ", 1),
1981
1981
  W.value != null ? (V(), Q(ae, {
1982
1982
  key: 0,
@@ -2018,7 +2018,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
2018
2018
  ]),
2019
2019
  e("div", as, [
2020
2020
  e("div", rs, i(s(r)("inventory.stock.history.summary.openingBalance")), 1),
2021
- e("div", ls, i(U.value), 1)
2021
+ e("div", ls, i(P.value), 1)
2022
2022
  ]),
2023
2023
  e("div", is, [
2024
2024
  e("div", us, i(s(r)("inventory.stock.history.summary.lastStockBalance")), 1),
@@ -2171,14 +2171,14 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
2171
2171
  }, $s = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Vs = { class: "flex flex-col gap-8" }, js = { class: "flex flex-col" }, Cs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ds = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, ia = /* @__PURE__ */ me({
2172
2172
  __name: "StockView",
2173
2173
  setup(A) {
2174
- const { t: u } = fe(), _ = Re(), p = Ve(), C = Oe(), j = bt(), c = Ae(), r = vt(), k = oo(), { columnDefs: L } = uo(), M = Xe(), { hasPermission: l } = ht(
2174
+ const { t: u } = fe(), _ = Re(), p = Ve(), C = Ne(), j = bt(), c = Ae(), r = vt(), k = oo(), { columnDefs: L } = uo(), M = Xe(), { hasPermission: l } = ht(
2175
2175
  Y(() => [{ action: Ce.Action.manage, subject: Ce.Subject.Business.inventory_stockAdjustment }])
2176
2176
  ), d = Y(
2177
2177
  () => {
2178
2178
  var E;
2179
2179
  return l.value || ((E = M.sessionUser.value) == null ? void 0 : E.role.isAdmin);
2180
2180
  }
2181
- ), H = Ne(), h = we();
2181
+ ), H = Oe(), h = we();
2182
2182
  p.watchLocation(o);
2183
2183
  const b = Y(
2184
2184
  () => new Set(k.getAvailableItems(k.businessSubsidiaryId))
@@ -2239,7 +2239,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
2239
2239
  }
2240
2240
  ]
2241
2241
  }), g = Y(() => {
2242
- var K, O, y;
2242
+ var K, N, y;
2243
2243
  const E = S.value ? no.build(S.value) : null, D = [];
2244
2244
  for (const m of _.skus) {
2245
2245
  let B = !0;
@@ -2250,12 +2250,12 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
2250
2250
  E
2251
2251
  )), B) {
2252
2252
  const w = m.trackingMeasurement;
2253
- let a = (O = (K = C.stockBalance.skus) == null ? void 0 : K.find(
2253
+ let a = (N = (K = C.stockBalance.skus) == null ? void 0 : K.find(
2254
2254
  (Z) => Z.id === m._id
2255
- )) == null ? void 0 : O.balance, f = r.inventoryForecast.skus.find(
2255
+ )) == null ? void 0 : N.balance, f = r.inventoryForecast.skus.find(
2256
2256
  (Z) => Z.id === m._id
2257
2257
  );
2258
- const N = {
2258
+ const O = {
2259
2259
  ...m,
2260
2260
  balance: a ?? {
2261
2261
  amount: 0,
@@ -2265,11 +2265,11 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
2265
2265
  day: (f == null ? void 0 : f.depletionDays) ?? void 0,
2266
2266
  trackingUnitAbbrev: w ? ((y = m.unit.measurements.find((Z) => Z.id === w)) == null ? void 0 : y.abbrev) ?? "" : m.unit.abbrev
2267
2267
  };
2268
- D.push(N);
2268
+ D.push(O);
2269
2269
  }
2270
2270
  }
2271
2271
  return D;
2272
- }), I = z(""), T = z(!0), { breakpoints: W } = Tt(), U = Y(() => W.value.xs || W.value.sm), oe = Y(() => U.value ? 10 : 20), X = At(), ue = Y(() => {
2272
+ }), I = z(""), T = z(!0), { breakpoints: W } = Tt(), P = Y(() => W.value.xs || W.value.sm), oe = Y(() => P.value ? 10 : 20), X = At(), ue = Y(() => {
2273
2273
  const E = [
2274
2274
  {
2275
2275
  label: u("inventory.stock.stock_balance.refreshBalance"),
@@ -2307,7 +2307,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
2307
2307
  }
2308
2308
  }
2309
2309
  return (E, D) => {
2310
- const K = P("FmSwitch"), O = P("FmTable");
2310
+ const K = U("FmSwitch"), N = U("FmTable");
2311
2311
  return V(), Q(Ft, {
2312
2312
  title: s(u)("inventory.stock.title"),
2313
2313
  actions: ue.value,
@@ -2320,8 +2320,8 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
2320
2320
  class: Ie([
2321
2321
  "flex flex-col gap-8 max-h-full",
2322
2322
  {
2323
- "p-0": U.value,
2324
- "px-24 ": !U.value
2323
+ "p-0": P.value,
2324
+ "px-24 ": !P.value
2325
2325
  }
2326
2326
  ])
2327
2327
  }, [
@@ -2353,7 +2353,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
2353
2353
  ]),
2354
2354
  _: 1
2355
2355
  }, 8, ["search", "filter-attributes", "filter"]),
2356
- (V(), Q(O, {
2356
+ (V(), Q(N, {
2357
2357
  style: mt(s(X).tableHeight),
2358
2358
  "column-defs": s(L),
2359
2359
  "row-data": g.value,
@@ -2369,13 +2369,13 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
2369
2369
  onRowClick: s(j).showSkuHistory
2370
2370
  }, {
2371
2371
  default: R((f) => {
2372
- var N, Z, ae, q, ee, re, le, ve, be, ye;
2372
+ var O, Z, ae, q, ee, re, le, ve, be, ye;
2373
2373
  return [
2374
2374
  e("div", Vs, [
2375
2375
  e("div", js, [
2376
2376
  e("div", Cs, [
2377
2377
  v(s(it), {
2378
- render: (ae = (Z = (N = f.code) == null ? void 0 : N.column) == null ? void 0 : Z.columnDef) == null ? void 0 : ae.cell,
2378
+ render: (ae = (Z = (O = f.code) == null ? void 0 : O.column) == null ? void 0 : Z.columnDef) == null ? void 0 : ae.cell,
2379
2379
  props: (ee = (q = f.code) == null ? void 0 : q.getContext) == null ? void 0 : ee.call(q)
2380
2380
  }, null, 8, ["render", "props"])
2381
2381
  ]),
@@ -2412,7 +2412,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
2412
2412
  (V(), Q(wt, { to: "body" }, [
2413
2413
  (m = s(j).stockHistoryProps) != null && m.sku ? (V(), Q(ws, Le(ze({ key: 0 }, s(j).stockHistoryProps)), null, 16)) : te("", !0),
2414
2414
  (B = s(j).convertSkuDialogProps) != null && B.sku ? (V(), Q(Ao, Le(ze({ key: 1 }, s(j).convertSkuDialogProps)), null, 16)) : te("", !0),
2415
- (w = s(j).adjustSkuDialogProps) != null && w.stock ? (V(), Q(Po, Le(ze({ key: 2 }, s(j).adjustSkuDialogProps)), null, 16)) : te("", !0),
2415
+ (w = s(j).adjustSkuDialogProps) != null && w.stock ? (V(), Q(Uo, Le(ze({ key: 2 }, s(j).adjustSkuDialogProps)), null, 16)) : te("", !0),
2416
2416
  v(As, {
2417
2417
  permission: { action: s(Ce).Action.manage, subject: s(Ce).Subject.Business.inventory_stockAdjustment }
2418
2418
  }, {