@feedmepos/mf-inventory-portal 0.0.22-dev.40 → 0.0.22-dev.42
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-JOsQBu1z.js → ApprovalView-5YpqaJKy.js} +3 -3
- package/dist/{BindingsDialog-DG2ZolH1.js → BindingsDialog-lGoLNJyU.js} +1 -1
- package/dist/{BindingsPicker-B7h_iST8.js → BindingsPicker-CdvkacXh.js} +1 -1
- package/dist/{BindingsTable-BToh6gcG.js → BindingsTable-B8G9Ckdk.js} +1 -1
- package/dist/ClosingTemplateView-Dcy08dPm.js +1775 -0
- package/dist/FmDroppableField-DeW5xBTW.js +154 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-4NHQdjz7.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DBpTwDEI.js} +3 -3
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-cSTp7zUx.js +359 -0
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DMOalXUS.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DFHzlUVu.js} +1 -1
- package/dist/{IngredientsView-ChnCqdWi.js → IngredientsView-DKJjOK_4.js} +5 -5
- package/dist/IntegrationView-CgqU4EBV.js +1141 -0
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BQW6HYyD.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-gvpXGm1X.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BQqcpZIJ.js → PremiumBadge.vue_vue_type_script_setup_true_lang-B3JDjoOu.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-BvED8ZbQ.js → PurchaseOrderPrintPreview-olI-JfjI.js} +1 -1
- package/dist/{ReceiveRequestView-DdxBaqmU.js → ReceiveRequestView-flhI8D2c.js} +10 -10
- package/dist/{RecipeView-YdSRy_yP.js → RecipeView-CoMyQ92u.js} +4 -4
- package/dist/{StockView-WF5z4dTF.js → StockView-Dae47pLA.js} +5 -5
- package/dist/{SupplierView-H2Vi5lSs.js → SupplierView-CxYZUHrc.js} +3 -3
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D48gSqHW.js → TransferDetails.vue_vue_type_script_setup_true_lang-DoEEedkk.js} +396 -387
- package/dist/TransferTemplateView-DdB7z0b4.js +1302 -0
- package/dist/{UnitView-qD9JSdHT.js → UnitView-B0E2nG3J.js} +4 -4
- package/dist/{WarehouseView-C19Dd53y.js → WarehouseView-NQ2JwyWK.js} +2 -2
- package/dist/{app-DKE_n9Mo.js → app-tiUQG6R0.js} +3898 -3854
- package/dist/app.d.ts +50 -3
- package/dist/app.js +1 -1
- package/dist/components/FmMultiselectDialog.vue.d.ts +3 -9
- package/dist/{decimal-veoPLYim.js → decimal-BOvNv58m.js} +1 -1
- package/dist/{defineDeepModel-u6t3hXU9.js → defineDeepModel-CNgIKGt8.js} +1 -1
- package/dist/{format-time-from-id-8gjg5B98.js → format-time-from-id-DWlH-AZV.js} +1 -1
- package/dist/format-unit-display-DIhXvTxN.js +1195 -0
- package/dist/stores/netsuite.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-DLcmVScz.js → supplier-rpkSwf7L.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-template-enabled-locations-2-CdJVJikY.js → use-template-enabled-locations-2-BrK8SKvw.js} +1 -1
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +7 -5
- package/dist/{xlsx-CrKrCGZz.js → xlsx-DGqkxpZX.js} +1 -1
- package/dist/{xlsx.util-Bcpkvw1Z.js → xlsx.util-CvycJwUf.js} +1 -1
- package/package.json +3 -1
- package/dist/ClosingTemplateView-BwMJAxuz.js +0 -1688
- package/dist/FmDroppableField-CJNAT3h2.js +0 -152
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Cc_P0kss.js +0 -364
- package/dist/IntegrationView-NWkc9PLW.js +0 -1141
- package/dist/TransferTemplateView-DeT32cat.js +0 -2054
- package/dist/purchase-order-transaction-type-CIDEpjJB.js +0 -348
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { defineComponent as U, ref as d, computed as y, resolveComponent as k, openBlock as s, createElementBlock as c, createElementVNode as p, createCommentVNode as S, renderSlot as u, createBlock as C, normalizeClass as f, toDisplayString as F, unref as B } from "vue";
|
|
2
|
+
import { useI18n as W } from "@feedmepos/mf-common";
|
|
3
|
+
import { X } from "./app-tiUQG6R0.js";
|
|
4
|
+
const q = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "relative"
|
|
7
|
+
}, G = ["accept", "disabled"], H = { class: "flex flex-col gap-8" }, J = ["accept", "disabled"], K = /* @__PURE__ */ U({
|
|
8
|
+
__name: "FmDroppableField",
|
|
9
|
+
props: {
|
|
10
|
+
buttonLabel: {},
|
|
11
|
+
label: { default: "" },
|
|
12
|
+
disabled: { type: Boolean, default: !1 },
|
|
13
|
+
accept: { default: "" },
|
|
14
|
+
maxFileSize: { default: 8e6 },
|
|
15
|
+
contentClass: {}
|
|
16
|
+
},
|
|
17
|
+
emits: ["file-upload", "file-rejected"],
|
|
18
|
+
setup(T, { emit: V }) {
|
|
19
|
+
const l = T, g = V, { t: r } = W(), t = d(!1), i = d(null), n = d(null), m = d(), R = (e) => {
|
|
20
|
+
l.disabled || (e.stopPropagation(), e.preventDefault());
|
|
21
|
+
}, $ = (e) => {
|
|
22
|
+
l.disabled || (e.stopPropagation(), e.preventDefault(), t.value = !0);
|
|
23
|
+
}, j = (e) => {
|
|
24
|
+
l.disabled || (e.stopPropagation(), e.preventDefault(), t.value = !1);
|
|
25
|
+
}, E = (e) => {
|
|
26
|
+
var a;
|
|
27
|
+
l.disabled || (e.stopPropagation(), e.preventDefault(), t.value = !1, h((a = e.dataTransfer) == null ? void 0 : a.files));
|
|
28
|
+
};
|
|
29
|
+
function h(e) {
|
|
30
|
+
if (e)
|
|
31
|
+
if (m.value = e, i.value = I(e[0]), n.value = P(e[0]), i.value && n.value)
|
|
32
|
+
g("file-upload", e[0]);
|
|
33
|
+
else {
|
|
34
|
+
const a = L();
|
|
35
|
+
g("file-rejected", [
|
|
36
|
+
{
|
|
37
|
+
file: e[0],
|
|
38
|
+
reason: a
|
|
39
|
+
}
|
|
40
|
+
]);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const L = () => {
|
|
44
|
+
const e = new Array();
|
|
45
|
+
return i.value || e.push("invalid-type"), n.value || e.push("invalid-size"), e;
|
|
46
|
+
}, I = (e) => {
|
|
47
|
+
if (!l.accept) return !0;
|
|
48
|
+
const a = l.accept.split(",").map((o) => o.trim());
|
|
49
|
+
for (const o of a)
|
|
50
|
+
if (w(o)) {
|
|
51
|
+
if (D(o) === D(e.type)) return !0;
|
|
52
|
+
} else if (A(e) === o || e.type === o) return !0;
|
|
53
|
+
return !1;
|
|
54
|
+
}, P = (e) => e.size <= l.maxFileSize, w = (e) => e.indexOf("*") !== -1, A = (e) => "." + e.name.split(".").pop(), D = (e) => e.substring(0, e.indexOf("/")), O = y(() => {
|
|
55
|
+
if (t.value) return r("inventory.formField.dropField.dropToUpload");
|
|
56
|
+
if (i.value) {
|
|
57
|
+
if (!n.value)
|
|
58
|
+
return r("inventory.formField.dropField.fileSizeExceeded", { size: l.maxFileSize });
|
|
59
|
+
} else return r("inventory.formField.dropField.invalidFileType");
|
|
60
|
+
return "";
|
|
61
|
+
}), v = y(() => m.value ? !i.value || !n.value : !1), _ = (e) => {
|
|
62
|
+
const a = e.target;
|
|
63
|
+
h(a.files);
|
|
64
|
+
}, N = y(() => {
|
|
65
|
+
var e;
|
|
66
|
+
return (e = m.value) == null ? void 0 : e.item(0);
|
|
67
|
+
}), b = d();
|
|
68
|
+
return (e, a) => {
|
|
69
|
+
const o = k("FmLabel"), x = k("FmButton");
|
|
70
|
+
return s(), c("label", {
|
|
71
|
+
class: "fm-droppable-field",
|
|
72
|
+
ref_key: "fmButtonRef",
|
|
73
|
+
ref: b
|
|
74
|
+
}, [
|
|
75
|
+
e.$slots.default ? (s(), c("div", q, [
|
|
76
|
+
p("input", {
|
|
77
|
+
accept: e.accept,
|
|
78
|
+
disabled: e.disabled,
|
|
79
|
+
class: "fm-droppable-field__input",
|
|
80
|
+
type: "file",
|
|
81
|
+
onChange: _
|
|
82
|
+
}, null, 40, G)
|
|
83
|
+
])) : S("", !0),
|
|
84
|
+
u(e.$slots, "default", {
|
|
85
|
+
isDragging: t.value,
|
|
86
|
+
isValidFileType: i.value,
|
|
87
|
+
isValidFileSize: n.value,
|
|
88
|
+
singleValidFile: N.value,
|
|
89
|
+
openFileDialog: () => {
|
|
90
|
+
var z;
|
|
91
|
+
return console.log("click", b.value), (z = b.value) == null ? void 0 : z.click();
|
|
92
|
+
}
|
|
93
|
+
}, () => [
|
|
94
|
+
p("div", H, [
|
|
95
|
+
e.$slots.label ? u(e.$slots, "label", { key: 0 }, void 0, !0) : (s(), C(o, {
|
|
96
|
+
key: 1,
|
|
97
|
+
label: e.label
|
|
98
|
+
}, null, 8, ["label"]))
|
|
99
|
+
]),
|
|
100
|
+
p("div", {
|
|
101
|
+
class: f([[
|
|
102
|
+
e.contentClass ? e.contentClass : "w-full h-full",
|
|
103
|
+
{
|
|
104
|
+
"fm-droppable-field__container--dragging": t.value,
|
|
105
|
+
"fm-droppable-field__container--invalid": v.value && !e.disabled,
|
|
106
|
+
"fm-droppable-field__container--disabled": e.disabled
|
|
107
|
+
}
|
|
108
|
+
], "fm-droppable-field__container"]),
|
|
109
|
+
onDragenter: R,
|
|
110
|
+
onDragleave: j,
|
|
111
|
+
onDragover: $,
|
|
112
|
+
onDrop: E
|
|
113
|
+
}, [
|
|
114
|
+
(t.value || v.value) && !e.disabled ? (s(), c("div", {
|
|
115
|
+
key: 0,
|
|
116
|
+
class: f({
|
|
117
|
+
"fm-typo-en-body-lg-600": !0,
|
|
118
|
+
"text-fm-color-primary": t.value,
|
|
119
|
+
"text-fm-color-typo-error": v.value
|
|
120
|
+
})
|
|
121
|
+
}, F(O.value), 3)) : (s(), C(x, {
|
|
122
|
+
key: 1,
|
|
123
|
+
disabled: e.disabled,
|
|
124
|
+
label: e.buttonLabel ?? "Add files",
|
|
125
|
+
size: "md",
|
|
126
|
+
variant: "secondary"
|
|
127
|
+
}, null, 8, ["disabled", "label"])),
|
|
128
|
+
u(e.$slots, "accept-text", {}, () => [
|
|
129
|
+
l.accept ? (s(), c("div", {
|
|
130
|
+
key: 0,
|
|
131
|
+
class: f([[e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"], "fm-typo-en-body-md-400"])
|
|
132
|
+
}, F(B(r)("inventory.formField.dropField.accepts", { fileTypes: e.accept })), 3)) : S("", !0)
|
|
133
|
+
], !0),
|
|
134
|
+
p("input", {
|
|
135
|
+
accept: e.accept,
|
|
136
|
+
disabled: e.disabled,
|
|
137
|
+
class: "fm-droppable-field__input",
|
|
138
|
+
type: "file",
|
|
139
|
+
onChange: _
|
|
140
|
+
}, null, 40, J)
|
|
141
|
+
], 34),
|
|
142
|
+
u(e.$slots, "helper-text", {}, () => [
|
|
143
|
+
p("div", {
|
|
144
|
+
class: f([[e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"], "fm-typo-en-body-sm-400"])
|
|
145
|
+
}, F(B(r)("inventory.formField.dropField.maxSize", { size: e.maxFileSize })), 3)
|
|
146
|
+
], !0)
|
|
147
|
+
], !0)
|
|
148
|
+
], 512);
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
}), Z = /* @__PURE__ */ X(K, [["__scopeId", "data-v-e121b2c1"]]);
|
|
152
|
+
export {
|
|
153
|
+
Z as F
|
|
154
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
2
|
-
import { u as j } from "./supplier-
|
|
3
|
-
import { P as S } from "./
|
|
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-tiUQG6R0.js";
|
|
2
|
+
import { u as j } from "./supplier-rpkSwf7L.js";
|
|
3
|
+
import { P as S } from "./format-unit-display-DIhXvTxN.js";
|
|
4
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
5
|
function ne(c, i, t, s) {
|
|
6
6
|
var b, g, u;
|
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import { reactive as E, onUnmounted as W, defineComponent as T, computed as y, resolveComponent as _, openBlock as a, createElementBlock as f, Fragment as L, createElementVNode as m, unref as c, normalizeClass as D, toDisplayString as R, createCommentVNode as g, renderList as I, createBlock as h, createVNode as x, renderSlot as q, Teleport as G, ref as P, withCtx as N, watch as J, mergeModels as K, useModel as U } from "vue";
|
|
2
|
+
import { FmButtonVariant as X, useBreakpoints as O } from "@feedmepos/ui-library";
|
|
3
|
+
import { i as A, V as H } from "./app-tiUQG6R0.js";
|
|
4
|
+
import { useCoreStore as Z, useI18n as Y } from "@feedmepos/mf-common";
|
|
5
|
+
const S = E({});
|
|
6
|
+
function j() {
|
|
7
|
+
const r = `${Math.random()}`, t = new ResizeObserver((o) => {
|
|
8
|
+
const l = o.map((n) => n.target.scrollHeight).reduce((n, s) => n + s);
|
|
9
|
+
S[r] = l;
|
|
10
|
+
}), d = (o) => {
|
|
11
|
+
const l = o.el;
|
|
12
|
+
l && t.observe(l);
|
|
13
|
+
}, u = (o) => {
|
|
14
|
+
const l = o.el;
|
|
15
|
+
l && t.unobserve(l);
|
|
16
|
+
};
|
|
17
|
+
return W(() => {
|
|
18
|
+
t.disconnect(), delete S[r];
|
|
19
|
+
}), {
|
|
20
|
+
get tableHeight() {
|
|
21
|
+
return {
|
|
22
|
+
height: `calc(100dvh - ${Object.values(S).reduce((n, s) => n + s, 0) + 64}px)`
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
onMounted: d,
|
|
26
|
+
onUnmounted: u
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const ee = { class: "flex flex-col w-full bg-white h-full" }, ne = {
|
|
30
|
+
key: 0,
|
|
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" }, we = /* @__PURE__ */ T({
|
|
33
|
+
__name: "SingleColumnLayout",
|
|
34
|
+
props: {
|
|
35
|
+
actions: { default: () => [] },
|
|
36
|
+
title: { default: "Title" },
|
|
37
|
+
description: {},
|
|
38
|
+
showBackButton: { type: Boolean },
|
|
39
|
+
defaultPadding: { type: Boolean },
|
|
40
|
+
breadcrumbs: { default: () => [] },
|
|
41
|
+
usingBusinessHelperText: {}
|
|
42
|
+
},
|
|
43
|
+
emits: ["click:action"],
|
|
44
|
+
setup(r, { emit: t }) {
|
|
45
|
+
const d = r, u = t, o = y(() => d.actions.find((e) => e.isPrimary)), l = y(
|
|
46
|
+
() => d.actions.filter((e) => !e.isPrimary).map((e) => ({ ...e, variant: e.variant ?? X.Tertiary }))
|
|
47
|
+
), { breakpoints: n } = O(), s = y(() => n.value.xs || n.value.sm), v = A(), k = y(() => v.businessLevel), w = j();
|
|
48
|
+
return (e, p) => {
|
|
49
|
+
const B = _("FmButton");
|
|
50
|
+
return a(), f(L, null, [
|
|
51
|
+
m("div", ee, [
|
|
52
|
+
m("div", {
|
|
53
|
+
onVnodeMounted: p[1] || (p[1] = //@ts-ignore
|
|
54
|
+
(...b) => c(w).onMounted && c(w).onMounted(...b)),
|
|
55
|
+
class: D([
|
|
56
|
+
"flex gap-4",
|
|
57
|
+
{
|
|
58
|
+
"p-12": s.value,
|
|
59
|
+
"px-24 py-16": !s.value
|
|
60
|
+
}
|
|
61
|
+
])
|
|
62
|
+
}, [
|
|
63
|
+
m("div", {
|
|
64
|
+
class: D([
|
|
65
|
+
"flex-1 flex flex-col gap-4 fm-typo-en-title-md-600 bg-white",
|
|
66
|
+
{
|
|
67
|
+
"py-12": s.value
|
|
68
|
+
}
|
|
69
|
+
])
|
|
70
|
+
}, [
|
|
71
|
+
m("div", null, R(e.title), 1),
|
|
72
|
+
e.usingBusinessHelperText && k.value ? (a(), f("div", ne, R(e.usingBusinessHelperText), 1)) : g("", !0)
|
|
73
|
+
], 2),
|
|
74
|
+
l.value.length ? (a(), f("div", te, [
|
|
75
|
+
(a(!0), f(L, null, I(l.value, (b) => (a(), h(B, {
|
|
76
|
+
key: b.value,
|
|
77
|
+
label: b.label,
|
|
78
|
+
"prepend-icon": b.prependIcon,
|
|
79
|
+
variant: b.variant,
|
|
80
|
+
onClick: (M) => u("click:action", b.value)
|
|
81
|
+
}, null, 8, ["label", "prepend-icon", "variant", "onClick"]))), 128))
|
|
82
|
+
])) : g("", !0),
|
|
83
|
+
o.value && (c(n).lg || c(n).md) ? (a(), f("div", oe, [
|
|
84
|
+
x(B, {
|
|
85
|
+
label: o.value.label,
|
|
86
|
+
"prepend-icon": o.value.prependIcon,
|
|
87
|
+
onClick: p[0] || (p[0] = (b) => u("click:action", o.value.value))
|
|
88
|
+
}, null, 8, ["label", "prepend-icon"])
|
|
89
|
+
])) : g("", !0)
|
|
90
|
+
], 2),
|
|
91
|
+
m("div", le, [
|
|
92
|
+
q(e.$slots, "default")
|
|
93
|
+
])
|
|
94
|
+
]),
|
|
95
|
+
o.value && s.value ? (a(), h(G, {
|
|
96
|
+
key: 0,
|
|
97
|
+
to: "body"
|
|
98
|
+
}, [
|
|
99
|
+
m("div", ae, [
|
|
100
|
+
x(B, {
|
|
101
|
+
label: o.value.label,
|
|
102
|
+
"prepend-icon": o.value.prependIcon,
|
|
103
|
+
onClick: p[2] || (p[2] = (b) => u("click:action", o.value.value)),
|
|
104
|
+
variant: "fab"
|
|
105
|
+
}, null, 8, ["label", "prepend-icon"])
|
|
106
|
+
])
|
|
107
|
+
])) : g("", !0)
|
|
108
|
+
], 64);
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}), 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 = { class: "relative" }, ce = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, de = /* @__PURE__ */ T({
|
|
112
|
+
__name: "ChangeLocationComponent",
|
|
113
|
+
props: {
|
|
114
|
+
showBusiness: { type: Boolean }
|
|
115
|
+
},
|
|
116
|
+
setup(r) {
|
|
117
|
+
const t = A(), d = Z(), u = y(() => {
|
|
118
|
+
var e;
|
|
119
|
+
return (e = d.currentBusiness.value) == null ? void 0 : e.name;
|
|
120
|
+
}), { t: o } = Y(), l = P(""), n = y({
|
|
121
|
+
get() {
|
|
122
|
+
return t.businessLevel;
|
|
123
|
+
},
|
|
124
|
+
set(e) {
|
|
125
|
+
t.businessLevel = e;
|
|
126
|
+
}
|
|
127
|
+
}), s = y(
|
|
128
|
+
() => t.locations.map((e) => ({ label: e.name, value: e.dbName, type: e.type })).filter(
|
|
129
|
+
(e) => l.value ? e.label.toLocaleLowerCase().includes(l.value.toLocaleLowerCase()) : !0
|
|
130
|
+
)
|
|
131
|
+
), v = y(
|
|
132
|
+
() => s.value.filter((e) => e.type === "restaurant")
|
|
133
|
+
), k = y(
|
|
134
|
+
() => s.value.filter((e) => e.type === "warehouse")
|
|
135
|
+
);
|
|
136
|
+
function w({ value: e }) {
|
|
137
|
+
n.value = !1, t.selectLocation(t.locations.find((p) => p.dbName === e));
|
|
138
|
+
}
|
|
139
|
+
return (e, p) => {
|
|
140
|
+
const B = _("FmIcon"), b = _("FmSearch"), M = _("FmMenuItem"), Q = _("FmMenu");
|
|
141
|
+
return a(), f("div", se, [
|
|
142
|
+
x(Q, { "close-on-click": !0 }, {
|
|
143
|
+
"menu-button": N(() => {
|
|
144
|
+
var i;
|
|
145
|
+
return [
|
|
146
|
+
m("div", ue, [
|
|
147
|
+
x(B, {
|
|
148
|
+
name: e.showBusiness && n.value ? "store" : "storefront",
|
|
149
|
+
size: "sm"
|
|
150
|
+
}, null, 8, ["name"]),
|
|
151
|
+
m("div", re, R(e.showBusiness && n.value ? u.value : ((i = c(t)._currentLocation) == null ? void 0 : i.name) ?? c(o)("inventory.common.noLocationSelected")), 1),
|
|
152
|
+
x(B, {
|
|
153
|
+
name: "expand_more",
|
|
154
|
+
size: "sm"
|
|
155
|
+
})
|
|
156
|
+
])
|
|
157
|
+
];
|
|
158
|
+
}),
|
|
159
|
+
default: N(() => [
|
|
160
|
+
m("div", ie, [
|
|
161
|
+
m("div", ce, [
|
|
162
|
+
x(b, {
|
|
163
|
+
"model-value": l.value,
|
|
164
|
+
"onUpdate:modelValue": p[0] || (p[0] = (i) => l.value = i),
|
|
165
|
+
placeholder: c(o)("inventory.common.table.toolbar.filterItems")
|
|
166
|
+
}, null, 8, ["model-value", "placeholder"])
|
|
167
|
+
]),
|
|
168
|
+
m("div", null, [
|
|
169
|
+
e.showBusiness ? (a(), h(M, {
|
|
170
|
+
key: 0,
|
|
171
|
+
"model-value": n.value,
|
|
172
|
+
label: u.value,
|
|
173
|
+
sublabel: "Business",
|
|
174
|
+
onClick: p[1] || (p[1] = (i) => n.value = !0)
|
|
175
|
+
}, null, 8, ["model-value", "label"])) : g("", !0),
|
|
176
|
+
(a(!0), f(L, null, I(v.value, (i) => {
|
|
177
|
+
var $;
|
|
178
|
+
return a(), h(M, {
|
|
179
|
+
key: i.value,
|
|
180
|
+
"model-value": !n.value && (($ = c(t)._currentLocation) == null ? void 0 : $.dbName) === i.value,
|
|
181
|
+
label: i.label,
|
|
182
|
+
sublabel: "Restaurant",
|
|
183
|
+
onClick: (F) => w(i),
|
|
184
|
+
onVnodeMounted: (F) => {
|
|
185
|
+
var V, C;
|
|
186
|
+
return !n.value && ((V = c(t)._currentLocation) == null ? void 0 : V.dbName) === i.value && ((C = F.el) == null || C.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
|
|
187
|
+
}
|
|
188
|
+
}, null, 8, ["model-value", "label", "onClick", "onVnodeMounted"]);
|
|
189
|
+
}), 128)),
|
|
190
|
+
(a(!0), f(L, null, I(k.value, (i) => {
|
|
191
|
+
var $;
|
|
192
|
+
return a(), h(M, {
|
|
193
|
+
key: i.value,
|
|
194
|
+
"model-value": !n.value && (($ = c(t)._currentLocation) == null ? void 0 : $.dbName) === i.value,
|
|
195
|
+
label: i.label,
|
|
196
|
+
sublabel: "Warehouse",
|
|
197
|
+
onClick: (F) => w(i),
|
|
198
|
+
onVnodeMounted: (F) => {
|
|
199
|
+
var V, C;
|
|
200
|
+
return !n.value && ((V = c(t)._currentLocation) == null ? void 0 : V.dbName) === i.value && ((C = F.el) == null || C.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
|
|
201
|
+
}
|
|
202
|
+
}, null, 8, ["model-value", "label", "onClick", "onVnodeMounted"]);
|
|
203
|
+
}), 128)),
|
|
204
|
+
!e.showBusiness && !v.value.length && !k.value.length ? (a(), h(M, {
|
|
205
|
+
key: 1,
|
|
206
|
+
disabled: "",
|
|
207
|
+
label: c(o)("inventory.common.noResultFound")
|
|
208
|
+
}, null, 8, ["label"])) : g("", !0)
|
|
209
|
+
])
|
|
210
|
+
])
|
|
211
|
+
]),
|
|
212
|
+
_: 1
|
|
213
|
+
})
|
|
214
|
+
]);
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
function xe() {
|
|
219
|
+
const r = /* @__PURE__ */ new Date();
|
|
220
|
+
return r.setDate(r.getDate() - 15), {
|
|
221
|
+
start: r,
|
|
222
|
+
end: /* @__PURE__ */ new Date()
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
function z(r = 15) {
|
|
226
|
+
const t = /* @__PURE__ */ new Date();
|
|
227
|
+
t.setDate(t.getDate() - r);
|
|
228
|
+
const d = t, u = /* @__PURE__ */ new Date();
|
|
229
|
+
return {
|
|
230
|
+
startDate: `${H(d)}`,
|
|
231
|
+
endDate: `${H(u)}`
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
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" }, ve = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, pe = /* @__PURE__ */ T({
|
|
235
|
+
__name: "FmDateRangePickerChip",
|
|
236
|
+
props: {
|
|
237
|
+
modelValue: { default: (r) => r.modelValue ?? z() }
|
|
238
|
+
},
|
|
239
|
+
emits: ["update:modelValue"],
|
|
240
|
+
setup(r, { emit: t }) {
|
|
241
|
+
const d = t, u = P(z());
|
|
242
|
+
J(u, (l) => {
|
|
243
|
+
d("update:modelValue", l);
|
|
244
|
+
});
|
|
245
|
+
const o = y(() => {
|
|
246
|
+
const { startDate: l, endDate: n } = u.value;
|
|
247
|
+
return !l && !n ? "" : `${l} - ${n}`;
|
|
248
|
+
});
|
|
249
|
+
return (l, n) => {
|
|
250
|
+
const s = _("FmIcon"), v = _("FmDateRangePicker");
|
|
251
|
+
return a(), h(v, {
|
|
252
|
+
"show-predefined-range": "",
|
|
253
|
+
modelValue: u.value,
|
|
254
|
+
"onUpdate:modelValue": n[0] || (n[0] = (k) => u.value = k),
|
|
255
|
+
"start-label": "",
|
|
256
|
+
"end-label": ""
|
|
257
|
+
}, {
|
|
258
|
+
"trigger-button": N(() => [
|
|
259
|
+
m("div", me, [
|
|
260
|
+
x(s, {
|
|
261
|
+
name: "calendar_month",
|
|
262
|
+
size: "sm"
|
|
263
|
+
}),
|
|
264
|
+
m("div", ve, R(o.value), 1)
|
|
265
|
+
])
|
|
266
|
+
]),
|
|
267
|
+
_: 1
|
|
268
|
+
}, 8, ["modelValue"]);
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
}), fe = { class: "flex-1 w-full flex items-center gap-4" }, be = {
|
|
272
|
+
key: 0,
|
|
273
|
+
class: "flex-1"
|
|
274
|
+
}, ye = { class: "w-full max-w-[343px] xs:max-w-[unset] sm:max-w-[unset]" }, Be = /* @__PURE__ */ T({
|
|
275
|
+
__name: "FmInventoryTableToolbar",
|
|
276
|
+
props: /* @__PURE__ */ K({
|
|
277
|
+
dateRangeQuery: { type: Boolean },
|
|
278
|
+
changeLocation: { type: Boolean },
|
|
279
|
+
searchable: { type: Boolean },
|
|
280
|
+
actions: {},
|
|
281
|
+
usingBusinessHelperText: {},
|
|
282
|
+
showBusiness: { type: Boolean }
|
|
283
|
+
}, {
|
|
284
|
+
search: {},
|
|
285
|
+
searchModifiers: {},
|
|
286
|
+
dateRange: {},
|
|
287
|
+
dateRangeModifiers: {}
|
|
288
|
+
}),
|
|
289
|
+
emits: ["update:search", "update:dateRange"],
|
|
290
|
+
setup(r) {
|
|
291
|
+
const { breakpoints: t } = O(), d = y(() => t.value.xs || t.value.sm), u = U(r, "search"), o = U(r, "dateRange"), { t: l } = Y(), n = j();
|
|
292
|
+
return (s, v) => {
|
|
293
|
+
const k = _("FmTextField"), w = _("FmButton");
|
|
294
|
+
return a(), f("div", {
|
|
295
|
+
class: "flex flex-col gap-8",
|
|
296
|
+
onVnodeMounted: v[2] || (v[2] = //@ts-ignore
|
|
297
|
+
(...e) => c(n).onMounted && c(n).onMounted(...e)),
|
|
298
|
+
onVnodeUnmounted: v[3] || (v[3] = //@ts-ignore
|
|
299
|
+
(...e) => c(n).onUnmounted && c(n).onUnmounted(...e))
|
|
300
|
+
}, [
|
|
301
|
+
m("div", {
|
|
302
|
+
class: D([
|
|
303
|
+
"flex gap-8 items-center",
|
|
304
|
+
{
|
|
305
|
+
"px-8 flex-col-reverse h-[unset]": d.value,
|
|
306
|
+
"h-48": !d.value
|
|
307
|
+
}
|
|
308
|
+
])
|
|
309
|
+
}, [
|
|
310
|
+
s.changeLocation || s.dateRangeQuery ? (a(), f("div", {
|
|
311
|
+
key: 0,
|
|
312
|
+
class: D([
|
|
313
|
+
"flex gap-8 items-center",
|
|
314
|
+
{
|
|
315
|
+
"w-full overflow-x-auto": d.value
|
|
316
|
+
}
|
|
317
|
+
])
|
|
318
|
+
}, [
|
|
319
|
+
s.changeLocation ? (a(), h(de, {
|
|
320
|
+
key: 0,
|
|
321
|
+
"show-business": s.showBusiness
|
|
322
|
+
}, null, 8, ["show-business"])) : g("", !0),
|
|
323
|
+
s.dateRangeQuery ? (a(), h(pe, {
|
|
324
|
+
key: 1,
|
|
325
|
+
"model-value": o.value,
|
|
326
|
+
"onUpdate:modelValue": v[0] || (v[0] = (e) => o.value = e)
|
|
327
|
+
}, null, 8, ["model-value"])) : g("", !0)
|
|
328
|
+
], 2)) : g("", !0),
|
|
329
|
+
m("div", fe, [
|
|
330
|
+
d.value ? g("", !0) : (a(), f("div", be)),
|
|
331
|
+
m("div", ye, [
|
|
332
|
+
s.searchable ? (a(), h(k, {
|
|
333
|
+
key: 0,
|
|
334
|
+
"model-value": u.value,
|
|
335
|
+
"onUpdate:modelValue": v[1] || (v[1] = (e) => u.value = e),
|
|
336
|
+
"prepend-icon": "search",
|
|
337
|
+
placeholder: c(l)("inventory.common.table.toolbar.filterItems"),
|
|
338
|
+
class: "w-full"
|
|
339
|
+
}, null, 8, ["model-value", "placeholder"])) : g("", !0)
|
|
340
|
+
]),
|
|
341
|
+
(a(!0), f(L, null, I(s.actions, (e, p) => (a(), h(w, {
|
|
342
|
+
key: p,
|
|
343
|
+
variant: "tertiary",
|
|
344
|
+
"prepend-icon": e.icon,
|
|
345
|
+
onClick: e.onClick
|
|
346
|
+
}, null, 8, ["prepend-icon", "onClick"]))), 128))
|
|
347
|
+
])
|
|
348
|
+
], 2)
|
|
349
|
+
], 512);
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
});
|
|
353
|
+
export {
|
|
354
|
+
we as _,
|
|
355
|
+
Be as a,
|
|
356
|
+
xe as b,
|
|
357
|
+
z as i,
|
|
358
|
+
j as u
|
|
359
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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-
|
|
2
|
+
import { a, k as y } from "./app-tiUQG6R0.js";
|
|
3
3
|
import { useI18n as _ } from "@feedmepos/mf-common";
|
|
4
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
5
|
class: "flex-0 py-8 px-16",
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { ref as O, defineComponent as le, computed as C, resolveComponent as U, openBlock as g, createBlock as T, withCtx as S, createVNode as p, unref as u, createElementBlock as P, Fragment as q, createElementVNode as d, createCommentVNode as Y, onMounted as nt, watch as ze, normalizeClass as J, createTextVNode as He, toDisplayString as L, renderList as Q, isRef as Ee, createSlots as Oe, normalizeStyle as ot, Teleport as Re, normalizeProps as lt, guardReactiveProps as rt } from "vue";
|
|
2
|
-
import { u as X, c as je, S as at, _ as st, A as ge, a as Ye, g as be, t as Ge, F as ue, R as xe, U as it, M as ut, d as Ae, b as qe, C as Ve, e as De, f as dt, h as ct, I as mt, i as pt } from "./app-
|
|
2
|
+
import { u as X, c as je, S as at, _ as st, A as ge, a as Ye, g as be, t as Ge, F as ue, R as xe, U as it, M as ut, d as Ae, b as qe, C as Ve, e as De, f as dt, h as ct, I as mt, i as pt } from "./app-tiUQG6R0.js";
|
|
3
3
|
import { useDialog as We, useSnackbar as he, useProxiedModel as Te, useDialogChild as vt, useBreakpoints as ft } from "@feedmepos/ui-library";
|
|
4
4
|
import { i as yt, _ as gt } from "./is-linked-ingredient-error-fJ2TJb3z.js";
|
|
5
5
|
import { F as G, D as Pe, R as ye } from "./row-action.enum-PMKMRrZR.js";
|
|
6
6
|
import { useI18n as Z, useCoreStore as de } from "@feedmepos/mf-common";
|
|
7
7
|
import { defineStore as bt, storeToRefs as ht } from "pinia";
|
|
8
8
|
import { c as _t, _ as xt, F as Be } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
9
|
-
import { u as Vt, _ as kt, a as Ct } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { u as Vt, _ as kt, a as Ct } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-cSTp7zUx.js";
|
|
10
10
|
import { g as wt, _ as ke, S as Ce } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
|
|
11
|
-
import { _ as we } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-
|
|
11
|
+
import { _ as we } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-DFHzlUVu.js";
|
|
12
12
|
import { _ as Se } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
13
|
-
import { t as Ke, d as Je, s as St, r as Ft } from "./xlsx.util-
|
|
14
|
-
import { F as Mt } from "./FmDroppableField-
|
|
13
|
+
import { t as Ke, d as Je, s as St, r as Ft } from "./xlsx.util-CvycJwUf.js";
|
|
14
|
+
import { F as Mt } from "./FmDroppableField-DeW5xBTW.js";
|
|
15
15
|
const Fe = bt("ingredientForm", function() {
|
|
16
16
|
const a = We(), f = he(), s = X(), n = O(!1), { t: l } = Z(), o = O();
|
|
17
17
|
function m() {
|