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 {
username: string;
userId: string;
devices: number;
}

View file

@ -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>

View file

@ -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;
}

View file

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

View file

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