@feedmepos/mf-inventory-portal 0.0.23-dev.36 → 0.0.23-dev.38

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 (79) hide show
  1. package/dist/{App-CRVwCmFX.js → App-DQgtWkQj.js} +20 -20
  2. package/dist/{ApprovalView-CfJQdSRz.js → ApprovalView-CvSK9fGA.js} +10 -10
  3. package/dist/{BindingsDialog-BKL8E0Ni.js → BindingsDialog-BAC0_xCP.js} +8 -8
  4. package/dist/{BindingsPicker-M9-ARPgB.js → BindingsPicker-ecWMwsNp.js} +3 -3
  5. package/dist/{BindingsTable-BUs8wO0p.js → BindingsTable-D5kQydOU.js} +10 -10
  6. package/dist/{ClosingDraftView-BI3P4oS4.js → ClosingDraftView-CnHQ59rX.js} +46 -46
  7. package/dist/{ClosingTemplateView-D732hJJj.js → ClosingTemplateView-vRTsVZ0c.js} +21 -21
  8. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DzXJBW2r.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CpIzIvkU.js} +17 -17
  9. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BPOPaW5x.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CNzEHF-R.js} +37 -37
  10. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DCYtyGvl.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DBhBaRrd.js} +1 -1
  11. package/dist/{IngredientGroupView-CnnqKFGA.js → IngredientGroupView-BLsABZ3h.js} +1 -1
  12. package/dist/IngredientsView-Cs4TIf6V.js +1794 -0
  13. package/dist/{IntegrationView-6-Qvhwbr.js → IntegrationView-BqAqngtM.js} +137 -137
  14. package/dist/{InventoryBindingForm-F3o3dWhJ.js → InventoryBindingForm-D54V_qZQ.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-B1hTEubD.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-KIW9J7Xn.js} +106 -96
  16. package/dist/{InventoryBindingSummary-B9ziVhZr.js → InventoryBindingSummary-htT7GNto.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BquI8s88.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BlEgALMj.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BHRxlIxi.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DHbxXDGy.js} +9 -9
  19. package/dist/{PurchaseOrderPrintPreview-DyjA8BsV.js → PurchaseOrderPrintPreview-hmzxKuIa.js} +5 -5
  20. package/dist/{ReceiveRequestView-BQoADy5j.js → ReceiveRequestView-_YioyWqU.js} +182 -182
  21. package/dist/{RecipeView-DOEPiT-V.js → RecipeView-88KJ0nvU.js} +3 -3
  22. package/dist/StockView-R4cnEbHQ.js +1818 -0
  23. package/dist/{SupplierView-BX6T3B40.js → SupplierView-CevGG507.js} +4 -4
  24. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-C-8uS9KA.js → TransferDetails.vue_vue_type_script_setup_true_lang-CeWP9msS.js} +52 -52
  25. package/dist/{TransferTemplateView-D3smZIqo.js → TransferTemplateView-QDniAq8o.js} +114 -114
  26. package/dist/{UnitView-PZthqb2i.js → UnitView-SjwJ3lZ0.js} +14 -14
  27. package/dist/{WarehouseView-Qqqwk353.js → WarehouseView-55LiPQXG.js} +70 -70
  28. package/dist/api/adjustment-template.d.ts +2 -0
  29. package/dist/api/bill.d.ts +240 -84
  30. package/dist/api/inventory.d.ts +15 -6
  31. package/dist/{app-Dzll4soM.js → app-UTiudUUR.js} +6779 -6514
  32. package/dist/app.d.ts +8 -0
  33. package/dist/app.js +1 -1
  34. package/dist/components/FmCustomAttribute.vue.d.ts +23 -0
  35. package/dist/components/FmLockableField.vue.d.ts +37 -0
  36. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +3 -1
  37. package/dist/components/shell/inventory/binding-ui.vue.d.ts +3 -1
  38. package/dist/{decimal-CSwcVJ9W.js → decimal-tyBgHJ47.js} +1 -1
  39. package/dist/feature-z7inw9y6.js +946 -0
  40. package/dist/{format-unit-display-D2-2_8Wo.js → format-unit-display-DN0KtCh2.js} +61 -61
  41. package/dist/index-Dj2Ccgp1.js +29202 -0
  42. package/dist/{StockView-CyJlLOjk.js → index-DlhdTaa8.js} +2218 -3854
  43. package/dist/{stock-VALQOiWM.js → stock-CxRxidDu.js} +1 -1
  44. package/dist/stores/feature.d.ts +5 -0
  45. package/dist/stores/inventory.d.ts +20 -8
  46. package/dist/stores/supplier.d.ts +1 -1
  47. package/dist/{supplier-CYRocBpq.js → supplier-BhyiTwSJ.js} +1 -1
  48. package/dist/tsconfig.app.tsbuildinfo +1 -1
  49. package/dist/{use-inventory-binding-dialog-SiBEsYI-.js → use-inventory-binding-dialog-DwSvUvRl.js} +1 -1
  50. package/dist/views/adjustment-template/wastage-template/WastageTemplateReason.vue.d.ts +18 -0
  51. package/dist/views/adjustment-template/wastage-template/actions.d.ts +37 -3
  52. package/dist/views/adjustment-template/wastage-template/props.d.ts +7 -0
  53. package/dist/views/adjustment-template/wastage-template/table.d.ts +32 -2
  54. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +8 -4
  55. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +48 -24
  56. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +2 -1
  57. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +24 -12
  58. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +24 -12
  59. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +6 -3
  60. package/dist/views/ingredients/components/convert/ConvertFormProps.d.ts +1 -0
  61. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -2
  62. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +1 -0
  63. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +2 -1
  64. package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
  65. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +34 -17
  66. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +4 -2
  67. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +2 -1
  68. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +48 -24
  69. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +48 -24
  70. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -0
  71. package/dist/views/stock/components/StockRecordCard.vue.d.ts +120 -42
  72. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +4 -2
  73. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +2 -1
  74. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +24 -12
  75. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +24 -12
  76. package/package.json +7 -6
  77. package/dist/IngredientsView-DZS3wyBm.js +0 -1657
  78. package/dist/feature-CFAsUae4.js +0 -92
  79. package/dist/index-CLdXLjws.js +0 -12087
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-B1hTEubD.js";
1
+ import { _ as f } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-KIW9J7Xn.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,18 +1,24 @@
1
- import { defineComponent as H, computed as y, reactive as J, 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, aP as ee, aQ as ne, i as h, aR as oe, L as P, K as te, F as ie } from "./app-Dzll4soM.js";
3
- import { u as le } from "./use-inventory-binding-dialog-SiBEsYI-.js";
4
- import { _ as se, c as re, d as de } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-BPOPaW5x.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-UTiudUUR.js";
3
+ import { u as le } from "./use-inventory-binding-dialog-DwSvUvRl.js";
4
+ import { _ as se, c as re, d as de } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-CNzEHF-R.js";
5
5
  import { useI18n as ae } from "@feedmepos/mf-common";
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" }, 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 = {
7
7
  class: "flex items-center w-full border-b border-fm-color-neutral-gray-100",
8
8
  style: { "min-height": "48px" }
9
- }, 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 = {
10
10
  key: 0,
11
11
  class: "flex gap-4 text-fm-color-system-error-300 fm-typo-en-body-sm-400"
12
- }, 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 = {
13
16
  class: "flex items-center w-full",
14
17
  style: { "min-height": "48px" }
15
- }, 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]" }, Pe = { class: "flex flex-col px-12 pb-4" }, ze = /* @__PURE__ */ H({
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({
16
22
  __name: "InventoryBindingForm",
17
23
  props: {
18
24
  id: {},
@@ -20,43 +26,44 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
20
26
  excludeBindingId: {},
21
27
  rules: {},
22
28
  iframeMode: { type: Boolean },
23
- disabled: { type: Boolean }
29
+ disabled: { type: Boolean },
30
+ readonly: { type: Boolean }
24
31
  },
25
32
  emits: ["update:modelValue", "click:pick-inventory-bindings"],
26
- setup(N, { emit: M }) {
27
- const { t: c } = ae(), B = Z(), k = y(() => B.inventory.recipe ?? []), b = y(() => B.inventory.sku ?? []), s = N, p = M, F = y(() => ee({
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({
28
35
  bindings: s.modelValue,
29
- recipes: k.value.map((t) => t._id === s.id ? {
36
+ recipes: I.value.map((t) => t._id === s.id ? {
30
37
  ...t,
31
38
  contains: s.modelValue
32
39
  } : t),
33
- skus: b.value
34
- }).inventoryBindings.filter((t) => t.error).filter((t) => t.reason === ne.enum.circularDependency)), K = y(
35
- () => 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) => {
36
43
  var o;
37
44
  return (o = e.bindingPaths[0]) == null ? void 0 : o.id;
38
45
  }))
39
- ), D = y(() => s.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: $, promptRecipesBinding: z } = le();
46
+ ), K = _(() => s.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: $, promptRecipesBinding: z } = le();
40
47
  async function G() {
41
48
  if (s.iframeMode) {
42
- p("click:pick-inventory-bindings", "RECIPE");
49
+ f("click:pick-inventory-bindings", "RECIPE");
43
50
  return;
44
51
  }
45
52
  z(
46
53
  s.modelValue,
47
- (e) => p("update:modelValue", e),
54
+ (e) => f("update:modelValue", e),
48
55
  s.id ? [s.id] : []
49
56
  );
50
57
  }
51
- const I = y(() => s.modelValue.filter((e) => e.type === "SKU") ?? []);
58
+ const U = _(() => s.modelValue.filter((e) => e.type === "SKU") ?? []);
52
59
  async function L() {
53
60
  if (s.iframeMode) {
54
- p("click:pick-inventory-bindings", "SKU");
61
+ f("click:pick-inventory-bindings", "SKU");
55
62
  return;
56
63
  }
57
64
  $(
58
65
  s.modelValue,
59
- (e) => p("update:modelValue", e),
66
+ (e) => f("update:modelValue", e),
60
67
  s.excludeBindingId,
61
68
  s.id ? [s.id] : []
62
69
  );
@@ -64,44 +71,44 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
64
71
  function j(e, o, t) {
65
72
  const r = +o;
66
73
  let d = t;
67
- 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);
68
75
  }
69
- function w(e, o) {
76
+ function E(e, o) {
70
77
  const t = o.filter((r) => r.id !== e);
71
- p("update:modelValue", t);
78
+ f("update:modelValue", t);
72
79
  }
73
- function U(e) {
80
+ function C(e) {
74
81
  var t, r;
75
82
  if (e.type !== ie.enum.SKU)
76
83
  throw new Error("Non-SKU binding does not have unit");
77
- 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))
78
85
  throw new Error(`Cannot find ingredient: ${e.id}`);
79
- 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;
80
87
  }
81
- function Y(e) {
88
+ function O(e) {
82
89
  return { amount: e.amount, measurement: e.measurement };
83
90
  }
84
- function O(e, o, t) {
91
+ function Y(e, o, t) {
85
92
  const r = t.map((d) => d.id !== e ? d : {
86
93
  ...d,
87
94
  amount: o.amount,
88
95
  measurement: o.measurement
89
96
  });
90
- p("update:modelValue", r);
97
+ f("update:modelValue", r);
91
98
  }
92
- const E = J({});
93
- function Q(e) {
94
- return E[e.id] ?? {
99
+ const A = Q({});
100
+ function W(e) {
101
+ return A[e.id] ?? {
95
102
  modelValue: {
96
103
  amount: e.amount,
97
104
  measurement: e.measurement
98
105
  },
99
- amountAsString: h(e.amount)
106
+ amountAsString: B(e.amount)
100
107
  };
101
108
  }
102
- function W(e, o) {
109
+ function q(e, o) {
103
110
  X(() => {
104
- E[e.id] = {
111
+ A[e.id] = {
105
112
  modelValue: {
106
113
  amount: e.amount,
107
114
  measurement: e.measurement
@@ -111,73 +118,74 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
111
118
  });
112
119
  }
113
120
  return (e, o) => {
114
- const t = g("FmFormGroup"), r = g("FmButton"), d = g("FmIcon"), a = g("FmTextField"), q = g("FmTooltip");
115
- return f(), x("div", ue, [
116
- 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, {
117
124
  disabled: e.disabled,
118
125
  "model-value": e.modelValue,
119
126
  rules: e.rules
120
127
  }, null, 8, ["disabled", "model-value", "rules"]),
121
128
  n("div", me, [
122
129
  n("div", ce, [
123
- n("div", pe, v(l(c)("inventory.inventoryBindings.recipe")), 1),
124
- m(r, {
130
+ n("div", pe, v(l(p)("inventory.inventoryBindings.recipe")), 1),
131
+ e.readonly ? g("", !0) : (m(), V(r, {
132
+ key: 0,
125
133
  variant: "secondary",
126
134
  "text-color": "primary",
127
135
  "border-color": "primary",
128
- label: l(c)("inventory.inventoryBindings.linkRecipe"),
136
+ label: l(p)("inventory.inventoryBindings.linkRecipe"),
129
137
  "prepend-icon": "link",
130
138
  onClick: G
131
- }, null, 8, ["label"])
139
+ }, null, 8, ["label"]))
132
140
  ]),
133
141
  n("div", fe, [
134
- n("div", ve, [
135
- 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),
136
144
  o[0] || (o[0] = n("div", { class: "w-[200px]" }, null, -1)),
137
145
  o[1] || (o[1] = n("div", { class: "w-[52px]" }, null, -1))
138
146
  ]),
139
- (f(!0), x(C, null, A(D.value, (i) => (f(), R(t, {
147
+ (m(!0), y(R, null, N(K.value, (i) => (m(), V(t, {
140
148
  key: i.id,
141
149
  disabled: e.disabled,
142
- modelValue: +l(h)(i.amount ?? { amount: 1, precision: 0 }),
143
- rules: [l(oe)(0), l(P)(0)]
150
+ modelValue: +l(B)(i.amount ?? { amount: 1, precision: 0 }),
151
+ rules: [l(oe)(0), l(T)(0)]
144
152
  }, {
145
- default: S(({ invalid: V }) => {
146
- var _;
153
+ default: S(({ invalid: k }) => {
154
+ var b;
147
155
  return [
148
156
  n("div", _e, [
149
157
  n("div", ge, [
150
- n("div", xe, [
151
- n("div", null, v((_ = k.value.find((u) => u._id === i.id)) == null ? void 0 : _.name), 1),
152
- K.value.has(i.id) ? (f(), x("div", be, [
153
- 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, {
154
162
  name: "error",
155
163
  color: "system-error-400",
156
164
  size: "sm"
157
165
  }),
158
166
  o[2] || (o[2] = n("div", null, "There is circular linking in your binding.", -1))
159
- ])) : T("", !0)
167
+ ])) : g("", !0)
160
168
  ])
161
169
  ]),
162
170
  n("div", he, [
163
- m(a, {
171
+ c(a, {
164
172
  class: "w-full",
165
173
  disabled: e.disabled,
166
- modelValue: +l(h)(i.amount ?? { amount: 1, precision: 0 }),
174
+ modelValue: +l(B)(i.amount ?? { amount: 1, precision: 0 }),
167
175
  "onUpdate:modelValue": (u) => j(i.id, u, e.modelValue),
168
- invalid: V
176
+ invalid: k
169
177
  }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
170
178
  ]),
171
- n("div", Ve, [
172
- m(r, {
179
+ e.readonly ? g("", !0) : (m(), y("div", Ve, [
180
+ c(r, {
173
181
  disabled: e.disabled,
174
182
  type: "button",
175
183
  variant: "plain",
176
184
  icon: "delete",
177
185
  "icon-color": "#000000",
178
- onClick: (u) => w(i.id, e.modelValue)
186
+ onClick: (u) => E(i.id, e.modelValue)
179
187
  }, null, 8, ["disabled", "onClick"])
180
- ])
188
+ ]))
181
189
  ])
182
190
  ];
183
191
  }),
@@ -187,79 +195,81 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
187
195
  ]),
188
196
  n("div", Be, [
189
197
  n("div", ke, [
190
- n("div", Fe, v(l(c)("inventory.inventoryBindings.ingredient")), 1),
191
- m(r, {
198
+ n("div", Fe, v(l(p)("inventory.inventoryBindings.ingredient")), 1),
199
+ e.readonly ? g("", !0) : (m(), V(r, {
200
+ key: 0,
192
201
  variant: "secondary",
193
202
  "text-color": "primary",
194
203
  "border-color": "primary",
195
- label: l(c)("inventory.inventoryBindings.linkIngredient"),
204
+ label: l(p)("inventory.inventoryBindings.linkIngredient"),
196
205
  "prepend-icon": "link",
197
206
  onClick: L
198
- }, null, 8, ["label"])
207
+ }, null, 8, ["label"]))
199
208
  ]),
200
209
  n("div", Ie, [
201
210
  n("div", we, [
202
- n("div", Ue, v(l(c)("inventory.inventoryBindings.ingredient")), 1),
203
- 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),
204
213
  o[3] || (o[3] = n("div", { class: "w-[52px]" }, null, -1))
205
214
  ]),
206
- (f(!0), x(C, null, A(I.value, (i, V) => {
207
- var _;
208
- return f(), x("div", {
215
+ (m(!0), y(R, null, N(U.value, (i, k) => {
216
+ var b;
217
+ return m(), y("div", {
209
218
  key: i.id,
210
219
  class: "flex flex-col border-b border-fm-color-neutral-gray-100"
211
220
  }, [
212
221
  n("div", Ce, [
213
222
  n("div", Ae, [
214
- n("span", Re, v((_ = b.value.find((u) => u._id === i.id)) == null ? void 0 : _.name), 1),
215
- 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, {
216
225
  key: 0,
217
226
  variant: "plain",
218
227
  placement: "bottom",
219
- content: l(c)("inventory.inventoryBindings.invalidWarning"),
228
+ content: l(p)("inventory.inventoryBindings.invalidWarning"),
220
229
  "hide-arrow": !0,
221
230
  "z-index": 50
222
231
  }, {
223
232
  default: S(() => [
224
- m(d, {
233
+ c(d, {
225
234
  name: "error",
226
235
  size: "sm",
227
236
  color: "#ff3b30"
228
237
  })
229
238
  ]),
230
239
  _: 1
231
- }, 8, ["content"])) : T("", !0)
240
+ }, 8, ["content"])) : g("", !0)
232
241
  ]),
233
- n("div", Se, [
234
- m(se, {
235
- "model-value": Y(i),
236
- "onUpdate:modelValue": (u) => O(i.id, u, e.modelValue),
237
- "onUpdate:amount": (u) => W(i, u),
238
- unit: U(i),
239
- placement: V === I.value.length - 1 ? "top" : "bottom",
240
- "convert-amount-on-change-unit": ""
241
- }, 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"])
242
252
  ]),
243
- n("div", Te, [
244
- m(r, {
253
+ e.readonly ? g("", !0) : (m(), y("div", Se, [
254
+ c(r, {
245
255
  disabled: e.disabled,
246
256
  type: "button",
247
257
  variant: "tertiary",
248
258
  icon: "delete",
249
- onClick: (u) => w(i.id, e.modelValue)
259
+ onClick: (u) => E(i.id, e.modelValue)
250
260
  }, null, 8, ["disabled", "onClick"])
251
- ])
261
+ ]))
252
262
  ]),
253
- n("div", Pe, [
254
- m(t, {
255
- modelValue: +l(h)(i.amount ?? { amount: 1, precision: 0 }),
256
- rules: [l(P)(0)]
263
+ n("div", Te, [
264
+ c(t, {
265
+ modelValue: +l(B)(i.amount ?? { amount: 1, precision: 0 }),
266
+ rules: [l(T)(0)]
257
267
  }, null, 8, ["modelValue", "rules"]),
258
- m(t, {
259
- modelValue: Q(i),
268
+ c(t, {
269
+ modelValue: W(i),
260
270
  rules: [
261
271
  l(re)(),
262
- l(de)(U(i))
272
+ l(de)(C(i))
263
273
  ]
264
274
  }, null, 8, ["modelValue", "rules"])
265
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-Dzll4soM.js";
4
+ import { F as r } from "./app-UTiudUUR.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 { K as d } from "./app-Dzll4soM.js";
2
+ import { L as d } from "./app-UTiudUUR.js";
3
3
  const _ = ["value", "disabled"], D = /* @__PURE__ */ y({
4
4
  __name: "NumberPrecisionInput",
5
5
  props: {
@@ -1,17 +1,17 @@
1
- import { az as d, aA as f, W as _, u as h } from "./app-Dzll4soM.js";
1
+ import { av as d, aw as f, X as _, u as h } from "./app-UTiudUUR.js";
2
2
  import { useCoreStore as F } from "@feedmepos/mf-common";
3
- 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";
4
- function I(e, t) {
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";
4
+ function w(e, t) {
5
5
  return t.map((r) => typeof r.selector == "function" ? r.selector(e) : e[r.selector]);
6
6
  }
7
- function O(e, t) {
8
- const r = t.map((o) => o.name), n = e.map((o) => I(o, t));
7
+ function I(e, t) {
8
+ const r = t.map((o) => o.name), n = e.map((o) => w(o, t));
9
9
  return d.aoa_to_sheet([r, ...n]);
10
10
  }
11
11
  async function A(e, t) {
12
12
  const r = d.book_new();
13
13
  for (const n of e) {
14
- const o = O(
14
+ const o = I(
15
15
  n.data,
16
16
  n.columns.map((a) => typeof a == "string" ? {
17
17
  name: a,
@@ -45,13 +45,13 @@ const m = _((e, t) => {
45
45
  }
46
46
  };
47
47
  });
48
- function w() {
48
+ function O() {
49
49
  return {
50
50
  inventoryForecast: { skus: [] },
51
51
  purchaseOrderForecast: { skus: [] }
52
52
  };
53
53
  }
54
- const c = y(w());
54
+ const c = v(O());
55
55
  function C() {
56
56
  return {
57
57
  // state
@@ -82,7 +82,7 @@ function D(e) {
82
82
  let t = e.substring(e.indexOf("_") + 1);
83
83
  return t.includes("_") && (t = t.substring(0, t.lastIndexOf("_"))), Number.isNaN(Date.parse(t)) ? null : new Date(t).toISOString();
84
84
  }
85
- const b = { class: "flex items-center gap-8" }, B = "Experience enhanced inventory features with premium plan.", N = /* @__PURE__ */ v({
85
+ const b = { class: "flex items-center gap-8" }, B = "Experience enhanced inventory features with premium plan.", N = /* @__PURE__ */ y({
86
86
  __name: "PremiumBadge",
87
87
  props: {
88
88
  zIndex: {}
@@ -1,7 +1,7 @@
1
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 { au as y, _ as C } from "./app-Dzll4soM.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" }, 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-UTiudUUR.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 = {
5
5
  class: "text-left",
6
6
  style: { width: "20%" }
7
7
  }, J = { class: "text-left" }, Q = {
@@ -61,10 +61,10 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
61
61
  e[4] || (e[4] = t("br", null, null, -1))
62
62
  ])
63
63
  ]),
64
- t("td", D, [
64
+ t("td", q, [
65
65
  e[10] || (e[10] = t("div", { class: "header" }, "Delivery To", -1)),
66
- t("div", T, l(s.value.buyer.name), 1),
67
- t("div", q, [
66
+ t("div", D, l(s.value.buyer.name), 1),
67
+ t("div", T, [
68
68
  i(l(s.value.buyer.line1), 1),
69
69
  e[7] || (e[7] = t("br", null, null, -1)),
70
70
  s.value.buyer.line2 ? (n(), u(d, { key: 0 }, [