@@ -160,6 +160,21 @@ export default class AuditLogPlugin extends AdminForthPlugin {
160160 return ;
161161 }
162162
163+ resource . options = resource . options || { } as any ;
164+ resource . options . pageInjections = resource . options . pageInjections || { } as any ;
165+ resource . options . pageInjections . show = resource . options . pageInjections . show || { } as any ;
166+ if ( ! resource . options . pageInjections . show . bottom ) {
167+ resource . options . pageInjections . show . bottom = [ ] as any [ ] ;
168+ } else if ( ! Array . isArray ( resource . options . pageInjections . show . bottom ) ) {
169+ resource . options . pageInjections . show . bottom = [ resource . options . pageInjections . show . bottom ] as any [ ] ;
170+ }
171+ {
172+ const bottom = resource . options . pageInjections . show . bottom as any [ ] ;
173+ const compDecl = { file : this . componentPath ( 'RelatedLogsLink.vue' ) , meta : { ...this . options , pluginInstanceId : this . pluginInstanceId , auditLogResourceId : this . auditLogResource , ADMIN_BASE_URL : ( this . adminforth as any ) ?. config ?. baseUrlSlashed || '' } } as any ;
174+ const already = bottom . some ( ( d : any ) => d ?. file === compDecl . file ) ;
175+ if ( ! already ) bottom . push ( compDecl ) ;
176+ }
177+
163178 if ( this . auditLogResource === resource . resourceId ) {
164179 let diffColumn = resource . columns . find ( ( c ) => c . name === this . options . resourceColumns . resourceDataColumnName ) ;
165180 if ( ! diffColumn ) {
@@ -189,6 +204,19 @@ export default class AuditLogPlugin extends AdminForthPlugin {
189204 columnName : this . options . resourceColumns . resourceCreatedColumnName ,
190205 direction : AdminForthSortDirections . desc
191206 }
207+
208+ resource . options = resource . options || { } as any ;
209+ resource . options . pageInjections = resource . options . pageInjections || { } as any ;
210+ resource . options . pageInjections . show = resource . options . pageInjections . show || { } as any ;
211+ if ( ! resource . options . pageInjections . show . bottom ) {
212+ resource . options . pageInjections . show . bottom = [ ] as any [ ] ;
213+ } else if ( ! Array . isArray ( resource . options . pageInjections . show . bottom ) ) {
214+ resource . options . pageInjections . show . bottom = [ resource . options . pageInjections . show . bottom ] as any [ ] ;
215+ }
216+ const bottom = resource . options . pageInjections . show . bottom as any [ ] ;
217+ const compDecl = { file : this . componentPath ( 'RelatedLogsLink.vue' ) , meta : { ...this . options , pluginInstanceId : this . pluginInstanceId , auditLogResourceId : this . auditLogResource , ADMIN_BASE_URL : ( this . adminforth as any ) ?. config ?. baseUrlSlashed || '' } } as any ;
218+ const already = bottom . some ( ( d : any ) => d ?. file === compDecl . file ) ;
219+ if ( ! already ) bottom . push ( compDecl ) ;
192220 return ;
193221 } ;
194222
0 commit comments