@feedmepos/mf-hrm-portal 2.0.5-dev → 2.0.7-dev
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-COq6WH3T.js +492 -0
- package/dist/{EmployeeList-B_pgDSOf.js → EmployeeList-CtosIPFL.js} +6 -6
- package/dist/{Main-BVogGot1.js → Main-B4YdcrGe.js} +5 -5
- package/dist/{Main-DsOSGRS7.js → Main-CdsqeB2G.js} +8 -8
- package/dist/{PermissionSetList-B243twFl.js → PermissionSetList-BUORArci.js} +3 -3
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-ChqCTn1L.js +3333 -0
- package/dist/{RoleList-B09gFRrt.js → RoleList-D1NGE2IC.js} +6 -6
- package/dist/{SelectFilter-NbXrJ4iH.js → SelectFilter-DUj7GBtT.js} +93 -89
- package/dist/{TeamMemberList-DZKq2mDD.js → TeamMemberList-auSjZRNz.js} +8 -8
- package/dist/{TimesheetList-BykQ0VO_.js → TimesheetList-B8yCkaxb.js} +6 -6
- package/dist/{app-D0y0UR-U.js → app-CB3ye-CT.js} +16 -16
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-COoXlyZR.js → dayjs.min-DOxEzdpe.js} +1 -1
- package/dist/{employee-UNFKUR2e.js → employee-G0pQg8_6.js} +3 -3
- package/dist/{index-BPGh5yHT.js → index-Beu6IuhT.js} +258 -257
- package/dist/{index-2et9Y2xR.js → index-DQArLkVB.js} +1 -1
- package/dist/{lodash-CDk6w3_I.js → lodash-COjtwv4w.js} +1 -1
- package/dist/{components → src/components}/form/SelectFilter.vue.d.ts +2 -0
- package/dist/{team-B0EB57-E.js → team-CEtKQK6n.js} +1 -1
- package/dist/{timesheet-DmthH-5T.js → timesheet-DZF9D3QQ.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-Ba_pxve9.js → useAppStore-9lbKMy_9.js} +1 -1
- package/dist/{useLoading-PuFP-Lbd.js → useLoading-BIIvuJcM.js} +1 -1
- package/dist/{useReportPermissions-mKoU-8Yq.js → useReportPermissions-BXQ0-WwK.js} +2 -2
- package/package.json +2 -2
- package/dist/AuditLogList-BvEIB73A.js +0 -474
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-JopeRj37.js +0 -3287
- /package/dist/{App.vue.d.ts → src/App.vue.d.ts} +0 -0
- /package/dist/{Entry.vue.d.ts → src/Entry.vue.d.ts} +0 -0
- /package/dist/{api → src/api}/audit-log/index.d.ts +0 -0
- /package/dist/{api → src/api}/employee/index.d.ts +0 -0
- /package/dist/{api → src/api}/index.d.ts +0 -0
- /package/dist/{api → src/api}/inventory/index.d.ts +0 -0
- /package/dist/{api → src/api}/permission-assignment/index.d.ts +0 -0
- /package/dist/{api → src/api}/permission-set/index.d.ts +0 -0
- /package/dist/{api → src/api}/public-setting/index.d.ts +0 -0
- /package/dist/{api → src/api}/report-query/index.d.ts +0 -0
- /package/dist/{api → src/api}/role/index.d.ts +0 -0
- /package/dist/{api → src/api}/team/index.d.ts +0 -0
- /package/dist/{api → src/api}/timesheet/index.d.ts +0 -0
- /package/dist/{api → src/api}/user/index.d.ts +0 -0
- /package/dist/{app.d.ts → src/app.d.ts} +0 -0
- /package/dist/{components → src/components}/AppForm.vue.d.ts +0 -0
- /package/dist/{components → src/components}/CheckboxInput.vue.d.ts +0 -0
- /package/dist/{components → src/components}/CollapsibleWrapper.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Navigator.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Splash.vue.d.ts +0 -0
- /package/dist/{components → src/components}/button/ResponsiveFabButton.vue.d.ts +0 -0
- /package/dist/{components → src/components}/layout/FormColumn.vue.d.ts +0 -0
- /package/dist/{components → src/components}/layout/FormItem.vue.d.ts +0 -0
- /package/dist/{components → src/components}/layout/FormSection.vue.d.ts +0 -0
- /package/dist/{components → src/components}/layout/FullWrapper.vue.d.ts +0 -0
- /package/dist/{components → src/components}/layout/HorizontalSplitter.vue.d.ts +0 -0
- /package/dist/{components → src/components}/layout/LottieAnimation.vue.d.ts +0 -0
- /package/dist/{components → src/components}/layout/PageLayout.vue.d.ts +0 -0
- /package/dist/{components → src/components}/loading/AppLoading.vue.d.ts +0 -0
- /package/dist/{components → src/components}/loading/PageLoading.vue.d.ts +0 -0
- /package/dist/{components → src/components}/loading/index.d.ts +0 -0
- /package/dist/{components → src/components}/menu/BottomSheetMenu.vue.d.ts +0 -0
- /package/dist/{components → src/components}/menu/BottomSheetMenuItem.vue.d.ts +0 -0
- /package/dist/{components → src/components}/menu/ResponsiveContextMenu.vue.d.ts +0 -0
- /package/dist/{components → src/components}/table/EmptyDataTemplate/Icon.vue.d.ts +0 -0
- /package/dist/{components → src/components}/table/EmptyDataTemplate/index.d.ts +0 -0
- /package/dist/{components → src/components}/table/EmptyDataTemplate/index.vue.d.ts +0 -0
- /package/dist/{composables → src/composables}/useAppStore.d.ts +0 -0
- /package/dist/{composables → src/composables}/useCustomReportPermissions.d.ts +0 -0
- /package/dist/{composables → src/composables}/useDateRange.d.ts +0 -0
- /package/dist/{composables → src/composables}/useDiscardConfirm.d.ts +0 -0
- /package/dist/{composables → src/composables}/useElementPosition.d.ts +0 -0
- /package/dist/{composables → src/composables}/useFilterSelector.d.ts +0 -0
- /package/dist/{composables → src/composables}/useLoading.d.ts +0 -0
- /package/dist/{composables → src/composables}/useMessage.d.ts +0 -0
- /package/dist/{composables → src/composables}/useReportPermissions.d.ts +0 -0
- /package/dist/{composables → src/composables}/useRestaurantMap.d.ts +0 -0
- /package/dist/{composables → src/composables}/useSearch.d.ts +0 -0
- /package/dist/{composables → src/composables}/useSheet.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/component.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/iteration.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/object.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/permission-set.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/portal-user.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/rule.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/string.d.ts +0 -0
- /package/dist/{helpers → src/helpers}/utils.d.ts +0 -0
- /package/dist/{main.d.ts → src/main.d.ts} +0 -0
- /package/dist/{router → src/router}/index.d.ts +0 -0
- /package/dist/{router → src/router}/shared.d.ts +0 -0
- /package/dist/{stores → src/stores}/employee.d.ts +0 -0
- /package/dist/{stores → src/stores}/permission-assignment.d.ts +0 -0
- /package/dist/{stores → src/stores}/permission-set.d.ts +0 -0
- /package/dist/{stores → src/stores}/role.d.ts +0 -0
- /package/dist/{stores → src/stores}/team.d.ts +0 -0
- /package/dist/{stores → src/stores}/timesheet.d.ts +0 -0
- /package/dist/{types → src/types}/audit-log.d.ts +0 -0
- /package/dist/{types → src/types}/employee.d.ts +0 -0
- /package/dist/{types → src/types}/permission-assignment.d.ts +0 -0
- /package/dist/{types → src/types}/permission-set.d.ts +0 -0
- /package/dist/{types → src/types}/report-query.d.ts +0 -0
- /package/dist/{types → src/types}/restaurant.d.ts +0 -0
- /package/dist/{types → src/types}/role.d.ts +0 -0
- /package/dist/{types → src/types}/team.d.ts +0 -0
- /package/dist/{types → src/types}/timesheet.d.ts +0 -0
- /package/dist/{views → src/views}/audit-log/AuditLogList.vue.d.ts +0 -0
- /package/dist/{views → src/views}/audit-log/locales/index.d.ts +0 -0
- /package/dist/{views → src/views}/hr/Main.vue.d.ts +0 -0
- /package/dist/{views → src/views}/hr/employee/Employee.vue.d.ts +0 -0
- /package/dist/{views → src/views}/hr/employee/EmployeeForm.vue.d.ts +0 -0
- /package/dist/{views → src/views}/hr/employee/EmployeeList.vue.d.ts +0 -0
- /package/dist/{views → src/views}/hr/locales/index.d.ts +0 -0
- /package/dist/{views → src/views}/hr/role/RoleForm.vue.d.ts +0 -0
- /package/dist/{views → src/views}/hr/role/RoleList.vue.d.ts +0 -0
- /package/dist/{views → src/views}/hr/timesheet/TimesheetList.vue.d.ts +0 -0
- /package/dist/{views → src/views}/team/Main.vue.d.ts +0 -0
- /package/dist/{views → src/views}/team/components/BasePermission.vue.d.ts +0 -0
- /package/dist/{views → src/views}/team/components/ConditionPermission.vue.d.ts +0 -0
- /package/dist/{views → src/views}/team/components/InheritPermissionTooltip.vue.d.ts +0 -0
- /package/dist/{views → src/views}/team/components/PermissionWithTooltip.vue.d.ts +0 -0
- /package/dist/{views → src/views}/team/components/PortalPermissionEditor.vue.d.ts +0 -0
- /package/dist/{views → src/views}/team/components/PortalUserSearcher.vue.d.ts +0 -0
- /package/dist/{views → src/views}/team/components/PosRolePermission.vue.d.ts +0 -0
- /package/dist/{views → src/views}/team/locales/index.d.ts +0 -0
- /package/dist/{views → src/views}/team/member/AddMemberForm.vue.d.ts +0 -0
- /package/dist/{views → src/views}/team/member/MemberInfo.vue.d.ts +0 -0
- /package/dist/{views → src/views}/team/member/TeamMemberList.vue.d.ts +0 -0
- /package/dist/{views → src/views}/team/member/TeamMemberMasterUser.vue.d.ts +0 -0
- /package/dist/{views → src/views}/team/permission-set/PermissionSetForm.vue.d.ts +0 -0
- /package/dist/{views → src/views}/team/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 w } from "@feedmepos/mf-common";
|
|
4
|
-
import { g as l, b as d, s as R } from "./index-
|
|
4
|
+
import { g as l, b as d, s as R } from "./index-Beu6IuhT.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-9lbKMy_9.js";
|
|
4
4
|
const E = (r) => {
|
|
5
5
|
async function d(u, e) {
|
|
6
6
|
var l, a;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as u, ref as r } from "vue";
|
|
2
|
-
import { e as y, a as l, R } from "./index-
|
|
2
|
+
import { e as y, a as l, R } from "./index-Beu6IuhT.js";
|
|
3
3
|
import { useCoreStore as h } from "@feedmepos/mf-common";
|
|
4
|
-
import "./app-
|
|
4
|
+
import "./app-CB3ye-CT.js";
|
|
5
5
|
const n = r([]), c = r(!1), t = r(!1), d = r(null);
|
|
6
6
|
function K() {
|
|
7
7
|
const m = h();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-hrm-portal",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7-dev",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"dev": "vite",
|
|
72
72
|
"build": "run-p type-check \"build-only {@}\" --",
|
|
73
73
|
"build:mf": "vite build --mode fmmf",
|
|
74
|
-
"build:dts": "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir ./dist
|
|
74
|
+
"build:dts": "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir ./dist",
|
|
75
75
|
"publish-npm": "pnpm build && pnpm publish --registry https://npm.pkg.github.com/ --access public --tag latest --no-git-checks",
|
|
76
76
|
"publish-npm:beta": "pnpm build && pnpm publish --registry https://npm.pkg.github.com/ --access public --tag beta --no-git-checks",
|
|
77
77
|
"publish-github": "pnpm build && pnpm publish --registry https://npm.pkg.github.com/ --tag latest --no-git-checks",
|
|
@@ -1,474 +0,0 @@
|
|
|
1
|
-
import { defineComponent as se, ref as _, computed as k, watch as R, resolveComponent as D, createElementBlock as m, openBlock as r, Fragment as A, createVNode as d, unref as s, withCtx as F, createElementVNode as e, createBlock as $, createCommentVNode as g, toDisplayString as a, renderList as ie, createTextVNode as Y } from "vue";
|
|
2
|
-
import { d as ne } from "./dayjs.min-COoXlyZR.js";
|
|
3
|
-
import { useI18n as de, useCoreStore as ce } from "@feedmepos/mf-common";
|
|
4
|
-
import { _ as re, L as ue } from "./app-D0y0UR-U.js";
|
|
5
|
-
import { _ as me } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
6
|
-
import { _ as fe } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
7
|
-
import { components as J } from "@feedmepos/ui-library";
|
|
8
|
-
import { g as pe, b as _e, p as G } from "./index-BPGh5yHT.js";
|
|
9
|
-
import { u as ve } from "./team-B0EB57-E.js";
|
|
10
|
-
import { S as U } from "./SelectFilter-NbXrJ4iH.js";
|
|
11
|
-
const ge = "/audit-logs", he = {
|
|
12
|
-
async read(n) {
|
|
13
|
-
var O, p, L, I;
|
|
14
|
-
const t = {
|
|
15
|
-
limit: (n == null ? void 0 : n.limit) ?? 100,
|
|
16
|
-
offset: (n == null ? void 0 : n.offset) ?? 0,
|
|
17
|
-
...n != null && n.from ? { from: n.from } : {},
|
|
18
|
-
...n != null && n.to ? { to: n.to } : {},
|
|
19
|
-
...(O = n == null ? void 0 : n.userIds) != null && O.length ? { userIds: n.userIds } : {},
|
|
20
|
-
...(p = n == null ? void 0 : n.subjects) != null && p.length ? { subjects: n.subjects } : {},
|
|
21
|
-
...(L = n == null ? void 0 : n.actions) != null && L.length ? { actions: n.actions } : {},
|
|
22
|
-
...(I = n == null ? void 0 : n.outcomes) != null && I.length ? { outcomes: n.outcomes } : {}
|
|
23
|
-
};
|
|
24
|
-
return console.log("[AuditLogAPI] request params:", t), pe(
|
|
25
|
-
await _e().get(ge, {
|
|
26
|
-
params: t,
|
|
27
|
-
// Serialize arrays as repeated params: key=val1&key=val2
|
|
28
|
-
// (NestJS @Query expects this; axios default adds brackets which break matching)
|
|
29
|
-
paramsSerializer: (l) => {
|
|
30
|
-
const y = new URLSearchParams();
|
|
31
|
-
for (const [f, v] of Object.entries(l))
|
|
32
|
-
if (Array.isArray(v))
|
|
33
|
-
for (const N of v) y.append(f, String(N));
|
|
34
|
-
else v != null && y.append(f, String(v));
|
|
35
|
-
return console.log("[AuditLogAPI] serialized query string:", y.toString()), y.toString();
|
|
36
|
-
}
|
|
37
|
-
})
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
}, be = {
|
|
41
|
-
class: "flex flex-1 flex-col gap-16 min-h-0"
|
|
42
|
-
}, xe = {
|
|
43
|
-
class: "flex items-center gap-8"
|
|
44
|
-
}, ye = {
|
|
45
|
-
class: "w-fit"
|
|
46
|
-
}, Le = {
|
|
47
|
-
class: "w-fit"
|
|
48
|
-
}, Se = {
|
|
49
|
-
class: "w-fit"
|
|
50
|
-
}, ke = {
|
|
51
|
-
class: "w-fit"
|
|
52
|
-
}, Ie = {
|
|
53
|
-
class: "flex h-full flex-col"
|
|
54
|
-
}, we = {
|
|
55
|
-
key: 0,
|
|
56
|
-
class: "flex shrink-0 items-center justify-end border-t border-fm-color-border-default py-4"
|
|
57
|
-
}, Te = {
|
|
58
|
-
class: "text-sm text-fm-color-typo-secondary"
|
|
59
|
-
}, je = {
|
|
60
|
-
key: 0,
|
|
61
|
-
class: "space-y-12 p-4 text-sm"
|
|
62
|
-
}, Pe = {
|
|
63
|
-
class: "rounded-lg border border-fm-color-border-default"
|
|
64
|
-
}, Ve = {
|
|
65
|
-
class: "flex items-start justify-between gap-8 p-12"
|
|
66
|
-
}, Ce = {
|
|
67
|
-
class: "text-base font-bold leading-snug text-fm-color-typo-primary flex-1 min-w-0"
|
|
68
|
-
}, De = {
|
|
69
|
-
class: "audit-log-operation-label-detail font-semibold"
|
|
70
|
-
}, Oe = {
|
|
71
|
-
class: "space-y-12 p-12"
|
|
72
|
-
}, Ne = {
|
|
73
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
74
|
-
}, Ae = {
|
|
75
|
-
class: "font-semibold"
|
|
76
|
-
}, Fe = {
|
|
77
|
-
key: 0
|
|
78
|
-
}, Ue = {
|
|
79
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
80
|
-
}, Be = {
|
|
81
|
-
class: "font-semibold"
|
|
82
|
-
}, Ee = {
|
|
83
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
84
|
-
}, Re = {
|
|
85
|
-
class: "break-all font-mono text-xs font-semibold"
|
|
86
|
-
}, qe = {
|
|
87
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
88
|
-
}, Me = {
|
|
89
|
-
class: "font-semibold"
|
|
90
|
-
}, ze = {
|
|
91
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
92
|
-
}, Ke = {
|
|
93
|
-
class: "font-semibold"
|
|
94
|
-
}, $e = {
|
|
95
|
-
key: 1
|
|
96
|
-
}, Ye = {
|
|
97
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
98
|
-
}, Je = {
|
|
99
|
-
class: "font-semibold"
|
|
100
|
-
}, Ge = {
|
|
101
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
102
|
-
}, Ze = {
|
|
103
|
-
class: "break-all font-mono text-xs font-semibold"
|
|
104
|
-
}, He = {
|
|
105
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
106
|
-
}, Qe = {
|
|
107
|
-
class: "font-semibold"
|
|
108
|
-
}, We = {
|
|
109
|
-
class: "rounded-lg border border-fm-color-border-default"
|
|
110
|
-
}, Xe = {
|
|
111
|
-
class: "p-12"
|
|
112
|
-
}, et = {
|
|
113
|
-
class: "text-base font-bold text-fm-color-typo-primary"
|
|
114
|
-
}, tt = {
|
|
115
|
-
class: "space-y-12 p-12"
|
|
116
|
-
}, ot = {
|
|
117
|
-
key: 0
|
|
118
|
-
}, lt = {
|
|
119
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
120
|
-
}, at = {
|
|
121
|
-
class: "font-semibold"
|
|
122
|
-
}, st = {
|
|
123
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
124
|
-
}, it = {
|
|
125
|
-
class: "font-semibold"
|
|
126
|
-
}, nt = {
|
|
127
|
-
key: 1
|
|
128
|
-
}, dt = {
|
|
129
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
130
|
-
}, ct = {
|
|
131
|
-
class: "font-semibold"
|
|
132
|
-
}, rt = {
|
|
133
|
-
class: "break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
134
|
-
}, ut = {
|
|
135
|
-
class: "font-semibold"
|
|
136
|
-
}, mt = {
|
|
137
|
-
key: 0,
|
|
138
|
-
class: "break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
139
|
-
}, ft = {
|
|
140
|
-
key: 2
|
|
141
|
-
}, pt = {
|
|
142
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
143
|
-
}, _t = {
|
|
144
|
-
class: "mt-4 space-y-4"
|
|
145
|
-
}, vt = {
|
|
146
|
-
class: "flex h-16 w-16 shrink-0 items-center justify-center rounded-full bg-fm-color-primary-default text-xs font-bold text-white"
|
|
147
|
-
}, gt = {
|
|
148
|
-
class: "text-xs font-semibold"
|
|
149
|
-
}, ht = {
|
|
150
|
-
key: 0,
|
|
151
|
-
class: "text-fm-color-typo-secondary"
|
|
152
|
-
}, bt = {
|
|
153
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
154
|
-
}, xt = {
|
|
155
|
-
class: "font-mono text-xs font-semibold"
|
|
156
|
-
}, yt = {
|
|
157
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
158
|
-
}, Lt = {
|
|
159
|
-
class: "break-all font-mono text-xs font-semibold"
|
|
160
|
-
}, St = {
|
|
161
|
-
key: 3
|
|
162
|
-
}, kt = {
|
|
163
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
164
|
-
}, It = {
|
|
165
|
-
class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner"
|
|
166
|
-
}, q = 100, Ft = /* @__PURE__ */ se({
|
|
167
|
-
__name: "AuditLogList",
|
|
168
|
-
setup(n) {
|
|
169
|
-
const {
|
|
170
|
-
t
|
|
171
|
-
} = de(), O = ce(), p = ve(), L = _(!1), I = _([]), l = _(null), y = _(!1), f = _(1), v = _(!1), N = ne().format("YYYY-MM-DD"), w = _({
|
|
172
|
-
startDate: N,
|
|
173
|
-
endDate: N
|
|
174
|
-
}), T = _(), j = _(), P = _(), V = _(), Z = k(() => p.members.map((i) => ({
|
|
175
|
-
label: i.name,
|
|
176
|
-
value: i.doc.userId
|
|
177
|
-
}))), H = k(() => G.map((i) => ({
|
|
178
|
-
label: i.label,
|
|
179
|
-
value: i.subject
|
|
180
|
-
}))), Q = k(() => [{
|
|
181
|
-
label: t("auditLog.action.manage"),
|
|
182
|
-
value: "manage"
|
|
183
|
-
}, {
|
|
184
|
-
label: t("auditLog.action.create"),
|
|
185
|
-
value: "create"
|
|
186
|
-
}, {
|
|
187
|
-
label: t("auditLog.action.read"),
|
|
188
|
-
value: "read"
|
|
189
|
-
}, {
|
|
190
|
-
label: t("auditLog.action.update"),
|
|
191
|
-
value: "update"
|
|
192
|
-
}, {
|
|
193
|
-
label: t("auditLog.action.delete"),
|
|
194
|
-
value: "delete"
|
|
195
|
-
}]), W = k(() => [{
|
|
196
|
-
label: t("auditLog.outcome.allowed"),
|
|
197
|
-
value: "allowed"
|
|
198
|
-
}, {
|
|
199
|
-
label: t("auditLog.outcome.denied"),
|
|
200
|
-
value: "denied"
|
|
201
|
-
}, {
|
|
202
|
-
label: t("auditLog.outcome.skipped"),
|
|
203
|
-
value: "skipped"
|
|
204
|
-
}]), X = k(() => {
|
|
205
|
-
const {
|
|
206
|
-
startDate: i,
|
|
207
|
-
endDate: o
|
|
208
|
-
} = w.value;
|
|
209
|
-
return i && o ? `${i} – ${o}` : i || o || t("auditLog.dateRange.placeholder");
|
|
210
|
-
}), B = k(() => I.value);
|
|
211
|
-
function M(i) {
|
|
212
|
-
var o;
|
|
213
|
-
return ((o = G.find((u) => u.subject === i)) == null ? void 0 : o.label) ?? ue[i];
|
|
214
|
-
}
|
|
215
|
-
const z = {
|
|
216
|
-
allowed: "success",
|
|
217
|
-
denied: "critical",
|
|
218
|
-
skipped: "warning"
|
|
219
|
-
}, ee = [{
|
|
220
|
-
accessorKey: "timestamp",
|
|
221
|
-
header: () => t("auditLog.columns.timestamp"),
|
|
222
|
-
cell(i) {
|
|
223
|
-
const o = i.row.original;
|
|
224
|
-
return new Date(o.timestamp).toLocaleString();
|
|
225
|
-
}
|
|
226
|
-
}, {
|
|
227
|
-
accessorKey: "userId",
|
|
228
|
-
header: () => t("auditLog.columns.user"),
|
|
229
|
-
enableSorting: !1,
|
|
230
|
-
size: 220,
|
|
231
|
-
cell(i) {
|
|
232
|
-
const o = i.row.original, u = p.userIdToName[o.userId], h = p.userIdToPhone[o.userId], b = p.userIdToEmail[o.userId];
|
|
233
|
-
return d("div", {
|
|
234
|
-
class: "flex items-center gap-8"
|
|
235
|
-
}, [d(J.FmAvatar, {
|
|
236
|
-
initials: u || o.userId,
|
|
237
|
-
size: "sm",
|
|
238
|
-
class: "shrink-0"
|
|
239
|
-
}, null), d("div", {
|
|
240
|
-
class: "min-w-0"
|
|
241
|
-
}, [u && d("p", {
|
|
242
|
-
class: "truncate font-semibold"
|
|
243
|
-
}, [u, h && d("span", {
|
|
244
|
-
class: "font-normal"
|
|
245
|
-
}, [Y(" ("), h, Y(")")])]), b && d("p", {
|
|
246
|
-
class: "truncate"
|
|
247
|
-
}, [b]), d("p", {
|
|
248
|
-
class: "truncate font-mono text-[10px] text-fm-color-typo-tertiary"
|
|
249
|
-
}, [o.userId])])]);
|
|
250
|
-
}
|
|
251
|
-
}, {
|
|
252
|
-
accessorKey: "subject",
|
|
253
|
-
header: () => t("auditLog.columns.subject"),
|
|
254
|
-
meta: {
|
|
255
|
-
cellClass: "text-left"
|
|
256
|
-
},
|
|
257
|
-
cell(i) {
|
|
258
|
-
const o = i.row.original, u = M(o.subject);
|
|
259
|
-
return u ? d("div", {
|
|
260
|
-
class: "text-left"
|
|
261
|
-
}, [d("span", null, [u]), d("p", {
|
|
262
|
-
class: "text-xs text-fm-color-typo-tertiary"
|
|
263
|
-
}, [o.subject])]) : d("div", {
|
|
264
|
-
class: "text-left"
|
|
265
|
-
}, [o.subject]);
|
|
266
|
-
}
|
|
267
|
-
}, {
|
|
268
|
-
accessorKey: "action",
|
|
269
|
-
header: () => t("auditLog.columns.action"),
|
|
270
|
-
enableSorting: !1
|
|
271
|
-
}, {
|
|
272
|
-
accessorKey: "operationLabel",
|
|
273
|
-
header: () => t("auditLog.columns.operation"),
|
|
274
|
-
enableSorting: !1,
|
|
275
|
-
size: 240,
|
|
276
|
-
meta: {
|
|
277
|
-
cellSpanClass: "audit-log-operation-label-table"
|
|
278
|
-
},
|
|
279
|
-
cell(i) {
|
|
280
|
-
return i.row.original.metadata.operationLabel ?? "-";
|
|
281
|
-
}
|
|
282
|
-
}, {
|
|
283
|
-
accessorKey: "outcome",
|
|
284
|
-
header: () => t("auditLog.columns.outcome"),
|
|
285
|
-
enableSorting: !1,
|
|
286
|
-
cell(i) {
|
|
287
|
-
const o = i.row.original;
|
|
288
|
-
return d(J.FmChip, {
|
|
289
|
-
variant: z[o.outcome] ?? "neutral",
|
|
290
|
-
label: o.outcome,
|
|
291
|
-
compact: !0
|
|
292
|
-
}, null);
|
|
293
|
-
}
|
|
294
|
-
}];
|
|
295
|
-
function K(i, o = !1) {
|
|
296
|
-
const [u, h, b] = i.split("-").map(Number), x = new Date(u, h - 1, b);
|
|
297
|
-
return o && x.setDate(x.getDate() + 1), x.toISOString().slice(0, 19).replace("T", " ");
|
|
298
|
-
}
|
|
299
|
-
async function C() {
|
|
300
|
-
var i, o, u, h;
|
|
301
|
-
L.value = !0;
|
|
302
|
-
try {
|
|
303
|
-
const {
|
|
304
|
-
startDate: b,
|
|
305
|
-
endDate: x
|
|
306
|
-
} = w.value, E = (f.value - 1) * q, c = {
|
|
307
|
-
limit: q,
|
|
308
|
-
offset: E,
|
|
309
|
-
// Convert local date boundaries to UTC ISO strings so ClickHouse
|
|
310
|
-
// (which stores timestamps in UTC) receives the correct range.
|
|
311
|
-
...b ? {
|
|
312
|
-
from: K(b)
|
|
313
|
-
} : {},
|
|
314
|
-
...x ? {
|
|
315
|
-
to: K(x, !0)
|
|
316
|
-
} : {},
|
|
317
|
-
...(i = T.value) != null && i.length ? {
|
|
318
|
-
userIds: T.value
|
|
319
|
-
} : {},
|
|
320
|
-
...(o = j.value) != null && o.length ? {
|
|
321
|
-
subjects: j.value
|
|
322
|
-
} : {},
|
|
323
|
-
...(u = V.value) != null && u.length ? {
|
|
324
|
-
actions: V.value
|
|
325
|
-
} : {},
|
|
326
|
-
...(h = P.value) != null && h.length ? {
|
|
327
|
-
outcomes: P.value
|
|
328
|
-
} : {}
|
|
329
|
-
}, S = await he.read(c);
|
|
330
|
-
I.value = S, v.value = S.length === q;
|
|
331
|
-
} finally {
|
|
332
|
-
L.value = !1;
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
R(w, () => {
|
|
336
|
-
f.value = 1, C();
|
|
337
|
-
}), R([T, j, P, V], () => {
|
|
338
|
-
f.value = 1, C();
|
|
339
|
-
});
|
|
340
|
-
async function te() {
|
|
341
|
-
f.value > 1 && (f.value--, await C());
|
|
342
|
-
}
|
|
343
|
-
async function oe() {
|
|
344
|
-
v.value && (f.value++, await C());
|
|
345
|
-
}
|
|
346
|
-
function le(i) {
|
|
347
|
-
l.value = i, y.value = !0;
|
|
348
|
-
}
|
|
349
|
-
function ae() {
|
|
350
|
-
y.value = !1, l.value = null;
|
|
351
|
-
}
|
|
352
|
-
return R(O.currentBusiness, (i) => {
|
|
353
|
-
i && (f.value = 1, p.readTeamMembers(), C());
|
|
354
|
-
}, {
|
|
355
|
-
immediate: !0
|
|
356
|
-
}), (i, o) => {
|
|
357
|
-
const u = D("FmChip"), h = D("FmDateRangePicker"), b = D("FmTable"), x = D("FmButton"), E = D("FmSideSheet");
|
|
358
|
-
return r(), m(A, null, [d(me, {
|
|
359
|
-
heading: s(t)("auditLog.title")
|
|
360
|
-
}, {
|
|
361
|
-
default: F(() => [e("div", be, [e("div", xe, [d(h, {
|
|
362
|
-
modelValue: w.value,
|
|
363
|
-
"onUpdate:modelValue": o[0] || (o[0] = (c) => w.value = c),
|
|
364
|
-
"show-predefined-range": ""
|
|
365
|
-
}, {
|
|
366
|
-
"trigger-button": F(() => [d(u, {
|
|
367
|
-
label: X.value,
|
|
368
|
-
icon: "calendar_month"
|
|
369
|
-
}, null, 8, ["label"])]),
|
|
370
|
-
_: 1
|
|
371
|
-
}, 8, ["modelValue"]), e("div", ye, [d(U, {
|
|
372
|
-
modelValue: T.value,
|
|
373
|
-
"onUpdate:modelValue": o[1] || (o[1] = (c) => T.value = c),
|
|
374
|
-
items: Z.value,
|
|
375
|
-
multiple: "",
|
|
376
|
-
variant: "dark",
|
|
377
|
-
placeholder: s(t)("auditLog.filter.user_placeholder"),
|
|
378
|
-
"selected-prefix": s(t)("auditLog.filter.selected_user_prefix"),
|
|
379
|
-
"chip-icon": "account_circle"
|
|
380
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", Le, [d(U, {
|
|
381
|
-
modelValue: j.value,
|
|
382
|
-
"onUpdate:modelValue": o[2] || (o[2] = (c) => j.value = c),
|
|
383
|
-
items: H.value,
|
|
384
|
-
multiple: "",
|
|
385
|
-
variant: "dark",
|
|
386
|
-
placeholder: s(t)("auditLog.filter.subject_placeholder"),
|
|
387
|
-
"selected-prefix": s(t)("auditLog.filter.selected_subject_prefix"),
|
|
388
|
-
"chip-icon": "badge"
|
|
389
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", Se, [d(U, {
|
|
390
|
-
modelValue: V.value,
|
|
391
|
-
"onUpdate:modelValue": o[3] || (o[3] = (c) => V.value = c),
|
|
392
|
-
items: Q.value,
|
|
393
|
-
multiple: "",
|
|
394
|
-
variant: "dark",
|
|
395
|
-
placeholder: s(t)("auditLog.filter.action_placeholder"),
|
|
396
|
-
"selected-prefix": s(t)("auditLog.filter.selected_action_prefix"),
|
|
397
|
-
searchable: !1
|
|
398
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", ke, [d(U, {
|
|
399
|
-
modelValue: P.value,
|
|
400
|
-
"onUpdate:modelValue": o[4] || (o[4] = (c) => P.value = c),
|
|
401
|
-
items: W.value,
|
|
402
|
-
multiple: "",
|
|
403
|
-
variant: "dark",
|
|
404
|
-
placeholder: s(t)("auditLog.filter.status_placeholder"),
|
|
405
|
-
"selected-prefix": s(t)("auditLog.filter.selected_status_prefix"),
|
|
406
|
-
searchable: !1,
|
|
407
|
-
"chip-icon": "check_circle"
|
|
408
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])]), !L.value && B.value.length === 0 ? (r(), $(s(fe), {
|
|
409
|
-
key: 0,
|
|
410
|
-
title: s(t)("auditLog.noData.title"),
|
|
411
|
-
subtitle: s(t)("auditLog.noData.subtitle")
|
|
412
|
-
}, null, 8, ["title", "subtitle"])) : (r(), $(re, {
|
|
413
|
-
key: 1
|
|
414
|
-
}, {
|
|
415
|
-
default: F(() => [e("div", Ie, [d(b, {
|
|
416
|
-
"column-defs": ee,
|
|
417
|
-
"row-data": B.value,
|
|
418
|
-
"page-size": B.value.length,
|
|
419
|
-
loading: L.value,
|
|
420
|
-
"pin-header-row": "",
|
|
421
|
-
"hide-footer": "",
|
|
422
|
-
class: "min-h-0 flex-1 cursor-pointer",
|
|
423
|
-
onRowClick: o[5] || (o[5] = (c) => le(c.original))
|
|
424
|
-
}, null, 8, ["row-data", "page-size", "loading"]), f.value > 1 || v.value ? (r(), m("div", we, [d(x, {
|
|
425
|
-
variant: "tertiary",
|
|
426
|
-
icon: "chevron_left",
|
|
427
|
-
disabled: f.value === 1,
|
|
428
|
-
"aria-label": s(t)("auditLog.pagination.prevPage"),
|
|
429
|
-
onClick: te
|
|
430
|
-
}, null, 8, ["disabled", "aria-label"]), e("span", Te, a(s(t)("auditLog.pagination.page", {
|
|
431
|
-
page: f.value
|
|
432
|
-
})), 1), d(x, {
|
|
433
|
-
variant: "tertiary",
|
|
434
|
-
icon: "chevron_right",
|
|
435
|
-
disabled: !v.value,
|
|
436
|
-
"aria-label": s(t)("auditLog.pagination.nextPage"),
|
|
437
|
-
onClick: oe
|
|
438
|
-
}, null, 8, ["disabled", "aria-label"])])) : g("", !0)])]),
|
|
439
|
-
_: 1
|
|
440
|
-
}))])]),
|
|
441
|
-
_: 1
|
|
442
|
-
}, 8, ["heading"]), d(E, {
|
|
443
|
-
header: s(t)("auditLog.detail.header"),
|
|
444
|
-
"model-value": y.value,
|
|
445
|
-
"max-width": 480,
|
|
446
|
-
"dismiss-away": "",
|
|
447
|
-
"onUpdate:modelValue": o[6] || (o[6] = (c) => {
|
|
448
|
-
c || ae();
|
|
449
|
-
})
|
|
450
|
-
}, {
|
|
451
|
-
default: F(() => [l.value ? (r(), m("div", je, [e("div", Pe, [e("div", Ve, [e("div", Ce, [e("p", De, a(l.value.metadata.operationLabel || "-"), 1)]), d(u, {
|
|
452
|
-
variant: z[l.value.outcome] ?? "neutral",
|
|
453
|
-
label: l.value.outcome,
|
|
454
|
-
compact: ""
|
|
455
|
-
}, null, 8, ["variant", "label"])]), o[7] || (o[7] = e("hr", {
|
|
456
|
-
class: "border-fm-color-border-default"
|
|
457
|
-
}, null, -1)), e("div", Oe, [e("div", null, [e("p", Ne, a(s(t)("auditLog.detail.timestamp")), 1), e("p", Ae, a(new Date(l.value.timestamp).toLocaleString()), 1)]), s(p).userIdToName[l.value.userId] ? (r(), m("div", Fe, [e("p", Ue, a(s(t)("auditLog.detail.user")), 1), e("p", Be, a(s(p).userIdToName[l.value.userId]), 1)])) : g("", !0), e("div", null, [e("p", Ee, a(s(t)("auditLog.detail.email")), 1), e("p", Re, a(s(p).userIdToEmail[l.value.userId] || l.value.userId), 1)]), e("div", null, [e("p", qe, a(s(t)("auditLog.detail.action")), 1), e("p", Me, a(l.value.action), 1)]), e("div", null, [e("p", ze, a(s(t)("auditLog.detail.subject")), 1), e("p", Ke, a(M(l.value.subject) || l.value.subject), 1)]), l.value.field ? (r(), m("div", $e, [e("p", Ye, a(s(t)("auditLog.detail.field")), 1), e("p", Je, a(l.value.field), 1)])) : g("", !0), e("div", null, [e("p", Ge, a(s(t)("auditLog.detail.business")), 1), e("p", Ze, a(l.value.businessId || "-"), 1)]), e("div", null, [e("p", He, a(s(t)("auditLog.detail.restaurant")), 1), e("p", Qe, a(l.value.restaurantId || "-"), 1)])])]), e("div", We, [e("div", Xe, [e("p", et, a(s(t)("auditLog.detail.metadata")), 1)]), o[8] || (o[8] = e("hr", {
|
|
458
|
-
class: "border-fm-color-border-default"
|
|
459
|
-
}, null, -1)), e("div", tt, [l.value.metadata.reason ? (r(), m("div", ot, [e("p", lt, a(s(t)("auditLog.detail.reason")), 1), e("p", at, a(l.value.metadata.reason), 1)])) : g("", !0), e("div", null, [e("p", st, a(s(t)("auditLog.detail.resolvedFrom")), 1), e("p", it, a(l.value.metadata.resolvedFrom), 1)]), l.value.metadata.permissionSetId ? (r(), m("div", nt, [e("p", dt, a(s(t)("auditLog.detail.permissionSet")), 1), l.value.metadata.resolvedFrom === "systemPermissionSet" ? (r(), m(A, {
|
|
460
|
-
key: 0
|
|
461
|
-
}, [e("p", ct, a(l.value.metadata.permissionSetName) + " (system)", 1), e("p", rt, a(l.value.metadata.permissionSetId), 1)], 64)) : (r(), m(A, {
|
|
462
|
-
key: 1
|
|
463
|
-
}, [e("p", ut, a(l.value.metadata.permissionSetName || l.value.metadata.permissionSetId), 1), l.value.metadata.permissionSetName ? (r(), m("p", mt, a(l.value.metadata.permissionSetId), 1)) : g("", !0)], 64))])) : g("", !0), l.value.metadata.trace && l.value.metadata.trace.length > 0 ? (r(), m("div", ft, [e("p", pt, a(s(t)("auditLog.detail.permissionTrace")), 1), e("ol", _t, [(r(!0), m(A, null, ie(l.value.metadata.trace, (c, S) => (r(), m("li", {
|
|
464
|
-
key: S,
|
|
465
|
-
class: "flex items-center gap-6"
|
|
466
|
-
}, [e("span", vt, a(S + 1), 1), e("span", gt, a(c), 1), S < l.value.metadata.trace.length - 1 ? (r(), m("span", ht, "→")) : g("", !0)]))), 128))])])) : g("", !0), e("div", null, [e("p", bt, a(s(t)("auditLog.detail.requestMethod")), 1), e("p", xt, a(l.value.metadata.requestMethod), 1)]), e("div", null, [e("p", yt, a(s(t)("auditLog.detail.requestPath")), 1), e("p", Lt, a(l.value.metadata.requestPath), 1)]), l.value.metadata.requestBody && Object.keys(l.value.metadata.requestBody).length > 0 ? (r(), m("div", St, [e("p", kt, a(s(t)("auditLog.detail.requestBody")), 1), e("pre", It, a(JSON.stringify(l.value.metadata.requestBody, null, 2)), 1)])) : g("", !0)])])])) : g("", !0)]),
|
|
467
|
-
_: 1
|
|
468
|
-
}, 8, ["header", "model-value"])], 64);
|
|
469
|
-
};
|
|
470
|
-
}
|
|
471
|
-
});
|
|
472
|
-
export {
|
|
473
|
-
Ft as default
|
|
474
|
-
};
|