@feedmepos/mf-report 5.28.5-beta.0 → 5.28.5
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-DGKt1n7o.js → App-Bc8Mp5vR.js} +37 -37
- package/dist/{DateRangeSelect-Y_Nn-osm.js → DateRangeSelect-cbSEHMzW.js} +1 -1
- package/dist/{Default.vue_vue_type_script_setup_true_lang-BlXGP4t_.js → Default.vue_vue_type_script_setup_true_lang-BpJFA_ET.js} +1 -1
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-CEjHfVNa.js → DynamicWidget.vue_vue_type_script_setup_true_lang-Dx-cxJP6.js} +5 -5
- package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DAZLziOO.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-Cxrti7_L.js} +19 -16
- package/dist/{InsightView-BriTcgPJ.js → InsightView-Bo0Fb5QG.js} +5 -5
- package/dist/{Integration-D5ms6fn1.js → Integration-B4tC2MlL.js} +3 -3
- package/dist/{Integrations-DQvYF26T.js → Integrations-RB8iuvdJ.js} +2 -2
- package/dist/{Layout-BBLVmRJi.js → Layout-DBCPtUH7.js} +1 -1
- package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-S5P6mT78.js → LocationSelect.vue_vue_type_script_setup_true_lang-w2H9qOgJ.js} +2 -2
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-DvwbNmby.js → MenuTab.vue_vue_type_script_setup_true_lang-BLVGUSWf.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BvYT2Izx.js → NavigationTab.vue_vue_type_script_setup_true_lang-N31ee-oZ.js} +5 -5
- package/dist/{OverviewView-CCboDE2n.js → OverviewView-WKe6Zxe1.js} +4 -4
- package/dist/{Report-DeLOcjgU.js → Report-Di6GyP1r.js} +246 -244
- package/dist/{ReportCanvasView-DGwF-pyG.js → ReportCanvasView-Dg2ItHBO.js} +3 -3
- package/dist/{ReportEditor-ZoXssGrp.js → ReportEditor-BfNmiEVn.js} +7 -7
- package/dist/{ReportView-CPmqBn6n.js → ReportView-JWJ-6FCu.js} +6 -6
- package/dist/{ReportViewRoute-Ddd_509O.js → ReportViewRoute-BMjjJqN2.js} +2 -2
- package/dist/{Setting-DSnAtGwo.js → Setting-D13NIemB.js} +3 -3
- package/dist/{Template-iqP8PeTT.js → Template-D16bqzrx.js} +3 -3
- package/dist/{TileEditor-Dyk5r6FN.js → TileEditor-1Sn9ZSb2.js} +6 -6
- package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-CLBcYijT.js → TilePageStack.vue_vue_type_script_setup_true_lang-BOXsV7-r.js} +2 -2
- package/dist/{TransitionFade-DUNn6p37.js → TransitionFade-DwJkmMTb.js} +5 -5
- package/dist/{app-D_8mXWLj.js → app-CVBllEjW.js} +17 -13
- package/dist/app.js +1 -1
- package/dist/assets/{formatChartData.worker-DYtOUTAT.js → formatChartData.worker-DZp5dSDQ.js} +45 -41
- package/dist/assets/{processTableData.worker-XtLK-E3T.js → processTableData.worker-Kyuhw4lS.js} +45 -41
- package/dist/{report-C_upEzzb.js → report-Cn4Ik1zm.js} +1 -1
- package/dist/{useRestaurantPermission-Qu5NXD3o.js → useRestaurantPermission-C8bLPfk8.js} +1 -1
- package/package.json +1 -1
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { storeToRefs as
|
|
3
|
-
import { u as
|
|
4
|
-
import { _ as qe } from "./Default.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { useSnackbar as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { c as
|
|
10
|
-
import { useRouter as
|
|
11
|
-
import { useI18n as
|
|
12
|
-
import { r as
|
|
13
|
-
const
|
|
1
|
+
import { defineComponent as Ae, ref as $, watch as we, computed as h, h as d, withModifiers as ze, resolveComponent as I, createBlock as se, openBlock as B, withCtx as m, createVNode as c, createElementVNode as v, unref as t, normalizeStyle as Je, normalizeClass as g, withDirectives as Re, createElementBlock as Be, Fragment as Ke, renderList as Ee, toDisplayString as k, createTextVNode as je, vShow as he } from "vue";
|
|
2
|
+
import { storeToRefs as Pe } from "pinia";
|
|
3
|
+
import { u as He, s as Ye } from "./report-Cn4Ik1zm.js";
|
|
4
|
+
import { _ as qe } from "./Default.vue_vue_type_script_setup_true_lang-BpJFA_ET.js";
|
|
5
|
+
import { u as Ge } from "./message-dialog-UoMWOnil.js";
|
|
6
|
+
import { u as Qe } from "./global-loader-BuxFfehu.js";
|
|
7
|
+
import { useSnackbar as We, useBreakpoints as Xe, components as Ze, FmButtonColorThemeVariant as et } from "@feedmepos/ui-library";
|
|
8
|
+
import { _ as tt } from "./SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js";
|
|
9
|
+
import { c as ot, a as xe, h as at } from "./app-CVBllEjW.js";
|
|
10
|
+
import { useRouter as st, useRoute as rt, onBeforeRouteLeave as nt } from "vue-router";
|
|
11
|
+
import { useI18n as lt } from "@feedmepos/mf-common";
|
|
12
|
+
import { r as re } from "./i18n-DbyciK4x.js";
|
|
13
|
+
const ct = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it = { class: "w-[343px]" }, pt = { class: "fm-typo-en-body-md-600" }, dt = ["tabindex", "aria-disabled", "onClick"], ut = { class: "fm-typo-en-body-md-400 max-w-[240px]" }, It = /* @__PURE__ */ Ae({
|
|
14
14
|
__name: "Report",
|
|
15
|
-
setup(
|
|
16
|
-
const { t: a, te:
|
|
17
|
-
reports:
|
|
18
|
-
overviewReport:
|
|
15
|
+
setup(mt) {
|
|
16
|
+
const { t: a, te: K } = lt(), ne = st(), le = rt(), S = He(), Ce = ot(), { business: Ie } = Pe(xe()), {
|
|
17
|
+
reports: f,
|
|
18
|
+
overviewReport: E,
|
|
19
19
|
categories: O,
|
|
20
20
|
pinReport: F,
|
|
21
|
-
isOpenAddReportDialog:
|
|
22
|
-
scrollPositionY:
|
|
23
|
-
customReportQuota:
|
|
21
|
+
isOpenAddReportDialog: ke,
|
|
22
|
+
scrollPositionY: ce,
|
|
23
|
+
customReportQuota: T,
|
|
24
24
|
canCreateCustomReport: ie
|
|
25
|
-
} =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}),
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
} = Pe(S), { promptMessage: pe } = Ge(), { promptLoader: j } = Qe(), l = We(), { breakpoints: p } = Xe(), { canRead: de, canUpdate: H, canDuplicate: ue, canDelete: Y, canCreateReport: _e } = at(), R = $();
|
|
26
|
+
nt(() => {
|
|
27
|
+
R.value && (ce.value = R.value.$el.children[0].scrollTop);
|
|
28
|
+
}), we(R, () => {
|
|
29
|
+
R.value && setTimeout(() => {
|
|
30
|
+
R.value && (R.value.$el.children[0].scrollTop = ce.value);
|
|
31
31
|
}, 200);
|
|
32
32
|
});
|
|
33
|
-
const q =
|
|
33
|
+
const q = h(() => F.value && f.value ? f.value.filter((o) => {
|
|
34
34
|
var e;
|
|
35
35
|
return (e = F.value) == null ? void 0 : e.includes(o.id);
|
|
36
36
|
}) : []);
|
|
37
|
-
|
|
38
|
-
[() =>
|
|
37
|
+
we(
|
|
38
|
+
[() => Ie.value],
|
|
39
39
|
() => {
|
|
40
40
|
S.refreshPinReport();
|
|
41
41
|
},
|
|
42
42
|
{ immediate: !0 }
|
|
43
43
|
);
|
|
44
|
-
const
|
|
44
|
+
const me = h(() => q.value.length > 0 ? f.value.filter(
|
|
45
45
|
(o) => q.value.findIndex((e) => e.id === o.id) === -1
|
|
46
|
-
) :
|
|
46
|
+
) : f.value), { FmButton: De, FmMenu: G, FmMenuItem: P, FmIcon: Q, FmChip: W, FmTooltip: $e, FmSwitch: fe } = Ze, b = $(/* @__PURE__ */ new Set()), X = $(/* @__PURE__ */ new Map()), Oe = /* @__PURE__ */ new Set([
|
|
47
47
|
"closeup",
|
|
48
48
|
"dailySales",
|
|
49
49
|
"hourlySales",
|
|
@@ -59,61 +59,61 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
59
59
|
"timesheet",
|
|
60
60
|
"void_",
|
|
61
61
|
"refund"
|
|
62
|
-
]),
|
|
62
|
+
]), ye = h(() => [
|
|
63
63
|
{ value: void 0, label: "All" },
|
|
64
64
|
...O.value.map((o) => ({
|
|
65
65
|
value: o.id,
|
|
66
66
|
label: o.name
|
|
67
67
|
}))
|
|
68
|
-
]),
|
|
69
|
-
function
|
|
70
|
-
return o.isDefault &&
|
|
68
|
+
]), L = $(ye.value[0]), Z = $("");
|
|
69
|
+
function ee(o) {
|
|
70
|
+
return o.isDefault && Oe.has(o.permissionKey ?? "");
|
|
71
71
|
}
|
|
72
|
-
const x =
|
|
72
|
+
const x = h(() => me.value.length === 0 || O.value.length === 0 ? [] : [
|
|
73
73
|
...q.value.map((e) => {
|
|
74
74
|
const r = O.value.find((n) => n.id === e.category);
|
|
75
75
|
return {
|
|
76
|
-
name:
|
|
76
|
+
name: re(a, K, e.name, "other"),
|
|
77
77
|
categoryId: (r == null ? void 0 : r.id) ?? "",
|
|
78
78
|
category: r != null && r.name ? a(`report.category.${r.name}`) : a("report.common.uncategorized"),
|
|
79
79
|
reportId: e.id,
|
|
80
80
|
editable: e.editable,
|
|
81
81
|
description: e.description || "",
|
|
82
82
|
pin: !0,
|
|
83
|
-
canUpdate:
|
|
84
|
-
canRead:
|
|
85
|
-
isSupportPos: !!e.isSupportPos,
|
|
86
|
-
isMandatoryPosReport:
|
|
83
|
+
canUpdate: H(e),
|
|
84
|
+
canRead: de(e),
|
|
85
|
+
isSupportPos: e.reportType === "canvas" ? !1 : !!e.isSupportPos,
|
|
86
|
+
isMandatoryPosReport: ee(e),
|
|
87
87
|
reportType: e.reportType
|
|
88
88
|
};
|
|
89
89
|
}),
|
|
90
|
-
...
|
|
90
|
+
...me.value.map((e) => {
|
|
91
91
|
const r = O.value.find((n) => n.id === e.category);
|
|
92
92
|
return {
|
|
93
|
-
name:
|
|
93
|
+
name: re(a, K, e.name, "other"),
|
|
94
94
|
categoryId: (r == null ? void 0 : r.id) ?? "",
|
|
95
95
|
category: r != null && r.name ? a(`report.category.${r.name}`) : a("report.common.uncategorized"),
|
|
96
96
|
reportId: e.id,
|
|
97
97
|
editable: e.editable,
|
|
98
98
|
description: e.description || "",
|
|
99
99
|
pin: !1,
|
|
100
|
-
canUpdate:
|
|
101
|
-
canRead:
|
|
102
|
-
isSupportPos: !!e.isSupportPos,
|
|
103
|
-
isMandatoryPosReport:
|
|
100
|
+
canUpdate: H(e),
|
|
101
|
+
canRead: de(e),
|
|
102
|
+
isSupportPos: e.reportType === "canvas" ? !1 : !!e.isSupportPos,
|
|
103
|
+
isMandatoryPosReport: ee(e),
|
|
104
104
|
reportType: e.reportType
|
|
105
105
|
};
|
|
106
106
|
})
|
|
107
|
-
].filter((e) =>
|
|
107
|
+
].filter((e) => L.value.value && e.categoryId !== L.value.value ? !1 : `${(e == null ? void 0 : e.name) || ""}${(e == null ? void 0 : e.description) || ""}`.toLowerCase().indexOf(Z.value.toLowerCase()) !== -1)), Fe = h(
|
|
108
108
|
() => x.value.map((o) => `${o.name}${o.category}`).toString()
|
|
109
|
-
),
|
|
109
|
+
), Te = h(() => [
|
|
110
110
|
{
|
|
111
111
|
accessorKey: "name",
|
|
112
112
|
header: a("report.common.name"),
|
|
113
113
|
enableSorting: !1,
|
|
114
114
|
cell: (o) => {
|
|
115
115
|
const e = o.row.original;
|
|
116
|
-
return
|
|
116
|
+
return d(
|
|
117
117
|
"span",
|
|
118
118
|
{ class: e.canRead ? "" : "opacity-40 cursor-not-allowed" },
|
|
119
119
|
o.getValue()
|
|
@@ -127,8 +127,8 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
127
127
|
meta: {
|
|
128
128
|
width: "100px"
|
|
129
129
|
},
|
|
130
|
-
cell: (o) =>
|
|
131
|
-
|
|
130
|
+
cell: (o) => d(
|
|
131
|
+
W,
|
|
132
132
|
{
|
|
133
133
|
// grey out chip text when user cannot read report
|
|
134
134
|
class: `${o.getValue() !== a("report.common.uncategorized") ? "bg-fm-color-system-info-100 text-fm-color-typo-info" : "text-fm-color-typo-secondary"} ${o.row.original.canRead ? "" : "opacity-40 cursor-not-allowed"} fm-typo-en-body-sm-600`,
|
|
@@ -143,7 +143,7 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
143
143
|
enableSorting: !1,
|
|
144
144
|
cell: (o) => {
|
|
145
145
|
const e = o.row.original;
|
|
146
|
-
return
|
|
146
|
+
return d(
|
|
147
147
|
"span",
|
|
148
148
|
{ class: e.canRead ? "" : "opacity-40 cursor-not-allowed" },
|
|
149
149
|
o.getValue()
|
|
@@ -158,8 +158,8 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
158
158
|
width: "130px"
|
|
159
159
|
},
|
|
160
160
|
cell: (o) => {
|
|
161
|
-
var
|
|
162
|
-
const e = o.row.original, r = e.reportId, n =
|
|
161
|
+
var J;
|
|
162
|
+
const e = o.row.original, r = e.reportId, n = f.value.find((u) => u.id === r), ae = r === ((J = E.value) == null ? void 0 : J.id), A = !e.canRead, D = n ? ue(n) : !1, z = n ? Y(n) : !1, s = e.reportType === "canvas", C = !e.canUpdate || e.isMandatoryPosReport || s || b.value.has(r), i = s ? a("reportV5.reportList.canvasPosReportHint") : e.isMandatoryPosReport ? a("reportV5.reportList.mandatoryPosReportHint") : a("reportV5.reportList.posV8Hint"), y = [
|
|
163
163
|
{
|
|
164
164
|
label: a("report.common.duplicate"),
|
|
165
165
|
onClick: () => {
|
|
@@ -172,9 +172,9 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
172
172
|
disabled: !D
|
|
173
173
|
},
|
|
174
174
|
{
|
|
175
|
-
label: a(
|
|
175
|
+
label: a(ae ? "report.common.unsetAsOverview" : "report.common.setAsOverview"),
|
|
176
176
|
onClick: async () => {
|
|
177
|
-
n &&
|
|
177
|
+
n && ve(n);
|
|
178
178
|
},
|
|
179
179
|
variant: "",
|
|
180
180
|
disabled: !1
|
|
@@ -182,7 +182,7 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
182
182
|
{
|
|
183
183
|
label: a("report.common.remove"),
|
|
184
184
|
onClick: () => {
|
|
185
|
-
n && (z ?
|
|
185
|
+
n && (z ? be(n) : l.open({
|
|
186
186
|
message: a("report.messages.noPermissionDeleteReport"),
|
|
187
187
|
type: "error"
|
|
188
188
|
}));
|
|
@@ -191,59 +191,59 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
191
191
|
disabled: !e.editable || !z
|
|
192
192
|
}
|
|
193
193
|
];
|
|
194
|
-
return
|
|
194
|
+
return d(
|
|
195
195
|
"div",
|
|
196
196
|
{
|
|
197
|
-
class: `flex ${
|
|
197
|
+
class: `flex ${p.value.lg || p.value.md ? "justify-end" : ""} items-center`
|
|
198
198
|
},
|
|
199
199
|
{
|
|
200
200
|
default: () => [
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
{ content:
|
|
201
|
+
d(
|
|
202
|
+
$e,
|
|
203
|
+
{ content: i, placement: "bottom", zIndex: 2e3 },
|
|
204
204
|
{
|
|
205
|
-
default: () =>
|
|
205
|
+
default: () => d(
|
|
206
206
|
"div",
|
|
207
207
|
{
|
|
208
208
|
class: "pos-v8-control mr-2 flex items-center",
|
|
209
209
|
"data-testid": "desktop-pos-v8-toggle",
|
|
210
|
-
onClick: (
|
|
211
|
-
e.isMandatoryPosReport && (
|
|
210
|
+
onClick: (u) => {
|
|
211
|
+
e.isMandatoryPosReport && (u.stopPropagation(), n && V(n));
|
|
212
212
|
}
|
|
213
213
|
},
|
|
214
214
|
[
|
|
215
|
-
|
|
216
|
-
|
|
215
|
+
d("span", { class: "fm-typo-en-body-sm-400 whitespace-nowrap" }, "POS v8"),
|
|
216
|
+
d(fe, {
|
|
217
217
|
modelValue: e.isSupportPos,
|
|
218
|
-
disabled:
|
|
218
|
+
disabled: C,
|
|
219
219
|
"aria-label": a("report.common.showInPOS"),
|
|
220
220
|
class: "pos-v8-switch",
|
|
221
221
|
"onUpdate:modelValue": () => {
|
|
222
222
|
n && V(n);
|
|
223
223
|
},
|
|
224
|
-
onClick: (
|
|
225
|
-
|
|
224
|
+
onClick: (u) => {
|
|
225
|
+
u.stopPropagation(), e.isMandatoryPosReport && n && V(n);
|
|
226
226
|
}
|
|
227
227
|
})
|
|
228
228
|
]
|
|
229
229
|
)
|
|
230
230
|
}
|
|
231
231
|
),
|
|
232
|
-
|
|
232
|
+
d(
|
|
233
233
|
"button",
|
|
234
234
|
{
|
|
235
235
|
disabled: A,
|
|
236
236
|
title: A ? a("report.messages.noPermission") : void 0,
|
|
237
237
|
"aria-label": e.pin ? "Unpin" : "Pin",
|
|
238
|
-
onClick:
|
|
239
|
-
n &&
|
|
238
|
+
onClick: ze(() => {
|
|
239
|
+
n && Se(n);
|
|
240
240
|
}, ["stop"]),
|
|
241
241
|
class: "text-fm-color-neutral-gray-400 hover:bg-fm-color-opacity-sm rounded-lg flex items-center justify-center"
|
|
242
242
|
},
|
|
243
243
|
{
|
|
244
244
|
default: () => [
|
|
245
|
-
|
|
246
|
-
|
|
245
|
+
d(
|
|
246
|
+
Q,
|
|
247
247
|
{
|
|
248
248
|
name: "keep",
|
|
249
249
|
class: "px-12 p-8",
|
|
@@ -255,35 +255,35 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
255
255
|
]
|
|
256
256
|
}
|
|
257
257
|
),
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
d(
|
|
259
|
+
G,
|
|
260
260
|
{
|
|
261
261
|
stopClickPropagation: !0,
|
|
262
262
|
shift: !0,
|
|
263
263
|
disabled: !1
|
|
264
264
|
},
|
|
265
265
|
{
|
|
266
|
-
default: () =>
|
|
267
|
-
(
|
|
266
|
+
default: () => y.map(
|
|
267
|
+
(u) => d(
|
|
268
268
|
P,
|
|
269
269
|
{
|
|
270
|
-
onClick:
|
|
271
|
-
label:
|
|
272
|
-
class:
|
|
273
|
-
disabled:
|
|
270
|
+
onClick: u.disabled ? {} : u.onClick,
|
|
271
|
+
label: u.label,
|
|
272
|
+
class: u.disabled ? "text-fm-color-typo-disabled" : u.variant === "destructive" ? "text-fm-color-typo-error" : "",
|
|
273
|
+
disabled: u.disabled
|
|
274
274
|
},
|
|
275
275
|
{
|
|
276
|
-
label: () =>
|
|
276
|
+
label: () => d("p", u.label)
|
|
277
277
|
}
|
|
278
278
|
)
|
|
279
279
|
),
|
|
280
|
-
"menu-button": () =>
|
|
281
|
-
|
|
280
|
+
"menu-button": () => d(
|
|
281
|
+
De,
|
|
282
282
|
{
|
|
283
283
|
variant: "tertiary",
|
|
284
284
|
size: "md",
|
|
285
285
|
icon: "more_vert",
|
|
286
|
-
iconColor:
|
|
286
|
+
iconColor: et.NeutralGray400,
|
|
287
287
|
disabled: !1
|
|
288
288
|
},
|
|
289
289
|
{}
|
|
@@ -296,11 +296,11 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
]);
|
|
299
|
-
async function
|
|
300
|
-
await
|
|
299
|
+
async function ve(o) {
|
|
300
|
+
await j(async () => {
|
|
301
301
|
var e;
|
|
302
302
|
try {
|
|
303
|
-
const r = o.id === ((e =
|
|
303
|
+
const r = o.id === ((e = E.value) == null ? void 0 : e.id);
|
|
304
304
|
await S.updateDefaultReport(r ? null : o.id), l.open({
|
|
305
305
|
message: `Successfully ${r ? "unset" : "set"} ${o.name} as Overview`,
|
|
306
306
|
type: "success"
|
|
@@ -311,44 +311,46 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
311
311
|
});
|
|
312
312
|
}
|
|
313
313
|
async function V(o) {
|
|
314
|
-
if (
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
});
|
|
319
|
-
return;
|
|
320
|
-
}
|
|
321
|
-
if (!j(o)) {
|
|
322
|
-
l.open({
|
|
323
|
-
message: a("report.messages.noPermissionUpdateReport"),
|
|
324
|
-
type: "error"
|
|
325
|
-
});
|
|
326
|
-
return;
|
|
327
|
-
}
|
|
328
|
-
if (!g.value.has(o.id)) {
|
|
329
|
-
g.value = new Set(g.value).add(o.id);
|
|
330
|
-
try {
|
|
331
|
-
const e = !o.isSupportPos;
|
|
332
|
-
await Ye(o.id, e), o.isSupportPos = e, W.value = new Map(W.value).set(
|
|
333
|
-
o.id,
|
|
334
|
-
e
|
|
335
|
-
);
|
|
336
|
-
} catch (e) {
|
|
337
|
-
console.log(e), l.open({
|
|
338
|
-
message: a("report.messages.failedToAction", { action: a("report.common.update") }),
|
|
314
|
+
if (o.reportType !== "canvas") {
|
|
315
|
+
if (ee(o)) {
|
|
316
|
+
l.open({
|
|
317
|
+
message: a("reportV5.reportList.cannotConfigureMandatoryReport"),
|
|
339
318
|
type: "error"
|
|
340
319
|
});
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
if (!H(o)) {
|
|
323
|
+
l.open({
|
|
324
|
+
message: a("report.messages.noPermissionUpdateReport"),
|
|
325
|
+
type: "error"
|
|
326
|
+
});
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
if (!b.value.has(o.id)) {
|
|
330
|
+
b.value = new Set(b.value).add(o.id);
|
|
331
|
+
try {
|
|
332
|
+
const e = !o.isSupportPos;
|
|
333
|
+
await Ye(o.id, e), o.isSupportPos = e, X.value = new Map(X.value).set(
|
|
334
|
+
o.id,
|
|
335
|
+
e
|
|
336
|
+
);
|
|
337
|
+
} catch (e) {
|
|
338
|
+
console.log(e), l.open({
|
|
339
|
+
message: a("report.messages.failedToAction", { action: a("report.common.update") }),
|
|
340
|
+
type: "error"
|
|
341
|
+
});
|
|
342
|
+
} finally {
|
|
343
|
+
const e = new Set(b.value);
|
|
344
|
+
e.delete(o.id), b.value = e;
|
|
345
|
+
}
|
|
344
346
|
}
|
|
345
347
|
}
|
|
346
348
|
}
|
|
347
349
|
function Le(o, e) {
|
|
348
|
-
return
|
|
350
|
+
return X.value.get(o) ?? e;
|
|
349
351
|
}
|
|
350
|
-
async function
|
|
351
|
-
if (await
|
|
352
|
+
async function Ve(o) {
|
|
353
|
+
if (await pe({
|
|
352
354
|
title: a("report.common.duplicate"),
|
|
353
355
|
message: a("report.messages.confirmAction", {
|
|
354
356
|
action: a("report.common.duplicate"),
|
|
@@ -356,7 +358,7 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
356
358
|
})
|
|
357
359
|
})) {
|
|
358
360
|
const r = JSON.parse(JSON.stringify(o));
|
|
359
|
-
r.editable = !0, r.id = "", r.name = `${r.name} ${a("report.common.duplicate")}`, r.isDefault = !1,
|
|
361
|
+
r.editable = !0, r.id = "", r.name = `${r.name} ${a("report.common.duplicate")}`, r.isDefault = !1, j(async () => {
|
|
360
362
|
try {
|
|
361
363
|
await S.createOrUpdateReport(r), l.open({
|
|
362
364
|
message: `${a("report.messages.duplicateSuccess", { name: r.name })}`,
|
|
@@ -368,15 +370,15 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
368
370
|
});
|
|
369
371
|
}
|
|
370
372
|
}
|
|
371
|
-
function ee(o) {
|
|
372
|
-
const e = y.value.find((r) => r.id === o.reportId);
|
|
373
|
-
return !e || !de(e);
|
|
374
|
-
}
|
|
375
373
|
function te(o) {
|
|
376
|
-
const e =
|
|
374
|
+
const e = f.value.find((r) => r.id === o.reportId);
|
|
375
|
+
return !e || !ue(e);
|
|
376
|
+
}
|
|
377
|
+
function oe(o) {
|
|
378
|
+
const e = f.value.find((r) => r.id === o.reportId);
|
|
377
379
|
return !o.editable || !e || !Y(e);
|
|
378
380
|
}
|
|
379
|
-
async function
|
|
381
|
+
async function be(o) {
|
|
380
382
|
if (!Y(o)) {
|
|
381
383
|
l.open({
|
|
382
384
|
message: a("report.messages.noPermissionDeleteReport"),
|
|
@@ -384,10 +386,10 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
384
386
|
});
|
|
385
387
|
return;
|
|
386
388
|
}
|
|
387
|
-
await
|
|
389
|
+
await pe({
|
|
388
390
|
title: a("report.messages.deleteReport"),
|
|
389
391
|
message: a("report.messages.confirmDelete", { name: o.name })
|
|
390
|
-
}) &&
|
|
392
|
+
}) && j(async () => {
|
|
391
393
|
try {
|
|
392
394
|
await S.removeReport(o), l.open({
|
|
393
395
|
message: a("report.messages.deleteSuccess", { name: o.name }),
|
|
@@ -400,17 +402,17 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
400
402
|
}
|
|
401
403
|
async function ge(o) {
|
|
402
404
|
if (ie.value)
|
|
403
|
-
await
|
|
405
|
+
await Ve(o);
|
|
404
406
|
else {
|
|
405
|
-
let e = `Your current plan only support up to ${
|
|
406
|
-
|
|
407
|
+
let e = `Your current plan only support up to ${T.value} custom reports.`;
|
|
408
|
+
T.value === 0 && (e = "Your current plan does not support custom report."), l.open({
|
|
407
409
|
message: e,
|
|
408
410
|
type: "error"
|
|
409
411
|
});
|
|
410
412
|
}
|
|
411
413
|
}
|
|
412
|
-
function
|
|
413
|
-
if (!
|
|
414
|
+
function Me() {
|
|
415
|
+
if (!_e.value) {
|
|
414
416
|
l.open({
|
|
415
417
|
message: a("report.messages.noPermission"),
|
|
416
418
|
type: "error"
|
|
@@ -418,17 +420,17 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
418
420
|
return;
|
|
419
421
|
}
|
|
420
422
|
if (ie.value)
|
|
421
|
-
|
|
423
|
+
ke.value = !0;
|
|
422
424
|
else {
|
|
423
|
-
let o = `Your current plan only support up to ${
|
|
424
|
-
|
|
425
|
+
let o = `Your current plan only support up to ${T.value} custom reports.`;
|
|
426
|
+
T.value === 0 && (o = "Your current plan does not support custom report."), l.open({
|
|
425
427
|
message: o,
|
|
426
428
|
type: "error"
|
|
427
429
|
});
|
|
428
430
|
}
|
|
429
431
|
}
|
|
430
|
-
function
|
|
431
|
-
const e =
|
|
432
|
+
function Se(o) {
|
|
433
|
+
const e = re(a, K, o.name, "other") ?? "";
|
|
432
434
|
F.value && F.value.includes(o.id) ? (l.open({
|
|
433
435
|
message: `${a("report.common.unpin")} ${e} ${a("report.common.successful")}`,
|
|
434
436
|
type: "success"
|
|
@@ -438,14 +440,14 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
438
440
|
}), S.cachePinReport(o));
|
|
439
441
|
}
|
|
440
442
|
function Ne(o) {
|
|
441
|
-
|
|
443
|
+
L.value = o;
|
|
442
444
|
}
|
|
443
|
-
const { selectedLocationIds: _, dateRange:
|
|
445
|
+
const { selectedLocationIds: _, dateRange: M, compareDateRange: N, timeRange: w, locations: Ue } = xe(), U = h(() => _.length === Ue.length);
|
|
444
446
|
return (o, e) => {
|
|
445
|
-
const r = I("FmPageHead"), n = I("FmSearch"),
|
|
446
|
-
return
|
|
447
|
-
default:
|
|
448
|
-
|
|
447
|
+
const r = I("FmPageHead"), n = I("FmSearch"), ae = I("FmForm"), A = I("FmListItem"), D = I("FmList"), z = I("FmTable");
|
|
448
|
+
return B(), se(qe, null, {
|
|
449
|
+
default: m(() => [
|
|
450
|
+
c(r, {
|
|
449
451
|
title: t(a)("report.common.report", 1),
|
|
450
452
|
class: "h-[68px]",
|
|
451
453
|
actions: [
|
|
@@ -456,28 +458,28 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
456
458
|
prependIcon: "add"
|
|
457
459
|
}
|
|
458
460
|
],
|
|
459
|
-
"onClick:action": e[0] || (e[0] = (s) =>
|
|
461
|
+
"onClick:action": e[0] || (e[0] = (s) => Me())
|
|
460
462
|
}, null, 8, ["title", "actions"]),
|
|
461
463
|
v("div", {
|
|
462
|
-
class:
|
|
463
|
-
style:
|
|
464
|
+
class: g(`overflow-y-hidden flex flex-col gap-8 ${t(p).sm || t(p).xs ? "mb-20" : ""}`),
|
|
465
|
+
style: Je({ height: `calc(100% - ${t(p).lg || t(p).md ? 72 : 64}px)` })
|
|
464
466
|
}, [
|
|
465
|
-
|
|
466
|
-
class:
|
|
467
|
+
c(ae, {
|
|
468
|
+
class: g(`flex items-center gap-2 ${t(p).sm || t(p).xs ? "px-3" : "px-24"}`)
|
|
467
469
|
}, {
|
|
468
|
-
default:
|
|
469
|
-
|
|
470
|
-
"menu-button":
|
|
471
|
-
|
|
472
|
-
default:
|
|
473
|
-
v("p", null, k(t(a)(`report.category.${
|
|
474
|
-
|
|
470
|
+
default: m(() => [
|
|
471
|
+
c(t(G), null, {
|
|
472
|
+
"menu-button": m(() => [
|
|
473
|
+
c(t(W), { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400" }, {
|
|
474
|
+
default: m(() => [
|
|
475
|
+
v("p", null, k(t(a)(`report.category.${L.value.label}`)), 1),
|
|
476
|
+
c(t(Q), { name: "expand_more" })
|
|
475
477
|
]),
|
|
476
478
|
_: 1
|
|
477
479
|
})
|
|
478
480
|
]),
|
|
479
|
-
default:
|
|
480
|
-
(
|
|
481
|
+
default: m(() => [
|
|
482
|
+
(B(!0), Be(Ke, null, Ee(ye.value, (s, C) => (B(), se(t(P), {
|
|
481
483
|
key: C,
|
|
482
484
|
label: t(a)(`report.category.${s.label}`),
|
|
483
485
|
onClick: () => Ne(s)
|
|
@@ -486,28 +488,28 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
486
488
|
_: 1
|
|
487
489
|
}),
|
|
488
490
|
v("div", {
|
|
489
|
-
class:
|
|
491
|
+
class: g(`flex ${t(p).sm || t(p).xs ? "justify-center items-center" : ""}`)
|
|
490
492
|
}, [
|
|
491
|
-
v("p",
|
|
493
|
+
v("p", ct, k(t(a)("report.common.results", { count: x.value.length })), 1)
|
|
492
494
|
], 2),
|
|
493
495
|
e[3] || (e[3] = v("div", { class: "grow" }, null, -1)),
|
|
494
496
|
v("div", it, [
|
|
495
|
-
|
|
496
|
-
modelValue:
|
|
497
|
-
"onUpdate:modelValue": e[1] || (e[1] = (s) =>
|
|
498
|
-
class:
|
|
497
|
+
c(n, {
|
|
498
|
+
modelValue: Z.value,
|
|
499
|
+
"onUpdate:modelValue": e[1] || (e[1] = (s) => Z.value = s),
|
|
500
|
+
class: g(`${t(p).lg || t(p).md ? "grow" : ""}`)
|
|
499
501
|
}, null, 8, ["modelValue", "class"])
|
|
500
502
|
])
|
|
501
503
|
]),
|
|
502
504
|
_: 1
|
|
503
505
|
}, 8, ["class"]),
|
|
504
|
-
|
|
505
|
-
key:
|
|
506
|
+
Re((B(), se(z, {
|
|
507
|
+
key: Fe.value,
|
|
506
508
|
ref_key: "table",
|
|
507
|
-
ref:
|
|
508
|
-
class:
|
|
509
|
+
ref: R,
|
|
510
|
+
class: g([t(p).sm || t(p).xs ? "px-0" : "px-24", "report-table"]),
|
|
509
511
|
style: { height: "calc(100% - 40px)" },
|
|
510
|
-
"column-defs":
|
|
512
|
+
"column-defs": Te.value,
|
|
511
513
|
"row-data": x.value,
|
|
512
514
|
"page-size": x.value.length,
|
|
513
515
|
"hide-footer": !0,
|
|
@@ -520,25 +522,25 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
520
522
|
});
|
|
521
523
|
return;
|
|
522
524
|
}
|
|
523
|
-
t(
|
|
525
|
+
t(Ce).suppressReportRouteSync = !0, t(S).updateCurrentReportId(s.original.reportId), t(ne).push({
|
|
524
526
|
name: "reportView",
|
|
525
527
|
query: {
|
|
526
|
-
...t(
|
|
528
|
+
...t(le).query,
|
|
527
529
|
reportId: s.original.reportId,
|
|
528
|
-
startDate: t(
|
|
529
|
-
endDate: t(
|
|
530
|
-
compareStartDate: t(
|
|
531
|
-
compareEndDate: t(
|
|
530
|
+
startDate: t(M).startDate,
|
|
531
|
+
endDate: t(M).endDate,
|
|
532
|
+
compareStartDate: t(N).startDate,
|
|
533
|
+
compareEndDate: t(N).endDate,
|
|
532
534
|
timeStart: t(w).start ? JSON.stringify(t(w).start) : null,
|
|
533
535
|
timeEnd: t(w).end ? JSON.stringify(t(w).end) : null,
|
|
534
|
-
isAllLocation:
|
|
535
|
-
locationIds:
|
|
536
|
+
isAllLocation: U.value.toString(),
|
|
537
|
+
locationIds: U.value ? void 0 : t(_) ? JSON.stringify(t(_)) : void 0
|
|
536
538
|
}
|
|
537
539
|
});
|
|
538
540
|
})
|
|
539
541
|
}, {
|
|
540
|
-
"list-row":
|
|
541
|
-
|
|
542
|
+
"list-row": m(({ original: s }) => [
|
|
543
|
+
c(D, {
|
|
542
544
|
onClick: () => {
|
|
543
545
|
if (!s.canRead) {
|
|
544
546
|
t(l).open({
|
|
@@ -547,131 +549,131 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
547
549
|
});
|
|
548
550
|
return;
|
|
549
551
|
}
|
|
550
|
-
s.reportId && (t(S).updateCurrentReportId(s.reportId), t(
|
|
552
|
+
s.reportId && (t(S).updateCurrentReportId(s.reportId), t(ne).push({
|
|
551
553
|
name: "reportView",
|
|
552
554
|
query: {
|
|
553
|
-
...t(
|
|
555
|
+
...t(le).query,
|
|
554
556
|
reportId: s.reportId,
|
|
555
|
-
startDate: t(
|
|
556
|
-
endDate: t(
|
|
557
|
-
compareStartDate: t(
|
|
558
|
-
compareEndDate: t(
|
|
557
|
+
startDate: t(M).startDate,
|
|
558
|
+
endDate: t(M).endDate,
|
|
559
|
+
compareStartDate: t(N).startDate,
|
|
560
|
+
compareEndDate: t(N).endDate,
|
|
559
561
|
timeStart: t(w).start ? JSON.stringify(t(w).start) : null,
|
|
560
562
|
timeEnd: t(w).end ? JSON.stringify(t(w).end) : null,
|
|
561
|
-
isAllLocation:
|
|
562
|
-
locationIds:
|
|
563
|
+
isAllLocation: U.value.toString(),
|
|
564
|
+
locationIds: U.value ? void 0 : t(_) ? JSON.stringify(t(_)) : void 0
|
|
563
565
|
}
|
|
564
566
|
}));
|
|
565
567
|
}
|
|
566
568
|
}, {
|
|
567
|
-
default:
|
|
568
|
-
|
|
569
|
+
default: m(() => [
|
|
570
|
+
c(A, {
|
|
569
571
|
tag: "label",
|
|
570
572
|
clickable: ""
|
|
571
573
|
}, {
|
|
572
|
-
append:
|
|
573
|
-
|
|
574
|
-
class:
|
|
574
|
+
append: m(() => [
|
|
575
|
+
c(t(W), {
|
|
576
|
+
class: g(`${s.category !== "Uncategorized" ? "bg-fm-color-system-info-100 text-fm-color-typo-info" : "text-fm-color-typo-secondary"} ${s.canRead ? "" : "opacity-40 cursor-not-allowed"}`),
|
|
575
577
|
compact: !0
|
|
576
578
|
}, {
|
|
577
|
-
default:
|
|
578
|
-
v("p",
|
|
579
|
+
default: m(() => [
|
|
580
|
+
v("p", pt, k(s.category), 1)
|
|
579
581
|
]),
|
|
580
582
|
_: 2
|
|
581
583
|
}, 1032, ["class"]),
|
|
582
|
-
|
|
584
|
+
c(t(G), {
|
|
583
585
|
placement: "left",
|
|
584
586
|
"stop-click-propagation": !0
|
|
585
587
|
}, {
|
|
586
|
-
"menu-button":
|
|
587
|
-
|
|
588
|
+
"menu-button": m(() => [
|
|
589
|
+
c(t(Q), {
|
|
588
590
|
name: "more_vert",
|
|
589
591
|
class: "btn-color"
|
|
590
592
|
})
|
|
591
593
|
]),
|
|
592
|
-
default:
|
|
594
|
+
default: m(() => {
|
|
593
595
|
var C;
|
|
594
596
|
return [
|
|
595
|
-
|
|
597
|
+
c(t(P), {
|
|
596
598
|
label: s.pin ? "Unpin" : "Pin",
|
|
597
599
|
onClick: () => {
|
|
598
|
-
const
|
|
599
|
-
(
|
|
600
|
+
const i = t(f).find(
|
|
601
|
+
(y) => y.id === s.reportId
|
|
600
602
|
);
|
|
601
|
-
|
|
603
|
+
i && Se(i);
|
|
602
604
|
}
|
|
603
605
|
}, null, 8, ["label", "onClick"]),
|
|
604
606
|
v("div", {
|
|
605
607
|
role: "menuitem",
|
|
606
608
|
"data-testid": "mobile-pos-v8-toggle",
|
|
607
|
-
tabindex: !s.canUpdate || s.isMandatoryPosReport ||
|
|
608
|
-
"aria-disabled": !s.canUpdate || s.isMandatoryPosReport ||
|
|
609
|
-
class:
|
|
610
|
-
!s.canUpdate || s.isMandatoryPosReport ||
|
|
609
|
+
tabindex: !s.canUpdate || s.isMandatoryPosReport || s.reportType === "canvas" || b.value.has(s.reportId) ? void 0 : -1,
|
|
610
|
+
"aria-disabled": !s.canUpdate || s.isMandatoryPosReport || s.reportType === "canvas" || b.value.has(s.reportId),
|
|
611
|
+
class: g(
|
|
612
|
+
!s.canUpdate || s.isMandatoryPosReport || s.reportType === "canvas" || b.value.has(s.reportId) ? "flex max-h-[78px] w-full cursor-not-allowed items-center justify-between gap-2 rounded px-3 py-2 pl-12 text-fm-color-typo-disabled" : "flex max-h-[78px] w-full cursor-pointer items-center justify-between gap-2 rounded px-3 py-2 pl-12 hover:bg-fm-color-opacity-sm"
|
|
611
613
|
),
|
|
612
|
-
onClick: (
|
|
613
|
-
|
|
614
|
-
const
|
|
615
|
-
(
|
|
614
|
+
onClick: (i) => {
|
|
615
|
+
i.stopPropagation();
|
|
616
|
+
const y = t(f).find(
|
|
617
|
+
(J) => J.id === s.reportId
|
|
616
618
|
);
|
|
617
|
-
|
|
619
|
+
y && V(y);
|
|
618
620
|
}
|
|
619
621
|
}, [
|
|
620
|
-
v("span",
|
|
622
|
+
v("span", ut, k(t(a)("report.common.showInPOS")), 1),
|
|
621
623
|
v("span", null, [
|
|
622
|
-
|
|
623
|
-
"model-value": Le(
|
|
624
|
+
c(t(fe), {
|
|
625
|
+
"model-value": s.reportType === "canvas" ? !1 : Le(
|
|
624
626
|
s.reportId,
|
|
625
627
|
s.isSupportPos
|
|
626
628
|
),
|
|
627
|
-
disabled: !s.canUpdate || s.isMandatoryPosReport ||
|
|
629
|
+
disabled: !s.canUpdate || s.isMandatoryPosReport || s.reportType === "canvas" || b.value.has(s.reportId),
|
|
628
630
|
"aria-label": "Show in POS v8",
|
|
629
631
|
class: "pointer-events-none"
|
|
630
632
|
}, null, 8, ["model-value", "disabled"])
|
|
631
633
|
])
|
|
632
|
-
], 10,
|
|
633
|
-
|
|
634
|
+
], 10, dt),
|
|
635
|
+
c(t(P), {
|
|
634
636
|
label: t(a)("report.common.duplicate"),
|
|
635
|
-
disabled:
|
|
636
|
-
class:
|
|
637
|
-
|
|
637
|
+
disabled: te(s),
|
|
638
|
+
class: g(
|
|
639
|
+
te(s) ? "text-fm-color-typo-disabled" : ""
|
|
638
640
|
),
|
|
639
641
|
onClick: () => {
|
|
640
|
-
const
|
|
641
|
-
(
|
|
642
|
+
const i = t(f).find(
|
|
643
|
+
(y) => y.id === s.reportId
|
|
642
644
|
);
|
|
643
|
-
|
|
645
|
+
i && !te(s) ? ge(i) : t(l).open({
|
|
644
646
|
message: t(a)("report.messages.noPermissionDuplicateReport"),
|
|
645
647
|
type: "error"
|
|
646
648
|
});
|
|
647
649
|
}
|
|
648
650
|
}, null, 8, ["label", "disabled", "class", "onClick"]),
|
|
649
|
-
|
|
651
|
+
c(t(P), {
|
|
650
652
|
label: t(a)(
|
|
651
|
-
s.reportId === ((C = t(
|
|
653
|
+
s.reportId === ((C = t(E)) == null ? void 0 : C.id) ? "report.common.unsetAsOverview" : "report.common.setAsOverview"
|
|
652
654
|
),
|
|
653
655
|
onClick: () => {
|
|
654
|
-
const
|
|
655
|
-
(
|
|
656
|
+
const i = t(f).find(
|
|
657
|
+
(y) => y.id === s.reportId
|
|
656
658
|
);
|
|
657
|
-
|
|
659
|
+
i && ve(i);
|
|
658
660
|
}
|
|
659
661
|
}, null, 8, ["label", "onClick"]),
|
|
660
|
-
|
|
662
|
+
c(t(P), {
|
|
661
663
|
label: t(a)("report.common.delete"),
|
|
662
|
-
disabled:
|
|
663
|
-
class:
|
|
664
|
-
|
|
664
|
+
disabled: oe(s),
|
|
665
|
+
class: g(
|
|
666
|
+
oe(s) ? "text-fm-color-typo-disabled" : "text-fm-color-typo-error"
|
|
665
667
|
),
|
|
666
668
|
onClick: () => {
|
|
667
|
-
const
|
|
668
|
-
(
|
|
669
|
+
const i = t(f).find(
|
|
670
|
+
(y) => y.id === s.reportId
|
|
669
671
|
);
|
|
670
|
-
|
|
672
|
+
i && !oe(s) && be(i);
|
|
671
673
|
}
|
|
672
674
|
}, {
|
|
673
|
-
label:
|
|
674
|
-
|
|
675
|
+
label: m(() => [
|
|
676
|
+
je(k(t(a)("report.common.delete")), 1)
|
|
675
677
|
]),
|
|
676
678
|
_: 2
|
|
677
679
|
}, 1032, ["label", "disabled", "class", "onClick"])
|
|
@@ -680,9 +682,9 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
680
682
|
_: 2
|
|
681
683
|
}, 1024)
|
|
682
684
|
]),
|
|
683
|
-
default:
|
|
685
|
+
default: m(() => [
|
|
684
686
|
v("span", {
|
|
685
|
-
class:
|
|
687
|
+
class: g(["fm-typo-en-body-lg-400 line-clamp-1 break-all text-fm-color-typo-primary", s.canRead ? "" : "opacity-40 cursor-not-allowed"])
|
|
686
688
|
}, k(s.name), 3)
|
|
687
689
|
]),
|
|
688
690
|
_: 2
|
|
@@ -695,7 +697,7 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
695
697
|
}, 8, ["class", "column-defs", "row-data", "page-size"])), [
|
|
696
698
|
[he, x.value.length > 0]
|
|
697
699
|
]),
|
|
698
|
-
|
|
700
|
+
Re(c(tt, null, null, 512), [
|
|
699
701
|
[he, x.value.length === 0]
|
|
700
702
|
])
|
|
701
703
|
], 6)
|
|
@@ -706,5 +708,5 @@ const lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, it
|
|
|
706
708
|
}
|
|
707
709
|
});
|
|
708
710
|
export {
|
|
709
|
-
|
|
711
|
+
It as default
|
|
710
712
|
};
|