@feedmepos/mf-report 5.22.25 → 5.22.26
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/App-3HFmWp7u.js +298 -0
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-CD7LSCLM.js → BaseDialog.vue_vue_type_script_setup_true_lang-B2CdeeFj.js} +1128 -1292
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-BP474uxj.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-DlpbyWWd.js} +5 -5
- package/dist/{Default.vue_vue_type_script_setup_true_lang-C55xh4bx.js → Default.vue_vue_type_script_setup_true_lang-BUIcdcLn.js} +2 -2
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-D2K2ghV_.js → FilterSelector.vue_vue_type_script_setup_true_lang-jDZZAdUQ.js} +19 -19
- package/dist/InsightView-B8Wrd2SX.js +664 -0
- package/dist/{Integration-CAsNSCR4.js → Integration-D_jZxPMn.js} +40 -40
- package/dist/{Integrations-CIeyn0dF.js → Integrations-B1igzxZG.js} +14 -13
- package/dist/Layout-Dt6yE5XC.js +19 -0
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-CBY5Meyc.js → MenuTab.vue_vue_type_script_setup_true_lang-Dtv5xe0O.js} +13 -13
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DsOmTqFV.js → NavigationTab.vue_vue_type_script_setup_true_lang-lfncwvdP.js} +24 -24
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-BcdcgnzD.js → NoData.vue_vue_type_script_setup_true_lang-CDKHIlF2.js} +1 -1
- package/dist/OverviewView-hz2kZmm7.js +62 -0
- package/dist/{Report-CMYhrVbI.js → Report-nrJWlkN-.js} +15 -14
- package/dist/{ReportEditor-BU6Hq9yx.js → ReportEditor-YV-2UXDU.js} +24 -23
- package/dist/{ReportView-8F14F_jz.js → ReportView-CM1PfMk6.js} +18 -17
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-SWjNNZ_J.js → SelectComponent.vue_vue_type_script_setup_true_lang-Df40itH5.js} +1 -1
- package/dist/Setting-B1Xrl09c.js +326 -0
- package/dist/{TileEditor-BRHXTLEK.js → TileEditor-CF0aNTKV.js} +131 -131
- package/dist/{TransitionFade-DbsPAg2T.js → TransitionFade-D2bsz2iV.js} +12 -12
- package/dist/app-C2vt2B-i.js +11540 -0
- package/dist/app.js +1 -1
- package/dist/useRestaurantPermission-DRvKGVtO.js +65 -0
- package/dist/vue-i18n-DVWuTfed.js +2727 -0
- package/package.json +1 -1
- package/dist/App-C5_KJN8G.js +0 -294
- package/dist/InsightView-BCZKzqRM.js +0 -670
- package/dist/Layout-BFvrEBq5.js +0 -29
- package/dist/NoPermission.vue_vue_type_script_setup_true_lang-obph7BUZ.js +0 -25
- package/dist/OverviewView-gvsp6532.js +0 -63
- package/dist/Setting-BtWmZpk0.js +0 -328
- package/dist/app-WBPZfxon.js +0 -6658
- package/dist/useRestaurantPermission-BtPLwoC9.js +0 -64
- package/dist/vue-i18n-CvU0g5WR.js +0 -7253
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { defineComponent as l, computed as s, createBlock as m, openBlock as a, withCtx as u, renderSlot as p } from "vue";
|
|
2
|
-
import { u as c } from "./vue-i18n-CvU0g5WR.js";
|
|
3
|
-
import { _ } from "./NoData.vue_vue_type_script_setup_true_lang-BcdcgnzD.js";
|
|
4
|
-
const T = /* @__PURE__ */ l({
|
|
5
|
-
__name: "NoPermission",
|
|
6
|
-
props: {
|
|
7
|
-
title: { default: "report.messages.noPermission" },
|
|
8
|
-
subTitle: { default: "report.messages.noPermissionPageAccess" }
|
|
9
|
-
},
|
|
10
|
-
setup(o) {
|
|
11
|
-
const e = o, { t } = c(), i = s(() => t(e.title)), n = s(() => t(e.subTitle));
|
|
12
|
-
return (r, f) => (a(), m(_, {
|
|
13
|
-
title: i.value,
|
|
14
|
-
"sub-title": n.value
|
|
15
|
-
}, {
|
|
16
|
-
menu: u(() => [
|
|
17
|
-
p(r.$slots, "menu")
|
|
18
|
-
]),
|
|
19
|
-
_: 3
|
|
20
|
-
}, 8, ["title", "sub-title"]));
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
export {
|
|
24
|
-
T as _
|
|
25
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { defineComponent as b, computed as u, resolveComponent as h, createBlock as n, openBlock as r, withCtx as C, createVNode as d, createElementVNode as S, unref as e, normalizeStyle as B, normalizeClass as _, createElementBlock as f, Fragment as F, renderList as L } from "vue";
|
|
2
|
-
import { _ as N } from "./FilterSelector.vue_vue_type_script_setup_true_lang-D2K2ghV_.js";
|
|
3
|
-
import { _ as O } from "./Default.vue_vue_type_script_setup_true_lang-C55xh4bx.js";
|
|
4
|
-
import { a as P, u as R } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CD7LSCLM.js";
|
|
5
|
-
import { storeToRefs as v } from "pinia";
|
|
6
|
-
import { _ as V } from "./NoData.vue_vue_type_script_setup_true_lang-BcdcgnzD.js";
|
|
7
|
-
import { useBreakpoints as z } from "@feedmepos/ui-library";
|
|
8
|
-
import { _ as D } from "./MenuTab.vue_vue_type_script_setup_true_lang-CBY5Meyc.js";
|
|
9
|
-
import { useI18n as E } from "@feedmepos/mf-common";
|
|
10
|
-
import { r as H } from "./i18n-CI_sQ5d_.js";
|
|
11
|
-
import { _ as I } from "./NoPermission.vue_vue_type_script_setup_true_lang-obph7BUZ.js";
|
|
12
|
-
const Y = /* @__PURE__ */ b({
|
|
13
|
-
__name: "OverviewView",
|
|
14
|
-
setup(T) {
|
|
15
|
-
const { t: s, te: g } = E(), x = P(), w = R(), { breakpoints: o } = z(), { isOpenDownloadDialog: k, overviewReport: a } = v(x), { isOverviewAccessible: i } = v(w), l = u(() => {
|
|
16
|
-
var t;
|
|
17
|
-
return ((t = a.value) == null ? void 0 : t.tiles) || [];
|
|
18
|
-
}), $ = u(() => {
|
|
19
|
-
var t;
|
|
20
|
-
return i.value ? H(s, g, (t = a.value) == null ? void 0 : t.name, "other") : s("report.view.overview.title");
|
|
21
|
-
});
|
|
22
|
-
return (t, m) => {
|
|
23
|
-
const y = h("FmPageHead");
|
|
24
|
-
return r(), n(O, null, {
|
|
25
|
-
default: C(() => [
|
|
26
|
-
d(y, {
|
|
27
|
-
title: $.value,
|
|
28
|
-
class: "h-[68px]",
|
|
29
|
-
actions: e(i) ? [
|
|
30
|
-
{
|
|
31
|
-
label: e(s)("report.common.download"),
|
|
32
|
-
value: "download",
|
|
33
|
-
isPrimary: !0,
|
|
34
|
-
prependIcon: "download"
|
|
35
|
-
}
|
|
36
|
-
] : [],
|
|
37
|
-
"onClick:action": m[0] || (m[0] = (p) => k.value = !0)
|
|
38
|
-
}, null, 8, ["title", "actions"]),
|
|
39
|
-
d(D),
|
|
40
|
-
S("div", {
|
|
41
|
-
class: _(`flex flex-col gap-2 ${e(o).sm || e(o).xs ? "mb-20" : ""}`),
|
|
42
|
-
style: B({ height: `calc(100% - ${e(o).lg || e(o).md ? 72 : 64}px)` })
|
|
43
|
-
}, [
|
|
44
|
-
e(i) ? l.value.length > 0 && e(a) ? (r(), f("div", {
|
|
45
|
-
key: 1,
|
|
46
|
-
class: _(["grid grid-cols-12", e(o).sm || e(o).xs ? "px-3 gap-[16px]" : "px-24 gap-[24px]"])
|
|
47
|
-
}, [
|
|
48
|
-
(r(!0), f(F, null, L(l.value, (p, c) => (r(), n(N, {
|
|
49
|
-
key: `widget_${e(a).id}_${c}`,
|
|
50
|
-
"model-value": p,
|
|
51
|
-
index: c
|
|
52
|
-
}, null, 8, ["model-value", "index"]))), 128))
|
|
53
|
-
], 2)) : (r(), n(V, { key: 2 })) : (r(), n(I, { key: 0 }))
|
|
54
|
-
], 6)
|
|
55
|
-
]),
|
|
56
|
-
_: 1
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
export {
|
|
62
|
-
Y as default
|
|
63
|
-
};
|
package/dist/Setting-BtWmZpk0.js
DELETED
|
@@ -1,328 +0,0 @@
|
|
|
1
|
-
import { defineComponent as U, ref as H, useModel as q, resolveComponent as b, createElementBlock as D, openBlock as g, createBlock as N, createElementVNode as t, resolveDynamicComponent as ie, unref as e, withCtx as x, createVNode as a, normalizeClass as O, toDisplayString as r, Fragment as W, renderList as X, withDirectives as J, createTextVNode as me, vShow as L, watch as ue, normalizeStyle as pe } from "vue";
|
|
2
|
-
import { _ as de } from "./Default.vue_vue_type_script_setup_true_lang-C55xh4bx.js";
|
|
3
|
-
import { d as I } from "./app-WBPZfxon.js";
|
|
4
|
-
import { components as A, useSnackbar as Y, useBreakpoints as Z, FmButtonColorThemeVariant as G } from "@feedmepos/ui-library";
|
|
5
|
-
import { t as B, u as ce, l as fe } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CD7LSCLM.js";
|
|
6
|
-
import { u as ve } from "./message-dialog-UoMWOnil.js";
|
|
7
|
-
import { u as E, C as K, D as _e, b as ge } from "./vue-i18n-CvU0g5WR.js";
|
|
8
|
-
import { detectLocale as F } from "@feedmepos/mf-common";
|
|
9
|
-
import { a as ee } from "./SelectComponent.vue_vue_type_script_setup_true_lang-SWjNNZ_J.js";
|
|
10
|
-
import { storeToRefs as Q } from "pinia";
|
|
11
|
-
import { _ as ye } from "./NoPermission.vue_vue_type_script_setup_true_lang-obph7BUZ.js";
|
|
12
|
-
const he = { class: "px-5 py-2" }, xe = { class: "flex" }, be = { class: "flex px-5 gap-2" }, Ce = { class: "flex flex-col gap-2" }, Ve = { class: "fm-typo-en-title-sm-600" }, Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, De = { class: "w-full gap-[24px] flex flex-col pt-2" }, Se = { class: "flex items-center w-full gap-3" }, $e = { class: "text-fm-color-typo-primary" }, ke = { class: "text-fm-color-typo-secondary" }, Fe = { class: "flex items-center gap-2" }, Re = /* @__PURE__ */ U({
|
|
13
|
-
__name: "ReportHour",
|
|
14
|
-
props: {
|
|
15
|
-
modelValue: {
|
|
16
|
-
required: !0,
|
|
17
|
-
default: () => []
|
|
18
|
-
},
|
|
19
|
-
modelModifiers: {}
|
|
20
|
-
},
|
|
21
|
-
emits: ["update:modelValue"],
|
|
22
|
-
setup(S) {
|
|
23
|
-
const l = H(!1), p = H(), y = {
|
|
24
|
-
name: "",
|
|
25
|
-
isDefault: !1,
|
|
26
|
-
startTime: { hour: 0, minute: 0 },
|
|
27
|
-
endTime: { hour: 0, minute: 0 }
|
|
28
|
-
}, { FmForm: o } = A, c = H(), { promptMessage: T } = ve(), f = Y(), n = H(JSON.parse(JSON.stringify(y))), s = q(S, "modelValue"), { t: i } = E(), P = () => {
|
|
29
|
-
l.value = !1, n.value && p.value === void 0 ? s.value.push(n.value) : s.value[p.value] = n.value;
|
|
30
|
-
}, R = () => {
|
|
31
|
-
var v;
|
|
32
|
-
(v = c.value) == null || v.validateInputs();
|
|
33
|
-
}, m = () => {
|
|
34
|
-
l.value = !1, n.value = y;
|
|
35
|
-
}, M = (v) => {
|
|
36
|
-
p.value = v, n.value = JSON.parse(JSON.stringify(s.value[p.value])), l.value = !0;
|
|
37
|
-
}, te = () => {
|
|
38
|
-
n.value = y, l.value = !0;
|
|
39
|
-
}, oe = async (v) => {
|
|
40
|
-
const u = s.value.find((C, d) => d === v);
|
|
41
|
-
if (!u) {
|
|
42
|
-
f.open({ message: `index ${v} cannot be found`, type: "error" });
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
await T({
|
|
46
|
-
title: i("report.setting.reportHour.deleteTitle"),
|
|
47
|
-
message: i("report.setting.reportHour.deleteConfirm", { name: u.name })
|
|
48
|
-
}) && (s.value = s.value.filter((d, j) => j !== v), s.value.find((d) => d.isDefault) || (s.value[0].isDefault = !0), n.value = y);
|
|
49
|
-
}, le = (v, u) => {
|
|
50
|
-
v ? s.value = s.value.map(($, C) => ({
|
|
51
|
-
...$,
|
|
52
|
-
isDefault: u === C
|
|
53
|
-
})) : s.value = s.value.map(($, C) => ({
|
|
54
|
-
...$,
|
|
55
|
-
isDefault: C === 0
|
|
56
|
-
}));
|
|
57
|
-
}, { breakpoints: w } = Z(), { FmSideSheet: ae, FmTopSheet: se } = A;
|
|
58
|
-
return (v, u) => {
|
|
59
|
-
const $ = b("FmTextField"), C = b("FmTimePicker"), d = b("FmButton"), j = b("FmSwitch"), re = b("FmChip"), ne = b("FmCard");
|
|
60
|
-
return g(), D("div", null, [
|
|
61
|
-
(g(), N(ie(e(w).lg || e(w).md ? e(ae) : e(se)), {
|
|
62
|
-
modelValue: l.value,
|
|
63
|
-
"onUpdate:modelValue": u[3] || (u[3] = (h) => l.value = h),
|
|
64
|
-
"fullscreen-size": "sm",
|
|
65
|
-
"dismiss-away": !0
|
|
66
|
-
}, {
|
|
67
|
-
"side-sheet-header": x(() => [
|
|
68
|
-
t("p", null, r(e(i)("report.setting.reportHour.addTitle")), 1)
|
|
69
|
-
]),
|
|
70
|
-
"top-sheet-header": x(() => [
|
|
71
|
-
t("div", he, [
|
|
72
|
-
t("p", null, r(e(i)("report.setting.reportHour.addTitle")), 1)
|
|
73
|
-
])
|
|
74
|
-
]),
|
|
75
|
-
"side-sheet-footer": x(() => [
|
|
76
|
-
t("div", xe, [
|
|
77
|
-
a(d, {
|
|
78
|
-
label: "Save",
|
|
79
|
-
variant: "primary",
|
|
80
|
-
onClick: R
|
|
81
|
-
}),
|
|
82
|
-
a(d, {
|
|
83
|
-
label: "Cancel",
|
|
84
|
-
variant: "tertiary",
|
|
85
|
-
onClick: m
|
|
86
|
-
})
|
|
87
|
-
])
|
|
88
|
-
]),
|
|
89
|
-
"top-sheet-footer": x(() => [
|
|
90
|
-
t("div", be, [
|
|
91
|
-
a(d, {
|
|
92
|
-
label: "Save",
|
|
93
|
-
variant: "primary",
|
|
94
|
-
onClick: R
|
|
95
|
-
}),
|
|
96
|
-
a(d, {
|
|
97
|
-
label: "Cancel",
|
|
98
|
-
variant: "tertiary",
|
|
99
|
-
onClick: m
|
|
100
|
-
})
|
|
101
|
-
])
|
|
102
|
-
]),
|
|
103
|
-
default: x(() => [
|
|
104
|
-
a(e(o), {
|
|
105
|
-
ref_key: "form",
|
|
106
|
-
ref: c,
|
|
107
|
-
class: O(["flex flex-col gap-2", `${e(w).sm || e(w).xs ? "px-24" : ""}`]),
|
|
108
|
-
onValidationSuccess: P
|
|
109
|
-
}, {
|
|
110
|
-
default: x(() => {
|
|
111
|
-
var h, V, k, z;
|
|
112
|
-
return [
|
|
113
|
-
a($, {
|
|
114
|
-
modelValue: n.value.name,
|
|
115
|
-
"onUpdate:modelValue": u[0] || (u[0] = (_) => n.value.name = _),
|
|
116
|
-
label: e(i)("report.setting.reportHour.hourSetName"),
|
|
117
|
-
placeholder: e(i)("report.setting.reportHour.namePlaceholder"),
|
|
118
|
-
rules: [(_) => _ !== "" || e(i)("report.setting.reportHour.cannotBeEmpty")]
|
|
119
|
-
}, null, 8, ["modelValue", "label", "placeholder", "rules"]),
|
|
120
|
-
a(C, {
|
|
121
|
-
"model-value": e(I)().hour(((h = n.value.startTime) == null ? void 0 : h.hour) ?? 0).minute(((V = n.value.startTime) == null ? void 0 : V.minute) ?? 0).locale(e(F)()).format("HH:mm"),
|
|
122
|
-
class: "grow",
|
|
123
|
-
label: e(i)("report.setting.reportHour.startTime"),
|
|
124
|
-
"onUpdate:modelValue": u[1] || (u[1] = (_) => {
|
|
125
|
-
_ && (n.value.startTime.hour = Number(_.split(":")[0]), n.value.startTime.minute = Number(_.split(":")[1]));
|
|
126
|
-
})
|
|
127
|
-
}, null, 8, ["model-value", "label"]),
|
|
128
|
-
a(C, {
|
|
129
|
-
"model-value": e(I)().hour(((k = n.value.endTime) == null ? void 0 : k.hour) ?? 0).minute(((z = n.value.endTime) == null ? void 0 : z.minute) ?? 0).format("HH:mm"),
|
|
130
|
-
class: "grow",
|
|
131
|
-
label: e(i)("report.setting.reportHour.closeTime"),
|
|
132
|
-
"onUpdate:modelValue": u[2] || (u[2] = (_) => {
|
|
133
|
-
_ && (n.value.endTime.hour = Number(_.split(":")[0]), n.value.endTime.minute = Number(_.split(":")[1]));
|
|
134
|
-
})
|
|
135
|
-
}, null, 8, ["model-value", "label"])
|
|
136
|
-
];
|
|
137
|
-
}),
|
|
138
|
-
_: 1
|
|
139
|
-
}, 8, ["class"])
|
|
140
|
-
]),
|
|
141
|
-
_: 1
|
|
142
|
-
}, 8, ["modelValue"])),
|
|
143
|
-
t("div", Ce, [
|
|
144
|
-
t("p", Ve, r(e(i)("report.setting.reportHour.title")), 1),
|
|
145
|
-
t("p", Te, r(e(i)("report.setting.reportHour.description")), 1)
|
|
146
|
-
]),
|
|
147
|
-
t("div", De, [
|
|
148
|
-
(g(!0), D(W, null, X(s.value, (h, V) => (g(), N(ne, {
|
|
149
|
-
key: `report_${V}`,
|
|
150
|
-
class: "flex p-4",
|
|
151
|
-
variant: "outlined"
|
|
152
|
-
}, {
|
|
153
|
-
default: x(() => [
|
|
154
|
-
t("div", Se, [
|
|
155
|
-
a(j, {
|
|
156
|
-
"model-value": h.isDefault,
|
|
157
|
-
"onUpdate:modelValue": (k) => le(k, V)
|
|
158
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
159
|
-
t("div", null, [
|
|
160
|
-
t("p", $e, [
|
|
161
|
-
me(r(h.name) + " ", 1),
|
|
162
|
-
J(a(re, {
|
|
163
|
-
label: e(i)("report.common.default"),
|
|
164
|
-
class: "bg-fm-color-system-info-100 border-fm-color-typo-info text-fm-color-typo-info",
|
|
165
|
-
compact: ""
|
|
166
|
-
}, null, 8, ["label"]), [
|
|
167
|
-
[L, h.isDefault]
|
|
168
|
-
])
|
|
169
|
-
]),
|
|
170
|
-
t("p", ke, r(e(B)(h.startTime, e(F)())) + " - " + r(e(B)(h.endTime, e(F)())), 1)
|
|
171
|
-
]),
|
|
172
|
-
u[4] || (u[4] = t("div", { class: "grow" }, null, -1)),
|
|
173
|
-
J(t("div", Fe, [
|
|
174
|
-
a(d, {
|
|
175
|
-
icon: "edit",
|
|
176
|
-
variant: "tertiary",
|
|
177
|
-
onClick: (k) => M(V)
|
|
178
|
-
}, null, 8, ["onClick"]),
|
|
179
|
-
a(d, {
|
|
180
|
-
icon: "delete",
|
|
181
|
-
variant: "tertiary",
|
|
182
|
-
onClick: (k) => oe(V)
|
|
183
|
-
}, null, 8, ["onClick"])
|
|
184
|
-
], 512), [
|
|
185
|
-
[L, V !== 0]
|
|
186
|
-
])
|
|
187
|
-
])
|
|
188
|
-
]),
|
|
189
|
-
_: 2
|
|
190
|
-
}, 1024))), 128)),
|
|
191
|
-
t("div", null, [
|
|
192
|
-
a(d, {
|
|
193
|
-
label: e(i)("report.setting.reportHour.add"),
|
|
194
|
-
variant: "secondary",
|
|
195
|
-
icon: "add",
|
|
196
|
-
"icon-position": "prepend",
|
|
197
|
-
"border-color": e(G).ColorPrimary,
|
|
198
|
-
"text-color": e(G).ColorPrimary,
|
|
199
|
-
onClick: te
|
|
200
|
-
}, null, 8, ["label", "border-color", "text-color"])
|
|
201
|
-
])
|
|
202
|
-
])
|
|
203
|
-
]);
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
}), we = { class: "py-2 w-full gap-2 flex flex-col" }, He = { class: "fm-typo-en-title-sm-600" }, Oe = /* @__PURE__ */ U({
|
|
207
|
-
__name: "CompareRangeSetting",
|
|
208
|
-
props: {
|
|
209
|
-
modelValue: {
|
|
210
|
-
required: !0,
|
|
211
|
-
default: K.PRECEDING_PERIOD
|
|
212
|
-
},
|
|
213
|
-
modelModifiers: {}
|
|
214
|
-
},
|
|
215
|
-
emits: ["update:modelValue"],
|
|
216
|
-
setup(S) {
|
|
217
|
-
const { t: l } = E(), p = q(S, "modelValue"), y = Object.values(K).map((o) => ({
|
|
218
|
-
label: l(`report.compare.${o}`),
|
|
219
|
-
value: o
|
|
220
|
-
})).slice(0, -1);
|
|
221
|
-
return (o, c) => (g(), D("div", we, [
|
|
222
|
-
t("p", He, r(e(l)("report.setting.summary.comparisonDateRange")), 1),
|
|
223
|
-
a(ee, {
|
|
224
|
-
modelValue: p.value,
|
|
225
|
-
"onUpdate:modelValue": c[0] || (c[0] = (T) => p.value = T),
|
|
226
|
-
label: e(l)("report.setting.summary.comparisonDateRange"),
|
|
227
|
-
items: e(y),
|
|
228
|
-
"disable-search": !0
|
|
229
|
-
}, null, 8, ["modelValue", "label", "items"])
|
|
230
|
-
]));
|
|
231
|
-
}
|
|
232
|
-
}), Ne = { class: "py-2 w-full gap-2 flex flex-col" }, Be = { class: "fm-typo-en-title-sm-600" }, Ue = /* @__PURE__ */ U({
|
|
233
|
-
__name: "DateRangeSetting",
|
|
234
|
-
props: {
|
|
235
|
-
modelValue: { required: !0 },
|
|
236
|
-
modelModifiers: {}
|
|
237
|
-
},
|
|
238
|
-
emits: ["update:modelValue"],
|
|
239
|
-
setup(S) {
|
|
240
|
-
const { t: l } = E(), p = q(S, "modelValue"), y = Object.values(_e).filter((o) => !["This month", "Last month"].includes(o)).map((o) => ({
|
|
241
|
-
label: l(`report.date.${o}`),
|
|
242
|
-
value: o
|
|
243
|
-
}));
|
|
244
|
-
return (o, c) => (g(), D("div", Ne, [
|
|
245
|
-
t("p", Be, r(e(l)("report.setting.summary.defaultDateRange")), 1),
|
|
246
|
-
a(ee, {
|
|
247
|
-
modelValue: p.value,
|
|
248
|
-
"onUpdate:modelValue": c[0] || (c[0] = (T) => p.value = T),
|
|
249
|
-
label: e(l)("report.setting.summary.defaultDateRange"),
|
|
250
|
-
items: e(y),
|
|
251
|
-
"disable-search": !0
|
|
252
|
-
}, null, 8, ["modelValue", "label", "items"])
|
|
253
|
-
]));
|
|
254
|
-
}
|
|
255
|
-
}), Ee = { class: "w-2/4" }, Pe = { class: "fm-typo-en-title-sm-600" }, Me = { class: "text-fm-color-typo-secondary" }, je = { class: "fm-typo-en-body-lg-600" }, Je = { class: "text-fm-color-typo-secondary" }, Le = { class: "fm-typo-en-body-lg-600" }, qe = { class: "text-fm-color-typo-secondary" }, ze = { class: "fm-typo-en-body-lg-600" }, ot = /* @__PURE__ */ U({
|
|
256
|
-
__name: "Setting",
|
|
257
|
-
setup(S) {
|
|
258
|
-
const { breakpoints: l } = Z(), p = ge(), y = ce(), { defaultDateSetting: o } = Q(p), { isSettingAccessible: c } = Q(y), T = Y(), { t: f } = E();
|
|
259
|
-
return ue(
|
|
260
|
-
[
|
|
261
|
-
() => o.value.defaultCompareType,
|
|
262
|
-
() => o.value.defaultDateRange,
|
|
263
|
-
() => o.value.timeOptions
|
|
264
|
-
],
|
|
265
|
-
() => {
|
|
266
|
-
c.value && (o.value.timeOptions.length === 0 ? T.open({ message: f("report.setting.reportHour.cannotBeEmptyError"), type: "error" }) : p.createOrUpdateBusinessSetting(o.value));
|
|
267
|
-
},
|
|
268
|
-
{ deep: !0 }
|
|
269
|
-
), (n, s) => {
|
|
270
|
-
const i = b("FmPageHead"), P = b("FmMenuDivider"), R = b("FmCard");
|
|
271
|
-
return g(), N(de, null, {
|
|
272
|
-
default: x(() => [
|
|
273
|
-
a(i, {
|
|
274
|
-
title: e(f)("report.view.setting.title")
|
|
275
|
-
}, null, 8, ["title"]),
|
|
276
|
-
e(c) ? (g(), D("div", {
|
|
277
|
-
key: 1,
|
|
278
|
-
class: O(`${e(l).sm || e(l).xs ? "pb-20" : ""} overflow-y-auto flex`),
|
|
279
|
-
style: pe({ height: `calc(100% - ${e(l).sm || e(l).xs ? 60 : 72}px)` })
|
|
280
|
-
}, [
|
|
281
|
-
t("div", {
|
|
282
|
-
class: O(`${e(l).lg || e(l).md ? "px-24" : "px-3"} w-full flex flex-col gap-[40px]`)
|
|
283
|
-
}, [
|
|
284
|
-
a(Re, {
|
|
285
|
-
modelValue: e(o).timeOptions,
|
|
286
|
-
"onUpdate:modelValue": s[0] || (s[0] = (m) => e(o).timeOptions = m)
|
|
287
|
-
}, null, 8, ["modelValue"]),
|
|
288
|
-
a(Ue, {
|
|
289
|
-
modelValue: e(o).defaultDateRange,
|
|
290
|
-
"onUpdate:modelValue": s[1] || (s[1] = (m) => e(o).defaultDateRange = m)
|
|
291
|
-
}, null, 8, ["modelValue"]),
|
|
292
|
-
a(Oe, {
|
|
293
|
-
modelValue: e(o).defaultCompareType,
|
|
294
|
-
"onUpdate:modelValue": s[2] || (s[2] = (m) => e(o).defaultCompareType = m)
|
|
295
|
-
}, null, 8, ["modelValue"])
|
|
296
|
-
], 2),
|
|
297
|
-
J(t("div", Ee, [
|
|
298
|
-
a(R, {
|
|
299
|
-
variant: "outlined",
|
|
300
|
-
class: O(["flex flex-col gap-3", `${e(l).lg || e(l).md ? "mr-5 p-6" : ""}`])
|
|
301
|
-
}, {
|
|
302
|
-
default: x(() => [
|
|
303
|
-
t("p", Pe, r(e(f)("report.setting.summary.title")), 1),
|
|
304
|
-
a(P),
|
|
305
|
-
t("p", Me, r(e(f)("report.setting.summary.reportHour")), 1),
|
|
306
|
-
(g(!0), D(W, null, X(e(o).timeOptions, (m, M) => (g(), D("div", { key: M }, [
|
|
307
|
-
t("p", je, r(m.name) + r(m.isDefault ? `(${e(f)("report.setting.reportHour.default")})` : "") + " " + r(e(B)(m.startTime, e(F)())) + " " + r(e(B)(m.endTime, e(F)())) + " " + r(e(fe)(m.startTime, m.endTime)), 1)
|
|
308
|
-
]))), 128)),
|
|
309
|
-
t("p", Je, r(e(f)("report.setting.summary.defaultDateRange")), 1),
|
|
310
|
-
t("p", Le, r(e(f)(`report.date.${e(o).defaultDateRange}`)), 1),
|
|
311
|
-
t("p", qe, r(e(f)("report.setting.summary.comparisonDateRange")), 1),
|
|
312
|
-
t("p", ze, r(e(f)(`report.compare.${e(o).defaultCompareType}`)), 1)
|
|
313
|
-
]),
|
|
314
|
-
_: 1
|
|
315
|
-
}, 8, ["class"])
|
|
316
|
-
], 512), [
|
|
317
|
-
[L, e(l).lg || e(l).md]
|
|
318
|
-
])
|
|
319
|
-
], 6)) : (g(), N(ye, { key: 0 }))
|
|
320
|
-
]),
|
|
321
|
-
_: 1
|
|
322
|
-
});
|
|
323
|
-
};
|
|
324
|
-
}
|
|
325
|
-
});
|
|
326
|
-
export {
|
|
327
|
-
ot as default
|
|
328
|
-
};
|