File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export const adminRoutes: Routes = [
2525 component : RoutedViewComponent ,
2626 data : {
2727 component : "AdminEntityTypes" ,
28- entity : "Config" ,
28+ entityType : "Config" ,
2929 requiredPermissionOperation : "update" ,
3030 } ,
3131 canActivate : [ EntityPermissionGuard ] ,
@@ -35,7 +35,7 @@ export const adminRoutes: Routes = [
3535 component : RoutedViewComponent ,
3636 data : {
3737 component : "AdminEntity" ,
38- entity : "Config" ,
38+ entityType : "Config" ,
3939 requiredPermissionOperation : "update" ,
4040 } ,
4141 canActivate : [ EntityPermissionGuard ] ,
@@ -47,7 +47,7 @@ export const adminRoutes: Routes = [
4747 data : {
4848 component : "EntityDetails" ,
4949 config : {
50- entity : "SiteSettings" ,
50+ entityType : "SiteSettings" ,
5151 id : "global" ,
5252 panels : [
5353 {
Original file line number Diff line number Diff line change @@ -111,13 +111,15 @@ export class EntityActionsMenuComponent implements OnChanges {
111111
112112 private filterAvailableActions ( ) {
113113 this . actions = this . defaultActions . filter ( ( action ) => {
114+ if ( ! this . entity ) {
115+ return false ;
116+ }
117+
114118 switch ( action . action ) {
115119 case "archive" :
116- return this . entity ? .isActive && ! this . entity ? .anonymized ;
120+ return this . entity . isActive && ! this . entity . anonymized ;
117121 case "anonymize" :
118- return (
119- ! this . entity ?. anonymized && this . entity ?. getConstructor ( ) . hasPII
120- ) ;
122+ return ! this . entity . anonymized && this . entity . getConstructor ( ) . hasPII ;
121123 default :
122124 return true ;
123125 }
You can’t perform that action at this time.
0 commit comments