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