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
@@ -42,9 +42,6 @@ export class ProjectMembersComponent implements AfterViewInit {
this.getRoleOptions();
this.route.params.subscribe(params => {
console.log(params);
console.log(this.projectType);
this.projectService.GetProjectById(params.projectid).then(project => {
this.project = project.toObject();
this.dataSource = new ProjectMembersDataSource(this.projectService);
@@ -69,13 +66,13 @@ export class ProjectMembersComponent implements AfterViewInit {
this.projectService.GetProjectGrantMemberRoles().then(resp => {
this.memberRoleOptions = resp.toObject().rolesList;
}).catch(error => {
this.toast.showError(error.message);
this.toast.showError(error);
});
} else if (this.projectType === ProjectType.PROJECTTYPE_OWNED) {
this.projectService.GetProjectMemberRoles().then(resp => {
this.memberRoleOptions = resp.toObject().rolesList;
}).catch(error => {
this.toast.showError(error.message);
this.toast.showError(error);
});
}
}
@@ -92,18 +89,18 @@ export class ProjectMembersComponent implements AfterViewInit {
public removeProjectMemberSelection(): void {
Promise.all(this.selection.selected.map(member => {
return this.projectService.RemoveProjectMember(this.project.projectId, member.userId).then(() => {
this.toast.showInfo('Removed successfully');
this.toast.showInfo('PROJECT.TOAST.MEMBERREMOVED', true);
}).catch(error => {
this.toast.showError(error.message);
this.toast.showError(error);
});
}));
}
public removeMember(member: ProjectMember.AsObject): void {
this.projectService.RemoveProjectMember(this.project.projectId, member.userId).then(() => {
this.toast.showInfo('Member removed successfully');
this.toast.showInfo('PROJECT.TOAST.MEMBERREMOVED', true);
}).catch(error => {
this.toast.showError(error.message);
this.toast.showError(error);
});
}
@@ -137,9 +134,9 @@ export class ProjectMembersComponent implements AfterViewInit {
Promise.all(users.map(user => {
return this.projectService.AddProjectMember(this.project.projectId, user.id, roles);
})).then(() => {
this.toast.showError('members added');
this.toast.showInfo('PROJECT.TOAST.MEMBERSADDED', true);
}).catch(error => {
this.toast.showError(error.message);
this.toast.showError(error);
});
}
}
@@ -147,13 +144,11 @@ export class ProjectMembersComponent implements AfterViewInit {
}
updateRoles(member: ProjectMember.AsObject, selectionChange: MatSelectChange): void {
console.log(member, selectionChange.value);
this.projectService.ChangeProjectMember(this.project.projectId, member.userId, selectionChange.value)
.then((newmember: ProjectMember) => {
console.log(newmember.toObject());
this.toast.showInfo('Member updated!');
this.toast.showInfo('PROJECT.TOAST.MEMBERADDED', true);
}).catch(error => {
this.toast.showError(error.message);
this.toast.showError(error);
});
}
}