forked from openMF/web-self-service-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix openMF#101 - Created profile page for clients'
- Loading branch information
1 parent
c822a71
commit d4dbc96
Showing
6 changed files
with
155 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ md-toolbar .md-menu{ | |
} | ||
#sidebar-menu__account-types{ | ||
margin-left: 1rem; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
(function(){ | ||
'use strict'; | ||
|
||
angular.module('selfService') | ||
.controller('ProfileViewCtrl', ['$state', '$stateParams', '$filter', 'navService', 'AccountService', ProfileViewCtrl]); | ||
|
||
function ProfileViewCtrl($state, $stateParams, $filter, navService, AccountService) { | ||
|
||
var vm=this; | ||
|
||
vm.profileImage = null; | ||
vm.profile = getUserData(); | ||
vm.profileAddress = 'N/A'; | ||
|
||
function getClient(clientId) { | ||
AccountService.getClient(clientId).get().$promise.then( function (data) { | ||
vm.profile = data; | ||
}) | ||
} | ||
|
||
function getClientImage(clientId) { | ||
AccountService.getClientImage(clientId).then( function (resp) { | ||
vm.profileImage = resp.data; | ||
}).catch(function(err) { | ||
// Not Found Profile image | ||
vm.profileImage = 'assets/images/ic_person_black_24px.svg'; | ||
}); | ||
} | ||
|
||
function getUserData() { | ||
AccountService.getClientId().then(function (clientId) { | ||
vm.clientId = clientId; | ||
getClient(clientId); | ||
getClientImage(clientId); | ||
}); | ||
} | ||
} | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<div layout="row" class="md-padding loan-account-detail-cont" flex> | ||
|
||
<div container layout="row" flex> | ||
<div layout="row" flex-gt-md="40"> | ||
|
||
<md-card class="summary-card"> | ||
<img ng-src="{{vm.profileImage}}" class="md-media-sm" style="height: 300px" alt="Washed Out"> | ||
<md-card-title> | ||
<md-card-title-text> | ||
<span class="md-headline">{{vm.profile.displayName}}</span> | ||
</md-card-title-text> | ||
</md-card-title> | ||
|
||
<md-divider></md-divider> | ||
<br> | ||
|
||
<md-input-container class="md-icon-float md-block"> | ||
<label>Name</label> | ||
<md-icon><i class="material-icons md-24" style="color: #1e88e5">account_circle</i></md-icon> | ||
<input ng-model="vm.profile.displayName" type="text" readonly> | ||
</md-input-container> | ||
<md-input-container class="md-icon-float md-block"> | ||
<label>Mobile Number</label> | ||
<md-icon><i class="material-icons md-24" style="color: #1e88e5">phone</i></md-icon> | ||
<input ng-model="vm.profile.mobileNo" type="text" readonly> | ||
</md-input-container> | ||
<md-input-container class="md-icon-float md-block"> | ||
<label>Address</label> | ||
<md-icon><i class="material-icons md-24" style="color: #1e88e5">place</i></md-icon> | ||
<input ng-model="vm.profileAddress" type="text" readonly> | ||
</md-input-container> | ||
<md-divider></md-divider> | ||
<br> | ||
<md-input-container class="md-icon-float md-block"> | ||
<label>Date of Birth</label> | ||
<md-icon><i class="material-icons md-24" style="color: #1e88e5">calendar_today</i></md-icon> | ||
<input ng-model="vm.profile.dateOfBirth | DateFormat" type="text" readonly> | ||
</md-input-container> | ||
<md-input-container class="md-icon-float md-block"> | ||
<label>Gender</label> | ||
<md-icon><i class="material-icons md-24" style="color: #1e88e5">face</i></md-icon> | ||
<input ng-model="vm.profile.gender.name" type="text" readonly> | ||
</md-input-container> | ||
<br> | ||
<br> | ||
<md-divider></md-divider> | ||
</br> | ||
<md-input-container class="md-icon-float md-block"> | ||
<label>Activation Date</label> | ||
<md-icon><i class="material-icons md-24" style="color: #1e88e5">calendar_today</i></md-icon> | ||
<input ng-model="vm.profile.activationDate | DateFormat" type="text" readonly> | ||
</md-input-container> | ||
</md-card> | ||
|
||
|
||
|
||
</div> | ||
<div layout="row" flex-gt-md="50"> | ||
|
||
<md-card class="summary-card"> | ||
<br> | ||
<md-input-container class="md-icon-float md-block"> | ||
<label>First Name</label> | ||
<md-icon></md-icon> | ||
<input ng-model="vm.profile.firstname" type="text" readonly> | ||
</md-input-container> | ||
<md-input-container class="md-icon-float md-block"> | ||
<label>Middle Name</label> | ||
<md-icon></md-icon> | ||
<input ng-model="vm.profile.middlename" type="text" readonly> | ||
</md-input-container> | ||
<md-input-container class="md-icon-float md-block"> | ||
<label>Last Name</label> | ||
<md-icon></md-icon> | ||
<input ng-model="vm.profile.lastname" type="text" readonly> | ||
</md-input-container> | ||
<md-input-container class="md-block" md-no-float> | ||
<label>Mobile</label> | ||
<md-icon></md-icon> | ||
<input ng-model="vm.profile.mobileNo" type="text" readonly> | ||
</md-input-container> | ||
<md-input-container class="md-icon-float md-block"> | ||
<label>Account Number</label> | ||
<md-icon></md-icon> | ||
<input ng-model="vm.profile.accountNo" type="text" readonly> | ||
</md-input-container> | ||
<md-input-container class="md-icon-float md-block"> | ||
<label>Office Name</label> | ||
<md-icon></md-icon> | ||
<input ng-model="vm.profile.officeName" type="text" readonly> | ||
</md-input-container> | ||
|
||
</md-card> | ||
</div> | ||
</div> | ||
</div> | ||
<md-button aria-label="menu" class="md-fab md-fab-bottom-right" style="position: fixed"> | ||
<i hide-sm hide-md class="material-icons md-24">edit</i> | ||
</md-button> | ||
|