Skip to content

Commit

Permalink
fix(Admin UI): correct route config for site-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
sleidig committed Jul 2, 2024
1 parent cfd437c commit b7877ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/app/core/admin/admin.routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const adminRoutes: Routes = [
component: RoutedViewComponent,
data: {
component: "AdminEntityTypes",
entity: "Config",
entityType: "Config",
requiredPermissionOperation: "update",
},
canActivate: [EntityPermissionGuard],
Expand All @@ -35,7 +35,7 @@ export const adminRoutes: Routes = [
component: RoutedViewComponent,
data: {
component: "AdminEntity",
entity: "Config",
entityType: "Config",
requiredPermissionOperation: "update",
},
canActivate: [EntityPermissionGuard],
Expand All @@ -47,7 +47,7 @@ export const adminRoutes: Routes = [
data: {
component: "EntityDetails",
config: {
entity: "SiteSettings",
entityType: "SiteSettings",
id: "global",
panels: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,15 @@ export class EntityActionsMenuComponent implements OnChanges {

private filterAvailableActions() {
this.actions = this.defaultActions.filter((action) => {
if (!this.entity) {
return false;
}

switch (action.action) {
case "archive":
return this.entity?.isActive && !this.entity?.anonymized;
return this.entity.isActive && !this.entity.anonymized;
case "anonymize":
return (
!this.entity?.anonymized && this.entity?.getConstructor().hasPII
);
return !this.entity.anonymized && this.entity.getConstructor().hasPII;
default:
return true;
}
Expand Down

0 comments on commit b7877ac

Please sign in to comment.