File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 73
73
<Input
74
74
type =" number"
75
75
v-model =" selected[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n]"
76
- class =" w-full "
76
+ class =" w-full min-w-[80px] "
77
77
:fullWidth =" true"
78
78
/>
79
79
</div >
Original file line number Diff line number Diff line change @@ -387,6 +387,35 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
387
387
}
388
388
}
389
389
}
390
+ try {
391
+ const AuditLogPlugin = this . adminforth . getPluginByClassName ( 'AuditLogPlugin' ) ;
392
+ if ( AuditLogPlugin ) {
393
+
394
+ for ( const [ key , value ] of Object . entries ( oldRecord ) ) {
395
+ if ( ! ( key in fieldsToUpdate [ idx ] ) ) {
396
+ delete oldRecord [ key ] ;
397
+ }
398
+ }
399
+
400
+ const reorderedOldRecord = Object . keys ( fieldsToUpdate [ idx ] ) . reduce ( ( acc , key ) => {
401
+ if ( key in oldRecord ) {
402
+ acc [ key ] = oldRecord [ key ] ;
403
+ }
404
+ return acc ;
405
+ } , { } as Record < string , unknown > ) ;
406
+
407
+ AuditLogPlugin . logCustomAction ( {
408
+ resourceId : this . resourceConfig . resourceId ,
409
+ recordId : ID ,
410
+ actionId : 'Bulk-ai-flow' ,
411
+ oldData : reorderedOldRecord ,
412
+ data : fieldsToUpdate [ idx ] ,
413
+ user : adminUser ,
414
+ headers : headers
415
+ } ) ;
416
+ }
417
+ } catch ( error ) { }
418
+
390
419
return this . adminforth . resource ( this . resourceConfig . resourceId ) . update ( ID , fieldsToUpdate [ idx ] )
391
420
} ) ;
392
421
await Promise . all ( updates ) ;
You can’t perform that action at this time.
0 commit comments