@feedmepos/mf-report 5.22.13-beta.1 → 5.22.14-beta.2
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-Cwppqefm.js +294 -0
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-CzbeFyTt.js → BaseDialog.vue_vue_type_script_setup_true_lang-CcKWqqNP.js} +471 -464
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-B06jDFgJ.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-CryPHoYr.js} +2 -2
- package/dist/{Default.vue_vue_type_script_setup_true_lang-BTCBYTaC.js → Default.vue_vue_type_script_setup_true_lang-DU3zkEF1.js} +2 -2
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-Ccr5PmzE.js → FilterSelector.vue_vue_type_script_setup_true_lang-CyW-5xr4.js} +7 -7
- package/dist/{InsightView-C0TwLCJv.js → InsightView-DAnaBH3D.js} +6 -6
- package/dist/{Integration-BFEaM0Wz.js → Integration-DiNs52W5.js} +5 -5
- package/dist/{Integrations-CG-ygqKI.js → Integrations-BvgLRF5N.js} +5 -5
- package/dist/{Layout-D6kcGEx6.js → Layout-BAYV4nCo.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-D3EZc4Vp.js → MenuTab.vue_vue_type_script_setup_true_lang-BZphMQGv.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-CpMCe0cN.js → NavigationTab.vue_vue_type_script_setup_true_lang-DSTG-gQ3.js} +5 -5
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-DdX25Qgn.js → NoData.vue_vue_type_script_setup_true_lang-zS79GrjC.js} +1 -1
- package/dist/{OverviewView-ATC5S46N.js → OverviewView-CvRMdLbB.js} +5 -5
- package/dist/{Report-CVNA4oKn.js → Report-C6445626.js} +164 -154
- package/dist/{ReportEditor-ZXjzIVWj.js → ReportEditor-Cy8f2WFu.js} +6 -6
- package/dist/{ReportView-C0vzCbYY.js → ReportView-D-T3b10U.js} +9 -9
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-BHVPbR3l.js → SelectComponent.vue_vue_type_script_setup_true_lang-CYDZzbCU.js} +1 -1
- package/dist/{Setting-BfR6T0tE.js → Setting-DBzyuCx-.js} +5 -5
- package/dist/{TileEditor-BQDzUwav.js → TileEditor-CWYE5X71.js} +275 -268
- package/dist/{TransitionFade-DlAa1-mg.js → TransitionFade-DwQjFIYA.js} +101 -99
- package/dist/{access-Dw5cDt65-DpLiFTpm.js → access-Dw5cDt65-C2c0R9q4.js} +1 -1
- package/dist/{app-tS9-0m0b.js → app-BRv3iLF1.js} +11 -11
- package/dist/app.js +1 -1
- package/dist/assets/{formatChartData.worker-CtCG_oop.js → formatChartData.worker-Df5ziPQ2.js} +7 -7
- package/dist/assets/{processTableData.worker-BN2TZ-50.js → processTableData.worker-qpA30azs.js} +7 -7
- package/dist/style.css +1 -1
- package/dist/{useReportPermission-DEI1PTJT.js → useReportPermission-CDWkdi6R.js} +2 -2
- package/dist/{useRestaurantPermission-DTzkzgml.js → useRestaurantPermission-CjG_t7dK.js} +2 -2
- package/dist/{vue-i18n-BxRs360O.js → vue-i18n-ComGWqEb.js} +1 -1
- package/package.json +1 -1
- package/dist/App-pXGWlg3l.js +0 -264
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { storeToRefs as
|
|
3
|
-
import { a as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { u as
|
|
6
|
-
import { b as de, e as
|
|
7
|
-
import { useSnackbar as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { useRouter as
|
|
10
|
-
import { useI18n as
|
|
1
|
+
import { defineComponent as Ie, ref as j, watch as me, computed as b, h as v, withModifiers as Re, resolveComponent as x, createBlock as G, openBlock as A, withCtx as m, createVNode as i, createElementVNode as C, unref as e, normalizeStyle as $e, normalizeClass as _, withDirectives as H, createElementBlock as De, Fragment as Fe, renderList as Oe, toDisplayString as J, createTextVNode as Le, vShow as Q } from "vue";
|
|
2
|
+
import { storeToRefs as pe } from "pinia";
|
|
3
|
+
import { a as Ne, u as Pe } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CcKWqqNP.js";
|
|
4
|
+
import { _ as Ve } from "./Default.vue_vue_type_script_setup_true_lang-DU3zkEF1.js";
|
|
5
|
+
import { u as Ae } from "./message-dialog-UoMWOnil.js";
|
|
6
|
+
import { b as de, e as Je } from "./vue-i18n-ComGWqEb.js";
|
|
7
|
+
import { useSnackbar as ze, useBreakpoints as Be, components as Te, FmButtonColorThemeVariant as Ue } from "@feedmepos/ui-library";
|
|
8
|
+
import { _ as Ee } from "./NoData.vue_vue_type_script_setup_true_lang-zS79GrjC.js";
|
|
9
|
+
import { useRouter as Ke, useRoute as Me, onBeforeRouteLeave as Ye } from "vue-router";
|
|
10
|
+
import { useI18n as qe } from "@feedmepos/mf-common";
|
|
11
11
|
import { r as W } from "./i18n-CI_sQ5d_.js";
|
|
12
|
-
import { u as
|
|
13
|
-
const
|
|
12
|
+
import { u as je } from "./useReportPermission-CDWkdi6R.js";
|
|
13
|
+
const Ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, He = { class: "w-[343px]" }, Qe = { class: "fm-typo-en-body-md-600" }, ut = /* @__PURE__ */ Ie({
|
|
14
14
|
__name: "Report",
|
|
15
|
-
setup(
|
|
16
|
-
const { t: a, te:
|
|
17
|
-
reports:
|
|
18
|
-
overviewReport:
|
|
19
|
-
categories:
|
|
15
|
+
setup(We) {
|
|
16
|
+
const { t: a, te: z } = qe(), X = Ke(), Z = Me(), p = Ne(), fe = Pe(), { business: ve } = pe(de()), {
|
|
17
|
+
reports: d,
|
|
18
|
+
overviewReport: B,
|
|
19
|
+
categories: $,
|
|
20
20
|
pinReport: D,
|
|
21
|
-
isOpenAddReportDialog:
|
|
21
|
+
isOpenAddReportDialog: ye,
|
|
22
22
|
scrollPositionY: ee,
|
|
23
23
|
customReportQuota: F,
|
|
24
24
|
canCreateCustomReport: te
|
|
25
|
-
} =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}),
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
} = pe(p), { promptMessage: oe } = Ae(), { promptLoader: T } = Je(), c = ze(), { breakpoints: u } = Be(), { canUpdate: ae, canDuplicate: ge, canDelete: ne, canCreateReport: be } = je(), h = j();
|
|
26
|
+
Ye(() => {
|
|
27
|
+
h.value && (ee.value = h.value.$el.children[0].scrollTop);
|
|
28
|
+
}), me(h, () => {
|
|
29
|
+
h.value && setTimeout(() => {
|
|
30
|
+
h.value.$el.children[0].scrollTop = ee.value;
|
|
31
31
|
}, 200);
|
|
32
32
|
});
|
|
33
|
-
const
|
|
33
|
+
const U = b(() => D.value && d.value ? d.value.filter((o) => {
|
|
34
34
|
var t;
|
|
35
35
|
return (t = D.value) == null ? void 0 : t.includes(o.id);
|
|
36
36
|
}) : []);
|
|
37
|
-
|
|
38
|
-
[() =>
|
|
37
|
+
me(
|
|
38
|
+
[() => ve.value],
|
|
39
39
|
() => {
|
|
40
40
|
p.refreshPinReport();
|
|
41
41
|
},
|
|
42
42
|
{ immediate: !0 }
|
|
43
43
|
);
|
|
44
|
-
const
|
|
45
|
-
(o) =>
|
|
46
|
-
) :
|
|
44
|
+
const re = b(() => U.value.length > 0 ? d.value.filter(
|
|
45
|
+
(o) => U.value.findIndex((t) => t.id === o.id) === -1
|
|
46
|
+
) : d.value), { FmButton: Ce, FmMenu: E, FmMenuItem: S, FmIcon: K, FmChip: M } = Te, se = b(() => [
|
|
47
47
|
{ value: void 0, label: "All" },
|
|
48
|
-
|
|
48
|
+
...$.value.map((o) => ({
|
|
49
49
|
value: o.id,
|
|
50
50
|
label: o.name
|
|
51
51
|
}))
|
|
52
|
-
]), O = j(
|
|
53
|
-
...
|
|
54
|
-
const n =
|
|
52
|
+
]), O = j(se.value[0]), Y = j(""), k = b(() => re.value.length === 0 || $.value.length === 0 ? [] : [
|
|
53
|
+
...U.value.map((t) => {
|
|
54
|
+
const n = $.value.find((l) => l.id === t.category);
|
|
55
55
|
return {
|
|
56
|
-
name: W(a,
|
|
56
|
+
name: W(a, z, t.name, "other"),
|
|
57
57
|
categoryId: (n == null ? void 0 : n.id) ?? "",
|
|
58
58
|
category: n != null && n.name ? a(`report.category.${n.name}`) : a("report.common.uncategorized"),
|
|
59
59
|
reportId: t.id,
|
|
@@ -63,10 +63,10 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
|
|
|
63
63
|
canUpdate: ae(t)
|
|
64
64
|
};
|
|
65
65
|
}),
|
|
66
|
-
...
|
|
67
|
-
const n =
|
|
66
|
+
...re.value.map((t) => {
|
|
67
|
+
const n = $.value.find((l) => l.id === t.category);
|
|
68
68
|
return {
|
|
69
|
-
name: W(a,
|
|
69
|
+
name: W(a, z, t.name, "other"),
|
|
70
70
|
categoryId: (n == null ? void 0 : n.id) ?? "",
|
|
71
71
|
category: n != null && n.name ? a(`report.category.${n.name}`) : a("report.common.uncategorized"),
|
|
72
72
|
reportId: t.id,
|
|
@@ -76,9 +76,9 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
|
|
|
76
76
|
canUpdate: ae(t)
|
|
77
77
|
};
|
|
78
78
|
})
|
|
79
|
-
].filter((t) => O.value.value && t.categoryId !== O.value.value ? !1 : `${(t == null ? void 0 : t.name) || ""}${(t == null ? void 0 : t.description) || ""}`.toLowerCase().indexOf(
|
|
79
|
+
].filter((t) => O.value.value && t.categoryId !== O.value.value ? !1 : `${(t == null ? void 0 : t.name) || ""}${(t == null ? void 0 : t.description) || ""}`.toLowerCase().indexOf(Y.value.toLowerCase()) !== -1)), he = b(
|
|
80
80
|
() => k.value.map((o) => `${o.name}${o.category}`).toString()
|
|
81
|
-
),
|
|
81
|
+
), Se = b(() => [
|
|
82
82
|
{
|
|
83
83
|
accessorKey: "name",
|
|
84
84
|
header: a("report.common.name"),
|
|
@@ -92,8 +92,8 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
|
|
|
92
92
|
meta: {
|
|
93
93
|
width: "100px"
|
|
94
94
|
},
|
|
95
|
-
cell: (o) =>
|
|
96
|
-
|
|
95
|
+
cell: (o) => v(
|
|
96
|
+
M,
|
|
97
97
|
{
|
|
98
98
|
class: `${o.getValue() !== a("report.common.uncategorized") ? "bg-fm-color-system-info-100 text-fm-color-typo-info" : "text-fm-color-typo-secondary"} fm-typo-en-body-sm-600`,
|
|
99
99
|
compact: !0
|
|
@@ -115,23 +115,23 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
|
|
|
115
115
|
width: "80px"
|
|
116
116
|
},
|
|
117
117
|
cell: (o) => {
|
|
118
|
-
var
|
|
119
|
-
const t = o.row.original, n = t.reportId,
|
|
118
|
+
var y;
|
|
119
|
+
const t = o.row.original, n = t.reportId, l = d.value.find((s) => s.id === n), q = n === ((y = B.value) == null ? void 0 : y.id), w = !1, R = l ? ge(l) : !1, V = l ? ne(l) : !1, r = [
|
|
120
120
|
{
|
|
121
121
|
label: a("report.common.duplicate"),
|
|
122
122
|
onClick: () => {
|
|
123
|
-
|
|
123
|
+
l && R ? ce(l) : R || c.open({
|
|
124
124
|
message: a("report.messages.noPermissionDuplicateReport"),
|
|
125
125
|
type: "error"
|
|
126
126
|
});
|
|
127
127
|
},
|
|
128
128
|
variant: "",
|
|
129
|
-
disabled:
|
|
129
|
+
disabled: !R
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
|
-
label: a(
|
|
132
|
+
label: a(q ? "report.common.unsetAsOverview" : "report.common.setAsOverview"),
|
|
133
133
|
onClick: async () => {
|
|
134
|
-
|
|
134
|
+
l && le(l);
|
|
135
135
|
},
|
|
136
136
|
variant: "",
|
|
137
137
|
disabled: !1
|
|
@@ -139,26 +139,29 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
|
|
|
139
139
|
{
|
|
140
140
|
label: a("report.common.remove"),
|
|
141
141
|
onClick: () => {
|
|
142
|
-
|
|
142
|
+
l && (V ? ie(l) : c.open({
|
|
143
|
+
message: a("report.messages.noPermissionDeleteReport"),
|
|
144
|
+
type: "error"
|
|
145
|
+
}));
|
|
143
146
|
},
|
|
144
147
|
variant: "destructive",
|
|
145
|
-
disabled: !t.editable
|
|
148
|
+
disabled: !t.editable || !V
|
|
146
149
|
}
|
|
147
150
|
];
|
|
148
|
-
return
|
|
151
|
+
return v(
|
|
149
152
|
"div",
|
|
150
153
|
{
|
|
151
|
-
class: `flex ${
|
|
154
|
+
class: `flex ${u.value.lg || u.value.md ? "justify-end" : ""} items-center`
|
|
152
155
|
},
|
|
153
156
|
{
|
|
154
157
|
default: () => [
|
|
155
|
-
|
|
158
|
+
v(
|
|
156
159
|
"button",
|
|
157
160
|
{
|
|
158
161
|
disabled: w,
|
|
159
162
|
title: void 0,
|
|
160
|
-
onClick:
|
|
161
|
-
|
|
163
|
+
onClick: Re(() => {
|
|
164
|
+
l && ue(l);
|
|
162
165
|
}, ["stop"]),
|
|
163
166
|
class: `text-fm-color-neutral-gray-400 ${t.pin ? "" : "show-pin"} hover:bg-fm-color-opacity-sm rounded-lg flex items-center justify-center`,
|
|
164
167
|
disabled: w,
|
|
@@ -166,8 +169,8 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
|
|
|
166
169
|
},
|
|
167
170
|
{
|
|
168
171
|
default: () => [
|
|
169
|
-
|
|
170
|
-
|
|
172
|
+
v(
|
|
173
|
+
K,
|
|
171
174
|
{
|
|
172
175
|
name: "keep",
|
|
173
176
|
class: "px-12 p-8",
|
|
@@ -179,8 +182,8 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
|
|
|
179
182
|
]
|
|
180
183
|
}
|
|
181
184
|
),
|
|
182
|
-
|
|
183
|
-
|
|
185
|
+
v(
|
|
186
|
+
E,
|
|
184
187
|
{
|
|
185
188
|
stopClickPropagation: !0,
|
|
186
189
|
shift: !0,
|
|
@@ -188,27 +191,27 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
|
|
|
188
191
|
title: void 0
|
|
189
192
|
},
|
|
190
193
|
{
|
|
191
|
-
default: () =>
|
|
192
|
-
(
|
|
194
|
+
default: () => r.map(
|
|
195
|
+
(s) => v(
|
|
193
196
|
S,
|
|
194
197
|
{
|
|
195
|
-
onClick:
|
|
196
|
-
label:
|
|
197
|
-
class:
|
|
198
|
-
disabled:
|
|
198
|
+
onClick: s.disabled ? {} : s.onClick,
|
|
199
|
+
label: s.label,
|
|
200
|
+
class: s.disabled ? "text-fm-color-typo-disabled" : s.variant === "destructive" ? "text-fm-color-typo-error" : "",
|
|
201
|
+
disabled: s.disabled
|
|
199
202
|
},
|
|
200
203
|
{
|
|
201
|
-
label: () =>
|
|
204
|
+
label: () => v("p", s.label)
|
|
202
205
|
}
|
|
203
206
|
)
|
|
204
207
|
),
|
|
205
|
-
"menu-button": () =>
|
|
206
|
-
|
|
208
|
+
"menu-button": () => v(
|
|
209
|
+
Ce,
|
|
207
210
|
{
|
|
208
211
|
variant: "tertiary",
|
|
209
212
|
size: "md",
|
|
210
213
|
icon: "more_vert",
|
|
211
|
-
iconColor:
|
|
214
|
+
iconColor: Ue.NeutralGray400,
|
|
212
215
|
disabled: w,
|
|
213
216
|
title: void 0
|
|
214
217
|
},
|
|
@@ -222,21 +225,21 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
|
|
|
222
225
|
}
|
|
223
226
|
}
|
|
224
227
|
]);
|
|
225
|
-
async function
|
|
226
|
-
await
|
|
228
|
+
async function le(o) {
|
|
229
|
+
await T(async () => {
|
|
227
230
|
var t;
|
|
228
231
|
try {
|
|
229
|
-
const n = o.id === ((t =
|
|
230
|
-
await p.updateDefaultReport(n ? null : o.id),
|
|
232
|
+
const n = o.id === ((t = B.value) == null ? void 0 : t.id);
|
|
233
|
+
await p.updateDefaultReport(n ? null : o.id), c.open({
|
|
231
234
|
message: `Successfully ${n ? "unset" : "set"} ${o.name} as Overview`,
|
|
232
235
|
type: "success"
|
|
233
236
|
});
|
|
234
237
|
} catch (n) {
|
|
235
|
-
|
|
238
|
+
c.open({ message: JSON.stringify(n), type: "error" });
|
|
236
239
|
}
|
|
237
240
|
});
|
|
238
241
|
}
|
|
239
|
-
async function
|
|
242
|
+
async function ke(o) {
|
|
240
243
|
if (await oe({
|
|
241
244
|
title: a("report.common.duplicate"),
|
|
242
245
|
message: a("report.messages.confirmAction", {
|
|
@@ -245,81 +248,88 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
|
|
|
245
248
|
})
|
|
246
249
|
})) {
|
|
247
250
|
const n = JSON.parse(JSON.stringify(o));
|
|
248
|
-
n.editable = !0, n.id = "", n.name = `${n.name} ${a("report.common.duplicate")}`,
|
|
251
|
+
n.editable = !0, n.id = "", n.name = `${n.name} ${a("report.common.duplicate")}`, T(async () => {
|
|
249
252
|
try {
|
|
250
|
-
await p.createOrUpdateReport(n),
|
|
253
|
+
await p.createOrUpdateReport(n), c.open({
|
|
251
254
|
message: `${a("report.messages.duplicateSuccess", { name: n.name })}`,
|
|
252
255
|
type: "success"
|
|
253
256
|
});
|
|
254
|
-
} catch (
|
|
255
|
-
|
|
257
|
+
} catch (l) {
|
|
258
|
+
c.open({ message: JSON.stringify(l), type: "error" });
|
|
256
259
|
}
|
|
257
260
|
});
|
|
258
261
|
}
|
|
259
262
|
}
|
|
260
|
-
async function
|
|
263
|
+
async function ie(o) {
|
|
264
|
+
if (!ne(o)) {
|
|
265
|
+
c.open({
|
|
266
|
+
message: a("report.messages.noPermissionDeleteReport"),
|
|
267
|
+
type: "error"
|
|
268
|
+
});
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
261
271
|
await oe({
|
|
262
272
|
title: a("report.messages.deleteReport"),
|
|
263
273
|
message: a("report.messages.confirmDelete", { name: o.name })
|
|
264
|
-
}) &&
|
|
274
|
+
}) && T(async () => {
|
|
265
275
|
try {
|
|
266
|
-
await p.removeReport(o),
|
|
276
|
+
await p.removeReport(o), c.open({
|
|
267
277
|
message: a("report.messages.deleteSuccess", { name: o.name }),
|
|
268
278
|
type: "success"
|
|
269
279
|
});
|
|
270
280
|
} catch (n) {
|
|
271
|
-
|
|
281
|
+
c.open({ message: JSON.stringify(n), type: "error" });
|
|
272
282
|
}
|
|
273
283
|
});
|
|
274
284
|
}
|
|
275
|
-
async function
|
|
285
|
+
async function ce(o) {
|
|
276
286
|
if (te.value)
|
|
277
|
-
await
|
|
287
|
+
await ke(o);
|
|
278
288
|
else {
|
|
279
289
|
let t = `Your current plan only support up to ${F.value} custom reports.`;
|
|
280
|
-
F.value === 0 && (t = "Your current plan does not support custom report."),
|
|
290
|
+
F.value === 0 && (t = "Your current plan does not support custom report."), c.open({
|
|
281
291
|
message: t,
|
|
282
292
|
type: "error"
|
|
283
293
|
});
|
|
284
294
|
}
|
|
285
295
|
}
|
|
286
|
-
function
|
|
287
|
-
if (!
|
|
288
|
-
|
|
296
|
+
function we() {
|
|
297
|
+
if (!be.value) {
|
|
298
|
+
c.open({
|
|
289
299
|
message: a("report.messages.noPermission"),
|
|
290
300
|
type: "error"
|
|
291
301
|
});
|
|
292
302
|
return;
|
|
293
303
|
}
|
|
294
304
|
if (te.value)
|
|
295
|
-
|
|
305
|
+
ye.value = !0;
|
|
296
306
|
else {
|
|
297
307
|
let o = `Your current plan only support up to ${F.value} custom reports.`;
|
|
298
|
-
F.value === 0 && (o = "Your current plan does not support custom report."),
|
|
308
|
+
F.value === 0 && (o = "Your current plan does not support custom report."), c.open({
|
|
299
309
|
message: o,
|
|
300
310
|
type: "error"
|
|
301
311
|
});
|
|
302
312
|
}
|
|
303
313
|
}
|
|
304
|
-
function
|
|
305
|
-
const t = W(a,
|
|
306
|
-
D.value && D.value.includes(o.id) ? (
|
|
314
|
+
function ue(o) {
|
|
315
|
+
const t = W(a, z, o.name, "other") ?? "";
|
|
316
|
+
D.value && D.value.includes(o.id) ? (c.open({
|
|
307
317
|
message: `${a("report.common.unpin")} ${t} ${a("report.common.successful")}`,
|
|
308
318
|
type: "success"
|
|
309
|
-
}), p.clearPinReport(o.id)) : (
|
|
319
|
+
}), p.clearPinReport(o.id)) : (c.open({
|
|
310
320
|
message: `${a("report.common.pin")} ${t} ${a("report.common.successful")}`,
|
|
311
321
|
type: "success"
|
|
312
322
|
}), p.cachePinReport(o));
|
|
313
323
|
}
|
|
314
|
-
function
|
|
324
|
+
function xe(o) {
|
|
315
325
|
O.value = o;
|
|
316
326
|
}
|
|
317
|
-
const { selectedLocationIds: I, dateRange: L, compareDateRange: N, timeRange:
|
|
327
|
+
const { selectedLocationIds: I, dateRange: L, compareDateRange: N, timeRange: f, locations: _e } = de(), P = b(() => I.length === _e.length);
|
|
318
328
|
return (o, t) => {
|
|
319
|
-
const n = x("FmPageHead"),
|
|
320
|
-
return
|
|
329
|
+
const n = x("FmPageHead"), l = x("FmSearch"), q = x("FmForm"), w = x("FmListItem"), R = x("FmList"), V = x("FmTable");
|
|
330
|
+
return A(), G(Ve, null, {
|
|
321
331
|
default: m(() => [
|
|
322
|
-
|
|
332
|
+
i(n, {
|
|
323
333
|
title: e(a)("report.common.report", 1),
|
|
324
334
|
class: "h-[68px]",
|
|
325
335
|
actions: [
|
|
@@ -330,64 +340,64 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
|
|
|
330
340
|
prependIcon: "add"
|
|
331
341
|
}
|
|
332
342
|
],
|
|
333
|
-
"onClick:action": t[0] || (t[0] = (r) =>
|
|
343
|
+
"onClick:action": t[0] || (t[0] = (r) => we())
|
|
334
344
|
}, null, 8, ["title", "actions"]),
|
|
335
|
-
|
|
336
|
-
class: _(`overflow-y-hidden flex flex-col gap-8 ${e(
|
|
337
|
-
style: $e({ height: `calc(100% - ${e(
|
|
345
|
+
C("div", {
|
|
346
|
+
class: _(`overflow-y-hidden flex flex-col gap-8 ${e(u).sm || e(u).xs ? "mb-20" : ""}`),
|
|
347
|
+
style: $e({ height: `calc(100% - ${e(u).lg || e(u).md ? 72 : 64}px)` })
|
|
338
348
|
}, [
|
|
339
|
-
|
|
340
|
-
class: _(`flex items-center gap-2 ${e(
|
|
349
|
+
i(q, {
|
|
350
|
+
class: _(`flex items-center gap-2 ${e(u).sm || e(u).xs ? "px-3" : "px-24"}`)
|
|
341
351
|
}, {
|
|
342
352
|
default: m(() => [
|
|
343
|
-
|
|
353
|
+
i(e(E), null, {
|
|
344
354
|
"menu-button": m(() => [
|
|
345
|
-
|
|
355
|
+
i(e(M), { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400" }, {
|
|
346
356
|
default: m(() => [
|
|
347
|
-
|
|
348
|
-
|
|
357
|
+
C("p", null, J(e(a)(`report.category.${O.value.label}`)), 1),
|
|
358
|
+
i(e(K), { name: "expand_more" })
|
|
349
359
|
]),
|
|
350
360
|
_: 1
|
|
351
361
|
})
|
|
352
362
|
]),
|
|
353
363
|
default: m(() => [
|
|
354
|
-
(
|
|
355
|
-
key:
|
|
364
|
+
(A(!0), De(Fe, null, Oe(se.value, (r, y) => (A(), G(e(S), {
|
|
365
|
+
key: y,
|
|
356
366
|
label: e(a)(`report.category.${r.label}`),
|
|
357
|
-
onClick: () =>
|
|
367
|
+
onClick: () => xe(r)
|
|
358
368
|
}, null, 8, ["label", "onClick"]))), 128))
|
|
359
369
|
]),
|
|
360
370
|
_: 1
|
|
361
371
|
}),
|
|
362
|
-
|
|
363
|
-
class: _(`flex ${e(
|
|
372
|
+
C("div", {
|
|
373
|
+
class: _(`flex ${e(u).sm || e(u).xs ? "justify-center items-center" : ""}`)
|
|
364
374
|
}, [
|
|
365
|
-
|
|
375
|
+
C("p", Ge, J(e(a)("report.common.results", { count: k.value.length })), 1)
|
|
366
376
|
], 2),
|
|
367
|
-
t[3] || (t[3] =
|
|
368
|
-
|
|
369
|
-
l
|
|
370
|
-
modelValue:
|
|
371
|
-
"onUpdate:modelValue": t[1] || (t[1] = (r) =>
|
|
372
|
-
class: _(`${e(
|
|
377
|
+
t[3] || (t[3] = C("div", { class: "grow" }, null, -1)),
|
|
378
|
+
C("div", He, [
|
|
379
|
+
i(l, {
|
|
380
|
+
modelValue: Y.value,
|
|
381
|
+
"onUpdate:modelValue": t[1] || (t[1] = (r) => Y.value = r),
|
|
382
|
+
class: _(`${e(u).lg || e(u).md ? "grow" : ""}`)
|
|
373
383
|
}, null, 8, ["modelValue", "class"])
|
|
374
384
|
])
|
|
375
385
|
]),
|
|
376
386
|
_: 1
|
|
377
387
|
}, 8, ["class"]),
|
|
378
|
-
H((
|
|
388
|
+
H((A(), G(V, {
|
|
379
389
|
key: he.value,
|
|
380
390
|
ref_key: "table",
|
|
381
|
-
ref:
|
|
382
|
-
class: _([e(
|
|
391
|
+
ref: h,
|
|
392
|
+
class: _([e(u).sm || e(u).xs ? "px-0" : "px-24", "report-table"]),
|
|
383
393
|
style: { height: "calc(100% - 40px)" },
|
|
384
|
-
"column-defs":
|
|
394
|
+
"column-defs": Se.value,
|
|
385
395
|
"row-data": k.value,
|
|
386
396
|
"page-size": k.value.length,
|
|
387
397
|
"hide-footer": !0,
|
|
388
398
|
"row-class-name": "row",
|
|
389
399
|
onRowClick: t[2] || (t[2] = (r) => {
|
|
390
|
-
e(
|
|
400
|
+
e(fe).suppressReportRouteSync = !0, e(p).updateCurrentReportId(r.original.reportId), e(X).push({
|
|
391
401
|
name: "reportView",
|
|
392
402
|
query: {
|
|
393
403
|
...e(Z).query,
|
|
@@ -396,8 +406,8 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
|
|
|
396
406
|
endDate: e(L).endDate,
|
|
397
407
|
compareStartDate: e(N).startDate,
|
|
398
408
|
compareEndDate: e(N).endDate,
|
|
399
|
-
timeStart: e(
|
|
400
|
-
timeEnd: e(
|
|
409
|
+
timeStart: e(f).start ? JSON.stringify(e(f).start) : null,
|
|
410
|
+
timeEnd: e(f).end ? JSON.stringify(e(f).end) : null,
|
|
401
411
|
isAllLocation: P.value.toString(),
|
|
402
412
|
locationIds: P.value ? void 0 : e(I) ? JSON.stringify(e(I)) : void 0
|
|
403
413
|
}
|
|
@@ -405,7 +415,7 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
|
|
|
405
415
|
})
|
|
406
416
|
}, {
|
|
407
417
|
"list-row": m(({ original: r }) => [
|
|
408
|
-
|
|
418
|
+
i(R, {
|
|
409
419
|
onClick: () => {
|
|
410
420
|
r.reportId && (e(p).updateCurrentReportId(r.reportId), e(X).push({
|
|
411
421
|
name: "reportView",
|
|
@@ -416,8 +426,8 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
|
|
|
416
426
|
endDate: e(L).endDate,
|
|
417
427
|
compareStartDate: e(N).startDate,
|
|
418
428
|
compareEndDate: e(N).endDate,
|
|
419
|
-
timeStart: e(
|
|
420
|
-
timeEnd: e(
|
|
429
|
+
timeStart: e(f).start ? JSON.stringify(e(f).start) : null,
|
|
430
|
+
timeEnd: e(f).end ? JSON.stringify(e(f).end) : null,
|
|
421
431
|
isAllLocation: P.value.toString(),
|
|
422
432
|
locationIds: P.value ? void 0 : e(I) ? JSON.stringify(e(I)) : void 0
|
|
423
433
|
}
|
|
@@ -425,77 +435,77 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
|
|
|
425
435
|
}
|
|
426
436
|
}, {
|
|
427
437
|
default: m(() => [
|
|
428
|
-
|
|
438
|
+
i(w, {
|
|
429
439
|
tag: "label",
|
|
430
440
|
label: r.name,
|
|
431
441
|
clickable: ""
|
|
432
442
|
}, {
|
|
433
443
|
append: m(() => [
|
|
434
|
-
|
|
444
|
+
i(e(M), {
|
|
435
445
|
class: _(
|
|
436
446
|
r.category !== "Uncategorized" ? "bg-fm-color-system-info-100 text-fm-color-typo-info" : "text-fm-color-typo-secondary"
|
|
437
447
|
),
|
|
438
448
|
compact: !0
|
|
439
449
|
}, {
|
|
440
450
|
default: m(() => [
|
|
441
|
-
|
|
451
|
+
C("p", Qe, J(r.category), 1)
|
|
442
452
|
]),
|
|
443
453
|
_: 2
|
|
444
454
|
}, 1032, ["class"]),
|
|
445
|
-
|
|
455
|
+
i(e(E), {
|
|
446
456
|
placement: "left",
|
|
447
457
|
"stop-click-propagation": !0
|
|
448
458
|
}, {
|
|
449
459
|
"menu-button": m(() => [
|
|
450
|
-
|
|
460
|
+
i(e(K), {
|
|
451
461
|
name: "more_vert",
|
|
452
462
|
class: "btn-color"
|
|
453
463
|
})
|
|
454
464
|
]),
|
|
455
465
|
default: m(() => {
|
|
456
|
-
var
|
|
466
|
+
var y;
|
|
457
467
|
return [
|
|
458
|
-
|
|
468
|
+
i(e(S), {
|
|
459
469
|
label: r.pin ? "Unpin" : "Pin",
|
|
460
470
|
onClick: () => {
|
|
461
|
-
const
|
|
471
|
+
const s = e(d).find(
|
|
462
472
|
(g) => g.id === r.reportId
|
|
463
473
|
);
|
|
464
|
-
|
|
474
|
+
s && ue(s);
|
|
465
475
|
}
|
|
466
476
|
}, null, 8, ["label", "onClick"]),
|
|
467
|
-
|
|
477
|
+
i(e(S), {
|
|
468
478
|
label: e(a)("report.common.duplicate"),
|
|
469
479
|
onClick: () => {
|
|
470
|
-
const
|
|
480
|
+
const s = e(d).find(
|
|
471
481
|
(g) => g.id === r.reportId
|
|
472
482
|
);
|
|
473
|
-
|
|
483
|
+
s && ce(s);
|
|
474
484
|
}
|
|
475
485
|
}, null, 8, ["label", "onClick"]),
|
|
476
|
-
|
|
486
|
+
i(e(S), {
|
|
477
487
|
label: e(a)(
|
|
478
|
-
r.reportId === ((
|
|
488
|
+
r.reportId === ((y = e(B)) == null ? void 0 : y.id) ? "report.common.unsetAsOverview" : "report.common.setAsOverview"
|
|
479
489
|
),
|
|
480
490
|
onClick: () => {
|
|
481
|
-
const
|
|
491
|
+
const s = e(d).find(
|
|
482
492
|
(g) => g.id === r.reportId
|
|
483
493
|
);
|
|
484
|
-
|
|
494
|
+
s && le(s);
|
|
485
495
|
}
|
|
486
496
|
}, null, 8, ["label", "onClick"]),
|
|
487
|
-
H(
|
|
497
|
+
H(i(e(S), {
|
|
488
498
|
label: e(a)("report.common.delete"),
|
|
489
499
|
class: "text-fm-color-typo-error",
|
|
490
500
|
onClick: () => {
|
|
491
|
-
const
|
|
501
|
+
const s = e(d).find(
|
|
492
502
|
(g) => g.id === r.reportId
|
|
493
503
|
);
|
|
494
|
-
|
|
504
|
+
s && ie(s);
|
|
495
505
|
}
|
|
496
506
|
}, {
|
|
497
507
|
label: m(() => [
|
|
498
|
-
|
|
508
|
+
Le(J(e(a)("report.common.delete")), 1)
|
|
499
509
|
]),
|
|
500
510
|
_: 2
|
|
501
511
|
}, 1032, ["label", "onClick"]), [
|
|
@@ -516,7 +526,7 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
|
|
|
516
526
|
}, 8, ["class", "column-defs", "row-data", "page-size"])), [
|
|
517
527
|
[Q, k.value.length > 0]
|
|
518
528
|
]),
|
|
519
|
-
H(
|
|
529
|
+
H(i(Ee, null, null, 512), [
|
|
520
530
|
[Q, k.value.length === 0]
|
|
521
531
|
])
|
|
522
532
|
], 6)
|
|
@@ -527,5 +537,5 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
|
|
|
527
537
|
}
|
|
528
538
|
});
|
|
529
539
|
export {
|
|
530
|
-
|
|
540
|
+
ut as default
|
|
531
541
|
};
|