@feedmepos/mf-hrm-portal 1.1.2-dev → 1.1.4-dev.1
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/{EmployeeList-CKHgrdAO.js → EmployeeList-D3a7ngdE.js} +16 -18
- package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js → PageLayout.vue_vue_type_script_setup_true_lang-DuwNwJDM.js} +2 -2
- package/dist/{RoleList-Bef-7IhW.js → RoleList-CsxyMZW0.js} +53 -57
- package/dist/TeamMemberList-ZkrdrTlL.js +1508 -0
- package/dist/{TimesheetList-DVIk0Tis.js → TimesheetList-BwiUzcJ-.js} +41 -42
- package/dist/api/team/index.d.ts +1 -5
- package/dist/app-CrML_LtM.js +1202 -0
- package/dist/app.js +4 -4
- package/dist/components/AppForm.vue.d.ts +2 -3
- package/dist/components/CheckboxInput.vue.d.ts +4 -10
- package/dist/components/CollapsibleWrapper.vue.d.ts +2 -3
- package/dist/components/form/SelectFilter.vue.d.ts +2 -3
- package/dist/components/layout/FormColumn.vue.d.ts +3 -6
- package/dist/components/layout/FormItem.vue.d.ts +1 -2
- package/dist/components/layout/FormSection.vue.d.ts +1 -2
- package/dist/components/layout/FullWrapper.vue.d.ts +3 -6
- package/dist/components/layout/PageLayout.vue.d.ts +1 -2
- package/dist/components/menu/BottomSheetMenu.vue.d.ts +1 -2
- package/dist/components/menu/BottomSheetMenuItem.vue.d.ts +3 -6
- package/dist/components/table/EmptyDataTemplate/index.vue.d.ts +3 -6
- package/dist/composables/useAppStore.d.ts +6 -6
- package/dist/composables/useDateRange.d.ts +1 -1
- package/dist/composables/useRestaurantMap.d.ts +8 -4
- package/dist/composables/useSheet.d.ts +1 -1
- package/dist/employee-DSGaYrd4.js +449 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js → empty-placeholder-ey8LJtN1.js} +2 -43
- package/dist/helpers/rule.d.ts +3 -4
- package/dist/index-CIaav54n.js +57 -0
- package/dist/{lodash-DpoPPi_j.js → lodash-dGfuW9fw.js} +343 -326
- package/dist/{Main-YQ5f-v03.js → main-CUI7RdvY.js} +1531 -1501
- package/dist/router/shared.d.ts +1 -4
- package/dist/{index-CicR1-Jp.js → rule-BLgeh_ly.js} +2672 -2721
- package/dist/stores/employee.d.ts +4 -4
- package/dist/stores/role.d.ts +4 -4
- package/dist/stores/timesheet.d.ts +19 -19
- package/dist/{timesheet-BRQvljNj.js → timesheet-BFrZzS2q.js} +14 -14
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/types/permission.d.ts +4 -1
- package/dist/types/team.d.ts +3 -13
- package/dist/useAppStore-DViQe2C8.js +93 -0
- package/dist/useLoading-DAoKseT-.js +141 -0
- package/dist/{useRestaurantMap-D5BNPLKh.js → useRestaurantMap-CpS9-OSq.js} +7 -7
- package/dist/{SelectFilter-NbXrJ4iH.js → useSearch-C25VELOk.js} +101 -90
- package/dist/views/hr/employee/{EmployeeForm.vue.d.ts → components/EmployeeForm.vue.d.ts} +7 -10
- package/dist/views/team/{member → components}/AddMemberForm.vue.d.ts +0 -1
- package/dist/views/team/components/PortalPermissionEditor.vue.d.ts +28 -68
- package/dist/views/team/components/TeamMemberBasePermission.vue.d.ts +36 -0
- package/dist/views/team/components/{ConditionPermission.vue.d.ts → TeamMemberConditionPermission.vue.d.ts} +1 -14
- package/dist/views/team/components/TeamMemberMasterUser.vue.d.ts +718 -0
- package/dist/views/team/components/{PosRolePermission.vue.d.ts → TeamMemberRolePermission.vue.d.ts} +1 -14
- package/dist/views/team/locales/index.d.ts +4 -176
- package/package.json +8 -13
- package/dist/AuditLogList-CjrocQS2.js +0 -316
- package/dist/Main-HzplGv-e.js +0 -85
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-xQ4fjIxa.js +0 -3050
- package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +0 -38
- package/dist/RolePermissionList-BzwpQFeO.js +0 -285
- package/dist/TeamMemberList-D2Xey_w9.js +0 -949
- package/dist/api/audit-log/index.d.ts +0 -10
- package/dist/api/permission-assignment/index.d.ts +0 -10
- package/dist/api/permission-set/index.d.ts +0 -8
- package/dist/app-DUs516v0.js +0 -2592
- package/dist/dayjs.min-DVb8OkTL.js +0 -282
- package/dist/employee-jH7EJnhi.js +0 -172
- package/dist/helpers/permission-set.d.ts +0 -32
- package/dist/helpers/portal-user.d.ts +0 -8
- package/dist/stores/permission-assignment.d.ts +0 -277
- package/dist/stores/permission-set.d.ts +0 -250
- package/dist/stores/team.d.ts +0 -288
- package/dist/team-CiZSNUQW.js +0 -26
- package/dist/types/audit-log.d.ts +0 -19
- package/dist/types/permission-assignment.d.ts +0 -20
- package/dist/types/permission-set.d.ts +0 -20
- package/dist/useAppStore-RzLLN5d9.js +0 -180
- package/dist/useLoading-1OqFn86y.js +0 -99
- package/dist/useSearch-B6WK1LBB.js +0 -15
- package/dist/views/audit-log/locales/index.d.ts +0 -211
- package/dist/views/team/Main.vue.d.ts +0 -2
- package/dist/views/team/components/BasePermission.vue.d.ts +0 -64
- package/dist/views/team/components/InheritPermissionTooltip.vue.d.ts +0 -14
- package/dist/views/team/components/PermissionWithTooltip.vue.d.ts +0 -14
- package/dist/views/team/member/TeamMemberList.vue.d.ts +0 -4
- package/dist/views/team/member/TeamMemberMasterUser.vue.d.ts +0 -55
- package/dist/views/team/role/RolePermissionForm.vue.d.ts +0 -19
- package/dist/views/team/role/RolePermissionList.vue.d.ts +0 -5
- /package/dist/views/{audit-log/AuditLogList.vue.d.ts → hr/main.vue.d.ts} +0 -0
- /package/dist/views/{hr/Main.vue.d.ts → team/TeamMemberList.vue.d.ts} +0 -0
- /package/dist/views/team/{member → components}/MemberInfo.vue.d.ts +0 -0
package/dist/views/team/components/{PosRolePermission.vue.d.ts → TeamMemberRolePermission.vue.d.ts}
RENAMED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { type PropType } from 'vue';
|
|
2
|
-
import { type CheckboxOption } from '@/components/CheckboxInput.vue';
|
|
3
2
|
import type { Role } from '@/types/role';
|
|
4
|
-
declare
|
|
5
|
-
option: CheckboxOption;
|
|
6
|
-
};
|
|
7
|
-
type __VLS_Slots = {} & {
|
|
8
|
-
[K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any;
|
|
9
|
-
};
|
|
10
|
-
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
11
4
|
modelValue: {
|
|
12
5
|
type: PropType<string[] | null>;
|
|
13
6
|
default: null;
|
|
@@ -50,10 +43,4 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
50
43
|
restaurantIds: string[] | null;
|
|
51
44
|
disable: boolean;
|
|
52
45
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
53
|
-
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
54
46
|
export default _default;
|
|
55
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
56
|
-
new (): {
|
|
57
|
-
$slots: S;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
@@ -15,7 +15,6 @@ export declare const i18nMessages: {
|
|
|
15
15
|
phoneNumber: string;
|
|
16
16
|
restaurant: string;
|
|
17
17
|
permission: string;
|
|
18
|
-
assignedRoles: string;
|
|
19
18
|
};
|
|
20
19
|
};
|
|
21
20
|
labels: {
|
|
@@ -71,12 +70,9 @@ export declare const i18nMessages: {
|
|
|
71
70
|
search: string;
|
|
72
71
|
general: string;
|
|
73
72
|
stock: string;
|
|
74
|
-
hrm: string;
|
|
75
|
-
crm: string;
|
|
76
73
|
includedFuture: string;
|
|
77
74
|
includedNewRole: string;
|
|
78
75
|
roles: string;
|
|
79
|
-
inherited: string;
|
|
80
76
|
};
|
|
81
77
|
masterUser: {
|
|
82
78
|
title: string;
|
|
@@ -88,47 +84,9 @@ export declare const i18nMessages: {
|
|
|
88
84
|
role: string;
|
|
89
85
|
nameEmptyError: string;
|
|
90
86
|
};
|
|
91
|
-
|
|
87
|
+
role: {
|
|
92
88
|
placeholder: string;
|
|
93
89
|
};
|
|
94
|
-
permissionSet: {
|
|
95
|
-
title: string;
|
|
96
|
-
selectPlaceholder: string;
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
role: {
|
|
101
|
-
title: string;
|
|
102
|
-
createButtonLabel: string;
|
|
103
|
-
search: {
|
|
104
|
-
placeholder: string;
|
|
105
|
-
};
|
|
106
|
-
noData: {
|
|
107
|
-
title: string;
|
|
108
|
-
subtitle: string;
|
|
109
|
-
};
|
|
110
|
-
form: {
|
|
111
|
-
create: {
|
|
112
|
-
title: string;
|
|
113
|
-
confirmButtonLabel: string;
|
|
114
|
-
};
|
|
115
|
-
update: {
|
|
116
|
-
title: string;
|
|
117
|
-
confirmButtonLabel: string;
|
|
118
|
-
};
|
|
119
|
-
delete: {
|
|
120
|
-
title: string;
|
|
121
|
-
confirmationMessage: string;
|
|
122
|
-
successMessage: string;
|
|
123
|
-
};
|
|
124
|
-
name: string;
|
|
125
|
-
roleNamePlaceholder: string;
|
|
126
|
-
};
|
|
127
|
-
table: {
|
|
128
|
-
columns: {
|
|
129
|
-
name: string;
|
|
130
|
-
permissions: string;
|
|
131
|
-
};
|
|
132
90
|
};
|
|
133
91
|
};
|
|
134
92
|
};
|
|
@@ -201,12 +159,9 @@ export declare const i18nMessages: {
|
|
|
201
159
|
search: string;
|
|
202
160
|
general: string;
|
|
203
161
|
stock: string;
|
|
204
|
-
hrm: string;
|
|
205
|
-
crm: string;
|
|
206
162
|
includedFuture: string;
|
|
207
163
|
includedNewRole: string;
|
|
208
164
|
roles: string;
|
|
209
|
-
inherited: string;
|
|
210
165
|
};
|
|
211
166
|
masterUser: {
|
|
212
167
|
title: string;
|
|
@@ -218,47 +173,9 @@ export declare const i18nMessages: {
|
|
|
218
173
|
role: string;
|
|
219
174
|
nameEmptyError: string;
|
|
220
175
|
};
|
|
221
|
-
|
|
176
|
+
role: {
|
|
222
177
|
placeholder: string;
|
|
223
178
|
};
|
|
224
|
-
permissionSet: {
|
|
225
|
-
title: string;
|
|
226
|
-
selectPlaceholder: string;
|
|
227
|
-
};
|
|
228
|
-
};
|
|
229
|
-
};
|
|
230
|
-
role: {
|
|
231
|
-
title: string;
|
|
232
|
-
createButtonLabel: string;
|
|
233
|
-
search: {
|
|
234
|
-
placeholder: string;
|
|
235
|
-
};
|
|
236
|
-
noData: {
|
|
237
|
-
title: string;
|
|
238
|
-
subtitle: string;
|
|
239
|
-
};
|
|
240
|
-
form: {
|
|
241
|
-
create: {
|
|
242
|
-
title: string;
|
|
243
|
-
confirmButtonLabel: string;
|
|
244
|
-
};
|
|
245
|
-
update: {
|
|
246
|
-
title: string;
|
|
247
|
-
confirmButtonLabel: string;
|
|
248
|
-
};
|
|
249
|
-
delete: {
|
|
250
|
-
title: string;
|
|
251
|
-
confirmationMessage: string;
|
|
252
|
-
successMessage: string;
|
|
253
|
-
};
|
|
254
|
-
name: string;
|
|
255
|
-
roleNamePlaceholder: string;
|
|
256
|
-
};
|
|
257
|
-
table: {
|
|
258
|
-
columns: {
|
|
259
|
-
name: string;
|
|
260
|
-
permissions: string;
|
|
261
|
-
};
|
|
262
179
|
};
|
|
263
180
|
};
|
|
264
181
|
};
|
|
@@ -331,12 +248,9 @@ export declare const i18nMessages: {
|
|
|
331
248
|
search: string;
|
|
332
249
|
general: string;
|
|
333
250
|
stock: string;
|
|
334
|
-
hrm: string;
|
|
335
|
-
crm: string;
|
|
336
251
|
includedFuture: string;
|
|
337
252
|
includedNewRole: string;
|
|
338
253
|
roles: string;
|
|
339
|
-
inherited: string;
|
|
340
254
|
};
|
|
341
255
|
masterUser: {
|
|
342
256
|
title: string;
|
|
@@ -348,47 +262,9 @@ export declare const i18nMessages: {
|
|
|
348
262
|
role: string;
|
|
349
263
|
nameEmptyError: string;
|
|
350
264
|
};
|
|
351
|
-
|
|
265
|
+
role: {
|
|
352
266
|
placeholder: string;
|
|
353
267
|
};
|
|
354
|
-
permissionSet: {
|
|
355
|
-
title: string;
|
|
356
|
-
selectPlaceholder: string;
|
|
357
|
-
};
|
|
358
|
-
};
|
|
359
|
-
};
|
|
360
|
-
role: {
|
|
361
|
-
title: string;
|
|
362
|
-
createButtonLabel: string;
|
|
363
|
-
search: {
|
|
364
|
-
placeholder: string;
|
|
365
|
-
};
|
|
366
|
-
noData: {
|
|
367
|
-
title: string;
|
|
368
|
-
subtitle: string;
|
|
369
|
-
};
|
|
370
|
-
form: {
|
|
371
|
-
create: {
|
|
372
|
-
title: string;
|
|
373
|
-
confirmButtonLabel: string;
|
|
374
|
-
};
|
|
375
|
-
update: {
|
|
376
|
-
title: string;
|
|
377
|
-
confirmButtonLabel: string;
|
|
378
|
-
};
|
|
379
|
-
delete: {
|
|
380
|
-
title: string;
|
|
381
|
-
confirmationMessage: string;
|
|
382
|
-
successMessage: string;
|
|
383
|
-
};
|
|
384
|
-
name: string;
|
|
385
|
-
roleNamePlaceholder: string;
|
|
386
|
-
};
|
|
387
|
-
table: {
|
|
388
|
-
columns: {
|
|
389
|
-
name: string;
|
|
390
|
-
permissions: string;
|
|
391
|
-
};
|
|
392
268
|
};
|
|
393
269
|
};
|
|
394
270
|
};
|
|
@@ -461,12 +337,9 @@ export declare const i18nMessages: {
|
|
|
461
337
|
search: string;
|
|
462
338
|
general: string;
|
|
463
339
|
stock: string;
|
|
464
|
-
hrm: string;
|
|
465
|
-
crm: string;
|
|
466
340
|
includedFuture: string;
|
|
467
341
|
includedNewRole: string;
|
|
468
342
|
roles: string;
|
|
469
|
-
inherited: string;
|
|
470
343
|
};
|
|
471
344
|
masterUser: {
|
|
472
345
|
title: string;
|
|
@@ -478,55 +351,10 @@ export declare const i18nMessages: {
|
|
|
478
351
|
role: string;
|
|
479
352
|
nameEmptyError: string;
|
|
480
353
|
};
|
|
481
|
-
|
|
482
|
-
placeholder: string;
|
|
483
|
-
};
|
|
484
|
-
permissionSet: {
|
|
485
|
-
title: string;
|
|
486
|
-
selectPlaceholder: string;
|
|
487
|
-
};
|
|
488
|
-
};
|
|
489
|
-
role: {
|
|
490
|
-
title: string;
|
|
491
|
-
createButtonLabel: string;
|
|
492
|
-
search: {
|
|
354
|
+
role: {
|
|
493
355
|
placeholder: string;
|
|
494
356
|
};
|
|
495
357
|
};
|
|
496
358
|
};
|
|
497
|
-
role: {
|
|
498
|
-
title: string;
|
|
499
|
-
createButtonLabel: string;
|
|
500
|
-
search: {
|
|
501
|
-
placeholder: string;
|
|
502
|
-
};
|
|
503
|
-
noData: {
|
|
504
|
-
title: string;
|
|
505
|
-
subtitle: string;
|
|
506
|
-
};
|
|
507
|
-
form: {
|
|
508
|
-
create: {
|
|
509
|
-
title: string;
|
|
510
|
-
confirmButtonLabel: string;
|
|
511
|
-
};
|
|
512
|
-
update: {
|
|
513
|
-
title: string;
|
|
514
|
-
confirmButtonLabel: string;
|
|
515
|
-
};
|
|
516
|
-
delete: {
|
|
517
|
-
title: string;
|
|
518
|
-
confirmationMessage: string;
|
|
519
|
-
successMessage: string;
|
|
520
|
-
};
|
|
521
|
-
name: string;
|
|
522
|
-
roleNamePlaceholder: string;
|
|
523
|
-
};
|
|
524
|
-
table: {
|
|
525
|
-
columns: {
|
|
526
|
-
name: string;
|
|
527
|
-
permissions: string;
|
|
528
|
-
};
|
|
529
|
-
};
|
|
530
|
-
};
|
|
531
359
|
};
|
|
532
360
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-hrm-portal",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4-dev.1",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -27,8 +27,7 @@
|
|
|
27
27
|
"vue": "^3.5.16",
|
|
28
28
|
"vue-router": "^4.3.2",
|
|
29
29
|
"vue3-lottie": "^3.3.0",
|
|
30
|
-
"xlsx": "^0.18.5"
|
|
31
|
-
"@feedmepos/hrm-permission": "^0.0.3-dev"
|
|
30
|
+
"xlsx": "^0.18.5"
|
|
32
31
|
},
|
|
33
32
|
"devDependencies": {
|
|
34
33
|
"@casl/ability": "^3.4.0",
|
|
@@ -57,11 +56,8 @@
|
|
|
57
56
|
"prettier": "^3.7.4",
|
|
58
57
|
"sass-embedded": "^1.93.3",
|
|
59
58
|
"tailwindcss": "^3.3.3",
|
|
60
|
-
"typescript": "
|
|
59
|
+
"typescript": "~5.2.0",
|
|
61
60
|
"vite": "^5.2.0",
|
|
62
|
-
"vitest": "^1.2.0",
|
|
63
|
-
"@vitest/ui": "^1.2.0",
|
|
64
|
-
"jsdom": "^24.0.0",
|
|
65
61
|
"vue-eslint-parser": "^10.2.0",
|
|
66
62
|
"vue-i18n": "10.0.5",
|
|
67
63
|
"vue-tsc": "^2.0.6"
|
|
@@ -71,14 +67,13 @@
|
|
|
71
67
|
"build": "run-p type-check \"build-only {@}\" --",
|
|
72
68
|
"build:mf": "vite build --mode fmmf",
|
|
73
69
|
"build:dts": "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir ./dist && mv ./dist/src/* dist",
|
|
74
|
-
"publish-npm": "pnpm build &&
|
|
75
|
-
"publish-npm:beta": "pnpm build &&
|
|
76
|
-
"publish-github": "pnpm build &&
|
|
77
|
-
"publish-github:beta": "pnpm build &&
|
|
70
|
+
"publish-npm": "pnpm build && npm config set registry https://npm.pkg.github.com/ && npm publish --access public --tag latest --no-git-checks",
|
|
71
|
+
"publish-npm:beta": "pnpm build && npm config set registry https://npm.pkg.github.com/ && npm publish --access public --tag beta --no-git-checks",
|
|
72
|
+
"publish-github": "pnpm build && npm config set registry https://npm.pkg.github.com/ && npm publish --tag latest --no-git-checks",
|
|
73
|
+
"publish-github:beta": "pnpm build && npm config set registry https://npm.pkg.github.com/ && npm publish --tag beta --no-git-checks",
|
|
78
74
|
"build-only": "pnpm build:mf && pnpm build:dts",
|
|
79
75
|
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
|
|
80
76
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
|
81
|
-
"format": "prettier --write src/"
|
|
82
|
-
"test": "vitest"
|
|
77
|
+
"format": "prettier --write src/"
|
|
83
78
|
}
|
|
84
79
|
}
|
|
@@ -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-DVb8OkTL.js";
|
|
3
|
-
import { useI18n as J, useCoreStore as Z } from "@feedmepos/mf-common";
|
|
4
|
-
import { _ as H } from "./app-DUs516v0.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-CicR1-Jp.js";
|
|
9
|
-
import { u as oe } from "./team-CiZSNUQW.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
|
-
};
|