2021-10-21 23:30:25 +02:00
|
|
|
<div class="modal fade" role="dialog" aria-modal="true" aria-labelledby="userAccessTitle">
|
2021-05-14 21:03:45 +02:00
|
|
|
<div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
|
2018-10-18 04:20:42 +02:00
|
|
|
<form
|
|
|
|
class="modal-content"
|
|
|
|
#form
|
|
|
|
(ngSubmit)="submit()"
|
|
|
|
[appApiAction]="formPromise"
|
|
|
|
ngNativeValidate
|
|
|
|
>
|
2018-07-10 05:48:26 +02:00
|
|
|
<div class="modal-header">
|
2022-09-20 13:14:04 +02:00
|
|
|
<h1 class="modal-title" id="userAccessTitle">
|
2018-07-10 05:48:26 +02:00
|
|
|
{{ "userAccess" | i18n }}
|
|
|
|
<small>{{ entityName }}</small>
|
2022-09-20 13:14:04 +02:00
|
|
|
</h1>
|
2019-10-11 17:22:21 +02:00
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="close"
|
|
|
|
data-dismiss="modal"
|
|
|
|
appA11yTitle="{{ 'close' | i18n }}"
|
|
|
|
>
|
2018-07-10 05:48:26 +02:00
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
2018-10-18 18:15:13 +02:00
|
|
|
<div class="modal-body" *ngIf="loading || !users">
|
2019-10-11 16:35:24 +02:00
|
|
|
<i
|
2022-01-27 18:25:58 +01:00
|
|
|
class="bwi bwi-spinner bwi-spin text-muted"
|
2019-10-11 16:35:24 +02:00
|
|
|
title="{{ 'loading' | i18n }}"
|
|
|
|
aria-hidden="true"
|
|
|
|
></i>
|
|
|
|
<span class="sr-only">{{ "loading" | i18n }}</span>
|
2018-07-10 05:48:26 +02:00
|
|
|
</div>
|
2022-05-13 21:52:58 +02:00
|
|
|
<cdk-virtual-scroll-viewport
|
|
|
|
itemSize="46"
|
|
|
|
minBufferPx="600"
|
|
|
|
maxBufferPx="1200"
|
|
|
|
[style]="scrollViewportStyle"
|
2019-02-21 22:50:37 +01:00
|
|
|
>
|
2022-05-13 21:52:58 +02:00
|
|
|
<div class="modal-body" *ngIf="!loading && users && searchedUsers">
|
|
|
|
<div class="d-flex">
|
|
|
|
<div class="mr-3">
|
|
|
|
<label class="sr-only" for="search">{{ "search" | i18n }}</label>
|
|
|
|
<input
|
|
|
|
type="search"
|
|
|
|
class="form-control form-control-sm"
|
|
|
|
id="search"
|
|
|
|
placeholder="{{ 'search' | i18n }}"
|
|
|
|
name="SearchText"
|
|
|
|
[(ngModel)]="searchText"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group btn-group-sm" role="group">
|
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="btn btn-outline-secondary"
|
|
|
|
[ngClass]="{ active: !showSelected }"
|
|
|
|
(click)="filterSelected(false)"
|
|
|
|
>
|
|
|
|
{{ "all" | i18n }}
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="btn btn-outline-secondary"
|
|
|
|
[ngClass]="{ active: showSelected }"
|
|
|
|
(click)="filterSelected(true)"
|
|
|
|
>
|
|
|
|
{{ "selected" | i18n }}
|
2022-07-04 11:00:13 +02:00
|
|
|
<span bitBadge badgeType="info" *ngIf="selectedCount">{{ selectedCount }}</span>
|
2022-05-13 21:52:58 +02:00
|
|
|
</button>
|
|
|
|
</div>
|
2018-10-18 18:15:13 +02:00
|
|
|
</div>
|
2022-05-13 21:52:58 +02:00
|
|
|
<ng-container *ngIf="!searchedUsers.length">
|
|
|
|
<hr />
|
|
|
|
{{ "noUsersInList" | i18n }}
|
|
|
|
</ng-container>
|
|
|
|
<table class="table table-hover table-list mb-0" [hidden]="!searchedUsers.length">
|
2018-10-18 18:15:13 +02:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th> </th>
|
|
|
|
<th> </th>
|
|
|
|
<th>{{ "name" | i18n }}</th>
|
|
|
|
<th *ngIf="entity === 'collection'"> </th>
|
|
|
|
<th>{{ "userType" | i18n }}</th>
|
|
|
|
<th width="100" class="text-center" *ngIf="entity === 'collection'">
|
2020-05-21 15:55:58 +02:00
|
|
|
{{ "hidePasswords" | i18n }}
|
2021-12-17 15:57:11 +01:00
|
|
|
</th>
|
2020-05-21 15:55:58 +02:00
|
|
|
<th width="100" class="text-center" *ngIf="entity === 'collection'">
|
2018-10-18 18:15:13 +02:00
|
|
|
{{ "readOnly" | i18n }}
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2022-05-13 21:52:58 +02:00
|
|
|
<tr *cdkVirtualFor="let u of searchedUsers" class="">
|
2018-10-18 18:15:13 +02:00
|
|
|
<td class="table-list-checkbox" (click)="check(u)">
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
[(ngModel)]="u.checked"
|
|
|
|
name="{{ u.id.substr(0, 8) }}_Checked"
|
2019-02-21 22:50:37 +01:00
|
|
|
[disabled]="entity === 'collection' && u.accessAll"
|
|
|
|
(change)="selectedChanged(u)"
|
|
|
|
appStopProp
|
|
|
|
/>
|
2018-10-18 18:15:13 +02:00
|
|
|
</td>
|
|
|
|
<td width="30" (click)="check(u)">
|
2022-10-27 14:38:34 +02:00
|
|
|
<bit-avatar [text]="u | userName" [id]="u.id" size="small"></bit-avatar>
|
2018-10-18 18:15:13 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{ u.email }}
|
2019-02-21 22:50:37 +01:00
|
|
|
<span
|
2022-07-04 11:00:13 +02:00
|
|
|
bitBadge
|
|
|
|
badgeType="secondary"
|
2019-02-21 22:50:37 +01:00
|
|
|
*ngIf="u.status === organizationUserStatusType.Invited"
|
2018-10-18 18:15:13 +02:00
|
|
|
>{{ "invited" | i18n }}</span
|
|
|
|
>
|
2019-02-21 22:50:37 +01:00
|
|
|
<span
|
2022-07-04 11:00:13 +02:00
|
|
|
bitBadge
|
|
|
|
badgeType="warning"
|
2019-02-21 22:50:37 +01:00
|
|
|
*ngIf="u.status === organizationUserStatusType.Accepted"
|
2018-10-18 18:15:13 +02:00
|
|
|
>{{ "accepted" | i18n }}</span
|
|
|
|
>
|
|
|
|
<small class="text-muted d-block" *ngIf="u.name">{{ u.name }}</small>
|
|
|
|
</td>
|
|
|
|
<td *ngIf="entity === 'collection'">
|
2019-10-11 16:35:24 +02:00
|
|
|
<ng-container *ngIf="u.accessAll">
|
2019-10-11 17:22:21 +02:00
|
|
|
<i
|
2022-01-27 18:25:58 +01:00
|
|
|
class="bwi bwi-filter"
|
2019-10-11 17:22:21 +02:00
|
|
|
title="{{ 'userAccessAllItems' | i18n }}"
|
|
|
|
aria-hidden="true"
|
|
|
|
></i>
|
2019-10-11 16:35:24 +02:00
|
|
|
<span class="sr-only">{{ "userAccessAllItems" | i18n }}</span>
|
|
|
|
</ng-container>
|
2018-10-18 18:15:13 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<span *ngIf="u.type === organizationUserType.Owner">{{ "owner" | i18n }}</span>
|
|
|
|
<span *ngIf="u.type === organizationUserType.Admin">{{ "admin" | i18n }}</span>
|
|
|
|
<span *ngIf="u.type === organizationUserType.Manager">{{
|
|
|
|
"manager" | i18n
|
|
|
|
}}</span>
|
|
|
|
<span *ngIf="u.type === organizationUserType.User">{{ "user" | i18n }}</span>
|
2021-01-15 00:08:26 +01:00
|
|
|
<span *ngIf="u.type === organizationUserType.Custom">{{ "custom" | i18n }}</span>
|
2018-10-18 18:15:13 +02:00
|
|
|
</td>
|
2020-05-21 15:55:58 +02:00
|
|
|
<td class="text-center" *ngIf="entity === 'collection'">
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
[(ngModel)]="u.hidePasswords"
|
|
|
|
name="{{ u.id.substr(0, 8) }}_HidePasswords"
|
|
|
|
[disabled]="u.accessAll || !u.checked"
|
|
|
|
/>
|
|
|
|
</td>
|
2018-10-18 18:15:13 +02:00
|
|
|
<td class="text-center" *ngIf="entity === 'collection'">
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
[(ngModel)]="u.readOnly"
|
|
|
|
name="{{ u.id.substr(0, 8) }}_ReadOnly"
|
|
|
|
[disabled]="u.accessAll || !u.checked"
|
|
|
|
/>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2022-05-13 21:52:58 +02:00
|
|
|
</div>
|
|
|
|
</cdk-virtual-scroll-viewport>
|
2018-07-10 05:48:26 +02:00
|
|
|
<div class="modal-footer">
|
2018-10-18 04:20:42 +02:00
|
|
|
<button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading">
|
2022-01-27 18:25:58 +01:00
|
|
|
<i class="bwi bwi-spinner bwi-spin" title="{{ 'loading' | i18n }}" aria-hidden="true"></i>
|
2018-10-18 04:20:42 +02:00
|
|
|
<span>{{ "save" | i18n }}</span>
|
|
|
|
</button>
|
2018-07-10 05:48:26 +02:00
|
|
|
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">
|
|
|
|
{{ "close" | i18n }}
|
|
|
|
</button>
|
|
|
|
</div>
|
2018-10-18 04:20:42 +02:00
|
|
|
</form>
|
2018-07-10 05:48:26 +02:00
|
|
|
</div>
|
|
|
|
</div>
|