mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 11:36:48 +00:00
family members
This commit is contained in:
parent
0b43cae46e
commit
11161cce51
@ -196,6 +196,12 @@
|
||||
"label.input.firstname": "First name",
|
||||
"label.input.lastname": "Last name",
|
||||
"label.input.middlename": "Middle name",
|
||||
"label.input.qualification":"Qualification",
|
||||
"label.input.mobileNumber":"Mobile Number",
|
||||
"label.input.age":"age",
|
||||
"label.input.isDependent":"is Dependent?",
|
||||
"label.input.maritalstatus":"Marital Status",
|
||||
"label.input.profession":"Profession",
|
||||
"label.input.fullname": "Name",
|
||||
"label.input.legalForm": "Legal Form",
|
||||
"label.input.accno": "Account#",
|
||||
@ -599,6 +605,7 @@
|
||||
|
||||
"#Headings": "..",
|
||||
"label.heading.address":"Address",
|
||||
"label.heading.familymembers":"Family Members",
|
||||
"label.heading.identities": "Identities",
|
||||
"label.heading.uniqueidentification": "Unique ID #",
|
||||
"label.heading.identitydocs": "Identity Documents",
|
||||
@ -1067,6 +1074,8 @@
|
||||
"journalEntrytType.debit": "Debit",
|
||||
|
||||
"#Buttons": "..",
|
||||
"label.button.addAddress":"Add Address",
|
||||
"label.button.addfamilymember":"Add Family Member",
|
||||
"label.button.listview": "List View",
|
||||
"label.button.treeview": "Tree View",
|
||||
"label.button.addaccount": "Add Account",
|
||||
|
||||
60
app/scripts/controllers/client/AddFamilyMembersController.js
Normal file
60
app/scripts/controllers/client/AddFamilyMembersController.js
Normal file
@ -0,0 +1,60 @@
|
||||
/**
|
||||
* Created by nikpa on 26-06-2017.
|
||||
*/
|
||||
|
||||
(function (module) {
|
||||
mifosX.controllers = _.extend(module, {
|
||||
AddFamilyMembersController: function (scope, resourceFactory, routeParams,dateFilter, location) {
|
||||
|
||||
scope.formData={};
|
||||
scope.date = {};
|
||||
clientId=routeParams.clientId;
|
||||
familyMemberId=routeParams.familyMemberId;
|
||||
|
||||
resourceFactory.familyMemberTemplate.get({clientId:clientId},function(data)
|
||||
{
|
||||
scope.relationshipIdOptions=data.relationshipIdOptions;
|
||||
scope.genderIdOptions=data.genderIdOptions;
|
||||
scope.maritalStatusIdOptions=data.maritalStatusIdOptions;
|
||||
scope.professionIdOptions=data.professionIdOptions;
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
scope.routeTo=function()
|
||||
{
|
||||
location.path('/viewclient/'+clientId);
|
||||
}
|
||||
|
||||
scope.addClientMember=function()
|
||||
{
|
||||
|
||||
|
||||
this.formData.locale = scope.optlang.code;
|
||||
this.formData.dateFormat = scope.df;
|
||||
|
||||
if(scope.date.dateOfBirth){
|
||||
this.formData.dateOfBirth = dateFilter(scope.date.dateOfBirth, scope.df);
|
||||
}
|
||||
resourceFactory.familyMembers.post({clientId:clientId},scope.formData,function(data)
|
||||
{
|
||||
|
||||
location.path('/viewclient/'+clientId);
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
mifosX.ng.application.controller('AddFamilyMembersController', ['$scope','ResourceFactory', '$routeParams','dateFilter', '$location', mifosX.controllers.AddFamilyMembersController]).run(function ($log) {
|
||||
$log.info("AddFamilyMemberController initialized");
|
||||
});
|
||||
|
||||
}
|
||||
(mifosX.controllers || {}));
|
||||
@ -26,6 +26,9 @@
|
||||
entityname="ADDRESS";
|
||||
scope.addressArray=[];
|
||||
scope.formData.address=[];
|
||||
//familymembers
|
||||
scope.formData.familyMembers=[];
|
||||
scope.familyArray=[];
|
||||
scope.datatables = [];
|
||||
scope.noOfTabs = 1;
|
||||
scope.step = '-';
|
||||
@ -124,6 +127,14 @@
|
||||
|
||||
}
|
||||
|
||||
|
||||
scope.relationshipIdOptions=data.familyMemberOptions.relationshipIdOptions;
|
||||
scope.genderIdOptions=data.familyMemberOptions.genderIdOptions;
|
||||
scope.maritalStatusIdOptions=data.familyMemberOptions.maritalStatusIdOptions;
|
||||
scope.professionIdOptions=data.familyMemberOptions.professionIdOptions;
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
scope.updateColumnHeaders = function(columnHeaderData) {
|
||||
@ -153,7 +164,23 @@
|
||||
|
||||
|
||||
|
||||
// end of address
|
||||
// end of address
|
||||
|
||||
|
||||
// family members
|
||||
|
||||
scope.addFamilyMember=function()
|
||||
{
|
||||
scope.familyArray.push({});
|
||||
}
|
||||
|
||||
scope.removeFamilyMember=function(index)
|
||||
{
|
||||
scope.familyArray.splice(index,1);
|
||||
}
|
||||
|
||||
|
||||
// end of family members
|
||||
|
||||
|
||||
|
||||
@ -356,6 +383,69 @@
|
||||
}
|
||||
|
||||
|
||||
// family array
|
||||
|
||||
for(var i=0;i<scope.familyArray.length;i++)
|
||||
{
|
||||
var temp=new Object();
|
||||
if(scope.familyArray[i].relationshipId)
|
||||
{
|
||||
temp.relationshipId=scope.familyArray[i].relationshipId;
|
||||
}
|
||||
if(scope.familyArray[i].firstName)
|
||||
{
|
||||
temp.firstName=scope.familyArray[i].firstName;
|
||||
}
|
||||
if(scope.familyArray[i].middleName)
|
||||
{
|
||||
temp.middleName=scope.familyArray[i].middleName;
|
||||
}
|
||||
if(scope.familyArray[i].lastName)
|
||||
{
|
||||
temp.lastName=scope.familyArray[i].lastName;
|
||||
}
|
||||
if(scope.familyArray[i].qualification)
|
||||
{
|
||||
temp.qualification=scope.familyArray[i].qualification;
|
||||
}
|
||||
if(scope.familyArray[i].mobileNumber)
|
||||
{
|
||||
temp.mobileNumber=scope.familyArray[i].mobileNumber;
|
||||
}
|
||||
if(scope.familyArray[i].age)
|
||||
{
|
||||
temp.age=scope.familyArray[i].age;
|
||||
}
|
||||
if(scope.familyArray[i].isDependent)
|
||||
{
|
||||
temp.isDependent=scope.familyArray[i].isDependent;
|
||||
}
|
||||
if(scope.familyArray[i].genderId)
|
||||
{
|
||||
temp.genderId=scope.familyArray[i].genderId;
|
||||
}
|
||||
if(scope.familyArray[i].professionId)
|
||||
{
|
||||
temp.professionId=scope.familyArray[i].professionId;
|
||||
}
|
||||
if(scope.familyArray[i].maritalStatusId)
|
||||
{
|
||||
temp.maritalStatusId=scope.familyArray[i].maritalStatusId;
|
||||
}
|
||||
if(scope.familyArray[i].dateOfBirth)
|
||||
{
|
||||
|
||||
temp.dateOfBirth=dateFilter(scope.familyArray[i].dateOfBirth, scope.df);
|
||||
}
|
||||
|
||||
temp.locale = scope.optlang.code;
|
||||
temp.dateFormat = scope.df;
|
||||
scope.formData.familyMembers.push(temp);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
|
||||
|
||||
resourceFactory.clientResource.save(this.formData, function (data) {
|
||||
location.path('/viewclient/' + data.clientId);
|
||||
|
||||
76
app/scripts/controllers/client/EditFamilyMemberController.js
Normal file
76
app/scripts/controllers/client/EditFamilyMemberController.js
Normal file
@ -0,0 +1,76 @@
|
||||
/**
|
||||
* Created by nikpa on 22-06-2017.
|
||||
*/
|
||||
(function (module) {
|
||||
mifosX.controllers = _.extend(module, {
|
||||
EditFamilyMemberController: function (scope, resourceFactory, routeParams,dateFilter, location) {
|
||||
|
||||
scope.formData={};
|
||||
scope.date = {};
|
||||
clientId=routeParams.clientId;
|
||||
familyMemberId=routeParams.familyMemberId;
|
||||
|
||||
resourceFactory.familyMemberTemplate.get({clientId:clientId},function(data)
|
||||
{
|
||||
scope.relationshipIdOptions=data.relationshipIdOptions;
|
||||
scope.genderIdOptions=data.genderIdOptions;
|
||||
scope.maritalStatusIdOptions=data.maritalStatusIdOptions;
|
||||
scope.professionIdOptions=data.professionIdOptions;
|
||||
|
||||
});
|
||||
|
||||
|
||||
resourceFactory.familyMember.get({clientId:clientId,clientFamilyMemberId:familyMemberId},function(data)
|
||||
{
|
||||
scope.formData=data;
|
||||
|
||||
if (data.dateOfBirth) {
|
||||
var dobDate = dateFilter(data.dateOfBirth, scope.df);
|
||||
scope.date.dateOfBirth = new Date(dobDate);
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
scope.routeTo=function()
|
||||
{
|
||||
location.path('/viewclient/'+clientId);
|
||||
}
|
||||
|
||||
scope.updateClientMember=function()
|
||||
{
|
||||
delete scope.formData.maritalStatus;
|
||||
delete scope.formData.gender;
|
||||
delete scope.formData.profession;
|
||||
delete scope.formData.relationship;
|
||||
|
||||
this.formData.locale = scope.optlang.code;
|
||||
this.formData.dateFormat = scope.df;
|
||||
|
||||
if(scope.date.dateOfBirth){
|
||||
this.formData.dateOfBirth = dateFilter(scope.date.dateOfBirth, scope.df);
|
||||
}
|
||||
resourceFactory.familyMember.put({clientId:clientId,clientFamilyMemberId:familyMemberId},scope.formData,function(data)
|
||||
{
|
||||
|
||||
location.path('/viewclient/'+clientId);
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
mifosX.ng.application.controller('EditFamilyMemberController', ['$scope','ResourceFactory', '$routeParams','dateFilter', '$location', mifosX.controllers.EditFamilyMemberController]).run(function ($log) {
|
||||
$log.info("EditFamilyMemberController initialized");
|
||||
});
|
||||
|
||||
}
|
||||
(mifosX.controllers || {}));
|
||||
@ -18,6 +18,7 @@
|
||||
scope.addresses=[];
|
||||
scope.view={};
|
||||
scope.view.data=[];
|
||||
// scope.families=[];
|
||||
var entityname="ADDRESS";
|
||||
formdata={};
|
||||
|
||||
@ -53,6 +54,15 @@
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* resourceFactory.getAllFamilyMembers.get({clientId:routeParams.id},function(data)
|
||||
{
|
||||
|
||||
scope.families=data;
|
||||
|
||||
|
||||
})*/
|
||||
|
||||
});
|
||||
|
||||
|
||||
@ -85,6 +95,49 @@
|
||||
// end of address
|
||||
|
||||
|
||||
// family members
|
||||
|
||||
scope.families=[];
|
||||
|
||||
|
||||
|
||||
|
||||
resourceFactory.familyMembers.get({clientId:routeParams.id},function(data)
|
||||
{
|
||||
|
||||
scope.families=data;
|
||||
|
||||
|
||||
});
|
||||
|
||||
scope.deleteFamilyMember=function(clientFamilyMemberId)
|
||||
{
|
||||
|
||||
resourceFactory.familyMember.delete({clientId:routeParams.id,clientFamilyMemberId:clientFamilyMemberId},function(data)
|
||||
{
|
||||
|
||||
route.reload();
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
scope.editFamilyMember=function(clientFamilyMemberId)
|
||||
{
|
||||
|
||||
location.path('/editfamilymember/'+routeParams.id+'/'+clientFamilyMemberId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
scope.routeToaddFamilyMember=function()
|
||||
{
|
||||
location.path('/addfamilymembers/'+ routeParams.id);
|
||||
}
|
||||
|
||||
|
||||
// end of family members
|
||||
|
||||
|
||||
|
||||
scope.routeToLoan = function (id) {
|
||||
location.path('/viewloanaccount/' + id);
|
||||
|
||||
@ -290,7 +290,12 @@ define(['Q', 'underscore', 'mifosX'], function (Q) {
|
||||
'organization/smscampaigns/ViewSmsCampaignController',
|
||||
'organization/smscampaigns/EditSmsCampaignController',
|
||||
'organization/entitydatatablechecks/EntityDatatableChecksController',
|
||||
'notification/NotificationsController'
|
||||
'notification/NotificationsController',
|
||||
'notification/NotificationsController',
|
||||
'configurations/AddressFormController',
|
||||
'client/EditFamilyMemberController',
|
||||
'client/AddFamilyMembersController'
|
||||
|
||||
],
|
||||
filters: [
|
||||
'StatusLookup',
|
||||
|
||||
@ -917,7 +917,13 @@
|
||||
.when('/surveys/add',{
|
||||
templateUrl: 'views/surveys/createsurvey.html'
|
||||
})
|
||||
;
|
||||
.when('/editfamilymember/:clientId/:familyMemberId', {
|
||||
templateUrl: 'views/clients/editfamilymembers.html'
|
||||
})
|
||||
.when('/addfamilymembers/:clientId/', {
|
||||
templateUrl: 'views/clients/addfamilymembers.html'
|
||||
})
|
||||
;
|
||||
$locationProvider.html5Mode(false);
|
||||
};
|
||||
mifosX.ng.application.config(defineRoutes).run(function ($log) {
|
||||
|
||||
@ -540,8 +540,25 @@
|
||||
get:{method:'GET',params:{type:'@type',status:'@status'},isArray:true},
|
||||
put:{method:'PUT',params:{}}
|
||||
}),
|
||||
provisioningcriteria: defineResource(apiVer + "/provisioningcriteria/:criteriaId",{criteriaId:'@criteriaId'},{
|
||||
get: {method: 'GET',params:{}},
|
||||
familyMember:defineResource(apiVer+"/clients/:clientId/familymembers/:clientFamilyMemberId",{},{
|
||||
|
||||
get:{method: 'GET',params:{} },
|
||||
delete:{method: 'DELETE',params:{}},
|
||||
put:{method:'PUT',params:{}}
|
||||
|
||||
}),
|
||||
familyMembers:defineResource(apiVer+"/clients/:clientId/familymembers/",{},{
|
||||
|
||||
get:{method: 'GET',isArray: true },
|
||||
post:{method:'POST',params:{}}
|
||||
|
||||
|
||||
}),
|
||||
familyMemberTemplate:defineResource(apiVer+"/clients/:clientId/familymembers/template",{},{
|
||||
get:{method: 'GET',params:{}}
|
||||
}),
|
||||
provisioningcriteria: defineResource(apiVer + "/provisioningcriteria/:criteriaId",{criteriaId:'@criteriaId'},{
|
||||
get: {method: 'GET',params:{}},
|
||||
getAll: {method: 'GET',params:{}, isArray : true},
|
||||
template: {method: 'GET',params:{}},
|
||||
post:{method:'POST',params:{}},
|
||||
|
||||
149
app/views/clients/addfamilymembers.html
Normal file
149
app/views/clients/addfamilymembers.html
Normal file
@ -0,0 +1,149 @@
|
||||
<div ng-controller="AddFamilyMembersController">
|
||||
|
||||
|
||||
<form name="familymemberInfo" novalidate="" class="form-horizontal well" >
|
||||
<api-validate></api-validate>
|
||||
<fieldset>
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="firstName">{{'label.input.firstname' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="firstName" name="firstName" ng-model="formData.firstName" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" for="middleName">{{'label.input.middlename' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="middleName" name="middleName" ng-model="formData.middleName" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="lastName">{{'label.input.lastname' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="lastName" name="lastName" ng-model="formData.lastName" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="qualification">{{ 'label.input.qualification' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="qualification" name="qualification" ng-model="formData.qualification" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="mobileNumber">{{ 'label.input.mobileNumber' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="mobileNumber" name="mobileNumber" ng-model="formData.mobileNumber" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="age">{{ 'label.input.age' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="age" name="age" ng-model="formData.age" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="isDependent">{{ 'label.input.isDependent' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="checkbox" class="input-mini-small" id="isDependent" name="isDependent" ng-model="formData.isDependent" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="control-label col-sm-2">
|
||||
<label>{{ 'label.input.relationship' | translate }}</label>
|
||||
</div>
|
||||
<div class="col-sm-3" >
|
||||
<select chosen="relationshipIdOptions" id="relationshipIdOption" ng-model="formData.relationshipId" class="form-control"
|
||||
ng-options="relationshipIdOption.id as relationshipIdOption.name for relationshipIdOption in relationshipIdOptions track by relationshipIdOption.id"
|
||||
value="formData.relationshipId"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group" >
|
||||
<div class="control-label col-sm-2">
|
||||
<label>{{ 'label.input.gender' | translate }}</label>
|
||||
</div>
|
||||
<div class="col-sm-3" >
|
||||
<select chosen="genderIdOptions" id="genderIdOption" ng-model="formData.genderId" class="form-control"
|
||||
ng-options="genderIdOption.id as genderIdOption.name for genderIdOption in genderIdOptions track by genderIdOption.id"
|
||||
value="formData.genderId"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" >
|
||||
<div class="control-label col-sm-2">
|
||||
<label>{{ 'label.input.profession' | translate }}</label>
|
||||
</div>
|
||||
<div class="col-sm-3" >
|
||||
<select chosen="professionIdOptions" id="professionIdOption" ng-model="formData.professionId" class="form-control"
|
||||
ng-options="professionIdOption.id as professionIdOption.name for professionIdOption in professionIdOptions track by professionIdOption.id"
|
||||
value="formData.professionId"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" >
|
||||
<div class="control-label col-sm-2">
|
||||
<label>{{ 'label.input.maritalstatus' | translate }}</label>
|
||||
</div>
|
||||
<div class="col-sm-3" >
|
||||
<select chosen="maritalStatusIdOptions" id="maritalStatusId" ng-model="formData.maritalStatusId" class="form-control"
|
||||
ng-options="maritalStatusIdOption.id as maritalStatusIdOption.name for maritalStatusIdOption in maritalStatusIdOptions track by maritalStatusIdOption.id"
|
||||
value="formData.maritalStatusId"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="dateofbirth">{{ 'label.input.dateofbirth' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input id="dateofbirth" type="text" name="dateofbirth" datepicker-pop="dd MMMM yyyy"
|
||||
ng-model="date.dateOfBirth" is-open="opened1" max="restrictDate" class="form-control"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-offset-3" >
|
||||
<button id="cancel" ng-click="routeTo()" class="btn btn-primary">{{
|
||||
'label.button.cancel' | translate }}
|
||||
</button>
|
||||
|
||||
|
||||
|
||||
<button id="edit" ng-click="addClientMember()" class="btn btn-primary">{{
|
||||
'label.button.submit' | translate }}
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
@ -273,6 +273,155 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<div class="control-label col-sm-3">
|
||||
<h3><strong>{{ 'label.heading.familymembers' | translate }}</strong> <a ng-click="addFamilyMember()" ><i class="fa fa-plus" uib-tooltip="{{'label.button.addfamilymember' | translate}}"></i></a></h3>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div ng-repeat="family in familyArray">
|
||||
|
||||
<div class="form-group" >
|
||||
<div class="control-label col-sm-2">
|
||||
<label>{{ 'label.input.relationship' | translate }}<span class="required">*</span></label>
|
||||
</div>
|
||||
<div class="col-sm-3" >
|
||||
<select chosen="relationshipIdOptions" id="relationshipIdOption" ng-model="familyArray[$index].relationshipId" class="form-control"
|
||||
ng-options="relationshipIdOption.id as relationshipIdOption.name for relationshipIdOption in relationshipIdOptions track by relationshipIdOption.id"
|
||||
value="formData.relationshipId"></select>
|
||||
</div>
|
||||
<div class = "col-sm-2">
|
||||
<form-validate valattributeform="createclientform" valattribute="addressType"/>
|
||||
</div>
|
||||
<a ng-click="removeFamilyMember($index)" uib-tooltip="{{'label.remove.row' | translate}}"><i class="fa fa-times"></i></a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="firstName">{{'label.input.firstname' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="firstName" name="firstName" ng-model="familyArray[$index].firstName" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" for="middleName">{{'label.input.middlename' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="middleName" name="middleName" ng-model="familyArray[$index].middleName" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="lastName">{{'label.input.lastname' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="lastName" name="lastName" ng-model="familyArray[$index].lastName" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="qualification">{{ 'label.input.qualification' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="qualification" name="qualification" ng-model="familyArray[$index].qualification" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="mobileNumber">{{ 'label.input.mobileNumber' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="mobileNumber" name="mobileNumber" ng-model="familyArray[$index].mobileNumber" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="age">{{ 'label.input.age' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="age" name="age" ng-model="familyArray[$index].age" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="isDependent">{{ 'label.input.isDependent' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="checkbox" class="input-mini-small" id="isDependent" name="isDependent" ng-model="familyArray[$index].isDependent" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group" >
|
||||
<div class="control-label col-sm-2">
|
||||
<label>{{ 'label.input.gender' | translate }}</label>
|
||||
</div>
|
||||
<div class="col-sm-3" >
|
||||
<select chosen="genderIdOptions" id="genderIdOption" ng-model="familyArray[$index].genderId" class="form-control"
|
||||
ng-options="genderIdOption.id as genderIdOption.name for genderIdOption in genderIdOptions track by genderIdOption.id"
|
||||
value="formData.genderId"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" >
|
||||
<div class="control-label col-sm-2">
|
||||
<label>{{ 'label.input.profession' | translate }}</label>
|
||||
</div>
|
||||
<div class="col-sm-3" >
|
||||
<select chosen="professionIdOptions" id="professionIdOption" ng-model="familyArray[$index].professionId" class="form-control"
|
||||
ng-options="professionIdOption.id as professionIdOption.name for professionIdOption in professionIdOptions track by professionIdOption.id"
|
||||
value="formData.professionId"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" >
|
||||
<div class="control-label col-sm-2">
|
||||
<label>{{ 'label.input.maritalstatus' | translate }}</label>
|
||||
</div>
|
||||
<div class="col-sm-3" >
|
||||
<select chosen="maritalStatusIdOptions" id="maritalStatusId" ng-model="familyArray[$index].maritalStatusId" class="form-control"
|
||||
ng-options="maritalStatusIdOption.id as maritalStatusIdOption.name for maritalStatusIdOption in maritalStatusIdOptions track by maritalStatusIdOption.id"
|
||||
value="formData.maritalStatusId"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="dateofbirth">{{ 'label.input.dateofbirth' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input id="dateofbirth" type="text" name="dateofbirth" datepicker-pop="dd MMMM yyyy"
|
||||
ng-model="familyArray[$index].dateOfBirth" is-open="opened1" max="restrictDate" class="form-control"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div ng-show="enableAddress" class="form-group">
|
||||
<div class="form-group">
|
||||
<div class="control-label col-sm-2">
|
||||
|
||||
152
app/views/clients/editfamilymembers.html
Normal file
152
app/views/clients/editfamilymembers.html
Normal file
@ -0,0 +1,152 @@
|
||||
<div ng-controller="EditFamilyMemberController">
|
||||
|
||||
|
||||
<form name="familymemberInfo" novalidate="" class="form-horizontal well" >
|
||||
<api-validate></api-validate>
|
||||
<fieldset>
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="firstName">{{'label.input.firstname' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="firstName" name="firstName" ng-model="formData.firstName" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" for="middleName">{{'label.input.middlename' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="middleName" name="middleName" ng-model="formData.middleName" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="lastName">{{'label.input.lastname' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="lastName" name="lastName" ng-model="formData.lastName" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="qualification">{{ 'label.input.qualification' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="qualification" name="qualification" ng-model="formData.qualification" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="mobileNumber">{{ 'label.input.mobileNumber' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="mobileNumber" name="mobileNumber" ng-model="formData.mobileNumber" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="age">{{ 'label.input.age' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="age" name="age" ng-model="formData.age" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="isDependent">{{ 'label.input.isDependent' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="checkbox" class="input-mini-small" id="isDependent" name="isDependent" ng-model="formData.isDependent" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="control-label col-sm-2">
|
||||
<label>{{ 'label.input.relationship' | translate }}</label>
|
||||
</div>
|
||||
<div class="col-sm-3" >
|
||||
<select chosen="relationshipIdOptions" id="relationshipIdOption" ng-model="formData.relationshipId" class="form-control"
|
||||
ng-options="relationshipIdOption.id as relationshipIdOption.name for relationshipIdOption in relationshipIdOptions track by relationshipIdOption.id"
|
||||
value="formData.relationshipId"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group" >
|
||||
<div class="control-label col-sm-2">
|
||||
<label>{{ 'label.input.gender' | translate }}</label>
|
||||
</div>
|
||||
<div class="col-sm-3" >
|
||||
<select chosen="genderIdOptions" id="genderIdOption" ng-model="formData.genderId" class="form-control"
|
||||
ng-options="genderIdOption.id as genderIdOption.name for genderIdOption in genderIdOptions track by genderIdOption.id"
|
||||
value="formData.genderId"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" >
|
||||
<div class="control-label col-sm-2">
|
||||
<label>{{ 'label.input.profession' | translate }}</label>
|
||||
</div>
|
||||
<div class="col-sm-3" >
|
||||
<select chosen="professionIdOptions" id="professionIdOption" ng-model="formData.professionId" class="form-control"
|
||||
ng-options="professionIdOption.id as professionIdOption.name for professionIdOption in professionIdOptions track by professionIdOption.id"
|
||||
value="formData.professionId"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" >
|
||||
<div class="control-label col-sm-2">
|
||||
<label>{{ 'label.input.maritalstatus' | translate }}</label>
|
||||
</div>
|
||||
<div class="col-sm-3" >
|
||||
<select chosen="maritalStatusIdOptions" id="maritalStatusId" ng-model="formData.maritalStatusId" class="form-control"
|
||||
ng-options="maritalStatusIdOption.id as maritalStatusIdOption.name for maritalStatusIdOption in maritalStatusIdOptions track by maritalStatusIdOption.id"
|
||||
value="formData.maritalStatusId"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-sm-2" for="dateofbirth">{{ 'label.input.dateofbirth' | translate }}</label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input id="dateofbirth" type="text" name="dateofbirth" datepicker-pop="dd MMMM yyyy"
|
||||
ng-model="date.dateOfBirth" is-open="opened1" max="restrictDate" class="form-control"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-offset-3" ng-model="editable">
|
||||
<button id="cancel" ng-click="routeTo()" class="btn btn-primary">{{
|
||||
'label.button.cancel' | translate }}
|
||||
</button>
|
||||
|
||||
|
||||
|
||||
<button id="edit" ng-click="updateClientMember()" class="btn btn-primary">{{
|
||||
'label.button.edit' | translate }}
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
@ -746,6 +746,151 @@
|
||||
<!--</fieldset>-->
|
||||
|
||||
</uib-tab>
|
||||
|
||||
<!--family tab-->
|
||||
|
||||
<uib-tab ng-show="families" heading="{{'label.heading.familymembers' | translate}}" >
|
||||
<div ng-show="families">
|
||||
<button class="btn btn-primary pull-right" ng-click="routeToaddFamilyMember()"><i class="icon-plus icon-white"></i>{{'label.button.addfamilymember' | translate}}</button>
|
||||
<br>
|
||||
<table class="table" ng-repeat="family in families" class="table table-condensed">
|
||||
<thead>
|
||||
<tr class="graybg">
|
||||
<th class="graybg"> {{family.relationship}}</th>
|
||||
<td>
|
||||
<button class="btn btn-primary pull-right" ng-click="deleteFamilyMember(family.id)"><i class="icon-plus icon-white"></i>{{'label.button.delete' | translate}}</button>
|
||||
|
||||
<button class="btn btn-primary pull-right" ng-click="editFamilyMember(family.id)"><i class="icon-plus icon-white"></i>{{'label.button.edit' | translate}}</button>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr >
|
||||
<th >
|
||||
{{'label.input.firstname' | translate }}
|
||||
</th>
|
||||
<td>
|
||||
{{family.firstName}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<th >
|
||||
{{'label.input.middlename' | translate }}
|
||||
</th>
|
||||
<td>
|
||||
{{family.middleName}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr >
|
||||
<th >
|
||||
{{'label.input.lastname' | translate }}
|
||||
</th>
|
||||
<td>
|
||||
{{family.lastName}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr >
|
||||
<th >
|
||||
{{'label.input.qualification' | translate }}
|
||||
</th>
|
||||
<td>
|
||||
{{family.qualification}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr >
|
||||
<th >
|
||||
{{'label.input.mobileNumber' | translate }}
|
||||
</th>
|
||||
<td>
|
||||
{{family.mobileNumber}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr >
|
||||
<th >
|
||||
{{'label.input.age' | translate }}
|
||||
</th>
|
||||
<td>
|
||||
{{family.age}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<th >
|
||||
{{'label.input.isDependent' | translate }}
|
||||
</th>
|
||||
<td>
|
||||
{{family.isDependent}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr >
|
||||
<th >
|
||||
{{'label.input.maritalstatus' | translate }}
|
||||
</th>
|
||||
<td>
|
||||
{{family.maritalStatus}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr >
|
||||
<th >
|
||||
{{'label.input.gender' | translate }}
|
||||
</th>
|
||||
<td>
|
||||
{{family.gender}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<th >
|
||||
{{'label.input.profession' | translate }}
|
||||
</th>
|
||||
<td>
|
||||
{{family.profession}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr >
|
||||
<th >
|
||||
{{'label.input.dateofbirth' | translate }}
|
||||
</th>
|
||||
<td>
|
||||
{{family.dateOfBirth | DateFormat }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</uib-tab>
|
||||
|
||||
|
||||
<!--end of family tab-->
|
||||
|
||||
<uib-tab heading="{{'label.heading.identities' | translate}}" select="getClientIdentityDocuments()"
|
||||
has-permission='READ_CLIENTIDENTIFIER'>
|
||||
<div class="pull-right btn-group">
|
||||
|
||||
@ -8,6 +8,21 @@ describe("ViewClientController", function () {
|
||||
this.scope = {};
|
||||
|
||||
this.resourceFactory = {
|
||||
familyMember:{
|
||||
get:jasmine.createSpy('familyMember.get()').andCallFake(function(query, callback){
|
||||
familyMemberCallback=callback;
|
||||
})
|
||||
},
|
||||
familyMembers:{
|
||||
get:jasmine.createSpy('familyMembers.get()').andCallFake(function(query, callback){
|
||||
familyMembersCallback=callback;
|
||||
})
|
||||
},
|
||||
familyMemberTemplate:{
|
||||
get:jasmine.createSpy('familyMemberTemplate.get()').andCallFake(function(query, callback){
|
||||
familyMemberTemplateCallback=callback;
|
||||
})
|
||||
},
|
||||
addressFieldConfiguration:{
|
||||
get:jasmine.createSpy('addressFieldConfiguration.get()').andCallFake(function(query, callback){
|
||||
addressFieldConfigurationCallback=callback;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user