@feedmepos/mf-hrm-portal 1.1.3-dev → 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-zU7fmC4c.js → EmployeeList-Cg-mhdLv.js} +5 -5
- package/dist/{Main-BqhrqOzx.js → Main-BHF7vXlD.js} +28 -27
- package/dist/{Main-DGymQNz9.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-jbZqer7A.js → RoleList-D2NTVZa_.js} +5 -5
- package/dist/{TeamMemberList-uamoOFIV.js → TeamMemberList-DC0Gxjin.js} +325 -322
- package/dist/{TimesheetList-hgT9DrHd.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-CcbYGJ22.js → app-kKq54h9D.js} +490 -344
- package/dist/app.js +3 -3
- package/dist/{dayjs.min-CgN1oBQf.js → dayjs.min-CGTR0SS0.js} +1 -1
- package/dist/{employee-khk560IC.js → employee-CRKx3zN0.js} +3 -3
- package/dist/helpers/permission-set.d.ts +15 -0
- package/dist/{index-D5sdamN5.js → index-DRoNwfyW.js} +2153 -2053
- package/dist/index-TP4vQCyq.js +827 -0
- package/dist/{lodash-7Am6_Zd3.js → lodash-CeWi5dyp.js} +1 -1
- package/dist/stores/team.d.ts +4 -1
- package/dist/team-CuLNHjGN.js +29 -0
- package/dist/{timesheet-DKhEeLe7.js → timesheet-V636ISlI.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/types/audit-log.d.ts +1 -19
- package/dist/{useAppStore-DOSLuH24.js → useAppStore-DoX0IUFz.js} +1 -1
- package/dist/{useLoading-BA-GSZ3R.js → useLoading-1yy1KHsE.js} +1 -1
- package/dist/views/audit-log/locales/index.d.ts +76 -0
- package/dist/views/team/locales/index.d.ts +12 -8
- package/package.json +3 -2
- package/dist/AuditLogList-DNQh1rE9.js +0 -316
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BvjXcknf.js +0 -3050
- package/dist/RolePermissionList-Dd8ks5i7.js +0 -285
- package/dist/team-CFyc6tnm.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,19 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
reason: string;
|
|
3
|
-
resolvedFrom: 'admin' | 'staff' | 'permissionSet' | 'custom' | 'unknown';
|
|
4
|
-
permissionSetId?: string;
|
|
5
|
-
requestPath?: string;
|
|
6
|
-
requestMethod?: string;
|
|
7
|
-
requestBody?: Record<string, unknown>;
|
|
8
|
-
}
|
|
9
|
-
export interface AuditLogEntry {
|
|
10
|
-
timestamp: string;
|
|
11
|
-
userId: string;
|
|
12
|
-
subject: string;
|
|
13
|
-
action: string;
|
|
14
|
-
field?: string | null;
|
|
15
|
-
businessId?: string | null;
|
|
16
|
-
restaurantId?: string | null;
|
|
17
|
-
outcome: 'allowed' | 'denied';
|
|
18
|
-
metadata: AuditLogMetadata;
|
|
19
|
-
}
|
|
1
|
+
export type { AuditLogEntry, AuditLogMetadata, AuditLogOutcome, AuditLogResolvedFrom } from '@feedmepos/hrm-permission';
|
|
@@ -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,9 +8,24 @@ export declare const i18nMessages: {
|
|
|
8
8
|
placeholder: string;
|
|
9
9
|
};
|
|
10
10
|
filter: {
|
|
11
|
+
user_placeholder: string;
|
|
12
|
+
selected_user_prefix: string;
|
|
13
|
+
subject_placeholder: string;
|
|
14
|
+
selected_subject_prefix: string;
|
|
15
|
+
action_placeholder: string;
|
|
16
|
+
selected_action_prefix: string;
|
|
17
|
+
status_placeholder: string;
|
|
18
|
+
selected_status_prefix: string;
|
|
11
19
|
outcome_placeholder: string;
|
|
12
20
|
selected_outcome_prefix: string;
|
|
13
21
|
};
|
|
22
|
+
action: {
|
|
23
|
+
manage: string;
|
|
24
|
+
create: string;
|
|
25
|
+
read: string;
|
|
26
|
+
update: string;
|
|
27
|
+
delete: string;
|
|
28
|
+
};
|
|
14
29
|
columns: {
|
|
15
30
|
timestamp: string;
|
|
16
31
|
user: string;
|
|
@@ -36,6 +51,7 @@ export declare const i18nMessages: {
|
|
|
36
51
|
header: string;
|
|
37
52
|
timestamp: string;
|
|
38
53
|
user: string;
|
|
54
|
+
email: string;
|
|
39
55
|
action: string;
|
|
40
56
|
subject: string;
|
|
41
57
|
field: string;
|
|
@@ -46,6 +62,9 @@ export declare const i18nMessages: {
|
|
|
46
62
|
reason: string;
|
|
47
63
|
resolvedFrom: string;
|
|
48
64
|
permissionSet: string;
|
|
65
|
+
permissionTrace: string;
|
|
66
|
+
decisivePermission: string;
|
|
67
|
+
decisiveRule: string;
|
|
49
68
|
requestMethod: string;
|
|
50
69
|
requestPath: string;
|
|
51
70
|
requestBody: string;
|
|
@@ -59,9 +78,24 @@ export declare const i18nMessages: {
|
|
|
59
78
|
placeholder: string;
|
|
60
79
|
};
|
|
61
80
|
filter: {
|
|
81
|
+
user_placeholder: string;
|
|
82
|
+
selected_user_prefix: string;
|
|
83
|
+
subject_placeholder: string;
|
|
84
|
+
selected_subject_prefix: string;
|
|
85
|
+
action_placeholder: string;
|
|
86
|
+
selected_action_prefix: string;
|
|
87
|
+
status_placeholder: string;
|
|
88
|
+
selected_status_prefix: string;
|
|
62
89
|
outcome_placeholder: string;
|
|
63
90
|
selected_outcome_prefix: string;
|
|
64
91
|
};
|
|
92
|
+
action: {
|
|
93
|
+
manage: string;
|
|
94
|
+
create: string;
|
|
95
|
+
read: string;
|
|
96
|
+
update: string;
|
|
97
|
+
delete: string;
|
|
98
|
+
};
|
|
65
99
|
columns: {
|
|
66
100
|
timestamp: string;
|
|
67
101
|
user: string;
|
|
@@ -87,6 +121,7 @@ export declare const i18nMessages: {
|
|
|
87
121
|
header: string;
|
|
88
122
|
timestamp: string;
|
|
89
123
|
user: string;
|
|
124
|
+
email: string;
|
|
90
125
|
action: string;
|
|
91
126
|
subject: string;
|
|
92
127
|
field: string;
|
|
@@ -97,6 +132,9 @@ export declare const i18nMessages: {
|
|
|
97
132
|
reason: string;
|
|
98
133
|
resolvedFrom: string;
|
|
99
134
|
permissionSet: string;
|
|
135
|
+
permissionTrace: string;
|
|
136
|
+
decisivePermission: string;
|
|
137
|
+
decisiveRule: string;
|
|
100
138
|
request: string;
|
|
101
139
|
requestMethod: string;
|
|
102
140
|
requestPath: string;
|
|
@@ -111,9 +149,24 @@ export declare const i18nMessages: {
|
|
|
111
149
|
placeholder: string;
|
|
112
150
|
};
|
|
113
151
|
filter: {
|
|
152
|
+
user_placeholder: string;
|
|
153
|
+
selected_user_prefix: string;
|
|
154
|
+
subject_placeholder: string;
|
|
155
|
+
selected_subject_prefix: string;
|
|
156
|
+
action_placeholder: string;
|
|
157
|
+
selected_action_prefix: string;
|
|
158
|
+
status_placeholder: string;
|
|
159
|
+
selected_status_prefix: string;
|
|
114
160
|
outcome_placeholder: string;
|
|
115
161
|
selected_outcome_prefix: string;
|
|
116
162
|
};
|
|
163
|
+
action: {
|
|
164
|
+
manage: string;
|
|
165
|
+
create: string;
|
|
166
|
+
read: string;
|
|
167
|
+
update: string;
|
|
168
|
+
delete: string;
|
|
169
|
+
};
|
|
117
170
|
columns: {
|
|
118
171
|
timestamp: string;
|
|
119
172
|
user: string;
|
|
@@ -139,6 +192,7 @@ export declare const i18nMessages: {
|
|
|
139
192
|
header: string;
|
|
140
193
|
timestamp: string;
|
|
141
194
|
user: string;
|
|
195
|
+
email: string;
|
|
142
196
|
action: string;
|
|
143
197
|
subject: string;
|
|
144
198
|
field: string;
|
|
@@ -149,6 +203,9 @@ export declare const i18nMessages: {
|
|
|
149
203
|
reason: string;
|
|
150
204
|
resolvedFrom: string;
|
|
151
205
|
permissionSet: string;
|
|
206
|
+
permissionTrace: string;
|
|
207
|
+
decisivePermission: string;
|
|
208
|
+
decisiveRule: string;
|
|
152
209
|
request: string;
|
|
153
210
|
requestMethod: string;
|
|
154
211
|
requestPath: string;
|
|
@@ -163,9 +220,24 @@ export declare const i18nMessages: {
|
|
|
163
220
|
placeholder: string;
|
|
164
221
|
};
|
|
165
222
|
filter: {
|
|
223
|
+
user_placeholder: string;
|
|
224
|
+
selected_user_prefix: string;
|
|
225
|
+
subject_placeholder: string;
|
|
226
|
+
selected_subject_prefix: string;
|
|
227
|
+
action_placeholder: string;
|
|
228
|
+
selected_action_prefix: string;
|
|
229
|
+
status_placeholder: string;
|
|
230
|
+
selected_status_prefix: string;
|
|
166
231
|
outcome_placeholder: string;
|
|
167
232
|
selected_outcome_prefix: string;
|
|
168
233
|
};
|
|
234
|
+
action: {
|
|
235
|
+
manage: string;
|
|
236
|
+
create: string;
|
|
237
|
+
read: string;
|
|
238
|
+
update: string;
|
|
239
|
+
delete: string;
|
|
240
|
+
};
|
|
169
241
|
columns: {
|
|
170
242
|
timestamp: string;
|
|
171
243
|
user: string;
|
|
@@ -191,6 +263,7 @@ export declare const i18nMessages: {
|
|
|
191
263
|
header: string;
|
|
192
264
|
timestamp: string;
|
|
193
265
|
user: string;
|
|
266
|
+
email: string;
|
|
194
267
|
action: string;
|
|
195
268
|
subject: string;
|
|
196
269
|
field: string;
|
|
@@ -201,6 +274,9 @@ export declare const i18nMessages: {
|
|
|
201
274
|
reason: string;
|
|
202
275
|
resolvedFrom: string;
|
|
203
276
|
permissionSet: string;
|
|
277
|
+
permissionTrace: string;
|
|
278
|
+
decisivePermission: string;
|
|
279
|
+
decisiveRule: string;
|
|
204
280
|
request: string;
|
|
205
281
|
requestMethod: string;
|
|
206
282
|
requestPath: 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,316 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Y, ref as m, computed as P, watch as T, resolveComponent as y, createElementBlock as f, openBlock as c, Fragment as z, createVNode as r, unref as a, withCtx as S, createElementVNode as e, createBlock as q, createCommentVNode as p, toDisplayString as o } from "vue";
|
|
2
|
-
import { d as G } from "./dayjs.min-CgN1oBQf.js";
|
|
3
|
-
import { useI18n as J, useCoreStore as Z } from "@feedmepos/mf-common";
|
|
4
|
-
import { _ as H } from "./app-CcbYGJ22.js";
|
|
5
|
-
import { _ as Q } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
6
|
-
import { _ as W } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
7
|
-
import { components as X } from "@feedmepos/ui-library";
|
|
8
|
-
import { g as ee, b as te } from "./index-D5sdamN5.js";
|
|
9
|
-
import { u as oe } from "./team-CFyc6tnm.js";
|
|
10
|
-
import { S as ae } from "./SelectFilter-NbXrJ4iH.js";
|
|
11
|
-
const se = "/audit-logs", le = {
|
|
12
|
-
async read(i) {
|
|
13
|
-
return ee(
|
|
14
|
-
await te().get(se, {
|
|
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
|
-
}, ne = {
|
|
25
|
-
class: "flex flex-1 flex-col gap-16 min-h-0"
|
|
26
|
-
}, ie = {
|
|
27
|
-
class: "flex items-center gap-8"
|
|
28
|
-
}, de = {
|
|
29
|
-
class: "flex h-full flex-col"
|
|
30
|
-
}, ce = {
|
|
31
|
-
key: 0,
|
|
32
|
-
class: "flex shrink-0 items-center justify-end border-t border-fm-color-border-default py-4"
|
|
33
|
-
}, re = {
|
|
34
|
-
class: "text-sm text-fm-color-typo-secondary"
|
|
35
|
-
}, ue = {
|
|
36
|
-
key: 0,
|
|
37
|
-
class: "space-y-16 p-4 text-sm"
|
|
38
|
-
}, me = {
|
|
39
|
-
class: "space-y-8"
|
|
40
|
-
}, fe = {
|
|
41
|
-
class: "flex gap-8"
|
|
42
|
-
}, _e = {
|
|
43
|
-
class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
|
|
44
|
-
}, pe = {
|
|
45
|
-
class: "flex gap-8"
|
|
46
|
-
}, ge = {
|
|
47
|
-
class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
|
|
48
|
-
}, ve = {
|
|
49
|
-
class: "flex flex-col gap-2"
|
|
50
|
-
}, he = {
|
|
51
|
-
key: 0,
|
|
52
|
-
class: "font-medium"
|
|
53
|
-
}, ye = {
|
|
54
|
-
class: "break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
55
|
-
}, xe = {
|
|
56
|
-
class: "flex gap-8"
|
|
57
|
-
}, be = {
|
|
58
|
-
class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
|
|
59
|
-
}, Le = {
|
|
60
|
-
class: "flex gap-8"
|
|
61
|
-
}, ke = {
|
|
62
|
-
class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
|
|
63
|
-
}, we = {
|
|
64
|
-
class: "flex gap-8"
|
|
65
|
-
}, Se = {
|
|
66
|
-
class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
|
|
67
|
-
}, Ie = {
|
|
68
|
-
class: "flex gap-8"
|
|
69
|
-
}, De = {
|
|
70
|
-
class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
|
|
71
|
-
}, Ce = {
|
|
72
|
-
class: "flex gap-8"
|
|
73
|
-
}, Fe = {
|
|
74
|
-
class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
|
|
75
|
-
}, Pe = {
|
|
76
|
-
class: "break-all font-mono text-xs"
|
|
77
|
-
}, Te = {
|
|
78
|
-
class: "flex gap-8"
|
|
79
|
-
}, Ve = {
|
|
80
|
-
class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
|
|
81
|
-
}, Be = {
|
|
82
|
-
class: "break-all font-mono text-xs"
|
|
83
|
-
}, Oe = {
|
|
84
|
-
class: "space-y-8"
|
|
85
|
-
}, qe = {
|
|
86
|
-
class: "font-semibold text-fm-color-typo-primary"
|
|
87
|
-
}, Me = {
|
|
88
|
-
class: "space-y-8"
|
|
89
|
-
}, Ne = {
|
|
90
|
-
class: "flex gap-8"
|
|
91
|
-
}, Re = {
|
|
92
|
-
class: "w-28 shrink-0 font-medium text-fm-color-typo-secondary"
|
|
93
|
-
}, Ae = {
|
|
94
|
-
class: "flex gap-8"
|
|
95
|
-
}, Ee = {
|
|
96
|
-
class: "w-28 shrink-0 font-medium text-fm-color-typo-secondary"
|
|
97
|
-
}, $e = {
|
|
98
|
-
key: 0,
|
|
99
|
-
class: "flex gap-8"
|
|
100
|
-
}, je = {
|
|
101
|
-
class: "w-28 shrink-0 font-medium text-fm-color-typo-secondary"
|
|
102
|
-
}, Ue = {
|
|
103
|
-
class: "break-all font-mono text-xs"
|
|
104
|
-
}, Ke = {
|
|
105
|
-
key: 1,
|
|
106
|
-
class: "flex gap-8"
|
|
107
|
-
}, Ye = {
|
|
108
|
-
class: "w-28 shrink-0 font-medium text-fm-color-typo-secondary"
|
|
109
|
-
}, ze = {
|
|
110
|
-
class: "font-mono text-xs"
|
|
111
|
-
}, Ge = {
|
|
112
|
-
key: 2,
|
|
113
|
-
class: "flex gap-8"
|
|
114
|
-
}, Je = {
|
|
115
|
-
class: "w-28 shrink-0 font-medium text-fm-color-typo-secondary"
|
|
116
|
-
}, Ze = {
|
|
117
|
-
class: "break-all font-mono text-xs"
|
|
118
|
-
}, He = {
|
|
119
|
-
key: 3,
|
|
120
|
-
class: "flex flex-col gap-4"
|
|
121
|
-
}, Qe = {
|
|
122
|
-
class: "font-medium text-fm-color-typo-secondary"
|
|
123
|
-
}, We = {
|
|
124
|
-
class: "max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner"
|
|
125
|
-
}, V = 100, ct = /* @__PURE__ */ Y({
|
|
126
|
-
__name: "AuditLogList",
|
|
127
|
-
setup(i) {
|
|
128
|
-
const {
|
|
129
|
-
t
|
|
130
|
-
} = J(), M = Z(), x = oe(), b = m(!1), I = m([]), l = m(null), D = m(!1), d = m(1), L = m(!1), B = G().format("YYYY-MM-DD"), h = m({
|
|
131
|
-
startDate: B,
|
|
132
|
-
endDate: B
|
|
133
|
-
}), g = m(), N = P(() => [{
|
|
134
|
-
label: t("auditLog.outcome.allowed"),
|
|
135
|
-
value: "allowed"
|
|
136
|
-
}, {
|
|
137
|
-
label: t("auditLog.outcome.denied"),
|
|
138
|
-
value: "denied"
|
|
139
|
-
}, {
|
|
140
|
-
label: t("auditLog.outcome.skipped"),
|
|
141
|
-
value: "skipped"
|
|
142
|
-
}]), R = P(() => {
|
|
143
|
-
const {
|
|
144
|
-
startDate: n,
|
|
145
|
-
endDate: s
|
|
146
|
-
} = h.value;
|
|
147
|
-
return n && s ? `${n} – ${s}` : n || s || t("auditLog.dateRange.placeholder");
|
|
148
|
-
}), C = P(() => !g.value || g.value.length === 0 ? I.value : I.value.filter((n) => g.value.includes(n.outcome))), O = {
|
|
149
|
-
allowed: "success",
|
|
150
|
-
denied: "critical",
|
|
151
|
-
skipped: "warning"
|
|
152
|
-
}, A = [{
|
|
153
|
-
accessorKey: "timestamp",
|
|
154
|
-
header: () => t("auditLog.columns.timestamp"),
|
|
155
|
-
cell(n) {
|
|
156
|
-
const s = n.row.original;
|
|
157
|
-
return new Date(s.timestamp).toLocaleString();
|
|
158
|
-
}
|
|
159
|
-
}, {
|
|
160
|
-
accessorKey: "userId",
|
|
161
|
-
header: () => t("auditLog.columns.user"),
|
|
162
|
-
enableSorting: !1,
|
|
163
|
-
cell(n) {
|
|
164
|
-
const s = n.row.original, u = x.userIdToName[s.userId];
|
|
165
|
-
return u ? `${u} (${s.userId})` : s.userId;
|
|
166
|
-
}
|
|
167
|
-
}, {
|
|
168
|
-
accessorKey: "subject",
|
|
169
|
-
header: () => t("auditLog.columns.subject")
|
|
170
|
-
}, {
|
|
171
|
-
accessorKey: "action",
|
|
172
|
-
header: () => t("auditLog.columns.action"),
|
|
173
|
-
enableSorting: !1
|
|
174
|
-
}, {
|
|
175
|
-
accessorKey: "outcome",
|
|
176
|
-
header: () => t("auditLog.columns.outcome"),
|
|
177
|
-
enableSorting: !1,
|
|
178
|
-
cell(n) {
|
|
179
|
-
const s = n.row.original;
|
|
180
|
-
return r(X.FmChip, {
|
|
181
|
-
variant: O[s.outcome] ?? "neutral",
|
|
182
|
-
label: s.outcome,
|
|
183
|
-
compact: !0
|
|
184
|
-
}, null);
|
|
185
|
-
}
|
|
186
|
-
}];
|
|
187
|
-
async function k() {
|
|
188
|
-
b.value = !0;
|
|
189
|
-
try {
|
|
190
|
-
const {
|
|
191
|
-
startDate: n,
|
|
192
|
-
endDate: s
|
|
193
|
-
} = h.value;
|
|
194
|
-
let u;
|
|
195
|
-
if (s) {
|
|
196
|
-
const v = new Date(s);
|
|
197
|
-
v.setDate(v.getDate() + 1), u = v.toISOString().slice(0, 10);
|
|
198
|
-
}
|
|
199
|
-
const F = (d.value - 1) * V, [w] = await Promise.all([le.read({
|
|
200
|
-
limit: V,
|
|
201
|
-
offset: F,
|
|
202
|
-
...n ? {
|
|
203
|
-
from: n
|
|
204
|
-
} : {},
|
|
205
|
-
...u ? {
|
|
206
|
-
to: u
|
|
207
|
-
} : {}
|
|
208
|
-
}), x.readTeamMembers()]);
|
|
209
|
-
I.value = w, L.value = w.length === V;
|
|
210
|
-
} finally {
|
|
211
|
-
b.value = !1;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
T(h, () => {
|
|
215
|
-
d.value = 1, k();
|
|
216
|
-
}), T(g, () => {
|
|
217
|
-
d.value = 1;
|
|
218
|
-
});
|
|
219
|
-
async function E() {
|
|
220
|
-
d.value > 1 && (d.value--, await k());
|
|
221
|
-
}
|
|
222
|
-
async function $() {
|
|
223
|
-
L.value && (d.value++, await k());
|
|
224
|
-
}
|
|
225
|
-
function j(n) {
|
|
226
|
-
l.value = n, D.value = !0;
|
|
227
|
-
}
|
|
228
|
-
function U() {
|
|
229
|
-
D.value = !1, l.value = null;
|
|
230
|
-
}
|
|
231
|
-
return T(M.currentBusiness, (n) => {
|
|
232
|
-
n && (d.value = 1, k());
|
|
233
|
-
}, {
|
|
234
|
-
immediate: !0
|
|
235
|
-
}), (n, s) => {
|
|
236
|
-
const u = y("FmChip"), F = y("FmDateRangePicker"), w = y("FmTable"), v = y("FmButton"), K = y("FmSideSheet");
|
|
237
|
-
return c(), f(z, null, [r(Q, {
|
|
238
|
-
heading: a(t)("auditLog.title")
|
|
239
|
-
}, {
|
|
240
|
-
default: S(() => [e("div", ne, [e("div", ie, [r(F, {
|
|
241
|
-
modelValue: h.value,
|
|
242
|
-
"onUpdate:modelValue": s[0] || (s[0] = (_) => h.value = _),
|
|
243
|
-
"show-predefined-range": ""
|
|
244
|
-
}, {
|
|
245
|
-
"trigger-button": S(() => [r(u, {
|
|
246
|
-
label: R.value,
|
|
247
|
-
icon: "calendar_month"
|
|
248
|
-
}, null, 8, ["label"])]),
|
|
249
|
-
_: 1
|
|
250
|
-
}, 8, ["modelValue"]), r(ae, {
|
|
251
|
-
modelValue: g.value,
|
|
252
|
-
"onUpdate:modelValue": s[1] || (s[1] = (_) => g.value = _),
|
|
253
|
-
items: N.value,
|
|
254
|
-
multiple: "",
|
|
255
|
-
variant: "dark",
|
|
256
|
-
placeholder: a(t)("auditLog.filter.outcome_placeholder"),
|
|
257
|
-
"selected-prefix": a(t)("auditLog.filter.selected_outcome_prefix"),
|
|
258
|
-
searchable: !1
|
|
259
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), !b.value && C.value.length === 0 ? (c(), q(a(W), {
|
|
260
|
-
key: 0,
|
|
261
|
-
title: a(t)("auditLog.noData.title"),
|
|
262
|
-
subtitle: a(t)("auditLog.noData.subtitle")
|
|
263
|
-
}, null, 8, ["title", "subtitle"])) : (c(), q(H, {
|
|
264
|
-
key: 1
|
|
265
|
-
}, {
|
|
266
|
-
default: S(() => [e("div", de, [r(w, {
|
|
267
|
-
"column-defs": A,
|
|
268
|
-
"row-data": C.value,
|
|
269
|
-
"page-size": C.value.length,
|
|
270
|
-
loading: b.value,
|
|
271
|
-
"pin-header-row": "",
|
|
272
|
-
"hide-footer": "",
|
|
273
|
-
class: "min-h-0 flex-1 cursor-pointer",
|
|
274
|
-
onRowClick: s[2] || (s[2] = (_) => j(_.original))
|
|
275
|
-
}, null, 8, ["row-data", "page-size", "loading"]), d.value > 1 || L.value ? (c(), f("div", ce, [r(v, {
|
|
276
|
-
variant: "tertiary",
|
|
277
|
-
icon: "chevron_left",
|
|
278
|
-
disabled: d.value === 1,
|
|
279
|
-
"aria-label": a(t)("auditLog.pagination.prevPage"),
|
|
280
|
-
onClick: E
|
|
281
|
-
}, null, 8, ["disabled", "aria-label"]), e("span", re, o(a(t)("auditLog.pagination.page", {
|
|
282
|
-
page: d.value
|
|
283
|
-
})), 1), r(v, {
|
|
284
|
-
variant: "tertiary",
|
|
285
|
-
icon: "chevron_right",
|
|
286
|
-
disabled: !L.value,
|
|
287
|
-
"aria-label": a(t)("auditLog.pagination.nextPage"),
|
|
288
|
-
onClick: $
|
|
289
|
-
}, null, 8, ["disabled", "aria-label"])])) : p("", !0)])]),
|
|
290
|
-
_: 1
|
|
291
|
-
}))])]),
|
|
292
|
-
_: 1
|
|
293
|
-
}, 8, ["heading"]), r(K, {
|
|
294
|
-
header: a(t)("auditLog.detail.header"),
|
|
295
|
-
"model-value": D.value,
|
|
296
|
-
"max-width": 480,
|
|
297
|
-
"dismiss-away": "",
|
|
298
|
-
"onUpdate:modelValue": s[3] || (s[3] = (_) => {
|
|
299
|
-
_ || U();
|
|
300
|
-
})
|
|
301
|
-
}, {
|
|
302
|
-
default: S(() => [l.value ? (c(), f("div", ue, [e("div", me, [e("div", fe, [e("span", _e, o(a(t)("auditLog.detail.timestamp")), 1), e("span", null, o(new Date(l.value.timestamp).toLocaleString()), 1)]), e("div", pe, [e("span", ge, o(a(t)("auditLog.detail.user")), 1), e("div", ve, [a(x).userIdToName[l.value.userId] ? (c(), f("span", he, o(a(x).userIdToName[l.value.userId]), 1)) : p("", !0), e("span", ye, o(l.value.userId), 1)])]), e("div", xe, [e("span", be, o(a(t)("auditLog.detail.action")), 1), e("span", null, o(l.value.action), 1)]), e("div", Le, [e("span", ke, o(a(t)("auditLog.detail.subject")), 1), e("span", null, o(l.value.subject), 1)]), e("div", we, [e("span", Se, o(a(t)("auditLog.detail.field")), 1), e("span", null, o(l.value.field || "-"), 1)]), e("div", Ie, [e("span", De, o(a(t)("auditLog.detail.outcome")), 1), r(u, {
|
|
303
|
-
variant: O[l.value.outcome] ?? "neutral",
|
|
304
|
-
label: l.value.outcome,
|
|
305
|
-
compact: ""
|
|
306
|
-
}, null, 8, ["variant", "label"])]), e("div", Ce, [e("span", Fe, o(a(t)("auditLog.detail.business")), 1), e("span", Pe, o(l.value.businessId || "-"), 1)]), e("div", Te, [e("span", Ve, o(a(t)("auditLog.detail.restaurant")), 1), e("span", Be, o(l.value.restaurantId || "-"), 1)])]), s[4] || (s[4] = e("hr", {
|
|
307
|
-
class: "border-fm-color-border-default"
|
|
308
|
-
}, null, -1)), e("div", Oe, [e("p", qe, o(a(t)("auditLog.detail.metadata")), 1), e("div", Me, [e("div", Ne, [e("span", Re, o(a(t)("auditLog.detail.reason")), 1), e("span", null, o(l.value.metadata.reason), 1)]), e("div", Ae, [e("span", Ee, o(a(t)("auditLog.detail.resolvedFrom")), 1), e("span", null, o(l.value.metadata.resolvedFrom), 1)]), l.value.metadata.permissionSetId ? (c(), f("div", $e, [e("span", je, o(a(t)("auditLog.detail.permissionSet")), 1), e("span", Ue, o(l.value.metadata.permissionSetId), 1)])) : p("", !0), l.value.metadata.requestMethod ? (c(), f("div", Ke, [e("span", Ye, o(a(t)("auditLog.detail.requestMethod")), 1), e("span", ze, o(l.value.metadata.requestMethod), 1)])) : p("", !0), l.value.metadata.requestPath ? (c(), f("div", Ge, [e("span", Je, o(a(t)("auditLog.detail.requestPath")), 1), e("span", Ze, o(l.value.metadata.requestPath), 1)])) : p("", !0), l.value.metadata.requestBody ? (c(), f("div", He, [e("span", Qe, o(a(t)("auditLog.detail.requestBody")), 1), e("pre", We, o(JSON.stringify(l.value.metadata.requestBody, null, 2)), 1)])) : p("", !0)])])])) : p("", !0)]),
|
|
309
|
-
_: 1
|
|
310
|
-
}, 8, ["header", "model-value"])], 64);
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
export {
|
|
315
|
-
ct as default
|
|
316
|
-
};
|