-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from HSG-Library/develop
Add the possibilty to customize the set of roles to copy
- Loading branch information
Showing
47 changed files
with
2,562 additions
and
2,379 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export const AppConfig = { | ||
pageSize: 30 | ||
} | ||
pageSize: 30, | ||
httpHeader: { 'Content-Type': 'application/json', 'Accept': 'application/json' } | ||
} |
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
128 changes: 65 additions & 63 deletions
128
cloudapp/src/app/components/configuration/configuration.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,69 +1,71 @@ | ||
<!-- action buttons --> | ||
<div class="eca-actions"> | ||
<button mat-flat-button color="secondary" (click)="back()"> | ||
<mat-icon>arrow_back</mat-icon> {{'config.backButton' | translate }} | ||
</button> | ||
<button mat-flat-button color="primary" (click)="save()" [disabled]="saving || !dirty">{{'config.saveButton' | translate}}</button> | ||
</div> | ||
<!-- /action buttons --> | ||
<mat-card> | ||
<h1 translate>config.allowUsage</h1> | ||
<p translate>config.allowUsageExplanation</p> | ||
<div id="copy-user-roles-config"> | ||
<!-- action buttons --> | ||
<div class="eca-actions"> | ||
<button mat-flat-button color="secondary" (click)="back()"> | ||
<mat-icon>arrow_back</mat-icon> {{'config.backButton' | translate }} | ||
</button> | ||
<button mat-flat-button color="primary" (click)="save()" [disabled]="saving || !dirty">{{'config.saveButton' | translate}}</button> | ||
</div> | ||
<!-- /action buttons --> | ||
<section> | ||
<h1 translate>config.allowUsage</h1> | ||
<p translate>config.allowUsageExplanation</p> | ||
|
||
<!-- allow usage for user --> | ||
<mat-card> | ||
<h1 translate>config.allowByUser</h1> | ||
<div *ngIf="allowedUsers.size > 0"> | ||
<div class="cur-allowed-users-title-bar"> | ||
<p class="bold" translate> | ||
config.allowedUsers | ||
</p> | ||
<button mat-icon-button [disabled]="allowedUsersSelection.length == 0" (click)="removeAllowedUsers()"> | ||
<mat-icon>delete</mat-icon> | ||
</button> | ||
<!-- allow usage for user --> | ||
<section> | ||
<h1 translate>config.allowByUser</h1> | ||
<div *ngIf="allowedUsers.size > 0"> | ||
<div class="cur-allowed-users-title-bar"> | ||
<p class="bold" translate> | ||
config.allowedUsers | ||
</p> | ||
<button mat-icon-button [disabled]="allowedUsersSelection.length == 0" (click)="removeAllowedUsers()"> | ||
<mat-icon>delete</mat-icon> | ||
</button> | ||
</div> | ||
<mat-selection-list class="allowed-users-list" | ||
[multiple]=" true" | ||
[(ngModel)]="allowedUsersSelection" | ||
(ngModelChange)="selectAllowedUsers($event)"> | ||
<mat-list-option class="list-option" | ||
*ngFor="let allowedUser of allowedUsers" | ||
[value]="allowedUser"> | ||
<div matLine> | ||
<span class="uxf-icon uxf-user leading-icon"></span> | ||
{{allowedUser.last_name}}, {{allowedUser.first_name}} - {{allowedUser?.user_group?.desc.trim()}} | ||
[{{allowedUser?.user_group?.value}}] | ||
</div> | ||
</mat-list-option> | ||
</mat-selection-list> | ||
</div> | ||
<mat-selection-list class="allowed-users-list" | ||
|
||
<p class="bold" translate> | ||
config.searchForUser | ||
</p> | ||
<app-find-user (selectedUserOutput)="addAllowedUser($event)"></app-find-user> | ||
</section> | ||
<!-- /allow usage for user --> | ||
<!-- allow usage for role --> | ||
<section> | ||
<h1 translate>config.allowByRole</h1> | ||
<p *ngIf="allowedUsers.size > 0"><b translate>config.rolesAndUsersAreExclusive</b></p> | ||
<p translate>config.allowUsersWithRoleText</p> | ||
<mat-selection-list [disabled]="allowedUsers.size > 0" | ||
[multiple]=" true" | ||
[(ngModel)]="allowedUsersSelection" | ||
(ngModelChange)="selectAllowedUsers($event)"> | ||
<mat-list-option class="list-option" | ||
*ngFor="let allowedUser of allowedUsers" | ||
[value]="allowedUser"> | ||
<div matLine> | ||
<span class="uxf-icon uxf-user leading-icon"></span> | ||
{{allowedUser.last_name}}, {{allowedUser.first_name}} - {{allowedUser?.user_group?.desc.trim()}} | ||
[{{allowedUser?.user_group?.value}}] | ||
</div> | ||
</mat-list-option> | ||
[(ngModel)]="allowedRolesSelection" | ||
(ngModelChange)="selectAllowedRole($event)"> | ||
<mat-list-option class="list-option" [value]="0" [disabled]="allowedRolesSelection.length > 0 && !allowedRolesSelection.includes(0)">{{'config.allowAnyRole' | translate }}</mat-list-option> | ||
<mat-list-option class="list-option" [value]="26" [disabled]="allowedRolesSelection.includes(0)">{{'config.allowForGeneralAdministrator' | translate }}</mat-list-option> | ||
<mat-list-option class="list-option" [value]="50" [disabled]="allowedRolesSelection.includes(0)">{{'config.allowForUserAdministrator' | translate }}</mat-list-option> | ||
</mat-selection-list> | ||
</section> | ||
<!-- /allow usage for role --> | ||
<div class="eca-actions"> | ||
<button mat-flat-button color="secondary" (click)="removeConfig()"> | ||
<mat-icon>delete</mat-icon> {{'config.removeConfig' | translate }} | ||
</button> | ||
</div> | ||
|
||
<p class="bold" translate> | ||
config.searchForUser | ||
</p> | ||
<app-find-user (selectedUserOutput)="addAllowedUser($event)"></app-find-user> | ||
</mat-card> | ||
<!-- /allow usage for user --> | ||
<!-- allow usage for role --> | ||
<mat-card> | ||
<h1 translate>config.allowByRole</h1> | ||
<p *ngIf="allowedUsers.size > 0"><b translate>config.rolesAndUsersAreExclusive</b></p> | ||
<p translate>config.allowUsersWithRoleText</p> | ||
<mat-selection-list [disabled]="allowedUsers.size > 0" | ||
[multiple]=" true" | ||
[(ngModel)]="allowedRolesSelection" | ||
(ngModelChange)="selectAllowedRole($event)"> | ||
<mat-list-option class="list-option" [value]="0" [disabled]="allowedRolesSelection.length > 0 && !allowedRolesSelection.includes(0)">{{'config.allowAnyRole' | translate }}</mat-list-option> | ||
<mat-list-option class="list-option" [value]="26" [disabled]="allowedRolesSelection.includes(0)">{{'config.allowForGeneralAdministrator' | translate }}</mat-list-option> | ||
<mat-list-option class="list-option" [value]="50" [disabled]="allowedRolesSelection.includes(0)">{{'config.allowForUserAdministrator' | translate }}</mat-list-option> | ||
</mat-selection-list> | ||
</mat-card> | ||
<!-- /allow usage for role --> | ||
<div class="eca-actions"> | ||
<button mat-flat-button color="secondary" (click)="removeConfig()"> | ||
<mat-icon>delete</mat-icon> {{'config.removeConfig' | translate }} | ||
</button> | ||
</div> | ||
|
||
</mat-card> | ||
<app-loader [loading]="loading"></app-loader> | ||
</section> | ||
<app-loader [loading]="loading"></app-loader> | ||
</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
Oops, something went wrong.