Fixed where the test button wouldn't work on the mobile notifications page

pull/2294/head
Jamie 6 years ago
parent 7dd5805f3f
commit 8524ee95f5

@ -47,6 +47,7 @@ export interface IResetPasswordToken {
export interface IMobileUsersViewModel {
username: string;
userId: string;
devices: number;
}

@ -39,7 +39,7 @@
<div>
<select class="form-control form-control-custom" id="select" [(ngModel)]="testUserId" [ngModelOptions]="{standalone: true}">
<option value="">Please select</option>
<option *ngFor="let x of userList" [value]="x.id">{{x.username}}</option>
<option *ngFor="let x of userList" [value]="x.userId">{{x.username}}</option>
</select>
</div>
</div>

@ -34,7 +34,7 @@ export class MobileComponent implements OnInit {
this.mobileService.getUserDeviceList().subscribe(x => {
if(x.length <= 0) {
this.userList = [];
this.userList.push({username:"None",devices:0});
this.userList.push({username:"None",devices:0, userId:""});
} else {
this.userList = x;
}

@ -68,6 +68,7 @@ namespace Ombi.Controllers
{
vm.Add(new MobileUsersViewModel
{
UserId = u.Id,
Username = u.UserAlias,
Devices = u.NotificationUserIds.Count
});

@ -2,6 +2,7 @@
{
public class MobileUsersViewModel
{
public string UserId { get; set; }
public string Username { get; set; }
public int Devices { get; set; }
}

Loading…
Cancel
Save