@feedmepos/mf-inventory-portal 0.0.22-dev.32 → 0.0.22-dev.34
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.
- package/dist/{ApprovalView-COJaxxIv.js → ApprovalView-2pX2IV1F.js} +9 -10
- package/dist/{BindingsDialog-BZ_Xi4WF.js → BindingsDialog-EyImpE9g.js} +1 -1
- package/dist/{BindingsPicker-CT7cW6T6.js → BindingsPicker-CbBNBcWW.js} +1 -1
- package/dist/{BindingsTable-D01Xf3rR.js → BindingsTable-CJeV7Dd2.js} +1 -1
- package/dist/{ClosingTemplateView-1KqjE0Fw.js → ClosingTemplateView-BDEooji1.js} +5 -5
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DZtc5R4Z.js +266 -0
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DnCOKma5.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-z-BBBTkh.js} +1 -1
- package/dist/{IngredientsView-N3D-1BPD.js → IngredientsView-BvKaI0nb.js} +3 -3
- package/dist/{IntegrationView-CSv7EbNg.js → IntegrationView-1lXCciJp.js} +120 -120
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D2IFaLGH.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Bgd922-L.js} +1 -1
- package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-Bexig132.js +116 -0
- package/dist/{PurchaseOrderPrintPreview-CIVEoeLg.js → PurchaseOrderPrintPreview-036mLqRD.js} +1 -1
- package/dist/ReceiveRequestView-BGlxEJkh.js +1626 -0
- package/dist/{RecipeView-B7EJV9Fd.js → RecipeView-BuiA-2uY.js} +3 -3
- package/dist/{StockView-BL2JzJoE.js → StockView-BKX6NX-g.js} +14 -15
- package/dist/{SupplierView-taLOqF4j.js → SupplierView-Ck5hH5gT.js} +3 -3
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DFDc3P3S.js +1139 -0
- package/dist/TransferTemplateView-ByYEje9E.js +1237 -0
- package/dist/{UnitView-DYeZDXzf.js → UnitView-DB2hQFMC.js} +4 -4
- package/dist/{WarehouseView-B9TG01jw.js → WarehouseView-CFJiuhpx.js} +2 -2
- package/dist/{app-pztf5tL8.js → app-Z9P39kGh.js} +31 -31
- package/dist/app.js +1 -1
- package/dist/{decimal-ICTuLpM4.js → decimal-DIe_fFDH.js} +1 -1
- package/dist/{defineDeepModel-Cep_eUEL.js → defineDeepModel-DH8vhBpR.js} +3 -3
- package/dist/format-time-from-id-CAjL4U2X.js +15 -0
- package/dist/purchase-order-transaction-type-BJDnbhdk.js +338 -0
- package/dist/{supplier-_yZrMtoz.js → supplier-wJJ7ATk2.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-template-enabled-locations-2-j_9uepqV.js → use-template-enabled-locations-2-CeSeHnX0.js} +1 -1
- package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetails.vue.d.ts +0 -2
- package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetailsProps.d.ts +0 -1
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +5 -8
- package/dist/views/transfer-template/helpers/template-item.error.helper.d.ts +1 -0
- package/dist/{xlsx-Cz8iRYr9.js → xlsx-DrDljHnF.js} +1 -1
- package/dist/{xlsx.util-Dz3iSFMT.js → xlsx.util-BwF0vRjF.js} +2 -2
- package/package.json +1 -1
- package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-Cz_ykc82.js +0 -88
- package/dist/ReceiveRequestView-mkNXM5bz.js +0 -215
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DIERlQsA.js +0 -858
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-Cccb5NAv.js +0 -1678
- package/dist/TransferTemplateView-CukOHvNg.js +0 -1232
- package/dist/format-time-from-id-CLQWiF0h.js +0 -15
- package/dist/id-to-date-BwmfqnWe.js +0 -30
- package/dist/purchase-order-transaction-type-B2W6wDCt.js +0 -678
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { defineComponent as ee, ref as h, watch as te, computed as U, resolveComponent as ae, openBlock as g, createBlock as G, unref as e, withCtx as b, createElementVNode as s, normalizeClass as oe, createVNode as n, normalizeStyle as re, toDisplayString as ne, createElementBlock as se, createCommentVNode as le, Teleport as ie, mergeProps as ce } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { b as ue, u as me, _ as de, a as fe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import {
|
|
5
|
-
import { u as ve, _ as De } from "./TransferDetails.vue_vue_type_script_setup_true_lang-DIERlQsA.js";
|
|
2
|
+
import { ab as f, P as J, j as pe } from "./app-Z9P39kGh.js";
|
|
3
|
+
import { b as ue, u as me, _ as de, a as fe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-z-BBBTkh.js";
|
|
4
|
+
import { a as _e, b as ve, _ as De } from "./TransferDetails.vue_vue_type_script_setup_true_lang-DFDc3P3S.js";
|
|
6
5
|
import { _ as he, F as _ } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
7
6
|
import { useBreakpoints as ge } from "@feedmepos/ui-library";
|
|
8
7
|
import { useI18n as be } from "@feedmepos/mf-common";
|
|
9
8
|
const xe = { class: "flex flex-col py-8" }, ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, we = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, ke = {
|
|
10
9
|
key: 0,
|
|
11
10
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
12
|
-
}, Oe = { class: "pt-8" },
|
|
11
|
+
}, Oe = { class: "pt-8" }, Ye = /* @__PURE__ */ ee({
|
|
13
12
|
__name: "ApprovalView",
|
|
14
13
|
setup(Se) {
|
|
15
14
|
const o = _e("approval"), { columnDefs: K } = ve("approval", o), Q = pe();
|
|
@@ -76,7 +75,7 @@ const xe = { class: "flex flex-col py-8" }, ye = { class: "fm-typo-en-body-md-40
|
|
|
76
75
|
onRowClick: (t) => e(o).promptShowTransferDetails(t.purchaseOrder, t)
|
|
77
76
|
}, {
|
|
78
77
|
default: b((t) => {
|
|
79
|
-
var R, k, O, i, S, T, C,
|
|
78
|
+
var R, k, O, i, S, T, C, z, c, F, M, p, $, u, V, Y, j, q, L, m, N, P, E, A, d, H;
|
|
80
79
|
return [
|
|
81
80
|
s("div", xe, [
|
|
82
81
|
s("div", ye, [
|
|
@@ -87,11 +86,11 @@ const xe = { class: "flex flex-col py-8" }, ye = { class: "fm-typo-en-body-md-40
|
|
|
87
86
|
]),
|
|
88
87
|
s("div", we, [
|
|
89
88
|
n(e(_), {
|
|
90
|
-
render: (
|
|
91
|
-
props: (
|
|
89
|
+
render: (z = (C = (T = t.to_name) == null ? void 0 : T.column) == null ? void 0 : C.columnDef) == null ? void 0 : z.cell,
|
|
90
|
+
props: (F = (c = t.to_name) == null ? void 0 : c.getContext) == null ? void 0 : F.call(c)
|
|
92
91
|
}, null, 8, ["render", "props"])
|
|
93
92
|
]),
|
|
94
|
-
s("div", Re, ne((V = (u = (
|
|
93
|
+
s("div", Re, ne((V = (u = ($ = (p = (M = r.original.purchaseOrder) == null ? void 0 : M.items) == null ? void 0 : p.map) == null ? void 0 : $.call(p, (I) => `${I.name}`)) == null ? void 0 : u.join) == null ? void 0 : V.call(u, ", ")), 1),
|
|
95
94
|
(Y = r.original.purchaseOrder) != null && Y.ref ? (g(), se("div", ke, [
|
|
96
95
|
n(e(_), {
|
|
97
96
|
render: (L = (q = (j = t.purchaseOrder_ref) == null ? void 0 : j.column) == null ? void 0 : q.columnDef) == null ? void 0 : L.cell,
|
|
@@ -125,5 +124,5 @@ const xe = { class: "flex flex-col py-8" }, ye = { class: "fm-typo-en-body-md-40
|
|
|
125
124
|
}
|
|
126
125
|
});
|
|
127
126
|
export {
|
|
128
|
-
|
|
127
|
+
Ye as default
|
|
129
128
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
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 d, createBlock as I, withCtx as R, createVNode as a, createCommentVNode as z, createElementVNode as P } from "vue";
|
|
2
|
-
import { u as V, ar as L, _ as S } from "./app-
|
|
2
|
+
import { u as V, ar as L, _ as S } from "./app-Z9P39kGh.js";
|
|
3
3
|
const U = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "flex justify-end gap-8 items-center"
|
|
@@ -1,5 +1,5 @@
|
|
|
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 { u as M, ar as x, z } from "./app-
|
|
2
|
+
import { u as M, ar as x, z } from "./app-Z9P39kGh.js";
|
|
3
3
|
const F = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "flex flex-col gap-16"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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 { k as v, u as E, ar as L } from "./app-
|
|
2
|
+
import { k as v, u as E, ar as L } from "./app-Z9P39kGh.js";
|
|
3
3
|
import { components as F } from "@feedmepos/ui-library";
|
|
4
4
|
import "@feedmepos/mf-common";
|
|
5
5
|
const P = /* @__PURE__ */ _({
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ref as F, h as x, computed as P, defineComponent as Y, openBlock as k, createElementBlock as S, createElementVNode as f, toDisplayString as I, createVNode as _, unref as c, Fragment as _e, renderList as Ce, resolveComponent as V, createBlock as B, withCtx as R, watch as Me, isRef as Pe, createTextVNode as ve, normalizeClass as Fe, normalizeStyle as Se, Teleport as Ae, normalizeProps as Ve, guardReactiveProps as Ie, mergeProps as Re } from "vue";
|
|
2
|
-
import { u as Ue, _ as Ee, a as ze } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { u as Ue, _ as Ee, a as ze } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-z-BBBTkh.js";
|
|
3
3
|
import { useCoreStore as Ne, useI18n as J } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialog as Q, useSnackbar as W, FmButtonVariant as be, components as U, useProxiedModel as Be, useBreakpoints as Le } from "@feedmepos/ui-library";
|
|
5
5
|
import { defineStore as we, storeToRefs as Ye } from "pinia";
|
|
6
6
|
import { F as E, D as ye, R as z } from "./row-action.enum-PMKMRrZR.js";
|
|
7
|
-
import { o as je, c as xe, j as ke, u as Ke, R as Ge, A as He, z as Je, i as qe, T as he } from "./app-
|
|
7
|
+
import { o as je, c as xe, j as ke, u as Ke, R as Ge, A as He, z as Je, i as qe, T as he } from "./app-Z9P39kGh.js";
|
|
8
8
|
import { c as Oe, F as N, _ as Te } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
9
|
-
import { f as Qe } from "./format-time-from-id-
|
|
9
|
+
import { f as Qe } from "./format-time-from-id-CAjL4U2X.js";
|
|
10
10
|
import "vue-router";
|
|
11
|
-
import { d as We } from "./defineDeepModel-
|
|
12
|
-
import { u as Xe } from "./use-template-enabled-locations-2-
|
|
11
|
+
import { d as We } from "./defineDeepModel-DH8vhBpR.js";
|
|
12
|
+
import { u as Xe } from "./use-template-enabled-locations-2-CeSeHnX0.js";
|
|
13
13
|
const q = je((m, g) => {
|
|
14
14
|
function v() {
|
|
15
15
|
var s;
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { a as S, t as B, a3 as A, Q as D, ai as R, j, aj as V } from "./app-Z9P39kGh.js";
|
|
2
|
+
import { u as H } from "./supplier-wJJ7ATk2.js";
|
|
3
|
+
import { P as k } from "./purchase-order-transaction-type-BJDnbhdk.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;
|
|
7
|
+
if (s != null && s.manualTotalCost)
|
|
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(
|
|
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;
|
|
12
|
+
return d ? {
|
|
13
|
+
...B(d ?? 0, 2),
|
|
14
|
+
currency: A()
|
|
15
|
+
} : {
|
|
16
|
+
amount: 0,
|
|
17
|
+
precision: 0,
|
|
18
|
+
currency: A()
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function _(c) {
|
|
22
|
+
return R.parse(c);
|
|
23
|
+
}
|
|
24
|
+
function T(c) {
|
|
25
|
+
return {
|
|
26
|
+
_id: c.doc._id,
|
|
27
|
+
internal: c.type,
|
|
28
|
+
contactName: c.doc.profile.name,
|
|
29
|
+
name: c.doc.profile.name ?? "",
|
|
30
|
+
email: c.doc.profile.email,
|
|
31
|
+
phoneNumber: c.doc.profile.phoneNo,
|
|
32
|
+
registrationNumber: c.doc.profile.regNo,
|
|
33
|
+
address: c.doc.profile.address ?? {
|
|
34
|
+
line1: "",
|
|
35
|
+
state: "",
|
|
36
|
+
city: "",
|
|
37
|
+
postcode: "",
|
|
38
|
+
country: ""
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function oe(c, l, t = !1, s = !1) {
|
|
43
|
+
const e = H(), o = j();
|
|
44
|
+
o.watchLocation(async () => {
|
|
45
|
+
var g;
|
|
46
|
+
await e.readSuppliers();
|
|
47
|
+
const u = c();
|
|
48
|
+
if ((g = u.supplier) != null && g._id) return;
|
|
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({
|
|
51
|
+
...u,
|
|
52
|
+
supplier: r ? _(r) : f ? T(f) : u.supplier
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
const n = y(
|
|
56
|
+
() => {
|
|
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;
|
|
59
|
+
}
|
|
60
|
+
), i = y({
|
|
61
|
+
get() {
|
|
62
|
+
var u, r;
|
|
63
|
+
return (r = (u = c()) == null ? void 0 : u.supplier) == null ? void 0 : r._id;
|
|
64
|
+
},
|
|
65
|
+
set(u) {
|
|
66
|
+
const r = c() ?? {};
|
|
67
|
+
if (n.value === k.PURCHASE) {
|
|
68
|
+
const C = (s ? e.suppliers : e.businessSuppliers).find((U) => U._id === u);
|
|
69
|
+
l({
|
|
70
|
+
...r,
|
|
71
|
+
supplier: C ? _(C) : r.supplier
|
|
72
|
+
});
|
|
73
|
+
return;
|
|
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({
|
|
77
|
+
...r,
|
|
78
|
+
supplier: g ? T(g) : r.supplier
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}), a = y(() => e.locationSuppliers.map(_)), p = y(() => e.businessSuppliers.map(_)), d = y(() => {
|
|
82
|
+
const u = [...a.value], r = [...p.value];
|
|
83
|
+
return s ? [...r, ...u] : r;
|
|
84
|
+
}), P = y(() => {
|
|
85
|
+
var h;
|
|
86
|
+
const u = ((h = o._currentLocation) == null ? void 0 : h.type) === D.warehouse;
|
|
87
|
+
return (t ? o.locations.filter((f) => f.doc._id !== o.currentLocation.doc._id) : o.locations).filter((f) => u || f.acceptRequest).map(T);
|
|
88
|
+
}), b = y(() => {
|
|
89
|
+
if (n.value === k.PURCHASE) {
|
|
90
|
+
const r = a.value.map((f) => ({
|
|
91
|
+
label: f.name,
|
|
92
|
+
value: f._id
|
|
93
|
+
})), h = p.value.map((f) => ({
|
|
94
|
+
label: f.name,
|
|
95
|
+
sublabel: "Business supplier",
|
|
96
|
+
value: f._id
|
|
97
|
+
}));
|
|
98
|
+
return s ? [...r, ...h] : h;
|
|
99
|
+
}
|
|
100
|
+
return P.value.map((r) => ({
|
|
101
|
+
label: r.name,
|
|
102
|
+
sublabel: r.internal ? `${r.internal}` : void 0,
|
|
103
|
+
value: r._id
|
|
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) {
|
|
109
|
+
const m = e.suppliers.find((C) => C._id === u);
|
|
110
|
+
return m ? _(m) : null;
|
|
111
|
+
}
|
|
112
|
+
const h = o.locations.find((m) => m.doc._id);
|
|
113
|
+
return h ? T(h) : null;
|
|
114
|
+
});
|
|
115
|
+
return {
|
|
116
|
+
transferLocationModel: i,
|
|
117
|
+
transferLocationOptions: b,
|
|
118
|
+
locationOptionsTypePurchase: d,
|
|
119
|
+
locationOptionsTypePurchaseLocationLevel: a,
|
|
120
|
+
locationOptionsTypeTransfer: P,
|
|
121
|
+
selectedLocation: v
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
class O {
|
|
125
|
+
static getDescendantProperty(l, t, s = []) {
|
|
126
|
+
let e, o, n, i, a, p;
|
|
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);
|
|
135
|
+
} else
|
|
136
|
+
s.push(l);
|
|
137
|
+
return s;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
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({
|
|
143
|
+
caseSensitive: !1,
|
|
144
|
+
sort: !1
|
|
145
|
+
}, s);
|
|
146
|
+
}
|
|
147
|
+
search(l = "") {
|
|
148
|
+
if (l === "")
|
|
149
|
+
return this.haystack;
|
|
150
|
+
const t = [];
|
|
151
|
+
for (let s = 0; s < this.haystack.length; s++) {
|
|
152
|
+
const e = this.haystack[s];
|
|
153
|
+
if (this.keys.length === 0) {
|
|
154
|
+
const o = L.isMatch(e, l, this.options.caseSensitive);
|
|
155
|
+
o && t.push({ item: e, score: o });
|
|
156
|
+
} else
|
|
157
|
+
for (let o = 0; o < this.keys.length; o++) {
|
|
158
|
+
const n = O.getDescendantProperty(e, this.keys[o]);
|
|
159
|
+
let i = !1;
|
|
160
|
+
for (let a = 0; a < n.length; a++) {
|
|
161
|
+
const p = L.isMatch(n[a], l, this.options.caseSensitive);
|
|
162
|
+
if (p) {
|
|
163
|
+
i = !0, t.push({ item: e, score: p });
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
if (i)
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return this.options.sort && t.sort((s, e) => s.score - e.score), t.map((s) => s.item);
|
|
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;
|
|
177
|
+
}
|
|
178
|
+
static nearestIndexesFor(l, t) {
|
|
179
|
+
const s = t.split("");
|
|
180
|
+
let e = [];
|
|
181
|
+
return L.indexesOfFirstLetter(l, t).forEach((n, i) => {
|
|
182
|
+
let a = n + 1;
|
|
183
|
+
e[i] = [n];
|
|
184
|
+
for (let p = 1; p < s.length; p++) {
|
|
185
|
+
const d = s[p];
|
|
186
|
+
if (a = l.indexOf(d, a), a === -1) {
|
|
187
|
+
e[i] = !1;
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
e[i].push(a), a++;
|
|
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;
|
|
193
|
+
}
|
|
194
|
+
static indexesOfFirstLetter(l, t) {
|
|
195
|
+
const s = t[0];
|
|
196
|
+
return l.split("").map((e, o) => e !== s ? !1 : o).filter((e) => e !== !1);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
const z = { class: "sticky top-0 bg-white mb-8" }, G = { class: "overflow-y-auto pb-8" }, ie = /* @__PURE__ */ $({
|
|
200
|
+
__name: "FmFilterableMenuOptions",
|
|
201
|
+
props: /* @__PURE__ */ W({
|
|
202
|
+
modelValue: {},
|
|
203
|
+
maxHeight: {},
|
|
204
|
+
width: {},
|
|
205
|
+
handleItemChange: { type: Function },
|
|
206
|
+
items: {},
|
|
207
|
+
options: {}
|
|
208
|
+
}, {
|
|
209
|
+
search: {},
|
|
210
|
+
searchModifiers: {}
|
|
211
|
+
}),
|
|
212
|
+
emits: ["update:search"],
|
|
213
|
+
setup(c) {
|
|
214
|
+
const l = c, t = Q(c, "search"), s = y(
|
|
215
|
+
() => new L(l.items, ["label", "sublabel"], l.options)
|
|
216
|
+
), e = y(() => s.value.search(t.value));
|
|
217
|
+
return (o, n) => {
|
|
218
|
+
const i = w("FmButton"), a = w("FmTextField"), p = w("FmMenuItem");
|
|
219
|
+
return F(), I("div", {
|
|
220
|
+
class: "relative",
|
|
221
|
+
style: J({ maxHeight: `${o.maxHeight}px`, width: o.width })
|
|
222
|
+
}, [
|
|
223
|
+
N("div", z, [
|
|
224
|
+
K(a, {
|
|
225
|
+
modelValue: t.value,
|
|
226
|
+
"onUpdate:modelValue": n[1] || (n[1] = (d) => t.value = d),
|
|
227
|
+
placeholder: "Filter options"
|
|
228
|
+
}, {
|
|
229
|
+
append: X(() => [
|
|
230
|
+
t.value ? (F(), x(i, {
|
|
231
|
+
key: 0,
|
|
232
|
+
variant: "tertiary",
|
|
233
|
+
"prepend-icon": "close",
|
|
234
|
+
onClick: n[0] || (n[0] = (d) => t.value = "")
|
|
235
|
+
})) : E("", !0)
|
|
236
|
+
]),
|
|
237
|
+
_: 1
|
|
238
|
+
}, 8, ["modelValue"])
|
|
239
|
+
]),
|
|
240
|
+
N("div", G, [
|
|
241
|
+
(F(!0), I(Y, null, Z(e.value, (d, P) => (F(), x(p, {
|
|
242
|
+
key: P,
|
|
243
|
+
label: d.label,
|
|
244
|
+
sublabel: d.sublabel,
|
|
245
|
+
"model-value": M(V)(o.modelValue, d.value),
|
|
246
|
+
onClick: () => o.handleItemChange(M(V)(o.modelValue, d.value), d),
|
|
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;
|
|
250
|
+
}
|
|
251
|
+
}, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
|
|
252
|
+
e.value.length ? E("", !0) : (F(), x(p, {
|
|
253
|
+
key: 0,
|
|
254
|
+
disabled: "",
|
|
255
|
+
label: "No options available"
|
|
256
|
+
}))
|
|
257
|
+
])
|
|
258
|
+
], 4);
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
export {
|
|
263
|
+
ie as _,
|
|
264
|
+
ne as c,
|
|
265
|
+
oe as u
|
|
266
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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
2
|
import { FmButtonVariant as X, useBreakpoints as z } from "@feedmepos/ui-library";
|
|
3
|
-
import { j as O, P as U } from "./app-
|
|
3
|
+
import { j as O, P as U } from "./app-Z9P39kGh.js";
|
|
4
4
|
import { useCoreStore as Z, useI18n as j } from "@feedmepos/mf-common";
|
|
5
5
|
const I = E({});
|
|
6
6
|
function A() {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ref as z, defineComponent as le, computed as C, resolveComponent as I, openBlock as f, createBlock as P, withCtx as $, createVNode as y, unref as c, createElementBlock as E, Fragment as X, createElementVNode as d, createCommentVNode as O, onMounted as ot, watch as je, normalizeClass as J, createTextVNode as He, toDisplayString as L, renderList as oe, isRef as Ee, renderSlot as ge, createSlots as Oe, normalizeStyle as lt, Teleport as De, normalizeProps as at, guardReactiveProps as rt } from "vue";
|
|
2
|
-
import { u as ae, c as Ye, S as st, _ as it, A as he, a as Ge, g as _e, t as qe, F as ve, R as Ve, U as ut, M as dt, d as Ae, b as We, C as ke, e as Te, f as ct, h as mt, I as pt, i as vt, j as ft } from "./app-
|
|
2
|
+
import { u as ae, c as Ye, S as st, _ as it, A as he, a as Ge, g as _e, t as qe, F as ve, R as Ve, U as ut, M as dt, d as Ae, b as We, C as ke, e as Te, f as ct, h as mt, I as pt, i as vt, j as ft } from "./app-Z9P39kGh.js";
|
|
3
3
|
import { useDialog as Ke, useSnackbar as xe, useProxiedModel as Pe, useDialogChild as yt, useBreakpoints as gt } from "@feedmepos/ui-library";
|
|
4
4
|
import { i as bt, _ as ht } from "./is-linked-ingredient-error-fJ2TJb3z.js";
|
|
5
5
|
import { F as K, D as Be, R as be } from "./row-action.enum-PMKMRrZR.js";
|
|
6
6
|
import { useI18n as re, useCoreStore as fe } from "@feedmepos/mf-common";
|
|
7
7
|
import { defineStore as _t, storeToRefs as xt } from "pinia";
|
|
8
8
|
import { c as Vt, _ as kt, F as ze } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
9
|
-
import { u as Ct, _ as Ft, a as St } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { u as Ct, _ as Ft, a as St } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-z-BBBTkh.js";
|
|
10
10
|
import { g as wt, _ as Ce, S as Fe } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
|
|
11
|
-
import { _ as Se, t as Je, d as Qe, s as Mt, r as $t } from "./xlsx.util-
|
|
11
|
+
import { _ as Se, t as Je, d as Qe, s as Mt, r as $t } from "./xlsx.util-BwF0vRjF.js";
|
|
12
12
|
import { _ as we } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
13
13
|
const Me = _t("ingredientForm", function() {
|
|
14
14
|
const s = Ke(), m = xe(), i = ae(), n = z(!1), { t: l } = re(), o = z();
|