fix(console): toast login handler, show user session loginname, policy value incrementation, accessibility (#413)

* get auth policy, fix increment from 0

* seo, accessibility

* ngsw rem check for update

* organize interceptors

* toast i18n part1

* show loginname

* use primary color

* toast login handler, fix user session type

* Update console/src/assets/i18n/de.json

Co-authored-by: Florian Forster <[email protected]>

* Update console/src/assets/i18n/de.json

Co-authored-by: Florian Forster <[email protected]>

* Update console/src/assets/i18n/de.json

Co-authored-by: Florian Forster <[email protected]>

* Update console/src/assets/i18n/en.json

Co-authored-by: Florian Forster <[email protected]>

* Update console/src/index.html

Co-authored-by: Florian Forster <[email protected]>

* Update console/src/assets/i18n/en.json

Co-authored-by: Florian Forster <[email protected]>

* Update console/src/assets/i18n/en.json

Co-authored-by: Florian Forster <[email protected]>

Co-authored-by: Florian Forster <[email protected]>
This commit is contained in:
Max Peintner
2020-07-09 10:54:55 +02:00
committed by GitHub
co-authored by Florian Forster
parent fa57cc48c1
commit 0721acf605
69 changed files with 796 additions and 675 deletions
@@ -56,7 +56,6 @@ export class UserGrantsComponent implements OnInit, AfterViewInit {
grantId: this.grantId,
userId: this.userId,
};
console.log(this.context);
switch (this.context) {
case UserGrantContext.OWNED_PROJECT:
@@ -78,7 +77,6 @@ export class UserGrantsComponent implements OnInit, AfterViewInit {
default:
this.routerLink = ['/grant-create'];
}
console.log(data);
this.dataSource.loadGrants(this.context, 0, 25, data);
}
@@ -129,20 +127,18 @@ export class UserGrantsComponent implements OnInit, AfterViewInit {
updateRoles(grant: UserGrant.AsObject, selectionChange: MatSelectChange): void {
this.userService.UpdateUserGrant(grant.id, grant.userId, selectionChange.value)
.then((newmember: UserGrant) => {
this.toast.showInfo('Grant updated!');
.then(() => {
this.toast.showInfo('GRANTS.TOAST.UPDATED', true);
}).catch(error => {
this.toast.showError(error.message);
this.toast.showError(error);
});
}
deleteGrantSelection(): void {
this.userService.BulkRemoveUserGrant(this.selection.selected.map(grant => grant.id)).then(() => {
this.toast.showInfo('Grants deleted');
this.toast.showInfo('GRANTS.TOAST.BULKREMOVED', true);
const data = this.dataSource.grantsSubject.getValue();
console.log(data);
this.selection.selected.forEach((item) => {
console.log(item);
const index = data.findIndex(i => i.id === item.id);
if (index > -1) {
data.splice(index, 1);
@@ -151,7 +147,7 @@ export class UserGrantsComponent implements OnInit, AfterViewInit {
});
this.selection.clear();
}).catch(error => {
this.toast.showError(error.message);
this.toast.showError(error);
});
}
}