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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/{ApprovalView-av_qng0N.js → ApprovalView-B1EiHn4f.js} +8 -8
  2. package/dist/{BindingsDialog-VZ6YelwP.js → BindingsDialog-DmYWCMdc.js} +9 -9
  3. package/dist/{BindingsPicker-BFYv2ftI.js → BindingsPicker-B35A7Px5.js} +17 -17
  4. package/dist/{BindingsTable-DFowW8vT.js → BindingsTable-CtN6XTmL.js} +1 -1
  5. package/dist/{ClosingTemplateView-DNcgyBVw.js → ClosingTemplateView-Ch8hg35a.js} +15 -15
  6. package/dist/FmDroppableField-DK78vkN3.js +152 -0
  7. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CAZ4P0Ax.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-0p8dn-rc.js} +76 -76
  8. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DqOb7e4M.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DSQW1Ayz.js} +20 -20
  9. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bb0W0wUH.js +51 -0
  10. package/dist/IngredientsView-C47jIp0f.js +1611 -0
  11. package/dist/{IntegrationView-DT5F9V0h.js → IntegrationView-Dulaskd9.js} +71 -71
  12. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CXw4tAI_.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-btsYefZJ.js} +1 -1
  13. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C6a6F_jD.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BGLxTaW8.js} +16 -16
  14. package/dist/{PurchaseOrderPrintPreview-BMCy5C1z.js → PurchaseOrderPrintPreview-BtDEZAgl.js} +7 -7
  15. package/dist/{ReceiveRequestView-DBU59iYm.js → ReceiveRequestView-Cf6UV1Gz.js} +1042 -1029
  16. package/dist/{RecipeView-Brnk8Ar7.js → RecipeView-MagbCdki.js} +30 -29
  17. package/dist/StockView-D1TK5omK.js +7762 -0
  18. package/dist/{SupplierView-C0GT_JzY.js → SupplierView-CIUY0y12.js} +11 -11
  19. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BzJ8TnL_.js → TransferDetails.vue_vue_type_script_setup_true_lang-CacJUhOj.js} +99 -101
  20. package/dist/TransferTemplateView-CetnHs4Q.js +2054 -0
  21. package/dist/{UnitView-Dw2xLWy4.js → UnitView-BDZRBWlk.js} +16 -16
  22. package/dist/{WarehouseView-Cgf1mP8s.js → WarehouseView-DtUxLB_u.js} +20 -20
  23. package/dist/api/bill.d.ts +84 -238
  24. package/dist/api/purchase-order-template.d.ts +4 -2
  25. package/dist/{app-Iz-opVBA.js → app-BGqgEJv-.js} +18166 -18188
  26. package/dist/app.js +2 -2
  27. package/dist/{decimal-ffsKJesh.js → decimal-NPqoitzq.js} +1 -1
  28. package/dist/defineDeepModel-C4ebJegy.js +13 -0
  29. package/dist/format-time-from-id-DkB5tphe.js +15 -0
  30. package/dist/helper/xlsx.util.d.ts +7 -0
  31. package/dist/purchase-order-transaction-type-ag48uMYt.js +348 -0
  32. package/dist/stores/inventory.d.ts +63 -0
  33. package/dist/stores/location.d.ts +89 -0
  34. package/dist/stores/supplier.d.ts +120 -3
  35. package/dist/stores/warehouse.d.ts +7 -4
  36. package/dist/supplier-CBaaZ4vA.js +70 -0
  37. package/dist/tsconfig.app.tsbuildinfo +1 -1
  38. package/dist/{use-template-enabled-locations-2-BSLLHtkm.js → use-template-enabled-locations-2-CYsM7ABF.js} +1 -1
  39. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +2 -2
  40. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +2 -2
  41. package/dist/views/ingredients/composables/use-ingredient-form.d.ts +2 -2
  42. package/dist/views/recipe/composables/use-recipe-form.d.ts +2 -2
  43. package/dist/views/stock/components/StockRecordCard.vue.d.ts +42 -119
  44. package/dist/views/stock/composables/use-stock-action.d.ts +2 -2
  45. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImport.vue.d.ts +2 -0
  46. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItem.vue.d.ts +12 -0
  47. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItemProps.d.ts +9 -0
  48. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +10 -6
  49. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +1850 -5
  50. package/dist/views/transfer-template/helpers/import-export.helper.d.ts +76 -0
  51. package/dist/views/transfer-template/helpers/remove-deleted-skus.helper.d.ts +1 -230
  52. package/dist/views/unit/composables/use-unit-form.d.ts +2 -2
  53. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +14 -8
  54. package/dist/{xlsx-C8qXPxB4.js → xlsx-DQC0TWcU.js} +651 -651
  55. package/dist/xlsx.util-N5bu_PXw.js +78 -0
  56. package/package.json +3 -3
  57. package/dist/IngredientsView-afICUj_U.js +0 -1755
  58. package/dist/StockView-BtTZNhlp.js +0 -1909
  59. package/dist/TransferTemplateView-SrBMTzU-.js +0 -1237
  60. package/dist/defineDeepModel-CDrYKSnU.js +0 -13
  61. package/dist/format-time-from-id-e9QU46u4.js +0 -15
  62. package/dist/purchase-order-transaction-type-DN3Czz6K.js +0 -338
  63. package/dist/supplier-DdJIh1nj.js +0 -69
  64. package/dist/xlsx.util-DGLr1W_5.js +0 -109
@@ -1,14 +1,14 @@
1
- import { a as S, t as B, a3 as A, Q as D, ai as R, j, aj as V } from "./app-Iz-opVBA.js";
2
- import { u as H } from "./supplier-DdJIh1nj.js";
3
- import { P as k } from "./purchase-order-transaction-type-DN3Czz6K.js";
4
- import { computed as y, defineComponent as $, mergeModels as W, useModel as Q, resolveComponent as w, openBlock as F, createElementBlock as I, normalizeStyle as J, createElementVNode as N, createVNode as K, withCtx as X, createBlock as x, createCommentVNode as E, Fragment as Y, renderList as Z, unref as M } from "vue";
5
- function ne(c, l, t, s) {
6
- var b, v, u;
1
+ import { a as P, t as B, a7 as A, i as D, ae as R, am as H, an as V } from "./app-BGqgEJv-.js";
2
+ import { u as j } from "./supplier-CBaaZ4vA.js";
3
+ import { P as S } from "./purchase-order-transaction-type-ag48uMYt.js";
4
+ import { computed as y, defineComponent as $, mergeModels as W, useModel as J, resolveComponent as w, openBlock as F, createElementBlock as I, normalizeStyle as K, createElementVNode as N, createVNode as Q, withCtx as X, createBlock as x, createCommentVNode as E, Fragment as Y, renderList as Z, unref as M } from "vue";
5
+ function ne(c, i, t, s) {
6
+ var b, g, u;
7
7
  if (s != null && s.manualTotalCost)
8
8
  return s == null ? void 0 : s.manualTotalCost;
9
- const e = (u = (v = (b = s == null ? void 0 : s.supplier) == null ? void 0 : b.supplyItems) == null ? void 0 : v.find(
9
+ const e = (u = (g = (b = s == null ? void 0 : s.supplier) == null ? void 0 : b.supplyItems) == null ? void 0 : g.find(
10
10
  (r) => r.skuId === c._id
11
- )) == null ? void 0 : u.defaultCost, o = c.defaultCost, n = e ?? o, i = n == null ? void 0 : n.costPerUnit, a = i ? n != null && n.measurement ? +S(i) / +S(n == null ? void 0 : n.measurement.conversion) : +S(i) : void 0, p = a ? t ? a * +S(t.conversion) : a : void 0, d = p ? +S(l) * p : void 0;
11
+ )) == null ? void 0 : u.defaultCost, o = c.defaultCost, n = e ?? o, l = n == null ? void 0 : n.costPerUnit, a = l ? n != null && n.measurement ? +P(l) / +P(n == null ? void 0 : n.measurement.conversion) : +P(l) : void 0, p = a ? t ? a * +P(t.conversion) : a : void 0, d = p ? +P(i) * p : void 0;
12
12
  return d ? {
13
13
  ...B(d ?? 0, 2),
14
14
  currency: A()
@@ -19,7 +19,7 @@ function ne(c, l, t, s) {
19
19
  };
20
20
  }
21
21
  function _(c) {
22
- return R.parse(c);
22
+ return H.parse(c);
23
23
  }
24
24
  function T(c) {
25
25
  return {
@@ -39,15 +39,15 @@ function T(c) {
39
39
  }
40
40
  };
41
41
  }
42
- function oe(c, l, t = !1, s = !1) {
43
- const e = H(), o = j();
42
+ function oe(c, i, t = !1, s = !1) {
43
+ const e = j(), o = D();
44
44
  o.watchLocation(async () => {
45
- var g;
45
+ var v;
46
46
  await e.readSuppliers();
47
47
  const u = c();
48
- if ((g = u.supplier) != null && g._id) return;
48
+ if ((v = u.supplier) != null && v._id) return;
49
49
  const r = s ? e.suppliers[0] : e.businessSuppliers[0], f = (t ? o.locations.filter((m) => m.doc._id !== o.currentLocation.doc._id) : o.locations)[0];
50
- l({
50
+ i({
51
51
  ...u,
52
52
  supplier: r ? _(r) : f ? T(f) : u.supplier
53
53
  });
@@ -55,38 +55,38 @@ function oe(c, l, t = !1, s = !1) {
55
55
  const n = y(
56
56
  () => {
57
57
  var u, r;
58
- return typeof ((r = (u = c()) == null ? void 0 : u.supplier) == null ? void 0 : r.internal) == "string" ? k.TRANSFER : k.PURCHASE;
58
+ return typeof ((r = (u = c()) == null ? void 0 : u.supplier) == null ? void 0 : r.internal) == "string" ? S.TRANSFER : S.PURCHASE;
59
59
  }
60
- ), i = y({
60
+ ), l = y({
61
61
  get() {
62
62
  var u, r;
63
63
  return (r = (u = c()) == null ? void 0 : u.supplier) == null ? void 0 : r._id;
64
64
  },
65
65
  set(u) {
66
66
  const r = c() ?? {};
67
- if (n.value === k.PURCHASE) {
67
+ if (n.value === S.PURCHASE) {
68
68
  const C = (s ? e.suppliers : e.businessSuppliers).find((U) => U._id === u);
69
- l({
69
+ i({
70
70
  ...r,
71
71
  supplier: C ? _(C) : r.supplier
72
72
  });
73
73
  return;
74
74
  }
75
- const g = (t ? o.locations.filter((m) => m.doc._id !== o.currentLocation.doc._id) : o.locations).find((m) => m.doc._id === u);
76
- l({
75
+ const v = (t ? o.locations.filter((m) => m.doc._id !== o.currentLocation.doc._id) : o.locations).find((m) => m.doc._id === u);
76
+ i({
77
77
  ...r,
78
- supplier: g ? T(g) : r.supplier
78
+ supplier: v ? T(v) : r.supplier
79
79
  });
80
80
  }
81
81
  }), a = y(() => e.locationSuppliers.map(_)), p = y(() => e.businessSuppliers.map(_)), d = y(() => {
82
82
  const u = [...a.value], r = [...p.value];
83
83
  return s ? [...r, ...u] : r;
84
- }), P = y(() => {
84
+ }), k = y(() => {
85
85
  var h;
86
- const u = ((h = o._currentLocation) == null ? void 0 : h.type) === D.warehouse;
86
+ const u = ((h = o._currentLocation) == null ? void 0 : h.type) === R.warehouse;
87
87
  return (t ? o.locations.filter((f) => f.doc._id !== o.currentLocation.doc._id) : o.locations).filter((f) => u || f.acceptRequest).map(T);
88
88
  }), b = y(() => {
89
- if (n.value === k.PURCHASE) {
89
+ if (n.value === S.PURCHASE) {
90
90
  const r = a.value.map((f) => ({
91
91
  label: f.name,
92
92
  value: f._id
@@ -97,15 +97,15 @@ function oe(c, l, t = !1, s = !1) {
97
97
  }));
98
98
  return s ? [...r, ...h] : h;
99
99
  }
100
- return P.value.map((r) => ({
100
+ return k.value.map((r) => ({
101
101
  label: r.name,
102
102
  sublabel: r.internal ? `${r.internal}` : void 0,
103
103
  value: r._id
104
104
  }));
105
- }), v = y(() => {
106
- var f, g;
107
- const u = (g = (f = c()) == null ? void 0 : f.supplier) == null ? void 0 : g._id;
108
- if (n.value === k.PURCHASE) {
105
+ }), g = y(() => {
106
+ var f, v;
107
+ const u = (v = (f = c()) == null ? void 0 : f.supplier) == null ? void 0 : v._id;
108
+ if (n.value === S.PURCHASE) {
109
109
  const m = e.suppliers.find((C) => C._id === u);
110
110
  return m ? _(m) : null;
111
111
  }
@@ -113,90 +113,90 @@ function oe(c, l, t = !1, s = !1) {
113
113
  return h ? T(h) : null;
114
114
  });
115
115
  return {
116
- transferLocationModel: i,
116
+ transferLocationModel: l,
117
117
  transferLocationOptions: b,
118
118
  locationOptionsTypePurchase: d,
119
119
  locationOptionsTypePurchaseLocationLevel: a,
120
- locationOptionsTypeTransfer: P,
121
- selectedLocation: v
120
+ locationOptionsTypeTransfer: k,
121
+ selectedLocation: g
122
122
  };
123
123
  }
124
124
  class O {
125
- static getDescendantProperty(l, t, s = []) {
126
- let e, o, n, i, a, p;
125
+ static getDescendantProperty(i, t, s = []) {
126
+ let e, o, n, l, a, p;
127
127
  if (t) {
128
- if (n = t.indexOf("."), n === -1 ? e = t : (e = t.slice(0, n), o = t.slice(n + 1)), i = l[e], i !== null && typeof i < "u")
129
- if (!o && (typeof i == "string" || typeof i == "number"))
130
- s.push(i);
131
- else if (Object.prototype.toString.call(i) === "[object Array]")
132
- for (a = 0, p = i.length; a < p; a++)
133
- O.getDescendantProperty(i[a], o, s);
134
- else o && O.getDescendantProperty(i, o, s);
128
+ if (n = t.indexOf("."), n === -1 ? e = t : (e = t.slice(0, n), o = t.slice(n + 1)), l = i[e], l !== null && typeof l < "u")
129
+ if (!o && (typeof l == "string" || typeof l == "number"))
130
+ s.push(l);
131
+ else if (Object.prototype.toString.call(l) === "[object Array]")
132
+ for (a = 0, p = l.length; a < p; a++)
133
+ O.getDescendantProperty(l[a], o, s);
134
+ else o && O.getDescendantProperty(l, o, s);
135
135
  } else
136
- s.push(l);
136
+ s.push(i);
137
137
  return s;
138
138
  }
139
139
  }
140
140
  class L {
141
- constructor(l = [], t = [], s = {}) {
142
- Array.isArray(t) || (s = t, t = []), this.haystack = l, this.keys = t, this.options = Object.assign({
141
+ constructor(i = [], t = [], s = {}) {
142
+ Array.isArray(t) || (s = t, t = []), this.haystack = i, this.keys = t, this.options = Object.assign({
143
143
  caseSensitive: !1,
144
144
  sort: !1
145
145
  }, s);
146
146
  }
147
- search(l = "") {
148
- if (l === "")
147
+ search(i = "") {
148
+ if (i === "")
149
149
  return this.haystack;
150
150
  const t = [];
151
151
  for (let s = 0; s < this.haystack.length; s++) {
152
152
  const e = this.haystack[s];
153
153
  if (this.keys.length === 0) {
154
- const o = L.isMatch(e, l, this.options.caseSensitive);
154
+ const o = L.isMatch(e, i, this.options.caseSensitive);
155
155
  o && t.push({ item: e, score: o });
156
156
  } else
157
157
  for (let o = 0; o < this.keys.length; o++) {
158
158
  const n = O.getDescendantProperty(e, this.keys[o]);
159
- let i = !1;
159
+ let l = !1;
160
160
  for (let a = 0; a < n.length; a++) {
161
- const p = L.isMatch(n[a], l, this.options.caseSensitive);
161
+ const p = L.isMatch(n[a], i, this.options.caseSensitive);
162
162
  if (p) {
163
- i = !0, t.push({ item: e, score: p });
163
+ l = !0, t.push({ item: e, score: p });
164
164
  break;
165
165
  }
166
166
  }
167
- if (i)
167
+ if (l)
168
168
  break;
169
169
  }
170
170
  }
171
171
  return this.options.sort && t.sort((s, e) => s.score - e.score), t.map((s) => s.item);
172
172
  }
173
- static isMatch(l, t, s) {
174
- l = String(l), t = String(t), s || (l = l.toLocaleLowerCase(), t = t.toLocaleLowerCase());
175
- const e = L.nearestIndexesFor(l, t);
176
- return e ? l === t ? 1 : e.length > 1 ? 2 + (e[e.length - 1] - e[0]) : 2 + e[0] : !1;
173
+ static isMatch(i, t, s) {
174
+ i = String(i), t = String(t), s || (i = i.toLocaleLowerCase(), t = t.toLocaleLowerCase());
175
+ const e = L.nearestIndexesFor(i, t);
176
+ return e ? i === t ? 1 : e.length > 1 ? 2 + (e[e.length - 1] - e[0]) : 2 + e[0] : !1;
177
177
  }
178
- static nearestIndexesFor(l, t) {
178
+ static nearestIndexesFor(i, t) {
179
179
  const s = t.split("");
180
180
  let e = [];
181
- return L.indexesOfFirstLetter(l, t).forEach((n, i) => {
181
+ return L.indexesOfFirstLetter(i, t).forEach((n, l) => {
182
182
  let a = n + 1;
183
- e[i] = [n];
183
+ e[l] = [n];
184
184
  for (let p = 1; p < s.length; p++) {
185
185
  const d = s[p];
186
- if (a = l.indexOf(d, a), a === -1) {
187
- e[i] = !1;
186
+ if (a = i.indexOf(d, a), a === -1) {
187
+ e[l] = !1;
188
188
  break;
189
189
  }
190
- e[i].push(a), a++;
190
+ e[l].push(a), a++;
191
191
  }
192
- }), e = e.filter((n) => n !== !1), e.length ? e.sort((n, i) => n.length === 1 ? n[0] - i[0] : (n = n[n.length - 1] - n[0], i = i[i.length - 1] - i[0], n - i))[0] : !1;
192
+ }), e = e.filter((n) => n !== !1), e.length ? e.sort((n, l) => n.length === 1 ? n[0] - l[0] : (n = n[n.length - 1] - n[0], l = l[l.length - 1] - l[0], n - l))[0] : !1;
193
193
  }
194
- static indexesOfFirstLetter(l, t) {
194
+ static indexesOfFirstLetter(i, t) {
195
195
  const s = t[0];
196
- return l.split("").map((e, o) => e !== s ? !1 : o).filter((e) => e !== !1);
196
+ return i.split("").map((e, o) => e !== s ? !1 : o).filter((e) => e !== !1);
197
197
  }
198
198
  }
199
- const z = { class: "sticky top-0 bg-white mb-8" }, G = { class: "overflow-y-auto pb-8" }, ie = /* @__PURE__ */ $({
199
+ const z = { class: "sticky top-0 bg-white mb-8" }, G = { class: "overflow-y-auto pb-8" }, le = /* @__PURE__ */ $({
200
200
  __name: "FmFilterableMenuOptions",
201
201
  props: /* @__PURE__ */ W({
202
202
  modelValue: {},
@@ -211,23 +211,23 @@ const z = { class: "sticky top-0 bg-white mb-8" }, G = { class: "overflow-y-auto
211
211
  }),
212
212
  emits: ["update:search"],
213
213
  setup(c) {
214
- const l = c, t = Q(c, "search"), s = y(
215
- () => new L(l.items, ["label", "sublabel"], l.options)
214
+ const i = c, t = J(c, "search"), s = y(
215
+ () => new L(i.items, ["label", "sublabel"], i.options)
216
216
  ), e = y(() => s.value.search(t.value));
217
217
  return (o, n) => {
218
- const i = w("FmButton"), a = w("FmTextField"), p = w("FmMenuItem");
218
+ const l = w("FmButton"), a = w("FmTextField"), p = w("FmMenuItem");
219
219
  return F(), I("div", {
220
220
  class: "relative",
221
- style: J({ maxHeight: `${o.maxHeight}px`, width: o.width })
221
+ style: K({ maxHeight: `${o.maxHeight}px`, width: o.width })
222
222
  }, [
223
223
  N("div", z, [
224
- K(a, {
224
+ Q(a, {
225
225
  modelValue: t.value,
226
226
  "onUpdate:modelValue": n[1] || (n[1] = (d) => t.value = d),
227
227
  placeholder: "Filter options"
228
228
  }, {
229
229
  append: X(() => [
230
- t.value ? (F(), x(i, {
230
+ t.value ? (F(), x(l, {
231
231
  key: 0,
232
232
  variant: "tertiary",
233
233
  "prepend-icon": "close",
@@ -238,15 +238,15 @@ const z = { class: "sticky top-0 bg-white mb-8" }, G = { class: "overflow-y-auto
238
238
  }, 8, ["modelValue"])
239
239
  ]),
240
240
  N("div", G, [
241
- (F(!0), I(Y, null, Z(e.value, (d, P) => (F(), x(p, {
242
- key: P,
241
+ (F(!0), I(Y, null, Z(e.value, (d, k) => (F(), x(p, {
242
+ key: k,
243
243
  label: d.label,
244
244
  sublabel: d.sublabel,
245
245
  "model-value": M(V)(o.modelValue, d.value),
246
246
  onClick: () => o.handleItemChange(M(V)(o.modelValue, d.value), d),
247
247
  onVnodeMounted: (b) => {
248
- var v;
249
- return M(V)(o.modelValue, d.value) && ((v = b.el) == null || v.scrollIntoView({ behavior: "smooth" }), console.log("scrollTo", b.el)), void 0;
248
+ var g;
249
+ return M(V)(o.modelValue, d.value) && ((g = b.el) == null || g.scrollIntoView({ behavior: "smooth", block: "center" }), console.log("scrollTo", b.el)), void 0;
250
250
  }
251
251
  }, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
252
252
  e.value.length ? E("", !0) : (F(), x(p, {
@@ -260,7 +260,7 @@ const z = { class: "sticky top-0 bg-white mb-8" }, G = { class: "overflow-y-auto
260
260
  }
261
261
  });
262
262
  export {
263
- ie as _,
263
+ le as _,
264
264
  ne as c,
265
265
  oe as u
266
266
  };
@@ -1,9 +1,9 @@
1
- import { reactive as E, onUnmounted as q, defineComponent as V, computed as _, resolveComponent as h, openBlock as a, createElementBlock as b, Fragment as F, createElementVNode as f, unref as u, normalizeClass as D, toDisplayString as L, createCommentVNode as y, renderList as R, createBlock as w, createVNode as v, renderSlot as G, Teleport as J, ref as P, withCtx as T, watch as K, mergeModels as W, useModel as S } from "vue";
2
- import { FmButtonVariant as X, useBreakpoints as z } from "@feedmepos/ui-library";
3
- import { j as O, P as U } from "./app-Iz-opVBA.js";
4
- import { useCoreStore as Z, useI18n as j } from "@feedmepos/mf-common";
1
+ import { reactive as E, onUnmounted as q, defineComponent as R, computed as _, resolveComponent as h, openBlock as a, createElementBlock as b, Fragment as F, createElementVNode as f, unref as u, normalizeClass as D, toDisplayString as L, createCommentVNode as y, renderList as V, createBlock as w, createVNode as v, renderSlot as G, Teleport as J, ref as z, withCtx as T, watch as K, mergeModels as W, useModel as S } from "vue";
2
+ import { FmButtonVariant as X, useBreakpoints as P } from "@feedmepos/ui-library";
3
+ import { i as O, V as U } from "./app-BGqgEJv-.js";
4
+ import { useCoreStore as Z, useI18n as A } from "@feedmepos/mf-common";
5
5
  const I = E({});
6
- function A() {
6
+ function Y() {
7
7
  const i = `${Math.random()}`, o = new ResizeObserver((t) => {
8
8
  const l = t.map((n) => n.target.scrollHeight).reduce((n, s) => n + s);
9
9
  I[i] = l;
@@ -29,7 +29,7 @@ function A() {
29
29
  const ee = { class: "flex flex-col w-full bg-white h-full" }, ne = {
30
30
  key: 0,
31
31
  class: /* @__PURE__ */ D(["text-fm-color-typo-secondary fm-typo-en-body-sm-400"])
32
- }, te = { key: 0 }, oe = { key: 1 }, le = { class: "bg-white flex-1" }, ae = { class: "fixed bottom-96 right-16" }, ke = /* @__PURE__ */ V({
32
+ }, te = { key: 0 }, oe = { key: 1 }, le = { class: "bg-white flex-1" }, ae = { class: "fixed bottom-96 right-16" }, ke = /* @__PURE__ */ R({
33
33
  __name: "SingleColumnLayout",
34
34
  props: {
35
35
  actions: { default: () => [] },
@@ -44,7 +44,7 @@ const ee = { class: "flex flex-col w-full bg-white h-full" }, ne = {
44
44
  setup(i, { emit: o }) {
45
45
  const c = i, r = o, t = _(() => c.actions.find((e) => e.isPrimary)), l = _(
46
46
  () => c.actions.filter((e) => !e.isPrimary).map((e) => ({ ...e, variant: e.variant ?? X.Tertiary }))
47
- ), { breakpoints: n } = z(), s = _(() => n.value.xs || n.value.sm), d = O(), k = _(() => d.businessLevel), x = A();
47
+ ), { breakpoints: n } = P(), s = _(() => n.value.xs || n.value.sm), d = O(), k = _(() => d.businessLevel), x = Y();
48
48
  return (e, m) => {
49
49
  const B = h("FmButton");
50
50
  return a(), b(F, null, [
@@ -72,7 +72,7 @@ const ee = { class: "flex flex-col w-full bg-white h-full" }, ne = {
72
72
  e.usingBusinessHelperText && k.value ? (a(), b("div", ne, L(e.usingBusinessHelperText), 1)) : y("", !0)
73
73
  ], 2),
74
74
  l.value.length ? (a(), b("div", te, [
75
- (a(!0), b(F, null, R(l.value, (g) => (a(), w(B, {
75
+ (a(!0), b(F, null, V(l.value, (g) => (a(), w(B, {
76
76
  key: g.value,
77
77
  label: g.label,
78
78
  "prepend-icon": g.prependIcon,
@@ -114,7 +114,7 @@ const ee = { class: "flex flex-col w-full bg-white h-full" }, ne = {
114
114
  }, ce = {
115
115
  class: "overflow-hidden overflow-y-scroll",
116
116
  style: { maxHeight: "105px" }
117
- }, de = /* @__PURE__ */ V({
117
+ }, de = /* @__PURE__ */ R({
118
118
  __name: "ChangeLocationComponent",
119
119
  props: {
120
120
  showBusiness: { type: Boolean }
@@ -123,7 +123,7 @@ const ee = { class: "flex flex-col w-full bg-white h-full" }, ne = {
123
123
  const o = O(), c = Z(), r = _(() => {
124
124
  var e;
125
125
  return (e = c.currentBusiness.value) == null ? void 0 : e.name;
126
- }), { t } = j(), l = P(""), n = _({
126
+ }), { t } = A(), l = z(""), n = _({
127
127
  get() {
128
128
  return o.businessLevel;
129
129
  },
@@ -143,9 +143,9 @@ const ee = { class: "flex flex-col w-full bg-white h-full" }, ne = {
143
143
  n.value = !1, o.selectLocation(o.locations.find((m) => m.dbName === e));
144
144
  }
145
145
  return (e, m) => {
146
- const B = h("FmIcon"), g = h("FmSearch"), M = h("FmMenuDivider"), H = h("FmMenuHeader"), $ = h("FmMenuItem"), Y = h("FmMenu");
146
+ const B = h("FmIcon"), g = h("FmSearch"), M = h("FmMenuDivider"), H = h("FmMenuHeader"), $ = h("FmMenuItem"), j = h("FmMenu");
147
147
  return a(), b("div", se, [
148
- v(Y, { "close-on-click": !0 }, {
148
+ v(j, { "close-on-click": !0 }, {
149
149
  "menu-button": T(() => {
150
150
  var p;
151
151
  return [
@@ -186,7 +186,7 @@ const ee = { class: "flex flex-col w-full bg-white h-full" }, ne = {
186
186
  }, null, 8, ["label"]),
187
187
  v(M),
188
188
  f("div", ie, [
189
- (a(!0), b(F, null, R(d.value, (p) => {
189
+ (a(!0), b(F, null, V(d.value, (p) => {
190
190
  var C;
191
191
  return a(), w($, {
192
192
  key: p.value,
@@ -206,7 +206,7 @@ const ee = { class: "flex flex-col w-full bg-white h-full" }, ne = {
206
206
  }, null, 8, ["label"]),
207
207
  v(M),
208
208
  f("div", ce, [
209
- (a(!0), b(F, null, R(k.value, (p) => {
209
+ (a(!0), b(F, null, V(k.value, (p) => {
210
210
  var C;
211
211
  return a(), w($, {
212
212
  key: p.value,
@@ -244,14 +244,14 @@ function N(i = 15) {
244
244
  endDate: `${U(r)}`
245
245
  };
246
246
  }
247
- const me = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer text-fm-color-neutral-gray-400" }, pe = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, ve = /* @__PURE__ */ V({
247
+ const me = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer text-fm-color-neutral-gray-400" }, pe = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, ve = /* @__PURE__ */ R({
248
248
  __name: "FmDateRangePickerChip",
249
249
  props: {
250
250
  modelValue: { default: (i) => i.modelValue ?? N() }
251
251
  },
252
252
  emits: ["update:modelValue"],
253
253
  setup(i, { emit: o }) {
254
- const c = o, r = P(N());
254
+ const c = o, r = z(N());
255
255
  K(r, (l) => {
256
256
  c("update:modelValue", l);
257
257
  });
@@ -284,7 +284,7 @@ const me = { class: "inline-flex rounded-md items-center gap-4 justify-center h-
284
284
  }), fe = { class: "flex-1 w-full flex items-center gap-4" }, be = {
285
285
  key: 0,
286
286
  class: "flex-1"
287
- }, ye = { class: "w-full max-w-[343px] xs:max-w-[unset] sm:max-w-[unset]" }, Be = /* @__PURE__ */ V({
287
+ }, ye = { class: "w-full max-w-[343px] xs:max-w-[unset] sm:max-w-[unset]" }, Be = /* @__PURE__ */ R({
288
288
  __name: "FmInventoryTableToolbar",
289
289
  props: /* @__PURE__ */ W({
290
290
  dateRangeQuery: { type: Boolean },
@@ -301,7 +301,7 @@ const me = { class: "inline-flex rounded-md items-center gap-4 justify-center h-
301
301
  }),
302
302
  emits: ["update:search", "update:dateRange"],
303
303
  setup(i) {
304
- const { breakpoints: o } = z(), c = _(() => o.value.xs || o.value.sm), r = S(i, "search"), t = S(i, "dateRange"), { t: l } = j(), n = A();
304
+ const { breakpoints: o } = P(), c = _(() => o.value.xs || o.value.sm), r = S(i, "search"), t = S(i, "dateRange"), { t: l } = A(), n = Y();
305
305
  return (s, d) => {
306
306
  const k = h("FmTextField"), x = h("FmButton");
307
307
  return a(), b("div", {
@@ -351,7 +351,7 @@ const me = { class: "inline-flex rounded-md items-center gap-4 justify-center h-
351
351
  class: "w-full"
352
352
  }, null, 8, ["model-value", "placeholder"])) : y("", !0)
353
353
  ]),
354
- (a(!0), b(F, null, R(s.actions, (e, m) => (a(), w(x, {
354
+ (a(!0), b(F, null, V(s.actions, (e, m) => (a(), w(x, {
355
355
  key: m,
356
356
  variant: "tertiary",
357
357
  "prepend-icon": e.icon,
@@ -368,5 +368,5 @@ export {
368
368
  Be as a,
369
369
  xe as b,
370
370
  N as i,
371
- A as u
371
+ Y as u
372
372
  };
@@ -0,0 +1,51 @@
1
+ import { defineComponent as p, openBlock as s, createElementBlock as n, createElementVNode as r, toDisplayString as o, unref as l, Fragment as d, renderList as x } from "vue";
2
+ import { a, k as y } from "./app-BGqgEJv-.js";
3
+ import { useI18n as _ } from "@feedmepos/mf-common";
4
+ const v = { class: "flex flex-col" }, g = { class: "flex flex-row fm-typo-en-body-md-600 bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary h-48 items-center" }, h = { class: "flex-1 py-8 px-16" }, b = {
5
+ class: "flex-0 py-8 px-16",
6
+ style: { "flex-basis": "120px" }
7
+ }, k = { class: "flex-1 py-8 px-16" }, B = {
8
+ key: 0,
9
+ class: "flex-0 py-8 px-16",
10
+ style: { "flex-basis": "120px" }
11
+ }, I = {
12
+ key: 1,
13
+ class: "flex-0 py-8 px-16",
14
+ style: { "flex-basis": "120px" }
15
+ }, A = /* @__PURE__ */ p({
16
+ __name: "IngredientBindedItem",
17
+ props: {
18
+ name: {},
19
+ bindings: {}
20
+ },
21
+ setup($) {
22
+ const { t: m } = _();
23
+ function c(e, i) {
24
+ var t;
25
+ if (e.measurement) {
26
+ const u = y(e.amount, e.measurement.conversion);
27
+ return `${a(u, !1)} ${(t = e.measurement) == null ? void 0 : t.abbrev}`;
28
+ }
29
+ return `${a(e.amount, !1)} ${i.abbrev}`;
30
+ }
31
+ function f(e) {
32
+ return e.unit !== void 0;
33
+ }
34
+ return (e, i) => (s(), n("div", v, [
35
+ r("div", g, [
36
+ r("div", h, o(e.name), 1),
37
+ r("div", b, o(l(m)("inventory.ingredient.bindedItems.amount")), 1)
38
+ ]),
39
+ (s(!0), n(d, null, x(e.bindings, (t) => (s(), n("div", {
40
+ key: t.id,
41
+ class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
42
+ }, [
43
+ r("div", k, o(t.name), 1),
44
+ f(t) ? (s(), n("div", B, o(c(t, t.unit)), 1)) : (s(), n("div", I, o(l(a)(t.amount, !1)), 1))
45
+ ]))), 128))
46
+ ]));
47
+ }
48
+ });
49
+ export {
50
+ A as _
51
+ };