@feedmepos/mf-inventory-portal 0.0.21-dev.3 → 0.0.21-dev.5
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-BHoJzHuo.js +129 -0
- package/dist/{BindingsDialog-TLWBqVLe.js → BindingsDialog-sUZjZtSl.js} +1 -1
- package/dist/{BindingsPicker-CArDO6LQ.js → BindingsPicker-CqzSUVc_.js} +1 -1
- package/dist/{BindingsTable-CVBhfcWm.js → BindingsTable-C1o5EgLy.js} +1 -1
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CpN5Kn8b.js +374 -0
- package/dist/{IngredientsView-Sld49F2i.js → IngredientsView-CrXPIQme.js} +100 -92
- package/dist/IntegrationView-BJT-KMVp.js +1141 -0
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BcDiOeBk.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DH0CcGmX.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DVQozd4y.js → PremiumBadge.vue_vue_type_script_setup_true_lang-kJKVCH40.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-D0Rnf43J.js → PurchaseOrderPrintPreview-k26o__vy.js} +1 -1
- package/dist/ReceiveRequestView-ysOzzBTW.js +216 -0
- package/dist/{RecipeView-ppyuFTCK.js → RecipeView-DAH8YIzY.js} +182 -174
- package/dist/{StockView-CoDH6Yf_.js → StockView-BlCpuSLe.js} +564 -556
- package/dist/{SupplierView-D9pKF63i.js → SupplierView-Bwknjcke.js} +263 -255
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +135 -0
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-ELF9eLeq.js → TransferDetails.vue_vue_type_script_setup_true_lang-LCNiBfi7.js} +4 -4
- package/dist/{TransferDialog.vue_vue_type_script_setup_true_lang-BbcRP-G_.js → TransferDialog.vue_vue_type_script_setup_true_lang-BDvtif2q.js} +5 -5
- package/dist/{TransferTemplateView-DMkSlBvQ.js → TransferTemplateView-DcMdNiH6.js} +370 -362
- package/dist/{UnitView-DV4WP6eO.js → UnitView-BVMr4KlR.js} +186 -178
- package/dist/{WarehouseView-DwbO0UGj.js → WarehouseView-Dd-e-IlG.js} +388 -380
- package/dist/{app-Bt8YzxIk.js → app-S6iG6Hux.js} +2531 -2541
- package/dist/app.js +3 -3
- package/dist/{decimal-SucbZ9G4.js → decimal-nOOdFIFP.js} +1 -1
- package/dist/{id-to-date-B81eSX7L.js → id-to-date-CKQ0n3Qi.js} +1 -1
- package/dist/{purchase-order-transaction-type-CuGdiH6i.js → purchase-order-transaction-type-CQ-RpJ0h.js} +3 -3
- package/dist/stores/layout.d.ts +3 -0
- package/dist/{supplier-CMS9fSlT.js → supplier-DQsAfn3q.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{xlsx-BKyJT0L0.js → xlsx-Dgjf-KvE.js} +1 -1
- package/dist/{xlsx.util-bHyU3BvF.js → xlsx.util-CODYzgF8.js} +2 -2
- package/package.json +4 -4
- package/dist/ApprovalView-DE6af6Jx.js +0 -121
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BCI1_Jqi.js +0 -308
- package/dist/IntegrationView-C9lcGzjf.js +0 -1172
- package/dist/ReceiveRequestView-CyWq3rxP.js +0 -208
- package/dist/layout-B2j73HnF.js +0 -151
|
@@ -0,0 +1,129 @@
|
|
|
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 { Y as f, O as J, j as pe } from "./app-S6iG6Hux.js";
|
|
3
|
+
import { b as ue, u as me, _ as de, a as fe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CpN5Kn8b.js";
|
|
4
|
+
import { u as _e } from "./purchase-order-transaction-type-CQ-RpJ0h.js";
|
|
5
|
+
import { u as ve, _ as De } from "./TransferDetails.vue_vue_type_script_setup_true_lang-LCNiBfi7.js";
|
|
6
|
+
import { _ as he, F as _ } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
7
|
+
import { useBreakpoints as ge } from "@feedmepos/ui-library";
|
|
8
|
+
import { useI18n as be } from "@feedmepos/mf-common";
|
|
9
|
+
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" }, Oe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, Re = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
12
|
+
}, ke = { class: "pt-8" }, je = /* @__PURE__ */ ee({
|
|
13
|
+
__name: "ApprovalView",
|
|
14
|
+
setup(Se) {
|
|
15
|
+
const o = _e("approval"), { columnDefs: K } = ve("approval", o), Q = pe();
|
|
16
|
+
f.object({
|
|
17
|
+
name: f.string().optional().nullable(),
|
|
18
|
+
start: f.date().optional().nullable(),
|
|
19
|
+
end: f.date().optional().nullable()
|
|
20
|
+
});
|
|
21
|
+
const x = h({
|
|
22
|
+
name: "",
|
|
23
|
+
...ue()
|
|
24
|
+
}), a = h({
|
|
25
|
+
startDate: J(x.value.start ?? /* @__PURE__ */ new Date()),
|
|
26
|
+
endDate: J(x.value.end ?? /* @__PURE__ */ new Date())
|
|
27
|
+
});
|
|
28
|
+
te([() => a.value.startDate], () => {
|
|
29
|
+
if (!a.value.startDate)
|
|
30
|
+
return;
|
|
31
|
+
if (!a.value.endDate) {
|
|
32
|
+
a.value.endDate = a.value.startDate;
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const w = new Date(a.value.startDate);
|
|
36
|
+
if (new Date(a.value.endDate).getTime() < w.getTime()) {
|
|
37
|
+
a.value.endDate = a.value.startDate;
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
const v = h(""), { breakpoints: y } = ge(), D = U(() => y.value.xs || y.value.sm), W = U(() => D.value ? 10 : 20), X = me(), { t: Z } = be();
|
|
42
|
+
return (w, l) => {
|
|
43
|
+
const B = ae("FmTable");
|
|
44
|
+
return g(), G(de, {
|
|
45
|
+
title: e(Z)("inventory.transfer.approval.title")
|
|
46
|
+
}, {
|
|
47
|
+
default: b(() => [
|
|
48
|
+
s("div", {
|
|
49
|
+
class: oe([
|
|
50
|
+
"flex flex-col gap-8 max-h-full",
|
|
51
|
+
{
|
|
52
|
+
"p-0": D.value,
|
|
53
|
+
"px-24 ": !D.value
|
|
54
|
+
}
|
|
55
|
+
])
|
|
56
|
+
}, [
|
|
57
|
+
n(fe, {
|
|
58
|
+
searchable: "",
|
|
59
|
+
"change-location": "",
|
|
60
|
+
search: v.value,
|
|
61
|
+
"onUpdate:search": l[0] || (l[0] = (r) => v.value = r),
|
|
62
|
+
actions: [{ icon: "refresh", onClick: e(o).fetchData }]
|
|
63
|
+
}, null, 8, ["search", "actions"]),
|
|
64
|
+
n(B, {
|
|
65
|
+
style: re(e(X).tableHeight),
|
|
66
|
+
"column-defs": e(K),
|
|
67
|
+
"row-data": e(o).purchaseRequests.value,
|
|
68
|
+
"search-value": v.value,
|
|
69
|
+
loading: !e(Q)._currentLocation || e(o).loading.value,
|
|
70
|
+
onRowClick: l[1] || (l[1] = (r) => e(o).promptShowTransferDetails(r.original.purchaseOrder, r.original)),
|
|
71
|
+
"page-size": W.value
|
|
72
|
+
}, {
|
|
73
|
+
"list-row": b((r) => [
|
|
74
|
+
n(he, {
|
|
75
|
+
row: r,
|
|
76
|
+
onRowClick: (t) => e(o).promptShowTransferDetails(t.purchaseOrder, t)
|
|
77
|
+
}, {
|
|
78
|
+
default: b((t) => {
|
|
79
|
+
var O, R, k, i, S, T, C, z, c, F, M, p, Y, u, $, V, j, q, L, m, N, E, P, A, d, H;
|
|
80
|
+
return [
|
|
81
|
+
s("div", xe, [
|
|
82
|
+
s("div", ye, [
|
|
83
|
+
n(e(_), {
|
|
84
|
+
render: (k = (R = (O = t.purchaseOrder__id) == null ? void 0 : O.column) == null ? void 0 : R.columnDef) == null ? void 0 : k.cell,
|
|
85
|
+
props: (S = (i = t.purchaseOrder__id) == null ? void 0 : i.getContext) == null ? void 0 : S.call(i)
|
|
86
|
+
}, null, 8, ["render", "props"])
|
|
87
|
+
]),
|
|
88
|
+
s("div", we, [
|
|
89
|
+
n(e(_), {
|
|
90
|
+
render: (z = (C = (T = t.to_name) == null ? void 0 : T.column) == null ? void 0 : C.columnDef) == null ? void 0 : z.cell,
|
|
91
|
+
props: (F = (c = t.to_name) == null ? void 0 : c.getContext) == null ? void 0 : F.call(c)
|
|
92
|
+
}, null, 8, ["render", "props"])
|
|
93
|
+
]),
|
|
94
|
+
s("div", Oe, ne(($ = (u = (Y = (p = (M = r.original.purchaseOrder) == null ? void 0 : M.items) == null ? void 0 : p.map) == null ? void 0 : Y.call(p, (I) => `${I.name}`)) == null ? void 0 : u.join) == null ? void 0 : $.call(u, ", ")), 1),
|
|
95
|
+
(V = r.original.purchaseOrder) != null && V.ref ? (g(), se("div", Re, [
|
|
96
|
+
n(e(_), {
|
|
97
|
+
render: (L = (q = (j = t.purchaseOrder_ref) == null ? void 0 : j.column) == null ? void 0 : q.columnDef) == null ? void 0 : L.cell,
|
|
98
|
+
props: (N = (m = t.purchaseOrder_ref) == null ? void 0 : m.getContext) == null ? void 0 : N.call(m)
|
|
99
|
+
}, null, 8, ["render", "props"])
|
|
100
|
+
])) : le("", !0),
|
|
101
|
+
s("div", ke, [
|
|
102
|
+
n(e(_), {
|
|
103
|
+
render: (A = (P = (E = t.purchaseOrder_status) == null ? void 0 : E.column) == null ? void 0 : P.columnDef) == null ? void 0 : A.cell,
|
|
104
|
+
props: (H = (d = t.purchaseOrder_status) == null ? void 0 : d.getContext) == null ? void 0 : H.call(d)
|
|
105
|
+
}, null, 8, ["render", "props"])
|
|
106
|
+
])
|
|
107
|
+
])
|
|
108
|
+
];
|
|
109
|
+
}),
|
|
110
|
+
_: 2
|
|
111
|
+
}, 1032, ["row", "onRowClick"])
|
|
112
|
+
]),
|
|
113
|
+
_: 1
|
|
114
|
+
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
|
|
115
|
+
], 2),
|
|
116
|
+
(g(), G(ie, { to: "body" }, [
|
|
117
|
+
n(De, ce(e(o).transferDetailsProps.value, {
|
|
118
|
+
onSubmitted: e(o).fetchData
|
|
119
|
+
}), null, 16, ["onSubmitted"])
|
|
120
|
+
]))
|
|
121
|
+
]),
|
|
122
|
+
_: 1
|
|
123
|
+
}, 8, ["title"]);
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
export {
|
|
128
|
+
je as default
|
|
129
|
+
};
|
|
@@ -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,
|
|
2
|
+
import { u as V, am as L, _ as S } from "./app-S6iG6Hux.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 x,
|
|
2
|
+
import { u as x, am as M, y as z } from "./app-S6iG6Hux.js";
|
|
3
3
|
const K = {
|
|
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 { q as v, u as E,
|
|
2
|
+
import { q as v, u as E, am as L } from "./app-S6iG6Hux.js";
|
|
3
3
|
import { components as F } from "@feedmepos/ui-library";
|
|
4
4
|
import "@feedmepos/mf-common";
|
|
5
5
|
const P = /* @__PURE__ */ _({
|
|
@@ -0,0 +1,374 @@
|
|
|
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 O, withCtx as T, watch as K, mergeModels as W, useModel as U } from "vue";
|
|
2
|
+
import { useBreakpoints as S, FmButtonVariant as X } from "@feedmepos/ui-library";
|
|
3
|
+
import { j as P, O as N } from "./app-S6iG6Hux.js";
|
|
4
|
+
import { useCoreStore as Z, useI18n as j } from "@feedmepos/mf-common";
|
|
5
|
+
const I = E({});
|
|
6
|
+
function A() {
|
|
7
|
+
const i = `${Math.random()}`;
|
|
8
|
+
S();
|
|
9
|
+
const o = new ResizeObserver((t) => {
|
|
10
|
+
const l = t.map((n) => n.target.scrollHeight).reduce((n, s) => n + s);
|
|
11
|
+
I[i] = l;
|
|
12
|
+
}), c = (t) => {
|
|
13
|
+
const l = t.el;
|
|
14
|
+
l && o.observe(l);
|
|
15
|
+
}, r = (t) => {
|
|
16
|
+
const l = t.el;
|
|
17
|
+
l && o.unobserve(l);
|
|
18
|
+
};
|
|
19
|
+
return q(() => {
|
|
20
|
+
o.disconnect(), delete I[i];
|
|
21
|
+
}), {
|
|
22
|
+
get tableHeight() {
|
|
23
|
+
return {
|
|
24
|
+
height: `calc(100dvh - ${Object.values(I).reduce((n, s) => n + s, 0) + 64}px)`
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
onMounted: c,
|
|
28
|
+
onUnmounted: r
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const ee = { class: "flex flex-col w-full bg-white h-full" }, ne = {
|
|
32
|
+
key: 0,
|
|
33
|
+
class: /* @__PURE__ */ D(["text-fm-color-typo-secondary fm-typo-en-body-sm-400"])
|
|
34
|
+
}, te = { key: 0 }, oe = { key: 1 }, le = { class: "bg-white flex-1" }, ae = { class: "fixed bottom-96 right-16" }, ke = /* @__PURE__ */ V({
|
|
35
|
+
__name: "SingleColumnLayout",
|
|
36
|
+
props: {
|
|
37
|
+
actions: { default: () => [] },
|
|
38
|
+
title: { default: "Title" },
|
|
39
|
+
description: {},
|
|
40
|
+
showBackButton: { type: Boolean },
|
|
41
|
+
defaultPadding: { type: Boolean },
|
|
42
|
+
breadcrumbs: { default: () => [] },
|
|
43
|
+
usingBusinessHelperText: {}
|
|
44
|
+
},
|
|
45
|
+
emits: ["click:action"],
|
|
46
|
+
setup(i, { emit: o }) {
|
|
47
|
+
const c = i, r = o, t = _(() => c.actions.find((e) => e.isPrimary)), l = _(
|
|
48
|
+
() => c.actions.filter((e) => !e.isPrimary).map((e) => ({ ...e, variant: e.variant ?? X.Tertiary }))
|
|
49
|
+
), { breakpoints: n } = S(), s = _(() => n.value.xs || n.value.sm), d = P(), k = _(() => d.businessLevel), x = A();
|
|
50
|
+
return (e, m) => {
|
|
51
|
+
const B = h("FmButton");
|
|
52
|
+
return a(), b(F, null, [
|
|
53
|
+
f("div", ee, [
|
|
54
|
+
f("div", {
|
|
55
|
+
onVnodeMounted: m[1] || (m[1] = //@ts-ignore
|
|
56
|
+
(...g) => u(x).onMounted && u(x).onMounted(...g)),
|
|
57
|
+
class: D([
|
|
58
|
+
"flex gap-4",
|
|
59
|
+
{
|
|
60
|
+
"p-12": s.value,
|
|
61
|
+
"px-24 py-16": !s.value
|
|
62
|
+
}
|
|
63
|
+
])
|
|
64
|
+
}, [
|
|
65
|
+
f("div", {
|
|
66
|
+
class: D([
|
|
67
|
+
"flex-1 flex flex-col gap-4 fm-typo-en-title-md-600 bg-white",
|
|
68
|
+
{
|
|
69
|
+
"py-12": s.value
|
|
70
|
+
}
|
|
71
|
+
])
|
|
72
|
+
}, [
|
|
73
|
+
f("div", null, L(e.title), 1),
|
|
74
|
+
e.usingBusinessHelperText && k.value ? (a(), b("div", ne, L(e.usingBusinessHelperText), 1)) : y("", !0)
|
|
75
|
+
], 2),
|
|
76
|
+
l.value.length ? (a(), b("div", te, [
|
|
77
|
+
(a(!0), b(F, null, R(l.value, (g) => (a(), w(B, {
|
|
78
|
+
key: g.value,
|
|
79
|
+
label: g.label,
|
|
80
|
+
"prepend-icon": g.prependIcon,
|
|
81
|
+
variant: g.variant,
|
|
82
|
+
onClick: (M) => r("click:action", g.value)
|
|
83
|
+
}, null, 8, ["label", "prepend-icon", "variant", "onClick"]))), 128))
|
|
84
|
+
])) : y("", !0),
|
|
85
|
+
t.value && (u(n).lg || u(n).md) ? (a(), b("div", oe, [
|
|
86
|
+
v(B, {
|
|
87
|
+
label: t.value.label,
|
|
88
|
+
"prepend-icon": t.value.prependIcon,
|
|
89
|
+
onClick: m[0] || (m[0] = (g) => r("click:action", t.value.value))
|
|
90
|
+
}, null, 8, ["label", "prepend-icon"])
|
|
91
|
+
])) : y("", !0)
|
|
92
|
+
], 2),
|
|
93
|
+
f("div", le, [
|
|
94
|
+
G(e.$slots, "default")
|
|
95
|
+
])
|
|
96
|
+
]),
|
|
97
|
+
t.value && s.value ? (a(), w(J, {
|
|
98
|
+
key: 0,
|
|
99
|
+
to: "body"
|
|
100
|
+
}, [
|
|
101
|
+
f("div", ae, [
|
|
102
|
+
v(B, {
|
|
103
|
+
label: t.value.label,
|
|
104
|
+
"prepend-icon": t.value.prependIcon,
|
|
105
|
+
onClick: m[2] || (m[2] = (g) => r("click:action", t.value.value)),
|
|
106
|
+
variant: "fab"
|
|
107
|
+
}, null, 8, ["label", "prepend-icon"])
|
|
108
|
+
])
|
|
109
|
+
])) : y("", !0)
|
|
110
|
+
], 64);
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
}), se = { class: "inline-flex" }, ue = { 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" }, re = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, ie = {
|
|
114
|
+
class: "overflow-hidden overflow-y-scroll",
|
|
115
|
+
style: { maxHeight: "105px" }
|
|
116
|
+
}, ce = {
|
|
117
|
+
class: "overflow-hidden overflow-y-scroll",
|
|
118
|
+
style: { maxHeight: "105px" }
|
|
119
|
+
}, de = /* @__PURE__ */ V({
|
|
120
|
+
__name: "ChangeLocationComponent",
|
|
121
|
+
props: {
|
|
122
|
+
showBusiness: { type: Boolean }
|
|
123
|
+
},
|
|
124
|
+
setup(i) {
|
|
125
|
+
const o = P(), c = Z(), r = _(() => {
|
|
126
|
+
var e;
|
|
127
|
+
return (e = c.currentBusiness.value) == null ? void 0 : e.name;
|
|
128
|
+
}), { t } = j(), l = O(""), n = _({
|
|
129
|
+
get() {
|
|
130
|
+
return o.businessLevel;
|
|
131
|
+
},
|
|
132
|
+
set(e) {
|
|
133
|
+
o.businessLevel = e;
|
|
134
|
+
}
|
|
135
|
+
}), s = _(
|
|
136
|
+
() => o.locations.map((e) => ({ label: e.name, value: e.dbName, type: e.type })).filter(
|
|
137
|
+
(e) => l.value ? e.label.toLocaleLowerCase().includes(l.value.toLocaleLowerCase()) : !0
|
|
138
|
+
)
|
|
139
|
+
), d = _(
|
|
140
|
+
() => s.value.filter((e) => e.type === "restaurant")
|
|
141
|
+
), k = _(
|
|
142
|
+
() => s.value.filter((e) => e.type === "warehouse")
|
|
143
|
+
);
|
|
144
|
+
function x({ value: e }) {
|
|
145
|
+
n.value = !1, o.selectLocation(o.locations.find((m) => m.dbName === e));
|
|
146
|
+
}
|
|
147
|
+
return (e, m) => {
|
|
148
|
+
const B = h("FmIcon"), g = h("FmSearch"), M = h("FmMenuDivider"), H = h("FmMenuHeader"), $ = h("FmMenuItem"), Y = h("FmMenu");
|
|
149
|
+
return a(), b("div", se, [
|
|
150
|
+
v(Y, { "close-on-click": !0 }, {
|
|
151
|
+
"menu-button": T(() => {
|
|
152
|
+
var p;
|
|
153
|
+
return [
|
|
154
|
+
f("div", ue, [
|
|
155
|
+
v(B, {
|
|
156
|
+
name: e.showBusiness && n.value ? "store" : "storefront",
|
|
157
|
+
size: "sm"
|
|
158
|
+
}, null, 8, ["name"]),
|
|
159
|
+
f("div", re, L(e.showBusiness && n.value ? r.value : ((p = u(o)._currentLocation) == null ? void 0 : p.name) ?? u(t)("inventory.common.noLocationSelected")), 1),
|
|
160
|
+
v(B, {
|
|
161
|
+
name: "expand_more",
|
|
162
|
+
size: "sm"
|
|
163
|
+
})
|
|
164
|
+
])
|
|
165
|
+
];
|
|
166
|
+
}),
|
|
167
|
+
default: T(() => [
|
|
168
|
+
v(g, {
|
|
169
|
+
"model-value": l.value,
|
|
170
|
+
"onUpdate:modelValue": m[0] || (m[0] = (p) => l.value = p),
|
|
171
|
+
class: "w-[200px]",
|
|
172
|
+
placeholder: u(t)("inventory.common.table.toolbar.filterItems")
|
|
173
|
+
}, null, 8, ["model-value", "placeholder"]),
|
|
174
|
+
v(M),
|
|
175
|
+
e.showBusiness ? (a(), b(F, { key: 0 }, [
|
|
176
|
+
v(H, {
|
|
177
|
+
label: u(t)("inventory.common.business")
|
|
178
|
+
}, null, 8, ["label"]),
|
|
179
|
+
v(M),
|
|
180
|
+
v($, {
|
|
181
|
+
"model-value": n.value,
|
|
182
|
+
label: r.value,
|
|
183
|
+
onClick: m[1] || (m[1] = (p) => n.value = !0)
|
|
184
|
+
}, null, 8, ["model-value", "label"])
|
|
185
|
+
], 64)) : y("", !0),
|
|
186
|
+
v(H, {
|
|
187
|
+
label: u(t)("inventory.common.restaurant")
|
|
188
|
+
}, null, 8, ["label"]),
|
|
189
|
+
v(M),
|
|
190
|
+
f("div", ie, [
|
|
191
|
+
(a(!0), b(F, null, R(d.value, (p) => {
|
|
192
|
+
var C;
|
|
193
|
+
return a(), w($, {
|
|
194
|
+
key: p.value,
|
|
195
|
+
"model-value": !n.value && ((C = u(o)._currentLocation) == null ? void 0 : C.dbName) === p.value,
|
|
196
|
+
label: p.label,
|
|
197
|
+
onClick: (Q) => x(p)
|
|
198
|
+
}, null, 8, ["model-value", "label", "onClick"]);
|
|
199
|
+
}), 128))
|
|
200
|
+
]),
|
|
201
|
+
d.value.length ? y("", !0) : (a(), w($, {
|
|
202
|
+
key: 1,
|
|
203
|
+
disabled: "",
|
|
204
|
+
label: u(t)("inventory.common.noResultFound")
|
|
205
|
+
}, null, 8, ["label"])),
|
|
206
|
+
v(H, {
|
|
207
|
+
label: u(t)("inventory.common.warehouse")
|
|
208
|
+
}, null, 8, ["label"]),
|
|
209
|
+
v(M),
|
|
210
|
+
f("div", ce, [
|
|
211
|
+
(a(!0), b(F, null, R(k.value, (p) => {
|
|
212
|
+
var C;
|
|
213
|
+
return a(), w($, {
|
|
214
|
+
key: p.value,
|
|
215
|
+
"model-value": !n.value && ((C = u(o)._currentLocation) == null ? void 0 : C.dbName) === p.value,
|
|
216
|
+
label: p.label,
|
|
217
|
+
onClick: (Q) => x(p)
|
|
218
|
+
}, null, 8, ["model-value", "label", "onClick"]);
|
|
219
|
+
}), 128))
|
|
220
|
+
]),
|
|
221
|
+
k.value.length ? y("", !0) : (a(), w($, {
|
|
222
|
+
key: 2,
|
|
223
|
+
disabled: "",
|
|
224
|
+
label: u(t)("inventory.common.noResultFound")
|
|
225
|
+
}, null, 8, ["label"]))
|
|
226
|
+
]),
|
|
227
|
+
_: 1
|
|
228
|
+
})
|
|
229
|
+
]);
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
function xe() {
|
|
234
|
+
const i = /* @__PURE__ */ new Date();
|
|
235
|
+
return i.setDate(i.getDate() - 15), {
|
|
236
|
+
start: i,
|
|
237
|
+
end: /* @__PURE__ */ new Date()
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
function z(i = 15) {
|
|
241
|
+
const o = /* @__PURE__ */ new Date();
|
|
242
|
+
o.setDate(o.getDate() - i);
|
|
243
|
+
const c = o, r = /* @__PURE__ */ new Date();
|
|
244
|
+
return {
|
|
245
|
+
startDate: `${N(c)}`,
|
|
246
|
+
endDate: `${N(r)}`
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
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({
|
|
250
|
+
__name: "FmDateRangePickerChip",
|
|
251
|
+
props: {
|
|
252
|
+
modelValue: { default: (i) => i.modelValue ?? z() }
|
|
253
|
+
},
|
|
254
|
+
emits: ["update:modelValue"],
|
|
255
|
+
setup(i, { emit: o }) {
|
|
256
|
+
const c = o, r = O(z());
|
|
257
|
+
K(r, (l) => {
|
|
258
|
+
c("update:modelValue", l);
|
|
259
|
+
});
|
|
260
|
+
const t = _(() => {
|
|
261
|
+
const { startDate: l, endDate: n } = r.value;
|
|
262
|
+
return !l && !n ? "" : `${l} - ${n}`;
|
|
263
|
+
});
|
|
264
|
+
return (l, n) => {
|
|
265
|
+
const s = h("FmIcon"), d = h("FmDateRangePicker");
|
|
266
|
+
return a(), w(d, {
|
|
267
|
+
"show-predefined-range": "",
|
|
268
|
+
modelValue: r.value,
|
|
269
|
+
"onUpdate:modelValue": n[0] || (n[0] = (k) => r.value = k),
|
|
270
|
+
"start-label": "",
|
|
271
|
+
"end-label": ""
|
|
272
|
+
}, {
|
|
273
|
+
"trigger-button": T(() => [
|
|
274
|
+
f("div", me, [
|
|
275
|
+
v(s, {
|
|
276
|
+
name: "calendar_month",
|
|
277
|
+
size: "sm"
|
|
278
|
+
}),
|
|
279
|
+
f("div", pe, L(t.value), 1)
|
|
280
|
+
])
|
|
281
|
+
]),
|
|
282
|
+
_: 1
|
|
283
|
+
}, 8, ["modelValue"]);
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
}), fe = { class: "flex-1 w-full flex items-center gap-4" }, be = {
|
|
287
|
+
key: 0,
|
|
288
|
+
class: "flex-1"
|
|
289
|
+
}, ye = { class: "w-full max-w-[343px] xs:max-w-[unset] sm:max-w-[unset]" }, Be = /* @__PURE__ */ V({
|
|
290
|
+
__name: "FmInventoryTableToolbar",
|
|
291
|
+
props: /* @__PURE__ */ W({
|
|
292
|
+
dateRangeQuery: { type: Boolean },
|
|
293
|
+
changeLocation: { type: Boolean },
|
|
294
|
+
searchable: { type: Boolean },
|
|
295
|
+
actions: {},
|
|
296
|
+
usingBusinessHelperText: {},
|
|
297
|
+
showBusiness: { type: Boolean }
|
|
298
|
+
}, {
|
|
299
|
+
search: {},
|
|
300
|
+
searchModifiers: {},
|
|
301
|
+
dateRange: {},
|
|
302
|
+
dateRangeModifiers: {}
|
|
303
|
+
}),
|
|
304
|
+
emits: ["update:search", "update:dateRange"],
|
|
305
|
+
setup(i) {
|
|
306
|
+
const { breakpoints: o } = S(), c = _(() => o.value.xs || o.value.sm), r = U(i, "search"), t = U(i, "dateRange"), { t: l } = j(), n = A();
|
|
307
|
+
return (s, d) => {
|
|
308
|
+
const k = h("FmTextField"), x = h("FmButton");
|
|
309
|
+
return a(), b("div", {
|
|
310
|
+
class: "flex flex-col gap-8",
|
|
311
|
+
onVnodeMounted: d[2] || (d[2] = //@ts-ignore
|
|
312
|
+
(...e) => u(n).onMounted && u(n).onMounted(...e)),
|
|
313
|
+
onVnodeUnmounted: d[3] || (d[3] = //@ts-ignore
|
|
314
|
+
(...e) => u(n).onUnmounted && u(n).onUnmounted(...e))
|
|
315
|
+
}, [
|
|
316
|
+
f("div", {
|
|
317
|
+
class: D([
|
|
318
|
+
"flex gap-8 items-center h-48",
|
|
319
|
+
{
|
|
320
|
+
"px-8 flex-col-reverse h-[unset]": c.value,
|
|
321
|
+
"h-48": !c.value
|
|
322
|
+
}
|
|
323
|
+
])
|
|
324
|
+
}, [
|
|
325
|
+
s.changeLocation || s.dateRangeQuery ? (a(), b("div", {
|
|
326
|
+
key: 0,
|
|
327
|
+
class: D([
|
|
328
|
+
"flex gap-8 items-center",
|
|
329
|
+
{
|
|
330
|
+
"w-full overflow-x-auto": c.value
|
|
331
|
+
}
|
|
332
|
+
])
|
|
333
|
+
}, [
|
|
334
|
+
s.changeLocation ? (a(), w(de, {
|
|
335
|
+
key: 0,
|
|
336
|
+
"show-business": s.showBusiness
|
|
337
|
+
}, null, 8, ["show-business"])) : y("", !0),
|
|
338
|
+
s.dateRangeQuery ? (a(), w(ve, {
|
|
339
|
+
key: 1,
|
|
340
|
+
"model-value": t.value,
|
|
341
|
+
"onUpdate:modelValue": d[0] || (d[0] = (e) => t.value = e)
|
|
342
|
+
}, null, 8, ["model-value"])) : y("", !0)
|
|
343
|
+
], 2)) : y("", !0),
|
|
344
|
+
f("div", fe, [
|
|
345
|
+
c.value ? y("", !0) : (a(), b("div", be)),
|
|
346
|
+
f("div", ye, [
|
|
347
|
+
s.searchable ? (a(), w(k, {
|
|
348
|
+
key: 0,
|
|
349
|
+
"model-value": r.value,
|
|
350
|
+
"onUpdate:modelValue": d[1] || (d[1] = (e) => r.value = e),
|
|
351
|
+
"prepend-icon": "search",
|
|
352
|
+
placeholder: u(l)("inventory.common.table.toolbar.filterItems"),
|
|
353
|
+
class: "w-full"
|
|
354
|
+
}, null, 8, ["model-value", "placeholder"])) : y("", !0)
|
|
355
|
+
]),
|
|
356
|
+
(a(!0), b(F, null, R(s.actions, (e, m) => (a(), w(x, {
|
|
357
|
+
key: m,
|
|
358
|
+
variant: "tertiary",
|
|
359
|
+
"prepend-icon": e.icon,
|
|
360
|
+
onClick: e.onClick
|
|
361
|
+
}, null, 8, ["prepend-icon", "onClick"]))), 128))
|
|
362
|
+
])
|
|
363
|
+
], 2)
|
|
364
|
+
], 512);
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
export {
|
|
369
|
+
ke as _,
|
|
370
|
+
Be as a,
|
|
371
|
+
xe as b,
|
|
372
|
+
z as i,
|
|
373
|
+
A as u
|
|
374
|
+
};
|