-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(auth): refresh contexts list when login or logout
- Loading branch information
Showing
7 changed files
with
144 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127 changes: 65 additions & 62 deletions
127
src/lib/context/context-permissions/context-permissions.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,65 @@ | ||
<igo-list *ngIf="permissions"> | ||
<ng-template ngFor let-groupPermissions [ngForOf]="permissions | keyvalue"> | ||
<igo-collapsible | ||
*ngIf="groupPermissions.value.length" | ||
[title]="'igo.permission.' + groupPermissions.key | translate"> | ||
|
||
<ng-template ngFor let-permission [ngForOf]="groupPermissions.value"> | ||
<md-list-item> | ||
<md-icon md-list-avatar>perm_identity</md-icon> | ||
<h4 md-line>{{permission.profil}}</h4> | ||
|
||
<div igoStopPropagation | ||
class="igo-actions-container"> | ||
|
||
<button | ||
md-icon-button | ||
[md-tooltip]="'igo.permission.delete' | translate" | ||
color="warn" | ||
(click)="removePermission.emit(permission)"> | ||
<md-icon>delete</md-icon> | ||
</button> | ||
</div> | ||
|
||
</md-list-item> | ||
</ng-template> | ||
</igo-collapsible> | ||
</ng-template> | ||
</igo-list> | ||
|
||
<form class="igo-form" [formGroup]="form" | ||
(ngSubmit)="handleFormSubmit(form.value)"> | ||
|
||
<md-form-field class="full-width"> | ||
<input mdInput required | ||
[placeholder]="'igo.permission.profil' | translate" | ||
formControlName="profil"> | ||
<md-error> | ||
{{ 'igo.permission.profilRequired' | translate }} | ||
</md-error> | ||
</md-form-field> | ||
|
||
|
||
<md-radio-group formControlName="typePermission"> | ||
<md-radio-button value="read"> | ||
{{ 'igo.permission.read' | translate }} | ||
</md-radio-button> | ||
<md-radio-button value="write"> | ||
{{ 'igo.permission.write' | translate }} | ||
</md-radio-button> | ||
</md-radio-group> | ||
|
||
|
||
<div class="igo-form-button-group"> | ||
<button | ||
md-raised-button | ||
type="submit" | ||
[disabled]="!form.valid"> | ||
{{ 'igo.permission.addBtn' | translate }} | ||
</button> | ||
</div> | ||
|
||
</form> | ||
<div *ngIf="context"> | ||
<igo-list *ngIf="permissions"> | ||
<ng-template ngFor let-groupPermissions [ngForOf]="permissions | keyvalue"> | ||
<igo-collapsible | ||
*ngIf="groupPermissions.value.length" | ||
[title]="'igo.permission.' + groupPermissions.key | translate"> | ||
|
||
<ng-template ngFor let-permission [ngForOf]="groupPermissions.value"> | ||
<md-list-item> | ||
<md-icon md-list-avatar>perm_identity</md-icon> | ||
<h4 md-line>{{permission.profil}}</h4> | ||
|
||
<div igoStopPropagation | ||
class="igo-actions-container"> | ||
|
||
<button | ||
md-icon-button | ||
[md-tooltip]="'igo.permission.delete' | translate" | ||
color="warn" | ||
(click)="removePermission.emit(permission)"> | ||
<md-icon>delete</md-icon> | ||
</button> | ||
</div> | ||
|
||
</md-list-item> | ||
</ng-template> | ||
</igo-collapsible> | ||
</ng-template> | ||
</igo-list> | ||
|
||
<form class="igo-form" [formGroup]="form" | ||
(ngSubmit)="handleFormSubmit(form.value)"> | ||
|
||
<md-form-field class="full-width"> | ||
<input mdInput required | ||
[placeholder]="'igo.permission.profil' | translate" | ||
formControlName="profil"> | ||
<md-error> | ||
{{ 'igo.permission.profilRequired' | translate }} | ||
</md-error> | ||
</md-form-field> | ||
|
||
|
||
<md-radio-group formControlName="typePermission"> | ||
<md-radio-button value="read"> | ||
{{ 'igo.permission.read' | translate }} | ||
</md-radio-button> | ||
<md-radio-button value="write"> | ||
{{ 'igo.permission.write' | translate }} | ||
</md-radio-button> | ||
</md-radio-group> | ||
|
||
|
||
<div class="igo-form-button-group"> | ||
<button | ||
md-raised-button | ||
type="submit" | ||
[disabled]="!form.valid"> | ||
{{ 'igo.permission.addBtn' | translate }} | ||
</button> | ||
</div> | ||
|
||
</form> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
<div *ngFor="let tool of tools" class="toolSection"> | ||
<md-checkbox | ||
[ngModel]="verifyIfContextToolExist(tool.id)" | ||
(change)="handleToolChange($event, tool)"> | ||
{{tool.title || tool.name}} | ||
</md-checkbox> | ||
<div *ngIf="context"> | ||
<div *ngFor="let tool of tools" class="toolSection"> | ||
<md-checkbox | ||
[ngModel]="verifyIfContextToolExist(tool.id)" | ||
(change)="handleToolChange($event, tool)"> | ||
{{tool.title || tool.name}} | ||
</md-checkbox> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters