@feedmepos/mf-hrm-portal 1.1.3-dev.1 → 1.1.3-dev.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/AuditLogList-kZBi77lv.js +435 -0
- package/dist/{EmployeeList-BWDsSFoY.js → EmployeeList-Cg-mhdLv.js} +5 -5
- package/dist/{Main-VjhiuuHr.js → Main-BHF7vXlD.js} +28 -27
- package/dist/{Main-D5YEKOpl.js → Main-CC9_bKTG.js} +7 -7
- package/dist/PermissionSetList-C0FOYrQ6.js +283 -0
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CS4B-7AU.js +3084 -0
- package/dist/{RoleList-CfPD_Gk_.js → RoleList-D2NTVZa_.js} +5 -5
- package/dist/{TeamMemberList-DEYo6_pS.js → TeamMemberList-DC0Gxjin.js} +325 -322
- package/dist/{TimesheetList-BTTBjTrO.js → TimesheetList-CksRCsTc.js} +6 -6
- package/dist/api/index.d.ts +4 -0
- package/dist/api/team/index.d.ts +2 -2
- package/dist/{app-CfIHEA52.js → app-kKq54h9D.js} +606 -504
- package/dist/app.js +3 -3
- package/dist/{dayjs.min-C8cBXLt-.js → dayjs.min-CGTR0SS0.js} +1 -1
- package/dist/{employee-ChJpkvUF.js → employee-CRKx3zN0.js} +3 -3
- package/dist/helpers/permission-set.d.ts +15 -0
- package/dist/{index-CgbDOn3W.js → index-DRoNwfyW.js} +2153 -2053
- package/dist/index-TP4vQCyq.js +827 -0
- package/dist/{lodash-0EOIqOEG.js → lodash-CeWi5dyp.js} +1 -1
- package/dist/stores/team.d.ts +4 -1
- package/dist/team-CuLNHjGN.js +29 -0
- package/dist/{timesheet-DTI6G4DD.js → timesheet-V636ISlI.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-DCpMNDxE.js → useAppStore-DoX0IUFz.js} +1 -1
- package/dist/{useLoading-ChLCiMQj.js → useLoading-1yy1KHsE.js} +1 -1
- package/dist/views/audit-log/locales/index.d.ts +40 -8
- package/dist/views/team/locales/index.d.ts +12 -8
- package/package.json +3 -2
- package/dist/AuditLogList-qGKeg-cd.js +0 -384
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-yghfcQRF.js +0 -3050
- package/dist/RolePermissionList-Cu1KTuuI.js +0 -285
- package/dist/team-C2muObo8.js +0 -26
- package/dist/types/permission.d.ts +0 -1
- /package/dist/views/team/{role/RolePermissionForm.vue.d.ts → permission-set/PermissionSetForm.vue.d.ts} +0 -0
- /package/dist/views/team/{role/RolePermissionList.vue.d.ts → permission-set/PermissionSetList.vue.d.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineStore as f, storeToRefs as v } from "pinia";
|
|
2
2
|
import { ref as b } from "vue";
|
|
3
3
|
import { useCoreStore as I, baseClientInstance as h } from "@feedmepos/mf-common";
|
|
4
|
-
import { g as l, b as d, s as w } from "./index-
|
|
4
|
+
import { g as l, b as d, s as w } from "./index-DRoNwfyW.js";
|
|
5
5
|
const p = {
|
|
6
6
|
async readRoles() {
|
|
7
7
|
return l(await d().get("/pos-roles"));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed as I, isRef as L, watch as M } from "vue";
|
|
2
2
|
import { SnackbarPosition as y } from "@feedmepos/ui-library";
|
|
3
|
-
import { a as w, v } from "./useAppStore-
|
|
3
|
+
import { a as w, v } from "./useAppStore-DoX0IUFz.js";
|
|
4
4
|
const E = (r) => {
|
|
5
5
|
async function d(u, e) {
|
|
6
6
|
var l, a;
|
|
@@ -8,10 +8,16 @@ export declare const i18nMessages: {
|
|
|
8
8
|
placeholder: string;
|
|
9
9
|
};
|
|
10
10
|
filter: {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
user_placeholder: string;
|
|
12
|
+
selected_user_prefix: string;
|
|
13
|
+
subject_placeholder: string;
|
|
14
|
+
selected_subject_prefix: string;
|
|
13
15
|
action_placeholder: string;
|
|
14
16
|
selected_action_prefix: string;
|
|
17
|
+
status_placeholder: string;
|
|
18
|
+
selected_status_prefix: string;
|
|
19
|
+
outcome_placeholder: string;
|
|
20
|
+
selected_outcome_prefix: string;
|
|
15
21
|
};
|
|
16
22
|
action: {
|
|
17
23
|
manage: string;
|
|
@@ -45,6 +51,7 @@ export declare const i18nMessages: {
|
|
|
45
51
|
header: string;
|
|
46
52
|
timestamp: string;
|
|
47
53
|
user: string;
|
|
54
|
+
email: string;
|
|
48
55
|
action: string;
|
|
49
56
|
subject: string;
|
|
50
57
|
field: string;
|
|
@@ -55,6 +62,7 @@ export declare const i18nMessages: {
|
|
|
55
62
|
reason: string;
|
|
56
63
|
resolvedFrom: string;
|
|
57
64
|
permissionSet: string;
|
|
65
|
+
permissionTrace: string;
|
|
58
66
|
decisivePermission: string;
|
|
59
67
|
decisiveRule: string;
|
|
60
68
|
requestMethod: string;
|
|
@@ -70,10 +78,16 @@ export declare const i18nMessages: {
|
|
|
70
78
|
placeholder: string;
|
|
71
79
|
};
|
|
72
80
|
filter: {
|
|
73
|
-
|
|
74
|
-
|
|
81
|
+
user_placeholder: string;
|
|
82
|
+
selected_user_prefix: string;
|
|
83
|
+
subject_placeholder: string;
|
|
84
|
+
selected_subject_prefix: string;
|
|
75
85
|
action_placeholder: string;
|
|
76
86
|
selected_action_prefix: string;
|
|
87
|
+
status_placeholder: string;
|
|
88
|
+
selected_status_prefix: string;
|
|
89
|
+
outcome_placeholder: string;
|
|
90
|
+
selected_outcome_prefix: string;
|
|
77
91
|
};
|
|
78
92
|
action: {
|
|
79
93
|
manage: string;
|
|
@@ -107,6 +121,7 @@ export declare const i18nMessages: {
|
|
|
107
121
|
header: string;
|
|
108
122
|
timestamp: string;
|
|
109
123
|
user: string;
|
|
124
|
+
email: string;
|
|
110
125
|
action: string;
|
|
111
126
|
subject: string;
|
|
112
127
|
field: string;
|
|
@@ -117,6 +132,7 @@ export declare const i18nMessages: {
|
|
|
117
132
|
reason: string;
|
|
118
133
|
resolvedFrom: string;
|
|
119
134
|
permissionSet: string;
|
|
135
|
+
permissionTrace: string;
|
|
120
136
|
decisivePermission: string;
|
|
121
137
|
decisiveRule: string;
|
|
122
138
|
request: string;
|
|
@@ -133,10 +149,16 @@ export declare const i18nMessages: {
|
|
|
133
149
|
placeholder: string;
|
|
134
150
|
};
|
|
135
151
|
filter: {
|
|
136
|
-
|
|
137
|
-
|
|
152
|
+
user_placeholder: string;
|
|
153
|
+
selected_user_prefix: string;
|
|
154
|
+
subject_placeholder: string;
|
|
155
|
+
selected_subject_prefix: string;
|
|
138
156
|
action_placeholder: string;
|
|
139
157
|
selected_action_prefix: string;
|
|
158
|
+
status_placeholder: string;
|
|
159
|
+
selected_status_prefix: string;
|
|
160
|
+
outcome_placeholder: string;
|
|
161
|
+
selected_outcome_prefix: string;
|
|
140
162
|
};
|
|
141
163
|
action: {
|
|
142
164
|
manage: string;
|
|
@@ -170,6 +192,7 @@ export declare const i18nMessages: {
|
|
|
170
192
|
header: string;
|
|
171
193
|
timestamp: string;
|
|
172
194
|
user: string;
|
|
195
|
+
email: string;
|
|
173
196
|
action: string;
|
|
174
197
|
subject: string;
|
|
175
198
|
field: string;
|
|
@@ -180,6 +203,7 @@ export declare const i18nMessages: {
|
|
|
180
203
|
reason: string;
|
|
181
204
|
resolvedFrom: string;
|
|
182
205
|
permissionSet: string;
|
|
206
|
+
permissionTrace: string;
|
|
183
207
|
decisivePermission: string;
|
|
184
208
|
decisiveRule: string;
|
|
185
209
|
request: string;
|
|
@@ -196,10 +220,16 @@ export declare const i18nMessages: {
|
|
|
196
220
|
placeholder: string;
|
|
197
221
|
};
|
|
198
222
|
filter: {
|
|
199
|
-
|
|
200
|
-
|
|
223
|
+
user_placeholder: string;
|
|
224
|
+
selected_user_prefix: string;
|
|
225
|
+
subject_placeholder: string;
|
|
226
|
+
selected_subject_prefix: string;
|
|
201
227
|
action_placeholder: string;
|
|
202
228
|
selected_action_prefix: string;
|
|
229
|
+
status_placeholder: string;
|
|
230
|
+
selected_status_prefix: string;
|
|
231
|
+
outcome_placeholder: string;
|
|
232
|
+
selected_outcome_prefix: string;
|
|
203
233
|
};
|
|
204
234
|
action: {
|
|
205
235
|
manage: string;
|
|
@@ -233,6 +263,7 @@ export declare const i18nMessages: {
|
|
|
233
263
|
header: string;
|
|
234
264
|
timestamp: string;
|
|
235
265
|
user: string;
|
|
266
|
+
email: string;
|
|
236
267
|
action: string;
|
|
237
268
|
subject: string;
|
|
238
269
|
field: string;
|
|
@@ -243,6 +274,7 @@ export declare const i18nMessages: {
|
|
|
243
274
|
reason: string;
|
|
244
275
|
resolvedFrom: string;
|
|
245
276
|
permissionSet: string;
|
|
277
|
+
permissionTrace: string;
|
|
246
278
|
decisivePermission: string;
|
|
247
279
|
decisiveRule: string;
|
|
248
280
|
request: string;
|
|
@@ -97,7 +97,7 @@ export declare const i18nMessages: {
|
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
|
-
|
|
100
|
+
permissionSet: {
|
|
101
101
|
title: string;
|
|
102
102
|
createButtonLabel: string;
|
|
103
103
|
search: {
|
|
@@ -120,9 +120,10 @@ export declare const i18nMessages: {
|
|
|
120
120
|
title: string;
|
|
121
121
|
confirmationMessage: string;
|
|
122
122
|
successMessage: string;
|
|
123
|
+
conflictError: string;
|
|
123
124
|
};
|
|
124
125
|
name: string;
|
|
125
|
-
|
|
126
|
+
namePlaceholder: string;
|
|
126
127
|
};
|
|
127
128
|
table: {
|
|
128
129
|
columns: {
|
|
@@ -227,7 +228,7 @@ export declare const i18nMessages: {
|
|
|
227
228
|
};
|
|
228
229
|
};
|
|
229
230
|
};
|
|
230
|
-
|
|
231
|
+
permissionSet: {
|
|
231
232
|
title: string;
|
|
232
233
|
createButtonLabel: string;
|
|
233
234
|
search: {
|
|
@@ -250,9 +251,10 @@ export declare const i18nMessages: {
|
|
|
250
251
|
title: string;
|
|
251
252
|
confirmationMessage: string;
|
|
252
253
|
successMessage: string;
|
|
254
|
+
conflictError: string;
|
|
253
255
|
};
|
|
254
256
|
name: string;
|
|
255
|
-
|
|
257
|
+
namePlaceholder: string;
|
|
256
258
|
};
|
|
257
259
|
table: {
|
|
258
260
|
columns: {
|
|
@@ -357,7 +359,7 @@ export declare const i18nMessages: {
|
|
|
357
359
|
};
|
|
358
360
|
};
|
|
359
361
|
};
|
|
360
|
-
|
|
362
|
+
permissionSet: {
|
|
361
363
|
title: string;
|
|
362
364
|
createButtonLabel: string;
|
|
363
365
|
search: {
|
|
@@ -380,9 +382,10 @@ export declare const i18nMessages: {
|
|
|
380
382
|
title: string;
|
|
381
383
|
confirmationMessage: string;
|
|
382
384
|
successMessage: string;
|
|
385
|
+
conflictError: string;
|
|
383
386
|
};
|
|
384
387
|
name: string;
|
|
385
|
-
|
|
388
|
+
namePlaceholder: string;
|
|
386
389
|
};
|
|
387
390
|
table: {
|
|
388
391
|
columns: {
|
|
@@ -494,7 +497,7 @@ export declare const i18nMessages: {
|
|
|
494
497
|
};
|
|
495
498
|
};
|
|
496
499
|
};
|
|
497
|
-
|
|
500
|
+
permissionSet: {
|
|
498
501
|
title: string;
|
|
499
502
|
createButtonLabel: string;
|
|
500
503
|
search: {
|
|
@@ -517,9 +520,10 @@ export declare const i18nMessages: {
|
|
|
517
520
|
title: string;
|
|
518
521
|
confirmationMessage: string;
|
|
519
522
|
successMessage: string;
|
|
523
|
+
conflictError: string;
|
|
520
524
|
};
|
|
521
525
|
name: string;
|
|
522
|
-
|
|
526
|
+
namePlaceholder: string;
|
|
523
527
|
};
|
|
524
528
|
table: {
|
|
525
529
|
columns: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-hrm-portal",
|
|
3
|
-
"version": "1.1.3-dev.
|
|
3
|
+
"version": "1.1.3-dev.2",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"@feedmepos/core": "^2.14.36",
|
|
19
19
|
"@feedmepos/mf-common": "^1.29.10",
|
|
20
20
|
"@feedmepos/ui-library": "^1.7.0",
|
|
21
|
+
"@feedmepos/feature-flag": "^0.0.15",
|
|
21
22
|
"axios": "^1.7.7",
|
|
22
23
|
"dayjs": "^1.11.10",
|
|
23
24
|
"libphonenumber-js": "^1.11.1",
|
|
@@ -28,7 +29,7 @@
|
|
|
28
29
|
"vue-router": "^4.3.2",
|
|
29
30
|
"vue3-lottie": "^3.3.0",
|
|
30
31
|
"xlsx": "^0.18.5",
|
|
31
|
-
"@feedmepos/hrm-permission": "^0.0.4-dev.
|
|
32
|
+
"@feedmepos/hrm-permission": "^0.0.4-dev.5"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"@casl/ability": "^3.4.0",
|
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
import { defineComponent as W, ref as p, computed as I, watch as D, resolveComponent as h, createElementBlock as m, openBlock as c, Fragment as X, createVNode as r, unref as l, withCtx as x, createElementVNode as e, createBlock as j, createCommentVNode as F, toDisplayString as a, normalizeClass as q } from "vue";
|
|
2
|
-
import { d as ee } from "./dayjs.min-C8cBXLt-.js";
|
|
3
|
-
import { useI18n as te, useCoreStore as oe } from "@feedmepos/mf-common";
|
|
4
|
-
import { _ as ae } from "./app-CfIHEA52.js";
|
|
5
|
-
import { _ as se } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
6
|
-
import { _ as le } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
7
|
-
import { components as A } from "@feedmepos/ui-library";
|
|
8
|
-
import { g as ne, b as ie, p as de } from "./index-CgbDOn3W.js";
|
|
9
|
-
import { u as ce } from "./team-C2muObo8.js";
|
|
10
|
-
import { S as M } from "./SelectFilter-NbXrJ4iH.js";
|
|
11
|
-
const re = "/audit-logs", ue = {
|
|
12
|
-
async read(i) {
|
|
13
|
-
return ne(
|
|
14
|
-
await ie().get(re, {
|
|
15
|
-
params: {
|
|
16
|
-
limit: (i == null ? void 0 : i.limit) ?? 100,
|
|
17
|
-
offset: (i == null ? void 0 : i.offset) ?? 0,
|
|
18
|
-
...i != null && i.from ? { from: i.from } : {},
|
|
19
|
-
...i != null && i.to ? { to: i.to } : {}
|
|
20
|
-
}
|
|
21
|
-
})
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
}, me = {
|
|
25
|
-
class: "flex flex-1 flex-col gap-16 min-h-0"
|
|
26
|
-
}, fe = {
|
|
27
|
-
class: "flex items-center gap-8"
|
|
28
|
-
}, pe = {
|
|
29
|
-
class: "flex h-full flex-col"
|
|
30
|
-
}, _e = {
|
|
31
|
-
key: 0,
|
|
32
|
-
class: "flex shrink-0 items-center justify-end border-t border-fm-color-border-default py-4"
|
|
33
|
-
}, ve = {
|
|
34
|
-
class: "text-sm text-fm-color-typo-secondary"
|
|
35
|
-
}, ge = {
|
|
36
|
-
key: 0,
|
|
37
|
-
class: "space-y-16 p-4 text-sm"
|
|
38
|
-
}, he = {
|
|
39
|
-
class: "space-y-8"
|
|
40
|
-
}, ye = {
|
|
41
|
-
class: "flex gap-8"
|
|
42
|
-
}, xe = {
|
|
43
|
-
class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
|
|
44
|
-
}, be = {
|
|
45
|
-
class: "flex gap-8"
|
|
46
|
-
}, Le = {
|
|
47
|
-
class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
|
|
48
|
-
}, ke = {
|
|
49
|
-
class: "flex flex-col gap-2"
|
|
50
|
-
}, we = {
|
|
51
|
-
key: 0,
|
|
52
|
-
class: "font-medium"
|
|
53
|
-
}, Se = {
|
|
54
|
-
class: "break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
55
|
-
}, Ie = {
|
|
56
|
-
class: "flex gap-8"
|
|
57
|
-
}, De = {
|
|
58
|
-
class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
|
|
59
|
-
}, Fe = {
|
|
60
|
-
class: "flex gap-8"
|
|
61
|
-
}, Pe = {
|
|
62
|
-
class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
|
|
63
|
-
}, Ce = {
|
|
64
|
-
key: 1
|
|
65
|
-
}, Oe = {
|
|
66
|
-
class: "flex gap-8"
|
|
67
|
-
}, Te = {
|
|
68
|
-
class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
|
|
69
|
-
}, je = {
|
|
70
|
-
class: "flex gap-8"
|
|
71
|
-
}, Ve = {
|
|
72
|
-
class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
|
|
73
|
-
}, Be = {
|
|
74
|
-
class: "flex gap-8"
|
|
75
|
-
}, Ne = {
|
|
76
|
-
class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
|
|
77
|
-
}, Re = {
|
|
78
|
-
class: "break-all font-mono text-xs"
|
|
79
|
-
}, qe = {
|
|
80
|
-
class: "flex gap-8"
|
|
81
|
-
}, Ae = {
|
|
82
|
-
class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
|
|
83
|
-
}, Me = {
|
|
84
|
-
class: "break-all font-mono text-xs"
|
|
85
|
-
}, Ee = {
|
|
86
|
-
class: "space-y-8"
|
|
87
|
-
}, Ue = {
|
|
88
|
-
class: "font-semibold text-fm-color-typo-primary"
|
|
89
|
-
}, $e = {
|
|
90
|
-
class: "space-y-8"
|
|
91
|
-
}, Ke = {
|
|
92
|
-
class: "flex gap-8"
|
|
93
|
-
}, ze = {
|
|
94
|
-
class: "w-28 shrink-0 font-medium text-fm-color-typo-secondary"
|
|
95
|
-
}, Ye = {
|
|
96
|
-
class: "flex gap-8"
|
|
97
|
-
}, Je = {
|
|
98
|
-
class: "w-28 shrink-0 font-medium text-fm-color-typo-secondary"
|
|
99
|
-
}, Ge = {
|
|
100
|
-
key: 0,
|
|
101
|
-
class: "flex gap-8"
|
|
102
|
-
}, Ze = {
|
|
103
|
-
class: "w-28 shrink-0 font-medium text-fm-color-typo-secondary"
|
|
104
|
-
}, He = {
|
|
105
|
-
class: "break-all font-mono text-xs"
|
|
106
|
-
}, Qe = {
|
|
107
|
-
class: "flex flex-col gap-4"
|
|
108
|
-
}, We = {
|
|
109
|
-
class: "font-medium text-fm-color-typo-secondary"
|
|
110
|
-
}, Xe = {
|
|
111
|
-
class: "max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner"
|
|
112
|
-
}, et = {
|
|
113
|
-
class: "w-28 font-medium text-fm-color-typo-secondary"
|
|
114
|
-
}, tt = {
|
|
115
|
-
key: 0,
|
|
116
|
-
class: "max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner"
|
|
117
|
-
}, ot = {
|
|
118
|
-
key: 1,
|
|
119
|
-
class: "text-fm-color-typo-secondary"
|
|
120
|
-
}, at = {
|
|
121
|
-
class: "flex gap-8"
|
|
122
|
-
}, st = {
|
|
123
|
-
class: "w-28 shrink-0 font-medium text-fm-color-typo-secondary"
|
|
124
|
-
}, lt = {
|
|
125
|
-
class: "font-mono text-xs"
|
|
126
|
-
}, nt = {
|
|
127
|
-
class: "flex gap-8"
|
|
128
|
-
}, it = {
|
|
129
|
-
class: "w-28 shrink-0 font-medium text-fm-color-typo-secondary"
|
|
130
|
-
}, dt = {
|
|
131
|
-
class: "break-all font-mono text-xs"
|
|
132
|
-
}, ct = {
|
|
133
|
-
class: "w-28 font-medium text-fm-color-typo-secondary"
|
|
134
|
-
}, rt = {
|
|
135
|
-
key: 0,
|
|
136
|
-
class: "max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner"
|
|
137
|
-
}, ut = {
|
|
138
|
-
key: 1,
|
|
139
|
-
class: "text-fm-color-typo-secondary"
|
|
140
|
-
}, V = 100, Lt = /* @__PURE__ */ W({
|
|
141
|
-
__name: "AuditLogList",
|
|
142
|
-
setup(i) {
|
|
143
|
-
const {
|
|
144
|
-
t
|
|
145
|
-
} = te(), E = oe(), b = ce(), L = p(!1), B = p([]), s = p(null), P = p(!1), u = p(1), k = p(!1), N = ee().format("YYYY-MM-DD"), y = p({
|
|
146
|
-
startDate: N,
|
|
147
|
-
endDate: N
|
|
148
|
-
}), _ = p(), v = p(), U = I(() => [{
|
|
149
|
-
label: t("auditLog.action.manage"),
|
|
150
|
-
value: "manage"
|
|
151
|
-
}, {
|
|
152
|
-
label: t("auditLog.action.create"),
|
|
153
|
-
value: "create"
|
|
154
|
-
}, {
|
|
155
|
-
label: t("auditLog.action.read"),
|
|
156
|
-
value: "read"
|
|
157
|
-
}, {
|
|
158
|
-
label: t("auditLog.action.update"),
|
|
159
|
-
value: "update"
|
|
160
|
-
}, {
|
|
161
|
-
label: t("auditLog.action.delete"),
|
|
162
|
-
value: "delete"
|
|
163
|
-
}]), $ = I(() => [{
|
|
164
|
-
label: t("auditLog.outcome.allowed"),
|
|
165
|
-
value: "allowed"
|
|
166
|
-
}, {
|
|
167
|
-
label: t("auditLog.outcome.denied"),
|
|
168
|
-
value: "denied"
|
|
169
|
-
}, {
|
|
170
|
-
label: t("auditLog.outcome.skipped"),
|
|
171
|
-
value: "skipped"
|
|
172
|
-
}]), K = I(() => {
|
|
173
|
-
const {
|
|
174
|
-
startDate: n,
|
|
175
|
-
endDate: o
|
|
176
|
-
} = y.value;
|
|
177
|
-
return n && o ? `${n} – ${o}` : n || o || t("auditLog.dateRange.placeholder");
|
|
178
|
-
}), C = I(() => {
|
|
179
|
-
let n = B.value;
|
|
180
|
-
return _.value && _.value.length > 0 && (n = n.filter((o) => _.value.includes(o.outcome))), v.value && v.value.length > 0 && (n = n.filter((o) => v.value.includes(o.action))), n;
|
|
181
|
-
});
|
|
182
|
-
function O(n) {
|
|
183
|
-
var o;
|
|
184
|
-
return (o = de.find((d) => d.subject === n)) == null ? void 0 : o.label;
|
|
185
|
-
}
|
|
186
|
-
const R = {
|
|
187
|
-
allowed: "success",
|
|
188
|
-
denied: "critical",
|
|
189
|
-
skipped: "warning"
|
|
190
|
-
}, z = [{
|
|
191
|
-
accessorKey: "timestamp",
|
|
192
|
-
header: () => t("auditLog.columns.timestamp"),
|
|
193
|
-
cell(n) {
|
|
194
|
-
const o = n.row.original;
|
|
195
|
-
return new Date(o.timestamp).toLocaleString();
|
|
196
|
-
}
|
|
197
|
-
}, {
|
|
198
|
-
accessorKey: "userId",
|
|
199
|
-
header: () => t("auditLog.columns.user"),
|
|
200
|
-
enableSorting: !1,
|
|
201
|
-
cell(n) {
|
|
202
|
-
const o = n.row.original, d = b.userIdToName[o.userId];
|
|
203
|
-
return d ? `${d} (${o.userId})` : o.userId;
|
|
204
|
-
}
|
|
205
|
-
}, {
|
|
206
|
-
accessorKey: "subject",
|
|
207
|
-
header: () => t("auditLog.columns.subject"),
|
|
208
|
-
cell(n) {
|
|
209
|
-
const o = n.row.original, d = O(o.subject);
|
|
210
|
-
return d ? r(A.FmTooltip, {
|
|
211
|
-
content: o.subject
|
|
212
|
-
}, {
|
|
213
|
-
default: () => [r("span", null, [d])]
|
|
214
|
-
}) : o.subject;
|
|
215
|
-
}
|
|
216
|
-
}, {
|
|
217
|
-
accessorKey: "action",
|
|
218
|
-
header: () => t("auditLog.columns.action"),
|
|
219
|
-
enableSorting: !1
|
|
220
|
-
}, {
|
|
221
|
-
accessorKey: "outcome",
|
|
222
|
-
header: () => t("auditLog.columns.outcome"),
|
|
223
|
-
enableSorting: !1,
|
|
224
|
-
cell(n) {
|
|
225
|
-
const o = n.row.original;
|
|
226
|
-
return r(A.FmChip, {
|
|
227
|
-
variant: R[o.outcome] ?? "neutral",
|
|
228
|
-
label: o.outcome,
|
|
229
|
-
compact: !0
|
|
230
|
-
}, null);
|
|
231
|
-
}
|
|
232
|
-
}];
|
|
233
|
-
async function w() {
|
|
234
|
-
L.value = !0;
|
|
235
|
-
try {
|
|
236
|
-
const {
|
|
237
|
-
startDate: n,
|
|
238
|
-
endDate: o
|
|
239
|
-
} = y.value;
|
|
240
|
-
let d;
|
|
241
|
-
if (o) {
|
|
242
|
-
const g = new Date(o);
|
|
243
|
-
g.setDate(g.getDate() + 1), d = g.toISOString().slice(0, 10);
|
|
244
|
-
}
|
|
245
|
-
const T = (u.value - 1) * V, [S] = await Promise.all([ue.read({
|
|
246
|
-
limit: V,
|
|
247
|
-
offset: T,
|
|
248
|
-
...n ? {
|
|
249
|
-
from: n
|
|
250
|
-
} : {},
|
|
251
|
-
...d ? {
|
|
252
|
-
to: d
|
|
253
|
-
} : {}
|
|
254
|
-
}), b.readTeamMembers()]);
|
|
255
|
-
B.value = S, k.value = S.length === V;
|
|
256
|
-
} finally {
|
|
257
|
-
L.value = !1;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
D(y, () => {
|
|
261
|
-
u.value = 1, w();
|
|
262
|
-
}), D(_, () => {
|
|
263
|
-
u.value = 1;
|
|
264
|
-
}), D(v, () => {
|
|
265
|
-
u.value = 1;
|
|
266
|
-
});
|
|
267
|
-
async function Y() {
|
|
268
|
-
u.value > 1 && (u.value--, await w());
|
|
269
|
-
}
|
|
270
|
-
async function J() {
|
|
271
|
-
k.value && (u.value++, await w());
|
|
272
|
-
}
|
|
273
|
-
function G(n) {
|
|
274
|
-
s.value = n, P.value = !0;
|
|
275
|
-
}
|
|
276
|
-
function Z() {
|
|
277
|
-
P.value = !1, s.value = null;
|
|
278
|
-
}
|
|
279
|
-
return D(E.currentBusiness, (n) => {
|
|
280
|
-
n && (u.value = 1, w());
|
|
281
|
-
}, {
|
|
282
|
-
immediate: !0
|
|
283
|
-
}), (n, o) => {
|
|
284
|
-
const d = h("FmChip"), T = h("FmDateRangePicker"), S = h("FmTable"), g = h("FmButton"), H = h("FmTooltip"), Q = h("FmSideSheet");
|
|
285
|
-
return c(), m(X, null, [r(se, {
|
|
286
|
-
heading: l(t)("auditLog.title")
|
|
287
|
-
}, {
|
|
288
|
-
default: x(() => [e("div", me, [e("div", fe, [r(T, {
|
|
289
|
-
modelValue: y.value,
|
|
290
|
-
"onUpdate:modelValue": o[0] || (o[0] = (f) => y.value = f),
|
|
291
|
-
"show-predefined-range": ""
|
|
292
|
-
}, {
|
|
293
|
-
"trigger-button": x(() => [r(d, {
|
|
294
|
-
label: K.value,
|
|
295
|
-
icon: "calendar_month"
|
|
296
|
-
}, null, 8, ["label"])]),
|
|
297
|
-
_: 1
|
|
298
|
-
}, 8, ["modelValue"]), e("div", null, [r(M, {
|
|
299
|
-
modelValue: _.value,
|
|
300
|
-
"onUpdate:modelValue": o[1] || (o[1] = (f) => _.value = f),
|
|
301
|
-
items: $.value,
|
|
302
|
-
multiple: "",
|
|
303
|
-
variant: "dark",
|
|
304
|
-
placeholder: l(t)("auditLog.filter.outcome_placeholder"),
|
|
305
|
-
"selected-prefix": l(t)("auditLog.filter.selected_outcome_prefix"),
|
|
306
|
-
searchable: !1
|
|
307
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", null, [r(M, {
|
|
308
|
-
modelValue: v.value,
|
|
309
|
-
"onUpdate:modelValue": o[2] || (o[2] = (f) => v.value = f),
|
|
310
|
-
items: U.value,
|
|
311
|
-
multiple: "",
|
|
312
|
-
variant: "dark",
|
|
313
|
-
placeholder: l(t)("auditLog.filter.action_placeholder"),
|
|
314
|
-
"selected-prefix": l(t)("auditLog.filter.selected_action_prefix"),
|
|
315
|
-
searchable: !1
|
|
316
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])]), !L.value && C.value.length === 0 ? (c(), j(l(le), {
|
|
317
|
-
key: 0,
|
|
318
|
-
title: l(t)("auditLog.noData.title"),
|
|
319
|
-
subtitle: l(t)("auditLog.noData.subtitle")
|
|
320
|
-
}, null, 8, ["title", "subtitle"])) : (c(), j(ae, {
|
|
321
|
-
key: 1
|
|
322
|
-
}, {
|
|
323
|
-
default: x(() => [e("div", pe, [r(S, {
|
|
324
|
-
"column-defs": z,
|
|
325
|
-
"row-data": C.value,
|
|
326
|
-
"page-size": C.value.length,
|
|
327
|
-
loading: L.value,
|
|
328
|
-
"pin-header-row": "",
|
|
329
|
-
"hide-footer": "",
|
|
330
|
-
class: "min-h-0 flex-1 cursor-pointer",
|
|
331
|
-
onRowClick: o[3] || (o[3] = (f) => G(f.original))
|
|
332
|
-
}, null, 8, ["row-data", "page-size", "loading"]), u.value > 1 || k.value ? (c(), m("div", _e, [r(g, {
|
|
333
|
-
variant: "tertiary",
|
|
334
|
-
icon: "chevron_left",
|
|
335
|
-
disabled: u.value === 1,
|
|
336
|
-
"aria-label": l(t)("auditLog.pagination.prevPage"),
|
|
337
|
-
onClick: Y
|
|
338
|
-
}, null, 8, ["disabled", "aria-label"]), e("span", ve, a(l(t)("auditLog.pagination.page", {
|
|
339
|
-
page: u.value
|
|
340
|
-
})), 1), r(g, {
|
|
341
|
-
variant: "tertiary",
|
|
342
|
-
icon: "chevron_right",
|
|
343
|
-
disabled: !k.value,
|
|
344
|
-
"aria-label": l(t)("auditLog.pagination.nextPage"),
|
|
345
|
-
onClick: J
|
|
346
|
-
}, null, 8, ["disabled", "aria-label"])])) : F("", !0)])]),
|
|
347
|
-
_: 1
|
|
348
|
-
}))])]),
|
|
349
|
-
_: 1
|
|
350
|
-
}, 8, ["heading"]), r(Q, {
|
|
351
|
-
header: l(t)("auditLog.detail.header"),
|
|
352
|
-
"model-value": P.value,
|
|
353
|
-
"max-width": 480,
|
|
354
|
-
"dismiss-away": "",
|
|
355
|
-
"onUpdate:modelValue": o[4] || (o[4] = (f) => {
|
|
356
|
-
f || Z();
|
|
357
|
-
})
|
|
358
|
-
}, {
|
|
359
|
-
default: x(() => [s.value ? (c(), m("div", ge, [e("div", he, [e("div", ye, [e("span", xe, a(l(t)("auditLog.detail.timestamp")), 1), e("span", null, a(new Date(s.value.timestamp).toLocaleString()), 1)]), e("div", be, [e("span", Le, a(l(t)("auditLog.detail.user")), 1), e("div", ke, [l(b).userIdToName[s.value.userId] ? (c(), m("span", we, a(l(b).userIdToName[s.value.userId]), 1)) : F("", !0), e("span", Se, a(s.value.userId), 1)])]), e("div", Ie, [e("span", De, a(l(t)("auditLog.detail.action")), 1), e("span", null, a(s.value.action), 1)]), e("div", Fe, [e("span", Pe, a(l(t)("auditLog.detail.subject")), 1), O(s.value.subject) ? (c(), j(H, {
|
|
360
|
-
key: 0,
|
|
361
|
-
content: s.value.subject,
|
|
362
|
-
"z-index": 60
|
|
363
|
-
}, {
|
|
364
|
-
default: x(() => [e("span", null, a(O(s.value.subject)), 1)]),
|
|
365
|
-
_: 1
|
|
366
|
-
}, 8, ["content"])) : (c(), m("span", Ce, a(s.value.subject), 1))]), e("div", Oe, [e("span", Te, a(l(t)("auditLog.detail.field")), 1), e("span", null, a(s.value.field || "-"), 1)]), e("div", je, [e("span", Ve, a(l(t)("auditLog.detail.outcome")), 1), r(d, {
|
|
367
|
-
variant: R[s.value.outcome] ?? "neutral",
|
|
368
|
-
label: s.value.outcome,
|
|
369
|
-
compact: ""
|
|
370
|
-
}, null, 8, ["variant", "label"])]), e("div", Be, [e("span", Ne, a(l(t)("auditLog.detail.business")), 1), e("span", Re, a(s.value.businessId || "-"), 1)]), e("div", qe, [e("span", Ae, a(l(t)("auditLog.detail.restaurant")), 1), e("span", Me, a(s.value.restaurantId || "-"), 1)])]), o[5] || (o[5] = e("hr", {
|
|
371
|
-
class: "border-fm-color-border-default"
|
|
372
|
-
}, null, -1)), e("div", Ee, [e("p", Ue, a(l(t)("auditLog.detail.metadata")), 1), e("div", $e, [e("div", Ke, [e("span", ze, a(l(t)("auditLog.detail.reason")), 1), e("span", null, a(s.value.metadata.reason), 1)]), e("div", Ye, [e("span", Je, a(l(t)("auditLog.detail.resolvedFrom")), 1), e("span", null, a(s.value.metadata.resolvedFrom), 1)]), s.value.metadata.permissionSetId ? (c(), m("div", Ge, [e("span", Ze, a(l(t)("auditLog.detail.permissionSet")), 1), e("span", He, a(s.value.metadata.permissionSetId), 1)])) : F("", !0), e("div", Qe, [e("span", We, a(l(t)("auditLog.detail.decisivePermission")), 1), e("pre", Xe, a(JSON.stringify(s.value.metadata.decisivePermission, null, 2)), 1)]), e("div", {
|
|
373
|
-
class: q(["flex gap-8", s.value.metadata.decisiveRule && "flex-col"])
|
|
374
|
-
}, [e("span", et, a(l(t)("auditLog.detail.decisiveRule")), 1), s.value.metadata.decisiveRule ? (c(), m("pre", tt, a(JSON.stringify(s.value.metadata.decisiveRule, null, 2)), 1)) : (c(), m("div", ot, "-"))], 2), e("div", at, [e("span", st, a(l(t)("auditLog.detail.requestMethod")), 1), e("span", lt, a(s.value.metadata.requestMethod), 1)]), e("div", nt, [e("span", it, a(l(t)("auditLog.detail.requestPath")), 1), e("span", dt, a(s.value.metadata.requestPath), 1)]), e("div", {
|
|
375
|
-
class: q(["flex gap-4", s.value.metadata.requestBody && Object.keys(s.value.metadata.requestBody).length > 0 && "flex-col"])
|
|
376
|
-
}, [e("span", ct, a(l(t)("auditLog.detail.requestBody")), 1), s.value.metadata.requestBody && Object.keys(s.value.metadata.requestBody).length > 0 ? (c(), m("pre", rt, a(JSON.stringify(s.value.metadata.requestBody, null, 2)), 1)) : (c(), m("span", ut, "-"))], 2)])])])) : F("", !0)]),
|
|
377
|
-
_: 1
|
|
378
|
-
}, 8, ["header", "model-value"])], 64);
|
|
379
|
-
};
|
|
380
|
-
}
|
|
381
|
-
});
|
|
382
|
-
export {
|
|
383
|
-
Lt as default
|
|
384
|
-
};
|