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

This commit is contained in:
Jamie 2018-06-01 16:08:05 +01:00
commit 8524ee95f5
5 changed files with 5 additions and 2 deletions

View file

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

View file

@ -39,7 +39,7 @@
<div> <div>
<select class="form-control form-control-custom" id="select" [(ngModel)]="testUserId" [ngModelOptions]="{standalone: true}"> <select class="form-control form-control-custom" id="select" [(ngModel)]="testUserId" [ngModelOptions]="{standalone: true}">
<option value="">Please select</option> <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> </select>
</div> </div>
</div> </div>

View file

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

View file

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

View file

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