fix(console): create user route, common mixin for app grid, avatar (#505)

* warn color, move themed conf to destination

* fix user creation

* cleanup create component
This commit is contained in:
Max Peintner
2020-07-22 14:40:37 +02:00
committed by GitHub
parent c66d9d3490
commit 7dcc5f9e58
12 changed files with 85 additions and 140 deletions
@@ -8,6 +8,14 @@ import { PasswordComponent } from './password/password.component';
import { UserDetailComponent } from './user-detail/user-detail.component';
const routes: Routes = [
{
path: 'create',
loadChildren: () => import('../user-create/user-create.module').then(m => m.UserCreateModule),
canActivate: [AuthGuard, RoleGuard],
data: {
roles: ['user.write'],
},
},
{
path: 'me',
component: AuthUserDetailComponent,
@@ -9,10 +9,10 @@
<span class="fill-space"></span>
<ng-template appHasRole [appHasRole]="['user.write', 'user.write:'+user?.id]">
<button mat-stroked-button color="accent" *ngIf="user?.state === UserState.USERSTATE_ACTIVE"
<button mat-stroked-button color="warn" *ngIf="user?.state === UserState.USERSTATE_ACTIVE"
class="state-button"
(click)="changeState(UserState.USERSTATE_INACTIVE)">{{'USER.PAGES.DEACTIVATE' | translate}}</button>
<button mat-stroked-button color="accent" *ngIf="user?.state === UserState.USERSTATE_INACTIVE"
<button mat-stroked-button color="warn" *ngIf="user?.state === UserState.USERSTATE_INACTIVE"
class="state-button"
(click)="changeState(UserState.USERSTATE_ACTIVE)">{{'USER.PAGES.REACTIVATE' | translate}}</button>
</ng-template>