show message that users needs to be confirmed
This commit is contained in:
parent
c37359cdfd
commit
226aa0b3ba
|
@ -29,55 +29,60 @@
|
||||||
<i class="fa fa-spinner fa-spin text-muted" *ngIf="loading" title="{{'loading' | i18n}}"></i>
|
<i class="fa fa-spinner fa-spin text-muted" *ngIf="loading" title="{{'loading' | i18n}}"></i>
|
||||||
<ng-container *ngIf="!loading && (users | search:searchText:'name':'email':'id') as searchedUsers">
|
<ng-container *ngIf="!loading && (users | search:searchText:'name':'email':'id') as searchedUsers">
|
||||||
<p *ngIf="!searchedUsers.length">{{'noUsersInList' | i18n}}</p>
|
<p *ngIf="!searchedUsers.length">{{'noUsersInList' | i18n}}</p>
|
||||||
<table class="table table-hover table-list" *ngIf="searchedUsers.length">
|
<ng-container *ngIf="searchedUsers.length">
|
||||||
<tbody>
|
<app-callout type="info" title="{{'confirmUsers' | i18n}}" icon="fa-check-circle" *ngIf="showConfirmUsers">
|
||||||
<tr *ngFor="let u of searchedUsers">
|
{{'usersNeedConfirmed' | i18n}}
|
||||||
<td width="30">
|
</app-callout>
|
||||||
<app-avatar [data]="u.name || u.email" [email]="u.email" size="25" [circle]="true" [fontSize]="14"></app-avatar>
|
<table class="table table-hover table-list">
|
||||||
</td>
|
<tbody>
|
||||||
<td>
|
<tr *ngFor="let u of searchedUsers">
|
||||||
<a href="#" appStopClick (click)="edit(u)">{{u.email}}</a>
|
<td width="30">
|
||||||
<span class="badge badge-secondary" *ngIf="u.status === organizationUserStatusType.Invited">{{'invited' | i18n}}</span>
|
<app-avatar [data]="u.name || u.email" [email]="u.email" size="25" [circle]="true" [fontSize]="14"></app-avatar>
|
||||||
<span class="badge badge-warning" *ngIf="u.status === organizationUserStatusType.Accepted">{{'accepted' | i18n}}</span>
|
</td>
|
||||||
<small class="text-muted d-block" *ngIf="u.name">{{u.name}}</small>
|
<td>
|
||||||
</td>
|
<a href="#" appStopClick (click)="edit(u)">{{u.email}}</a>
|
||||||
<td>
|
<span class="badge badge-secondary" *ngIf="u.status === organizationUserStatusType.Invited">{{'invited' | i18n}}</span>
|
||||||
<span *ngIf="u.type === organizationUserType.Owner">{{'owner' | i18n}}</span>
|
<span class="badge badge-warning" *ngIf="u.status === organizationUserStatusType.Accepted">{{'accepted' | i18n}}</span>
|
||||||
<span *ngIf="u.type === organizationUserType.Admin">{{'admin' | i18n}}</span>
|
<small class="text-muted d-block" *ngIf="u.name">{{u.name}}</small>
|
||||||
<span *ngIf="u.type === organizationUserType.User">{{'user' | i18n}}</span>
|
</td>
|
||||||
</td>
|
<td>
|
||||||
<td class="table-list-options">
|
<span *ngIf="u.type === organizationUserType.Owner">{{'owner' | i18n}}</span>
|
||||||
<div class="dropdown" appListDropdown>
|
<span *ngIf="u.type === organizationUserType.Admin">{{'admin' | i18n}}</span>
|
||||||
<button class="btn btn-outline-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<span *ngIf="u.type === organizationUserType.User">{{'user' | i18n}}</span>
|
||||||
<i class="fa fa-cog fa-lg"></i>
|
</td>
|
||||||
</button>
|
<td class="table-list-options">
|
||||||
<div class="dropdown-menu dropdown-menu-right">
|
<div class="dropdown" appListDropdown>
|
||||||
<a class="dropdown-item" href="#" appStopClick (click)="reinvite(u)" *ngIf="u.status === organizationUserStatusType.Invited">
|
<button class="btn btn-outline-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
<i class="fa fa-fw fa-envelope-o"></i>
|
<i class="fa fa-cog fa-lg"></i>
|
||||||
{{'resendInvitation' | i18n}}
|
</button>
|
||||||
</a>
|
<div class="dropdown-menu dropdown-menu-right">
|
||||||
<a class="dropdown-item text-success" href="#" appStopClick (click)="confirm(u)" *ngIf="u.status === organizationUserStatusType.Accepted">
|
<a class="dropdown-item" href="#" appStopClick (click)="reinvite(u)" *ngIf="u.status === organizationUserStatusType.Invited">
|
||||||
<i class="fa fa-fw fa-check"></i>
|
<i class="fa fa-fw fa-envelope-o"></i>
|
||||||
{{'confirm' | i18n}}
|
{{'resendInvitation' | i18n}}
|
||||||
</a>
|
</a>
|
||||||
<a class="dropdown-item" href="#" appStopClick (click)="groups(u)" *ngIf="accessGroups">
|
<a class="dropdown-item text-success" href="#" appStopClick (click)="confirm(u)" *ngIf="u.status === organizationUserStatusType.Accepted">
|
||||||
<i class="fa fa-fw fa-sitemap"></i>
|
<i class="fa fa-fw fa-check"></i>
|
||||||
{{'groups' | i18n}}
|
{{'confirm' | i18n}}
|
||||||
</a>
|
</a>
|
||||||
<a class="dropdown-item" href="#" appStopClick (click)="events(u)" *ngIf="accessEvents && u.status === organizationUserStatusType.Confirmed">
|
<a class="dropdown-item" href="#" appStopClick (click)="groups(u)" *ngIf="accessGroups">
|
||||||
<i class="fa fa-fw fa-file-text-o"></i>
|
<i class="fa fa-fw fa-sitemap"></i>
|
||||||
{{'eventLogs' | i18n}}
|
{{'groups' | i18n}}
|
||||||
</a>
|
</a>
|
||||||
<a class="dropdown-item text-danger" href="#" appStopClick (click)="remove(u)">
|
<a class="dropdown-item" href="#" appStopClick (click)="events(u)" *ngIf="accessEvents && u.status === organizationUserStatusType.Confirmed">
|
||||||
<i class="fa fa-fw fa-remove"></i>
|
<i class="fa fa-fw fa-file-text-o"></i>
|
||||||
{{'remove' | i18n}}
|
{{'eventLogs' | i18n}}
|
||||||
</a>
|
</a>
|
||||||
|
<a class="dropdown-item text-danger" href="#" appStopClick (click)="remove(u)">
|
||||||
|
<i class="fa fa-fw fa-remove"></i>
|
||||||
|
{{'remove' | i18n}}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
</tbody>
|
||||||
</tbody>
|
</table>
|
||||||
</table>
|
</ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-template #addEdit></ng-template>
|
<ng-template #addEdit></ng-template>
|
||||||
<ng-template #groupsTemplate></ng-template>
|
<ng-template #groupsTemplate></ng-template>
|
||||||
|
|
|
@ -228,6 +228,15 @@ export class PeopleComponent implements OnInit {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get showConfirmUsers(): boolean {
|
||||||
|
return this.allUsers != null && this.allUsers.length > 1 &&
|
||||||
|
this.statusMap.has(OrganizationUserStatusType.Confirmed) &&
|
||||||
|
this.statusMap.get(OrganizationUserStatusType.Confirmed).length > 0 &&
|
||||||
|
this.statusMap.get(OrganizationUserStatusType.Confirmed).length < 3 &&
|
||||||
|
this.statusMap.has(OrganizationUserStatusType.Accepted) &&
|
||||||
|
this.statusMap.get(OrganizationUserStatusType.Accepted).length > 0;
|
||||||
|
}
|
||||||
|
|
||||||
private async doConfirmation(user: OrganizationUserUserDetailsResponse) {
|
private async doConfirmation(user: OrganizationUserUserDetailsResponse) {
|
||||||
const orgKey = await this.cryptoService.getOrgKey(this.organizationId);
|
const orgKey = await this.cryptoService.getOrgKey(this.organizationId);
|
||||||
const publicKeyResponse = await this.apiService.getUserPublicKey(user.userId);
|
const publicKeyResponse = await this.apiService.getUserPublicKey(user.userId);
|
||||||
|
|
|
@ -2102,6 +2102,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"confirmUsers": {
|
||||||
|
"message": "Confirm Users"
|
||||||
|
},
|
||||||
|
"usersNeedConfirmed": {
|
||||||
|
"message": "You have users that have accepted their invitation, but still need to be confirmed. Users will not have access to the organization until they are confirmed."
|
||||||
|
},
|
||||||
"startDate": {
|
"startDate": {
|
||||||
"message": "Start Date"
|
"message": "Start Date"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue