|
|
|
@ -20,108 +20,86 @@ |
|
|
|
</div> |
|
|
|
<div class="card-body"> |
|
|
|
<div id="data-tables-table-filter" class="data-tables-filter"> |
|
|
|
<label |
|
|
|
><input |
|
|
|
<div class="input-group"> |
|
|
|
<input |
|
|
|
type="search" |
|
|
|
class="form-control form-control-sm" |
|
|
|
class="form-control" |
|
|
|
[placeholder]="'AbpUi::PagerSearch' | abpLocalization" |
|
|
|
(input.debounce)="onSearch($event.target.value)" |
|
|
|
/></label> |
|
|
|
[(ngModel)]="list.filter" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<abp-table |
|
|
|
*ngIf="[150, 250, 250, 250] as columnWidths" |
|
|
|
[abpLoading]="loading" |
|
|
|
[abpLoadingDelay]="500" |
|
|
|
[abpTableSort]="{ key: sortKey, order: sortOrder }" |
|
|
|
[colgroupTemplate]="tableColGroup" |
|
|
|
[headerTemplate]="tableHeader" |
|
|
|
[bodyTemplate]="tableBody" |
|
|
|
[value]="data$ | async" |
|
|
|
[rows]="pageQuery.maxResultCount" |
|
|
|
[totalRecords]="totalCount$ | async" |
|
|
|
[scrollable]="true" |
|
|
|
(pageChange)="onPageChange($event)" |
|
|
|
|
|
|
|
<ngx-datatable |
|
|
|
[rows]="data$ | async" |
|
|
|
[loadingIndicator]="list.isLoading$ | async" |
|
|
|
[externalSorting]="true" |
|
|
|
(sort)="sort($event)" |
|
|
|
[externalPaging]="true" |
|
|
|
[count]="totalCount$ | async" |
|
|
|
[offset]="list.page - 1" |
|
|
|
[limit]="list.maxResultCount" |
|
|
|
(page)="list.page = $event.offset + 1" |
|
|
|
[headerHeight]="50" |
|
|
|
[footerHeight]="50" |
|
|
|
columnMode="force" |
|
|
|
rowHeight="auto" |
|
|
|
class="material" |
|
|
|
> |
|
|
|
<ng-template #tableColGroup> |
|
|
|
<colgroup> |
|
|
|
<col *ngFor="let width of columnWidths" [ngStyle]="{ 'width.px': width || undefined }" /> |
|
|
|
</colgroup> |
|
|
|
</ng-template> |
|
|
|
<ng-template #tableHeader> |
|
|
|
<tr> |
|
|
|
<th>{{ 'AbpIdentity::Actions' | abpLocalization }}</th> |
|
|
|
<th (click)="sortOrderIcon.sort('userName')"> |
|
|
|
{{ 'AbpIdentity::UserName' | abpLocalization }} |
|
|
|
<abp-sort-order-icon |
|
|
|
#sortOrderIcon |
|
|
|
sortKey="userName" |
|
|
|
[(selectedSortKey)]="sortKey" |
|
|
|
[(order)]="sortOrder" |
|
|
|
> |
|
|
|
</abp-sort-order-icon> |
|
|
|
</th> |
|
|
|
<th (click)="sortOrderIcon.sort('email')"> |
|
|
|
{{ 'AbpIdentity::EmailAddress' | abpLocalization }} |
|
|
|
<abp-sort-order-icon |
|
|
|
sortKey="email" |
|
|
|
[(selectedSortKey)]="sortKey" |
|
|
|
[(order)]="sortOrder" |
|
|
|
></abp-sort-order-icon> |
|
|
|
</th> |
|
|
|
<th (click)="sortOrderIcon.sort('phoneNumber')"> |
|
|
|
{{ 'AbpIdentity::PhoneNumber' | abpLocalization }} |
|
|
|
<abp-sort-order-icon |
|
|
|
sortKey="phoneNumber" |
|
|
|
[(selectedSortKey)]="sortKey" |
|
|
|
[(order)]="sortOrder" |
|
|
|
<ngx-datatable-column |
|
|
|
[name]="'AbpIdentity::Actions' | abpLocalization" |
|
|
|
[maxWidth]="150" |
|
|
|
[sortable]="false" |
|
|
|
> |
|
|
|
<ng-template let-row="row" ngx-datatable-cell-template> |
|
|
|
<div ngbDropdown container="body" class="d-inline-block"> |
|
|
|
<button |
|
|
|
class="btn btn-primary btn-sm dropdown-toggle" |
|
|
|
data-toggle="dropdown" |
|
|
|
aria-haspopup="true" |
|
|
|
ngbDropdownToggle |
|
|
|
> |
|
|
|
</abp-sort-order-icon> |
|
|
|
</th> |
|
|
|
</tr> |
|
|
|
</ng-template> |
|
|
|
<ng-template #tableBody let-data> |
|
|
|
<tr> |
|
|
|
<td class="text-center"> |
|
|
|
<div ngbDropdown container="body" class="d-inline-block"> |
|
|
|
<i class="fa fa-cog mr-1"></i>{{ 'AbpIdentity::Actions' | abpLocalization }} |
|
|
|
</button> |
|
|
|
<div ngbDropdownMenu> |
|
|
|
<button |
|
|
|
class="btn btn-primary btn-sm dropdown-toggle" |
|
|
|
data-toggle="dropdown" |
|
|
|
aria-haspopup="true" |
|
|
|
ngbDropdownToggle |
|
|
|
*abpPermission="'AbpIdentity.Users.Update'" |
|
|
|
ngbDropdownItem |
|
|
|
(click)="edit(row.id)" |
|
|
|
> |
|
|
|
<i class="fa fa-cog mr-1"></i>{{ 'AbpIdentity::Actions' | abpLocalization }} |
|
|
|
{{ 'AbpIdentity::Edit' | abpLocalization }} |
|
|
|
</button> |
|
|
|
<button |
|
|
|
*abpPermission="'AbpIdentity.Users.ManagePermissions'" |
|
|
|
ngbDropdownItem |
|
|
|
(click)="openPermissionsModal(row.id)" |
|
|
|
> |
|
|
|
{{ 'AbpIdentity::Permissions' | abpLocalization }} |
|
|
|
</button> |
|
|
|
<button |
|
|
|
*abpPermission="'AbpIdentity.Users.Delete'" |
|
|
|
ngbDropdownItem |
|
|
|
(click)="delete(row.id, row.userName)" |
|
|
|
> |
|
|
|
{{ 'AbpIdentity::Delete' | abpLocalization }} |
|
|
|
</button> |
|
|
|
<div ngbDropdownMenu> |
|
|
|
<button |
|
|
|
*abpPermission="'AbpIdentity.Users.Update'" |
|
|
|
ngbDropdownItem |
|
|
|
(click)="edit(data.id)" |
|
|
|
> |
|
|
|
{{ 'AbpIdentity::Edit' | abpLocalization }} |
|
|
|
</button> |
|
|
|
<button |
|
|
|
*abpPermission="'AbpIdentity.Users.ManagePermissions'" |
|
|
|
ngbDropdownItem |
|
|
|
(click)="openPermissionsModal(data.id)" |
|
|
|
> |
|
|
|
{{ 'AbpIdentity::Permissions' | abpLocalization }} |
|
|
|
</button> |
|
|
|
<button |
|
|
|
*abpPermission="'AbpIdentity.Users.Delete'" |
|
|
|
ngbDropdownItem |
|
|
|
(click)="delete(data.id, data.userName)" |
|
|
|
> |
|
|
|
{{ 'AbpIdentity::Delete' | abpLocalization }} |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
<td>{{ data.userName }}</td> |
|
|
|
<td>{{ data.email }}</td> |
|
|
|
<td>{{ data.phoneNumber }}</td> |
|
|
|
</tr> |
|
|
|
</ng-template> |
|
|
|
</abp-table> |
|
|
|
</div> |
|
|
|
</ng-template> |
|
|
|
</ngx-datatable-column> |
|
|
|
<ngx-datatable-column |
|
|
|
[name]="'AbpIdentity::UserName' | abpLocalization" |
|
|
|
prop="userName" |
|
|
|
></ngx-datatable-column> |
|
|
|
<ngx-datatable-column |
|
|
|
[name]="'AbpIdentity::EmailAddress' | abpLocalization" |
|
|
|
prop="email" |
|
|
|
></ngx-datatable-column> |
|
|
|
<ngx-datatable-column |
|
|
|
[name]="'AbpIdentity::PhoneNumber' | abpLocalization" |
|
|
|
prop="phoneNumber" |
|
|
|
></ngx-datatable-column> |
|
|
|
</ngx-datatable> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|