@feedmepos/mf-inventory-portal 1.0.9 → 1.0.10-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/dist/{App-RT4bBubX.js → App-COPx00z6.js} +50 -49
  2. package/dist/{ApprovalView-BgOWHNMD.js → ApprovalView-DEtUW_BD.js} +24 -24
  3. package/dist/{BindingsDialog-Dip74zuT.js → BindingsDialog-8WUk3Dv3.js} +2 -2
  4. package/dist/{BindingsPicker-DMQXwEn4.js → BindingsPicker-D8ABQZWj.js} +7 -7
  5. package/dist/{BindingsTable-Czz32F7d.js → BindingsTable-E4ObCYZW.js} +5 -5
  6. package/dist/{ClosingDraftView-Ps4DgRNG.js → ClosingDraftView-BuwTXzoD.js} +499 -498
  7. package/dist/{ClosingTemplateView-EjVLgUCH.js → ClosingTemplateView-Dwlu2WDi.js} +10 -10
  8. package/dist/{DeliveryOrderPrintPreview-C52aY34D.js → DeliveryOrderPrintPreview-CZQP0ZBf.js} +1 -1
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-MSqPw_6t.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CIpktJ_p.js} +32 -32
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DbN_e9U8.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BAsfttD3.js} +51 -51
  11. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DHuB4hRb.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BtLdE9Qw.js} +1 -1
  12. package/dist/{IngredientGroupView-CRTjNc-p.js → IngredientGroupView-DKncarkj.js} +11 -11
  13. package/dist/{IngredientsView-CuLOu_v9.js → IngredientsView-DJhR4pNL.js} +15 -14
  14. package/dist/IntegrationView-DbehNBiT.js +10361 -0
  15. package/dist/{InventoryBindingForm-C1NfSdOs.js → InventoryBindingForm-CakKTaAx.js} +1 -1
  16. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BJ7h3Nr6.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-qrYebXqE.js} +94 -89
  17. package/dist/{InventoryBindingSummary-CFjSwhxA.js → InventoryBindingSummary-ax4kqODn.js} +1 -1
  18. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B73N8AvB.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BD8iRcNk.js} +1 -1
  19. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-rve3vJhu.js → PremiumBadge.vue_vue_type_script_setup_true_lang-D13DAIwe.js} +10 -10
  20. package/dist/{PublishView-Bj0JawUb.js → PublishView-BMQzmmkT.js} +12 -12
  21. package/dist/{PurchaseOrderPrintPreview-DCAZVrDM.js → PurchaseOrderPrintPreview-CdbxZWLq.js} +4 -4
  22. package/dist/{ReceiveRequestView-B_bWd1hC.js → ReceiveRequestView-Blxchs0k.js} +53 -52
  23. package/dist/RecipeView-Bnigp2lS.js +8493 -0
  24. package/dist/{StockView-CsZ2hfAY.js → StockView-B4p6XQPR.js} +73 -72
  25. package/dist/{SupplierView-BUaouKYm.js → SupplierView-ojORzTSY.js} +12 -11
  26. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-G478rFCP.js +1894 -0
  27. package/dist/{TransferTemplateView-Rq7N13OR.js → TransferTemplateView-DTN23wTJ.js} +291 -290
  28. package/dist/{UnitView-C9j2RjtY.js → UnitView-w-bUgjIw.js} +23 -23
  29. package/dist/{WarehouseView-Ct6TWKej.js → WarehouseView-cJ7u4vTr.js} +26 -26
  30. package/dist/api/bill.d.ts +2 -2
  31. package/dist/api/food-market-hub.d.ts +1 -1
  32. package/dist/api/inventory.d.ts +110 -44
  33. package/dist/api/netsuite.d.ts +191 -8
  34. package/dist/api/purchase-order.d.ts +5 -1
  35. package/dist/{app-Cryb1Kx8.js → app-DtLEhFCD.js} +19871 -19809
  36. package/dist/app.d.ts +7 -7
  37. package/dist/app.js +2 -2
  38. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +30 -8
  39. package/dist/components/shell/inventory/binding-dialog.vue.d.ts +2 -2
  40. package/dist/components/shell/inventory/binding-ui.vue.d.ts +27 -5
  41. package/dist/composable/usePromise.d.ts +41 -0
  42. package/dist/{decimal-Ko0ukH7B.js → decimal-D0mDm48J.js} +1 -1
  43. package/dist/feature-GZEf4CLT.js +17427 -0
  44. package/dist/{format-unit-display-C1sTywhb.js → format-unit-display-Dl7kbJn1.js} +60 -60
  45. package/dist/{index-BAyyesj2.js → index-BglOiNaU.js} +7 -6
  46. package/dist/{index-WgH7CKAS.js → index-DKLr1Nm9.js} +1 -1
  47. package/dist/main.d.ts +1 -0
  48. package/dist/{stock-BVCXjojk.js → stock-V0Qm2pTD.js} +3 -3
  49. package/dist/stores/feature.d.ts +3 -20
  50. package/dist/stores/integration/foodmarkethub.d.ts +1 -1
  51. package/dist/stores/integration/netsuite.d.ts +22 -7
  52. package/dist/stores/inventory.d.ts +132 -44
  53. package/dist/stores/location.d.ts +137 -137
  54. package/dist/{supplier-Brxhm840.js → supplier-DK4PWcz4.js} +4 -4
  55. package/dist/tsconfig.app.tsbuildinfo +1 -1
  56. package/dist/{use-ingredient-select-dialog-DCAYNC6e.js → use-ingredient-select-dialog-BfJ-qHni.js} +1 -1
  57. package/dist/{use-inventory-binding-dialog-TYwx9mzF.js → use-inventory-binding-dialog-C5IYjwW5.js} +1 -1
  58. package/dist/views/adjustment-template/wastage-template/actions.d.ts +228 -228
  59. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +2 -2
  60. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +1 -1
  61. package/dist/views/adjustment-template/wastage-template/table.d.ts +234 -234
  62. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +140 -136
  63. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +420 -408
  64. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +4 -4
  65. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +252 -252
  66. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +252 -252
  67. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +12 -12
  68. package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +2 -2
  69. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +8 -8
  70. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +3 -3
  71. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +4 -4
  72. package/dist/views/integration/components/ApplyProduct.vue.d.ts +2 -2
  73. package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +2 -2
  74. package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +2 -2
  75. package/dist/views/integration/components/netsuite/InventoryTransfer.vue.d.ts +48 -0
  76. package/dist/views/integration/components/netsuite/InventoryTransferIngredientTable.vue.d.ts +180 -0
  77. package/dist/views/integration/components/netsuite/NetSuiteSideSheet.vue.d.ts +24 -0
  78. package/dist/views/integration/components/netsuite/NetSuiteSideSheetProps.d.ts +8 -0
  79. package/dist/views/integration/components/netsuite/{AddLocationDialog.vue.d.ts → business/AddLocationDialog.vue.d.ts} +204 -204
  80. package/dist/views/integration/components/netsuite/{LocationConfigurationDialog.vue.d.ts → business/BusinessNetSuiteSideSheet.vue.d.ts} +3 -3
  81. package/dist/views/integration/components/netsuite/{LocationConfigurationDialogProps.d.ts → business/BusinessNetSuiteSideSheetProps.d.ts} +1 -5
  82. package/dist/views/integration/components/netsuite/{NetSuiteLocationField.vue.d.ts → business/NetSuiteLocationField.vue.d.ts} +11 -9
  83. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +665 -637
  84. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +22 -22
  85. package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +44 -44
  86. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +11 -11
  87. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +614 -0
  88. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1190 -1142
  89. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +1192 -1144
  90. package/dist/views/receive-request/constants/po-action-to-ui-style.d.ts +6 -0
  91. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +46 -2
  92. package/dist/views/recipe/components/recipe-override-form-field/RecipeOverrideFormField.vue.d.ts +61 -0
  93. package/dist/views/recipe/composables/use-recipe-overrides-form-field.d.ts +10 -0
  94. package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
  95. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +14 -14
  96. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +22 -22
  97. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +17 -17
  98. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +11 -11
  99. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +805 -805
  100. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +805 -805
  101. package/dist/views/transfer-template/composables/useTransferTemplateHelper.d.ts +33 -33
  102. package/dist/vue-i18n-3LoKMrMa.js +2365 -0
  103. package/package.json +8 -5
  104. package/dist/IntegrationView-DXxwE0z8.js +0 -2148
  105. package/dist/RecipeView-m7aSOTrT.js +0 -616
  106. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DqImAdxA.js +0 -1746
  107. package/dist/vue-i18n-B-kKlljK.js +0 -2365
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-BJ7h3Nr6.js";
1
+ import { _ as f } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-qrYebXqE.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,12 +1,12 @@
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 S, withCtx as T, nextTick as X } from "vue";
2
- import { a as Z, P as ee, aS as ne, j as B, aT as oe, N, L as te, F as ie } from "./app-Cryb1Kx8.js";
3
- import { u as le } from "./use-inventory-binding-dialog-TYwx9mzF.js";
4
- import { _ as re, c as se, d as de } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DbN_e9U8.js";
1
+ import { defineComponent as H, computed as _, reactive as J, resolveComponent as x, openBlock as m, createElementBlock as f, createVNode as c, withCtx as F, createElementVNode as n, toDisplayString as v, unref as l, createBlock as V, createCommentVNode as b, Fragment as S, renderList as T, nextTick as Q } from "vue";
2
+ import { a as Z, O as ee, aX as ne, i as B, aY as oe, L as N, K as te, F as ie } from "./app-DtLEhFCD.js";
3
+ import { u as le } from "./use-inventory-binding-dialog-C5IYjwW5.js";
4
+ import { _ as re, c as se, d as de } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-BAsfttD3.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" }, 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 = {
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" }, ye = { class: "flex flex-col" }, fe = { 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" }, be = { class: "flex flex-col" }, xe = {
9
+ }, be = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, ge = { 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
12
  }, he = { class: "w-[200px]" }, Ve = {
@@ -18,7 +18,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
18
18
  }, Ae = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, Re = { class: "line-clamp-1" }, Se = { class: "w-[150px]" }, Te = {
19
19
  key: 0,
20
20
  class: "w-[52px]"
21
- }, Ne = { class: "flex flex-col px-12 pb-4" }, je = /* @__PURE__ */ J({
21
+ }, Ne = { class: "flex flex-col px-12 pb-4" }, ze = /* @__PURE__ */ H({
22
22
  __name: "InventoryBindingForm",
23
23
  props: {
24
24
  id: {},
@@ -31,74 +31,74 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
31
31
  },
32
32
  emits: ["update:modelValue", "click:pick-inventory-bindings"],
33
33
  setup(P, { emit: M }) {
34
- const { t: p } = ae(), F = Z(), I = _(() => F.inventory.recipe ?? []), h = _(() => F.inventory.sku ?? []), r = P, f = M, w = _(() => ee({
34
+ const { t: p } = ae(), I = Z(), w = _(() => I.inventory.recipe ?? []), h = _(() => I.inventory.sku ?? []), r = P, y = M, U = _(() => ee({
35
35
  bindings: r.modelValue,
36
- recipes: I.value.map((o) => o._id === r.id ? {
37
- ...o,
36
+ recipes: w.value.map((t) => t._id === r.id ? {
37
+ ...t,
38
38
  contains: r.modelValue
39
- } : o),
39
+ } : t),
40
40
  skus: h.value
41
- }).inventoryBindings.filter((o) => "error" in o && o.error).map((o) => o).filter((o) => o.reason === ne.enum.circularDependency)), D = _(
42
- () => new Set(w.value.map((e) => {
43
- var t;
44
- return (t = e.bindingPaths[0]) == null ? void 0 : t.id;
41
+ }).inventoryBindings.filter((t) => "error" in t && t.error).map((t) => t).filter((t) => t.reason === ne.enum.circularDependency)), D = _(
42
+ () => new Set(U.value.map((e) => {
43
+ var o;
44
+ return (o = e.bindingPaths[0]) == null ? void 0 : o.id;
45
45
  }))
46
- ), K = _(() => r.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: $, promptRecipesBinding: j } = le();
47
- async function z() {
46
+ ), K = _(() => r.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: $, promptRecipesBinding: z } = le();
47
+ async function G() {
48
48
  if (r.iframeMode) {
49
- f("click:pick-inventory-bindings", "RECIPE");
49
+ y("click:pick-inventory-bindings", "RECIPE");
50
50
  return;
51
51
  }
52
- j(
52
+ z(
53
53
  r.modelValue,
54
- (e) => f("update:modelValue", e),
54
+ (e) => y("update:modelValue", e),
55
55
  r.id ? [r.id] : []
56
56
  );
57
57
  }
58
- const U = _(() => r.modelValue.filter((e) => e.type === "SKU") ?? []);
59
- async function G() {
58
+ const E = _(() => r.modelValue.filter((e) => e.type === "SKU") ?? []);
59
+ async function L() {
60
60
  if (r.iframeMode) {
61
- f("click:pick-inventory-bindings", "SKU");
61
+ y("click:pick-inventory-bindings", "SKU");
62
62
  return;
63
63
  }
64
64
  $(
65
65
  r.modelValue,
66
- (e) => f("update:modelValue", e),
66
+ (e) => y("update:modelValue", e),
67
67
  r.excludeBindingId,
68
68
  r.id ? [r.id] : []
69
69
  );
70
70
  }
71
- function L(e, t, o) {
72
- const s = +t;
73
- let d = o;
74
- t.length > 0 && isFinite(s) ? d = o.map((a) => (a.id !== e || (a.amount = te(s)), a)) : d = o.map((a) => (a.id !== e || (a.amount = { amount: 0, precision: 0 }), a)), f("update:modelValue", d);
71
+ function Y(e, o, t) {
72
+ const s = +o;
73
+ let d = t;
74
+ o.length > 0 && isFinite(s) ? d = t.map((a) => (a.id !== e || (a.amount = te(s)), a)) : d = t.map((a) => (a.id !== e || (a.amount = { amount: 0, precision: 0 }), a)), y("update:modelValue", d);
75
75
  }
76
- function E(e, t) {
77
- const o = t.filter((s) => s.id !== e);
78
- f("update:modelValue", o);
76
+ function C(e, o) {
77
+ const t = o.filter((s) => s.id !== e);
78
+ y("update:modelValue", t);
79
79
  }
80
- function C(e) {
81
- var o, s;
80
+ function A(e) {
81
+ var t, s;
82
82
  if (e.type !== ie.enum.SKU)
83
83
  throw new Error("Non-SKU binding does not have unit");
84
- if (!((o = h.value.find((d) => d._id === e.id)) == null ? void 0 : o.unit))
84
+ if (!((t = h.value.find((d) => d._id === e.id)) == null ? void 0 : t.unit))
85
85
  throw new Error(`Cannot find ingredient: ${e.id}`);
86
86
  return (s = h.value.find((d) => d._id === e.id)) == null ? void 0 : s.unit;
87
87
  }
88
- function Y(e) {
88
+ function j(e) {
89
89
  return { amount: e.amount, measurement: e.measurement };
90
90
  }
91
- function O(e, t, o) {
92
- const s = o.map((d) => d.id !== e ? d : {
91
+ function O(e, o, t) {
92
+ const s = t.map((d) => d.id !== e ? d : {
93
93
  ...d,
94
- amount: t.amount,
95
- measurement: t.measurement
94
+ amount: o.amount,
95
+ measurement: o.measurement
96
96
  });
97
- f("update:modelValue", s);
97
+ y("update:modelValue", s);
98
98
  }
99
- const A = Q({});
99
+ const R = J({});
100
100
  function W(e) {
101
- return A[e.id] ?? {
101
+ return R[e.id] ?? {
102
102
  modelValue: {
103
103
  amount: e.amount,
104
104
  measurement: e.measurement
@@ -106,65 +106,70 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
106
106
  amountAsString: B(e.amount)
107
107
  };
108
108
  }
109
- function q(e, t) {
110
- X(() => {
111
- A[e.id] = {
109
+ function X(e, o) {
110
+ Q(() => {
111
+ R[e.id] = {
112
112
  modelValue: {
113
113
  amount: e.amount,
114
114
  measurement: e.measurement
115
115
  },
116
- amountAsString: t
116
+ amountAsString: o
117
117
  };
118
118
  });
119
119
  }
120
- return (e, t) => {
121
- const o = x("FmFormGroup"), s = x("FmButton"), d = x("FmIcon"), a = x("FmTextField"), H = x("FmTooltip");
122
- return m(), y("div", ue, [
123
- c(o, {
120
+ return (e, o) => {
121
+ const t = x("FmFormGroup"), s = x("FmButton"), d = x("FmIcon"), a = x("FmTextField"), q = x("FmTooltip");
122
+ return m(), f("div", ue, [
123
+ c(t, {
124
124
  disabled: e.disabled,
125
125
  "model-value": e.modelValue,
126
126
  rules: e.rules
127
- }, null, 8, ["disabled", "model-value", "rules"]),
127
+ }, {
128
+ label: F(() => o[0] || (o[0] = [
129
+ n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Define the inventory bindings for this recipe or ingredient. ", -1)
130
+ ])),
131
+ _: 1
132
+ }, 8, ["disabled", "model-value", "rules"]),
128
133
  n("div", me, [
129
134
  n("div", ce, [
130
135
  n("div", pe, v(l(p)("inventory.inventoryBindings.recipe")), 1),
131
- e.readonly ? g("", !0) : (m(), V(s, {
136
+ e.readonly ? b("", !0) : (m(), V(s, {
132
137
  key: 0,
133
138
  variant: "secondary",
134
139
  "text-color": "primary",
135
140
  "border-color": "primary",
136
141
  label: l(p)("inventory.inventoryBindings.linkRecipe"),
137
142
  "prepend-icon": "link",
138
- onClick: z
143
+ onClick: G
139
144
  }, null, 8, ["label"]))
140
145
  ]),
141
- n("div", fe, [
142
- n("div", ye, [
146
+ n("div", ye, [
147
+ n("div", fe, [
143
148
  n("div", ve, v(l(p)("inventory.inventoryBindings.recipe")), 1),
144
- t[0] || (t[0] = n("div", { class: "w-[200px]" }, null, -1)),
145
- t[1] || (t[1] = n("div", { class: "w-[52px]" }, null, -1))
149
+ o[1] || (o[1] = n("div", { class: "w-[200px]" }, null, -1)),
150
+ o[2] || (o[2] = n("div", { class: "w-[52px]" }, null, -1))
146
151
  ]),
147
- (m(!0), y(R, null, S(K.value, (i) => (m(), V(o, {
152
+ (m(!0), f(S, null, T(K.value, (i) => (m(), V(t, {
148
153
  key: i.id,
149
154
  disabled: e.disabled,
150
155
  modelValue: +l(B)(i.amount ?? { amount: 1, precision: 0 }),
151
156
  rules: [l(oe)(0), l(N)(0)]
152
157
  }, {
153
- default: T(({ invalid: k }) => {
154
- var b;
158
+ default: F(({ invalid: k }) => {
159
+ var g;
155
160
  return [
156
161
  n("div", _e, [
157
- n("div", ge, [
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, [
162
+ n("div", be, [
163
+ n("div", ge, [
164
+ n("div", null, v((g = w.value.find((u) => u._id === i.id)) == null ? void 0 : g.name), 1),
165
+ D.value.has(i.id) ? (m(), f("div", xe, [
161
166
  c(d, {
162
167
  name: "error",
163
168
  color: "system-error-400",
164
169
  size: "sm"
165
170
  }),
166
- t[2] || (t[2] = n("div", null, "There is circular linking in your binding.", -1))
167
- ])) : g("", !0)
171
+ o[3] || (o[3] = n("div", null, "There is circular linking in your binding.", -1))
172
+ ])) : b("", !0)
168
173
  ])
169
174
  ]),
170
175
  n("div", he, [
@@ -172,18 +177,18 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
172
177
  class: "w-full",
173
178
  disabled: e.disabled,
174
179
  modelValue: +l(B)(i.amount ?? { amount: 1, precision: 0 }),
175
- "onUpdate:modelValue": (u) => L(i.id, u, e.modelValue),
180
+ "onUpdate:modelValue": (u) => Y(i.id, u, e.modelValue),
176
181
  invalid: k
177
182
  }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
178
183
  ]),
179
- e.readonly ? g("", !0) : (m(), y("div", Ve, [
184
+ e.readonly ? b("", !0) : (m(), f("div", Ve, [
180
185
  c(s, {
181
186
  disabled: e.disabled,
182
187
  type: "button",
183
188
  variant: "plain",
184
189
  icon: "delete",
185
190
  "icon-color": "#000000",
186
- onClick: (u) => E(i.id, e.modelValue)
191
+ onClick: (u) => C(i.id, e.modelValue)
187
192
  }, null, 8, ["disabled", "onClick"])
188
193
  ]))
189
194
  ])
@@ -196,32 +201,32 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
196
201
  n("div", Be, [
197
202
  n("div", ke, [
198
203
  n("div", Fe, v(l(p)("inventory.inventoryBindings.ingredient")), 1),
199
- e.readonly ? g("", !0) : (m(), V(s, {
204
+ e.readonly ? b("", !0) : (m(), V(s, {
200
205
  key: 0,
201
206
  variant: "secondary",
202
207
  "text-color": "primary",
203
208
  "border-color": "primary",
204
209
  label: l(p)("inventory.inventoryBindings.linkIngredient"),
205
210
  "prepend-icon": "link",
206
- onClick: G
211
+ onClick: L
207
212
  }, null, 8, ["label"]))
208
213
  ]),
209
214
  n("div", Ie, [
210
215
  n("div", we, [
211
216
  n("div", Ue, v(l(p)("inventory.inventoryBindings.ingredient")), 1),
212
217
  n("div", Ee, v(l(p)("inventory.inventoryBindings.amount")), 1),
213
- t[3] || (t[3] = n("div", { class: "w-[52px]" }, null, -1))
218
+ o[4] || (o[4] = n("div", { class: "w-[52px]" }, null, -1))
214
219
  ]),
215
- (m(!0), y(R, null, S(U.value, (i, k) => {
216
- var b;
217
- return m(), y("div", {
220
+ (m(!0), f(S, null, T(E.value, (i, k) => {
221
+ var g;
222
+ return m(), f("div", {
218
223
  key: i.id,
219
224
  class: "flex flex-col border-b border-fm-color-neutral-gray-100"
220
225
  }, [
221
226
  n("div", Ce, [
222
227
  n("div", Ae, [
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, {
228
+ n("span", Re, v((g = h.value.find((u) => u._id === i.id)) == null ? void 0 : g.name), 1),
229
+ U.value.length ? (m(), V(q, {
225
230
  key: 0,
226
231
  variant: "plain",
227
232
  placement: "bottom",
@@ -229,7 +234,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
229
234
  "hide-arrow": !0,
230
235
  "z-index": 50
231
236
  }, {
232
- default: T(() => [
237
+ default: F(() => [
233
238
  c(d, {
234
239
  name: "error",
235
240
  size: "sm",
@@ -237,39 +242,39 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
237
242
  })
238
243
  ]),
239
244
  _: 1
240
- }, 8, ["content"])) : g("", !0)
245
+ }, 8, ["content"])) : b("", !0)
241
246
  ]),
242
247
  n("div", Se, [
243
248
  c(re, {
244
- "model-value": Y(i),
249
+ "model-value": j(i),
245
250
  "onUpdate:modelValue": (u) => O(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",
251
+ "onUpdate:amount": (u) => X(i, u),
252
+ unit: A(i),
253
+ placement: k === E.value.length - 1 ? "top" : "bottom",
249
254
  "convert-amount-on-change-unit": "",
250
255
  disabled: e.readonly
251
256
  }, null, 8, ["model-value", "onUpdate:modelValue", "onUpdate:amount", "unit", "placement", "disabled"])
252
257
  ]),
253
- e.readonly ? g("", !0) : (m(), y("div", Te, [
258
+ e.readonly ? b("", !0) : (m(), f("div", Te, [
254
259
  c(s, {
255
260
  disabled: e.disabled,
256
261
  type: "button",
257
262
  variant: "tertiary",
258
263
  icon: "delete",
259
- onClick: (u) => E(i.id, e.modelValue)
264
+ onClick: (u) => C(i.id, e.modelValue)
260
265
  }, null, 8, ["disabled", "onClick"])
261
266
  ]))
262
267
  ]),
263
268
  n("div", Ne, [
264
- c(o, {
269
+ c(t, {
265
270
  modelValue: +l(B)(i.amount ?? { amount: 1, precision: 0 }),
266
271
  rules: [l(N)(0)]
267
272
  }, null, 8, ["modelValue", "rules"]),
268
- c(o, {
273
+ c(t, {
269
274
  modelValue: W(i),
270
275
  rules: [
271
276
  l(se)(),
272
- l(de)(C(i))
277
+ l(de)(A(i))
273
278
  ]
274
279
  }, null, 8, ["modelValue", "rules"])
275
280
  ])
@@ -282,5 +287,5 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
282
287
  }
283
288
  });
284
289
  export {
285
- je as _
290
+ ze as _
286
291
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as l, resolveComponent as m, openBlock as c, 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-Cryb1Kx8.js";
4
+ import { F as r } from "./app-DtLEhFCD.js";
5
5
  const w = /* @__PURE__ */ l({
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 { L as d } from "./app-Cryb1Kx8.js";
2
+ import { K as d } from "./app-DtLEhFCD.js";
3
3
  const _ = ["value", "disabled"], D = /* @__PURE__ */ y({
4
4
  __name: "NumberPrecisionInput",
5
5
  props: {
@@ -1,17 +1,17 @@
1
- import { ax as d, ay as f, Y as _, u as h } from "./app-Cryb1Kx8.js";
2
- import { useCoreStore as y } from "@feedmepos/mf-common";
3
- import { ref as F, defineComponent as v, resolveComponent as p, openBlock as k, createElementBlock as g, renderSlot as x, createVNode as l, withCtx as S } from "vue";
4
- function I(e, t) {
1
+ import { aw as d, ax as f, X as _, u as h } from "./app-DtLEhFCD.js";
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 x, createVNode as l, withCtx as S } 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,
@@ -23,7 +23,7 @@ async function A(e, t) {
23
23
  await f(r, t);
24
24
  }
25
25
  const m = _((e, t) => {
26
- const r = h(), n = y();
26
+ const r = h(), n = F();
27
27
  return {
28
28
  async getInventoryForecast() {
29
29
  var s;
@@ -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 = F(w());
54
+ const c = y(O());
55
55
  function C() {
56
56
  return {
57
57
  // state
@@ -1,11 +1,11 @@
1
- import { defineComponent as Q, ref as z, computed as r, resolveComponent as s, openBlock as I, createBlock as B, unref as v, createSlots as X, withCtx as u, createElementVNode as h, normalizeClass as Z, createVNode as n, normalizeStyle as ee, Teleport as te, h as f } from "vue";
2
- import { u as oe, a as ne, aN as ae, B as se, _ as le, af as H } from "./app-Cryb1Kx8.js";
3
- import { useBreakpoints as ie, useDialog as re, useSnackbar as ue, components as N } from "@feedmepos/ui-library";
4
- import { u as ce } from "./vue-i18n-B-kKlljK.js";
1
+ import { defineComponent as Q, ref as D, computed as r, resolveComponent as s, openBlock as I, createBlock as B, unref as v, createSlots as X, withCtx as u, createElementVNode as h, normalizeClass as Z, createVNode as n, normalizeStyle as ee, Teleport as te, h as f } from "vue";
2
+ import { u as oe, a as ne, aM as ae, z as se, _ as le, ae as H } from "./app-DtLEhFCD.js";
3
+ import { useBreakpoints as ie, useDialog as re, useSnackbar as ue, components as R } from "@feedmepos/ui-library";
4
+ import { u as ce } from "./vue-i18n-3LoKMrMa.js";
5
5
  const me = { class: "flex flex-col py-8" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, ge = /* @__PURE__ */ Q({
6
6
  __name: "PublishView",
7
7
  setup(ye) {
8
- const { t } = ce(), { breakpoints: x } = ie(), l = oe(), A = ne(), S = ae(), g = z(!1), c = r(() => A.state.inventory.updatedAt ? A.state.inventory.updatedAt : null), R = se(), C = re(), Y = ue(), $ = r(() => l.locations), _ = r(() => x.value.xs || x.value.sm), U = r(() => _.value ? 10 : 20), q = r(() => [
8
+ const { t } = ce(), { breakpoints: x } = ie(), l = oe(), A = ne(), S = ae(), g = D(!1), c = r(() => A.state.inventory.updatedAt ? A.state.inventory.updatedAt : null), Y = se(), C = re(), N = ue(), $ = r(() => l.locations), _ = r(() => x.value.xs || x.value.sm), U = r(() => _.value ? 10 : 20), q = r(() => [
9
9
  {
10
10
  label: t("inventory.common.refresh"),
11
11
  value: "refresh",
@@ -30,7 +30,7 @@ const me = { class: "flex flex-col py-8" }, pe = { class: "fm-typo-en-body-md-40
30
30
  break;
31
31
  }
32
32
  }
33
- const w = z(!1), K = [
33
+ const w = D(!1), K = [
34
34
  {
35
35
  value: "publish",
36
36
  label: t("inventory.publish.actions.publishAll")
@@ -48,7 +48,7 @@ const me = { class: "flex flex-col py-8" }, pe = { class: "fm-typo-en-body-md-40
48
48
  header: () => t("inventory.publish.columns.type"),
49
49
  enableSorting: !0,
50
50
  cell(e) {
51
- return f(N.FmChip, {
51
+ return f(R.FmChip, {
52
52
  color: "primary",
53
53
  label: e.row.original.type
54
54
  });
@@ -94,7 +94,7 @@ const me = { class: "flex flex-col py-8" }, pe = { class: "fm-typo-en-body-md-40
94
94
  },
95
95
  t(o ? "inventory.publish.status.published" : "inventory.publish.status.outdated")
96
96
  ),
97
- !o && !m ? f(N.FmButton, {
97
+ !o && !m ? f(R.FmButton, {
98
98
  class: "tertiary",
99
99
  variant: "secondary",
100
100
  icon: "sync",
@@ -105,7 +105,7 @@ const me = { class: "flex flex-col py-8" }, pe = { class: "fm-typo-en-body-md-40
105
105
  primaryActions: { text: t("inventory.common.publish"), close: !0 },
106
106
  secondaryActions: { text: "Cancel", close: !0 }
107
107
  }).onPrimary(async () => {
108
- await S.publishInventory(a.split("_")[1]), await l.readLocations(), Y.open({ message: "Publish request submitted", type: "success" });
108
+ await S.publishInventory(a.split("_")[1]), await l.readLocations(), N.open({ message: "Publish request submitted", type: "success" });
109
109
  });
110
110
  }
111
111
  }) : null
@@ -150,7 +150,7 @@ const me = { class: "flex flex-col py-8" }, pe = { class: "fm-typo-en-body-md-40
150
150
  ])
151
151
  }, [
152
152
  n(G, {
153
- style: ee(v(R).tableHeight),
153
+ style: ee(v(Y).tableHeight),
154
154
  "column-defs": j,
155
155
  "row-data": $.value,
156
156
  loading: !v(l)._currentLocation || g.value,
@@ -160,7 +160,7 @@ const me = { class: "flex flex-col py-8" }, pe = { class: "fm-typo-en-body-md-40
160
160
  "list-row": u((i) => [
161
161
  n(p, { row: i }, {
162
162
  default: u((d) => {
163
- var F, k, M, y, P, L, T, V, b, D;
163
+ var F, k, M, y, P, L, T, V, b, z;
164
164
  return [
165
165
  h("div", me, [
166
166
  h("div", pe, [
@@ -172,7 +172,7 @@ const me = { class: "flex flex-col py-8" }, pe = { class: "fm-typo-en-body-md-40
172
172
  h("div", de, [
173
173
  n(m, {
174
174
  render: (V = (T = (L = d.name) == null ? void 0 : L.column) == null ? void 0 : T.columnDef) == null ? void 0 : V.cell,
175
- props: (D = (b = d.name) == null ? void 0 : b.getContext) == null ? void 0 : D.call(b)
175
+ props: (z = (b = d.name) == null ? void 0 : b.getContext) == null ? void 0 : z.call(b)
176
176
  }, null, 8, ["render", "props"])
177
177
  ])
178
178
  ])
@@ -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 { ar as y, ae as R } from "./app-Cryb1Kx8.js";
4
- const C = { class: "purchase-box" }, A = { valign: "bottom" }, N = { class: "text-right" }, P = { class: "header" }, D = { class: "sub-header" }, E = { class: "caption" }, O = { class: "address" }, S = { 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, ad as R } from "./app-DtLEhFCD.js";
4
+ const C = { class: "purchase-box" }, A = { valign: "bottom" }, N = { class: "text-right" }, P = { class: "header" }, D = { class: "sub-header" }, E = { class: "caption" }, O = { class: "address" }, S = { class: "text-right" }, q = { 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 = {
@@ -63,8 +63,8 @@ const C = { class: "purchase-box" }, A = { valign: "bottom" }, N = { class: "tex
63
63
  ]),
64
64
  t("td", S, [
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", q, 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 }, [