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