@feedmepos/mf-inventory-portal 0.0.25-dev.7 → 0.0.25-dev.8

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 (48) hide show
  1. package/dist/{App-qJehfAde.js → App-CKLQeRNl.js} +1 -1
  2. package/dist/{ApprovalView-BuqKIEPL.js → ApprovalView-BWO2tkbO.js} +6 -6
  3. package/dist/{BindingsDialog-BrF-YAJ2.js → BindingsDialog-C0kTZLOn.js} +9 -9
  4. package/dist/{BindingsPicker-DK41dcoG.js → BindingsPicker-DjcS3uTL.js} +10 -10
  5. package/dist/{BindingsTable-DxlRhKzN.js → BindingsTable-Ctpv958D.js} +10 -10
  6. package/dist/{ClosingDraftView-CpGQMN37.js → ClosingDraftView-CsAPSZPc.js} +2 -2
  7. package/dist/{ClosingTemplateView-4l891KsC.js → ClosingTemplateView-D0HWVhk3.js} +477 -492
  8. package/dist/{FmCustomAttribute.vue_vue_type_script_setup_true_lang-CyHyOhG6.js → FmCustomAttribute.vue_vue_type_script_setup_true_lang-BF0lKP9Y.js} +1 -1
  9. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DJfBmiRt.js +211 -0
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-3LU_3Y8h.js → FmUnitInput.vue_vue_type_script_setup_true_lang-qZ7Kx-KR.js} +1 -1
  11. package/dist/{IngredientGroupView-Bjv9Kih7.js → IngredientGroupView-Dc3glXN3.js} +1 -1
  12. package/dist/{IngredientsView-ChJbe-U_.js → IngredientsView-btzrUQ1-.js} +392 -382
  13. package/dist/{IntegrationView-Cmh47qP7.js → IntegrationView-DO1SF1Ca.js} +660 -623
  14. package/dist/{InventoryBindingForm-GmcCTBqN.js → InventoryBindingForm-_2p-YetL.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CQrjMOFh.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-B7ump1tl.js} +5 -5
  16. package/dist/{InventoryBindingSummary-w1pFGR3C.js → InventoryBindingSummary-CEdLu3d9.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Cxr2xhRR.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-kLdZ5acK.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CzxVUAC8.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Da0gmGST.js} +1 -1
  19. package/dist/{PublishView-pWAEdGLi.js → PublishView-CXTiPWIx.js} +2 -2
  20. package/dist/{PurchaseOrderPrintPreview-CZczBXL2.js → PurchaseOrderPrintPreview-DBviMTyA.js} +1 -1
  21. package/dist/{ReceiveRequestView-tWyQCrIN.js → ReceiveRequestView-Ct1AQDGK.js} +8 -8
  22. package/dist/{RecipeView-Dy1BBW3o.js → RecipeView-C0HiPNvf.js} +3 -3
  23. package/dist/{StockView-B0c0FiPr.js → StockView-BG8jsV_X.js} +7 -7
  24. package/dist/{SupplierView-BUs8xZPq.js → SupplierView-th75_ohq.js} +3 -3
  25. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BA0HIuSW.js → TransferDetails.vue_vue_type_script_setup_true_lang-n7fH8GRs.js} +19 -19
  26. package/dist/{TransferTemplateView-MSbvSo96.js → TransferTemplateView-Dcz6xGR_.js} +443 -460
  27. package/dist/{UnitView-GBK0ovxt.js → UnitView-lnoMsoBN.js} +3 -3
  28. package/dist/{WarehouseView-CXoj99HO.js → WarehouseView-ChXcNnmp.js} +1 -1
  29. package/dist/{app-Du-JrqLm.js → app-B4RHEuan.js} +6283 -6208
  30. package/dist/app.js +1 -1
  31. package/dist/components/FmLockableField.vue.d.ts +3 -0
  32. package/dist/components/FmMultiselectDialog.vue.d.ts +9 -1
  33. package/dist/components/FmMultiselectDialogProps.d.ts +2 -0
  34. package/dist/{decimal-BXePRNLM.js → decimal-BocxWSo6.js} +1 -1
  35. package/dist/{format-unit-display-BdC0fMRb.js → format-unit-display-E_NtfEtV.js} +2 -2
  36. package/dist/helper/fuzzy.d.ts +10 -0
  37. package/dist/{index-irnhqIWw.js → index-B-MhJgPv.js} +3 -3
  38. package/dist/{index-cY9fiIBU.js → index-ro6xANOo.js} +1 -1
  39. package/dist/{stock-CE5Qq59r.js → stock-DpmweZQd.js} +1 -1
  40. package/dist/style.css +1 -1
  41. package/dist/{supplier-Cy-jlD0j.js → supplier--P-eubcS.js} +1 -1
  42. package/dist/tsconfig.app.tsbuildinfo +1 -1
  43. package/dist/use-ingredient-select-dialog-C7WZf5D4.js +52 -0
  44. package/dist/{use-inventory-binding-dialog-nHDQBRL3.js → use-inventory-binding-dialog-DW_kAtLh.js} +1 -1
  45. package/dist/views/ingredients/composables/use-ingredient-select-dialog.d.ts +16 -0
  46. package/dist/{vue-i18n-DIA7c33f.js → vue-i18n-SeWrkOlu.js} +134 -134
  47. package/package.json +3 -3
  48. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DRqpc9k0.js +0 -286
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as g, openBlock as a, createElementBlock as i, createElementVNode as m, toDisplayString as u, unref as h, Fragment as C, renderList as N, computed as v, resolveComponent as V, createVNode as S, createCommentVNode as w, h as B } from "vue";
2
- import { j as b, K as F, f as $ } from "./app-Du-JrqLm.js";
2
+ import { j as b, K as F, f as $ } from "./app-B4RHEuan.js";
3
3
  import { useI18n as k, useCoreStore as I } from "@feedmepos/mf-common";
4
4
  import { components as O } from "@feedmepos/ui-library";
5
5
  const T = { class: "flex flex-col" }, j = { 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" }, z = { class: "flex-1 py-8 px-16" }, D = {
@@ -0,0 +1,211 @@
1
+ import { j as T, t as I, ao as w, u as R, at as B, aD as H, aE as D, aF as U } from "./app-B4RHEuan.js";
2
+ import { u as z } from "./supplier--P-eubcS.js";
3
+ import { P as F } from "./format-unit-display-E_NtfEtV.js";
4
+ import { computed as f, defineComponent as j, mergeModels as q, useModel as x, ref as W, resolveComponent as V, openBlock as S, createElementBlock as N, normalizeStyle as $, createElementVNode as O, createVNode as J, withCtx as K, createBlock as g, createCommentVNode as A, Fragment as Q, renderList as X, unref as M } from "vue";
5
+ function Y(t, i, a) {
6
+ var o;
7
+ if (!!i.measurement === !!a && ((o = i.measurement) == null ? void 0 : o.id) === a)
8
+ return i;
9
+ if (!a)
10
+ return {
11
+ costPerUnit: i.costPerUnit
12
+ };
13
+ const s = t.measurements.find((p) => p.id === a);
14
+ return s ? {
15
+ costPerUnit: i.costPerUnit,
16
+ measurement: s
17
+ } : {
18
+ costPerUnit: i.costPerUnit
19
+ };
20
+ }
21
+ function oe(t, i, a, l) {
22
+ var P, _, n;
23
+ if (l != null && l.manualTotalCost)
24
+ return l == null ? void 0 : l.manualTotalCost;
25
+ const u = (n = (_ = (P = l == null ? void 0 : l.supplier) == null ? void 0 : P.supplyItems) == null ? void 0 : _.find(
26
+ (e) => e.skuId === t._id
27
+ )) == null ? void 0 : n.defaultCost, s = t.defaultCost ? Y(t.unit, t.defaultCost, t.trackingMeasurement) : void 0, o = u ?? s, p = o == null ? void 0 : o.costPerUnit, y = p ? o != null && o.measurement ? +T(p) / +T(o == null ? void 0 : o.measurement.conversion) : +T(p) : void 0, v = y ? a ? y * +T(a.conversion) : y : void 0, h = v ? +T(i) * v : void 0;
28
+ return h ? {
29
+ ...I(h ?? 0, 2),
30
+ currency: w()
31
+ } : {
32
+ amount: 0,
33
+ precision: 0,
34
+ currency: w()
35
+ };
36
+ }
37
+ function k(t) {
38
+ return H.parse(t);
39
+ }
40
+ function L(t) {
41
+ return {
42
+ _id: t.doc._id,
43
+ internal: t.type,
44
+ contactName: t.doc.profile.name,
45
+ name: t.doc.profile.name ?? "",
46
+ email: t.doc.profile.email,
47
+ phoneNumber: t.doc.profile.phoneNo,
48
+ registrationNumber: t.doc.profile.regNo,
49
+ address: t.doc.profile.address ?? {
50
+ line1: "",
51
+ state: "",
52
+ city: "",
53
+ postcode: "",
54
+ country: ""
55
+ }
56
+ };
57
+ }
58
+ function se(t, i, a = !1, l = !1) {
59
+ const u = z(), s = R();
60
+ s.watchLocation(async () => {
61
+ var b;
62
+ await u.readSuppliers();
63
+ const n = t();
64
+ if ((b = n.supplier) != null && b._id) return;
65
+ const e = l ? u.suppliers[0] : u.businessSuppliers[0], r = (a ? s.locations.filter((m) => m.doc._id !== s.currentLocation.doc._id) : s.locations)[0];
66
+ i({
67
+ ...n,
68
+ supplier: e ? k(e) : r ? L(r) : n.supplier
69
+ });
70
+ });
71
+ const o = f(
72
+ () => {
73
+ var n, e;
74
+ return typeof ((e = (n = t()) == null ? void 0 : n.supplier) == null ? void 0 : e.internal) == "string" ? F.TRANSFER : F.PURCHASE;
75
+ }
76
+ ), p = f({
77
+ get() {
78
+ var n, e;
79
+ return (e = (n = t()) == null ? void 0 : n.supplier) == null ? void 0 : e._id;
80
+ },
81
+ set(n) {
82
+ const e = t() ?? {};
83
+ if (o.value === F.PURCHASE) {
84
+ const C = (l ? u.suppliers : u.businessSuppliers).find((E) => E._id === n);
85
+ i({
86
+ ...e,
87
+ supplier: C ? k(C) : e.supplier
88
+ });
89
+ return;
90
+ }
91
+ const b = (a ? s.locations.filter((m) => m.doc._id !== s.currentLocation.doc._id) : s.locations).find((m) => m.doc._id === n);
92
+ i({
93
+ ...e,
94
+ supplier: b ? L(b) : e.supplier
95
+ });
96
+ }
97
+ }), y = f(() => u.locationSuppliers.map(k)), v = f(() => u.businessSuppliers.map(k)), h = f(() => {
98
+ const n = [...y.value], e = [...v.value];
99
+ return l ? [...e, ...n] : e;
100
+ }), c = f(() => {
101
+ var d;
102
+ const n = ((d = s._currentLocation) == null ? void 0 : d.type) === B.warehouse;
103
+ return (a ? s.locations.filter((r) => r.doc._id !== s.currentLocation.doc._id) : s.locations).filter((r) => n || r.acceptRequest).map(L);
104
+ }), P = f(() => {
105
+ if (o.value === F.PURCHASE) {
106
+ const e = y.value.map((r) => ({
107
+ label: r.name,
108
+ value: r._id
109
+ })), d = v.value.map((r) => ({
110
+ label: r.name,
111
+ sublabel: "Business supplier",
112
+ value: r._id
113
+ }));
114
+ return l ? [...e, ...d] : d;
115
+ }
116
+ return c.value.map((e) => ({
117
+ label: e.name,
118
+ sublabel: e.internal ? `${e.internal}` : void 0,
119
+ value: e._id
120
+ }));
121
+ }), _ = f(() => {
122
+ var r, b;
123
+ const n = (b = (r = t()) == null ? void 0 : r.supplier) == null ? void 0 : b._id;
124
+ if (o.value === F.PURCHASE) {
125
+ const m = u.suppliers.find((C) => C._id === n);
126
+ return m ? k(m) : null;
127
+ }
128
+ const d = s.locations.find((m) => m.doc._id);
129
+ return d ? L(d) : null;
130
+ });
131
+ return {
132
+ transferLocationModel: p,
133
+ transferLocationOptions: P,
134
+ locationOptionsTypePurchase: h,
135
+ locationOptionsTypePurchaseLocationLevel: y,
136
+ locationOptionsTypeTransfer: c,
137
+ selectedLocation: _
138
+ };
139
+ }
140
+ const Z = { class: "overflow-y-auto h-full pb-8" }, ae = /* @__PURE__ */ j({
141
+ __name: "FmFilterableMenuOptions",
142
+ props: /* @__PURE__ */ q({
143
+ modelValue: {},
144
+ maxHeight: {},
145
+ width: {},
146
+ handleItemChange: { type: Function },
147
+ items: {},
148
+ options: {}
149
+ }, {
150
+ search: {},
151
+ searchModifiers: {}
152
+ }),
153
+ emits: ["update:search"],
154
+ setup(t) {
155
+ const i = t, a = x(t, "search"), l = f(
156
+ () => new D(i.items, ["label", "sublabel"], i.options)
157
+ ), u = f(() => l.value.search(a.value)), s = W();
158
+ return console.log({ stickyRef: s }), (o, p) => {
159
+ const y = V("FmButton"), v = V("FmTextField"), h = V("FmMenuItem");
160
+ return S(), N("div", {
161
+ class: "relative",
162
+ style: $({ width: o.width })
163
+ }, [
164
+ O("div", {
165
+ class: "sticky top-0 bg-white mb-8",
166
+ ref_key: "stickyRef",
167
+ ref: s
168
+ }, [
169
+ J(v, {
170
+ modelValue: a.value,
171
+ "onUpdate:modelValue": p[1] || (p[1] = (c) => a.value = c),
172
+ placeholder: "Filter options"
173
+ }, {
174
+ append: K(() => [
175
+ a.value ? (S(), g(y, {
176
+ key: 0,
177
+ variant: "tertiary",
178
+ "prepend-icon": "close",
179
+ onClick: p[0] || (p[0] = (c) => a.value = "")
180
+ })) : A("", !0)
181
+ ]),
182
+ _: 1
183
+ }, 8, ["modelValue"])
184
+ ], 512),
185
+ O("div", Z, [
186
+ (S(!0), N(Q, null, X(u.value, (c, P) => (S(), g(h, {
187
+ key: P,
188
+ label: c.label,
189
+ sublabel: c.sublabel,
190
+ "model-value": M(U)(o.modelValue, c.value),
191
+ onClick: () => o.handleItemChange(M(U)(o.modelValue, c.value), c),
192
+ onVnodeMounted: (_) => {
193
+ var n, e;
194
+ return M(U)(o.modelValue, c.value) && ((n = _.el) == null || n.scrollIntoView({ behavior: "instant", block: "end" }), (e = _.el) == null || e.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
195
+ }
196
+ }, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
197
+ u.value.length ? A("", !0) : (S(), g(h, {
198
+ key: 0,
199
+ disabled: "",
200
+ label: "No options available"
201
+ }))
202
+ ])
203
+ ], 4);
204
+ };
205
+ }
206
+ });
207
+ export {
208
+ ae as _,
209
+ oe as c,
210
+ se as u
211
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as oe, mergeModels as z, useModel as se, computed as v, ref as P, watch as O, inject as ie, resolveComponent as b, openBlock as f, createElementBlock as y, createElementVNode as u, createVNode as h, withCtx as g, renderSlot as T, normalizeClass as V, toDisplayString as x, withDirectives as le, vModelText as ae, createCommentVNode as q, createTextVNode as ue, createBlock as W, Fragment as re, renderList as me } from "vue";
2
- import { $ as I, I as k, P as L, L as ce, j as M, aB as de, t as pe, K as fe, ah as ve, az as be, ay as ye } from "./app-Du-JrqLm.js";
2
+ import { $ as I, I as k, P as L, L as ce, j as M, aB as de, t as pe, K as fe, ah as ve, az as be, ay as ye } from "./app-B4RHEuan.js";
3
3
  import "@feedmepos/ui-library";
4
4
  function E() {
5
5
  return {
@@ -1,5 +1,5 @@
1
1
  import { ref as C, computed as F, defineComponent as Y, resolveComponent as S, openBlock as M, createBlock as O, withCtx as R, createElementVNode as x, createVNode as g, unref as l, createElementBlock as ee, toDisplayString as j, createTextVNode as te, watch as ue, isRef as ce, normalizeClass as de, normalizeStyle as me, createSlots as pe, Teleport as fe, normalizeProps as ve, guardReactiveProps as ge } from "vue";
2
- import { a as J, e as h, f as B, h as ye, D as oe, i as Q, H as be, m as _e, A as xe, J as ne, p as se, u as ke, z as he, _ as we, B as Se, E as Ie, G as ae } from "./app-Du-JrqLm.js";
2
+ import { a as J, e as h, f as B, h as ye, D as oe, i as Q, H as be, m as _e, A as xe, J as ne, p as se, u as ke, z as he, _ as we, B as Se, E as Ie, G as ae } from "./app-B4RHEuan.js";
3
3
  import { useDialog as le, useSnackbar as Z, useProxiedModel as Fe, useBreakpoints as Ce } from "@feedmepos/ui-library";
4
4
  import { useI18n as W } from "@feedmepos/mf-common";
5
5
  import { defineStore as ie, storeToRefs as re } from "pinia";