@feedmepos/mf-inventory-portal 1.0.8 → 1.0.9-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 (97) hide show
  1. package/dist/{App-DeBNx7kq.js → App-DfxhucPn.js} +50 -49
  2. package/dist/{ApprovalView-CYgDG4X-.js → ApprovalView-BUYgTb8S.js} +24 -24
  3. package/dist/{BindingsDialog-Bojdsd9h.js → BindingsDialog-Cbs9aVch.js} +2 -2
  4. package/dist/{BindingsPicker-TkiARkrC.js → BindingsPicker-BH9bil6g.js} +3 -3
  5. package/dist/{BindingsTable-BWYaPoFt.js → BindingsTable-DBsS_9yb.js} +1 -1
  6. package/dist/ClosingDraftView-CcQssDLY.js +1415 -0
  7. package/dist/{ClosingTemplateView-CUjkAFjw.js → ClosingTemplateView-BHPqi-bL.js} +10 -10
  8. package/dist/{DeliveryOrderPrintPreview-BOEKl7zP.js → DeliveryOrderPrintPreview-DlTLtZ1f.js} +1 -1
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bve5cng3.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CtJSPDCo.js} +32 -32
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-1-G4gmCj.js → FmUnitInput.vue_vue_type_script_setup_true_lang-B-erI7fq.js} +51 -51
  11. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bl526zYj.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DT4nyE8i.js} +1 -1
  12. package/dist/{IngredientGroupView-stli1Xiv.js → IngredientGroupView-DE15kdqH.js} +11 -11
  13. package/dist/{IngredientsView-jmDSRSkr.js → IngredientsView-BCEznLxB.js} +15 -14
  14. package/dist/{IntegrationView-BQZtDqlR.js → IntegrationView-COSJuqnB.js} +146 -145
  15. package/dist/{InventoryBindingForm-hHgB20dI.js → InventoryBindingForm-B3C8gktf.js} +1 -1
  16. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BK36mlQE.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Bn2X1jxB.js} +20 -20
  17. package/dist/{InventoryBindingSummary-JsAhd0Jm.js → InventoryBindingSummary-BF1OtGum.js} +1 -1
  18. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C4A6bDPB.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BMTXHa4I.js} +1 -1
  19. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C6bND0mn.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CZR7wF6-.js} +10 -10
  20. package/dist/{PublishView-BK7WwXeV.js → PublishView-Cp5tpVb0.js} +12 -12
  21. package/dist/{PurchaseOrderPrintPreview-CMnaZkzc.js → PurchaseOrderPrintPreview-DWOcxCH8.js} +4 -4
  22. package/dist/{ReceiveRequestView-Bb6RQyJ8.js → ReceiveRequestView-CRuhm8r1.js} +53 -52
  23. package/dist/{RecipeView-CZnElbJ8.js → RecipeView-BTS1LBKZ.js} +29 -29
  24. package/dist/{StockView-CDAHrTyi.js → StockView-CuK8s5rt.js} +73 -72
  25. package/dist/{SupplierView-WTgrwbJ_.js → SupplierView-Bwpe9RoM.js} +12 -11
  26. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DDAZMTzq.js +1897 -0
  27. package/dist/{TransferTemplateView-26w6orAY.js → TransferTemplateView-BlluEiV-.js} +291 -290
  28. package/dist/{UnitView-DAl0OS01.js → UnitView-BWGQHOWP.js} +23 -23
  29. package/dist/{WarehouseView-Db2wXza_.js → WarehouseView-dOCu22dg.js} +26 -26
  30. package/dist/api/bill.d.ts +2 -2
  31. package/dist/api/food-market-hub.d.ts +1 -1
  32. package/dist/api/inventory.d.ts +44 -44
  33. package/dist/api/netsuite.d.ts +3 -3
  34. package/dist/api/purchase-order.d.ts +5 -1
  35. package/dist/api/stock.d.ts +1 -0
  36. package/dist/{app-Ch3IXeOL.js → app-BkIAyhP-.js} +16504 -16961
  37. package/dist/app.d.ts +7 -7
  38. package/dist/app.js +1 -1
  39. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +8 -8
  40. package/dist/components/shell/inventory/binding-dialog.vue.d.ts +2 -2
  41. package/dist/components/shell/inventory/binding-ui.vue.d.ts +5 -5
  42. package/dist/composable/usePromise.d.ts +41 -0
  43. package/dist/{decimal-BFWsfQmw.js → decimal-BiC7uGww.js} +1 -1
  44. package/dist/feature-CCDDWpq8.js +17319 -0
  45. package/dist/{format-unit-display-CyBzA_Ye.js → format-unit-display-CLa0op_h.js} +60 -60
  46. package/dist/{index-CKB7R0y2.js → index-BbFvsU1Z.js} +7 -6
  47. package/dist/{index-CSjhH3PC.js → index-UgbyiGok.js} +1 -1
  48. package/dist/{stock-BjY9UvKO.js → stock-SxO4bxTm.js} +29 -25
  49. package/dist/stores/feature.d.ts +5 -20
  50. package/dist/stores/integration/foodmarkethub.d.ts +1 -1
  51. package/dist/stores/integration/netsuite.d.ts +7 -7
  52. package/dist/stores/inventory.d.ts +44 -44
  53. package/dist/stores/location.d.ts +137 -137
  54. package/dist/{supplier-8x-ZFcOk.js → supplier-BVdCk7nI.js} +4 -4
  55. package/dist/tsconfig.app.tsbuildinfo +1 -1
  56. package/dist/{use-ingredient-select-dialog-CxZAaSGc.js → use-ingredient-select-dialog-CDeGXhur.js} +1 -1
  57. package/dist/{use-inventory-binding-dialog-Kmg24YiM.js → use-inventory-binding-dialog-CeRKqMy7.js} +1 -1
  58. package/dist/views/adjustment-template/wastage-template/actions.d.ts +228 -228
  59. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +2 -2
  60. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +1 -1
  61. package/dist/views/adjustment-template/wastage-template/table.d.ts +234 -234
  62. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +780 -74
  63. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +424 -409
  64. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +4 -4
  65. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +252 -252
  66. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +252 -252
  67. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +12 -12
  68. package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +2 -2
  69. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +8 -8
  70. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +3 -3
  71. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +4 -4
  72. package/dist/views/integration/components/ApplyProduct.vue.d.ts +2 -2
  73. package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +2 -2
  74. package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +2 -2
  75. package/dist/views/integration/components/netsuite/AddLocationDialog.vue.d.ts +204 -204
  76. package/dist/views/integration/components/netsuite/LocationConfigurationDialog.vue.d.ts +2 -2
  77. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +665 -637
  78. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +22 -22
  79. package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +44 -44
  80. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +11 -11
  81. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +614 -0
  82. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1190 -1142
  83. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +1192 -1144
  84. package/dist/views/receive-request/constants/po-action-to-ui-style.d.ts +6 -0
  85. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -2
  86. package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
  87. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +14 -14
  88. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +22 -22
  89. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +17 -17
  90. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +11 -11
  91. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +805 -805
  92. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +805 -805
  93. package/dist/views/transfer-template/composables/useTransferTemplateHelper.d.ts +33 -33
  94. package/dist/{vue-i18n-CXd9SF_G.js → vue-i18n-3Mh8tKq8.js} +341 -341
  95. package/package.json +3 -1
  96. package/dist/ClosingDraftView-C0ECZ9zi.js +0 -1394
  97. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-mHNmxBuV.js +0 -1746
@@ -1,14 +1,14 @@
1
- import { Y as Re, a as H, L as Ie, ab as P, s as Ae, ac as pe, v as fe, u as z, j as M, w as Ne, aD as oe, x as ye, b as J, t as j, Q as K, aC as De, av as Oe, W as Fe, y as Pe, z as Me, e as ae, f as Z, R as se, J as Ue, aa as Be, D as W, i as D, h as Le } from "./app-Ch3IXeOL.js";
2
- import { useCoreStore as X, useI18n as ee } from "@feedmepos/mf-common";
1
+ import { X as Re, a as H, K as Ie, aa as P, r as Ne, ab as pe, s as fe, u as z, i as M, v as Ae, aC as oe, w as ye, b as X, t as j, P as K, aB as Oe, au as De, V as Fe, x as Pe, y as Me, d as ae, e as Z, R as se, H as Ue, a9 as Be, D as Y, h as O, f as Le } from "./app-BkIAyhP-.js";
2
+ import { useCoreStore as J, useI18n as ee } from "@feedmepos/mf-common";
3
3
  import { useDialogChild as Qe, useSnackbar as he, useDialog as He, FmButtonVariant as ie, components as le } from "@feedmepos/ui-library";
4
4
  import { defineStore as ve } from "pinia";
5
- import { defineComponent as ge, resolveComponent as B, openBlock as T, createElementBlock as w, createElementVNode as $, normalizeClass as L, createTextVNode as qe, toDisplayString as I, unref as R, createCommentVNode as Q, createVNode as O, withCtx as G, Fragment as U, renderList as V, ref as C, onMounted as Ve, computed as ce, watch as je, createSlots as ze, createBlock as q, h as Y } from "vue";
5
+ import { defineComponent as ge, resolveComponent as B, openBlock as T, createElementBlock as w, createElementVNode as $, normalizeClass as L, createTextVNode as qe, toDisplayString as I, unref as R, createCommentVNode as Q, createVNode as D, withCtx as G, Fragment as U, renderList as V, ref as k, onMounted as Ve, computed as ce, watch as je, createSlots as ze, createBlock as q, h as W } from "vue";
6
6
  import { useRouter as Ke } from "vue-router";
7
- import { u as te } from "./supplier-8x-ZFcOk.js";
7
+ import { u as te } from "./supplier-BVdCk7nI.js";
8
8
  const be = Re((e, t) => {
9
9
  function s() {
10
10
  var n;
11
- return `business_${((n = X().currentBusiness.value) == null ? void 0 : n._id) ?? ""}`;
11
+ return `business_${((n = J().currentBusiness.value) == null ? void 0 : n._id) ?? ""}`;
12
12
  }
13
13
  return {
14
14
  async getTemplate(l) {
@@ -95,9 +95,9 @@ function Te() {
95
95
  }
96
96
  ];
97
97
  }
98
- function We(e) {
98
+ function Ye(e) {
99
99
  var i;
100
- const s = X().currentBusiness.value, o = (i = e.map((c) => {
100
+ const s = J().currentBusiness.value, o = (i = e.map((c) => {
101
101
  var x;
102
102
  const u = c.purchaseOrder.items.map((r) => Se(r)), h = Te(), p = [
103
103
  ["Template ID", c._id],
@@ -137,11 +137,11 @@ function We(e) {
137
137
  sheets: {},
138
138
  sheetOccurence: {}
139
139
  }
140
- )) == null ? void 0 : i.sheets, n = `${s == null ? void 0 : s.name} transfer templates (${Ae(/* @__PURE__ */ new Date())}).xlsx`, y = pe(o);
140
+ )) == null ? void 0 : i.sheets, n = `${s == null ? void 0 : s.name} transfer templates (${Ne(/* @__PURE__ */ new Date())}).xlsx`, y = pe(o);
141
141
  return fe(y, n), n;
142
142
  }
143
- function Ye() {
144
- const e = X(), t = te(), s = z(), l = H(), o = e.currentBusiness.value, n = Se({
143
+ function We() {
144
+ const e = J(), t = te(), s = z(), l = H(), o = e.currentBusiness.value, n = Se({
145
145
  sku: {
146
146
  unit: {
147
147
  _id: "",
@@ -293,7 +293,7 @@ function Ge(e, t) {
293
293
  errors: s
294
294
  };
295
295
  }
296
- function Je(e) {
296
+ function Xe(e) {
297
297
  if (!e.length || `${e[0]}`.toLocaleLowerCase() === "all")
298
298
  return [];
299
299
  const t = /(.*) \(((warehouse_|restaurant_).{24,})\)/, l = z().locationByDbName;
@@ -338,7 +338,7 @@ function Ze(e) {
338
338
  remark: `${p[1] ?? ""}`.trim()
339
339
  };
340
340
  }
341
- function Xe(e) {
341
+ function Je(e) {
342
342
  const [
343
343
  t,
344
344
  s,
@@ -372,9 +372,9 @@ function Xe(e) {
372
372
  );
373
373
  return x.map((a, d) => {
374
374
  const g = {};
375
- for (const k in r) {
376
- const b = r[k];
377
- Object.assign(g, { [b]: a[k] });
375
+ for (const C in r) {
376
+ const b = r[C];
377
+ Object.assign(g, { [b]: a[C] });
378
378
  }
379
379
  return {
380
380
  index: d,
@@ -391,7 +391,7 @@ function et(e, t, s) {
391
391
  };
392
392
  }
393
393
  function tt(e, t, s) {
394
- const l = H(), o = J(), n = l.skuByCode[e.code], y = new Array();
394
+ const l = H(), o = X(), n = l.skuByCode[e.code], y = new Array();
395
395
  if (!n)
396
396
  return y.push(`Cannot find ingredient with code (${e.code}) ${e.name}.`), {
397
397
  index: t,
@@ -431,13 +431,13 @@ function tt(e, t, s) {
431
431
  K(i, c)
432
432
  );
433
433
  (Number.isNaN(Number(e.quantityStep)) || Number(e.quantityStep) <= 0) && y.push("Amount step must be more than 0");
434
- const h = De(u), p = et(
434
+ const h = Oe(u), p = et(
435
435
  e.minimumQuantity,
436
436
  e.maximumQuantity,
437
437
  K(i, c)
438
438
  ), m = p.min, v = p.max;
439
439
  p.compareError && y.push(p.compareError);
440
- const x = Oe(+e.minimumQuantity, +e.maximumQuantity), r = j(
440
+ const x = De(+e.minimumQuantity, +e.maximumQuantity), r = j(
441
441
  e.defaultQuantity,
442
442
  K(i, c)
443
443
  ), S = h(r);
@@ -463,16 +463,16 @@ function tt(e, t, s) {
463
463
  function rt(e) {
464
464
  const t = e.SheetNames.filter(
465
465
  (n) => !Object.values(re).map(String).includes(n)
466
- ), l = $e().templates, o = Ne(l, "_id");
466
+ ), l = $e().templates, o = Ae(l, "_id");
467
467
  try {
468
468
  return t.reduce(
469
469
  (n, y) => {
470
470
  var a;
471
471
  const i = new Array(), c = e.Sheets[y], u = Ze(c), h = Ge(u.transferFrom, u.type);
472
472
  i.push(...h.errors);
473
- const p = h.from, m = Je(u.locations), v = m.filter((d) => d.location).map((d) => d.location);
473
+ const p = h.from, m = Xe(u.locations), v = m.filter((d) => d.location).map((d) => d.location);
474
474
  i.push(...m.flatMap((d) => d.errors));
475
- const x = Xe(c).filter((d) => d.data.code), r = x.map(
475
+ const x = Je(c).filter((d) => d.data.code), r = x.map(
476
476
  (d, g) => tt(d.data, g, x)
477
477
  );
478
478
  i.push(
@@ -484,7 +484,7 @@ function rt(e) {
484
484
  if (u.id) {
485
485
  const d = o[u.id];
486
486
  if (!d) {
487
- const k = {
487
+ const C = {
488
488
  _id: u.id,
489
489
  _rev: "",
490
490
  name: u.name || `(unnamed from sheet ${y || "<unnamed sheet>"})`,
@@ -492,8 +492,8 @@ function rt(e) {
492
492
  };
493
493
  return i.push(`Template ID ${u.id} is not found.`), n.importUpdateResult.push({
494
494
  type: "update",
495
- original: k,
496
- template: k,
495
+ original: C,
496
+ template: C,
497
497
  excelSheetName: y,
498
498
  errors: i
499
499
  }), n;
@@ -603,14 +603,14 @@ const ot = { class: "flex items-center gap-12 pl-8" }, at = { class: "flex flex-
603
603
  t.type === "create" ? (T(), w("span", lt, "(new)")) : Q("", !0)
604
604
  ], 2),
605
605
  t.errors.length ? (T(), w("div", ct, [
606
- O(o, { "z-index": 50 }, {
606
+ D(o, { "z-index": 50 }, {
607
607
  content: G(() => [
608
608
  $("ol", null, [
609
609
  (T(!0), w(U, null, V(t.errors, (c, u) => (T(), w("li", { key: u }, I(c), 1))), 128))
610
610
  ])
611
611
  ]),
612
612
  default: G(() => [
613
- O(l, {
613
+ D(l, {
614
614
  name: "error",
615
615
  size: "sm",
616
616
  color: "system-error-300"
@@ -648,7 +648,7 @@ const ot = { class: "flex items-center gap-12 pl-8" }, at = { class: "flex flex-
648
648
  }, gt = { class: "fm-typo-en-body-lg-600" }, bt = /* @__PURE__ */ ge({
649
649
  __name: "TransferTemplateImport",
650
650
  setup(e) {
651
- const t = C(null), s = Qe(), l = he(), o = C(!1), n = C(!1), y = te();
651
+ const t = k(null), s = Qe(), l = he(), o = k(!1), n = k(!1), y = te();
652
652
  Ve(async () => {
653
653
  n.value = !0;
654
654
  try {
@@ -663,7 +663,7 @@ const ot = { class: "flex items-center gap-12 pl-8" }, at = { class: "flex flex-
663
663
  n.value = !1;
664
664
  }
665
665
  });
666
- const i = C(new Array()), c = C([]), u = C([]), h = ce(
666
+ const i = k(new Array()), c = k([]), u = k([]), h = ce(
667
667
  () => !!i.value.length || c.value.some((x) => x.errors.length) || u.value.some((x) => x.errors.length)
668
668
  ), p = ce(
669
669
  () => !!c.value.length || !!u.value.length
@@ -716,14 +716,14 @@ const ot = { class: "flex items-center gap-12 pl-8" }, at = { class: "flex flex-
716
716
  r[2] || (r[2] = $("div", { class: "fm-typo-en-body-md-400" }, "Import transfer templates from excel sheets.", -1)),
717
717
  n.value ? (T(), w("div", ut, [
718
718
  $("div", null, [
719
- O(S, {
719
+ D(S, {
720
720
  size: "md",
721
721
  color: "neutral-gray-200"
722
722
  })
723
723
  ]),
724
724
  r[1] || (r[1] = $("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "Loading...", -1))
725
725
  ])) : (T(), w(U, { key: 1 }, [
726
- O(Pe, {
726
+ D(Pe, {
727
727
  class: L({
728
728
  "w-full": !0,
729
729
  "h-[200px]": !t.value
@@ -769,7 +769,7 @@ const ot = { class: "flex items-center gap-12 pl-8" }, at = { class: "flex flex-
769
769
  $("div", pt, I(t.value.name), 1)
770
770
  ], 2),
771
771
  o.value ? Q("", !0) : (T(), w("div", ft, [
772
- O(f, {
772
+ D(f, {
773
773
  label: R(m)("inventory.ingredient.import.replaceFile"),
774
774
  variant: h.value ? "destructive" : "secondary",
775
775
  "prepend-icon": h.value ? void 0 : "autorenew",
@@ -782,7 +782,7 @@ const ot = { class: "flex items-center gap-12 pl-8" }, at = { class: "flex flex-
782
782
  key: g,
783
783
  class: "flex gap-8 items-center"
784
784
  }, [
785
- O(_, {
785
+ D(_, {
786
786
  name: "error",
787
787
  size: "sm",
788
788
  color: "system-error-300"
@@ -823,7 +823,7 @@ const ot = { class: "flex items-center gap-12 pl-8" }, at = { class: "flex flex-
823
823
  });
824
824
  function xt(e) {
825
825
  var n, y;
826
- const t = J();
826
+ const t = X();
827
827
  if (!t.isEnabled) return !0;
828
828
  if (!e.internal) {
829
829
  const i = t.getNetSuiteVendor(e._id), c = i == null ? void 0 : i.subsidiaryId, u = (n = t.currentVendorSubsidiary(e._id)) == null ? void 0 : n.id;
@@ -833,7 +833,7 @@ function xt(e) {
833
833
  return l && l == o;
834
834
  }
835
835
  const St = ve("transferTemplateActions", () => {
836
- const e = He(), t = he(), s = z(), l = $e(), o = be(), n = J(), y = Ke(), { t: i } = ee(), c = C({});
836
+ const e = He(), t = he(), s = z(), l = $e(), o = be(), n = X(), y = Ke(), { t: i } = ee(), c = k({});
837
837
  function u() {
838
838
  c.value = {
839
839
  mode: ae.CREATE,
@@ -876,7 +876,7 @@ const St = ve("transferTemplateActions", () => {
876
876
  a.value = !0;
877
877
  const [g] = await Promise.allSettled([
878
878
  o.deleteTemplate(f),
879
- new Promise((k) => setTimeout(k, 1e3))
879
+ new Promise((C) => setTimeout(C, 1e3))
880
880
  ]);
881
881
  if (g.status === "rejected") throw g.reason;
882
882
  t.open({
@@ -894,7 +894,7 @@ const St = ve("transferTemplateActions", () => {
894
894
  }
895
895
  });
896
896
  }
897
- const m = C({});
897
+ const m = k({});
898
898
  function v(f) {
899
899
  m.value = {
900
900
  template: f,
@@ -911,8 +911,8 @@ const St = ve("transferTemplateActions", () => {
911
911
  const { promise: f, resolve: a } = Promise.withResolvers(), d = (b) => {
912
912
  a(b);
913
913
  }, g = l.templates.filter((b) => {
914
- var A, N;
915
- return ((A = b.purchaseOrder.supplier) == null ? void 0 : A._id) === s.currentLocation.doc._id ? !1 : (N = b.locations) != null && N.length ? b.locations.find((F) => F.doc._id === s.currentLocation.doc._id) : !0;
914
+ var N, A;
915
+ return ((N = b.purchaseOrder.supplier) == null ? void 0 : N._id) === s.currentLocation.doc._id ? !1 : (A = b.locations) != null && A.length ? b.locations.find((F) => F.doc._id === s.currentLocation.doc._id) : !0;
916
916
  });
917
917
  if (!g.length)
918
918
  return e.open({
@@ -929,24 +929,24 @@ const St = ve("transferTemplateActions", () => {
929
929
  }).onPrimary(() => {
930
930
  y.push({ name: se.TRANSFER_TEMPLATE }), d(void 0);
931
931
  }).onSecondary(() => d(void 0)).onClose(() => d(void 0)), f;
932
- const k = g.map((b) => {
932
+ const C = g.map((b) => {
933
933
  var ne;
934
- const A = !b.purchaseOrder.items.length || b.purchaseOrder.items.some(xe), N = !xt(b.purchaseOrder.supplier), F = b.purchaseOrder.supplier.internal ? n.getNetSuiteLocation(
934
+ const N = !b.purchaseOrder.items.length || b.purchaseOrder.items.some(xe), A = !xt(b.purchaseOrder.supplier), F = b.purchaseOrder.supplier.internal ? n.getNetSuiteLocation(
935
935
  `${b.purchaseOrder.supplier.internal}_${b.purchaseOrder.supplier._id}`
936
- ) : n.getNetSuiteVendor(b.purchaseOrder.supplier._id), we = N ? `The subsidiary of the request
937
- location is ${(ne = n.getLocationSubsidiary(F == null ? void 0 : F.netSuiteId)) == null ? void 0 : ne.fullName}.` : void 0, ke = A || N, Ce = A ? "This template is invalid. Update this template." : N ? we : void 0, Ee = `${b.purchaseOrder.supplier.internal ? "Transfer" : "Purchase"} from ${b.purchaseOrder.supplier.name}`;
936
+ ) : n.getNetSuiteVendor(b.purchaseOrder.supplier._id), we = A ? `The subsidiary of the request
937
+ location is ${(ne = n.getLocationSubsidiary(F == null ? void 0 : F.netSuiteId)) == null ? void 0 : ne.fullName}.` : void 0, Ce = N || A, ke = N ? "This template is invalid. Update this template." : A ? we : void 0, Ee = `${b.purchaseOrder.supplier.internal ? "Transfer" : "Purchase"} from ${b.purchaseOrder.supplier.name}`;
938
938
  return {
939
939
  label: b.name,
940
940
  value: b._id,
941
- disabled: ke,
942
- sublabel: Ce ?? Ee
941
+ disabled: Ce,
942
+ sublabel: ke ?? Ee
943
943
  };
944
944
  });
945
- return k.sort((b, A) => +!!b.disabled - +!!A.disabled), e.open({
945
+ return C.sort((b, N) => +!!b.disabled - +!!N.disabled), e.open({
946
946
  title: "Select one template",
947
947
  contentComponent: Ue,
948
948
  contentComponentProps: {
949
- items: k,
949
+ items: C,
950
950
  singleSelect: !0
951
951
  },
952
952
  primaryActions: {
@@ -1009,7 +1009,7 @@ const St = ve("transferTemplateActions", () => {
1009
1009
  return;
1010
1010
  }
1011
1011
  e.close(), S(f);
1012
- }).onTertiary(Ye);
1012
+ }).onTertiary(We);
1013
1013
  }
1014
1014
  async function S(f) {
1015
1015
  try {
@@ -1022,7 +1022,7 @@ const St = ve("transferTemplateActions", () => {
1022
1022
  )
1023
1023
  ], d = 100;
1024
1024
  let g = 0;
1025
- const k = () => {
1025
+ const C = () => {
1026
1026
  g += d, t.open({
1027
1027
  title: i("inventory.ingredient.import.progress", [
1028
1028
  Math.min(g, a.length),
@@ -1031,7 +1031,7 @@ const St = ve("transferTemplateActions", () => {
1031
1031
  });
1032
1032
  };
1033
1033
  for (const b of a.chunk(100))
1034
- k(), await o.importTemplates(b);
1034
+ C(), await o.importTemplates(b);
1035
1035
  t.open({
1036
1036
  title: i("inventory.ingredient.import.success"),
1037
1037
  type: "success"
@@ -1047,7 +1047,7 @@ const St = ve("transferTemplateActions", () => {
1047
1047
  }
1048
1048
  }
1049
1049
  function _() {
1050
- const f = We(l.templates);
1050
+ const f = Ye(l.templates);
1051
1051
  t.open({
1052
1052
  title: i("inventory.ingredient.export.success"),
1053
1053
  message: i("inventory.ingredient.export.filename", [f]),
@@ -1073,7 +1073,7 @@ function de(e) {
1073
1073
  const $e = ve(
1074
1074
  "transferTemplateTable",
1075
1075
  function() {
1076
- const { t } = ee(), s = St(), l = C(!1), o = C(new Array()), n = be(), y = H();
1076
+ const { t } = ee(), s = St(), l = k(!1), o = k(new Array()), n = be(), y = H();
1077
1077
  async function i() {
1078
1078
  o.value = [], l.value = !0;
1079
1079
  try {
@@ -1104,11 +1104,11 @@ const $e = ve(
1104
1104
  }
1105
1105
  function u(p, m) {
1106
1106
  switch (m = Z(m), p) {
1107
- case D.Details:
1107
+ case O.Details:
1108
1108
  return s.viewTemplate(m);
1109
- case D.Edit:
1109
+ case O.Edit:
1110
1110
  return s.updateTemplate(m);
1111
- case D.Delete:
1111
+ case O.Delete:
1112
1112
  return s.deleteTemplate(m, l, i);
1113
1113
  }
1114
1114
  }
@@ -1141,8 +1141,8 @@ const $e = ve(
1141
1141
  },
1142
1142
  cell(p) {
1143
1143
  const m = Number(p.getValue()) || 0, v = p.row.original.purchaseOrder.items.some(xe);
1144
- return m === 0 || v ? Y("div", { class: "flex justify-end gap-4 items-center" }, [
1145
- Y(
1144
+ return m === 0 || v ? W("div", { class: "flex justify-end gap-4 items-center" }, [
1145
+ W(
1146
1146
  le.FmTooltip,
1147
1147
  {},
1148
1148
  {
@@ -1150,7 +1150,7 @@ const $e = ve(
1150
1150
  return v ? "The template is invalid due to invalid unit on some of the items. Please update this template." : "The template is invalid due to deleted ingredients. Please update this template.";
1151
1151
  },
1152
1152
  default() {
1153
- return Y(le.FmIcon, {
1153
+ return W(le.FmIcon, {
1154
1154
  name: "error",
1155
1155
  color: "system-error-300",
1156
1156
  size: "sm"
@@ -1188,9 +1188,9 @@ const $e = ve(
1188
1188
  id: "action",
1189
1189
  cell(p) {
1190
1190
  const m = p.row.original, v = [
1191
- W[D.Details],
1192
- W[D.Edit],
1193
- W[D.Delete]
1191
+ Y[O.Details],
1192
+ Y[O.Edit],
1193
+ Y[O.Delete]
1194
1194
  ];
1195
1195
  return Le(v, (x) => u(x, m));
1196
1196
  },
@@ -1,7 +1,8 @@
1
1
  import { ref as f, computed as l } from "vue";
2
- import { u as g, aP as b, aJ as v, c as d, b as S } from "./app-Ch3IXeOL.js";
3
- import { useSnackbar as p } from "@feedmepos/ui-library";
2
+ import { u as g, aO as b, aI as v, b as p } from "./app-BkIAyhP-.js";
3
+ import { useSnackbar as S } from "@feedmepos/ui-library";
4
4
  import "@feedmepos/mf-common";
5
+ import { u as d } from "./feature-CCDDWpq8.js";
5
6
  function h() {
6
7
  return {
7
8
  setting: {
@@ -52,7 +53,7 @@ function E() {
52
53
  }));
53
54
  s.value.categories = r, s.value.setting = await n.readSetting();
54
55
  } catch (o) {
55
- p().open({
56
+ S().open({
56
57
  title: "Something went wrong",
57
58
  message: "Cannot fetch integration info. Please try again.",
58
59
  type: "error"
@@ -93,8 +94,8 @@ function x() {
93
94
  }
94
95
  };
95
96
  }
96
- function F() {
97
- const n = S(), a = E(), e = x(), t = l(() => n.isEnabled), i = l(() => a.isEnabled), o = l(() => e.isEnabled);
97
+ function L() {
98
+ const n = p(), a = E(), e = x(), t = l(() => n.isEnabled), i = l(() => a.isEnabled), o = l(() => e.isEnabled);
98
99
  return {
99
100
  get enabledIntegrations() {
100
101
  return [t.value, i.value, o.value].filter((r) => r).length;
@@ -121,5 +122,5 @@ function F() {
121
122
  export {
122
123
  E as a,
123
124
  x as b,
124
- F as u
125
+ L as u
125
126
  };
@@ -1,4 +1,4 @@
1
- import { aO as L, aU as U, aV as q, aW as Fe, aX as tl, aY as ar, aZ as Nt } from "./app-Ch3IXeOL.js";
1
+ import { aN as L, aU as U, aV as q, aW as Fe, aX as tl, aQ as ar, aY as Nt } from "./app-BkIAyhP-.js";
2
2
  function rl(t, e) {
3
3
  for (var r = 0; r < e.length; r++) {
4
4
  const n = e[r];
@@ -1,9 +1,9 @@
1
- import { Y as m, u as B, a as l, ak as k, L as p } from "./app-Ch3IXeOL.js";
1
+ import { X as m, u as B, a as l, aj as k, K as p } from "./app-BkIAyhP-.js";
2
2
  import { useCoreStore as v } from "@feedmepos/mf-common";
3
3
  import { useSnackbar as $ } from "@feedmepos/ui-library";
4
4
  import { ref as y, computed as S } from "vue";
5
- const b = m((r, a) => {
6
- const c = B(), o = v(), u = $();
5
+ const g = m((s, a) => {
6
+ const r = B(), o = v(), u = $();
7
7
  return a.onError(async (t) => {
8
8
  t.name === "SvcForbiddenError" && (u == null || u.open({
9
9
  title: t.title,
@@ -12,55 +12,59 @@ const b = m((r, a) => {
12
12
  }));
13
13
  }), {
14
14
  async readStockBalance() {
15
- const t = c.currentLocationDBName, e = `${r.inventoryBackendUrl}/${t}/stock-balance`;
15
+ const t = r.currentLocationDBName, e = `${s.inventoryBackendUrl}/${t}/stock-balance`;
16
16
  return await a.get(e);
17
17
  },
18
18
  async readSkuBalance() {
19
- var s;
20
- const t = c.currentLocationDBName, e = `${r.inventoryBackendUrl}/${t}/sku/balance`;
21
- return (((s = o.currentBusiness.value) == null ? void 0 : s.menuVersion) ?? "") === "v3" ? await a.get(e) : await a.get(`${e}?useInventoryDoc=true`);
19
+ var c;
20
+ const t = r.currentLocationDBName, e = `${s.inventoryBackendUrl}/${t}/sku/balance`;
21
+ return (((c = o.currentBusiness.value) == null ? void 0 : c.menuVersion) ?? "") === "v3" ? await a.get(e) : await a.get(`${e}?useInventoryDoc=true`);
22
22
  },
23
23
  async readSingleAdjustment(t) {
24
- const e = c.currentLocationDBName, n = `${r.inventoryBackendUrl}/${e}/adjustment`;
24
+ const e = r.currentLocationDBName, n = `${s.inventoryBackendUrl}/${e}/adjustment`;
25
25
  return await a.get(`${n}?adjustmentId=${t}`);
26
26
  },
27
27
  async readStockAdjustment(t, e, n) {
28
- const s = c.currentLocationDBName, i = `${r.inventoryBackendUrl}/${s}/sku`;
28
+ const c = r.currentLocationDBName, i = `${s.inventoryBackendUrl}/${c}/sku`;
29
29
  return await a.get(`${i}?skuId=${t}&start=${e}&end=${n}`);
30
30
  },
31
31
  async readAdjustmentById(t) {
32
- const e = c.currentLocationDBName, n = `${r.inventoryBackendUrl}/${e}/adjustment`;
32
+ const e = r.currentLocationDBName, n = `${s.inventoryBackendUrl}/${e}/adjustment`;
33
33
  return await a.get(`${n}?adjustmentId=${t}`);
34
34
  },
35
35
  async convertSku(t) {
36
36
  var i;
37
- const e = c.currentLocationDBName, n = `${r.inventoryBackendUrl}/${e}/sku/convert`;
37
+ const e = r.currentLocationDBName, n = `${s.inventoryBackendUrl}/${e}/sku/convert`;
38
38
  return (((i = o.currentBusiness.value) == null ? void 0 : i.menuVersion) ?? "") === "v3" ? await a.post(n, t) : await a.post(`${n}?useInventoryDoc=true`, t);
39
39
  },
40
40
  async adjustSku(t) {
41
41
  var i;
42
- const e = c.currentLocationDBName, n = `${r.inventoryBackendUrl}/${e}/sku/adjust`;
42
+ const e = r.currentLocationDBName, n = `${s.inventoryBackendUrl}/${e}/sku/adjust`;
43
43
  return (((i = o.currentBusiness.value) == null ? void 0 : i.menuVersion) ?? "") === "v3" ? await a.post(n, t) : await a.post(`${n}?useInventoryDoc=true`, t);
44
44
  },
45
45
  recalculation: {
46
46
  getRecalculateAbility() {
47
- var s;
48
- const e = `business_${(s = o.currentBusiness.value) == null ? void 0 : s._id}`, n = `${r.inventoryBackendUrl}/${e}/stock/operations/recalculate`;
47
+ var c;
48
+ const e = `business_${(c = o.currentBusiness.value) == null ? void 0 : c._id}`, n = `${s.inventoryBackendUrl}/${e}/stock/operations/recalculate`;
49
49
  return a.get(n);
50
50
  },
51
51
  startRecalculateTask() {
52
- var s;
53
- const e = `business_${(s = o.currentBusiness.value) == null ? void 0 : s._id}`, n = `${r.inventoryBackendUrl}/${e}/stock/operations/recalculate?refundFromPreviousAdjustment=true`;
52
+ var c;
53
+ const e = `business_${(c = o.currentBusiness.value) == null ? void 0 : c._id}`, n = `${s.inventoryBackendUrl}/${e}/stock/operations/recalculate?refundFromPreviousAdjustment=true`;
54
54
  return a.post(n);
55
55
  },
56
56
  calculateStockSnapshotAtDate(t, e) {
57
- const n = c.currentLocationDBName, s = `${r.inventoryBackendUrl}/${n}/stock/operations/recalculate/calculate-at-date?effectiveAt=${encodeURIComponent(t)}&closingDraftId=${encodeURIComponent(e)}`;
58
- return a.get(s);
57
+ const n = r.currentLocationDBName, c = `${s.inventoryBackendUrl}/${n}/stock/operations/recalculate/calculate-at-date?effectiveAt=${encodeURIComponent(t)}&closingDraftId=${encodeURIComponent(e)}`;
58
+ return a.get(c);
59
+ },
60
+ scheduleCalculateStockSnapshotAtDate(t, e) {
61
+ const n = r.currentLocationDBName, c = `${s.inventoryBackendUrl}/${n}/stock/operations/recalculate/schedule/calculate-at-date?effectiveAt=${encodeURIComponent(t)}&closingDraftId=${encodeURIComponent(e)}`;
62
+ return a.get(c);
59
63
  }
60
64
  }
61
65
  };
62
66
  });
63
- function g() {
67
+ function b() {
64
68
  return {
65
69
  stockBalance: {
66
70
  _id: "",
@@ -74,15 +78,15 @@ const f = p(0), N = {
74
78
  balance: f,
75
79
  closing: null,
76
80
  costs: null
77
- }, d = y(g()), A = () => {
78
- const r = l(), a = S(() => {
81
+ }, d = y(b()), A = () => {
82
+ const s = l(), a = S(() => {
79
83
  var t;
80
84
  const o = (t = d.value.stockBalance.skus) == null ? void 0 : t.groupBy((e) => e.id), u = (e) => {
81
85
  var n;
82
86
  return ((n = o == null ? void 0 : o.get(e)) == null ? void 0 : n[0]) ?? { ...N, id: e };
83
87
  };
84
- return r.skus.map((e) => u(e._id));
85
- }), c = b();
88
+ return s.skus.map((e) => u(e._id));
89
+ }), r = g();
86
90
  return {
87
91
  // state
88
92
  get stockBalance() {
@@ -102,7 +106,7 @@ const f = p(0), N = {
102
106
  },
103
107
  // actions
104
108
  async readStockBalance() {
105
- this.stockBalance = await c.readStockBalance();
109
+ this.stockBalance = await r.readStockBalance();
106
110
  },
107
111
  async readProductBalance() {
108
112
  this.productBalance = [];
@@ -128,6 +132,6 @@ const f = p(0), N = {
128
132
  };
129
133
  };
130
134
  export {
131
- b as a,
135
+ g as a,
132
136
  A as u
133
137
  };
@@ -1,23 +1,4 @@
1
- /** NOTE: for consistency, keep the key and value names the same with flagsmith value*/
2
- export declare enum InventoryFeature {
3
- inventory_portal_must_use_transfer_template = "inventory_portal_must_use_transfer_template",
4
- inventory_portal_use_iframe = "inventory_portal_use_iframe",
5
- inventory_pos_adjust_v1 = "inventory_pos_adjust_v1",
6
- inventory_pos_adjust_v2_wastage = "inventory_pos_adjust_v2_wastage",
7
- inventory_pos_closing_recalculation = "inventory_pos_closing_recalculation",
8
- inventory_pos_closing_v1 = "inventory_pos_closing_v1",
9
- inventory_pos_closing_v2 = "inventory_pos_closing_v2",
10
- inventory_pos_convert_v1 = "inventory_pos_convert_v1",
11
- inventory_pos_costing = "inventory_pos_costing",
12
- inventory_pos_stock_return = "inventory_pos_stock_return",
13
- inventory_pos_transfer_require_fulfillment = "inventory_pos_transfer_require_fulfillment",
14
- inventory_purchase_order_approval = "inventory_purchase_order_approval",
15
- inventory_portal_xilnex_transfer_note = "inventory_portal_xilnex_transfer_note",
16
- inventory_portal_custom_attribute = "inventory_portal_custom_attribute",
17
- inventory_portal_purchase_order_v2 = "inventory_portal_purchase_order_v2",
18
- inventory_portal_accept_require_fulfillment = "inventory_portal_accept_require_fulfillment",
19
- inventory_xilnex_opening_migration = "inventory_xilnex_opening_migration"
20
- }
1
+ export { InventoryFeatureFlags } from '@feedmepos/inventory-core-2';
21
2
  export interface FeatureState {
22
3
  enableTotalCost: boolean;
23
4
  enableBackdatePo: boolean;
@@ -31,11 +12,13 @@ export interface FeatureState {
31
12
  enableIngredientGroup: boolean;
32
13
  mustUsePoTemplate: boolean;
33
14
  mustUseDefaultCost?: boolean;
15
+ enableSupplierMasterList: boolean;
34
16
  businessSupplierOnly: boolean;
35
17
  enableXilnexTransferNote: boolean;
36
18
  enableCustomAttribute: boolean;
37
19
  usePurchaseOrderV2: boolean;
38
20
  acceptRequireFulfillment?: boolean;
21
+ useOperatePurchaseOrderV2: boolean;
39
22
  inventory_xilnex_opening_migration: boolean;
40
23
  }
41
24
  export declare const useFeatureStore: () => {
@@ -53,11 +36,13 @@ export declare const useFeatureStore: () => {
53
36
  readonly enableWastageTemplate: boolean;
54
37
  readonly enableIngredientGroup: boolean;
55
38
  readonly mustUsePoTemplate: boolean;
39
+ readonly enableSupplierMasterList: boolean;
56
40
  readonly businessSupplierOnly: boolean;
57
41
  readonly enableXilnexTransferNote: boolean;
58
42
  readonly enabledXilnexOpeningMigration: boolean;
59
43
  readonly enableCustomAttribute: boolean;
60
44
  readonly usePurchaseOrderV2: boolean;
61
45
  readonly acceptRequireFulfillment: boolean | undefined;
46
+ readonly useOperatePurchaseOrderV2: boolean;
62
47
  init(): Promise<void>;
63
48
  };
@@ -17,8 +17,8 @@ export declare function useFMHStore(): {
17
17
  enable: boolean;
18
18
  bindings: {
19
19
  combinationKey?: string | null | undefined;
20
- code: string;
21
20
  productId: string;
21
+ code: string;
22
22
  }[];
23
23
  modifiers: {
24
24
  code: string;
@@ -26,19 +26,19 @@ export declare function useNetSuiteStore(): {
26
26
  subsidiaryIds: string[];
27
27
  includeChildren: boolean;
28
28
  }[];
29
- locations: {
30
- type: "restaurant" | "warehouse";
31
- id: string;
32
- name: string;
33
- netSuiteId: string;
34
- subsidiaryId: string;
35
- }[];
36
29
  syncedAt?: string | null | undefined;
37
30
  restlet?: {
38
31
  type: "createItemReceipt" | "retrieveRecordInfo";
39
32
  scriptId: string;
40
33
  deploymentId: string;
41
34
  }[] | null | undefined;
35
+ locations: {
36
+ id: string;
37
+ name: string;
38
+ type: "restaurant" | "warehouse";
39
+ netSuiteId: string;
40
+ subsidiaryId: string;
41
+ }[];
42
42
  childItems: {
43
43
  externalId?: string | null | undefined;
44
44
  cogsAccount?: {