add permissions to registration
This commit is contained in:
parent
de7b2f507e
commit
35411505f8
@ -65,6 +65,16 @@
|
||||
</mat-card>
|
||||
</form>
|
||||
|
||||
|
||||
<div *ngIf="!success && permissions && permissions[0]">
|
||||
<h3>{{'permissions' | i18n}}</h3>
|
||||
<app-permissions [permissions]="permissions"></app-permissions>
|
||||
</div>
|
||||
<div *ngIf="!success && quotas && quotas[0]">
|
||||
<h3>{{'quotas' | i18n}}</h3>
|
||||
<app-quotas [quotas]="quotas"></app-quotas>
|
||||
</div>
|
||||
|
||||
<mat-card *ngIf="success">
|
||||
<mat-card-content>
|
||||
<h2>{{'register.success.title' | i18n}}</h2>
|
||||
@ -75,4 +85,5 @@
|
||||
{{'register.login' | i18n}}
|
||||
</a>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</mat-card>
|
||||
|
||||
|
@ -8,6 +8,8 @@ import {UserService} from './../../services/user.service';
|
||||
import {ItemService} from './../../services/item.service';
|
||||
import {I18nService} from './../../services/i18n.service';
|
||||
import {MatchingValidator} from './../../utils/matching.validator';
|
||||
import { PermissionService } from './../../services/permission.service';
|
||||
import { QuotaService } from './../../services/quota.service';
|
||||
|
||||
import {uniqueNamesGenerator, Config, adjectives, colors, animals} from 'unique-names-generator';
|
||||
|
||||
@ -25,6 +27,8 @@ export class RegisterComponent implements OnInit {
|
||||
public success: boolean;
|
||||
public working: boolean;
|
||||
items = [];
|
||||
permissions = [];
|
||||
quotas = [];
|
||||
currentLocale: String;
|
||||
model: any = {
|
||||
username: '',
|
||||
@ -37,6 +41,8 @@ export class RegisterComponent implements OnInit {
|
||||
private userService: UserService,
|
||||
private itemService: ItemService,
|
||||
private i18n: I18nService,
|
||||
private permissionService: PermissionService,
|
||||
private quotaService: QuotaService,
|
||||
public dialog: MatDialog) {
|
||||
this.currentLocale = this.i18n.getLocale();
|
||||
}
|
||||
@ -55,6 +61,14 @@ export class RegisterComponent implements OnInit {
|
||||
this.itemService.items().subscribe((data: any) => {
|
||||
this.items = data;
|
||||
});
|
||||
|
||||
this.permissionService.permissionsNew().subscribe((data: any) => {
|
||||
this.permissions = data;
|
||||
})
|
||||
|
||||
this.quotaService.quotasNew().subscribe((data: any) => {
|
||||
this.quotas = data;
|
||||
})
|
||||
}
|
||||
|
||||
onPrimaryChange() {
|
||||
|
@ -104,6 +104,9 @@
|
||||
"openBlob": "Anzeigen",
|
||||
"type": {
|
||||
".": "Typ",
|
||||
"BLOB": {
|
||||
".": "Binärblob"
|
||||
},
|
||||
"BOOL": {
|
||||
".": "Boolean"
|
||||
},
|
||||
|
@ -104,6 +104,9 @@
|
||||
"openBlob": "Display",
|
||||
"type": {
|
||||
".": "Type",
|
||||
"BLOB": {
|
||||
".": "Binary blob"
|
||||
},
|
||||
"BOOL": {
|
||||
".": "Boolean"
|
||||
},
|
||||
|
@ -22,7 +22,7 @@ $light-theme: mat-light-theme((color: (primary: $light-primary,
|
||||
// Define an alternate dark theme.
|
||||
$dark-theme: mat-dark-theme((color: (primary: $dark-primary,
|
||||
accent: $light-accent,
|
||||
warn: $dark-warn,
|
||||
warn: $light-warn,
|
||||
)));
|
||||
|
||||
// Include theme styles for core and each component used in your app.
|
||||
|
@ -15,6 +15,6 @@ $dark-warn: mat-palette($mat-deep-orange);
|
||||
|
||||
.dark-theme {
|
||||
$primary: mat-color($dark-primary);
|
||||
$accent: mat-color($dark-accent);
|
||||
$warn: mat-color($dark-warn);
|
||||
$accent: mat-color($light-accent);
|
||||
$warn: mat-color($light-warn);
|
||||
}
|
Loading…
Reference in New Issue
Block a user