@feedmepos/mf-inventory-portal 0.0.23-dev.2 → 0.0.23-dev.20

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 (112) hide show
  1. package/dist/{App-DRE3c1lJ.js → App-N2myASr3.js} +59 -51
  2. package/dist/{ApprovalView-B4ZYcS3B.js → ApprovalView-B87DpnNq.js} +20 -23
  3. package/dist/{BindingsDialog-Df1yrWHU.js → BindingsDialog-DehCgt1T.js} +7 -7
  4. package/dist/{BindingsPicker-BERMWh4w.js → BindingsPicker-BBtJ3rBB.js} +7 -8
  5. package/dist/{BindingsTable-DRIapOWW.js → BindingsTable-CfHuy-K1.js} +16 -20
  6. package/dist/ClosingDraftView-BYZ1mZrG.js +1116 -0
  7. package/dist/{ClosingTemplateView-CbFn3Sdy.js → ClosingTemplateView-CAL9jYaf.js} +66 -76
  8. package/dist/{FmDroppableField-8RzKjEdL.js → FmDroppableField-CC7RiBoR.js} +1 -1
  9. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C4G9LaXv.js +282 -0
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BHSGZyJL.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BBf7jmJz.js} +121 -119
  11. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DH5IQchQ.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DjTvrLPs.js} +7 -7
  12. package/dist/{IngredientGroupView-DoETcEvV.js → IngredientGroupView-X0ST4tW9.js} +30 -36
  13. package/dist/IngredientsView-BUJXzpVr.js +1660 -0
  14. package/dist/{IntegrationView-D1HeBiGF.js → IntegrationView-QbuIwjec.js} +18 -20
  15. package/dist/{InventoryBindingForm-Dmz9BQ37.js → InventoryBindingForm-C1BR_h_3.js} +1 -1
  16. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DoyqVBOd.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CRwcFskQ.js} +15 -17
  17. package/dist/{InventoryBindingSummary-DrpwiRGZ.js → InventoryBindingSummary-gn3Gq1ok.js} +1 -1
  18. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-yNEswIEI.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-GY3FFm5_.js} +1 -1
  19. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Br4_VUza.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DVwtuUg9.js} +8 -8
  20. package/dist/{PurchaseOrderPrintPreview-cp671yWE.js → PurchaseOrderPrintPreview-FuOYaO56.js} +13 -14
  21. package/dist/ReceiveRequestView-BNz1brve.js +4186 -0
  22. package/dist/{RecipeView-CD_dAWLo.js → RecipeView-DRKTODfC.js} +58 -63
  23. package/dist/{StockView-DfUzFC1b.js → StockView-DnMcfkGG.js} +1338 -1446
  24. package/dist/{SupplierView-DB-zrNxh.js → SupplierView-DAnnWZUN.js} +2345 -783
  25. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BBARPa0S.js +1228 -0
  26. package/dist/TransferTemplateView-2qlKwwKg.js +1265 -0
  27. package/dist/{UnitView-BlC9-WOA.js → UnitView-u5wZGetF.js} +40 -44
  28. package/dist/{WarehouseView-CgEY87Lo.js → WarehouseView-Z80N7FJV.js} +67 -73
  29. package/dist/api/adjustment-template.d.ts +23 -0
  30. package/dist/api/bill.d.ts +2 -2
  31. package/dist/api/closing-draft.d.ts +6 -0
  32. package/dist/api/closing.d.ts +1 -0
  33. package/dist/api/netsuite.d.ts +69 -0
  34. package/dist/app-Fc2FPGhO.js +58871 -0
  35. package/dist/app.d.ts +56 -0
  36. package/dist/app.js +2 -2
  37. package/dist/components/FmMinMaxInputRules.d.ts +4 -1
  38. package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
  39. package/dist/components/row-action.enum.d.ts +1 -0
  40. package/dist/composable/defineDeepModel.d.ts +1 -1
  41. package/dist/{decimal-D7BCubZO.js → decimal-BDD-e5Lb.js} +1 -1
  42. package/dist/{feature-BR-MsGYt.js → feature-BMEyYowI.js} +23 -9
  43. package/dist/format-unit-display-DvlR_z--.js +1210 -0
  44. package/dist/index-CR22QBdu.js +12087 -0
  45. package/dist/netsuite-CqMWgzKo.js +251 -0
  46. package/dist/router/name.d.ts +2 -0
  47. package/dist/stock-sIy40ix1.js +110 -0
  48. package/dist/stores/feature.d.ts +2 -0
  49. package/dist/stores/integration/netsuite.d.ts +81 -0
  50. package/dist/stores/inventory.d.ts +1 -4
  51. package/dist/style.css +1 -1
  52. package/dist/{supplier-aBuwVukl.js → supplier-Cf24JqTH.js} +15 -15
  53. package/dist/tsconfig.app.tsbuildinfo +1 -1
  54. package/dist/{use-inventory-binding-dialog-CLQ0LUmW.js → use-inventory-binding-dialog-Br9Uv9o8.js} +10 -11
  55. package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
  56. package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
  57. package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
  58. package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
  59. package/dist/views/adjustment-template/wastage-template/actions.d.ts +1295 -0
  60. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
  61. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
  62. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
  63. package/dist/views/adjustment-template/wastage-template/props.d.ts +29 -0
  64. package/dist/views/adjustment-template/wastage-template/table.d.ts +1273 -0
  65. package/dist/views/closing-draft/ClosingDraftView.vue.d.ts +2 -0
  66. package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts +22 -0
  67. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +451 -0
  68. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +25 -0
  69. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +2601 -0
  70. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -0
  71. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +19 -0
  72. package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +4 -0
  73. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +24 -192
  74. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +24 -192
  75. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +34 -34
  76. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -0
  77. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +54 -54
  78. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +54 -54
  79. package/dist/views/receive-request/helper/check-netsuite-subsidiary.helper.d.ts +1 -0
  80. package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
  81. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
  82. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  83. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +8 -8
  84. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +96 -96
  85. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +96 -96
  86. package/dist/{xlsx-BbtURTDy.js → xlsx-sL0sD2HQ.js} +1 -1
  87. package/dist/{xlsx.util-zYS4OJFi.js → xlsx.util-D2Tdwf8J.js} +1 -1
  88. package/package.json +3 -3
  89. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-7JYNssTm.js +0 -267
  90. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-KbYSywk2.js +0 -436
  91. package/dist/FmMultiselectDialog-Da9JMCYa.js +0 -415
  92. package/dist/IngredientsView-DHAhj9pV.js +0 -1613
  93. package/dist/ReceiveRequestView-C1WBlpho.js +0 -4082
  94. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
  95. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-2mzqFGCz.js +0 -1144
  96. package/dist/TransferTemplateView-CaAJrqU6.js +0 -1262
  97. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  98. package/dist/app-CAyFhmAz.js +0 -33457
  99. package/dist/date2-D9i5izMt.js +0 -117
  100. package/dist/dayjs.min-SJKP9zBL.js +0 -282
  101. package/dist/defineDeepModel-DS4Shctf.js +0 -13
  102. package/dist/format-time-from-id-CUby60uW.js +0 -15
  103. package/dist/format-unit-display-D25Al2JZ.js +0 -1198
  104. package/dist/fuzzy-BryBtMz_.js +0 -41
  105. package/dist/index-ByJbUSIQ.js +0 -45
  106. package/dist/index-CFA_VFyX.js +0 -10545
  107. package/dist/index-CTvgBOum.js +0 -22280
  108. package/dist/netsuite-D0G4B60k.js +0 -146
  109. package/dist/normalizeArguments-DP7Hrren.js +0 -1552
  110. package/dist/row-action.enum-PMKMRrZR.js +0 -50
  111. package/dist/rules-DxVY0b7F.js +0 -198
  112. package/dist/use-template-enabled-locations-2-BgTiwy_3.js +0 -86
@@ -1,11 +1,10 @@
1
- import { ref as L, onUnmounted as k, defineComponent as h, watch as b, onMounted as U, computed as R, resolveComponent as T, openBlock as S, createElementBlock as I, unref as v, createVNode as E, createElementVNode as p, toDisplayString as w, createBlock as B, createCommentVNode as F } from "vue";
2
- import { u as M, a as D, R as e, g as s, b as H } from "./app-CAyFhmAz.js";
3
- import { useCoreStore as x, useI18n as G } from "@feedmepos/mf-common";
4
- import { useRouter as A, useRoute as K } from "vue-router";
5
- import { u as V } from "./feature-BR-MsGYt.js";
6
- import { u as $ } from "./netsuite-D0G4B60k.js";
1
+ import { ref as w, onUnmounted as F, defineComponent as h, watch as I, onMounted as G, computed as g, resolveComponent as R, openBlock as S, createElementBlock as b, unref as v, createVNode as E, createElementVNode as p, toDisplayString as x, createBlock as U, createCommentVNode as M } from "vue";
2
+ import { u as k, a as D, R as e, g as s, _ as H, b as K } from "./app-Fc2FPGhO.js";
3
+ import { useCoreStore as A, useI18n as B } from "@feedmepos/mf-common";
4
+ import { useRouter as C, useRoute as W } from "vue-router";
5
+ import { u as O } from "./feature-BMEyYowI.js";
6
+ import { u as $ } from "./netsuite-CqMWgzKo.js";
7
7
  import { u as Q } from "./useTabStorage-BkIVScW_.js";
8
- import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
8
  import { u as j } from "./googlemap-Dm8ERVai.js";
10
9
  import "./array-hChJVZLE.js";
11
10
  function z() {
@@ -14,9 +13,9 @@ function z() {
14
13
  isLoading: !1
15
14
  };
16
15
  }
17
- const _ = L(z());
16
+ const _ = w(z());
18
17
  function q() {
19
- const l = A();
18
+ const l = C();
20
19
  if (!_.value.loadingHookInstalled) {
21
20
  _.value.loadingHookInstalled = !0;
22
21
  const n = l.beforeEach(() => {
@@ -24,7 +23,7 @@ function q() {
24
23
  }), i = l.afterEach(() => {
25
24
  _.value.isLoading = !1;
26
25
  });
27
- k(() => {
26
+ F(() => {
28
27
  _.value.loadingHookInstalled = !1, n(), i();
29
28
  });
30
29
  }
@@ -43,50 +42,51 @@ const J = {
43
42
  }, Y = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, Z = { class: "fm-typo-en-title-lg-600" }, ee = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, te = { class: "flex gap-16" }, oe = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, ne = { href: "https://feedme.ai/form" }, re = /* @__PURE__ */ h({
44
43
  __name: "InventoryView",
45
44
  setup(l) {
46
- const n = M(), i = D(), u = $(), a = x(), c = A(), o = q(), y = V(), { t: f } = G();
47
- b(
45
+ const n = k(), i = D(), u = $(), a = A(), c = C(), o = q(), y = O(), { t: d } = B();
46
+ I(
48
47
  [() => a.sessionUser.value, () => a.currentBusiness.value],
49
48
  ([t, r]) => {
50
- d(t, r);
49
+ f(t, r);
51
50
  }
52
- ), U(() => {
51
+ ), G(async () => {
52
+ await a.readBusinesses();
53
53
  const t = a.sessionUser.value, r = a.currentBusiness.value;
54
- d(t, r);
54
+ f(t, r);
55
55
  });
56
- function d(t, r) {
57
- !t || !r || g();
56
+ function f(t, r) {
57
+ !t || !r || T();
58
58
  }
59
- async function g() {
59
+ async function T() {
60
60
  return await n.init(), await u.readSetting().catch((t) => {
61
61
  console.error("error on reading netsuite store", t);
62
62
  }), await i.init();
63
63
  }
64
- const N = R(() => c.currentRoute.value.name === e.TRANSFER_TEMPLATE ? y.enablePoTemplate : !0);
64
+ const N = g(() => c.currentRoute.value.name === e.TRANSFER_TEMPLATE ? y.enablePoTemplate : !0);
65
65
  return (t, r) => {
66
- const m = T("FmSpacer"), P = T("FmCircularProgress"), C = T("FmButton"), O = T("RouterView");
67
- return S(), I("div", null, [
68
- v(o).isLoading ? (S(), I("div", J, [
66
+ const m = R("FmSpacer"), P = R("FmCircularProgress"), L = R("FmButton"), V = R("RouterView");
67
+ return S(), b("div", null, [
68
+ v(o).isLoading ? (S(), b("div", J, [
69
69
  E(m),
70
70
  p("div", null, [
71
71
  E(P, { size: "xl" })
72
72
  ]),
73
73
  r[0] || (r[0] = p("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
74
74
  E(m)
75
- ])) : N.value ? v(a).sessionUser.value ? (S(), B(O, { key: 2 })) : F("", !0) : (S(), I("div", X, [
75
+ ])) : N.value ? v(a).sessionUser.value ? (S(), U(V, { key: 2 })) : M("", !0) : (S(), b("div", X, [
76
76
  p("div", Y, [
77
- p("div", Z, w(v(f)("inventory.common.proPlan.title")), 1),
78
- p("div", ee, w(v(f)("inventory.common.proPlan.subtitle")), 1)
77
+ p("div", Z, x(v(d)("inventory.common.proPlan.title")), 1),
78
+ p("div", ee, x(v(d)("inventory.common.proPlan.subtitle")), 1)
79
79
  ]),
80
80
  p("div", te, [
81
81
  p("a", oe, [
82
- E(C, {
83
- label: v(f)("inventory.common.proPlan.comparePlans"),
82
+ E(L, {
83
+ label: v(d)("inventory.common.proPlan.comparePlans"),
84
84
  variant: "secondary"
85
85
  }, null, 8, ["label"])
86
86
  ]),
87
87
  p("a", ne, [
88
- E(C, {
89
- label: v(f)("inventory.common.proPlan.callUs"),
88
+ E(L, {
89
+ label: v(d)("inventory.common.proPlan.callUs"),
90
90
  "prepend-icon": "call"
91
91
  }, null, 8, ["label"])
92
92
  ])
@@ -98,11 +98,11 @@ const J = {
98
98
  }), se = { class: "h-full flex flex-col overflow-auto py-16" }, ae = /* @__PURE__ */ h({
99
99
  __name: "NavigationTab",
100
100
  setup(l) {
101
- const n = K(), i = A(), u = x(), a = V(), c = Q(), { t: o } = G();
102
- b([() => u.currentBusiness.value, () => n.name], ([t, r]) => {
101
+ const n = W(), i = C(), u = A(), a = O(), c = Q(), { t: o } = B();
102
+ I([() => u.currentBusiness.value, () => n.name], ([t, r]) => {
103
103
  (t == null ? void 0 : t.menuVersion) === "v3" && (r === e.INGREDIENTS || r === e.RECIPE || r === e.UNIT) && i.push({ name: e.STOCK });
104
104
  });
105
- const y = R(() => {
105
+ const y = g(() => {
106
106
  var r;
107
107
  const t = [
108
108
  {
@@ -116,6 +116,14 @@ const J = {
116
116
  {
117
117
  label: s(e.CLOSING_TEMPLATE, o),
118
118
  value: e.CLOSING_TEMPLATE
119
+ },
120
+ {
121
+ label: s(e.CLOSING_DRAFT, o),
122
+ value: e.CLOSING_DRAFT
123
+ },
124
+ {
125
+ label: s(e.WASTAGE_TEMPLATE, o),
126
+ value: e.WASTAGE_TEMPLATE
119
127
  }
120
128
  ]
121
129
  },
@@ -178,7 +186,7 @@ const J = {
178
186
  return ((r = u.currentBusiness.value) == null ? void 0 : r.menuVersion) === "v3" ? t.filter(
179
187
  (m) => m.value !== e.INGREDIENTS && m.value !== e.RECIPE && m.value !== e.UNIT
180
188
  ) : t;
181
- }), f = R({
189
+ }), d = g({
182
190
  get() {
183
191
  if (n.name)
184
192
  return String(n.name);
@@ -186,35 +194,35 @@ const J = {
186
194
  set(t) {
187
195
  t && i.push({ name: t });
188
196
  }
189
- }), d = R(
197
+ }), f = g(
190
198
  () => {
191
199
  var t;
192
200
  return `NavigationTab.${(t = u.currentBusiness.value) == null ? void 0 : t._id}`;
193
201
  }
194
- ), g = L(!1), N = R({
202
+ ), T = w(!1), N = g({
195
203
  get() {
196
- return g.value;
204
+ return T.value;
197
205
  },
198
206
  set(t) {
199
- g.value = t, t || c.setItem(d.value, "true");
207
+ T.value = t, t || c.setItem(f.value, "true");
200
208
  }
201
209
  });
202
- return b([() => d.value], () => {
203
- g.value = !1, setTimeout(() => {
204
- N.value = !c.getItem(d.value);
210
+ return I([() => f.value], () => {
211
+ T.value = !1, setTimeout(() => {
212
+ N.value = !c.getItem(f.value);
205
213
  }, 2e3);
206
214
  }), (t, r) => {
207
- const m = T("FmCollapsibleTabs");
208
- return S(), I("div", se, [
215
+ const m = R("FmCollapsibleTabs");
216
+ return S(), b("div", se, [
209
217
  E(m, {
210
- modelValue: f.value,
211
- "onUpdate:modelValue": r[0] || (r[0] = (P) => f.value = P),
218
+ modelValue: d.value,
219
+ "onUpdate:modelValue": r[0] || (r[0] = (P) => d.value = P),
212
220
  items: y.value
213
221
  }, null, 8, ["modelValue", "items"])
214
222
  ]);
215
223
  };
216
224
  }
217
- }), le = /* @__PURE__ */ W(ae, [["__scopeId", "data-v-0fe980e2"]]);
225
+ }), le = /* @__PURE__ */ H(ae, [["__scopeId", "data-v-fb8b7488"]]);
218
226
  typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
219
227
  let l, n;
220
228
  return { promise: new Promise((u, a) => {
@@ -224,11 +232,11 @@ typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
224
232
  typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(l) {
225
233
  return await new Promise((n) => setTimeout(n, l)), Promise.resolve(this);
226
234
  });
227
- const Se = /* @__PURE__ */ h({
235
+ const Ee = /* @__PURE__ */ h({
228
236
  __name: "App",
229
237
  setup(l) {
230
- const n = x(), i = j(), u = H();
231
- U(() => {
238
+ const n = A(), i = j(), u = K();
239
+ G(() => {
232
240
  if (window.location.href.includes("print-preview")) {
233
241
  n.setEmbedded(!0);
234
242
  return;
@@ -236,7 +244,7 @@ const Se = /* @__PURE__ */ h({
236
244
  n.registerSidebarComponent(le), i.initGoogleMap(u.appApi.googleMap).catch(() => {
237
245
  console.error("Google map cannot be loaded");
238
246
  });
239
- }), b([() => n.currentCountry.value], () => {
247
+ }), I([() => n.currentCountry.value], () => {
240
248
  a();
241
249
  });
242
250
  async function a() {
@@ -247,9 +255,9 @@ const Se = /* @__PURE__ */ h({
247
255
  console.error("error when trying to reset businesses:", o);
248
256
  }
249
257
  }
250
- return (c, o) => (S(), B(re));
258
+ return (c, o) => (S(), U(re));
251
259
  }
252
260
  });
253
261
  export {
254
- Se as default
262
+ Ee as default
255
263
  };
@@ -1,18 +1,15 @@
1
- import { defineComponent as ae, ref as g, watch as oe, computed as b, resolveComponent as re, openBlock as x, createBlock as J, unref as e, withCtx as y, createElementVNode as s, normalizeClass as ne, createVNode as n, normalizeStyle as se, toDisplayString as le, createElementBlock as ce, createCommentVNode as ie, Teleport as pe, mergeProps as ue } from "vue";
2
- import { u as me, w as v } from "./app-CAyFhmAz.js";
3
- import { b as de, u as fe, _ as ve, a as _e } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-KbYSywk2.js";
4
- import { a as he, b as De, _ as ge } from "./TransferDetails.vue_vue_type_script_setup_true_lang-2mzqFGCz.js";
5
- import { c as K } from "./date2-D9i5izMt.js";
6
- import { _ as be, F as _ } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
7
- import { useBreakpoints as xe } from "@feedmepos/ui-library";
8
- import { useI18n as ye } from "@feedmepos/mf-common";
1
+ import { defineComponent as ae, ref as g, watch as oe, computed as b, resolveComponent as re, openBlock as y, createBlock as J, unref as e, withCtx as x, createElementVNode as s, normalizeClass as ne, createVNode as n, normalizeStyle as se, toDisplayString as le, createElementBlock as ce, createCommentVNode as ie, Teleport as pe, mergeProps as ue } from "vue";
2
+ import { u as me, aq as v, ay as de, a5 as K, p as fe, q as ve, r as _e, s as he, v as _ } from "./app-Fc2FPGhO.js";
3
+ import { a as De, b as ge, _ as be } from "./TransferDetails.vue_vue_type_script_setup_true_lang-BBARPa0S.js";
4
+ import { useBreakpoints as ye } from "@feedmepos/ui-library";
5
+ import { useI18n as xe } from "@feedmepos/mf-common";
9
6
  const we = { class: "flex flex-col py-8" }, Re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ke = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Oe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, Se = {
10
7
  key: 0,
11
8
  class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
12
- }, Te = { class: "pt-8" }, Ne = /* @__PURE__ */ ae({
9
+ }, Te = { class: "pt-8" }, Ve = /* @__PURE__ */ ae({
13
10
  __name: "ApprovalView",
14
11
  setup(Ce) {
15
- const o = he("approval"), { columnDefs: Q } = De("approval", o), W = me();
12
+ const o = De("approval"), { columnDefs: Q } = ge("approval", o), W = me();
16
13
  v.object({
17
14
  name: v.string().optional().nullable(),
18
15
  start: v.date().optional().nullable(),
@@ -38,7 +35,7 @@ const we = { class: "flex flex-col py-8" }, Re = { class: "fm-typo-en-body-md-40
38
35
  return;
39
36
  }
40
37
  });
41
- const h = g(""), { breakpoints: R } = xe(), D = b(() => R.value.xs || R.value.sm), X = b(() => D.value ? 10 : 20), Z = fe(), { t: k } = ye(), B = b(() => [
38
+ const h = g(""), { breakpoints: R } = ye(), D = b(() => R.value.xs || R.value.sm), X = b(() => D.value ? 10 : 20), Z = fe(), { t: k } = xe(), B = b(() => [
42
39
  {
43
40
  label: k("common.refresh"),
44
41
  value: "refresh"
@@ -52,12 +49,12 @@ const we = { class: "flex flex-col py-8" }, Re = { class: "fm-typo-en-body-md-40
52
49
  }
53
50
  return (c, l) => {
54
51
  const ee = re("FmTable");
55
- return x(), J(ve, {
52
+ return y(), J(ve, {
56
53
  title: e(k)("inventory.transfer.approval.title"),
57
54
  actions: B.value,
58
55
  "onClick:action": I
59
56
  }, {
60
- default: y(() => [
57
+ default: x(() => [
61
58
  s("div", {
62
59
  class: ne([
63
60
  "flex flex-col gap-8 max-h-full",
@@ -82,13 +79,13 @@ const we = { class: "flex flex-col py-8" }, Re = { class: "fm-typo-en-body-md-40
82
79
  onRowClick: l[1] || (l[1] = (r) => e(o).promptShowTransferDetails(r.original.purchaseOrder, r.original)),
83
80
  "page-size": X.value
84
81
  }, {
85
- "list-row": y((r) => [
86
- n(be, {
82
+ "list-row": x((r) => [
83
+ n(he, {
87
84
  row: r,
88
85
  onRowClick: (t) => e(o).promptShowTransferDetails(t.purchaseOrder, t)
89
86
  }, {
90
- default: y((t) => {
91
- var O, S, T, i, C, z, F, M, p, $, V, u, Y, m, q, L, N, P, j, d, A, E, H, U, f, G;
87
+ default: x((t) => {
88
+ var O, S, T, i, C, q, z, M, p, $, F, u, V, m, Y, L, N, P, j, d, A, E, H, U, f, G;
92
89
  return [
93
90
  s("div", we, [
94
91
  s("div", Re, [
@@ -99,12 +96,12 @@ const we = { class: "flex flex-col py-8" }, Re = { class: "fm-typo-en-body-md-40
99
96
  ]),
100
97
  s("div", ke, [
101
98
  n(e(_), {
102
- render: (M = (F = (z = t.to_name) == null ? void 0 : z.column) == null ? void 0 : F.columnDef) == null ? void 0 : M.cell,
99
+ render: (M = (z = (q = t.to_name) == null ? void 0 : q.column) == null ? void 0 : z.columnDef) == null ? void 0 : M.cell,
103
100
  props: ($ = (p = t.to_name) == null ? void 0 : p.getContext) == null ? void 0 : $.call(p)
104
101
  }, null, 8, ["render", "props"])
105
102
  ]),
106
- s("div", Oe, le((q = (m = (Y = (u = (V = r.original.purchaseOrder) == null ? void 0 : V.items) == null ? void 0 : u.map) == null ? void 0 : Y.call(u, (te) => `${te.name}`)) == null ? void 0 : m.join) == null ? void 0 : q.call(m, ", ")), 1),
107
- (L = r.original.purchaseOrder) != null && L.ref ? (x(), ce("div", Se, [
103
+ s("div", Oe, le((Y = (m = (V = (u = (F = r.original.purchaseOrder) == null ? void 0 : F.items) == null ? void 0 : u.map) == null ? void 0 : V.call(u, (te) => `${te.name}`)) == null ? void 0 : m.join) == null ? void 0 : Y.call(m, ", ")), 1),
104
+ (L = r.original.purchaseOrder) != null && L.ref ? (y(), ce("div", Se, [
108
105
  n(e(_), {
109
106
  render: (j = (P = (N = t.purchaseOrder_ref) == null ? void 0 : N.column) == null ? void 0 : P.columnDef) == null ? void 0 : j.cell,
110
107
  props: (A = (d = t.purchaseOrder_ref) == null ? void 0 : d.getContext) == null ? void 0 : A.call(d)
@@ -125,8 +122,8 @@ const we = { class: "flex flex-col py-8" }, Re = { class: "fm-typo-en-body-md-40
125
122
  _: 1
126
123
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
127
124
  ], 2),
128
- (x(), J(pe, { to: "body" }, [
129
- n(ge, ue(e(o).transferDetailsProps.value, {
125
+ (y(), J(pe, { to: "body" }, [
126
+ n(be, ue(e(o).transferDetailsProps.value, {
130
127
  onSubmitted: e(o).fetchData
131
128
  }), null, 16, ["onSubmitted"])
132
129
  ]))
@@ -137,5 +134,5 @@ const we = { class: "flex flex-col py-8" }, Re = { class: "fm-typo-en-body-md-40
137
134
  }
138
135
  });
139
136
  export {
140
- Ne as default
137
+ Ve as default
141
138
  };
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as C, ref as o, onMounted as M, onUnmounted as F, watch as x, resolveComponent as l, openBlock as i, createElementBlock as c, createBlock as I, withCtx as R, createVNode as a, createCommentVNode as z, createElementVNode as P } from "vue";
2
- import { _ as V } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-DoyqVBOd.js";
3
- import { a as L, G as S } from "./app-CAyFhmAz.js";
4
- const U = {
2
+ import { _ as V } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-CRwcFskQ.js";
3
+ import { a as E, aE as L } from "./app-Fc2FPGhO.js";
4
+ const S = {
5
5
  key: 0,
6
6
  class: "flex justify-end gap-8 items-center"
7
- }, E = {
7
+ }, U = {
8
8
  key: 1,
9
9
  class: "p-24 flex items-center justify-center gap-16"
10
10
  }, D = /* @__PURE__ */ C({
11
11
  __name: "BindingsDialog",
12
12
  setup(N) {
13
- const p = L(), d = o(!0), s = o(new Array()), u = o(), t = S(y);
13
+ const p = E(), d = o(!0), s = o(new Array()), u = o(), t = L(y);
14
14
  async function y() {
15
15
  await p.readInventory(), u.value = t.onMessage("props:inventory-bindings", (e) => {
16
16
  d.value = !1, s.value = e;
@@ -53,7 +53,7 @@ const U = {
53
53
  ref_key: "resizeableRef",
54
54
  ref: m
55
55
  }, [
56
- d.value ? (i(), c("div", E, [
56
+ d.value ? (i(), c("div", U, [
57
57
  a(h, { size: "md" }),
58
58
  n[2] || (n[2] = P("div", null, "Loading bindings dialog...", -1))
59
59
  ])) : (i(), I(B, {
@@ -70,7 +70,7 @@ const U = {
70
70
  "iframe-mode": "",
71
71
  "onClick:pickInventoryBindings": k
72
72
  }, null, 8, ["model-value"]),
73
- r.value ? z("", !0) : (i(), c("div", U, [
73
+ r.value ? z("", !0) : (i(), c("div", S, [
74
74
  a(g, {
75
75
  type: "button",
76
76
  variant: "tertiary",
@@ -1,13 +1,12 @@
1
1
  import { defineComponent as S, computed as r, ref as l, onMounted as U, onUnmounted as V, resolveComponent as E, openBlock as p, createElementBlock as f, createVNode as u, createElementVNode as k } from "vue";
2
- import { F as M } from "./FmMultiselectDialog-Da9JMCYa.js";
3
- import { a as x, G as F } from "./app-CAyFhmAz.js";
4
- const z = {
2
+ import { a as x, aE as M, x as z } from "./app-Fc2FPGhO.js";
3
+ const F = {
5
4
  key: 0,
6
5
  class: "flex flex-col gap-16"
7
6
  }, K = { class: "flex justify-end gap-8 items-center" }, w = {
8
7
  key: 1,
9
8
  class: "p-24 flex items-center justify-center gap-16"
10
- }, A = /* @__PURE__ */ S({
9
+ }, N = /* @__PURE__ */ S({
11
10
  __name: "BindingsPicker",
12
11
  setup(L) {
13
12
  const d = x(), C = r(() => d.recipes), I = r(() => d.skus), g = l(!0), i = l(new Array()), a = l("RECIPE"), c = r(() => a.value === "SKU" ? I.value.map((s) => ({
@@ -63,7 +62,7 @@ const z = {
63
62
  ];
64
63
  }
65
64
  }
66
- }), _ = l(), o = F(B);
65
+ }), _ = l(), o = M(B);
67
66
  async function B() {
68
67
  await d.readInventory(), _.value = o.onMessage(
69
68
  "props:binding-items",
@@ -97,8 +96,8 @@ const z = {
97
96
  g.value ? (p(), f("div", w, [
98
97
  u(t, { size: "md" }),
99
98
  s[1] || (s[1] = k("div", null, "Loading bindings dialog...", -1))
100
- ])) : (p(), f("div", z, [
101
- u(M, {
99
+ ])) : (p(), f("div", F, [
100
+ u(z, {
102
101
  "model-value": b.value,
103
102
  "onUpdate:modelValue": s[0] || (s[0] = (m) => b.value = m),
104
103
  items: c.value
@@ -120,5 +119,5 @@ const z = {
120
119
  }
121
120
  });
122
121
  export {
123
- A as default
122
+ N as default
124
123
  };
@@ -1,11 +1,7 @@
1
- import { defineComponent as _, ref as c, provide as C, computed as f, resolveComponent as b, openBlock as p, createBlock as h, h as z, onMounted as B, onUnmounted as I, createElementBlock as y, createVNode as N, createElementVNode as x } from "vue";
2
- import { F as v, a as E, G as F } from "./app-CAyFhmAz.js";
3
- import "./index-CTvgBOum.js";
1
+ import { defineComponent as _, ref as c, provide as C, computed as f, resolveComponent as b, openBlock as p, createBlock as h, h as z, onMounted as B, onUnmounted as I, createElementBlock as y, createVNode as N, createElementVNode as E } from "vue";
2
+ import { F as v, a as x, aE as F } from "./app-Fc2FPGhO.js";
4
3
  import { components as L } from "@feedmepos/ui-library";
5
- import "./fuzzy-BryBtMz_.js";
6
- /* empty css */
7
4
  import "@feedmepos/mf-common";
8
- import "./dayjs.min-SJKP9zBL.js";
9
5
  const P = /* @__PURE__ */ _({
10
6
  __name: "binding-ui",
11
7
  props: {
@@ -26,17 +22,17 @@ const P = /* @__PURE__ */ _({
26
22
  C("closeDialog", () => {
27
23
  u.value.isOpen = !u.value.isOpen;
28
24
  });
29
- const s = k, m = d, a = f(() => s.items.map((e) => ({
25
+ const o = k, m = d, a = f(() => o.items.map((e) => ({
30
26
  key: e.key,
31
27
  name: e.name,
32
28
  _skuLinked: e.bindings.filter(
33
- ({ type: n, id: o }) => n === v.enum.SKU && s.skus.some((l) => l._id === o)
29
+ ({ type: n, id: s }) => n === v.enum.SKU && o.skus.some((l) => l._id === s)
34
30
  ).length,
35
31
  _recipeLinked: e.bindings.filter(
36
- ({ type: n, id: o }) => n === v.enum.RECIPE && s.recipes.some((l) => l._id === o)
32
+ ({ type: n, id: s }) => n === v.enum.RECIPE && o.recipes.some((l) => l._id === s)
37
33
  ).length,
38
34
  onUpdate: async () => {
39
- s.editable && m("click:open-binding-dialog", s.type, e);
35
+ o.editable && m("click:open-binding-dialog", o.type, e);
40
36
  }
41
37
  }))), g = [
42
38
  {
@@ -49,7 +45,7 @@ const P = /* @__PURE__ */ _({
49
45
  header: "Ingredient",
50
46
  size: 200,
51
47
  cell(i) {
52
- const e = a.value.find((o) => o.key === i.row.original.key), n = e == null ? void 0 : e._skuLinked;
48
+ const e = a.value.find((s) => s.key === i.row.original.key), n = e == null ? void 0 : e._skuLinked;
53
49
  return n === 1 ? "1 item" : n ? `${n} items` : "Not set";
54
50
  }
55
51
  },
@@ -58,7 +54,7 @@ const P = /* @__PURE__ */ _({
58
54
  header: "Recipe",
59
55
  size: 200,
60
56
  cell(i) {
61
- const e = a.value.find((o) => o.key === i.row.original.key), n = e == null ? void 0 : e._recipeLinked;
57
+ const e = a.value.find((s) => s.key === i.row.original.key), n = e == null ? void 0 : e._recipeLinked;
62
58
  return n === 1 ? "1 item" : n ? `${n} items` : "Not set";
63
59
  }
64
60
  },
@@ -94,19 +90,19 @@ const P = /* @__PURE__ */ _({
94
90
  }), R = {
95
91
  key: 1,
96
92
  class: "p-24 flex items-center justify-center gap-16"
97
- }, K = /* @__PURE__ */ _({
93
+ }, D = /* @__PURE__ */ _({
98
94
  __name: "BindingsTable",
99
95
  setup(k) {
100
- const d = E(), u = c(!0), s = c(new Array()), m = f(() => d.recipes), a = f(() => d.skus), g = c(""), i = F(n), e = c();
96
+ const d = x(), u = c(!0), o = c(new Array()), m = f(() => d.recipes), a = f(() => d.skus), g = c(""), i = F(n), e = c();
101
97
  async function n() {
102
98
  await d.readInventory(), e.value = i.onMessage(
103
99
  "props:grouped-bindings",
104
100
  (t) => {
105
- u.value = !1, s.value = t;
101
+ u.value = !1, o.value = t;
106
102
  }
107
103
  ), i.sendMessage("props:grouped-bindings");
108
104
  }
109
- async function o(t, r) {
105
+ async function s(t, r) {
110
106
  i.sendMessage("@click:open-binding-dialog", {
111
107
  key: t,
112
108
  binding: r
@@ -130,20 +126,20 @@ const P = /* @__PURE__ */ _({
130
126
  }, [
131
127
  u.value ? (p(), y("div", R, [
132
128
  N(w, { size: "md" }),
133
- r[0] || (r[0] = x("div", null, "Loading bindings table...", -1))
129
+ r[0] || (r[0] = E("div", null, "Loading bindings table...", -1))
134
130
  ])) : (p(), h(P, {
135
131
  key: 0,
136
- items: s.value,
132
+ items: o.value,
137
133
  recipes: m.value,
138
134
  skus: a.value,
139
135
  type: g.value,
140
136
  editable: "",
141
- "onClick:openBindingDialog": o
137
+ "onClick:openBindingDialog": s
142
138
  }, null, 8, ["items", "recipes", "skus", "type"]))
143
139
  ], 512);
144
140
  };
145
141
  }
146
142
  });
147
143
  export {
148
- K as default
144
+ D as default
149
145
  };