added user status and prediction user
This commit is contained in:
@ -28,6 +28,12 @@
|
||||
<ng-template rbFormValidationMessage="failure">{{deviceInput.errors.failure}}</ng-template>
|
||||
</rb-form-input>
|
||||
</rb-array-input>
|
||||
<rb-array-input [(ngModel)]="newUser.models" name="models" [pushTemplate]="''">
|
||||
<rb-form-select *rbArrayInputItem="let item" rbArrayInputListener="models" [index]="item.i" label="model"
|
||||
[name]="'model-' + item.i" [ngModel]="item.value">
|
||||
<ng-container *ngTemplateOutlet="modelOptions"></ng-container>
|
||||
</rb-form-select>
|
||||
</rb-array-input>
|
||||
<rb-form-input name="passA" type="password" label="new password" appValidate="password" required
|
||||
[(ngModel)]="newUserPass" #passAInput="ngModel">
|
||||
<ng-template rbFormValidationMessage="failure">{{passAInput.errors.failure}}</ng-template>
|
||||
@ -41,13 +47,15 @@
|
||||
</rb-icon-button>
|
||||
</form>
|
||||
|
||||
<rb-table>
|
||||
<rb-table scrollTop>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Level</th>
|
||||
<th>Location</th>
|
||||
<th>Device</th>
|
||||
<th>Models</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@ -58,7 +66,13 @@
|
||||
<td>{{user.level}}</td>
|
||||
<td>{{user.location}}</td>
|
||||
<td>{{user.devices}}</td>
|
||||
<td><span class="rb-ic rb-ic-edit clickable" (click)="user.edit = true"></span></td>
|
||||
<td>
|
||||
<ng-container *ngFor="let model of user.models; index as i">
|
||||
{{(i > 0 ? ', ' : '') + modelIds[model]}}
|
||||
</ng-container>
|
||||
</td>
|
||||
<td><span [class]="'rb-ic clickable ' + (user.status === 'new' ? 'rb-ic-edit': 'rb-ic-undo')"
|
||||
(click)="user.status === 'new' ? user.edit = true: restoreUser(user)"></span></td>
|
||||
</ng-container>
|
||||
<ng-template #editUser>
|
||||
<td>
|
||||
@ -93,9 +107,17 @@
|
||||
</rb-form-input>
|
||||
</rb-array-input>
|
||||
</td>
|
||||
<td>
|
||||
<rb-array-input [(ngModel)]="user.models" name="devices" [pushTemplate]="''">
|
||||
<rb-form-select *rbArrayInputItem="let item" rbArrayInputListener="models" [index]="item.i" label="model"
|
||||
[name]="'model-' + item.i" [ngModel]="item.value">
|
||||
<ng-container *ngTemplateOutlet="modelOptions"></ng-container>
|
||||
</rb-form-select>
|
||||
</rb-array-input>
|
||||
</td>
|
||||
<td>
|
||||
<rb-icon-button icon="delete" mode="danger" class="space-below"
|
||||
(click)="deleteConfirm(modalDeleteConfirm, user.name)">
|
||||
(click)="deleteConfirm(modalDeleteConfirm, user)">
|
||||
Delete
|
||||
</rb-icon-button>
|
||||
<ng-template #modalDeleteConfirm>
|
||||
@ -111,3 +133,10 @@
|
||||
</ng-template>
|
||||
</tr>
|
||||
</rb-table>
|
||||
|
||||
<ng-template #modelOptions>
|
||||
<option value=""></option>
|
||||
<ng-container *ngFor="let model of modelSelect">
|
||||
<option [value]="model.id">{{model.name}}</option>
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
|
Reference in New Issue
Block a user