251209:1453 Frontend: progress nest = UAT & Bug Fixing
Some checks failed
Spec Validation / validate-markdown (push) Has been cancelled
Spec Validation / validate-diagrams (push) Has been cancelled
Spec Validation / check-todos (push) Has been cancelled

This commit is contained in:
admin
2025-12-09 14:53:42 +07:00
parent 8aceced902
commit aa96cd90e3
125 changed files with 11052 additions and 785 deletions

View File

@@ -1,20 +1,27 @@
import apiClient from "@/lib/api/client";
export interface AuditLogRaw {
audit_log_id: number;
user_id: number;
user_name?: string;
export interface AuditLog {
auditId: string;
userId?: number | null;
user?: {
id: number;
fullName?: string;
username: string;
};
action: string;
entity_type: string;
entity_id: string; // or number
description: string;
ip_address?: string;
created_at: string;
severity: string;
entityType?: string;
entityId?: string;
detailsJson?: any;
ipAddress?: string;
userAgent?: string;
createdAt: string;
}
export const auditLogService = {
getLogs: async (params?: any) => {
const response = await apiClient.get<AuditLogRaw[]>("/audit-logs", { params });
return response.data;
}
const response = await apiClient.get<any>("/audit-logs", { params });
// Support both wrapped and unwrapped scenarios
return response.data.data || response.data;
},
};