Show last login along with the badges on the user view screen.

This commit is contained in:
Bill Nottingham
2019-02-14 20:25:50 -05:00
parent 5682fb1503
commit 6a11281355
4 changed files with 16 additions and 0 deletions

View File

@@ -75,6 +75,18 @@
text-transform: uppercase;
}
.Form-title--last_login {
border-radius: 5px;
color: @default-interface-txt;
font-size: 10px;
font-weight: 100;
height:15px;
margin-left: 10px;
margin-top: 2.25px;
padding: 0 10px;
text-transform: uppercase;
}
.Form-exitHolder {
justify-content: flex-end;
display:flex;

View File

@@ -1418,6 +1418,8 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
"ng-show='ldap_user'>LDAP</span>";
html+= "<span class=\"Form-title--is_external_account\" "+
"ng-show='external_account'>{{external_account}}</span>";
html+= "<span class=\"Form-title--last_login\" "+
"ng-show='last_login'>" + i18n._("Last logged in: ") + "{{ last_login | longDate }}</span>";
}
if(this.form.name === "smartinventory"){
html+= "<span class=\"Form-title--is_smartinventory\" "+

View File

@@ -35,6 +35,7 @@ export default ['$scope', '$rootScope', 'UserForm', 'GenerateForm', 'Rest',
$scope.ldap_dn = null;
$scope.socialAuthUser = false;
$scope.external_account = null;
$scope.last_login = null;
Rest.setUrl(GetBasePath('users'));
Rest.options()

View File

@@ -52,6 +52,7 @@ export default ['$scope', '$rootScope', '$stateParams', 'UserForm', 'Rest',
$scope.not_ldap_user = !$scope.ldap_user;
master.ldap_user = $scope.ldap_user;
$scope.socialAuthUser = (user_obj.auth.length > 0) ? true : false;
$scope.last_login = user_obj.last_login;
$scope.external_account = user_obj.external_account;
$scope.user_type = $scope.user_type_options[0];