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

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-CEmWJ9lp.js → App-DReDvY0M.js} +73 -85
  2. package/dist/{ApprovalView-jDll4AVe.js → ApprovalView-BMZlYmRk.js} +27 -24
  3. package/dist/{BindingsDialog-BC_gRSif.js → BindingsDialog-Y2K4I7H7.js} +4 -4
  4. package/dist/{BindingsPicker-BJsGoBzM.js → BindingsPicker-DKBq9c37.js} +9 -8
  5. package/dist/{BindingsTable-DSdwNK_q.js → BindingsTable-45v4SDfp.js} +22 -18
  6. package/dist/{ClosingTemplateView-BzG16gl5.js → ClosingTemplateView-CKJVYSbj.js} +286 -272
  7. package/dist/FmDroppableField-8RzKjEdL.js +154 -0
  8. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DW2IOPST.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CMEOp-0r.js} +23 -22
  9. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BhdcqRh-.js +436 -0
  10. package/dist/FmMultiselectDialog-D7YtdoyJ.js +415 -0
  11. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DDuZEf_v.js → FmUnitInput.vue_vue_type_script_setup_true_lang-C1DjyjyH.js} +49 -48
  12. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CiNvnaaE.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-zjvFEF5C.js} +5 -5
  13. package/dist/{IngredientGroupView-DL8eBhkk.js → IngredientGroupView-BuP-HGeg.js} +69 -63
  14. package/dist/IngredientsView-DMRN-odY.js +1613 -0
  15. package/dist/{IntegrationView-BeFT5S24.js → IntegrationView-kYCaKG0o.js} +95 -92
  16. package/dist/{InventoryBindingForm-DJ3uwq_X.js → InventoryBindingForm-BXHq4h-n.js} +1 -1
  17. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DIviTipZ.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CVxJ_bV3.js} +27 -25
  18. package/dist/{InventoryBindingSummary-CvB5j9xq.js → InventoryBindingSummary-Bjasfc_v.js} +1 -1
  19. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CQPdnXEF.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DM0C4raP.js} +1 -1
  20. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BdscwUGn.js → PremiumBadge.vue_vue_type_script_setup_true_lang-C3O3JebE.js} +24 -23
  21. package/dist/{PurchaseOrderPrintPreview-3_6nBajH.js → PurchaseOrderPrintPreview-CmjkfTTS.js} +14 -13
  22. package/dist/{ReceiveRequestView-B_0UldQ7.js → ReceiveRequestView-aQZJO8sq.js} +1302 -1325
  23. package/dist/{RecipeView-D9p0Ou_I.js → RecipeView-DXO43tFi.js} +85 -79
  24. package/dist/{StockView-TIdUgG3O.js → StockView-D9no-mrA.js} +1446 -1338
  25. package/dist/{SupplierView-B1b9Otcr.js → SupplierView-DAx7E7sR.js} +787 -2325
  26. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +135 -0
  27. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DCA0RUfu.js +1209 -0
  28. package/dist/TransferTemplateView-CfxdQF1t.js +1261 -0
  29. package/dist/{UnitView-BrpzJ7D3.js → UnitView-CQPGZ8-r.js} +44 -40
  30. package/dist/{WarehouseView-CjbdEy8o.js → WarehouseView-jy-RNCgy.js} +100 -94
  31. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  32. package/dist/api/closing.d.ts +0 -1
  33. package/dist/api/netsuite.d.ts +3 -3
  34. package/dist/app-KnSMkJBV.js +33496 -0
  35. package/dist/app.d.ts +0 -56
  36. package/dist/app.js +2 -2
  37. package/dist/components/FmMultiselectDialogProps.d.ts +0 -1
  38. package/dist/components/row-action.enum.d.ts +0 -1
  39. package/dist/composable/defineDeepModel.d.ts +1 -1
  40. package/dist/date2-CIeUqUIc.js +117 -0
  41. package/dist/dayjs.min-Df5jSnDJ.js +282 -0
  42. package/dist/{decimal-DHYZglKx.js → decimal-BAc9M88Q.js} +1 -1
  43. package/dist/defineDeepModel-BfuQAIoM.js +13 -0
  44. package/dist/{feature-G-NnqKcY.js → feature-dwB4OxRQ.js} +6 -12
  45. package/dist/format-time-from-id-BbvzyIN6.js +15 -0
  46. package/dist/{format-unit-display-BWqJsV_R.js → format-unit-display-BBWblJEt.js} +171 -162
  47. package/dist/fuzzy-B9ryZ9VZ.js +41 -0
  48. package/dist/index-BN0CY3sZ.js +22277 -0
  49. package/dist/index-Bj1fJum-.js +45 -0
  50. package/dist/index-C4yL_7rR.js +10545 -0
  51. package/dist/netsuite-ByWOS6tI.js +194 -0
  52. package/dist/normalizeArguments-DP7Hrren.js +1552 -0
  53. package/dist/router/name.d.ts +0 -2
  54. package/dist/row-action.enum-PMKMRrZR.js +50 -0
  55. package/dist/rules-C12nWDD1.js +198 -0
  56. package/dist/stores/feature.d.ts +0 -1
  57. package/dist/stores/integration/netsuite.d.ts +2 -70
  58. package/dist/stores/inventory.d.ts +4 -1
  59. package/dist/style.css +1 -1
  60. package/dist/{supplier-DTUUR48O.js → supplier-DJC0UZWv.js} +15 -15
  61. package/dist/tsconfig.app.tsbuildinfo +1 -1
  62. package/dist/{use-inventory-binding-dialog-DvC_i-Ih.js → use-inventory-binding-dialog-PEQbFRvO.js} +11 -10
  63. package/dist/use-template-enabled-locations-2-k9g5t8tt.js +86 -0
  64. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +192 -24
  65. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +193 -25
  66. package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +0 -2
  67. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +0 -6
  68. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +0 -9
  69. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +0 -9
  70. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
  71. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  72. package/dist/xlsx-B4XHad7S.js +24004 -0
  73. package/dist/xlsx.util-BSO4SHJi.js +78 -0
  74. package/package.json +3 -3
  75. package/dist/ClosingDraftView-UfWdRXb-.js +0 -1190
  76. package/dist/IngredientsView-B_HC9fgq.js +0 -1657
  77. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-jUYB4L8Y.js +0 -1275
  78. package/dist/TransferTemplateView-Dxk5b-2j.js +0 -1264
  79. package/dist/api/adjustment-template.d.ts +0 -23
  80. package/dist/api/closing-draft.d.ts +0 -6
  81. package/dist/app-AcMtTQ07.js +0 -84202
  82. package/dist/index-Bt8vaUdT.js +0 -12087
  83. package/dist/stock-VZXyPw2C.js +0 -125
  84. package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +0 -2
  85. package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +0 -18
  86. package/dist/views/adjustment-template/import/export.d.ts +0 -60
  87. package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +0 -2
  88. package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +0 -22
  89. package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +0 -6
  90. package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +0 -2
  91. package/dist/views/adjustment-template/wastage-template/actions.d.ts +0 -1295
  92. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +0 -16
  93. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +0 -35
  94. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +0 -20
  95. package/dist/views/adjustment-template/wastage-template/props.d.ts +0 -29
  96. package/dist/views/adjustment-template/wastage-template/table.d.ts +0 -1273
  97. package/dist/views/closing-draft/ClosingDraftView.vue.d.ts +0 -2
  98. package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts +0 -22
  99. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +0 -621
  100. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +0 -25
  101. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +0 -3621
  102. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +0 -1
  103. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +0 -19
  104. package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +0 -4
  105. package/dist/views/receive-request/components/netsuite/NetSuiteInfo.vue.d.ts +0 -12
  106. package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +0 -13
  107. package/dist/views/receive-request/components/netsuite/NetSuiteSync.vue.d.ts +0 -12
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-DIviTipZ.js";
1
+ import { _ as f } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-CVxJ_bV3.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,7 +1,9 @@
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-AcMtTQ07.js";
3
- import { u as le } from "./use-inventory-binding-dialog-DvC_i-Ih.js";
4
- import { _ as se, c as re, d as de } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DDuZEf_v.js";
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";
5
7
  import { useI18n as ae } from "@feedmepos/mf-common";
6
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 = {
7
9
  class: "flex items-center w-full border-b border-fm-color-neutral-gray-100",
@@ -12,7 +14,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
12
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 = {
13
15
  class: "flex items-center w-full",
14
16
  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({
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({
16
18
  __name: "InventoryBindingForm",
17
19
  props: {
18
20
  id: {},
@@ -23,20 +25,20 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
23
25
  disabled: { type: Boolean }
24
26
  },
25
27
  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({
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({
28
30
  bindings: s.modelValue,
29
31
  recipes: k.value.map((t) => t._id === s.id ? {
30
32
  ...t,
31
33
  contains: s.modelValue
32
34
  } : t),
33
35
  skus: b.value
34
- }).inventoryBindings.filter((t) => t.error).filter((t) => t.reason === ne.enum.circularDependency)), K = y(
36
+ }).inventoryBindings.filter((t) => t.error).filter((t) => t.reason === ee.enum.circularDependency)), D = y(
35
37
  () => new Set(F.value.map((e) => {
36
38
  var o;
37
39
  return (o = e.bindingPaths[0]) == null ? void 0 : o.id;
38
40
  }))
39
- ), D = y(() => s.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: $, promptRecipesBinding: z } = le();
41
+ ), K = y(() => s.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: $, promptRecipesBinding: z } = ie();
40
42
  async function G() {
41
43
  if (s.iframeMode) {
42
44
  p("click:pick-inventory-bindings", "RECIPE");
@@ -49,7 +51,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
49
51
  );
50
52
  }
51
53
  const I = y(() => s.modelValue.filter((e) => e.type === "SKU") ?? []);
52
- async function L() {
54
+ async function j() {
53
55
  if (s.iframeMode) {
54
56
  p("click:pick-inventory-bindings", "SKU");
55
57
  return;
@@ -61,7 +63,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
61
63
  s.id ? [s.id] : []
62
64
  );
63
65
  }
64
- function j(e, o, t) {
66
+ function L(e, o, t) {
65
67
  const r = +o;
66
68
  let d = t;
67
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);
@@ -72,7 +74,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
72
74
  }
73
75
  function U(e) {
74
76
  var t, r;
75
- if (e.type !== ie.enum.SKU)
77
+ if (e.type !== ne.enum.SKU)
76
78
  throw new Error("Non-SKU binding does not have unit");
77
79
  if (!((t = b.value.find((d) => d._id === e.id)) == null ? void 0 : t.unit))
78
80
  throw new Error(`Cannot find ingredient: ${e.id}`);
@@ -81,7 +83,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
81
83
  function Y(e) {
82
84
  return { amount: e.amount, measurement: e.measurement };
83
85
  }
84
- function O(e, o, t) {
86
+ function H(e, o, t) {
85
87
  const r = t.map((d) => d.id !== e ? d : {
86
88
  ...d,
87
89
  amount: o.amount,
@@ -89,8 +91,8 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
89
91
  });
90
92
  p("update:modelValue", r);
91
93
  }
92
- const E = J({});
93
- function Q(e) {
94
+ const E = Q({});
95
+ function O(e) {
94
96
  return E[e.id] ?? {
95
97
  modelValue: {
96
98
  amount: e.amount,
@@ -136,11 +138,11 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
136
138
  o[0] || (o[0] = n("div", { class: "w-[200px]" }, null, -1)),
137
139
  o[1] || (o[1] = n("div", { class: "w-[52px]" }, null, -1))
138
140
  ]),
139
- (f(!0), x(C, null, A(D.value, (i) => (f(), R(t, {
141
+ (f(!0), x(C, null, A(K.value, (i) => (f(), R(t, {
140
142
  key: i.id,
141
143
  disabled: e.disabled,
142
144
  modelValue: +l(h)(i.amount ?? { amount: 1, precision: 0 }),
143
- rules: [l(oe)(0), l(P)(0)]
145
+ rules: [l(oe)(0), l(N)(0)]
144
146
  }, {
145
147
  default: S(({ invalid: V }) => {
146
148
  var _;
@@ -149,7 +151,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
149
151
  n("div", ge, [
150
152
  n("div", xe, [
151
153
  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, [
154
+ D.value.has(i.id) ? (f(), x("div", be, [
153
155
  m(d, {
154
156
  name: "error",
155
157
  color: "system-error-400",
@@ -164,7 +166,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
164
166
  class: "w-full",
165
167
  disabled: e.disabled,
166
168
  modelValue: +l(h)(i.amount ?? { amount: 1, precision: 0 }),
167
- "onUpdate:modelValue": (u) => j(i.id, u, e.modelValue),
169
+ "onUpdate:modelValue": (u) => L(i.id, u, e.modelValue),
168
170
  invalid: V
169
171
  }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
170
172
  ]),
@@ -194,7 +196,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
194
196
  "border-color": "primary",
195
197
  label: l(c)("inventory.inventoryBindings.linkIngredient"),
196
198
  "prepend-icon": "link",
197
- onClick: L
199
+ onClick: j
198
200
  }, null, 8, ["label"])
199
201
  ]),
200
202
  n("div", Ie, [
@@ -233,7 +235,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
233
235
  n("div", Se, [
234
236
  m(se, {
235
237
  "model-value": Y(i),
236
- "onUpdate:modelValue": (u) => O(i.id, u, e.modelValue),
238
+ "onUpdate:modelValue": (u) => H(i.id, u, e.modelValue),
237
239
  "onUpdate:amount": (u) => W(i, u),
238
240
  unit: U(i),
239
241
  placement: V === I.value.length - 1 ? "top" : "bottom",
@@ -250,13 +252,13 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
250
252
  }, null, 8, ["disabled", "onClick"])
251
253
  ])
252
254
  ]),
253
- n("div", Pe, [
255
+ n("div", Ne, [
254
256
  m(t, {
255
257
  modelValue: +l(h)(i.amount ?? { amount: 1, precision: 0 }),
256
- rules: [l(P)(0)]
258
+ rules: [l(N)(0)]
257
259
  }, null, 8, ["modelValue", "rules"]),
258
260
  m(t, {
259
- modelValue: Q(i),
261
+ modelValue: O(i),
260
262
  rules: [
261
263
  l(re)(),
262
264
  l(de)(U(i))
@@ -272,5 +274,5 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
272
274
  }
273
275
  });
274
276
  export {
275
- ze as _
277
+ je as _
276
278
  };
@@ -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-AcMtTQ07.js";
4
+ import { F as r } from "./app-KnSMkJBV.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-AcMtTQ07.js";
2
+ import { c as d } from "./rules-C12nWDD1.js";
3
3
  const _ = ["value", "disabled"], D = /* @__PURE__ */ y({
4
4
  __name: "NumberPrecisionInput",
5
5
  props: {
@@ -1,22 +1,23 @@
1
- import { az as d, aA as f, W as _, u as h } from "./app-AcMtTQ07.js";
1
+ import { u as d, w as f } from "./xlsx-B4XHad7S.js";
2
+ import { j as _, u as h } from "./app-KnSMkJBV.js";
2
3
  import { useCoreStore as F } from "@feedmepos/mf-common";
3
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";
4
- function I(e, t) {
5
+ function w(e, t) {
5
6
  return t.map((r) => typeof r.selector == "function" ? r.selector(e) : e[r.selector]);
6
7
  }
7
- function O(e, t) {
8
- const r = t.map((o) => o.name), n = e.map((o) => I(o, t));
8
+ function I(e, t) {
9
+ const r = t.map((o) => o.name), n = e.map((o) => w(o, t));
9
10
  return d.aoa_to_sheet([r, ...n]);
10
11
  }
11
- async function A(e, t) {
12
+ async function C(e, t) {
12
13
  const r = d.book_new();
13
14
  for (const n of e) {
14
- const o = O(
15
+ const o = I(
15
16
  n.data,
16
- n.columns.map((a) => typeof a == "string" ? {
17
- name: a,
18
- selector: a
19
- } : a)
17
+ n.columns.map((s) => typeof s == "string" ? {
18
+ name: s,
19
+ selector: s
20
+ } : s)
20
21
  );
21
22
  d.book_append_sheet(r, o, n.name);
22
23
  }
@@ -26,8 +27,8 @@ const m = _((e, t) => {
26
27
  const r = h(), n = F();
27
28
  return {
28
29
  async getInventoryForecast() {
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`;
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`;
31
32
  try {
32
33
  return await t.get(i);
33
34
  } catch {
@@ -36,23 +37,23 @@ const m = _((e, t) => {
36
37
  },
37
38
  async getPurchaseOrderForecast(o) {
38
39
  var u;
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}`;
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}`;
40
41
  try {
41
- return await t.get(s);
42
+ return await t.get(a);
42
43
  } catch {
43
44
  return { skus: [] };
44
45
  }
45
46
  }
46
47
  };
47
48
  });
48
- function w() {
49
+ function O() {
49
50
  return {
50
51
  inventoryForecast: { skus: [] },
51
52
  purchaseOrderForecast: { skus: [] }
52
53
  };
53
54
  }
54
- const c = y(w());
55
- function C() {
55
+ const c = y(O());
56
+ function D() {
56
57
  return {
57
58
  // state
58
59
  get inventoryForecast() {
@@ -78,11 +79,11 @@ function C() {
78
79
  }
79
80
  };
80
81
  }
81
- function D(e) {
82
+ function N(e) {
82
83
  let t = e.substring(e.indexOf("_") + 1);
83
84
  return t.includes("_") && (t = t.substring(0, t.lastIndexOf("_"))), Number.isNaN(Date.parse(t)) ? null : new Date(t).toISOString();
84
85
  }
85
- const b = { class: "flex items-center gap-8" }, B = "Experience enhanced inventory features with premium plan.", N = /* @__PURE__ */ v({
86
+ const b = { class: "flex items-center gap-8" }, B = "Experience enhanced inventory features with premium plan.", L = /* @__PURE__ */ v({
86
87
  __name: "PremiumBadge",
87
88
  props: {
88
89
  zIndex: {}
@@ -108,8 +109,8 @@ const b = { class: "flex items-center gap-8" }, B = "Experience enhanced invento
108
109
  }
109
110
  });
110
111
  export {
111
- N as _,
112
- A as e,
113
- D as i,
114
- C as u
112
+ L as _,
113
+ C as e,
114
+ N as i,
115
+ D as u
115
116
  };
@@ -1,6 +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 d, 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 o, 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-AcMtTQ07.js";
3
+ import { v as y } from "./app-KnSMkJBV.js";
4
+ import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
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 = {
5
6
  class: "text-left",
6
7
  style: { width: "20%" }
@@ -51,7 +52,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
51
52
  t("div", S, [
52
53
  i(l(s.value.supplier.line1), 1),
53
54
  e[2] || (e[2] = t("br", null, null, -1)),
54
- s.value.supplier.line2 ? (n(), u(d, { key: 0 }, [
55
+ s.value.supplier.line2 ? (n(), u(o, { key: 0 }, [
55
56
  i(l(s.value.supplier.line2), 1),
56
57
  e[1] || (e[1] = t("br", null, null, -1))
57
58
  ], 64)) : p("", !0),
@@ -67,7 +68,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
67
68
  t("div", q, [
68
69
  i(l(s.value.buyer.line1), 1),
69
70
  e[7] || (e[7] = t("br", null, null, -1)),
70
- s.value.buyer.line2 ? (n(), u(d, { key: 0 }, [
71
+ s.value.buyer.line2 ? (n(), u(o, { key: 0 }, [
71
72
  i(l(s.value.buyer.line2), 1),
72
73
  e[6] || (e[6] = t("br", null, null, -1))
73
74
  ], 64)) : p("", !0),
@@ -99,7 +100,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
99
100
  ])
100
101
  ], -1)),
101
102
  t("tbody", null, [
102
- (n(!0), u(d, null, v(s.value.items, (r, a) => (n(), u("tr", { key: a }, [
103
+ (n(!0), u(o, null, v(s.value.items, (r, a) => (n(), u("tr", { key: a }, [
103
104
  t("td", L, l(r.code), 1),
104
105
  t("td", U, l(r.description), 1),
105
106
  t("td", {
@@ -119,7 +120,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
119
120
  t("div", z, [
120
121
  e[12] || (e[12] = t("hr", null, null, -1)),
121
122
  e[13] || (e[13] = i(" Delivery History: ")),
122
- (n(!0), u(d, null, v(s.value.deliveryOrders, (r, a) => (n(), u("div", {
123
+ (n(!0), u(o, null, v(s.value.deliveryOrders, (r, a) => (n(), u("div", {
123
124
  key: a,
124
125
  style: { padding: "10px 30px" }
125
126
  }, [
@@ -135,11 +136,11 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
135
136
  t("div", null, [
136
137
  t("table", null, [
137
138
  t("tbody", null, [
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)
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)
143
144
  ]))), 128))
144
145
  ])
145
146
  ])
@@ -148,7 +149,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
148
149
  ])
149
150
  ]));
150
151
  }
151
- }), $ = /* @__PURE__ */ C(G, [["__scopeId", "data-v-92a03d5c"]]);
152
+ }), tt = /* @__PURE__ */ C(G, [["__scopeId", "data-v-92a03d5c"]]);
152
153
  export {
153
- $ as default
154
+ tt as default
154
155
  };