@feedmepos/mf-inventory-portal 0.0.22-dev.43 → 0.0.22-dev.44
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-DJhk8ORX.js +140 -0
- package/dist/{BindingsDialog-CKjAs5mJ.js → BindingsDialog-CNY83IzG.js} +1 -1
- package/dist/{BindingsPicker-BAVZ-3dF.js → BindingsPicker-BCeGBlTl.js} +1 -1
- package/dist/{BindingsTable-qq8M9fzG.js → BindingsTable-DwN0rUr_.js} +1 -1
- package/dist/{ClosingTemplateView-DOLuHmy8.js → ClosingTemplateView-BE1JMBGd.js} +342 -349
- package/dist/{FmDroppableField-BBpVEZs4.js → FmDroppableField-DeZRIGOb.js} +13 -13
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-ChRPq-Ok.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CptHxbFO.js} +3 -3
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BGYVXLcj.js +435 -0
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DrL5a2Pn.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-C0liaZ9Y.js} +1 -1
- package/dist/{IngredientsView-m5K8MlM2.js → IngredientsView-B6BPG_MN.js} +414 -417
- package/dist/{IntegrationView-BE5P68EJ.js → IntegrationView-CXurxj5t.js} +2 -2
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B8cCv--C.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C4np_znK.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CcM04Veu.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CvSRvT_i.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-D40E9qZt.js → PurchaseOrderPrintPreview-BYSkl_zL.js} +3 -3
- package/dist/{ReceiveRequestView-Ci7FgSjU.js → ReceiveRequestView-DWKEL17S.js} +31 -27
- package/dist/{RecipeView-Bp7iBiy7.js → RecipeView-DEZblbQT.js} +91 -88
- package/dist/{StockView-BzowFcFA.js → StockView-hijQ7wQL.js} +533 -525
- package/dist/{SupplierView-CbRnAb8G.js → SupplierView-B2xKGKCF.js} +776 -802
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BMikyrhA.js → TransferDetails.vue_vue_type_script_setup_true_lang-CBwT8yGC.js} +5 -5
- package/dist/TransferTemplateView--2vvQWBW.js +1258 -0
- package/dist/{UnitView-B-058oRk.js → UnitView-B30FwZGg.js} +4 -4
- package/dist/{WarehouseView-RtU3sWKx.js → WarehouseView-BwbqpKwn.js} +14 -14
- package/dist/{app-By3PLx0q.js → app-DXZpbt33.js} +7334 -7251
- package/dist/app.js +1 -1
- package/dist/{decimal-CtriZ1S6.js → decimal-BVO6jH4l.js} +1 -1
- package/dist/{defineDeepModel-ClK3S9xx.js → defineDeepModel-DlkycC_t.js} +1 -1
- package/dist/{format-time-from-id-CGLKzJJO.js → format-time-from-id-Dhgv47T9.js} +1 -1
- package/dist/{format-unit-display-COeZSqdS.js → format-unit-display-D4D1b9F7.js} +15 -15
- package/dist/{supplier-BxBMThPQ.js → supplier-Beauc4QC.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-template-enabled-locations-2-BIgPnzRW.js → use-template-enabled-locations-2-DbnvkOM9.js} +1 -1
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +30 -0
- package/dist/{xlsx-X_0qJPDg.js → xlsx-DXqCVrb5.js} +1 -1
- package/dist/{xlsx.util-BOPzVbUa.js → xlsx.util-7VhQushh.js} +1 -1
- package/package.json +1 -1
- package/dist/ApprovalView-1ZKaZJ2Z.js +0 -128
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BSxhRfE4.js +0 -359
- package/dist/TransferTemplateView-BwamiSyk.js +0 -1302
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as x, 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 U } from "@feedmepos/mf-common";
|
|
3
|
+
import { W as q } from "./app-DXZpbt33.js";
|
|
4
|
+
const G = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "relative"
|
|
7
|
-
},
|
|
7
|
+
}, H = ["accept", "disabled"], J = { class: "flex flex-col gap-8" }, K = ["accept", "disabled"], M = /* @__PURE__ */ x({
|
|
8
8
|
__name: "FmDroppableField",
|
|
9
9
|
props: {
|
|
10
10
|
buttonLabel: {},
|
|
@@ -16,7 +16,7 @@ const q = {
|
|
|
16
16
|
},
|
|
17
17
|
emits: ["file-upload", "file-rejected"],
|
|
18
18
|
setup(T, { emit: V }) {
|
|
19
|
-
const l = T, g = V, { t: r } =
|
|
19
|
+
const l = T, g = V, { t: r } = U(), t = d(!1), i = d(null), n = d(null), m = d(), R = (e) => {
|
|
20
20
|
l.disabled || (e.stopPropagation(), e.preventDefault());
|
|
21
21
|
}, $ = (e) => {
|
|
22
22
|
l.disabled || (e.stopPropagation(), e.preventDefault(), t.value = !0);
|
|
@@ -66,20 +66,20 @@ const q = {
|
|
|
66
66
|
return (e = m.value) == null ? void 0 : e.item(0);
|
|
67
67
|
}), b = d();
|
|
68
68
|
return (e, a) => {
|
|
69
|
-
const o = k("FmLabel"),
|
|
69
|
+
const o = k("FmLabel"), W = k("FmButton");
|
|
70
70
|
return s(), c("label", {
|
|
71
71
|
class: "fm-droppable-field",
|
|
72
72
|
ref_key: "fmButtonRef",
|
|
73
73
|
ref: b
|
|
74
74
|
}, [
|
|
75
|
-
e.$slots.default ? (s(), c("div",
|
|
75
|
+
e.$slots.default ? (s(), c("div", G, [
|
|
76
76
|
p("input", {
|
|
77
77
|
accept: e.accept,
|
|
78
78
|
disabled: e.disabled,
|
|
79
79
|
class: "fm-droppable-field__input",
|
|
80
80
|
type: "file",
|
|
81
81
|
onChange: _
|
|
82
|
-
}, null, 40,
|
|
82
|
+
}, null, 40, H)
|
|
83
83
|
])) : S("", !0),
|
|
84
84
|
u(e.$slots, "default", {
|
|
85
85
|
isDragging: t.value,
|
|
@@ -91,7 +91,7 @@ const q = {
|
|
|
91
91
|
return console.log("click", b.value), (z = b.value) == null ? void 0 : z.click();
|
|
92
92
|
}
|
|
93
93
|
}, () => [
|
|
94
|
-
p("div",
|
|
94
|
+
p("div", J, [
|
|
95
95
|
e.$slots.label ? u(e.$slots, "label", { key: 0 }, void 0, !0) : (s(), C(o, {
|
|
96
96
|
key: 1,
|
|
97
97
|
label: e.label
|
|
@@ -118,7 +118,7 @@ const q = {
|
|
|
118
118
|
"text-fm-color-primary": t.value,
|
|
119
119
|
"text-fm-color-typo-error": v.value
|
|
120
120
|
})
|
|
121
|
-
}, F(O.value), 3)) : (s(), C(
|
|
121
|
+
}, F(O.value), 3)) : (s(), C(W, {
|
|
122
122
|
key: 1,
|
|
123
123
|
disabled: e.disabled,
|
|
124
124
|
label: e.buttonLabel ?? "Add files",
|
|
@@ -137,7 +137,7 @@ const q = {
|
|
|
137
137
|
class: "fm-droppable-field__input",
|
|
138
138
|
type: "file",
|
|
139
139
|
onChange: _
|
|
140
|
-
}, null, 40,
|
|
140
|
+
}, null, 40, K)
|
|
141
141
|
], 34),
|
|
142
142
|
u(e.$slots, "helper-text", {}, () => [
|
|
143
143
|
p("div", {
|
|
@@ -148,7 +148,7 @@ const q = {
|
|
|
148
148
|
], 512);
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
|
-
}), Z = /* @__PURE__ */
|
|
151
|
+
}), Z = /* @__PURE__ */ q(M, [["__scopeId", "data-v-e121b2c1"]]);
|
|
152
152
|
export {
|
|
153
153
|
Z as F
|
|
154
154
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as P, t as B,
|
|
2
|
-
import { u as j } from "./supplier-
|
|
3
|
-
import { P as S } from "./format-unit-display-
|
|
1
|
+
import { a as P, t as B, a6 as A, i as D, ad as R, am as H, an as V } from "./app-DXZpbt33.js";
|
|
2
|
+
import { u as j } from "./supplier-Beauc4QC.js";
|
|
3
|
+
import { P as S } from "./format-unit-display-D4D1b9F7.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,435 @@
|
|
|
1
|
+
import { reactive as W, onUnmounted as q, defineComponent as T, ref as H, computed as _, resolveComponent as k, openBlock as o, createElementBlock as w, Fragment as V, createElementVNode as f, normalizeClass as D, unref as g, toDisplayString as R, createCommentVNode as b, createBlock as d, withCtx as I, createVNode as M, renderList as S, renderSlot as G, Teleport as z, watch as J, mergeModels as K, useModel as P } from "vue";
|
|
2
|
+
import { useBreakpoints as Y } from "@feedmepos/ui-library";
|
|
3
|
+
import { i as j, V as O } from "./app-DXZpbt33.js";
|
|
4
|
+
import { useCoreStore as X, useI18n as Q } from "@feedmepos/mf-common";
|
|
5
|
+
const N = W({});
|
|
6
|
+
function E() {
|
|
7
|
+
const v = `${Math.random()}`, l = new ResizeObserver((s) => {
|
|
8
|
+
const t = s.map((e) => e.target.scrollHeight).reduce((e, c) => e + c);
|
|
9
|
+
N[v] = t;
|
|
10
|
+
}), m = (s) => {
|
|
11
|
+
const t = s.el;
|
|
12
|
+
t && l.observe(t);
|
|
13
|
+
}, a = (s) => {
|
|
14
|
+
const t = s.el;
|
|
15
|
+
t && l.unobserve(t);
|
|
16
|
+
};
|
|
17
|
+
return q(() => {
|
|
18
|
+
l.disconnect(), delete N[v];
|
|
19
|
+
}), {
|
|
20
|
+
get tableHeight() {
|
|
21
|
+
return {
|
|
22
|
+
height: `calc(100dvh - ${Object.values(N).reduce((e, c) => e + c, 0) + 80}px)`
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
onMounted: m,
|
|
26
|
+
onUnmounted: a
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const Z = {
|
|
30
|
+
key: 0,
|
|
31
|
+
class: /* @__PURE__ */ D(["text-fm-color-typo-secondary fm-typo-en-body-sm-400"])
|
|
32
|
+
}, ee = { class: "bg-white flex-1" }, ne = { class: "fixed bottom-96 right-16" }, he = /* @__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(v, { emit: l }) {
|
|
45
|
+
const m = v, a = l, s = H(!1), t = _(() => m.actions.find((y) => y.isPrimary)), e = _(() => m.actions.filter((y) => !y.isPrimary)), c = _(
|
|
46
|
+
() => e.value.map(
|
|
47
|
+
(y) => ({
|
|
48
|
+
label: y.label,
|
|
49
|
+
value: y.value
|
|
50
|
+
})
|
|
51
|
+
)
|
|
52
|
+
), { breakpoints: p } = Y(), h = _(() => p.value.xs || p.value.sm), L = j(), n = _(() => L.businessLevel), B = E();
|
|
53
|
+
return (y, u) => {
|
|
54
|
+
const x = k("FmButton"), U = k("FmMenuItem"), i = k("FmMenu"), F = k("FmCollapsibleTabs"), C = k("FmBottomSheet");
|
|
55
|
+
return o(), w(V, null, [
|
|
56
|
+
f("div", {
|
|
57
|
+
class: D([
|
|
58
|
+
"flex flex-col w-full bg-white h-full",
|
|
59
|
+
{
|
|
60
|
+
"gap-12": h.value
|
|
61
|
+
}
|
|
62
|
+
])
|
|
63
|
+
}, [
|
|
64
|
+
f("div", {
|
|
65
|
+
onVnodeMounted: u[5] || (u[5] = //@ts-ignore
|
|
66
|
+
(...r) => g(B).onMounted && g(B).onMounted(...r)),
|
|
67
|
+
class: D([
|
|
68
|
+
"flex gap-8 items-center",
|
|
69
|
+
{
|
|
70
|
+
"p-12 border-b-[1px] border-b-fm-color-neutral-gray-100": h.value,
|
|
71
|
+
"px-24 py-16": !h.value
|
|
72
|
+
}
|
|
73
|
+
])
|
|
74
|
+
}, [
|
|
75
|
+
f("div", {
|
|
76
|
+
class: D([
|
|
77
|
+
"flex-1 flex flex-col gap-4 fm-typo-en-title-md-600 bg-white",
|
|
78
|
+
{
|
|
79
|
+
"py-12": h.value
|
|
80
|
+
}
|
|
81
|
+
])
|
|
82
|
+
}, [
|
|
83
|
+
f("div", null, R(y.title), 1),
|
|
84
|
+
y.usingBusinessHelperText && n.value ? (o(), w("div", Z, R(y.usingBusinessHelperText), 1)) : b("", !0)
|
|
85
|
+
], 2),
|
|
86
|
+
h.value ? (o(), w(V, { key: 0 }, [
|
|
87
|
+
e.value.length ? (o(), d(x, {
|
|
88
|
+
key: 0,
|
|
89
|
+
variant: "tertiary",
|
|
90
|
+
"prepend-icon": "more_vert",
|
|
91
|
+
onClick: u[0] || (u[0] = (r) => s.value = !0)
|
|
92
|
+
})) : b("", !0)
|
|
93
|
+
], 64)) : (o(), w(V, { key: 1 }, [
|
|
94
|
+
e.value[0] ? (o(), d(x, {
|
|
95
|
+
key: e.value[0].value,
|
|
96
|
+
label: e.value[0].label,
|
|
97
|
+
"prepend-icon": e.value[0].prependIcon,
|
|
98
|
+
variant: e.value[0].variant,
|
|
99
|
+
"bg-color": e.value[0].variant ? void 0 : "neutral-gray-100",
|
|
100
|
+
"text-color": e.value[0].variant ? void 0 : "neutral-gray-400",
|
|
101
|
+
onClick: u[1] || (u[1] = (r) => a("click:action", e.value[0].value))
|
|
102
|
+
}, null, 8, ["label", "prepend-icon", "variant", "bg-color", "text-color"])) : b("", !0),
|
|
103
|
+
e.value[1] ? (o(), d(x, {
|
|
104
|
+
key: e.value[1].value,
|
|
105
|
+
label: e.value[1].label,
|
|
106
|
+
"prepend-icon": e.value[1].prependIcon,
|
|
107
|
+
variant: e.value[1].variant,
|
|
108
|
+
"bg-color": e.value[1].variant ? void 0 : "neutral-gray-100",
|
|
109
|
+
"text-color": e.value[1].variant ? void 0 : "neutral-gray-400",
|
|
110
|
+
onClick: u[2] || (u[2] = (r) => a("click:action", e.value[1].value))
|
|
111
|
+
}, null, 8, ["label", "prepend-icon", "variant", "bg-color", "text-color"])) : b("", !0),
|
|
112
|
+
e.value.length === 3 ? (o(), d(x, {
|
|
113
|
+
key: e.value[2].value,
|
|
114
|
+
label: e.value[2].label,
|
|
115
|
+
"prepend-icon": e.value[2].prependIcon,
|
|
116
|
+
variant: e.value[2].variant,
|
|
117
|
+
"bg-color": e.value[2].variant ? void 0 : "neutral-gray-100",
|
|
118
|
+
"text-color": e.value[2].variant ? void 0 : "neutral-gray-400",
|
|
119
|
+
onClick: u[3] || (u[3] = (r) => a("click:action", e.value[2].value))
|
|
120
|
+
}, null, 8, ["label", "prepend-icon", "variant", "bg-color", "text-color"])) : b("", !0),
|
|
121
|
+
e.value.length > 3 ? (o(), d(i, { key: 3 }, {
|
|
122
|
+
"menu-button": I(() => [
|
|
123
|
+
M(x, {
|
|
124
|
+
label: "More",
|
|
125
|
+
"append-icon": "expand_more",
|
|
126
|
+
"bg-color": "neutral-gray-100",
|
|
127
|
+
"text-color": "neutral-gray-400"
|
|
128
|
+
})
|
|
129
|
+
]),
|
|
130
|
+
default: I(() => [
|
|
131
|
+
(o(!0), w(V, null, S(e.value.slice(2), (r, $) => (o(), d(U, {
|
|
132
|
+
key: $,
|
|
133
|
+
label: r.label,
|
|
134
|
+
onClick: (pe) => a("click:action", r.value)
|
|
135
|
+
}, null, 8, ["label", "onClick"]))), 128))
|
|
136
|
+
]),
|
|
137
|
+
_: 1
|
|
138
|
+
})) : b("", !0),
|
|
139
|
+
t.value ? (o(), d(x, {
|
|
140
|
+
key: 4,
|
|
141
|
+
label: t.value.label,
|
|
142
|
+
"prepend-icon": t.value.prependIcon,
|
|
143
|
+
onClick: u[4] || (u[4] = (r) => a("click:action", t.value.value))
|
|
144
|
+
}, null, 8, ["label", "prepend-icon"])) : b("", !0)
|
|
145
|
+
], 64))
|
|
146
|
+
], 2),
|
|
147
|
+
f("div", ee, [
|
|
148
|
+
G(y.$slots, "default")
|
|
149
|
+
])
|
|
150
|
+
], 2),
|
|
151
|
+
t.value && h.value ? (o(), d(z, {
|
|
152
|
+
key: 0,
|
|
153
|
+
to: "body"
|
|
154
|
+
}, [
|
|
155
|
+
f("div", ne, [
|
|
156
|
+
M(x, {
|
|
157
|
+
label: t.value.label,
|
|
158
|
+
"prepend-icon": t.value.prependIcon,
|
|
159
|
+
onClick: u[6] || (u[6] = (r) => a("click:action", t.value.value)),
|
|
160
|
+
variant: "fab"
|
|
161
|
+
}, null, 8, ["label", "prepend-icon"])
|
|
162
|
+
])
|
|
163
|
+
])) : b("", !0),
|
|
164
|
+
e.value.length ? (o(), d(z, {
|
|
165
|
+
key: 1,
|
|
166
|
+
to: "body"
|
|
167
|
+
}, [
|
|
168
|
+
M(C, {
|
|
169
|
+
"dismiss-away": "",
|
|
170
|
+
"no-header": "",
|
|
171
|
+
modelValue: s.value,
|
|
172
|
+
"onUpdate:modelValue": u[8] || (u[8] = (r) => s.value = r)
|
|
173
|
+
}, {
|
|
174
|
+
default: I(() => [
|
|
175
|
+
M(F, {
|
|
176
|
+
class: "pb-8",
|
|
177
|
+
items: c.value,
|
|
178
|
+
"onUpdate:modelValue": u[7] || (u[7] = (r) => (a("click:action", r), s.value = !1))
|
|
179
|
+
}, null, 8, ["items"])
|
|
180
|
+
]),
|
|
181
|
+
_: 1
|
|
182
|
+
}, 8, ["modelValue"])
|
|
183
|
+
])) : b("", !0)
|
|
184
|
+
], 64);
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
}), te = { class: "inline-flex" }, oe = { 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" }, le = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, ae = { class: "relative" }, se = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, ue = /* @__PURE__ */ T({
|
|
188
|
+
__name: "ChangeLocationComponent",
|
|
189
|
+
props: {
|
|
190
|
+
showBusiness: { type: Boolean }
|
|
191
|
+
},
|
|
192
|
+
setup(v) {
|
|
193
|
+
const l = j(), m = X(), a = _(() => {
|
|
194
|
+
var n;
|
|
195
|
+
return (n = m.currentBusiness.value) == null ? void 0 : n.name;
|
|
196
|
+
}), { t: s } = Q(), t = H(""), e = _({
|
|
197
|
+
get() {
|
|
198
|
+
return l.businessLevel;
|
|
199
|
+
},
|
|
200
|
+
set(n) {
|
|
201
|
+
l.businessLevel = n;
|
|
202
|
+
}
|
|
203
|
+
}), c = _(
|
|
204
|
+
() => l.locations.map((n) => ({ label: n.name, value: n.dbName, type: n.type })).filter(
|
|
205
|
+
(n) => t.value ? n.label.toLocaleLowerCase().includes(t.value.toLocaleLowerCase()) : !0
|
|
206
|
+
)
|
|
207
|
+
), p = _(
|
|
208
|
+
() => c.value.filter((n) => n.type === "restaurant")
|
|
209
|
+
), h = _(
|
|
210
|
+
() => c.value.filter((n) => n.type === "warehouse")
|
|
211
|
+
);
|
|
212
|
+
function L({ value: n }) {
|
|
213
|
+
e.value = !1, l.selectLocation(l.locations.find((B) => B.dbName === n));
|
|
214
|
+
}
|
|
215
|
+
return (n, B) => {
|
|
216
|
+
const y = k("FmIcon"), u = k("FmSearch"), x = k("FmMenuItem"), U = k("FmMenu");
|
|
217
|
+
return o(), w("div", te, [
|
|
218
|
+
M(U, { "close-on-click": !0 }, {
|
|
219
|
+
"menu-button": I(() => {
|
|
220
|
+
var i;
|
|
221
|
+
return [
|
|
222
|
+
f("div", oe, [
|
|
223
|
+
M(y, {
|
|
224
|
+
name: n.showBusiness && e.value ? "store" : "storefront",
|
|
225
|
+
size: "sm"
|
|
226
|
+
}, null, 8, ["name"]),
|
|
227
|
+
f("div", le, R(n.showBusiness && e.value ? a.value : ((i = g(l)._currentLocation) == null ? void 0 : i.name) ?? g(s)("inventory.common.noLocationSelected")), 1),
|
|
228
|
+
M(y, {
|
|
229
|
+
name: "expand_more",
|
|
230
|
+
size: "sm"
|
|
231
|
+
})
|
|
232
|
+
])
|
|
233
|
+
];
|
|
234
|
+
}),
|
|
235
|
+
default: I(() => [
|
|
236
|
+
f("div", ae, [
|
|
237
|
+
f("div", se, [
|
|
238
|
+
M(u, {
|
|
239
|
+
"model-value": t.value,
|
|
240
|
+
"onUpdate:modelValue": B[0] || (B[0] = (i) => t.value = i),
|
|
241
|
+
placeholder: g(s)("inventory.common.table.toolbar.filterItems")
|
|
242
|
+
}, null, 8, ["model-value", "placeholder"])
|
|
243
|
+
]),
|
|
244
|
+
f("div", null, [
|
|
245
|
+
n.showBusiness ? (o(), d(x, {
|
|
246
|
+
key: 0,
|
|
247
|
+
"model-value": e.value,
|
|
248
|
+
label: a.value,
|
|
249
|
+
sublabel: "Business",
|
|
250
|
+
onClick: B[1] || (B[1] = (i) => e.value = !0)
|
|
251
|
+
}, null, 8, ["model-value", "label"])) : b("", !0),
|
|
252
|
+
(o(!0), w(V, null, S(p.value, (i) => {
|
|
253
|
+
var F;
|
|
254
|
+
return o(), d(x, {
|
|
255
|
+
key: i.value,
|
|
256
|
+
"model-value": !e.value && ((F = g(l)._currentLocation) == null ? void 0 : F.dbName) === i.value,
|
|
257
|
+
label: i.label,
|
|
258
|
+
sublabel: "Restaurant",
|
|
259
|
+
onClick: (C) => L(i),
|
|
260
|
+
onVnodeMounted: (C) => {
|
|
261
|
+
var r, $;
|
|
262
|
+
return !e.value && ((r = g(l)._currentLocation) == null ? void 0 : r.dbName) === i.value && (($ = C.el) == null || $.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
|
|
263
|
+
}
|
|
264
|
+
}, null, 8, ["model-value", "label", "onClick", "onVnodeMounted"]);
|
|
265
|
+
}), 128)),
|
|
266
|
+
(o(!0), w(V, null, S(h.value, (i) => {
|
|
267
|
+
var F;
|
|
268
|
+
return o(), d(x, {
|
|
269
|
+
key: i.value,
|
|
270
|
+
"model-value": !e.value && ((F = g(l)._currentLocation) == null ? void 0 : F.dbName) === i.value,
|
|
271
|
+
label: i.label,
|
|
272
|
+
sublabel: "Warehouse",
|
|
273
|
+
onClick: (C) => L(i),
|
|
274
|
+
onVnodeMounted: (C) => {
|
|
275
|
+
var r, $;
|
|
276
|
+
return !e.value && ((r = g(l)._currentLocation) == null ? void 0 : r.dbName) === i.value && (($ = C.el) == null || $.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
|
|
277
|
+
}
|
|
278
|
+
}, null, 8, ["model-value", "label", "onClick", "onVnodeMounted"]);
|
|
279
|
+
}), 128)),
|
|
280
|
+
!n.showBusiness && !p.value.length && !h.value.length ? (o(), d(x, {
|
|
281
|
+
key: 1,
|
|
282
|
+
disabled: "",
|
|
283
|
+
label: g(s)("inventory.common.noResultFound")
|
|
284
|
+
}, null, 8, ["label"])) : b("", !0)
|
|
285
|
+
])
|
|
286
|
+
])
|
|
287
|
+
]),
|
|
288
|
+
_: 1
|
|
289
|
+
})
|
|
290
|
+
]);
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
function ke() {
|
|
295
|
+
const v = /* @__PURE__ */ new Date();
|
|
296
|
+
return v.setDate(v.getDate() - 15), {
|
|
297
|
+
start: v,
|
|
298
|
+
end: /* @__PURE__ */ new Date()
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
function A(v = 15) {
|
|
302
|
+
const l = /* @__PURE__ */ new Date();
|
|
303
|
+
l.setDate(l.getDate() - v);
|
|
304
|
+
const m = l, a = /* @__PURE__ */ new Date();
|
|
305
|
+
return {
|
|
306
|
+
startDate: `${O(m)}`,
|
|
307
|
+
endDate: `${O(a)}`
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
const re = { 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" }, ie = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, ce = /* @__PURE__ */ T({
|
|
311
|
+
__name: "FmDateRangePickerChip",
|
|
312
|
+
props: {
|
|
313
|
+
modelValue: { default: (v) => v.modelValue ?? A() }
|
|
314
|
+
},
|
|
315
|
+
emits: ["update:modelValue"],
|
|
316
|
+
setup(v, { emit: l }) {
|
|
317
|
+
const m = l, a = H(A());
|
|
318
|
+
J(a, (t) => {
|
|
319
|
+
m("update:modelValue", t);
|
|
320
|
+
});
|
|
321
|
+
const s = _(() => {
|
|
322
|
+
const { startDate: t, endDate: e } = a.value;
|
|
323
|
+
return !t && !e ? "" : `${t} - ${e}`;
|
|
324
|
+
});
|
|
325
|
+
return (t, e) => {
|
|
326
|
+
const c = k("FmIcon"), p = k("FmDateRangePicker");
|
|
327
|
+
return o(), d(p, {
|
|
328
|
+
"show-predefined-range": "",
|
|
329
|
+
modelValue: a.value,
|
|
330
|
+
"onUpdate:modelValue": e[0] || (e[0] = (h) => a.value = h),
|
|
331
|
+
"start-label": "",
|
|
332
|
+
"end-label": ""
|
|
333
|
+
}, {
|
|
334
|
+
"trigger-button": I(() => [
|
|
335
|
+
f("div", re, [
|
|
336
|
+
M(c, {
|
|
337
|
+
name: "calendar_month",
|
|
338
|
+
size: "sm"
|
|
339
|
+
}),
|
|
340
|
+
f("div", ie, R(s.value), 1)
|
|
341
|
+
])
|
|
342
|
+
]),
|
|
343
|
+
_: 1
|
|
344
|
+
}, 8, ["modelValue"]);
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
}), de = { class: "flex-1 w-full flex items-center gap-4" }, ve = {
|
|
348
|
+
key: 0,
|
|
349
|
+
class: "flex-1"
|
|
350
|
+
}, me = { class: "w-full max-w-[343px] xs:max-w-[unset] sm:max-w-[unset]" }, xe = /* @__PURE__ */ T({
|
|
351
|
+
__name: "FmInventoryTableToolbar",
|
|
352
|
+
props: /* @__PURE__ */ K({
|
|
353
|
+
dateRangeQuery: { type: Boolean },
|
|
354
|
+
changeLocation: { type: Boolean },
|
|
355
|
+
searchable: { type: Boolean },
|
|
356
|
+
actions: {},
|
|
357
|
+
usingBusinessHelperText: {},
|
|
358
|
+
showBusiness: { type: Boolean }
|
|
359
|
+
}, {
|
|
360
|
+
search: {},
|
|
361
|
+
searchModifiers: {},
|
|
362
|
+
dateRange: {},
|
|
363
|
+
dateRangeModifiers: {}
|
|
364
|
+
}),
|
|
365
|
+
emits: ["update:search", "update:dateRange"],
|
|
366
|
+
setup(v) {
|
|
367
|
+
const { breakpoints: l } = Y(), m = _(() => l.value.xs || l.value.sm), a = P(v, "search"), s = P(v, "dateRange"), { t } = Q(), e = E();
|
|
368
|
+
return (c, p) => {
|
|
369
|
+
const h = k("FmTextField"), L = k("FmButton");
|
|
370
|
+
return o(), w("div", {
|
|
371
|
+
class: "flex flex-col gap-8",
|
|
372
|
+
onVnodeMounted: p[2] || (p[2] = //@ts-ignore
|
|
373
|
+
(...n) => g(e).onMounted && g(e).onMounted(...n)),
|
|
374
|
+
onVnodeUnmounted: p[3] || (p[3] = //@ts-ignore
|
|
375
|
+
(...n) => g(e).onUnmounted && g(e).onUnmounted(...n))
|
|
376
|
+
}, [
|
|
377
|
+
f("div", {
|
|
378
|
+
class: D([
|
|
379
|
+
"flex gap-8 items-center",
|
|
380
|
+
{
|
|
381
|
+
"px-8 flex-col-reverse h-[unset]": m.value,
|
|
382
|
+
"h-48": !m.value
|
|
383
|
+
}
|
|
384
|
+
])
|
|
385
|
+
}, [
|
|
386
|
+
c.changeLocation || c.dateRangeQuery ? (o(), w("div", {
|
|
387
|
+
key: 0,
|
|
388
|
+
class: D([
|
|
389
|
+
"flex gap-8 items-center",
|
|
390
|
+
{
|
|
391
|
+
"w-full overflow-x-auto": m.value
|
|
392
|
+
}
|
|
393
|
+
])
|
|
394
|
+
}, [
|
|
395
|
+
c.changeLocation ? (o(), d(ue, {
|
|
396
|
+
key: 0,
|
|
397
|
+
"show-business": c.showBusiness
|
|
398
|
+
}, null, 8, ["show-business"])) : b("", !0),
|
|
399
|
+
c.dateRangeQuery ? (o(), d(ce, {
|
|
400
|
+
key: 1,
|
|
401
|
+
"model-value": s.value,
|
|
402
|
+
"onUpdate:modelValue": p[0] || (p[0] = (n) => s.value = n)
|
|
403
|
+
}, null, 8, ["model-value"])) : b("", !0)
|
|
404
|
+
], 2)) : b("", !0),
|
|
405
|
+
f("div", de, [
|
|
406
|
+
m.value ? b("", !0) : (o(), w("div", ve)),
|
|
407
|
+
f("div", me, [
|
|
408
|
+
c.searchable ? (o(), d(h, {
|
|
409
|
+
key: 0,
|
|
410
|
+
"model-value": a.value,
|
|
411
|
+
"onUpdate:modelValue": p[1] || (p[1] = (n) => a.value = n),
|
|
412
|
+
"prepend-icon": "search",
|
|
413
|
+
placeholder: g(t)("inventory.common.table.toolbar.filterItems"),
|
|
414
|
+
class: "w-full"
|
|
415
|
+
}, null, 8, ["model-value", "placeholder"])) : b("", !0)
|
|
416
|
+
]),
|
|
417
|
+
(o(!0), w(V, null, S(c.actions, (n, B) => (o(), d(L, {
|
|
418
|
+
key: B,
|
|
419
|
+
variant: "tertiary",
|
|
420
|
+
"prepend-icon": n.icon,
|
|
421
|
+
onClick: n.onClick
|
|
422
|
+
}, null, 8, ["prepend-icon", "onClick"]))), 128))
|
|
423
|
+
])
|
|
424
|
+
], 2)
|
|
425
|
+
], 512);
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
export {
|
|
430
|
+
he as _,
|
|
431
|
+
xe as a,
|
|
432
|
+
ke as b,
|
|
433
|
+
A as i,
|
|
434
|
+
E as u
|
|
435
|
+
};
|
|
@@ -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-DXZpbt33.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",
|