Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: #569 remove column switch to admin
  • Loading branch information
PaulRC-ioet committed Nov 24, 2020
commit f529b3e7ad5185125a909044e3891d877c97291d
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
<table *ngIf="users" class="table table-sm table-bordered table-striped mb-0" datatable [dtTrigger]="dtTrigger">
<thead class="thead-blue">
<tr class="d-flex">
<th class="col-4">User Email</th>
<th class="col-4">Names</th>
<th class="col-4 text-center">Admin Role</th>
<th class="col-6">User Email</th>
<th class="col-6">Names</th>
</tr>
</thead>
<app-loading-bar *ngIf="isLoading$ | async"></app-loading-bar>
<tbody *ngIf="(isLoading$ | async) === false">
<tr class="d-flex" *ngFor="let user of users">
<td class="col-sm-4">{{ user.email }}</td>
<td class="col-sm-4">{{ user.name }}</td>
<td class="col-sm-4 text-center custom-control custom-switch">
<input
type="checkbox"
class="custom-control-input"
id="{{ user.id }}"
[(ngModel)]="user.role"
(change)="switchToAdmin(user.id)"
/>
<label class="custom-control-label" for="{{ user.id }}"></label>
</td>
<td class="col-sm-6">{{ user.email }}</td>
<td class="col-sm-6">{{ user.name }}</td>
</tr>
</tbody>
</table>
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,4 @@ export class UsersListComponent implements OnInit, OnDestroy, AfterViewInit {
this.dtTrigger.next();
}
}

switchToAdmin(userId: string) {
console.log('Upcoming change to' + userId);
}
}