@@ -167,16 +167,16 @@ export class AuditLogger {
167167 }
168168
169169 // Transform the data to include admin name and email
170- const logs = data ?. map ( ( log : any ) => ( {
171- id : log . id ,
172- admin_id : log . admin_id ,
173- action_type : log . action_type ,
174- target_resource : log . target_resource ,
175- target_id : log . target_id ,
176- metadata : log . metadata ,
177- ip_address : log . ip_address ,
178- user_agent : log . user_agent ,
179- created_at : log . created_at ,
170+ const logs = data ?. map ( ( log : Record < string , unknown > ) => ( {
171+ id : log . id as string ,
172+ admin_id : log . admin_id as string ,
173+ action_type : log . action_type as AuditActionType ,
174+ target_resource : log . target_resource as string ,
175+ target_id : log . target_id as string | undefined ,
176+ metadata : log . metadata as Record < string , unknown > ,
177+ ip_address : log . ip_address as string | undefined ,
178+ user_agent : log . user_agent as string | undefined ,
179+ created_at : log . created_at as string ,
180180 admin_name : 'Admin User' , // Will be populated when profiles table is available
181181 admin_email : 'admin@codeunia.com' // Will be populated when profiles table is available
182182 } ) ) || [ ] ;
@@ -231,8 +231,8 @@ export class AuditLogger {
231231 . gte ( 'created_at' , startDate . toISOString ( ) ) ;
232232
233233 const actionsByTypeMap : Record < string , number > = { } ;
234- actionsByType ?. forEach ( ( action : any ) => {
235- actionsByTypeMap [ action . action_type ] = ( actionsByTypeMap [ action . action_type ] || 0 ) + 1 ;
234+ actionsByType ?. forEach ( ( action : Record < string , unknown > ) => {
235+ actionsByTypeMap [ action . action_type as string ] = ( actionsByTypeMap [ action . action_type as string ] || 0 ) + 1 ;
236236 } ) ;
237237
238238 // Get actions by admin
@@ -242,8 +242,8 @@ export class AuditLogger {
242242 . gte ( 'created_at' , startDate . toISOString ( ) ) ;
243243
244244 const adminCounts : Record < string , { name : string ; count : number } > = { } ;
245- actionsByAdmin ?. forEach ( ( action : any ) => {
246- const adminId = action . admin_id ;
245+ actionsByAdmin ?. forEach ( ( action : Record < string , unknown > ) => {
246+ const adminId = action . admin_id as string ;
247247 const adminName = 'Admin User' ; // Will be populated when profiles table is available
248248
249249 if ( ! adminCounts [ adminId ] ) {
0 commit comments