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