forked from FITER1/community-app-template
-
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.
* Create Prequalification group with members and view existing groups * Create Prequalification group with members and view existing groups * Create Prequalification group with members and view existing groups * Migrate m_potfolio_center and center groups to m_group * modify the lables on potfolio planning * fix prequalification of new group creation details * Fix Labels on prequalification * Fix Labels on prequalification * Fix Labels on prequalification --------- Co-authored-by: Brian Muhimbura <brianmigel@gmail.com> Co-authored-by: Leonardo Hildt <leonardo@fiter.io>
- Loading branch information
1 parent
6cd5508
commit f9535d6
Showing
18 changed files
with
744 additions
and
35 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
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
67 changes: 67 additions & 0 deletions
67
app/scripts/controllers/prequalification/NewGroupPrequalificatoinController.js
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,67 @@ | ||
(function (module) { | ||
mifosX.controllers = _.extend(module, { | ||
NewGroupPrequalificatoinController: function (scope, routeParams, route, dateFilter, location, resourceFactory, http, $uibModal, API_VERSION, $timeout, $rootScope, Upload) { | ||
|
||
scope.agenciesList = []; | ||
scope.portfoliosList = []; | ||
scope.centersList = []; | ||
scope.groupsList = []; | ||
scope.productsList = []; | ||
scope.facilitators = []; | ||
scope.yesNo = [{value: "YES", name: "Yes"}, {value: "NO", name: "No"}]; | ||
scope.restrictDate = new Date(); | ||
scope.formData = {}; | ||
scope.formData.members = []; | ||
scope.membersForm = {}; | ||
scope.memberDetailsForm; | ||
|
||
resourceFactory.prequalificationTemplateResource.get(function (data) { | ||
scope.agenciesList = data.agencies | ||
scope.centersList = data.centerData | ||
scope.productsList = data.loanProducts | ||
scope.facilitators = data.facilitators | ||
}); | ||
|
||
scope.submit = function () { | ||
this.formData.locale = scope.optlang.code; | ||
|
||
resourceFactory.blacklistResource.save(this.formData, function (data) { | ||
location.path('blacklist/' + data.resourceId + '/viewdetails'); | ||
}); | ||
} | ||
|
||
scope.addMemberData = function () { | ||
var reqDate = dateFilter(scope.membersForm.dob, scope.df); | ||
|
||
scope.membersForm.dob = reqDate; | ||
scope.membersForm['locale'] = scope.optlang.code; | ||
scope.membersForm['dateFormat'] = scope.df; | ||
|
||
scope.formData.members.push(scope.membersForm); | ||
scope.membersForm = {} | ||
scope.memberDetailsForm.$setUntouched(); | ||
scope.memberDetailsForm.$setPristine(); | ||
|
||
} | ||
|
||
scope.requestPrequalification = function () { | ||
console.log("submitting form data") | ||
this.formData.locale = scope.optlang.code; | ||
this.formData.dateFormat = scope.df; | ||
|
||
// this.formData.members.forEach(function(member){ | ||
// member.locale = scope.optlang.code; | ||
// member.dateFormat = scope.df; | ||
// }) | ||
resourceFactory.prequalificationResource.save(this.formData, function (data) { | ||
location.path('prequalification/' + data.resourceId + '/viewdetails'); | ||
}); | ||
} | ||
|
||
} | ||
}); | ||
|
||
mifosX.ng.application.controller('NewGroupPrequalificatoinController', ['$scope', '$routeParams', '$route', 'dateFilter', '$location', 'ResourceFactory', '$http', '$uibModal', 'API_VERSION', '$timeout', '$rootScope', 'Upload', mifosX.controllers.NewGroupPrequalificatoinController]).run(function ($log) { | ||
$log.info("NewGroupPrequalificatoinController initialized"); | ||
}); | ||
}(mifosX.controllers || {})); |
Oops, something went wrong.