mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 14:26:51 +00:00
Merge branch 'master' of https://github.com/openMF/community-app
This commit is contained in:
commit
a5f5cbd058
@ -5,10 +5,10 @@
|
||||
"label.username" : "Username",
|
||||
"label.password" : "Password",
|
||||
"label.signin":"Sign In",
|
||||
"label.systemid": "System Id :",
|
||||
"label.systemid": "System Id:",
|
||||
"label.product.name" : "Mifos X",
|
||||
"label.product.version" : "version",
|
||||
"label.product.status" : "Mifos X is upto date",
|
||||
"label.product.status" : "Mifos X is up to date",
|
||||
"label.product.aboutus1" : "Mifos X is designed by ",
|
||||
"label.product.aboutus2" : "A global community",
|
||||
"label.product.aboutus3" : "working together for poorest, especially women, gain access to financial services.",
|
||||
@ -67,6 +67,7 @@
|
||||
"label.disable":"Disable",
|
||||
"label.approve":"Approve",
|
||||
"label.ispenalty":"Is Penalty?",
|
||||
"table.heading.repaymentsevery":"Repeats every",
|
||||
|
||||
"# common label headings":"....",
|
||||
"label.firstname":"First name:",
|
||||
@ -98,8 +99,9 @@
|
||||
"label.dueon":"Due on",
|
||||
"label.codename":"Code name",
|
||||
"label.requirefield":"Required field",
|
||||
"label.selectcharge":"Select charge",
|
||||
|
||||
"label.loanofficer" : "Loan Officer :",
|
||||
"label.loanofficer" : "Loan Officer:",
|
||||
"label.fromdate":"From date",
|
||||
"label.todate":"To date",
|
||||
"label.select.staff" : "Select staff",
|
||||
@ -121,7 +123,7 @@
|
||||
|
||||
"#tasks":"",
|
||||
"tab.checkerinbox":"Checker inbox",
|
||||
|
||||
|
||||
"#templates":"",
|
||||
"link.create.new.template":"Create Template",
|
||||
"label.advancedoptions":"Advanced options",
|
||||
@ -192,7 +194,6 @@
|
||||
"table.heading.active":"Active",
|
||||
"table.heading.nextrun":"Next run",
|
||||
"table.heading.previousrun":"Previous run",
|
||||
"table.heading.previousrun":"Previous run",
|
||||
"table.heading.previousrunstatus":"Previous run status",
|
||||
"table.heading.currentstatus":"Current status",
|
||||
"label.schedulerstatus":"Scheduler Status",
|
||||
@ -218,7 +219,7 @@
|
||||
"label.office.openedon":"Opened on:",
|
||||
"label.office.namedecorated":"Name Decorated:",
|
||||
"label.office.externalid":"External Id:",
|
||||
|
||||
|
||||
"#view client":"",
|
||||
"tab.general":"General",
|
||||
"label.firstname":"First Name:",
|
||||
@ -305,7 +306,7 @@
|
||||
"button.makerepayment":"Make Repayment",
|
||||
"button.waiveinterest":"Waive Interest",
|
||||
"button.writeoff":"Write-Off",
|
||||
"button.close-rescheduled":"Close(as Rescheduled)",
|
||||
"button.close-rescheduled":"Close (as Rescheduled)",
|
||||
"button.close":"Close",
|
||||
"button.more":"More",
|
||||
|
||||
@ -344,7 +345,7 @@
|
||||
"label.loan.account.interestwaivedOn":"Write-Off on date:",
|
||||
"label.writeoff.loan.account":"Write-Off Loan",
|
||||
"label.loan.account.writeoffOnDate":"Written off on:",
|
||||
"label.close.loan.account.asrescheduled":"Close loan(as Rescheduled)",
|
||||
"label.close.loan.account.asrescheduled":"Close loan (as Rescheduled)",
|
||||
"label.loan.account.closedOnDate":"Closedon date:",
|
||||
"form.legend.edit.loan.account":"Edit Loan Application",
|
||||
"label.loan.view.collateral":"View Collateral",
|
||||
@ -422,7 +423,7 @@
|
||||
"label.heading.income":"Income",
|
||||
"label.createsavingproduct":"Create Saving Product",
|
||||
"label.editsavingproduct":"Edit Saving Product",
|
||||
|
||||
|
||||
"#enter collection sheet":"",
|
||||
"label.duecollections":"Due/Collections",
|
||||
"label.issueswithdrawls":"Issues/Withdrawals",
|
||||
@ -431,7 +432,7 @@
|
||||
"label.branchoffice":"Branch Office :",
|
||||
"label.center":"Center :",
|
||||
"label.group":"Group :",
|
||||
"label.meetingcalendar":"Date of transaction :",
|
||||
"label.meetingcalendar":"Date of transaction:",
|
||||
"label.collectionsheet":"Collection Sheet",
|
||||
"label.grouptotal":"Group Total",
|
||||
|
||||
@ -468,7 +469,7 @@
|
||||
"table.heading.totalpaidlate":"Late",
|
||||
"table.heading.totalwaived":"Waived",
|
||||
"table.heading.totaloutstanding":"Outstanding",
|
||||
|
||||
|
||||
"#transaction table":"",
|
||||
"table.heading.transactionId":"Transaction Id",
|
||||
"table.heading.transactiondate":"Transaction Date",
|
||||
@ -502,7 +503,7 @@
|
||||
"link.products.productsmix" : "Products Mix",
|
||||
"link.products.charges" : "Charges/Penalties",
|
||||
"link.admin.users" : "Users",
|
||||
"link.admin.organisation" : "Organisation",
|
||||
"link.admin.organisation" : "Organization",
|
||||
"link.admin.products" : "Products",
|
||||
"link.admin.templates" : "Templates",
|
||||
"link.admin.system" : "System",
|
||||
@ -510,13 +511,13 @@
|
||||
"link.admin.configuration":"Configurations",
|
||||
"link.profile" : "Profile",
|
||||
"link.settings" : "Settings",
|
||||
"link.logout" : "LogOut",
|
||||
"link.logout" : "Log out",
|
||||
"label.good":"Good",
|
||||
"label.fair":"Fair",
|
||||
"label.bad":"Bad",
|
||||
"label.excellent":"Excellent",
|
||||
"label.youneedtologintoaccessthisarea":"You need to login in order to access this area.",
|
||||
|
||||
"label.youneedtologintoaccessthisarea":"You need to log in in order to access this area.",
|
||||
|
||||
"#groups":"",
|
||||
"label.meetingdate.start":"Meeting date start on or after",
|
||||
"label.repeat":"Repeat",
|
||||
@ -524,6 +525,9 @@
|
||||
"label.repeats":"Repeats",
|
||||
"label.repeatsevery":"Repeats Every",
|
||||
"label.attachmeeting":"Attach a meeting",
|
||||
"link.view.group":"View group",
|
||||
"link.editmeeting":"Edit meeting",
|
||||
"link.attachmeeting":"Attach meeting",
|
||||
|
||||
"#centers":"",
|
||||
"link.view.center":"View Center",
|
||||
@ -607,7 +611,7 @@
|
||||
"label.reportcategory":"Report category:",
|
||||
"label.corereport":"Core report:",
|
||||
"label.usereport":"Use report:",
|
||||
"label.userreportui":"Use report(UI)",
|
||||
"label.userreportui":"Use report (UI)",
|
||||
"label.heading.reportdetails":"Report Details",
|
||||
"label.heading.sql":"Sql",
|
||||
"label.sql":"Sql:",
|
||||
@ -856,7 +860,7 @@
|
||||
"label.edit":"Edit",
|
||||
"label.close":"Close",
|
||||
"label.numofactiveclient":"Active Clients:",
|
||||
"label.numofactivegrouploans":"Active Groups:",
|
||||
"label.numofactivegrouploans":"Active Group Loans:",
|
||||
"label.numofactiveclientloans":"Active Client Loans:",
|
||||
"label.numofactivegroupborrowers":"Active Group Borrowers:",
|
||||
"label.numofactiveclientborrowers":"Active Client Borrowers:",
|
||||
@ -1139,7 +1143,7 @@
|
||||
"label.viewcheckerinbox":"View Checker Inbox",
|
||||
"label.searchbytransaction":"Search by transaction #",
|
||||
"label.searchbyuser":"Search by user",
|
||||
"label.advancesearch":"Advanced Search",
|
||||
"label.advancesearch":"Advance Search",
|
||||
|
||||
"#Translations of Error and Validation messages returned from mifos platform API":"",
|
||||
"label.error":"Error",
|
||||
@ -1217,7 +1221,7 @@
|
||||
"loanTransactionType.approveTransfer":"Transfer Approved",
|
||||
"loanTransactionType.chargePayment":"Fee payment",
|
||||
"loanStatusType.transfer.on.hold":"Transfer on Hold",
|
||||
|
||||
|
||||
"# loan statuses enumeration codes":"",
|
||||
"loanStatusType.invalid":"Invalid status",
|
||||
"loanStatusType.submitted.and.pending.approval":"Submitted and pending approval",
|
||||
@ -1358,7 +1362,7 @@
|
||||
"error.msg.codeValue.in.use":"This code value is in use ",
|
||||
|
||||
"# Currencies configuration /currencies":"",
|
||||
"validation.msg.currencies.currencies.cannot.be.empty":"You must select at least one currency that is 'allowed' for your organisation.",
|
||||
"validation.msg.currencies.currencies.cannot.be.empty":"You must select at least one currency that is 'allowed' for your organization.",
|
||||
|
||||
"# Users resource /users":"",
|
||||
"validation.msg.user.username.cannot.be.blank":"Username is mandatory.",
|
||||
@ -2028,6 +2032,7 @@
|
||||
"#####Collection Sheet####":"",
|
||||
"validation.msg.collectionsheet.groupId.not.greater.than.zero":"Group is mandatory to generate collection Sheet.",
|
||||
"validation.msg.collectionsheet.dueDate.cannot.be.blank":"Date of transaction is mandatory to generate collection Sheet.",
|
||||
"validation.msg.collectionsheet.transactionDate.cannot.be.blank":"To generate collection sheet `transaction date` cannot be blank",
|
||||
|
||||
"### Calendar update ##":"",
|
||||
"error.msg.calendar.new.start.date.before.existing.date":"New meeting start on or after date cannot be a date before existing meeting start date.",
|
||||
@ -2096,6 +2101,158 @@
|
||||
"label.chargepaymentmode":"Charge Payment Mode",
|
||||
"label.pay":"Pay",
|
||||
"label.enterpaymentdate":"Enter Payment Date",
|
||||
"label.performancehistory":"Performance History"
|
||||
"label.performancehistory":"Performance History",
|
||||
"label.expertsearch":"Expert Search",
|
||||
"label.newuser":"New User",
|
||||
"label.frequentactivities":"Frequent Activities",
|
||||
"label.recentactivities":"Recent Activities",
|
||||
"label.mifosxdashhome":"MifosX Dash Home",
|
||||
"label.searchactivities":"Search Activities/Actions",
|
||||
"label.addcodevalues":"Add Code Values",
|
||||
|
||||
|
||||
"#DashHome":"......",
|
||||
"":"Index",
|
||||
"expertsearch":"Expert Search",
|
||||
"viewcenter":"View Center",
|
||||
"products":"Products",
|
||||
"createcenter":"Create Center",
|
||||
"centers":"Centers",
|
||||
"viewsavingaccount":"View Saving Acc",
|
||||
"savingaccount":"Saving Acc",
|
||||
"global":"Configurations",
|
||||
"createclosure":"Create Closure",
|
||||
"audit":"Audit",
|
||||
"bulkloan":"Bulkloan Reassign",
|
||||
"addproductmix":"Add Product Mix",
|
||||
"entercollectionsheet":"Collection Sheet",
|
||||
"templates":"Templates",
|
||||
"createtemplate":"Create Template",
|
||||
"createloanproduct":"Create Loan Prod",
|
||||
"createsavingproduct":"Create Saving Prod",
|
||||
"system":"System",
|
||||
"adminroles":"Roles",
|
||||
"adminaddrole":"Add Role",
|
||||
"adminviewmctasks":"Maker Checker",
|
||||
"clients":"Clients",
|
||||
"createclient":"Create Client",
|
||||
"loanproducts":"Loan Products",
|
||||
"charges":"Charges",
|
||||
"savingproducts":"Saving Products",
|
||||
"offices":"Offices",
|
||||
"createoffice":"Create Office",
|
||||
"tasks":"Tasks",
|
||||
"currconfig":"Currency Config",
|
||||
"usersetting":"User Setting",
|
||||
"users":"Users",
|
||||
"savingaccountreject":"Savings Reject",
|
||||
"createuser":"Create User",
|
||||
"employees":"Employees",
|
||||
"createemployee":"Create Employee",
|
||||
"managefunds":"Manage Funds",
|
||||
"accountingcoa":"Chart of Acc",
|
||||
"freqposting":"Frequent Posting",
|
||||
"journalentry":"Journal Entry",
|
||||
"searchtransaction":"Search Transaction",
|
||||
"accounts_closure":"Acc Closure",
|
||||
"accounting_rules":"Accounting Rules",
|
||||
"addaccrule":"Add Acc Rule",
|
||||
"datatables":"Data Tables",
|
||||
"createdatatable":"Create Data Table",
|
||||
"addcode":"Add Code",
|
||||
"jobs":"Jobs",
|
||||
"codes":"Codes",
|
||||
"reports":"Reports",
|
||||
"createreport":"Create Report",
|
||||
"holidays":"Holidays",
|
||||
"createholiday":"Create Holiday",
|
||||
"groups":"Groups",
|
||||
"creategroup":"Create Group",
|
||||
"addmember":"Add Member",
|
||||
"groupattendance":"Group Attendance",
|
||||
"addgroup":"Add Group",
|
||||
"centerattendance":"Center Attendance",
|
||||
"createcharge":"Create Charge",
|
||||
"login":"Login",
|
||||
"createglaccount":"Create GL Acc",
|
||||
"viewglaccount":"View GL Acc",
|
||||
"editglaccount":"Edit GL Acc",
|
||||
"viewtransaction":"View Transaction",
|
||||
"viewcloseaccounting":"View Close Acc",
|
||||
"viewaccrule":"View Acc Rule",
|
||||
"editaccrule":"Edit Acc Rule",
|
||||
"viewcode":"View Code",
|
||||
"viewschedulerjob":"View Scheduler Job",
|
||||
"editschedulerjob":"Edit Scheduler Job",
|
||||
"editcode":"Edit Code",
|
||||
"systemviewreport":"View Report",
|
||||
"editreport":"Edit Report",
|
||||
"viewholiday":"View Holiday",
|
||||
"newclientsavingapplication":"New Client Savings",
|
||||
"newgroupsavingapplication":"New Group Savings",
|
||||
"newjlgsavingapplication":"New JLG Savings",
|
||||
"editsavingaccount":"Edit Savings Acc",
|
||||
"savingaccountscharges":"Savings Charges",
|
||||
"viewaccounttransfers":"View Acc Transfers",
|
||||
"accounttransfers":"Acc Transfers",
|
||||
"viewsavingtrxntrxnId":"Savings Trxn",
|
||||
"viewgroup":"View Group",
|
||||
"editgroup":"Edit Group",
|
||||
"closegroup":"Close Group",
|
||||
"addrole":"Add Role",
|
||||
"membermanage":"Manage Member",
|
||||
"transferclients":"Transfer Clients",
|
||||
"editcenter":"Edit Center",
|
||||
"closecenter":"Close Center",
|
||||
"editcharge":"Edit Charge",
|
||||
"viewproductmix":"Productmix",
|
||||
"editproductmix":"Edit Productmix",
|
||||
"viewaudit":"View Audit",
|
||||
"guarantor":"Guarantor",
|
||||
"viewcheckerinbox":"Checker Inbox",
|
||||
"editguarantor":"Edit Guarantor",
|
||||
"viewtemplate":"View Template",
|
||||
"edittemplate":"Edit Template",
|
||||
"editloanproduct":"Edit Loan Prod",
|
||||
"editsavingproduct":"Edit Savings Prod",
|
||||
"adminviewrole":"View Role",
|
||||
"adminroleedit":"Edit Role",
|
||||
"editclient":"Edit Client",
|
||||
"clientaction":"Client Actions",
|
||||
"transferclient":"Transfer Client",
|
||||
"addclientdocument":"Add Client Doc",
|
||||
"addclientidentifierdocument":"Client ID Doc",
|
||||
"newclientloanaccount":"New Client Loan Acc",
|
||||
"newjlgloanaccount" :"New JLG Loan",
|
||||
"newgrouploanaccount":"Group Loan Acc",
|
||||
"viewloanaccount":"View Loan Acc",
|
||||
"loanaccountaction":"Loan Actions",
|
||||
"loanaccountcharge":"Loan Charges",
|
||||
"editloanaccount":"Edit Loan Acc",
|
||||
"editloancharge":"Edit Loan Charge",
|
||||
"addcollateral":"Add Collateral",
|
||||
"loaneditcollateral":"Edit Collateral",
|
||||
"loanviewcollateral":"View Collateral",
|
||||
"loanviewcharge":"View Charge",
|
||||
"assignloanofficer":"Assign Staff",
|
||||
"addloandocument":"Add Loan Doc",
|
||||
"organization":"Organization",
|
||||
"viewsavingproduct":"View Saving Prod",
|
||||
"viewoffice":"View Office",
|
||||
"editoffice":"Edit Office",
|
||||
"search":"Query Result",
|
||||
"viewloanproduct":"View Loan Prod",
|
||||
"viewuser":"View User",
|
||||
"edituser":"Edit User",
|
||||
"viewemployee":"View Employee",
|
||||
"editemployee":"Edit Employee",
|
||||
"navoffices":"Navigation",
|
||||
"adminusers":"System Users"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -116,6 +116,8 @@
|
||||
</div>
|
||||
<nav>
|
||||
<ul class="margin-nav nav nav-list ext-sidenav">
|
||||
<li><a class="bolder black" href="#/expertsearch"><i class="icon-search icon-large"></i> {{ 'label.advancesearch' | translate}}</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a class="bolder black" href="#/nav/offices"><i class="icon-compass icon-large"></i> {{ 'label.navigation' | translate}}</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a class="bolder black" href="#/tasks"><i class="icon-bell-alt icon-large"></i> {{ 'link.tasks' | translate}}</a></li>
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
}, function(data) {
|
||||
scope.staffs = data.staffOptions;
|
||||
});
|
||||
resourceFactory.centerTemplateResource.get({officeId : officeId }, function(data) {
|
||||
resourceFactory.centerTemplateResource.get({officeId : scope.formData.officeId }, function(data) {
|
||||
scope.groups = data.groupMembersOptions;
|
||||
});
|
||||
};
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
(function(module) {
|
||||
mifosX.controllers = _.extend(module, {
|
||||
EnterCollectionSheetController: function(scope, resourceFactory, location, routeParams) {
|
||||
EnterCollectionSheetController: function(scope, resourceFactory, location, routeParams, dateFilter) {
|
||||
scope.offices = [];
|
||||
scope.centers = [];
|
||||
scope.groups = [];
|
||||
@ -11,8 +11,8 @@
|
||||
scope.formData = {};
|
||||
scope.centerId = '';
|
||||
scope.groupId = '';
|
||||
scope.date = {};
|
||||
var centerOrGroupResource = '';
|
||||
scope.formData.transactionDate = "20 September 2013";
|
||||
resourceFactory.officeResource.getAllOffices(function(data) {
|
||||
scope.offices = data;
|
||||
});
|
||||
@ -29,31 +29,43 @@
|
||||
scope.centers = '';
|
||||
scope.groups = '';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
scope.centerSelected = function(centerId) {
|
||||
if(centerId) {
|
||||
scope.collectionsheetdata = "";
|
||||
resourceFactory.centerResource.get({'centerId' : centerId, associations : 'groupMembers,collectionMeetingCalendar' }, function(data) {
|
||||
scope.centerdetails = data;
|
||||
scope.groups = data.groupMembers;
|
||||
if (data.collectionMeetingCalendar)
|
||||
scope.calendarId = data.collectionMeetingCalendar.id;
|
||||
if (data.groupMembers.length > 0) {
|
||||
scope.groups = data.groupMembers;
|
||||
}
|
||||
|
||||
if (data.collectionMeetingCalendar && data.collectionMeetingCalendar.recentEligibleMeetingDate) {
|
||||
scope.date.transactionDate = new Date(dateFilter(data.collectionMeetingCalendar.recentEligibleMeetingDate,'dd MMMM yyyy'));
|
||||
}
|
||||
if (data.collectionMeetingCalendar) {
|
||||
scope.calendarId = data.collectionMeetingCalendar.id;
|
||||
}
|
||||
centerOrGroupResource = "centerResource";
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
scope.groupSelected = function(groupId) {
|
||||
if(groupId) {
|
||||
scope.collectionsheetdata = "";
|
||||
resourceFactory.groupResource.get({'groupId' : groupId, associations : 'collectionMeetingCalendar'}, function(data) {
|
||||
scope.groupdetails = data.pageItems;
|
||||
scope.calendarId = data.collectionMeetingCalendar.id;
|
||||
if (data.collectionMeetingCalendar && data.collectionMeetingCalendar.recentEligibleMeetingDate) {
|
||||
scope.date.transactionDate = new Date(dateFilter(data.collectionMeetingCalendar.recentEligibleMeetingDate,'dd MMMM yyyy'));
|
||||
}
|
||||
centerOrGroupResource = "groupResource";
|
||||
});
|
||||
} else if(scope.centerId){
|
||||
centerOrGroupResource = "centerResource"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
scope.previewCollectionSheet = function() {
|
||||
scope.formData.dateFormat = "dd MMMM yyyy";
|
||||
@ -62,8 +74,10 @@
|
||||
scope.bulkRepaymentTransactions = [];
|
||||
scope.bulkDisbursementTransactions = [];
|
||||
scope.clientsAttendance = [];
|
||||
scope.formData.transactionDate = this.formData.transactionDate;
|
||||
if (centerOrGroupResource == "centerResource") {
|
||||
if (scope.date.transactionDate) {
|
||||
scope.formData.transactionDate = dateFilter(scope.date.transactionDate,'dd MMMM yyyy');
|
||||
}
|
||||
if (centerOrGroupResource == "centerResource" && scope.calendarId !== "") {
|
||||
resourceFactory.centerResource.save({'centerId' : scope.centerId, command : 'generateCollectionSheet'}, scope.formData,function(data){
|
||||
scope.collectionsheetdata = data;
|
||||
scope.bulkRepaymentTransaction(data);
|
||||
@ -71,7 +85,7 @@
|
||||
scope.clientsAttendanceSelected(data);
|
||||
scope.groupTotalArray(data);
|
||||
});
|
||||
} else if (centerOrGroupResource == "groupResource") {
|
||||
} else if (centerOrGroupResource == "groupResource" && scope.calendarId !== "") {
|
||||
resourceFactory.groupResource.save({'groupId' : scope.groupId, command : 'generateCollectionSheet'}, scope.formData,function(data){
|
||||
scope.collectionsheetdata = data;
|
||||
scope.bulkRepaymentTransaction(data);
|
||||
@ -79,14 +93,13 @@
|
||||
scope.clientsAttendanceSelected(data);
|
||||
scope.groupTotalArray(data);
|
||||
});
|
||||
} else {
|
||||
scope.formData.transactionDate = "";
|
||||
} else if (scope.calendarId !== "") {
|
||||
resourceFactory.groupResource.save({'groupId' : 0, command : 'generateCollectionSheet'}, scope.formData,function(data){
|
||||
scope.collectionsheetdata = data;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
scope.bulkRepaymentTransaction = function(data) {
|
||||
var checkEqualOrNot = 'false';
|
||||
@ -113,7 +126,7 @@
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//client transaction amount is update this method will update both individual/all groups
|
||||
//total for a specific product
|
||||
@ -132,7 +145,7 @@
|
||||
});
|
||||
scope.groupTotalArray(scope.collectionSheetData);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//client disburse amount is update this method will update both individual/all groups
|
||||
//total for a specific product
|
||||
@ -151,7 +164,7 @@
|
||||
});
|
||||
scope.groupTotalArray(scope.collectionSheetData);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
scope.clientsAttendanceSelected = function(data) {
|
||||
var checkEqualOrNot = 'false';
|
||||
@ -175,7 +188,7 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
scope.bulkDisbursementTransaction = function(data) {
|
||||
var checkEqualOrNot = 'false';
|
||||
@ -201,7 +214,7 @@
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
function deepCopy(obj) {
|
||||
@ -271,13 +284,19 @@
|
||||
});
|
||||
});
|
||||
scope.grandTotal = loanProductArrayTotal;
|
||||
}
|
||||
};
|
||||
|
||||
scope.cancel = function () {
|
||||
location.path('/home/');
|
||||
};
|
||||
|
||||
scope.submit = function() {
|
||||
scope.formData.calendarId = scope.calendarId;
|
||||
scope.formData.dateFormat = "dd MMMM yyyy";
|
||||
scope.formData.locale = "en";
|
||||
scope.formData.transactionDate = this.formData.transactionDate;
|
||||
if (scope.date.transactionDate) {
|
||||
scope.formData.transactionDate = dateFilter(scope.date.transactionDate,'dd MMMM yyyy');;
|
||||
}
|
||||
scope.formData.actualDisbursementDate = this.formData.transactionDate;
|
||||
scope.formData.clientsAttendance = scope.clientsAttendance;
|
||||
scope.formData.bulkDisbursementTransactions = scope.bulkDisbursementTransactions;
|
||||
@ -294,7 +313,7 @@
|
||||
};
|
||||
}
|
||||
});
|
||||
mifosX.ng.application.controller('EnterCollectionSheetController', ['$scope', 'ResourceFactory', '$location', '$routeParams', mifosX.controllers.EnterCollectionSheetController]).run(function($log) {
|
||||
mifosX.ng.application.controller('EnterCollectionSheetController', ['$scope', 'ResourceFactory', '$location', '$routeParams', 'dateFilter', mifosX.controllers.EnterCollectionSheetController]).run(function($log) {
|
||||
$log.info("EnterCollectionSheetController initialized");
|
||||
});
|
||||
}(mifosX.controllers || {}));
|
||||
|
||||
@ -3,44 +3,46 @@
|
||||
AttachMeetingController: function(scope, resourceFactory, location, routeParams,dateFilter) {
|
||||
resourceFactory.attachMeetingResource.get({groupOrCenter : routeParams.entityType, groupOrCenterId : routeParams.id,
|
||||
templateSource : 'template'}, function(data) {
|
||||
scope.entityType = routeParams.entityType;
|
||||
scope.groupOrCenterId = routeParams.id;
|
||||
scope.groupCenterData = data;
|
||||
scope.restrictDate = new Date();
|
||||
scope.first = {};
|
||||
scope.periodValue = "day(s)";
|
||||
scope.repeatsOptions = [{id:1,value:"daily"}, {id:2,value:"weekly"}, {id:3,value:"monthly"}, {id:4,value:"yearly"}];
|
||||
scope.repeatsEveryOptions = ["1","2","3"];
|
||||
//to display default in select boxes
|
||||
scope.formData = {
|
||||
repeating :'true',
|
||||
repeats:'daily',
|
||||
repeatsEvery:'1'
|
||||
frequency:scope.repeatsOptions[0].id,
|
||||
interval:'1'
|
||||
}
|
||||
scope.periodValue = "day(s)";
|
||||
scope.repeatsOptions = ["daily", "weekly", "monthly", "yearly"];
|
||||
scope.repeatsEveryOptions = ["1","2","3"];
|
||||
});
|
||||
|
||||
scope.selectedPeriod = function(period) {
|
||||
if(period == "daily") {
|
||||
if(period == 1) {
|
||||
scope.repeatsEveryOptions = ["1","2","3"];
|
||||
scope.periodValue = "day(s)"
|
||||
}
|
||||
if(period == "weekly") {
|
||||
if(period == 2) {
|
||||
scope.repeatsEveryOptions = ["1","2","3"];
|
||||
scope.formData.repeatsOnDay = 'MO';
|
||||
scope.formData.repeatsOnDay = '1';
|
||||
scope.periodValue = "week(s)";
|
||||
scope.repeatsOnOptions = [
|
||||
{name : "MON", value : "MO"},
|
||||
{name : "TUE", value : "TU"},
|
||||
{name : "WED", value : "WE"},
|
||||
{name : "THU", value : "TH"},
|
||||
{name : "FRI", value : "FR"},
|
||||
{name : "SAT", value : "SA"},
|
||||
{name : "SUN", value : "SU"}
|
||||
{name : "MON", value : "1"},
|
||||
{name : "TUE", value : "2"},
|
||||
{name : "WED", value : "3"},
|
||||
{name : "THU", value : "4"},
|
||||
{name : "FRI", value : "5"},
|
||||
{name : "SAT", value : "6"},
|
||||
{name : "SUN", value : "7"}
|
||||
]
|
||||
}
|
||||
if(period == "monthly") {
|
||||
if(period == 3) {
|
||||
scope.periodValue = "month(s)";
|
||||
scope.repeatsEveryOptions = ["1","2","3","4", "5", "6", "7", "8", "9", "10", "11"];
|
||||
}
|
||||
if(period == "yearly") {
|
||||
if(period == 4) {
|
||||
scope.periodValue = "year(s)";
|
||||
scope.repeatsEveryOptions = ["1","2","3"];
|
||||
}
|
||||
|
||||
88
app/scripts/controllers/groups/EditMeetingController.js
Normal file
88
app/scripts/controllers/groups/EditMeetingController.js
Normal file
@ -0,0 +1,88 @@
|
||||
(function(module) {
|
||||
mifosX.controllers = _.extend(module, {
|
||||
EditMeetingController: function(scope, resourceFactory, location, routeParams,dateFilter) {
|
||||
scope.formData = {};
|
||||
resourceFactory.attachMeetingResource.get({groupOrCenter : routeParams.entityType, groupOrCenterId : routeParams.groupOrCenterId,
|
||||
templateSource : routeParams.calendarId, template:'true'}, function(data) {
|
||||
scope.entityType = routeParams.entityType;
|
||||
scope.groupOrCenterId = routeParams.groupOrCenterId;
|
||||
scope.calendarData = data;
|
||||
scope.restrictDate = new Date();
|
||||
scope.first = {date: new Date(data.startDate)};
|
||||
scope.repeatsOptions = [{id:1,value:"daily"}, {id:2,value:"weekly"}, {id:3,value:"monthly"}, {id:4,value:"yearly"}];
|
||||
scope.repeatsEveryOptions = ["1","2","3"];
|
||||
scope.selectedPeriod(scope.calendarData.frequency.id);
|
||||
//to display default in select boxes
|
||||
scope.formData = {
|
||||
repeating :scope.calendarData.repeating,
|
||||
frequency:scope.calendarData.frequency.id,
|
||||
interval:scope.calendarData.interval
|
||||
}
|
||||
//update interval option
|
||||
for(var i in scope.repeatsEveryOptions) {
|
||||
if (scope.repeatsEveryOptions[i] == scope.calendarData.interval) {
|
||||
scope.formData.interval = scope.repeatsEveryOptions[i];
|
||||
}
|
||||
}
|
||||
//update radio button option
|
||||
if (scope.formData.frequency == 2) {
|
||||
scope.formData.repeatsOnDay = scope.calendarData.repeatsOnDay.id;
|
||||
}
|
||||
});
|
||||
|
||||
scope.selectedPeriod = function(period) {
|
||||
if(period == 1) {
|
||||
scope.repeatsEveryOptions = ["1","2","3"];
|
||||
scope.periodValue = "day(s)"
|
||||
}
|
||||
if(period == 2) {
|
||||
scope.repeatsEveryOptions = ["1","2","3"];
|
||||
scope.formData.repeatsOnDay = '1';
|
||||
scope.periodValue = "week(s)";
|
||||
scope.repeatsOnOptions = [
|
||||
{name : "MON", value : "1"},
|
||||
{name : "TUE", value : "2"},
|
||||
{name : "WED", value : "3"},
|
||||
{name : "THU", value : "4"},
|
||||
{name : "FRI", value : "5"},
|
||||
{name : "SAT", value : "6"},
|
||||
{name : "SUN", value : "7"}
|
||||
]
|
||||
}
|
||||
if(period == 3) {
|
||||
scope.periodValue = "month(s)";
|
||||
scope.repeatsEveryOptions = ["1","2","3","4", "5", "6", "7", "8", "9", "10", "11"];
|
||||
}
|
||||
if(period == 4) {
|
||||
scope.periodValue = "year(s)";
|
||||
scope.repeatsEveryOptions = ["1","2","3"];
|
||||
}
|
||||
}
|
||||
|
||||
scope.submit = function() {
|
||||
var reqDate = dateFilter(scope.first.date,'dd MMMM yyyy');
|
||||
this.formData.startDate = reqDate;
|
||||
this.formData.title = scope.calendarData.title;
|
||||
this.formData.locale = "en";
|
||||
this.formData.dateFormat = "dd MMMM yyyy";
|
||||
this.formData.typeId = "1";
|
||||
|
||||
resourceFactory.attachMeetingResource.update({groupOrCenter : routeParams.entityType,
|
||||
groupOrCenterId : routeParams.groupOrCenterId,templateSource : routeParams.calendarId}, this.formData,function(data){
|
||||
var destURI = "";
|
||||
if(routeParams.entityType == "groups") {
|
||||
destURI = "viewgroup/"+routeParams.groupOrCenterId;
|
||||
}
|
||||
else if(routeParams.entityType == "centers") {
|
||||
destURI = "viewcenter/"+routeParams.groupOrCenterId;
|
||||
}
|
||||
location.path(destURI);
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
mifosX.ng.application.controller('EditMeetingController', ['$scope', 'ResourceFactory', '$location', '$routeParams','dateFilter', mifosX.controllers.EditMeetingController]).run(function($log) {
|
||||
$log.info("EditMeetingController initialized");
|
||||
});
|
||||
}(mifosX.controllers || {}));
|
||||
|
||||
@ -18,12 +18,6 @@
|
||||
resourceFactory.groupNotesResource.getAllNotes({groupId: routeParams.id} , function(data) {
|
||||
scope.groupNotes = data;
|
||||
});
|
||||
scope.deleteGrouppop = function(){
|
||||
scope.choice = 3;
|
||||
} ;
|
||||
scope.delete = function(id){
|
||||
|
||||
};
|
||||
scope.delrole = function(id){
|
||||
resourceFactory.groupResource.save({groupId: routeParams.id,command: 'unassignRole',roleId:id}, {}, function(data) {
|
||||
resourceFactory.groupResource.get({groupId: routeParams.id}, function(data){
|
||||
|
||||
@ -7,9 +7,7 @@
|
||||
scope.restrictDate = new Date();
|
||||
resourceFactory.guarantorResource.get({ loanId: routeParams.loanId,templateResource:routeParams.id,template:true}, function(data) {
|
||||
scope.template = data;
|
||||
scope.date.first = new Date(data.dob)
|
||||
scope.formData = {
|
||||
relationshipType: data.clientRelationshipType.id,
|
||||
firstname: data.firstname,
|
||||
lastname: data.lastname,
|
||||
city: data.city,
|
||||
@ -17,6 +15,14 @@
|
||||
mobile: data.mobileNumber,
|
||||
residence: data.housePhoneNumber
|
||||
}
|
||||
|
||||
if (data.clientRelationshipType) {
|
||||
relationshipType: data.clientRelationshipType.id;
|
||||
}
|
||||
|
||||
if (data.dob) {
|
||||
scope.date.first = new Date(dateFilter(data.dob, 'dd MMMM yyyy'));
|
||||
}
|
||||
});
|
||||
scope.submit = function(){
|
||||
var guarantor = {};
|
||||
@ -37,7 +43,7 @@
|
||||
resourceFactory.guarantorResource.update({ loanId:routeParams.loanId,templateResource:routeParams.id},guarantor, function(data) {
|
||||
location.path('viewloanaccount/'+routeParams.loanId);
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
mifosX.ng.application.controller('EditGuarantorController', ['$scope', 'ResourceFactory', '$routeParams', '$location','dateFilter', mifosX.controllers.EditGuarantorController]).run(function($log) {
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
scope.clientview = false;
|
||||
scope.temp = true;
|
||||
scope.date = {};
|
||||
scope.formData = {};
|
||||
scope.restrictDate = new Date();
|
||||
|
||||
resourceFactory.guarantorResource.get({ loanId:routeParams.id,templateResource:'template'}, function(data) {
|
||||
@ -56,7 +57,7 @@
|
||||
resourceFactory.guarantorResource.save({ loanId:routeParams.id},guarantor, function(data) {
|
||||
location.path('viewloanaccount/'+routeParams.id);
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
mifosX.ng.application.controller('GuarantorController', ['$scope', 'ResourceFactory', '$routeParams', '$location','dateFilter', mifosX.controllers.GuarantorController]).run(function($log) {
|
||||
|
||||
@ -45,6 +45,7 @@
|
||||
scope.modelName = 'actualDisbursementDate';
|
||||
resourceFactory.loanTrxnsTemplateResource.get({loanId:scope.accountId, command:'disburse'}, function(data){
|
||||
scope.paymentTypes=data.paymentTypeOptions;
|
||||
scope.formData.paymentTypeId = data.paymentTypeOptions[0].id;
|
||||
scope.formData[scope.modelName] = new Date();
|
||||
});
|
||||
scope.title = 'label.disburse.loan.account';
|
||||
|
||||
@ -218,21 +218,22 @@
|
||||
}
|
||||
|
||||
if (data.status.value == "Approved") {
|
||||
scope.buttons = { singlebuttons : [{
|
||||
name:"button.addloancharge",
|
||||
icon :"icon-plus-sign"
|
||||
},
|
||||
scope.buttons = { singlebuttons : [
|
||||
{
|
||||
name:"button.assignloanofficer",
|
||||
icon :"icon-user"
|
||||
},
|
||||
{
|
||||
name:"button.disburse",
|
||||
icon :"icon-flag"
|
||||
},
|
||||
{
|
||||
name:"button.undoapproval",
|
||||
icon :"icon-undo"
|
||||
},
|
||||
}
|
||||
],
|
||||
options: [{
|
||||
name:"button.disburse"
|
||||
name:"button.addloancharge"
|
||||
},
|
||||
{
|
||||
name:"button.guarantor"
|
||||
|
||||
196
app/scripts/controllers/main/ExpertSearchController.js
Normal file
196
app/scripts/controllers/main/ExpertSearchController.js
Normal file
@ -0,0 +1,196 @@
|
||||
(function(module) {
|
||||
mifosX.controllers = _.extend(module, {
|
||||
ExpertSearchController: function(scope, resourceFactory , localStorageService,$rootScope,location) {
|
||||
|
||||
scope.recent = [];
|
||||
scope.recent=localStorageService.get('Location');
|
||||
scope.recentEight = [];
|
||||
scope.frequent = [];
|
||||
scope.recentArray = [];
|
||||
scope.uniqueArray = [];
|
||||
scope.searchParams = [];
|
||||
scope.recents = [];
|
||||
|
||||
//to retrieve last 8 recent activities
|
||||
for(var rev= scope.recent.length-1;rev>0;rev--){
|
||||
scope.recentArray.push(scope.recent[rev]);
|
||||
}
|
||||
scope.unique = function(array) {
|
||||
array.forEach(function (value) {
|
||||
if (scope.uniqueArray.indexOf(value) === -1) {
|
||||
scope.uniqueArray.push(value);
|
||||
}
|
||||
});
|
||||
}
|
||||
scope.unique(scope.recentArray);
|
||||
//recent activities retrieved
|
||||
|
||||
//retrieve last 8 recent activities
|
||||
for(var l=0; l<8;l++){
|
||||
if(scope.uniqueArray[l]){
|
||||
scope.recents.push(scope.uniqueArray[l]);
|
||||
}
|
||||
}
|
||||
// 9 recent activities retrieved
|
||||
|
||||
//count duplicates
|
||||
var i = scope.recent.length;
|
||||
var obj ={};
|
||||
while (i)
|
||||
{
|
||||
obj[scope.recent[--i]] = (obj[scope.recent[i]] || 0) + 1;
|
||||
}
|
||||
//count ends here
|
||||
|
||||
//to sort based on counts
|
||||
var sortable = [];
|
||||
for (var i in obj){
|
||||
sortable.push([i, obj[i]]);
|
||||
}
|
||||
sortable.sort(function(a, b) {return a[1] - b[1]});
|
||||
//sort end here
|
||||
|
||||
//to retrieve the locations from sorted array
|
||||
var sortedArray =[];
|
||||
for(var key in sortable) {
|
||||
sortedArray.push(sortable[key][0]);
|
||||
}
|
||||
//retrieving ends here
|
||||
|
||||
//retrieve last 8 frequent actions
|
||||
for(var freq = sortedArray.length-1; freq>sortedArray.length-9;freq--){
|
||||
if(sortedArray[freq]){
|
||||
scope.frequent.push(sortedArray[freq]);
|
||||
}
|
||||
}
|
||||
// retrieved 8 frequent actions
|
||||
|
||||
scope.searchParams = ['create client','clients','create group','groups','centers','create center','configuration','tasks','templates','system users',
|
||||
'create template', 'create loan product', 'create saving product', 'roles', 'add role', 'configure maker checker tasks',
|
||||
'users', 'loan products', 'charges', 'saving products', 'offices', 'create office', 'currency configurations', 'user settings',
|
||||
'create user', 'employees', 'create employee', 'manage funds', 'offices', 'chart of accounts', 'frequent postings', 'Journal entry',
|
||||
'search transaction', 'account closure', 'accounting rules', 'add accounting rule', 'data tables', 'create data table', 'add code',
|
||||
'jobs', 'codes', 'reports', 'create report', 'holidays', 'create holiday', 'create charge', 'product mix', 'add member', 'add product mix',
|
||||
'bulk loan reassignment', 'audit', 'create accounting closure', 'enter collection sheet','navigation','accounting','organization','system'
|
||||
];
|
||||
scope.search = function(){
|
||||
switch(this.formData.search){
|
||||
case 'create client': location.path('/createclient');
|
||||
break;
|
||||
case 'clients': location.path('/clients');
|
||||
break;
|
||||
case 'create group': location.path('/creategroup');
|
||||
break;
|
||||
case 'groups': location.path('/groups');
|
||||
break;
|
||||
case 'create center': location.path('/createcenter');
|
||||
break;
|
||||
case 'centers': location.path('/centers');
|
||||
break;
|
||||
case 'configuration': location.path('/global');
|
||||
break;
|
||||
case 'tasks': location.path('/tasks');
|
||||
break;
|
||||
case 'templates': location.path('/templates');
|
||||
break;
|
||||
case 'create template': location.path('/createtemplate');
|
||||
break;
|
||||
case 'create loan product': location.path('/createloanproduct');
|
||||
break;
|
||||
case 'create saving product': location.path('/createsavingproduct');
|
||||
break;
|
||||
case 'roles': location.path('/roles');
|
||||
break;
|
||||
case 'add role': location.path('addrole');
|
||||
break;
|
||||
case 'configure maker checker tasks': location.path('/viewmctasks');
|
||||
break;
|
||||
case 'loan products': location.path('/loanproducts');
|
||||
break;
|
||||
case 'charges': location.path('/charges');
|
||||
break;
|
||||
case 'saving products': location.path('/savingproducts');
|
||||
break;
|
||||
case 'offices': location.path('/offices');
|
||||
break;
|
||||
case 'create office': location.path('/createoffice');
|
||||
break;
|
||||
case 'currency configurations': location.path('/currconfig');
|
||||
break;
|
||||
case 'user settings': location.path('/usersetting');
|
||||
break;
|
||||
case 'employees': location.path('/employees');
|
||||
break;
|
||||
case 'create employee': location.path('/createemployee');
|
||||
break;
|
||||
case 'manage funds': location.path('/managefunds');
|
||||
break;
|
||||
case 'chart of accounts': location.path('/accounting_coa');
|
||||
break;
|
||||
case 'frequent postings': location.path('/freqposting');
|
||||
break;
|
||||
case 'journal entry': location.path('/journalentry');
|
||||
break;
|
||||
case 'search transaction': location.path('/searchtransaction');
|
||||
break;
|
||||
case 'account closure': location.path('/accounts_closure');
|
||||
break;
|
||||
case 'accounting rules': location.path('/accounting_rules');
|
||||
break;
|
||||
case 'add accounting rule': location.path('/add_accrule');
|
||||
break;
|
||||
case 'data tables': location.path('/datatables');
|
||||
break;
|
||||
case 'create data table': location.path('/createdatatable');
|
||||
break;
|
||||
case 'add code': location.path('/addcode');
|
||||
break;
|
||||
case 'jobs': location.path('/jobs');
|
||||
break;
|
||||
case 'codes': location.path('/codes');
|
||||
break;
|
||||
case 'reports': location.path('/reports');
|
||||
break;
|
||||
case 'create report': location.path('/createreport');
|
||||
break;
|
||||
case 'holidays': location.path('/holidays');
|
||||
break;
|
||||
case 'create holiday': location.path('/createholiday');
|
||||
break;
|
||||
case 'add member': location.path('/addmember');
|
||||
break;
|
||||
case 'create charge': location.path('/createcharge');
|
||||
break;
|
||||
case 'enter collection sheet': location.path('/entercollectionsheet');
|
||||
break;
|
||||
case 'product mix': location.path('/productmix');
|
||||
break;
|
||||
case 'add product mix': location.path('/addproductmix');
|
||||
break;
|
||||
case 'bulk loan reassignment': location.path('/bulkloan');
|
||||
break;
|
||||
case 'audit': location.path('/audit');
|
||||
break;
|
||||
case 'create accounting closure': location.path('/createclosure');
|
||||
break;
|
||||
case 'navigation': location.path('/nav/offices');
|
||||
break;
|
||||
case 'accounting': location.path('/accounting');
|
||||
break;
|
||||
case 'organization': location.path('/organization');
|
||||
break;
|
||||
case 'system': location.path('/system');
|
||||
break;
|
||||
case 'system users': location.path('/admin/users');
|
||||
break;
|
||||
default: location.path('/home');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
mifosX.ng.application.controller('ExpertSearchController', ['$scope', 'ResourceFactory', 'localStorageService','$rootScope','$location', mifosX.controllers.ExpertSearchController]).run(function($log) {
|
||||
$log.info("ExpertSearchController initialized");
|
||||
});
|
||||
}(mifosX.controllers || {}));
|
||||
|
||||
@ -1,10 +1,21 @@
|
||||
(function(module) {
|
||||
mifosX.controllers = _.extend(module, {
|
||||
MainController: function(scope, location, sessionManager, translate) {
|
||||
|
||||
scope.leftnav = false;
|
||||
MainController: function(scope, location, sessionManager, translate,$rootScope,localStorageService) {
|
||||
scope.activity = {};
|
||||
scope.activityQueue = [];
|
||||
if(localStorageService.get('Location')){
|
||||
scope.activityQueue = localStorageService.get('Location');
|
||||
}
|
||||
scope.$watch(function() {
|
||||
return location.path();
|
||||
}, function() {
|
||||
scope.activity= location.path();
|
||||
scope.activityQueue.push(scope.activity);
|
||||
localStorageService.add('Location',scope.activityQueue);
|
||||
});
|
||||
|
||||
scope.$on("UserAuthenticationSuccessEvent", function(event, data) {
|
||||
scope.leftnav = false;
|
||||
scope.$on("UserAuthenticationSuccessEvent", function(event, data) {
|
||||
scope.currentSession = sessionManager.get(data);
|
||||
location.path('/home').replace();
|
||||
});
|
||||
@ -77,6 +88,8 @@
|
||||
'$location',
|
||||
'SessionManager',
|
||||
'$translate',
|
||||
'$rootScope',
|
||||
'localStorageService',
|
||||
mifosX.controllers.MainController
|
||||
]).run(function($log) {
|
||||
$log.info("MainController initialized");
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
scope.products = [];
|
||||
scope.fieldOfficers = [];
|
||||
scope.formData = {};
|
||||
scope.isCollapsed = true;
|
||||
scope.restrictDate = new Date();
|
||||
scope.clientId = routeParams.clientId;
|
||||
scope.groupId = routeParams.groupId;
|
||||
@ -28,7 +27,6 @@
|
||||
scope.inparams.productId = scope.formData.productId;
|
||||
resourceFactory.savingsTemplateResource.get(scope.inparams, function(data) {
|
||||
|
||||
scope.isCollapsed = false;
|
||||
scope.data = data;
|
||||
|
||||
scope.fieldOfficers = data.fieldOfficerOptions;
|
||||
@ -51,12 +49,27 @@
|
||||
};
|
||||
|
||||
scope.addCharge = function(chargeId) {
|
||||
scope.errorchargeevent = false;
|
||||
if (chargeId) {
|
||||
resourceFactory.chargeResource.get({chargeId: chargeId, template: 'true'}, function(data){
|
||||
data.chargeId = data.id;
|
||||
if (data.chargeTimeType.value == "Annual Fee") {
|
||||
if (data.feeOnMonthDay) {
|
||||
data.feeOnMonthDay.push(2013);
|
||||
data.feeOnMonthDay = new Date(dateFilter(data.feeOnMonthDay, 'dd MMMM yyyy'));
|
||||
}
|
||||
} else if (data.chargeTimeType.value == "Monthly Fee") {
|
||||
if (data.feeOnMonthDay) {
|
||||
data.feeOnMonthDay.push(2013);
|
||||
data.feeOnMonthDay = new Date(dateFilter(data.feeOnMonthDay, 'dd MMMM yyyy'));
|
||||
}
|
||||
}
|
||||
scope.charges.push(data);
|
||||
scope.chargeId = undefined;
|
||||
});
|
||||
} else {
|
||||
scope.errorchargeevent = true;
|
||||
scope.labelchargeerror = "selectcharge";
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,15 +91,20 @@
|
||||
if (scope.centerId) this.formData.centerId = scope.centerId;
|
||||
|
||||
if (scope.charges.length > 0) {
|
||||
for (var i in scope.charges) {
|
||||
if(scope.charges[i].chargeTimeType.value=='Annual Fee') {
|
||||
var feeOnMonthDay = scope.charges[i].feeOnMonthDay==undefined ? "" :scope.charges[i].feeOnMonthDay;
|
||||
this.formData.charges.push({ chargeId:scope.charges[i].chargeId, amount:scope.charges[i].amount,
|
||||
feeOnMonthDay:feeOnMonthDay});
|
||||
} else {
|
||||
this.formData.charges.push({ chargeId:scope.charges[i].chargeId, amount:scope.charges[i].amount});
|
||||
for (var i in scope.charges) {
|
||||
if(scope.charges[i].chargeTimeType.value=='Annual Fee') {
|
||||
this.formData.charges.push({ chargeId:scope.charges[i].chargeId, amount:scope.charges[i].amount,
|
||||
feeOnMonthDay:dateFilter(scope.charges[i].feeOnMonthDay,'dd MMMM')});
|
||||
} else if(scope.charges[i].chargeTimeType.value=='Specified due date') {
|
||||
this.formData.charges.push({ chargeId:scope.charges[i].chargeId, amount:scope.charges[i].amount,
|
||||
dueDate:dateFilter(scope.charges[i].dueDate,'dd MMMM yyyy')});
|
||||
}else if(scope.charges[i].chargeTimeType.value=='Monthly Fee') {
|
||||
this.formData.charges.push({ chargeId:scope.charges[i].chargeId, amount:scope.charges[i].amount,
|
||||
feeOnMonthDay:dateFilter(scope.charges[i].feeOnMonthDay,'dd MMMM'), feeInterval : scope.charges[i].feeInterval});
|
||||
} else {
|
||||
this.formData.charges.push({ chargeId:scope.charges[i].chargeId, amount:scope.charges[i].amount});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
resourceFactory.savingsResource.save(this.formData,function(data){
|
||||
location.path('/viewsavingaccount/' + data.savingsId);
|
||||
|
||||
@ -4,13 +4,26 @@
|
||||
scope.products = [];
|
||||
scope.fieldOfficers = [];
|
||||
scope.formData = {};
|
||||
scope.isCollapsed = false;
|
||||
scope.accountId = routeParams.id;
|
||||
scope.charges = [];
|
||||
scope.restrictDate = new Date();
|
||||
resourceFactory.savingsResource.get({accountId:scope.accountId, template:'true', associations : 'charges'}, function(data) {
|
||||
scope.data = data;
|
||||
scope.charges = data.charges || [];
|
||||
if (scope.charges) {
|
||||
for (var i in scope.charges) {
|
||||
if(scope.charges[i].chargeTimeType.value=='Annual Fee') {
|
||||
scope.charges[i].feeOnMonthDay.push(2013);
|
||||
scope.charges[i].feeOnMonthDay = new Date(dateFilter(scope.charges[i].feeOnMonthDay, 'dd MMMM yyyy'));
|
||||
} else if(scope.charges[i].chargeTimeType.value== "Monthly Fee") {
|
||||
scope.charges[i].feeOnMonthDay.push(2013);
|
||||
scope.charges[i].feeOnMonthDay = new Date(dateFilter(scope.charges[i].feeOnMonthDay, 'dd MMMM yyyy'));
|
||||
} else if(scope.charges[i].chargeTimeType.value=='Specified due date') {
|
||||
scope.charges[i].dueDate = new Date(dateFilter(scope.charges[i].dueDate, 'dd MMMM yyyy'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (data.clientId) {
|
||||
scope.formData.clientId = data.clientId;
|
||||
scope.clientName = data.clientName;
|
||||
@ -50,7 +63,6 @@
|
||||
if (scope.formData.groupId) inparams.groupId = scope.formData.groupId;
|
||||
resourceFactory.savingsTemplateResource.get(inparams, function(data) {
|
||||
|
||||
scope.isCollapsed = false;
|
||||
scope.data = data;
|
||||
|
||||
scope.fieldOfficers = data.fieldOfficerOptions;
|
||||
@ -73,13 +85,29 @@
|
||||
}
|
||||
|
||||
scope.addCharge = function(chargeId) {
|
||||
scope.errorchargeevent = false;
|
||||
if (chargeId) {
|
||||
resourceFactory.chargeResource.get({chargeId: chargeId, template: 'true'}, function(data){
|
||||
data.chargeId = data.id;
|
||||
if (data.chargeTimeType.value == "Annual Fee") {
|
||||
if (data.feeOnMonthDay) {
|
||||
data.feeOnMonthDay.push(2013);
|
||||
data.feeOnMonthDay = new Date(dateFilter(data.feeOnMonthDay, 'dd MMMM yyyy'));
|
||||
}
|
||||
} else if (data.chargeTimeType.value == "Monthly Fee") {
|
||||
if (data.feeOnMonthDay) {
|
||||
data.feeOnMonthDay.push(2013);
|
||||
data.feeOnMonthDay = new Date(dateFilter(data.feeOnMonthDay, 'dd MMMM yyyy'));
|
||||
}
|
||||
}
|
||||
|
||||
delete data.id;
|
||||
scope.charges.push(data);
|
||||
scope.chargeId = undefined;
|
||||
});
|
||||
} else {
|
||||
scope.errorchargeevent = true;
|
||||
scope.labelchargeerror = "selectcharge";
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,15 +126,20 @@
|
||||
this.formData.monthDayFormat= "dd MMM";
|
||||
scope.formData.charges = [];
|
||||
if (scope.charges.length > 0) {
|
||||
for (var i in scope.charges) {
|
||||
if(scope.charges[i].chargeTimeType.value=='Annual Fee') {
|
||||
var feeOnMonthDay = scope.charges[i].feeOnMonthDay==undefined ? "" :scope.charges[i].feeOnMonthDay;
|
||||
scope.formData.charges.push({ chargeId:scope.charges[i].chargeId, amount:scope.charges[i].amount,
|
||||
feeOnMonthDay:feeOnMonthDay, id:scope.charges[i].id});
|
||||
} else {
|
||||
scope.formData.charges.push({ chargeId:scope.charges[i].chargeId, amount:scope.charges[i].amount, id:scope.charges[i].id});
|
||||
for (var i in scope.charges) {
|
||||
if(scope.charges[i].chargeTimeType.value=='Annual Fee') {
|
||||
this.formData.charges.push({ chargeId:scope.charges[i].chargeId, amount:scope.charges[i].amount,
|
||||
feeOnMonthDay:dateFilter(scope.charges[i].feeOnMonthDay,'dd MMMM')});
|
||||
} else if(scope.charges[i].chargeTimeType.value=='Specified due date') {
|
||||
this.formData.charges.push({ chargeId:scope.charges[i].chargeId, amount:scope.charges[i].amount,
|
||||
dueDate:dateFilter(scope.charges[i].dueDate,'dd MMMM yyyy')});
|
||||
}else if(scope.charges[i].chargeTimeType.value=='Monthly Fee') {
|
||||
this.formData.charges.push({ chargeId:scope.charges[i].chargeId, amount:scope.charges[i].amount,
|
||||
feeOnMonthDay:dateFilter(scope.charges[i].feeOnMonthDay,'dd MMMM'), feeInterval : scope.charges[i].feeInterval});
|
||||
} else {
|
||||
this.formData.charges.push({ chargeId:scope.charges[i].chargeId, amount:scope.charges[i].amount});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resourceFactory.savingsResource.update({'accountId': scope.accountId}, this.formData, function(data){
|
||||
|
||||
@ -143,7 +143,7 @@
|
||||
}
|
||||
|
||||
scope.cancel = function () {
|
||||
location.path('/viewsavingaccount/' + data.savingsId);
|
||||
location.path('/viewsavingaccount/' + routeParams.id);
|
||||
}
|
||||
|
||||
scope.submit = function() {
|
||||
|
||||
@ -133,9 +133,6 @@
|
||||
options: [{
|
||||
name:"button.postInterest"
|
||||
},
|
||||
{
|
||||
name:"button.transferFunds"
|
||||
},
|
||||
{
|
||||
name:"button.addcharge"
|
||||
},
|
||||
@ -144,6 +141,11 @@
|
||||
}]
|
||||
|
||||
};
|
||||
if (data.clientId) {
|
||||
scope.buttons.options.push({
|
||||
name:"button.transferFunds"
|
||||
});
|
||||
}
|
||||
if(data.charges) {
|
||||
for (var i in scope.charges) {
|
||||
if(scope.charges[i].name == "Annual fee - INR") {
|
||||
@ -153,7 +155,7 @@
|
||||
scope.annualChargeId = scope.charges[i].id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -1,13 +1,16 @@
|
||||
(function(module) {
|
||||
mifosX.controllers = _.extend(module, {
|
||||
CodeController: function(scope, resourceFactory) {
|
||||
CodeController: function(scope, resourceFactory,location) {
|
||||
scope.codes = [];
|
||||
resourceFactory.codeResources.getAllCodes(function(data){
|
||||
scope.codes = data;
|
||||
});
|
||||
});
|
||||
scope.routeTo = function(id){
|
||||
location.path('/viewcode/'+id);
|
||||
}
|
||||
}
|
||||
});
|
||||
mifosX.ng.application.controller('CodeController', ['$scope', 'ResourceFactory', mifosX.controllers.CodeController]).run(function($log) {
|
||||
mifosX.ng.application.controller('CodeController', ['$scope', 'ResourceFactory','$location', mifosX.controllers.CodeController]).run(function($log) {
|
||||
$log.info("CodeController initialized");
|
||||
});
|
||||
}(mifosX.controllers || {}));
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
(function(module) {
|
||||
mifosX.controllers = _.extend(module, {
|
||||
ViewCodeController: function(scope, routeParams , resourceFactory, location,$modal ) {
|
||||
ViewCodeController: function(scope, routeParams , resourceFactory, location,$modal,route ) {
|
||||
scope.codevalues = [];
|
||||
resourceFactory.codeResources.get({codeId: routeParams.id} , function(data) {
|
||||
scope.code = data;
|
||||
@ -25,10 +25,32 @@
|
||||
$modalInstance.dismiss('cancel');
|
||||
};
|
||||
};
|
||||
scope.deleteCodeValue = function (id){
|
||||
$modal.open({
|
||||
templateUrl: 'deletecodevalue.html',
|
||||
controller: CodeValueDeleteCtrl,
|
||||
resolve: {
|
||||
cvid: function () {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
var CodeValueDeleteCtrl = function ($scope, $modalInstance,cvid) {
|
||||
$scope.delete = function () {
|
||||
resourceFactory.codeValueResource.delete({codeId: routeParams.id,codevalueId: cvid},{},function(data){
|
||||
route.reload();
|
||||
});
|
||||
$modalInstance.close('delete');
|
||||
};
|
||||
$scope.cancel = function () {
|
||||
$modalInstance.dismiss('cancel');
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
});
|
||||
mifosX.ng.application.controller('ViewCodeController', ['$scope', '$routeParams','ResourceFactory','$location','$modal', mifosX.controllers.ViewCodeController]).run(function($log) {
|
||||
mifosX.ng.application.controller('ViewCodeController', ['$scope', '$routeParams','ResourceFactory','$location','$modal','$route', mifosX.controllers.ViewCodeController]).run(function($log) {
|
||||
$log.info("ViewCodeController initialized");
|
||||
});
|
||||
}(mifosX.controllers || {}));
|
||||
|
||||
24
app/scripts/directives/ActivitiesDisplayPanelDirective.js
Normal file
24
app/scripts/directives/ActivitiesDisplayPanelDirective.js
Normal file
@ -0,0 +1,24 @@
|
||||
(function(module) {
|
||||
mifosX.directives = _.extend(module, {
|
||||
ActivitiesDisplayPanelDirective: function() {
|
||||
return {
|
||||
restrict: "E",
|
||||
transclude: true,
|
||||
scope: {
|
||||
title: "@"
|
||||
},
|
||||
|
||||
template:
|
||||
"<div class='display-panel' style='margin-top:15px;'>" +
|
||||
"<div class='summary-header'>" +
|
||||
"<div class='display-header-text'>{{title}}</div></div>" +
|
||||
"<div ng-transclude></div></div>"
|
||||
};
|
||||
|
||||
}
|
||||
});
|
||||
}(mifosX.directives || {}));
|
||||
|
||||
mifosX.ng.application.directive("ngDisplaypanel", [mifosX.directives.ActivitiesDisplayPanelDirective]).run(function($log) {
|
||||
$log.info("ActivitiesDisplayPanelDirective initialized");
|
||||
});
|
||||
19
app/scripts/filters/UrlToString.js
Normal file
19
app/scripts/filters/UrlToString.js
Normal file
@ -0,0 +1,19 @@
|
||||
(function(module) {
|
||||
mifosX.filters = _.extend(module, {
|
||||
UrlToString: function () {
|
||||
return function(input) {
|
||||
var exp = input;
|
||||
var alpha = '';
|
||||
for (var i = 0; i < exp.length; i++) {
|
||||
if (exp[i] >= 'A' && exp[i] <= 'z'){
|
||||
alpha = alpha + exp[i];
|
||||
}
|
||||
}
|
||||
return alpha;
|
||||
}
|
||||
}
|
||||
});
|
||||
mifosX.ng.application.filter('UrlToString', ['dateFilter',mifosX.filters.UrlToString]).run(function($log) {
|
||||
$log.info("UrlToString filter initialized");
|
||||
});
|
||||
}(mifosX.filters || {}));
|
||||
@ -24,7 +24,8 @@
|
||||
'configurations':'../scripts/modules/configurations',
|
||||
'angularFileUpload':'../bower_components/angularjs-file-upload/angular-file-upload',
|
||||
'ngSanitize': '../bower_components/angular-sanitize/angular-sanitize',
|
||||
'ckEditor': '../bower_components/ckeditor/ckeditor'
|
||||
'ckEditor': '../bower_components/ckeditor/ckeditor',
|
||||
'LocalStorageModule':'../scripts/modules/localstorage'
|
||||
},
|
||||
shim: {
|
||||
'angular': { exports: 'angular' },
|
||||
@ -44,6 +45,7 @@
|
||||
'modified.datepicker':{deps: ['angular']},
|
||||
'ngSanitize':{deps:['angular'],exports:'ngSanitize'},
|
||||
'ckEditor':{deps:['jquery']},
|
||||
'LocalStorageModule':{deps:['angular']},
|
||||
'mifosX': {
|
||||
deps: [
|
||||
'angular',
|
||||
@ -61,7 +63,8 @@
|
||||
'modified.datepicker',
|
||||
'ngSanitize',
|
||||
'ckEditor',
|
||||
'configurations'
|
||||
'configurations',
|
||||
'LocalStorageModule'
|
||||
],
|
||||
exports: 'mifosX'
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ var mifosX = (function(module) {
|
||||
module.ng = {
|
||||
config : angular.module('config_params' , ['configurations']),
|
||||
services: angular.module('MifosX_Services', ['ngResource']),
|
||||
application: angular.module('MifosX_Application', ['MifosX_Services', 'config_params', 'webStorageModule', 'ui.bootstrap' , 'pascalprecht.translate','nvd3ChartDirectives','notificationWidget', 'angularFileUpload','modified.datepicker','ngSanitize'])
|
||||
application: angular.module('MifosX_Application', ['MifosX_Services', 'config_params', 'webStorageModule', 'ui.bootstrap' , 'pascalprecht.translate','nvd3ChartDirectives','notificationWidget', 'angularFileUpload','modified.datepicker','ngSanitize','LocalStorageModule'])
|
||||
};
|
||||
return module;
|
||||
}(mifosX || {}));
|
||||
|
||||
@ -117,6 +117,7 @@ define(['underscore', 'mifosX'], function() {
|
||||
'groups/GroupController',
|
||||
'groups/ViewGroupController',
|
||||
'groups/AttachMeetingController',
|
||||
'groups/EditMeetingController',
|
||||
'savings/EditSavingAccountController',
|
||||
'savings/SavingAccountActionsController',
|
||||
'accounttransfers/ViewAccountTransferDetailsController',
|
||||
@ -153,13 +154,15 @@ define(['underscore', 'mifosX'], function() {
|
||||
'template/EditTemplateController',
|
||||
'loanAccount/GuarantorController',
|
||||
'loanAccount/EditGuarantorController',
|
||||
'main/ViewCheckerinboxController'
|
||||
'main/ViewCheckerinboxController',
|
||||
'main/ExpertSearchController'
|
||||
],
|
||||
filters: [
|
||||
'StatusLookup',
|
||||
'DateFormat',
|
||||
'DayMonthFormat',
|
||||
'YesOrNo'
|
||||
'YesOrNo',
|
||||
'UrlToString'
|
||||
],
|
||||
directives: [
|
||||
'DataTablesDirective',
|
||||
@ -174,7 +177,8 @@ define(['underscore', 'mifosX'], function() {
|
||||
'SummaryDirective',
|
||||
'FormValidateDirective',
|
||||
'FormSubmitValidateDirective',
|
||||
'ApiValidationDirective'
|
||||
'ApiValidationDirective',
|
||||
'ActivitiesDisplayPanelDirective'
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
angular.module('configurations', [])
|
||||
.constant('API_URL_OVERRIDE', 'false')
|
||||
.constant('API_URL_OVERRIDE', 'true')
|
||||
.constant('TENANT','default')
|
||||
.constant('HOST','https://demo.openmf.org')
|
||||
.constant('HOST','https://localhost:8443\:8443')
|
||||
.constant('API_VERSION','/mifosng-provider/api/v1')
|
||||
.constant('CONTENT_TYPE','application/json; charset=utf-8');
|
||||
.constant('CONTENT_TYPE','application/json; charset=utf-8');
|
||||
|
||||
270
app/scripts/modules/localstorage.js
Normal file
270
app/scripts/modules/localstorage.js
Normal file
@ -0,0 +1,270 @@
|
||||
(function() {
|
||||
/* Start angularLocalStorage */
|
||||
|
||||
var angularLocalStorage = angular.module('LocalStorageModule', []);
|
||||
|
||||
// You should set a prefix to avoid overwriting any local storage variables from the rest of your app
|
||||
// e.g. angularLocalStorage.constant('prefix', 'youAppName');
|
||||
angularLocalStorage.value('prefix', 'ls');
|
||||
// Cookie options (usually in case of fallback)
|
||||
// expiry = Number of days before cookies expire // 0 = Does not expire
|
||||
// path = The web path the cookie represents
|
||||
angularLocalStorage.constant('cookie', { expiry:30, path: '/'});
|
||||
angularLocalStorage.constant('notify', { setItem: true, removeItem: false} );
|
||||
|
||||
angularLocalStorage.service('localStorageService', [
|
||||
'$rootScope',
|
||||
'prefix',
|
||||
'cookie',
|
||||
'notify',
|
||||
function($rootScope, prefix, cookie, notify) {
|
||||
|
||||
// If there is a prefix set in the config lets use that with an appended period for readability
|
||||
//var prefix = angularLocalStorage.constant;
|
||||
if (prefix.substr(-1)!=='.') {
|
||||
prefix = !!prefix ? prefix + '.' : '';
|
||||
}
|
||||
|
||||
// Checks the browser to see if local storage is supported
|
||||
var browserSupportsLocalStorage = function () {
|
||||
try {
|
||||
return ('localStorage' in window && window['localStorage'] !== null);
|
||||
} catch (e) {
|
||||
$rootScope.$broadcast('LocalStorageModule.notification.error',e.message);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// Directly adds a value to local storage
|
||||
// If local storage is not available in the browser use cookies
|
||||
// Example use: localStorageService.add('library','angular');
|
||||
var addToLocalStorage = function (key, value) {
|
||||
|
||||
// If this browser does not support local storage use cookies
|
||||
if (!browserSupportsLocalStorage()) {
|
||||
$rootScope.$broadcast('LocalStorageModule.notification.warning','LOCAL_STORAGE_NOT_SUPPORTED');
|
||||
if (notify.setItem) {
|
||||
$rootScope.$broadcast('LocalStorageModule.notification.setitem', {key: key, newvalue: value, storageType: 'cookie'});
|
||||
}
|
||||
return addToCookies(key, value);
|
||||
}
|
||||
|
||||
// Let's convert undefined values to null to get the value consistent
|
||||
if (typeof value == "undefined") {
|
||||
value = null;
|
||||
}
|
||||
|
||||
try {
|
||||
if (angular.isObject(value) || angular.isArray(value)) {
|
||||
value = angular.toJson(value);
|
||||
}
|
||||
localStorage.setItem(prefix+key, value);
|
||||
if (notify.setItem) {
|
||||
$rootScope.$broadcast('LocalStorageModule.notification.setitem', {key: key, newvalue: value, storageType: 'localStorage'});
|
||||
}
|
||||
} catch (e) {
|
||||
$rootScope.$broadcast('LocalStorageModule.notification.error',e.message);
|
||||
return addToCookies(key, value);
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
// Directly get a value from local storage
|
||||
// Example use: localStorageService.get('library'); // returns 'angular'
|
||||
var getFromLocalStorage = function (key) {
|
||||
if (!browserSupportsLocalStorage()) {
|
||||
$rootScope.$broadcast('LocalStorageModule.notification.warning','LOCAL_STORAGE_NOT_SUPPORTED');
|
||||
return getFromCookies(key);
|
||||
}
|
||||
|
||||
var item = localStorage.getItem(prefix+key);
|
||||
// angular.toJson will convert null to 'null', so a proper conversion is needed
|
||||
// FIXME not a perfect solution, since a valid 'null' string can't be stored
|
||||
if (!item || item === 'null') return null;
|
||||
|
||||
if (item.charAt(0) === "{" || item.charAt(0) === "[") {
|
||||
return angular.fromJson(item);
|
||||
}
|
||||
return item;
|
||||
};
|
||||
|
||||
// Remove an item from local storage
|
||||
// Example use: localStorageService.remove('library'); // removes the key/value pair of library='angular'
|
||||
var removeFromLocalStorage = function (key) {
|
||||
if (!browserSupportsLocalStorage()) {
|
||||
$rootScope.$broadcast('LocalStorageModule.notification.warning','LOCAL_STORAGE_NOT_SUPPORTED');
|
||||
if (notify.removeItem) {
|
||||
$rootScope.$broadcast('LocalStorageModule.notification.removeitem', {key: key, storageType: 'cookie'});
|
||||
}
|
||||
return removeFromCookies(key);
|
||||
}
|
||||
|
||||
try {
|
||||
localStorage.removeItem(prefix+key);
|
||||
if (notify.removeItem) {
|
||||
$rootScope.$broadcast('LocalStorageModule.notification.removeitem', {key: key, storageType: 'localStorage'});
|
||||
}
|
||||
} catch (e) {
|
||||
$rootScope.$broadcast('LocalStorageModule.notification.error',e.message);
|
||||
return removeFromCookies(key);
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
// Return array of keys for local storage
|
||||
// Example use: var keys = localStorageService.keys()
|
||||
var getKeysForLocalStorage = function () {
|
||||
|
||||
if (!browserSupportsLocalStorage()) {
|
||||
$rootScope.$broadcast('LocalStorageModule.notification.warning','LOCAL_STORAGE_NOT_SUPPORTED');
|
||||
return false;
|
||||
}
|
||||
|
||||
var prefixLength = prefix.length;
|
||||
var keys = [];
|
||||
for (var key in localStorage) {
|
||||
// Only return keys that are for this app
|
||||
if (key.substr(0,prefixLength) === prefix) {
|
||||
try {
|
||||
keys.push(key.substr(prefixLength));
|
||||
} catch (e) {
|
||||
$rootScope.$broadcast('LocalStorageModule.notification.error',e.Description);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
}
|
||||
return keys;
|
||||
};
|
||||
|
||||
// Remove all data for this app from local storage
|
||||
// Example use: localStorageService.clearAll();
|
||||
// Should be used mostly for development purposes
|
||||
var clearAllFromLocalStorage = function () {
|
||||
|
||||
if (!browserSupportsLocalStorage()) {
|
||||
$rootScope.$broadcast('LocalStorageModule.notification.warning','LOCAL_STORAGE_NOT_SUPPORTED');
|
||||
return clearAllFromCookies();
|
||||
}
|
||||
|
||||
var prefixLength = prefix.length;
|
||||
|
||||
for (var key in localStorage) {
|
||||
// Only remove items that are for this app
|
||||
if (key.substr(0,prefixLength) === prefix) {
|
||||
try {
|
||||
removeFromLocalStorage(key.substr(prefixLength));
|
||||
} catch (e) {
|
||||
$rootScope.$broadcast('LocalStorageModule.notification.error',e.message);
|
||||
return clearAllFromCookies();
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
// Checks the browser to see if cookies are supported
|
||||
var browserSupportsCookies = function() {
|
||||
try {
|
||||
return navigator.cookieEnabled ||
|
||||
("cookie" in document && (document.cookie.length > 0 ||
|
||||
(document.cookie = "test").indexOf.call(document.cookie, "test") > -1));
|
||||
} catch (e) {
|
||||
$rootScope.$broadcast('LocalStorageModule.notification.error',e.message);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// Directly adds a value to cookies
|
||||
// Typically used as a fallback is local storage is not available in the browser
|
||||
// Example use: localStorageService.cookie.add('library','angular');
|
||||
var addToCookies = function (key, value) {
|
||||
|
||||
if (typeof value == "undefined") {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!browserSupportsCookies()) {
|
||||
$rootScope.$broadcast('LocalStorageModule.notification.error','COOKIES_NOT_SUPPORTED');
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
var expiry = '', expiryDate = new Date();
|
||||
if (value === null) {
|
||||
// Mark that the cookie has expired one day ago
|
||||
expiryDate.setTime(expiryDate.getTime() + (-1 * 24*60*60*1000));
|
||||
expiry = "; expires="+expiryDate.toGMTString();
|
||||
|
||||
value = '';
|
||||
} else if (cookie.expiry !== 0) {
|
||||
expiryDate.setTime(expiryDate.getTime() + (cookie.expiry*24*60*60*1000));
|
||||
expiry = "; expires="+expiryDate.toGMTString();
|
||||
}
|
||||
if (!!key) {
|
||||
document.cookie = prefix + key + "=" + encodeURIComponent(value) + expiry + "; path="+cookie.path;
|
||||
}
|
||||
} catch (e) {
|
||||
$rootScope.$broadcast('LocalStorageModule.notification.error',e.message);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
// Directly get a value from a cookie
|
||||
// Example use: localStorageService.cookie.get('library'); // returns 'angular'
|
||||
var getFromCookies = function (key) {
|
||||
if (!browserSupportsCookies()) {
|
||||
$rootScope.$broadcast('LocalStorageModule.notification.error','COOKIES_NOT_SUPPORTED');
|
||||
return false;
|
||||
}
|
||||
|
||||
var cookies = document.cookie.split(';');
|
||||
for(var i=0;i < cookies.length;i++) {
|
||||
var thisCookie = cookies[i];
|
||||
while (thisCookie.charAt(0)==' ') {
|
||||
thisCookie = thisCookie.substring(1,thisCookie.length);
|
||||
}
|
||||
if (thisCookie.indexOf(prefix+key+'=') === 0) {
|
||||
return decodeURIComponent(thisCookie.substring(prefix.length+key.length+1,thisCookie.length));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
var removeFromCookies = function (key) {
|
||||
addToCookies(key,null);
|
||||
};
|
||||
|
||||
var clearAllFromCookies = function () {
|
||||
var thisCookie = null, thisKey = null;
|
||||
var prefixLength = prefix.length;
|
||||
var cookies = document.cookie.split(';');
|
||||
for(var i=0;i < cookies.length;i++) {
|
||||
thisCookie = cookies[i];
|
||||
while (thisCookie.charAt(0)==' ') {
|
||||
thisCookie = thisCookie.substring(1,thisCookie.length);
|
||||
}
|
||||
key = thisCookie.substring(prefixLength,thisCookie.indexOf('='));
|
||||
removeFromCookies(key);
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
isSupported: browserSupportsLocalStorage,
|
||||
set: addToLocalStorage,
|
||||
add: addToLocalStorage, //DEPRECATED
|
||||
get: getFromLocalStorage,
|
||||
keys: getKeysForLocalStorage,
|
||||
remove: removeFromLocalStorage,
|
||||
clearAll: clearAllFromLocalStorage,
|
||||
cookie: {
|
||||
set: addToCookies,
|
||||
add: addToCookies, //DEPRECATED
|
||||
get: getFromCookies,
|
||||
remove: removeFromCookies,
|
||||
clearAll: clearAllFromCookies
|
||||
}
|
||||
};
|
||||
|
||||
}]);
|
||||
}).call(this);
|
||||
@ -344,6 +344,9 @@
|
||||
.when('/attachmeeting/:id/:entityType', {
|
||||
templateUrl: 'views/groups/attachmeeting.html'
|
||||
})
|
||||
.when('/editcalendar/:entityType/:groupOrCenterId/:calendarId', {
|
||||
templateUrl: 'views/groups/editmeeting.html'
|
||||
})
|
||||
.when('/editsavingaccount/:id', {
|
||||
templateUrl: 'views/savings/edit_saving_account_application.html'
|
||||
})
|
||||
@ -457,6 +460,9 @@
|
||||
})
|
||||
.when('/editguarantor/:id/:loanId',{
|
||||
templateUrl: 'views/loans/editguarantor.html'
|
||||
})
|
||||
.when('/expertsearch',{
|
||||
templateUrl: 'views/expertsearch.html'
|
||||
});
|
||||
$locationProvider.html5Mode(false);
|
||||
};
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
}),
|
||||
attachMeetingResource:defineResource(apiVer + "/:groupOrCenter/:groupOrCenterId/calendars/:templateSource", {groupOrCenter:'@groupOrCenter', groupOrCenterId:'@groupOrCenterId',
|
||||
templateSource:'@templateSource'}, {
|
||||
update: {method: 'PUT'}
|
||||
}),
|
||||
runReportsResource: defineResource(apiVer + "/runreports/:reportSource", {reportSource : '@reportSource'}, {
|
||||
get: {method: 'GET', params: {}, isArray:true},
|
||||
|
||||
@ -831,7 +831,6 @@ nav:hover:after{
|
||||
width:100px;
|
||||
overflow:hidden;
|
||||
z-index: -1;
|
||||
background-color: transparent;
|
||||
border-top-left-radius: 8px;
|
||||
border-top-right-radius: 8px;
|
||||
border-bottom-left-radius: 8px;
|
||||
@ -879,5 +878,39 @@ nav:hover:after{
|
||||
margin-left: -25px !important;
|
||||
}
|
||||
|
||||
.display-header-text {
|
||||
font-weight:bold;
|
||||
color:#000000;
|
||||
font-size: 13px !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.fa-middled{
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.display-panel {
|
||||
border: 1px solid #DDDDDD;
|
||||
padding:15px;
|
||||
margin-left: 70px;
|
||||
height:100px;
|
||||
width:100px;
|
||||
overflow:hidden;
|
||||
background-color: #F5F5F5;
|
||||
background-image: linear-gradient(to bottom, #FFFFFF, #E6E6E6);
|
||||
background-repeat: repeat-x;
|
||||
z-index: -1;
|
||||
border-top-left-radius: 8px;
|
||||
border-top-right-radius: 8px;
|
||||
border-bottom-left-radius: 8px;
|
||||
border-bottom-right-radius: 8px;
|
||||
}
|
||||
|
||||
.display-panel:hover{
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient(to bottom, transparent, transparent);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -77,7 +77,9 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'label.nextmeetingon' | translate }}</td>
|
||||
<td>{{center.collectionMeetingCalendar.nextTenRecurringDates[0] | DateFormat}}</td>
|
||||
<td>{{center.collectionMeetingCalendar.nextTenRecurringDates[0] | DateFormat}}
|
||||
<a href="#/editcalendar/centers/{{center.id}}/{{center.collectionMeetingCalendar.id}}" ng-show="center.collectionMeetingCalendar"><i class="icon-edit icon-white"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'label.meetingfrequency' | translate }}</td>
|
||||
|
||||
@ -1,20 +1,23 @@
|
||||
<form class="form-horizontal well" ng-controller="EnterCollectionSheetController">
|
||||
<form name="collectionsheetform" novalidate class="form-horizontal well" ng-controller="EnterCollectionSheetController" rc-submit="">
|
||||
<api-validate></api-validate>
|
||||
<fieldset>
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ 'label.branchoffice' | translate }}</label>
|
||||
<label class="control-label">{{ 'label.branchoffice' | translate }}<span class="required">*</span></label>
|
||||
<div class="controls">
|
||||
<select id="officeId" ng-model="officeId" ng-options="office.id as office.name for office in offices" value="{{office.id}}" ng-change="officeSelected(officeId)">
|
||||
<select id="officeId" ng-model="officeId" name="office" ng-options="office.id as office.name for office in offices" value="{{office.id}}" ng-change="officeSelected(officeId)" required>
|
||||
<option value="">{{'label.select.office' | translate}}</option>
|
||||
</select>
|
||||
<form-validate valattributeform="collectionsheetform" valattribute="office"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ 'label.center' | translate }}</label>
|
||||
<label class="control-label">{{ 'label.center' | translate }}<span class="required">*</span></label>
|
||||
<div class="controls">
|
||||
<select id="centerId" ng-model="centerId" ng-options="center.id as center.name for center in centers" value="{{center.id}}" ng-change="centerSelected(centerId)">
|
||||
<select id="centerId" name="center" ng-model="centerId" ng-options="center.id as center.name for center in centers" value="{{center.id}}" ng-change="centerSelected(centerId)" required>
|
||||
<option value="">{{'label.select.center' | translate}}</option>
|
||||
</select>
|
||||
<form-validate valattributeform="collectionsheetform" valattribute="center"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -28,19 +31,14 @@
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ 'label.meetingcalendar' | translate }}</label>
|
||||
<label class="control-label">{{ 'label.meetingcalendar' | translate }}<span class="required">*</span></label>
|
||||
<div class="controls">
|
||||
<input id="transactionDate" type="text" ng-model="formData.transactionDate">
|
||||
<input type="text" id="transactionDate" name="transactiondate" datepicker-pop="dd MMMM yyyy" ng-model="date.transactionDate" is-open="opened"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span>
|
||||
<a class="ng-binding" ng-click="previewCollectionSheet()" ng-hide="previewRepayment">
|
||||
{{'label.collectionsheet' | translate}}
|
||||
<i class="icon-circle-arrow-right"></i>
|
||||
</a>
|
||||
</span>
|
||||
<button class="btn btn-primary" ng-click="previewCollectionSheet()">{{'label.collectionsheet' | translate}}
|
||||
<i class="icon-circle-arrow-right"></i></button>
|
||||
</div>
|
||||
<div></div>
|
||||
<div style="float:left; max-width:850px; min-width:50px; overflow-x:auto!important; white-space:nowrap;">
|
||||
@ -136,7 +134,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div class="span12 paddedtop10">
|
||||
<div class="offset6 paddedtop">
|
||||
<div class="offset3 paddedtop">
|
||||
<button type="reset" class="btn" ng-click="cancel()">{{'button.cancel' | translate}}</button>
|
||||
<button type="submit" class="btn btn-primary" ng-show="collectionsheetdata" ng-click="submit()">{{'button.save' | translate}}</button>
|
||||
</div>
|
||||
|
||||
46
app/views/expertsearch.html
Normal file
46
app/views/expertsearch.html
Normal file
@ -0,0 +1,46 @@
|
||||
<div id="expertsearch" data-ng-controller="ExpertSearchController">
|
||||
<h3 class="paddedleft"><strong>{{'label.mifosxdashhome' | translate}}</strong></h3>
|
||||
<input id="expert" type="text" data-ng-model="formData.search" placeholder="{{'label.searchactivities' | translate}}" class="span" typeahead-on-select="search()" ng-autofocus="true" typeahead="param as param for param in searchParams | filter:$viewValue | limitTo:8"/>
|
||||
<hr/>
|
||||
<br/>
|
||||
<div class="form-horizontal">
|
||||
<div class="control-group">
|
||||
<div class="paddedleft">
|
||||
<i class="icon-bolt icon-2x"></i><strong>{{'label.recentactivities' | translate}}</strong>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="row span">
|
||||
<div class="paddedleft120">
|
||||
<span data-ng-repeat="recent in recents">
|
||||
<span class="span3">
|
||||
<a href="#{{recent}}" title="{{recent}}">
|
||||
<ng-displaypanel title="{{recent | UrlToString | translate}}">
|
||||
<span class="center"><span class="fa-middled"><i class="icon-4x icon-tasks" style="color:#808080"></i></span></span>
|
||||
</ng-displaypanel>
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="paddedleft">
|
||||
<br/><br/><i class="icon-laptop icon-2x"></i><strong>{{'label.frequentactivities' | translate}}</strong>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="row span">
|
||||
<div class="paddedleft120">
|
||||
<span data-ng-repeat="freq in frequent">
|
||||
<span class="span3">
|
||||
<a href="#{{freq}}" title="{{freq}}">
|
||||
<ng-displaypanel title="{{freq | UrlToString | translate}}">
|
||||
<span class="center"><span class="fa-middled"><i class="icon-4x icon-tasks" style="color:#808080"></i></span></span>
|
||||
</ng-displaypanel>
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,6 +1,13 @@
|
||||
<div ng-controller="AttachMeetingController">
|
||||
<ul class="breadcrumb">
|
||||
<ul class="breadcrumb" ng-show="entityType=='groups'">
|
||||
<li><a href="#/groups">{{'link.clients.groups' | translate}}</a> <span class="divider">/</span></li>
|
||||
<li><a href="#/viewgroup/{{groupOrCenterId}}">{{'link.view.group' | translate}}</a> <span class="divider">/</span></li>
|
||||
<li class="active">{{'link.attachmeeting' | translate }}</li>
|
||||
</ul>
|
||||
<ul class="breadcrumb" ng-show="entityType=='centers'">
|
||||
<li><a href="#/centers">{{'link.clients.centers' | translate}}</a> <span class="divider">/</span></li>
|
||||
<li><a href="#/viewcenter/{{groupOrCenterId}}">{{'link.view.center' | translate}}</a> <span class="divider">/</span></li>
|
||||
<li class="active">{{'link.attachmeeting' | translate }}</li>
|
||||
</ul>
|
||||
<api-validate></api-validate>
|
||||
<form ng-submit="submit()">
|
||||
@ -33,11 +40,11 @@
|
||||
<td width="30%"></td>
|
||||
<td>
|
||||
<label class="control-label">{{'label.repeats' | translate}}</label>
|
||||
<select class="input-small" ng-model="formData.repeats" ng-options="repeatsOption for repeatsOption in repeatsOptions" ng-change="selectedPeriod(formData.repeats)">{{repeatsOption}}</select>
|
||||
<select class="input-small" ng-model="formData.frequency" ng-options="repeatsOption.id as repeatsOption.value for repeatsOption in repeatsOptions" ng-change="selectedPeriod(formData.frequency)" value="{{repeatsOption.id}}"></select>
|
||||
</td>
|
||||
<td>
|
||||
<label class="control-label">{{'label.repeatsevery' | translate}}</label>
|
||||
<select class="input-small" ng-model="formData.repeatsEvery" ng-options="repeatsEveryOption for repeatsEveryOption in repeatsEveryOptions">{{repeatsEveryOption}}
|
||||
<select class="input-small" ng-model="formData.interval" ng-options="repeatsEveryOption for repeatsEveryOption in repeatsEveryOptions">{{repeatsEveryOption}}
|
||||
</select>{{periodValue}}
|
||||
</td>
|
||||
</tr>
|
||||
@ -46,7 +53,7 @@
|
||||
<tr class="span2"></tr>
|
||||
<tr ng-show="formData.repeating">
|
||||
<td width="30%"></td>
|
||||
<td ng-show="formData.repeats=='weekly'" ng-repeat="repeatsOnOption in repeatsOnOptions">
|
||||
<td ng-show="formData.frequency=='2'" ng-repeat="repeatsOnOption in repeatsOnOptions">
|
||||
<input type="radio" ng-model="formData.repeatsOnDay" value="{{repeatsOnOption.value}}"> {{repeatsOnOption.name}} <br/>
|
||||
<td>
|
||||
</tr>
|
||||
|
||||
66
app/views/groups/editmeeting.html
Normal file
66
app/views/groups/editmeeting.html
Normal file
@ -0,0 +1,66 @@
|
||||
<div ng-controller="EditMeetingController">
|
||||
<ul class="breadcrumb" ng-show="entityType=='groups'">
|
||||
<li><a href="#/groups">{{'link.clients.groups' | translate}}</a> <span class="divider">/</span></li>
|
||||
<li><a href="#/viewgroup/{{groupOrCenterId}}">{{'link.view.group' | translate}}</a> <span class="divider">/</span></li>
|
||||
<li class="active">{{'link.editmeeting' | translate }}</li>
|
||||
</ul>
|
||||
<ul class="breadcrumb" ng-show="entityType=='centers'">
|
||||
<li><a href="#/centers">{{'link.clients.centers' | translate}}</a> <span class="divider">/</span></li>
|
||||
<li><a href="#/viewcenter/{{groupOrCenterId}}">{{'link.view.center' | translate}}</a> <span class="divider">/</span></li>
|
||||
<li class="active">{{'link.editmeeting' | translate }}</li>
|
||||
</ul>
|
||||
<api-validate></api-validate>
|
||||
<form ng-submit="submit()">
|
||||
<div class="control-group">
|
||||
<table width="80%" class="form-horizontal">
|
||||
<tr>
|
||||
<td width="20%">
|
||||
<label class="control-label">{{'label.meetingdate.start' | translate}}<span class="required">*</span></label>
|
||||
</td>
|
||||
<td width="20%">
|
||||
<input class="date-disable" readonly id="startDate" type="text" datepicker-pop="dd MMMM yyyy" ng-model="first.date" is-open="opened" min="'2000-01-01'" max="restrictDate"/>
|
||||
</td>
|
||||
<td width="20%"></td>
|
||||
<td width="20%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">{{'label.repeat' | translate}}</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" ng-model="formData.repeating">
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<span ng-show="formData.repeating"><label class="control-label offset2"><h3>{{'label.repeatdetails' | translate}}</h3></label></span>
|
||||
<table width="40%" ng-show="formData.repeating">
|
||||
<tr>
|
||||
<td width="30%"></td>
|
||||
<td>
|
||||
<label class="control-label">{{'label.repeats' | translate}}</label>
|
||||
<select class="input-small" ng-model="formData.frequency" ng-options="repeatsOption.id as repeatsOption.value for repeatsOption in repeatsOptions" ng-change="selectedPeriod(formData.frequency)" value="{{repeatsOption.id}}" ng-disabled=true></select>
|
||||
</td>
|
||||
<td>
|
||||
<label class="control-label">{{'label.repeatsevery' | translate}}</label>
|
||||
<select class="input-small" ng-model="formData.interval" ng-options="repeatsEveryOption for repeatsEveryOption in repeatsEveryOptions" ng-disabled=true value="{{repeatsEveryOption}}"></select>{{periodValue}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="40%">
|
||||
<tr ng-show="formData.repeating">
|
||||
<td width="30%"></td>
|
||||
<td ng-show="formData.frequency==2" ng-repeat="repeatsOnOption in repeatsOnOptions">
|
||||
<input type="radio" ng-model="formData.repeatsOnDay" value="{{repeatsOnOption.value}}"> {{repeatsOnOption.name}} <br/>
|
||||
<td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="offset2">
|
||||
<a ng-show="entityType=='groups'" class="btn" href="#/viewgroup/{{groupOrCenterId}}">Cancel</a>
|
||||
<a ng-hide="entityType=='groups'" class="btn" href="#/viewcenter/{{groupOrCenterId}}">Cancel</a>
|
||||
<button type="submit" class="btn btn-primary">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@ -79,7 +79,9 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'label.nextmeetingon' | translate }}</td>
|
||||
<td>{{group.collectionMeetingCalendar.nextTenRecurringDates[0] | DateFormat}}</td>
|
||||
<td>{{group.collectionMeetingCalendar.nextTenRecurringDates[0] | DateFormat}}
|
||||
<a href="#/editcalendar/groups/{{group.id}}/{{group.collectionMeetingCalendar.id}}" ng-show="group.collectionMeetingCalendar"><i class="icon-edit icon-white"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'label.meetingfrequency' | translate }}</td>
|
||||
|
||||
@ -1,23 +1,27 @@
|
||||
<form class="form-horizontal well" ng-controller="EditGuarantorController">
|
||||
<form class="form-horizontal well" name="editguaratorform" novalidate="" ng-controller="EditGuarantorController" rc-submit="submit()">
|
||||
<api-validate></api-validate>
|
||||
<fieldset>
|
||||
<legend class="bolder">{{'label.guarantor' | translate}}</legend>
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ 'label.relationship' | translate }}</label>
|
||||
<div class="controls">
|
||||
<select id="relationshipType" ng-model="formData.relationshipType" ng-options="type.id as type.name for type in template.allowedClientRelationshipTypes" value="{{type.id}}"></select>
|
||||
<select id="relationshipType" ng-model="formData.relationshipType" ng-options="type.id as type.name for type in template.allowedClientRelationshipTypes" value="{{type.id}}">
|
||||
<option value="">{{'label.select.one' | translate}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="firstname">{{ 'label.form.firstname' | translate }}</label>
|
||||
<label class="control-label" for="firstname">{{ 'label.form.firstname' | translate }}<span class="required">*</span></label>
|
||||
<div class="controls">
|
||||
<input type="text" id="firstname" ng-model="formData.firstname">
|
||||
<input type="text" id="firstname" name="firstname" ng-model="formData.firstname" required late-Validate/>
|
||||
<form-validate valattributeform="editguaratorform" valattribute="firstname"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ 'label.form.lastname' | translate }}</label>
|
||||
<label class="control-label">{{ 'label.form.lastname' | translate }}<span class="required">*</span></label>
|
||||
<div class="controls">
|
||||
<input id="lastname" type="text" ng-model="formData.lastname">
|
||||
<input id="lastname" name="lastname" type="text" ng-model="formData.lastname" required late-Validate/>
|
||||
<form-validate valattributeform="editguaratorform" valattribute="lastname"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
@ -59,7 +63,7 @@
|
||||
</div>
|
||||
<div class="offset2 paddedleft120">
|
||||
<a href="#/viewloanaccount/{{template.loanId}}" class="btn">{{ 'label.cancel' | translate }}</a>
|
||||
<button type="button" class="btn btn-primary" data-ng-click="submit()">{{ 'label.save' | translate }}</button>
|
||||
<button type="submit" class="btn btn-primary">{{ 'label.save' | translate }}</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
@ -36,15 +36,17 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="firstname">{{ 'label.form.firstname' | translate }}</label>
|
||||
<label class="control-label" for="firstname">{{ 'label.form.firstname' | translate }}<span class="required">*</span></label>
|
||||
<div class="controls">
|
||||
<input type="text" id="firstname" ng-model="formData.firstname">
|
||||
<input type="text" id="firstname" name="firstname" ng-model="formData.firstname" ng-required="!temp" late-Validate/>
|
||||
<form-validate valattributeform="guaratorform" valattribute="firstname"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ 'label.form.lastname' | translate }}</label>
|
||||
<label class="control-label">{{ 'label.form.lastname' | translate }}<span class="required">*</span></label>
|
||||
<div class="controls">
|
||||
<input id="lastname" type="text" ng-model="formData.lastname">
|
||||
<input id="lastname" type="text" name="lastname" ng-model="formData.lastname" ng-required="!temp" late-Validate/>
|
||||
<form-validate valattributeform="guaratorform" valattribute="lastname"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
<div ng-show="isTransaction">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="paymentTypeId">{{ 'label.loan.account.paymentTypeId' | translate}}</label>
|
||||
<label class="control-label" for="paymentTypeId">{{ 'label.loan.account.paymentTypeId' | translate}}<span class="required">*</span></label>
|
||||
<div class="controls">
|
||||
<select id="paymentTypeId" ng-model="formData.paymentTypeId" ng-options="paymentType.id as paymentType.name for paymentType in paymentTypes" value="{{paymentType.id}}"></select>
|
||||
</div>
|
||||
|
||||
@ -55,6 +55,7 @@
|
||||
<td>{{loandetails.summary.totalOverdue}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row paddedleft">
|
||||
<hr class="marginbottom"/>
|
||||
<tabset >
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div collapse="isCollapsed">
|
||||
<div ng-show="data">
|
||||
<table width="80%">
|
||||
<tr class="control-group">
|
||||
<td width="50%">
|
||||
@ -131,6 +131,12 @@
|
||||
<option style="display:none" value="">{{'label.select.charge' | translate}}</option>
|
||||
</select>
|
||||
<a ng-click="addCharge(chargeId)"><i class="icon-plus icon-white"></i></a>
|
||||
<span ng-show="errorchargeevent">
|
||||
<small class="error">
|
||||
{{'label.'+labelchargeerror | translate}}
|
||||
</small>
|
||||
</span>
|
||||
</form>
|
||||
</form>
|
||||
<table class="table" width="100%" ng-show="charges.length>0">
|
||||
<tr class="graybg">
|
||||
@ -146,8 +152,20 @@
|
||||
<td>{{charge.chargeCalculationType.value}}</td>
|
||||
<td><input id="charges[{{$index}}].amount" class="input-small" type="text" ng-model="charge.amount" placeholder="{{'label.placeholder.amount' | translate}}"></td>
|
||||
<td>{{charge.chargeTimeType.value}}</td>
|
||||
<td ng-show="charge.chargeTimeType.value=='Annual Fee'"><input class="input-small" id="charges[{{$index}}].feeOnMonthDay" type="text" ng-model="charge.feeOnMonthDay" ></td>{{charge.feeOnMonthDay}}
|
||||
<td ng-hide="charge.chargeTimeType.value=='Annual Fee'"></td>
|
||||
<td ng-show="charge.chargeTimeType.value=='Annual Fee'">
|
||||
<input id="charges[{{$index}}].feeOnMonthDay" readonly class="date-disable" type="text" datepicker-pop="dd MMMM" ng-model="charge.feeOnMonthDay" is-open="opened"/>
|
||||
</td>{{charge.feeOnMonthDay}}
|
||||
<td ng-show="charge.chargeTimeType.value=='Specified due date'">
|
||||
<input id="charges[{{$index}}].dueDate" readonly class="date-disable" type="text" datepicker-pop="dd MMMM yyyy" ng-model="charge.dueDate" is-open="opened"/>
|
||||
</td>
|
||||
<td ng-show="charge.chargeTimeType.value=='Monthly Fee'">
|
||||
<input readonly class="date-disable" type="text" datepicker-pop="dd MMMM" ng-model="charge.feeOnMonthDay" is-open="opened"/>
|
||||
</td>
|
||||
<td ng-show="charge.chargeTimeType.value=='Monthly Fee'">
|
||||
<input id="charges[{{$index}}].amount" class="input-small" type="text" ng-model="charge.feeInterval"/>
|
||||
</td>
|
||||
<td ng-hide="charge.chargeTimeType.value=='Monthly Fee'"></td>
|
||||
<td ng-hide="charge.chargeTimeType.value=='Annual Fee' || charge.chargeTimeType.value=='Specified due date' || charge.chargeTimeType.value=='Monthly Fee'"></td>
|
||||
<td><a ng-click="deleteCharge($index)"><i class="icon-remove icon-white"></i></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -157,7 +175,7 @@
|
||||
</div>
|
||||
<div class="offset4">
|
||||
<button ng-click="cancel()" class="btn">{{ 'label.cancel' | translate }}</button>
|
||||
<button type="submit" class="btn btn-primary" ng-show="!isCollapsed">{{ 'label.save' | translate }}</button>
|
||||
<button type="submit" class="btn btn-primary" ng-show="data">{{ 'label.save' | translate }}</button>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div collapse="isCollapsed">
|
||||
<div ng-show="data">
|
||||
<table width="80%">
|
||||
<tr class="control-group">
|
||||
<td width="50%">
|
||||
@ -135,6 +135,11 @@
|
||||
<option value="">{{'label.select.charge' | translate}}</option>
|
||||
</select>
|
||||
<a ng-click="addCharge(chargeId)"><i class="icon-plus icon-white"></i></a>
|
||||
<span ng-show="errorchargeevent">
|
||||
<small class="error">
|
||||
{{'label.'+labelchargeerror | translate}}
|
||||
</small>
|
||||
</span>
|
||||
</form>
|
||||
<table class="table" width="100%" ng-show="charges.length>0">
|
||||
<tr class="graybg">
|
||||
@ -143,15 +148,28 @@
|
||||
<th>{{'table.heading.amount' | translate}}</th>
|
||||
<th>{{'table.heading.collectedon' | translate}}</th>
|
||||
<th>{{'table.heading.date' | translate}}</th>
|
||||
<th>{{'table.heading.repaymentsevery' | translate}}</th>
|
||||
<th>{{'table.heading.actions' | translate}}</th>
|
||||
</tr>
|
||||
<tr ng-repeat="charge in charges" >
|
||||
<td>{{charge.name}},{{charge.currency.displaySymbol}}</td>
|
||||
<td>{{charge.chargeCalculationType.value}}</td>
|
||||
<td><input id="charges[{{$index}}].amount" class="input-small" type="text" ng-model="charge.amount" placeholder="{{'label.placeholder.amount' | translate}}"></td>
|
||||
<td><input id="charges[{{$index}}].amount" class="input-small" type="text" ng-model="charge.amount" placeholder="{{'label.placeholder.amount' | translate}}"/></td>
|
||||
<td>{{charge.chargeTimeType.value}}</td>
|
||||
<td ng-show="charge.chargeTimeType.value=='Annual Fee'"><input id="charges[{{$index}}].feeOnMonthDay" class="input-small" type="text" ng-model="charge.feeOnMonthDay" ></td>
|
||||
<td ng-hide="charge.chargeTimeType.value=='Annual Fee'"></td>
|
||||
<td ng-show="charge.chargeTimeType.value=='Annual Fee'">
|
||||
<input id="charges[{{$index}}].feeOnMonthDay" class="input-medium" readonly class="date-disable" type="text" datepicker-pop="dd MMMM" ng-model="charge.feeOnMonthDay" is-open="opened"/>
|
||||
</td>
|
||||
<td ng-show="charge.chargeTimeType.value=='Specified due date'">
|
||||
<input id="charges[{{$index}}].dueDate" class="input-medium" readonly class="date-disable" type="text" datepicker-pop="dd MMMM yyyy" ng-model="charge.dueDate" is-open="opened"/>
|
||||
</td>
|
||||
<td ng-show="charge.chargeTimeType.value=='Monthly Fee'">
|
||||
<input readonly class="date-disable" class="input-medium" readonly class="date-disable" type="text" datepicker-pop="dd MMMM" ng-model="charge.feeOnMonthDay" is-open="opened"/>
|
||||
</td>
|
||||
<td ng-show="charge.chargeTimeType.value=='Monthly Fee'">
|
||||
<input id="charges[{{$index}}].amount" class="input-small" type="text" ng-model="charge.feeInterval"/>
|
||||
</td>
|
||||
<td ng-hide="charge.chargeTimeType.value=='Monthly Fee'"></td>
|
||||
<td ng-hide="charge.chargeTimeType.value=='Annual Fee' || charge.chargeTimeType.value=='Specified due date' || charge.chargeTimeType.value=='Monthly Fee'"></td>
|
||||
<td><a ng-click="deleteCharge($index)"><i class="icon-remove icon-white"></i></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -161,7 +179,7 @@
|
||||
</div>
|
||||
<div class="offset8">
|
||||
<button type="reset" class="btn">{{ 'label.cancel' | translate }}</button>
|
||||
<button type="submit" class="btn btn-primary" ng-show="!isCollapsed">{{ 'label.save' | translate }}</button>
|
||||
<button type="submit" class="btn btn-primary" ng-show="data">{{ 'label.save' | translate }}</button>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
@ -78,8 +78,8 @@
|
||||
<div class="control-group" ng-show="showAnnualAmountField">
|
||||
<label class="control-label">{{ 'label.amount' | translate}}<span class="required">*</span></label>
|
||||
<div class="controls">
|
||||
<input id="amount" type="text" name="amount" ng-model="formData.amount" required late-Validate/>
|
||||
<span ng-show="savingccountactionform.amount.$invalid">
|
||||
<input id="amoun" type="text" name="amount" ng-model="formData.amount" required late-Validate/>
|
||||
<span ng-show="savingccountactionform.amoun.$invalid">
|
||||
<small class="error">
|
||||
Required Field
|
||||
</small>
|
||||
|
||||
@ -14,8 +14,8 @@
|
||||
</span>
|
||||
<span ng-show="buttons.options" class="btn-group">
|
||||
<a class="btn btn-primary dropdown-toggle">
|
||||
{{'button.more' | translate}}
|
||||
<span class="caret"></span>
|
||||
{{'button.more' | translate}}
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown dropdown-menu">
|
||||
<li class="{{button.icon}}" ng-repeat="button in buttons.options">
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid" data-ng-controller="CodeController">
|
||||
<table class="table">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr class="graybg">
|
||||
<th>{{ 'label.codename' | translate }}</th>
|
||||
@ -16,9 +16,9 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr data-ng-repeat="code in codes">
|
||||
<td><a href="#/viewcode/{{code.id}}">{{code.name}}</a></td>
|
||||
<td>{{code.systemDefined}}</td>
|
||||
<tr class="pointer-main" data-ng-repeat="code in codes">
|
||||
<td class="pointer" data-ng-click="routeTo(code.id)">{{code.name}}</td>
|
||||
<td class="pointer" data-ng-click="routeTo(code.id)">{{code.systemDefined}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@ -6,11 +6,12 @@
|
||||
<li class="active">{{code.name}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<api-validate></api-validate>
|
||||
<div class="row">
|
||||
<div class="pull-right">
|
||||
<div class="btn-group">
|
||||
<a href="#/editcode/{{code.id}}" class="btn btn-primary"><i class="icon-edit icon-white"></i>{{'label.edit' | translate}}</a>
|
||||
<a data-ng-click="delCode()" class="btn btn-primary" ng-show="code.systemDefined == false"><i class="icon-trash icon-white"></i>{{'label.delete' | translate}}</a>
|
||||
<a href="#/editcode/{{code.id}}" class="btn btn-primary"><i class="icon-plus icon-white"></i>{{'label.addcodevalues' | translate}}</a>
|
||||
<a data-ng-click="delCode()" class="btn btn-warning" ng-show="code.systemDefined == false"><i class="icon-trash icon-white"></i>{{'label.delete' | translate}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -23,7 +24,16 @@
|
||||
<button class="btn btn-primary" ng-click="delete()">{{'label.confirm' | translate}}</button>
|
||||
</div>
|
||||
</script>
|
||||
<div class="row paddedleft">
|
||||
<script type="text/ng-template" id="deletecodevalue.html">
|
||||
<div class="modal-header silver">
|
||||
<h3 class="bolder">{{'label.delete' | translate}}</h3>
|
||||
</div>
|
||||
<div class="modal-body modal-middle">
|
||||
<button class="btn btn-warning" ng-click="cancel()">{{'label.cancel' | translate}}</button>
|
||||
<button class="btn btn-primary" ng-click="delete()">{{'label.confirm' | translate}}</button>
|
||||
</div>
|
||||
</script>
|
||||
<div class="form-horizontal well">
|
||||
<h3>{{code.name}}</h3>
|
||||
<div>
|
||||
<table class="table" ui:sortable>
|
||||
@ -31,12 +41,14 @@
|
||||
<tr>
|
||||
<th>{{ 'label.form.name' | translate }}</th>
|
||||
<th>{{ 'label.position' | translate }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr data-ng-repeat="codevalue in codevalues">
|
||||
<td>{{codevalue.name}}</td>
|
||||
<td>{{codevalue.position}}</td>
|
||||
<td><button class="btn-warning" type="button" data-ng-click="deleteCodeValue(codevalue.id)"><i class="icon-trash icon-white"></i></button> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "prototype-app",
|
||||
"name": "community-app",
|
||||
"version": "0.0.0",
|
||||
"ignore": [
|
||||
"lib"
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
<script type="text/javascript" src="../app/scripts/models/roleMap.js"></script>
|
||||
<script type="text/javascript" src="../app/scripts/models/LoggedInUser.js"></script>
|
||||
<script type="text/javascript" src="../app/scripts/models/Role.js"></script>
|
||||
<script type="text/javascript" src="../app/scripts/models/Langs.js"></script>
|
||||
<script type="text/javascript" src="../app/scripts/services/AuthenticationService.js"></script>
|
||||
<script type="text/javascript" src="../app/scripts/services/SessionManager.js"></script>
|
||||
<script type="text/javascript" src="../app/scripts/services/HttpServiceProvider.js"></script>
|
||||
|
||||
@ -1,42 +1,34 @@
|
||||
describe("UserController", function() {
|
||||
var resourceCallback, scopeEvalCallback;
|
||||
beforeEach(function() {
|
||||
this.scope = {
|
||||
$broadcast: jasmine.createSpy("$scope.$broadcast("),
|
||||
$evalAsync: jasmine.createSpy("$scope.$evalAsync()").andCallFake(function(callback) { callback(); })
|
||||
};
|
||||
this.resourceFactory = {userResource: {
|
||||
getAllUsers: jasmine.createSpy('userResource.getAllUsers()').andCallFake(function(params, callback) {
|
||||
resourceCallback = callback;
|
||||
})
|
||||
}};
|
||||
describe("UserController", function () {
|
||||
var resourceCallback;
|
||||
beforeEach(function () {
|
||||
this.scope = {
|
||||
$broadcast: jasmine.createSpy("$scope.$broadcast("),
|
||||
$evalAsync: jasmine.createSpy("$scope.$evalAsync()").andCallFake(function (callback) {
|
||||
callback();
|
||||
})
|
||||
};
|
||||
this.resourceFactory = {userResource: {
|
||||
getAllUsers: jasmine.createSpy('userResource.getAllUsers()').andCallFake(function (params, callback) {
|
||||
resourceCallback = callback;
|
||||
})
|
||||
}};
|
||||
|
||||
this.controller = new mifosX.controllers.UserController(this.scope, this.resourceFactory);
|
||||
});
|
||||
this.controller = new mifosX.controllers.UserController(this.scope, this.resourceFactory);
|
||||
});
|
||||
|
||||
it("should broadcast 'OpenUserFormDialog' event with the title", function() {
|
||||
this.scope.newUserFormDialog();
|
||||
it("should broadcast 'OpenUserFormDialog' event with the title", function () {
|
||||
this.scope.newUserFormDialog();
|
||||
|
||||
expect(this.scope.$broadcast).toHaveBeenCalledWith('OpenUserFormDialog', {title: 'New User'});
|
||||
});
|
||||
expect(this.scope.$broadcast).toHaveBeenCalledWith('OpenUserFormDialog', {title: 'New User'});
|
||||
});
|
||||
|
||||
it("should broadcast 'UserDataLoadingStartEvent' when loading begins", function() {
|
||||
expect(this.scope.$broadcast).toHaveBeenCalledWith('UserDataLoadingStartEvent');
|
||||
});
|
||||
|
||||
it("should call the userResource with the correct field selection", function() {
|
||||
it("should call the userResource with the correct field selection", function () {
|
||||
expect(this.resourceFactory.userResource.getAllUsers).toHaveBeenCalledWith({fields: "id,firstname,lastname,username,officeName"}, jasmine.any(Function));
|
||||
});
|
||||
|
||||
it("should populate the scope with the retrieved users", function() {
|
||||
resourceCallback(["test_user1", "test_user2"]);
|
||||
it("should populate the scope with the retrieved users", function () {
|
||||
resourceCallback(["test_user1", "test_user2"]);
|
||||
|
||||
expect(this.scope.users).toEqual(["test_user1", "test_user2"]);
|
||||
});
|
||||
|
||||
it("should broadcast 'UserDataLoadingCompleteEvent' when loading completes", function() {
|
||||
resourceCallback([]);
|
||||
|
||||
expect(this.scope.$broadcast).toHaveBeenCalledWith('UserDataLoadingCompleteEvent');
|
||||
});
|
||||
expect(this.scope.users).toEqual(["test_user1", "test_user2"]);
|
||||
});
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user