@feedmepos/mf-inventory-portal 0.0.23-dev.4 → 0.0.23-dev.41

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 (136) hide show
  1. package/dist/{App-DReDvY0M.js → App-DW2K97Bb.js} +84 -72
  2. package/dist/{ApprovalView-BMZlYmRk.js → ApprovalView-BgSxdrwt.js} +25 -28
  3. package/dist/{BindingsDialog-Y2K4I7H7.js → BindingsDialog-CQtusdvp.js} +6 -6
  4. package/dist/{BindingsPicker-DKBq9c37.js → BindingsPicker-BnEjRAah.js} +8 -9
  5. package/dist/{BindingsTable-45v4SDfp.js → BindingsTable-DpTPAef_.js} +18 -22
  6. package/dist/ClosingDraftView-CXKYLCZS.js +1190 -0
  7. package/dist/{ClosingTemplateView-CKJVYSbj.js → ClosingTemplateView-CMTJHywt.js} +271 -285
  8. package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-zOmcCdDR.js +142 -0
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CMEOp-0r.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-mAPA5_sB.js} +18 -19
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-C1DjyjyH.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BjNpfucZ.js} +25 -26
  11. package/dist/{IngredientGroupView-BuP-HGeg.js → IngredientGroupView-CrEfiZvn.js} +63 -69
  12. package/dist/IngredientsView-BB8LQlU9.js +1707 -0
  13. package/dist/{IntegrationView-kYCaKG0o.js → IntegrationView-D2wTkDyX.js} +89 -92
  14. package/dist/{InventoryBindingForm-BXHq4h-n.js → InventoryBindingForm-DW7rJDc1.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CVxJ_bV3.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Ci8UI1eQ.js} +112 -104
  16. package/dist/{InventoryBindingSummary-Bjasfc_v.js → InventoryBindingSummary-B40KofiI.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DM0C4raP.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DD7VT9MS.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C3O3JebE.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BGuXTfn6.js} +19 -20
  19. package/dist/{PurchaseOrderPrintPreview-CmjkfTTS.js → PurchaseOrderPrintPreview-DQmx28Be.js} +17 -18
  20. package/dist/ReceiveRequestView-CJknzKfd.js +4205 -0
  21. package/dist/RecipeView-D5oWQ9Yd.js +609 -0
  22. package/dist/StockView-U59PHCy2.js +1818 -0
  23. package/dist/{SupplierView-DAx7E7sR.js → SupplierView-CLjjpTNZ.js} +2325 -787
  24. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DLDDXnyG.js +1327 -0
  25. package/dist/TransferTemplateView-CFoVrPIX.js +1264 -0
  26. package/dist/{UnitView-CQPGZ8-r.js → UnitView-CAopphN_.js} +228 -227
  27. package/dist/{WarehouseView-jy-RNCgy.js → WarehouseView-DUZku5U6.js} +100 -106
  28. package/dist/api/adjustment-template.d.ts +25 -0
  29. package/dist/api/bill.d.ts +240 -84
  30. package/dist/api/closing-draft.d.ts +6 -0
  31. package/dist/api/closing.d.ts +1 -0
  32. package/dist/api/inventory.d.ts +15 -6
  33. package/dist/api/netsuite.d.ts +3 -3
  34. package/dist/app-0klJzLit.js +84527 -0
  35. package/dist/app.d.ts +64 -0
  36. package/dist/app.js +2 -2
  37. package/dist/components/FmCustomAttribute.vue.d.ts +23 -0
  38. package/dist/components/FmLockableField.vue.d.ts +37 -0
  39. package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
  40. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +3 -1
  41. package/dist/components/row-action.enum.d.ts +1 -0
  42. package/dist/components/shell/inventory/binding-ui.vue.d.ts +3 -1
  43. package/dist/composable/defineDeepModel.d.ts +1 -1
  44. package/dist/{decimal-BAc9M88Q.js → decimal-Cu4rlnvU.js} +1 -1
  45. package/dist/feature-C1wCaXKQ.js +946 -0
  46. package/dist/format-unit-display-CMa5UhY1.js +1215 -0
  47. package/dist/{StockView-D9no-mrA.js → index-BJaMpEVJ.js} +2242 -3986
  48. package/dist/index-HTBqkVVr.js +29202 -0
  49. package/dist/router/name.d.ts +2 -0
  50. package/dist/stock-CB4yNRMO.js +125 -0
  51. package/dist/stores/feature.d.ts +6 -0
  52. package/dist/stores/integration/netsuite.d.ts +70 -2
  53. package/dist/stores/inventory.d.ts +21 -12
  54. package/dist/stores/supplier.d.ts +1 -1
  55. package/dist/style.css +1 -1
  56. package/dist/{supplier-DJC0UZWv.js → supplier-biIIXGyr.js} +15 -15
  57. package/dist/tsconfig.app.tsbuildinfo +1 -1
  58. package/dist/{use-inventory-binding-dialog-PEQbFRvO.js → use-inventory-binding-dialog-BopoOOxB.js} +10 -11
  59. package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +2 -0
  60. package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +18 -0
  61. package/dist/views/adjustment-template/import/export.d.ts +60 -0
  62. package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
  63. package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
  64. package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
  65. package/dist/views/adjustment-template/wastage-template/WastageTemplateReason.vue.d.ts +18 -0
  66. package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
  67. package/dist/views/adjustment-template/wastage-template/actions.d.ts +1329 -0
  68. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
  69. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
  70. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
  71. package/dist/views/adjustment-template/wastage-template/props.d.ts +36 -0
  72. package/dist/views/adjustment-template/wastage-template/table.d.ts +1303 -0
  73. package/dist/views/closing-draft/ClosingDraftView.vue.d.ts +2 -0
  74. package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts +22 -0
  75. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +625 -0
  76. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +25 -0
  77. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +3645 -0
  78. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -0
  79. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +19 -0
  80. package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +4 -0
  81. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +2 -1
  82. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +48 -204
  83. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +49 -205
  84. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +6 -3
  85. package/dist/views/ingredients/components/convert/ConvertFormProps.d.ts +1 -0
  86. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -2
  87. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +1 -0
  88. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +2 -1
  89. package/dist/views/receive-request/components/netsuite/NetSuiteInfo.vue.d.ts +12 -0
  90. package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +13 -0
  91. package/dist/views/receive-request/components/netsuite/NetSuiteSync.vue.d.ts +12 -0
  92. package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +13 -0
  93. package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
  94. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +70 -17
  95. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +4 -2
  96. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +2 -1
  97. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +102 -24
  98. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +102 -24
  99. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -0
  100. package/dist/views/stock/components/StockRecordCard.vue.d.ts +120 -42
  101. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +6 -4
  102. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  103. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +2 -1
  104. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +24 -12
  105. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +24 -12
  106. package/dist/views/transfer-template/helpers/import-export.helper.d.ts +2 -1
  107. package/package.json +7 -6
  108. package/dist/FmDroppableField-8RzKjEdL.js +0 -154
  109. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BhdcqRh-.js +0 -436
  110. package/dist/FmMultiselectDialog-D7YtdoyJ.js +0 -415
  111. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-zjvFEF5C.js +0 -51
  112. package/dist/IngredientsView-DMRN-odY.js +0 -1613
  113. package/dist/ReceiveRequestView-aQZJO8sq.js +0 -4165
  114. package/dist/RecipeView-DXO43tFi.js +0 -597
  115. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
  116. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DCA0RUfu.js +0 -1209
  117. package/dist/TransferTemplateView-CfxdQF1t.js +0 -1261
  118. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  119. package/dist/app-KnSMkJBV.js +0 -33496
  120. package/dist/date2-CIeUqUIc.js +0 -117
  121. package/dist/dayjs.min-Df5jSnDJ.js +0 -282
  122. package/dist/defineDeepModel-BfuQAIoM.js +0 -13
  123. package/dist/feature-dwB4OxRQ.js +0 -86
  124. package/dist/format-time-from-id-BbvzyIN6.js +0 -15
  125. package/dist/format-unit-display-BBWblJEt.js +0 -1216
  126. package/dist/fuzzy-B9ryZ9VZ.js +0 -41
  127. package/dist/index-BN0CY3sZ.js +0 -22277
  128. package/dist/index-Bj1fJum-.js +0 -45
  129. package/dist/index-C4yL_7rR.js +0 -10545
  130. package/dist/netsuite-ByWOS6tI.js +0 -194
  131. package/dist/normalizeArguments-DP7Hrren.js +0 -1552
  132. package/dist/row-action.enum-PMKMRrZR.js +0 -50
  133. package/dist/rules-C12nWDD1.js +0 -198
  134. package/dist/use-template-enabled-locations-2-k9g5t8tt.js +0 -86
  135. package/dist/xlsx-B4XHad7S.js +0 -24004
  136. package/dist/xlsx.util-BSO4SHJi.js +0 -78
@@ -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, H as ee, F as ne } from "./app-KnSMkJBV.js";
3
- import { a as h, o as oe, d as N, c as te } from "./rules-C12nWDD1.js";
4
- import { u as ie } from "./use-inventory-binding-dialog-PEQbFRvO.js";
5
- import { f as le } from "./index-BN0CY3sZ.js";
6
- import { _ as se, c as re, d as de } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-C1DjyjyH.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 l, 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, i as B, aO as oe, N as T, L as te, F as ie } from "./app-0klJzLit.js";
3
+ import { u as le } from "./use-inventory-binding-dialog-BopoOOxB.js";
4
+ import { _ as se, c as re, d as de } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-BjNpfucZ.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" }, ze = /* @__PURE__ */ J({
18
22
  __name: "InventoryBindingForm",
19
23
  props: {
20
24
  id: {},
@@ -22,88 +26,89 @@ 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)), D = 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
- ), K = y(() => s.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: $, promptRecipesBinding: z } = ie();
46
+ ), K = _(() => s.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: $, promptRecipesBinding: z } = le();
42
47
  async function G() {
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
52
  z(
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 L() {
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
  );
65
70
  }
66
- function L(e, o, t) {
71
+ function j(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 !== ie.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 H(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"), q = 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(l(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: l(p)("inventory.inventoryBindings.linkRecipe"),
131
137
  "prepend-icon": "link",
132
138
  onClick: G
133
- }, null, 8, ["label"])
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(l(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(K.value, (i) => (f(), R(t, {
147
+ (m(!0), y(R, null, N(K.value, (i) => (m(), V(t, {
142
148
  key: i.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: +l(B)(i.amount ?? { amount: 1, precision: 0 }),
151
+ rules: [l(oe)(0), l(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
- D.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 === i.id)) == null ? void 0 : b.name), 1),
160
+ D.value.has(i.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: +l(B)(i.amount ?? { amount: 1, precision: 0 }),
175
+ "onUpdate:modelValue": (u) => j(i.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(i.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(l(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: l(p)("inventory.inventoryBindings.linkIngredient"),
198
205
  "prepend-icon": "link",
199
- onClick: j
200
- }, null, 8, ["label"])
206
+ onClick: L
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(l(p)("inventory.inventoryBindings.ingredient")), 1),
212
+ n("div", Ee, v(l(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", {
215
+ (m(!0), y(R, null, N(U.value, (i, k) => {
216
+ var b;
217
+ return m(), y("div", {
211
218
  key: i.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(q, {
223
+ n("span", Re, v((b = h.value.find((u) => u._id === i.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: l(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) => H(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(i),
245
+ "onUpdate:modelValue": (u) => Y(i.id, u, e.modelValue),
246
+ "onUpdate:amount": (u) => q(i, u),
247
+ unit: C(i),
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(i.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: +l(B)(i.amount ?? { amount: 1, precision: 0 }),
266
+ rules: [l(T)(0)]
259
267
  }, null, 8, ["modelValue", "rules"]),
260
- m(t, {
261
- modelValue: O(i),
268
+ c(t, {
269
+ modelValue: W(i),
262
270
  rules: [
263
271
  l(re)(),
264
- l(de)(U(i))
272
+ l(de)(C(i))
265
273
  ]
266
274
  }, null, 8, ["modelValue", "rules"])
267
275
  ])
@@ -274,5 +282,5 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
274
282
  }
275
283
  });
276
284
  export {
277
- je as _
285
+ ze as _
278
286
  };
@@ -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-KnSMkJBV.js";
4
+ import { F as r } from "./app-0klJzLit.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-C12nWDD1.js";
2
+ import { L as d } from "./app-0klJzLit.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-B4XHad7S.js";
2
- import { j as _, u as h } from "./app-KnSMkJBV.js";
1
+ import { av as d, aw as f, X as _, u as h } from "./app-0klJzLit.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 v, defineComponent as y, resolveComponent as p, openBlock as k, createElementBlock as g, renderSlot as S, createVNode as l, withCtx as x } 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
  }
@@ -52,8 +51,8 @@ function O() {
52
51
  purchaseOrderForecast: { skus: [] }
53
52
  };
54
53
  }
55
- const c = y(O());
56
- function D() {
54
+ const c = v(O());
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__ */ y({
87
86
  __name: "PremiumBadge",
88
87
  props: {
89
88
  zIndex: {}
@@ -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
  };
@@ -1,8 +1,7 @@
1
- import { defineComponent as h, computed as x, ref as m, onMounted as f, openBlock as n, createElementBlock as u, createElementVNode as t, toDisplayString as l, normalizeStyle as g, createTextVNode as i, Fragment as o, createCommentVNode as p, renderList as v, normalizeClass as w } from "vue";
1
+ import { defineComponent as h, computed as x, ref as m, onMounted as f, openBlock as n, createElementBlock as u, createElementVNode as t, toDisplayString as l, normalizeStyle as g, createTextVNode as i, Fragment as d, createCommentVNode as p, renderList as v, normalizeClass as w } from "vue";
2
2
  import { useRoute as k } from "vue-router";
3
- import { v as y } from "./app-KnSMkJBV.js";
4
- import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "text-right" }, N = { class: "header" }, E = { class: "sub-header" }, O = { class: "caption" }, S = { class: "address" }, D = { class: "text-right" }, T = { class: "sub-header" }, q = { class: "address" }, F = { class: "purchase-body" }, L = { class: "text-left" }, U = { class: "text-left" }, V = { class: "text-right" }, z = { style: { "padding-top": "30px" } }, B = { valign: "bottom" }, H = { class: "header" }, I = { class: "caption" }, M = {
3
+ import { aq as y, _ as C } from "./app-0klJzLit.js";
4
+ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "text-right" }, N = { class: "header" }, E = { class: "sub-header" }, O = { class: "caption" }, S = { class: "address" }, q = { class: "text-right" }, D = { class: "sub-header" }, T = { class: "address" }, F = { class: "purchase-body" }, L = { class: "text-left" }, U = { class: "text-left" }, V = { class: "text-right" }, z = { style: { "padding-top": "30px" } }, B = { valign: "bottom" }, H = { class: "header" }, I = { class: "caption" }, M = {
6
5
  class: "text-left",
7
6
  style: { width: "20%" }
8
7
  }, J = { class: "text-left" }, Q = {
@@ -52,7 +51,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
52
51
  t("div", S, [
53
52
  i(l(s.value.supplier.line1), 1),
54
53
  e[2] || (e[2] = t("br", null, null, -1)),
55
- s.value.supplier.line2 ? (n(), u(o, { key: 0 }, [
54
+ s.value.supplier.line2 ? (n(), u(d, { key: 0 }, [
56
55
  i(l(s.value.supplier.line2), 1),
57
56
  e[1] || (e[1] = t("br", null, null, -1))
58
57
  ], 64)) : p("", !0),
@@ -62,13 +61,13 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
62
61
  e[4] || (e[4] = t("br", null, null, -1))
63
62
  ])
64
63
  ]),
65
- t("td", D, [
64
+ t("td", q, [
66
65
  e[10] || (e[10] = t("div", { class: "header" }, "Delivery To", -1)),
67
- t("div", T, l(s.value.buyer.name), 1),
68
- t("div", q, [
66
+ t("div", D, l(s.value.buyer.name), 1),
67
+ t("div", T, [
69
68
  i(l(s.value.buyer.line1), 1),
70
69
  e[7] || (e[7] = t("br", null, null, -1)),
71
- s.value.buyer.line2 ? (n(), u(o, { key: 0 }, [
70
+ s.value.buyer.line2 ? (n(), u(d, { key: 0 }, [
72
71
  i(l(s.value.buyer.line2), 1),
73
72
  e[6] || (e[6] = t("br", null, null, -1))
74
73
  ], 64)) : p("", !0),
@@ -100,7 +99,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
100
99
  ])
101
100
  ], -1)),
102
101
  t("tbody", null, [
103
- (n(!0), u(o, null, v(s.value.items, (r, a) => (n(), u("tr", { key: a }, [
102
+ (n(!0), u(d, null, v(s.value.items, (r, a) => (n(), u("tr", { key: a }, [
104
103
  t("td", L, l(r.code), 1),
105
104
  t("td", U, l(r.description), 1),
106
105
  t("td", {
@@ -120,7 +119,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
120
119
  t("div", z, [
121
120
  e[12] || (e[12] = t("hr", null, null, -1)),
122
121
  e[13] || (e[13] = i(" Delivery History: ")),
123
- (n(!0), u(o, null, v(s.value.deliveryOrders, (r, a) => (n(), u("div", {
122
+ (n(!0), u(d, null, v(s.value.deliveryOrders, (r, a) => (n(), u("div", {
124
123
  key: a,
125
124
  style: { padding: "10px 30px" }
126
125
  }, [
@@ -136,11 +135,11 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
136
135
  t("div", null, [
137
136
  t("table", null, [
138
137
  t("tbody", null, [
139
- (n(!0), u(o, null, v(r.items, (d, _) => (n(), u("tr", { key: _ }, [
140
- t("td", M, l(d.code), 1),
141
- t("td", J, l(d.description), 1),
142
- t("td", Q, l(d.quantity), 1),
143
- t("td", j, l(d.unit), 1)
138
+ (n(!0), u(d, null, v(r.items, (o, _) => (n(), u("tr", { key: _ }, [
139
+ t("td", M, l(o.code), 1),
140
+ t("td", J, l(o.description), 1),
141
+ t("td", Q, l(o.quantity), 1),
142
+ t("td", j, l(o.unit), 1)
144
143
  ]))), 128))
145
144
  ])
146
145
  ])
@@ -149,7 +148,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
149
148
  ])
150
149
  ]));
151
150
  }
152
- }), tt = /* @__PURE__ */ C(G, [["__scopeId", "data-v-92a03d5c"]]);
151
+ }), $ = /* @__PURE__ */ C(G, [["__scopeId", "data-v-92a03d5c"]]);
153
152
  export {
154
- tt as default
153
+ $ as default
155
154
  };