Merge branch 'HomePageIndicator-#47' into Release0.1.4
This commit is contained in:
commit
63a96e77cf
@ -21,5 +21,7 @@ namespace Interfaces
|
||||
}
|
||||
|
||||
public List<Identifier> AssociatedIdentifiers { get; set; }
|
||||
|
||||
public bool State { get; set; }
|
||||
}
|
||||
}
|
||||
@ -82,6 +82,8 @@ namespace SQLiteRepository
|
||||
Id = card.Id
|
||||
});
|
||||
}
|
||||
userObj.State = GetUserState(GetLogDirection(user.Id));
|
||||
|
||||
ret.Users.Add(userObj);
|
||||
}
|
||||
if (pageNumber == -1 && pageSize == -1)
|
||||
@ -98,6 +100,17 @@ namespace SQLiteRepository
|
||||
return ret;
|
||||
}
|
||||
|
||||
private bool GetUserState(LogDirectionDb logDirection)
|
||||
{
|
||||
switch (logDirection)
|
||||
{
|
||||
case LogDirectionDb.OUT:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public UserList Search(string searchParam)
|
||||
{
|
||||
_logger.Trace("Searching SQLite database for the term: {0}", searchParam);
|
||||
|
||||
@ -61,15 +61,24 @@
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1"></th>
|
||||
<th class="col-md-3">First Name</th>
|
||||
<th class="col-md-3">Last Name</th>
|
||||
<th class="col-md-1 text-center">Contractor</th>
|
||||
<th />
|
||||
<th/>
|
||||
<th/>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody data-bind="foreach: Users">
|
||||
<tr>
|
||||
<td class="valign text-center">
|
||||
<!-- ko if: State -->
|
||||
<span class="label label-success" style="display: block">IN</span>
|
||||
<!-- /ko -->
|
||||
<!-- ko if: !State -->
|
||||
<span class="label label-danger" style="display: block">OUT</span>
|
||||
<!-- /ko -->
|
||||
</td>
|
||||
<td class="valign" data-bind="text: FirstName"></td>
|
||||
<td class="valign" data-bind="text: LastName"></td>
|
||||
<td class="valign text-center"><span data-bind="css:{ 'glyphicon glyphicon-ok': IsContractor}"></span></td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user