@feedmepos/mf-inventory-portal 0.0.23-dev.9 → 0.0.24-dev.1

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 (140) hide show
  1. package/dist/App-D3sNH2MR.js +276 -0
  2. package/dist/{ApprovalView-e85YmdZN.js → ApprovalView-DHnRx0hJ.js} +17 -20
  3. package/dist/{BindingsDialog-giBUD0IH.js → BindingsDialog-oTeg2Dai.js} +6 -6
  4. package/dist/{BindingsPicker-CC4MmPbF.js → BindingsPicker-CWdjmMJ3.js} +8 -9
  5. package/dist/{BindingsTable-WphZdzrA.js → BindingsTable-bKLR1OKX.js} +18 -22
  6. package/dist/ClosingDraftView-CIQVz7lY.js +1225 -0
  7. package/dist/{ClosingTemplateView-1lzoDyet.js → ClosingTemplateView-D5pLzQwU.js} +259 -274
  8. package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-ClLDcchC.js +142 -0
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Cv-vvzr5.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B_c6Vn6P.js} +23 -24
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DIFQcrc0.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DhpHOaRH.js} +50 -51
  11. package/dist/{IngredientGroupView-UegBM_JK.js → IngredientGroupView-4C437mso.js} +63 -70
  12. package/dist/IngredientsView-DoiGgjre.js +1706 -0
  13. package/dist/{IntegrationView-FYNNzKia.js → IntegrationView-8ZKE7MAM.js} +123 -126
  14. package/dist/{InventoryBindingForm-DsHv_IHG.js → InventoryBindingForm-CcnfliYQ.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BURSXafS.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-B_J-6C9x.js} +116 -108
  16. package/dist/{InventoryBindingSummary-BLb4MRPZ.js → InventoryBindingSummary-CRdHCzNE.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BG78-DHs.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B2-TypU0.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CqID5_7v.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BuQde75S.js} +20 -21
  19. package/dist/PublishView-t5gjGmK_.js +192 -0
  20. package/dist/{PurchaseOrderPrintPreview-BBMU3teq.js → PurchaseOrderPrintPreview-6i53Y-v1.js} +13 -14
  21. package/dist/ReceiveRequestView-uOeSh0Mr.js +1866 -0
  22. package/dist/RecipeView-BTWywckD.js +609 -0
  23. package/dist/StockView-DN2xk8ei.js +1817 -0
  24. package/dist/{SupplierView-B2aObtwK.js → SupplierView-l0XUg3J4.js} +185 -196
  25. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CWMn6fFf.js +1327 -0
  26. package/dist/TransferTemplateView-wDKXpCWZ.js +1263 -0
  27. package/dist/UnitView-CUI-k-tS.js +648 -0
  28. package/dist/{WarehouseView-G8pej6Y2.js → WarehouseView-WsI_eG5r.js} +190 -197
  29. package/dist/api/adjustment-template.d.ts +25 -0
  30. package/dist/api/bill.d.ts +240 -84
  31. package/dist/api/inventory.d.ts +19 -6
  32. package/dist/api/netsuite.d.ts +3 -3
  33. package/dist/app-DntcWR3_.js +85558 -0
  34. package/dist/app.d.ts +85 -0
  35. package/dist/app.js +2 -2
  36. package/dist/components/FmCustomAttribute.vue.d.ts +23 -0
  37. package/dist/components/FmLockableField.vue.d.ts +37 -0
  38. package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
  39. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +3 -1
  40. package/dist/components/shell/inventory/binding-ui.vue.d.ts +3 -1
  41. package/dist/composable/defineDeepModel.d.ts +1 -1
  42. package/dist/{decimal-DC07xoJW.js → decimal-DTCTnMwO.js} +1 -1
  43. package/dist/format-unit-display-Hy48Iw5j.js +1215 -0
  44. package/dist/index-Bv9RYyTZ.js +29202 -0
  45. package/dist/{StockView-C5btudss.js → index-D4yJP9I2.js} +2220 -3863
  46. package/dist/layout/SingleColumnLayout.vue.d.ts +1 -0
  47. package/dist/router/name.d.ts +2 -0
  48. package/dist/stock-BsdmfT-b.js +125 -0
  49. package/dist/stores/feature.d.ts +41 -1
  50. package/dist/stores/integration/netsuite.d.ts +3 -2
  51. package/dist/stores/inventory.d.ts +20 -8
  52. package/dist/stores/location.d.ts +29 -1
  53. package/dist/stores/supplier.d.ts +1 -1
  54. package/dist/style.css +1 -1
  55. package/dist/supplier-CXhkgC4M.js +77 -0
  56. package/dist/tsconfig.app.tsbuildinfo +1 -1
  57. package/dist/{use-inventory-binding-dialog-B0G2XYSw.js → use-inventory-binding-dialog-DPMJmBCr.js} +10 -11
  58. package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +2 -0
  59. package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +18 -0
  60. package/dist/views/adjustment-template/import/export.d.ts +60 -0
  61. package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
  62. package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
  63. package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
  64. package/dist/views/adjustment-template/wastage-template/WastageTemplateReason.vue.d.ts +18 -0
  65. package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
  66. package/dist/views/adjustment-template/wastage-template/actions.d.ts +1377 -0
  67. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
  68. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
  69. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
  70. package/dist/views/adjustment-template/wastage-template/props.d.ts +36 -0
  71. package/dist/views/adjustment-template/wastage-template/table.d.ts +1351 -0
  72. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +198 -12
  73. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +7 -4
  74. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +1559 -467
  75. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +19 -0
  76. package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +4 -0
  77. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +2 -1
  78. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +72 -12
  79. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +73 -13
  80. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +6 -3
  81. package/dist/views/ingredients/components/convert/ConvertFormProps.d.ts +1 -0
  82. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -2
  83. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +1 -0
  84. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +2 -1
  85. package/dist/views/publish/PublishView.vue.d.ts +2 -0
  86. package/dist/views/receive-request/components/netsuite/NetSuiteInfo.vue.d.ts +12 -0
  87. package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +13 -0
  88. package/dist/views/receive-request/components/netsuite/NetSuiteSync.vue.d.ts +12 -0
  89. package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +13 -0
  90. package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
  91. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +86 -17
  92. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +4 -2
  93. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +2 -1
  94. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +126 -24
  95. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +126 -24
  96. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -0
  97. package/dist/views/stock/components/StockRecordCard.vue.d.ts +120 -42
  98. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +6 -4
  99. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  100. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +4 -0
  101. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +2 -1
  102. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +72 -12
  103. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +72 -12
  104. package/dist/views/transfer-template/helpers/import-export.helper.d.ts +2 -1
  105. package/dist/vue-i18n-ByVzHsI7.js +2365 -0
  106. package/package.json +5 -4
  107. package/dist/App-ByLgARNp.js +0 -259
  108. package/dist/ClosingDraftView-CQM1Sx45.js +0 -755
  109. package/dist/FmDroppableField-8RzKjEdL.js +0 -154
  110. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BvkN-71q.js +0 -436
  111. package/dist/FmMultiselectDialog-DScMA6iG.js +0 -415
  112. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-t4pim_k9.js +0 -51
  113. package/dist/IngredientsView-BfW-jZLM.js +0 -1666
  114. package/dist/ReceiveRequestView-vbANEzne.js +0 -4165
  115. package/dist/RecipeView-DW4DY0C0.js +0 -598
  116. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
  117. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-B2LOvVef.js +0 -1229
  118. package/dist/TransferTemplateView-BKumN_p6.js +0 -1262
  119. package/dist/UnitView-CHLucv9s.js +0 -648
  120. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  121. package/dist/app-BXjk74IB.js +0 -33538
  122. package/dist/date2-CWAt9bRf.js +0 -117
  123. package/dist/dayjs.min-D3jPOnu6.js +0 -282
  124. package/dist/defineDeepModel-CiD4GtOw.js +0 -13
  125. package/dist/feature-6tcLMotY.js +0 -92
  126. package/dist/form-mode.enum-BKiNVH6A.js +0 -4
  127. package/dist/format-time-from-id-CYU5Z9Mt.js +0 -15
  128. package/dist/format-unit-display-CY-0bznr.js +0 -1217
  129. package/dist/fuzzy-BMkhNYLR.js +0 -41
  130. package/dist/index-BXwQa14X.js +0 -45
  131. package/dist/index-CRLd5xyg.js +0 -22283
  132. package/dist/index-DqwAtOgI.js +0 -12087
  133. package/dist/netsuite-fYUUk_ss.js +0 -225
  134. package/dist/row-action.enum-7rGLGZ5v.js +0 -55
  135. package/dist/rules-BmRGm3yv.js +0 -203
  136. package/dist/stock-CEX0DP2B.js +0 -111
  137. package/dist/supplier-CdJmZr7w.js +0 -77
  138. package/dist/use-template-enabled-locations-2-xbPJWHCs.js +0 -86
  139. package/dist/xlsx-CTOKp7SQ.js +0 -24004
  140. package/dist/xlsx.util-D5NFSfDg.js +0 -78
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-BURSXafS.js";
1
+ import { _ as f } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-B_J-6C9x.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,20 +1,24 @@
1
- import { defineComponent as J, computed as y, reactive as Q, resolveComponent as g, openBlock as f, createElementBlock as x, createVNode as m, createElementVNode as n, toDisplayString as v, unref as l, Fragment as C, renderList as A, createBlock as R, withCtx as S, createCommentVNode as T, nextTick as X } from "vue";
2
- import { a as Z, K as ee, F as ne } from "./app-BXjk74IB.js";
3
- import { a as h, q as oe, d as N, c as te } from "./rules-BmRGm3yv.js";
4
- import { u as ie } from "./use-inventory-binding-dialog-B0G2XYSw.js";
5
- import { f as le } from "./index-CRLd5xyg.js";
6
- import { _ as se, c as re, d as de } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DIFQcrc0.js";
1
+ import { defineComponent as J, computed as _, reactive as Q, resolveComponent as x, openBlock as m, createElementBlock as y, createVNode as c, createElementVNode as n, toDisplayString as v, unref as i, createBlock as V, createCommentVNode as g, Fragment as R, renderList as N, withCtx as S, nextTick as X } from "vue";
2
+ import { a as Z, aM as ee, aN as ne, j as B, aO as oe, N as T, L as te, F as le } from "./app-DntcWR3_.js";
3
+ import { u as ie } from "./use-inventory-binding-dialog-DPMJmBCr.js";
4
+ import { _ as se, c as re, d as de } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DhpHOaRH.js";
7
5
  import { useI18n as ae } from "@feedmepos/mf-common";
8
- const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-16" }, ce = { class: "flex items-center" }, pe = { class: "flex-1 fm-typo-en-title-sm-600" }, fe = { class: "flex flex-col" }, ve = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, ye = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _e = {
6
+ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-16" }, ce = { class: "flex items-center" }, pe = { class: "flex-1 fm-typo-en-title-sm-600" }, fe = { class: "flex flex-col" }, ye = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, ve = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _e = {
9
7
  class: "flex items-center w-full border-b border-fm-color-neutral-gray-100",
10
8
  style: { "min-height": "48px" }
11
- }, ge = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, xe = { class: "flex flex-col" }, be = {
9
+ }, ge = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, be = { class: "flex flex-col" }, xe = {
12
10
  key: 0,
13
11
  class: "flex gap-4 text-fm-color-system-error-300 fm-typo-en-body-sm-400"
14
- }, he = { class: "w-[200px]" }, Ve = { class: "w-[52px]" }, Be = { class: "flex flex-col gap-16" }, ke = { class: "flex items-center" }, Fe = { class: "flex-1 fm-typo-en-title-sm-600" }, Ie = { class: "flex flex-col" }, we = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, Ue = { class: "flex-1 fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Ee = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary w-[150px] px-16" }, Ce = {
12
+ }, he = { class: "w-[200px]" }, Ve = {
13
+ key: 0,
14
+ class: "w-[52px]"
15
+ }, Be = { class: "flex flex-col gap-16" }, ke = { class: "flex items-center" }, Fe = { class: "flex-1 fm-typo-en-title-sm-600" }, Ie = { class: "flex flex-col" }, we = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, Ue = { class: "flex-1 fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Ee = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary w-[150px] px-16" }, Ce = {
15
16
  class: "flex items-center w-full",
16
17
  style: { "min-height": "48px" }
17
- }, Ae = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, Re = { class: "line-clamp-1" }, Se = { class: "w-[150px]" }, Te = { class: "w-[52px]" }, Ne = { class: "flex flex-col px-12 pb-4" }, je = /* @__PURE__ */ J({
18
+ }, Ae = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, Re = { class: "line-clamp-1" }, Ne = { class: "w-[150px]" }, Se = {
19
+ key: 0,
20
+ class: "w-[52px]"
21
+ }, Te = { class: "flex flex-col px-12 pb-4" }, je = /* @__PURE__ */ J({
18
22
  __name: "InventoryBindingForm",
19
23
  props: {
20
24
  id: {},
@@ -22,43 +26,44 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
22
26
  excludeBindingId: {},
23
27
  rules: {},
24
28
  iframeMode: { type: Boolean },
25
- disabled: { type: Boolean }
29
+ disabled: { type: Boolean },
30
+ readonly: { type: Boolean }
26
31
  },
27
32
  emits: ["update:modelValue", "click:pick-inventory-bindings"],
28
- setup(P, { emit: M }) {
29
- const { t: c } = ae(), B = Z(), k = y(() => B.inventory.recipe ?? []), b = y(() => B.inventory.sku ?? []), s = P, p = M, F = y(() => le({
33
+ setup(M, { emit: P }) {
34
+ const { t: p } = ae(), F = Z(), I = _(() => F.inventory.recipe ?? []), h = _(() => F.inventory.sku ?? []), s = M, f = P, w = _(() => ee({
30
35
  bindings: s.modelValue,
31
- recipes: k.value.map((t) => t._id === s.id ? {
36
+ recipes: I.value.map((t) => t._id === s.id ? {
32
37
  ...t,
33
38
  contains: s.modelValue
34
39
  } : t),
35
- skus: b.value
36
- }).inventoryBindings.filter((t) => t.error).filter((t) => t.reason === ee.enum.circularDependency)), K = y(
37
- () => new Set(F.value.map((e) => {
40
+ skus: h.value
41
+ }).inventoryBindings.filter((t) => t.error).filter((t) => t.reason === ne.enum.circularDependency)), D = _(
42
+ () => new Set(w.value.map((e) => {
38
43
  var o;
39
44
  return (o = e.bindingPaths[0]) == null ? void 0 : o.id;
40
45
  }))
41
- ), D = y(() => s.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: $, promptRecipesBinding: z } = ie();
42
- async function G() {
46
+ ), K = _(() => s.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: $, promptRecipesBinding: j } = ie();
47
+ async function z() {
43
48
  if (s.iframeMode) {
44
- p("click:pick-inventory-bindings", "RECIPE");
49
+ f("click:pick-inventory-bindings", "RECIPE");
45
50
  return;
46
51
  }
47
- z(
52
+ j(
48
53
  s.modelValue,
49
- (e) => p("update:modelValue", e),
54
+ (e) => f("update:modelValue", e),
50
55
  s.id ? [s.id] : []
51
56
  );
52
57
  }
53
- const I = y(() => s.modelValue.filter((e) => e.type === "SKU") ?? []);
54
- async function j() {
58
+ const U = _(() => s.modelValue.filter((e) => e.type === "SKU") ?? []);
59
+ async function G() {
55
60
  if (s.iframeMode) {
56
- p("click:pick-inventory-bindings", "SKU");
61
+ f("click:pick-inventory-bindings", "SKU");
57
62
  return;
58
63
  }
59
64
  $(
60
65
  s.modelValue,
61
- (e) => p("update:modelValue", e),
66
+ (e) => f("update:modelValue", e),
62
67
  s.excludeBindingId,
63
68
  s.id ? [s.id] : []
64
69
  );
@@ -66,44 +71,44 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
66
71
  function L(e, o, t) {
67
72
  const r = +o;
68
73
  let d = t;
69
- o.length > 0 && isFinite(r) ? d = t.map((a) => (a.id !== e || (a.amount = te(r)), a)) : d = t.map((a) => (a.id !== e || (a.amount = { amount: 0, precision: 0 }), a)), p("update:modelValue", d);
74
+ o.length > 0 && isFinite(r) ? d = t.map((a) => (a.id !== e || (a.amount = te(r)), a)) : d = t.map((a) => (a.id !== e || (a.amount = { amount: 0, precision: 0 }), a)), f("update:modelValue", d);
70
75
  }
71
- function w(e, o) {
76
+ function E(e, o) {
72
77
  const t = o.filter((r) => r.id !== e);
73
- p("update:modelValue", t);
78
+ f("update:modelValue", t);
74
79
  }
75
- function U(e) {
80
+ function C(e) {
76
81
  var t, r;
77
- if (e.type !== ne.enum.SKU)
82
+ if (e.type !== le.enum.SKU)
78
83
  throw new Error("Non-SKU binding does not have unit");
79
- if (!((t = b.value.find((d) => d._id === e.id)) == null ? void 0 : t.unit))
84
+ if (!((t = h.value.find((d) => d._id === e.id)) == null ? void 0 : t.unit))
80
85
  throw new Error(`Cannot find ingredient: ${e.id}`);
81
- return (r = b.value.find((d) => d._id === e.id)) == null ? void 0 : r.unit;
86
+ return (r = h.value.find((d) => d._id === e.id)) == null ? void 0 : r.unit;
82
87
  }
83
- function Y(e) {
88
+ function O(e) {
84
89
  return { amount: e.amount, measurement: e.measurement };
85
90
  }
86
- function q(e, o, t) {
91
+ function Y(e, o, t) {
87
92
  const r = t.map((d) => d.id !== e ? d : {
88
93
  ...d,
89
94
  amount: o.amount,
90
95
  measurement: o.measurement
91
96
  });
92
- p("update:modelValue", r);
97
+ f("update:modelValue", r);
93
98
  }
94
- const E = Q({});
95
- function O(e) {
96
- return E[e.id] ?? {
99
+ const A = Q({});
100
+ function W(e) {
101
+ return A[e.id] ?? {
97
102
  modelValue: {
98
103
  amount: e.amount,
99
104
  measurement: e.measurement
100
105
  },
101
- amountAsString: h(e.amount)
106
+ amountAsString: B(e.amount)
102
107
  };
103
108
  }
104
- function W(e, o) {
109
+ function q(e, o) {
105
110
  X(() => {
106
- E[e.id] = {
111
+ A[e.id] = {
107
112
  modelValue: {
108
113
  amount: e.amount,
109
114
  measurement: e.measurement
@@ -113,73 +118,74 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
113
118
  });
114
119
  }
115
120
  return (e, o) => {
116
- const t = g("FmFormGroup"), r = g("FmButton"), d = g("FmIcon"), a = g("FmTextField"), H = g("FmTooltip");
117
- return f(), x("div", ue, [
118
- m(t, {
121
+ const t = x("FmFormGroup"), r = x("FmButton"), d = x("FmIcon"), a = x("FmTextField"), H = x("FmTooltip");
122
+ return m(), y("div", ue, [
123
+ c(t, {
119
124
  disabled: e.disabled,
120
125
  "model-value": e.modelValue,
121
126
  rules: e.rules
122
127
  }, null, 8, ["disabled", "model-value", "rules"]),
123
128
  n("div", me, [
124
129
  n("div", ce, [
125
- n("div", pe, v(l(c)("inventory.inventoryBindings.recipe")), 1),
126
- m(r, {
130
+ n("div", pe, v(i(p)("inventory.inventoryBindings.recipe")), 1),
131
+ e.readonly ? g("", !0) : (m(), V(r, {
132
+ key: 0,
127
133
  variant: "secondary",
128
134
  "text-color": "primary",
129
135
  "border-color": "primary",
130
- label: l(c)("inventory.inventoryBindings.linkRecipe"),
136
+ label: i(p)("inventory.inventoryBindings.linkRecipe"),
131
137
  "prepend-icon": "link",
132
- onClick: G
133
- }, null, 8, ["label"])
138
+ onClick: z
139
+ }, null, 8, ["label"]))
134
140
  ]),
135
141
  n("div", fe, [
136
- n("div", ve, [
137
- n("div", ye, v(l(c)("inventory.inventoryBindings.recipe")), 1),
142
+ n("div", ye, [
143
+ n("div", ve, v(i(p)("inventory.inventoryBindings.recipe")), 1),
138
144
  o[0] || (o[0] = n("div", { class: "w-[200px]" }, null, -1)),
139
145
  o[1] || (o[1] = n("div", { class: "w-[52px]" }, null, -1))
140
146
  ]),
141
- (f(!0), x(C, null, A(D.value, (i) => (f(), R(t, {
142
- key: i.id,
147
+ (m(!0), y(R, null, N(K.value, (l) => (m(), V(t, {
148
+ key: l.id,
143
149
  disabled: e.disabled,
144
- modelValue: +l(h)(i.amount ?? { amount: 1, precision: 0 }),
145
- rules: [l(oe)(0), l(N)(0)]
150
+ modelValue: +i(B)(l.amount ?? { amount: 1, precision: 0 }),
151
+ rules: [i(oe)(0), i(T)(0)]
146
152
  }, {
147
- default: S(({ invalid: V }) => {
148
- var _;
153
+ default: S(({ invalid: k }) => {
154
+ var b;
149
155
  return [
150
156
  n("div", _e, [
151
157
  n("div", ge, [
152
- n("div", xe, [
153
- n("div", null, v((_ = k.value.find((u) => u._id === i.id)) == null ? void 0 : _.name), 1),
154
- K.value.has(i.id) ? (f(), x("div", be, [
155
- m(d, {
158
+ n("div", be, [
159
+ n("div", null, v((b = I.value.find((u) => u._id === l.id)) == null ? void 0 : b.name), 1),
160
+ D.value.has(l.id) ? (m(), y("div", xe, [
161
+ c(d, {
156
162
  name: "error",
157
163
  color: "system-error-400",
158
164
  size: "sm"
159
165
  }),
160
166
  o[2] || (o[2] = n("div", null, "There is circular linking in your binding.", -1))
161
- ])) : T("", !0)
167
+ ])) : g("", !0)
162
168
  ])
163
169
  ]),
164
170
  n("div", he, [
165
- m(a, {
171
+ c(a, {
166
172
  class: "w-full",
167
173
  disabled: e.disabled,
168
- modelValue: +l(h)(i.amount ?? { amount: 1, precision: 0 }),
169
- "onUpdate:modelValue": (u) => L(i.id, u, e.modelValue),
170
- invalid: V
174
+ modelValue: +i(B)(l.amount ?? { amount: 1, precision: 0 }),
175
+ "onUpdate:modelValue": (u) => L(l.id, u, e.modelValue),
176
+ invalid: k
171
177
  }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
172
178
  ]),
173
- n("div", Ve, [
174
- m(r, {
179
+ e.readonly ? g("", !0) : (m(), y("div", Ve, [
180
+ c(r, {
175
181
  disabled: e.disabled,
176
182
  type: "button",
177
183
  variant: "plain",
178
184
  icon: "delete",
179
185
  "icon-color": "#000000",
180
- onClick: (u) => w(i.id, e.modelValue)
186
+ onClick: (u) => E(l.id, e.modelValue)
181
187
  }, null, 8, ["disabled", "onClick"])
182
- ])
188
+ ]))
183
189
  ])
184
190
  ];
185
191
  }),
@@ -189,79 +195,81 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
189
195
  ]),
190
196
  n("div", Be, [
191
197
  n("div", ke, [
192
- n("div", Fe, v(l(c)("inventory.inventoryBindings.ingredient")), 1),
193
- m(r, {
198
+ n("div", Fe, v(i(p)("inventory.inventoryBindings.ingredient")), 1),
199
+ e.readonly ? g("", !0) : (m(), V(r, {
200
+ key: 0,
194
201
  variant: "secondary",
195
202
  "text-color": "primary",
196
203
  "border-color": "primary",
197
- label: l(c)("inventory.inventoryBindings.linkIngredient"),
204
+ label: i(p)("inventory.inventoryBindings.linkIngredient"),
198
205
  "prepend-icon": "link",
199
- onClick: j
200
- }, null, 8, ["label"])
206
+ onClick: G
207
+ }, null, 8, ["label"]))
201
208
  ]),
202
209
  n("div", Ie, [
203
210
  n("div", we, [
204
- n("div", Ue, v(l(c)("inventory.inventoryBindings.ingredient")), 1),
205
- n("div", Ee, v(l(c)("inventory.inventoryBindings.amount")), 1),
211
+ n("div", Ue, v(i(p)("inventory.inventoryBindings.ingredient")), 1),
212
+ n("div", Ee, v(i(p)("inventory.inventoryBindings.amount")), 1),
206
213
  o[3] || (o[3] = n("div", { class: "w-[52px]" }, null, -1))
207
214
  ]),
208
- (f(!0), x(C, null, A(I.value, (i, V) => {
209
- var _;
210
- return f(), x("div", {
211
- key: i.id,
215
+ (m(!0), y(R, null, N(U.value, (l, k) => {
216
+ var b;
217
+ return m(), y("div", {
218
+ key: l.id,
212
219
  class: "flex flex-col border-b border-fm-color-neutral-gray-100"
213
220
  }, [
214
221
  n("div", Ce, [
215
222
  n("div", Ae, [
216
- n("span", Re, v((_ = b.value.find((u) => u._id === i.id)) == null ? void 0 : _.name), 1),
217
- F.value.length ? (f(), R(H, {
223
+ n("span", Re, v((b = h.value.find((u) => u._id === l.id)) == null ? void 0 : b.name), 1),
224
+ w.value.length ? (m(), V(H, {
218
225
  key: 0,
219
226
  variant: "plain",
220
227
  placement: "bottom",
221
- content: l(c)("inventory.inventoryBindings.invalidWarning"),
228
+ content: i(p)("inventory.inventoryBindings.invalidWarning"),
222
229
  "hide-arrow": !0,
223
230
  "z-index": 50
224
231
  }, {
225
232
  default: S(() => [
226
- m(d, {
233
+ c(d, {
227
234
  name: "error",
228
235
  size: "sm",
229
236
  color: "#ff3b30"
230
237
  })
231
238
  ]),
232
239
  _: 1
233
- }, 8, ["content"])) : T("", !0)
240
+ }, 8, ["content"])) : g("", !0)
234
241
  ]),
235
- n("div", Se, [
236
- m(se, {
237
- "model-value": Y(i),
238
- "onUpdate:modelValue": (u) => q(i.id, u, e.modelValue),
239
- "onUpdate:amount": (u) => W(i, u),
240
- unit: U(i),
241
- placement: V === I.value.length - 1 ? "top" : "bottom",
242
- "convert-amount-on-change-unit": ""
243
- }, null, 8, ["model-value", "onUpdate:modelValue", "onUpdate:amount", "unit", "placement"])
242
+ n("div", Ne, [
243
+ c(se, {
244
+ "model-value": O(l),
245
+ "onUpdate:modelValue": (u) => Y(l.id, u, e.modelValue),
246
+ "onUpdate:amount": (u) => q(l, u),
247
+ unit: C(l),
248
+ placement: k === U.value.length - 1 ? "top" : "bottom",
249
+ "convert-amount-on-change-unit": "",
250
+ disabled: e.readonly
251
+ }, null, 8, ["model-value", "onUpdate:modelValue", "onUpdate:amount", "unit", "placement", "disabled"])
244
252
  ]),
245
- n("div", Te, [
246
- m(r, {
253
+ e.readonly ? g("", !0) : (m(), y("div", Se, [
254
+ c(r, {
247
255
  disabled: e.disabled,
248
256
  type: "button",
249
257
  variant: "tertiary",
250
258
  icon: "delete",
251
- onClick: (u) => w(i.id, e.modelValue)
259
+ onClick: (u) => E(l.id, e.modelValue)
252
260
  }, null, 8, ["disabled", "onClick"])
253
- ])
261
+ ]))
254
262
  ]),
255
- n("div", Ne, [
256
- m(t, {
257
- modelValue: +l(h)(i.amount ?? { amount: 1, precision: 0 }),
258
- rules: [l(N)(0)]
263
+ n("div", Te, [
264
+ c(t, {
265
+ modelValue: +i(B)(l.amount ?? { amount: 1, precision: 0 }),
266
+ rules: [i(T)(0)]
259
267
  }, null, 8, ["modelValue", "rules"]),
260
- m(t, {
261
- modelValue: O(i),
268
+ c(t, {
269
+ modelValue: W(l),
262
270
  rules: [
263
- l(re)(),
264
- l(de)(U(i))
271
+ i(re)(),
272
+ i(de)(C(l))
265
273
  ]
266
274
  }, null, 8, ["modelValue", "rules"])
267
275
  ])
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as s, resolveComponent as c, openBlock as m, createBlock as d, h as g } from "vue";
2
2
  import { useI18n as p } from "@feedmepos/mf-common";
3
3
  import { components as u } from "@feedmepos/ui-library";
4
- import { F as r } from "./app-BXjk74IB.js";
4
+ import { F as r } from "./app-DntcWR3_.js";
5
5
  const B = /* @__PURE__ */ s({
6
6
  __name: "InventoryBindingSummary",
7
7
  props: {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as y, computed as V, ref as w, watch as h, resolveComponent as u, openBlock as F, createBlock as A, withCtx as s, createVNode as g, createElementVNode as k, normalizeClass as K } from "vue";
2
- import { c as d } from "./rules-BmRGm3yv.js";
2
+ import { L as d } from "./app-DntcWR3_.js";
3
3
  const _ = ["value", "disabled"], D = /* @__PURE__ */ y({
4
4
  __name: "NumberPrecisionInput",
5
5
  props: {
@@ -1,7 +1,6 @@
1
- import { u as d, w as f } from "./xlsx-CTOKp7SQ.js";
2
- import { k as _, u as h } from "./app-BXjk74IB.js";
1
+ import { aw as d, ax as f, X as _, u as h } from "./app-DntcWR3_.js";
3
2
  import { useCoreStore as F } from "@feedmepos/mf-common";
4
- import { ref as y, defineComponent as v, resolveComponent as p, openBlock as k, createElementBlock as g, renderSlot as S, createVNode as l, withCtx as x } from "vue";
3
+ import { ref as y, defineComponent as v, resolveComponent as p, openBlock as k, createElementBlock as g, renderSlot as x, createVNode as l, withCtx as S } from "vue";
5
4
  function w(e, t) {
6
5
  return t.map((r) => typeof r.selector == "function" ? r.selector(e) : e[r.selector]);
7
6
  }
@@ -9,15 +8,15 @@ function I(e, t) {
9
8
  const r = t.map((o) => o.name), n = e.map((o) => w(o, t));
10
9
  return d.aoa_to_sheet([r, ...n]);
11
10
  }
12
- async function C(e, t) {
11
+ async function A(e, t) {
13
12
  const r = d.book_new();
14
13
  for (const n of e) {
15
14
  const o = I(
16
15
  n.data,
17
- n.columns.map((s) => typeof s == "string" ? {
18
- name: s,
19
- selector: s
20
- } : s)
16
+ n.columns.map((a) => typeof a == "string" ? {
17
+ name: a,
18
+ selector: a
19
+ } : a)
21
20
  );
22
21
  d.book_append_sheet(r, o, n.name);
23
22
  }
@@ -27,8 +26,8 @@ const m = _((e, t) => {
27
26
  const r = h(), n = F();
28
27
  return {
29
28
  async getInventoryForecast() {
30
- var a;
31
- const o = ((a = n.currentBusiness.value) == null ? void 0 : a._id) ?? "", s = r.currentLocationId ?? "", i = `${e.dataBackendUrl}/${o}/${s}/inventory-forecast`;
29
+ var s;
30
+ const o = ((s = n.currentBusiness.value) == null ? void 0 : s._id) ?? "", a = r.currentLocationId ?? "", i = `${e.dataBackendUrl}/${o}/${a}/inventory-forecast`;
32
31
  try {
33
32
  return await t.get(i);
34
33
  } catch {
@@ -37,9 +36,9 @@ const m = _((e, t) => {
37
36
  },
38
37
  async getPurchaseOrderForecast(o) {
39
38
  var u;
40
- const s = ((u = n.currentBusiness.value) == null ? void 0 : u._id) ?? "", i = r.currentLocationId ?? "", a = `${e.dataBackendUrl}/${s}/${i}/purchase-order-forecast?days=${o}`;
39
+ const a = ((u = n.currentBusiness.value) == null ? void 0 : u._id) ?? "", i = r.currentLocationId ?? "", s = `${e.dataBackendUrl}/${a}/${i}/purchase-order-forecast?days=${o}`;
41
40
  try {
42
- return await t.get(a);
41
+ return await t.get(s);
43
42
  } catch {
44
43
  return { skus: [] };
45
44
  }
@@ -53,7 +52,7 @@ function O() {
53
52
  };
54
53
  }
55
54
  const c = y(O());
56
- function D() {
55
+ function C() {
57
56
  return {
58
57
  // state
59
58
  get inventoryForecast() {
@@ -79,11 +78,11 @@ function D() {
79
78
  }
80
79
  };
81
80
  }
82
- function N(e) {
81
+ function D(e) {
83
82
  let t = e.substring(e.indexOf("_") + 1);
84
83
  return t.includes("_") && (t = t.substring(0, t.lastIndexOf("_"))), Number.isNaN(Date.parse(t)) ? null : new Date(t).toISOString();
85
84
  }
86
- const b = { class: "flex items-center gap-8" }, B = "Experience enhanced inventory features with premium plan.", L = /* @__PURE__ */ v({
85
+ const b = { class: "flex items-center gap-8" }, B = "Experience enhanced inventory features with premium plan.", N = /* @__PURE__ */ v({
87
86
  __name: "PremiumBadge",
88
87
  props: {
89
88
  zIndex: {}
@@ -92,14 +91,14 @@ const b = { class: "flex items-center gap-8" }, B = "Experience enhanced invento
92
91
  return (t, r) => {
93
92
  const n = p("FmPill"), o = p("FmTooltip");
94
93
  return k(), g("div", b, [
95
- S(t.$slots, "default"),
94
+ x(t.$slots, "default"),
96
95
  l(o, {
97
96
  variant: "plain",
98
97
  placement: "top",
99
98
  content: B,
100
99
  "z-index": t.zIndex
101
100
  }, {
102
- default: x(() => [
101
+ default: S(() => [
103
102
  l(n, { variant: "premium" })
104
103
  ]),
105
104
  _: 1
@@ -109,8 +108,8 @@ const b = { class: "flex items-center gap-8" }, B = "Experience enhanced invento
109
108
  }
110
109
  });
111
110
  export {
112
- L as _,
113
- C as e,
114
- N as i,
115
- D as u
111
+ N as _,
112
+ A as e,
113
+ D as i,
114
+ C as u
116
115
  };