diff --git a/.github/workflows/Readme.md b/.github/workflows/Readme.md new file mode 100644 index 00000000..066f4c69 --- /dev/null +++ b/.github/workflows/Readme.md @@ -0,0 +1,15 @@ +# Purpose of Automation +In this automation workflow the whenever there is a new commit on the develop branch it is going to + - build it + - deploy to the AWS S3 which is a file storage system + - Invalidate the Cache on Cloudfront +For build we are doing it the same way it is specified in the official repository of MIFOS and once the build is done and its is uploaded to S3 we are +invalidating the current files on the AWS Cloudfront so that it can pull up the new files that are present over in the S3 this step takes some time so once commit is done +it will take around 5 mins to view the changes on the Final website that is + +
https://enterprise-ui.fiter.io
+ +If one needs to create an extra envrionment for its deployment , after creating the cloudfront and doing all the specification we will need to create a subdomain over +there and then we can map it to the origin present in the Cloudfront . +## The architechture looks like this on the AWS side +Screenshot 2022-03-09 at 11 26 01 AM diff --git a/Chart.yaml b/Chart.yaml new file mode 100644 index 00000000..1fbaa88a --- /dev/null +++ b/Chart.yaml @@ -0,0 +1,13 @@ +apiVersion: v2 +name: fineract +description: Fineract Backend Application + +type: application +version: 0.0.2 +appVersion: 1.0.1 + +dependencies: + - name: fineract + version: "0.1.3" + alias: fineract-ui + repository: "@fiter-apps" \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 8e724ad8..c5894240 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,11 +9,16 @@ RUN npm install -g bower RUN npm install -g grunt-cli COPY . /usr/src/app RUN bower --allow-root install -RUN npm install +RUN npm install --legacy-peer-deps RUN bundle install RUN grunt prod FROM nginx:1.19.3 COPY --from=builder /usr/src/app/dist/community-app /usr/share/nginx/html -EXPOSE 80 +COPY ./nginx-conf/* /etc/nginx/conf.d/ +COPY conf/default.conf.template /etc/nginx/conf.d/default.conf.template +COPY conf/nginx.conf /etc/nginx/nginx.conf +COPY conf/ca-bundle.pem /etc/ssl/keys/cert.pem +COPY conf/private-key.pem /etc/ssl/keys/key.pem +EXPOSE 80 443 CMD ["nginx", "-g", "daemon off;"] diff --git a/Gruntfile.js b/Gruntfile.js index 9d7fe8c5..c9095529 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -349,24 +349,18 @@ module.exports = function(grunt) { } }, - devcode: { - options: { - html: true, // html files parsing? - js: true, // javascript files parsing? - css: false, // css files parsing? - clean: true, // removes devcode comments even if code was not removed - block: { - open: 'devcode', // with this string we open a block of code - close: 'endcode' // with this string we close a block of code - }, - dest: 'dist' // default destination which overwrittes environment variable - }, - dist : { // settings for task used with 'devcode:dist' + preprocess: { + dist: { + src: ['dist/**/*.js','dist/**/*.html','dist/*.js','dist/*.html'], + dst: ['dist/'], options: { - source: 'dist/', - dest: 'dist/', - env: 'production' + inline: true, + context: { + DEBUG: false, + NODE_ENV: 'production' + } } + } }, @@ -425,7 +419,7 @@ module.exports = function(grunt) { // Default task(s). grunt.registerTask('default', ['clean', 'jshint', 'copy:dev']); - grunt.registerTask('prod', ['clean:dist', 'clean:server', 'compass:dist', 'copy:prod', 'copy:tests', 'concat', 'uglify:prod', 'devcode:dist', 'hashres','replace']); + grunt.registerTask('prod', ['clean:dist', 'clean:server', 'compass:dist', 'copy:prod', 'copy:tests', 'concat', 'uglify:prod', 'preprocess:dist', 'hashres', 'replace']); grunt.registerTask('dev', ['clean', 'compass:dev', 'copy:dev']); grunt.registerTask('test', ['karma']); grunt.registerTask('deploy', ['prod', 'gh-pages']); diff --git a/README.md b/README.md index 9da5176f..dedc55b8 100644 --- a/README.md +++ b/README.md @@ -175,4 +175,4 @@ https://docs.google.com/document/d/1oXQ2mNojyDFkY_x4RBRPaqS-xhpnDE9coQnbmI3Pobw/ Please read the contribution guidelines -Note: This application will hit the demo server by default. +Note: This application will hit the demo server by default diff --git a/app/global-translations/locale-en.json b/app/global-translations/locale-en.json index bce40a1f..f83c422b 100644 --- a/app/global-translations/locale-en.json +++ b/app/global-translations/locale-en.json @@ -4,6 +4,7 @@ "label.heading.totalshares": "Total Shares", "label.heading.editcollateral": "Edit Collateral", "label.heading.collaterals": "Collaterals", + "label.heading.businessdetails": "Business Details", "label.heading.sharenominalprice": "Nominal/Unit Price", "label.heading.totalsharestobeissued": "Total Shares to be Issued", "label.heading.sharecapitalvalue": "Total Shares Capital Value", @@ -82,8 +83,16 @@ "label.heading.attendance": "Attendance", "label.heading.comments": "Comments", "label.heading.id": "ID", + "label.heading.accountnumber": "Account Number", + "label.heading.name": "Name", + "label.heading.title": "Title", + "label.heading.totaldeposit": "Total Deposit", + "label.heading.totalwithdraw": "Total Withdraw", + "label.heading.eligibility": "Current Eligibility (%) ", + "label.heading.eligibilityRate": "Client Eligibility Rate (%) ", "label.heading.activationdate": "Activation Date", "label.heading.externalid": "External ID", + "label.heading.department": "Department", "label.heading.summary": "Summary", "label.heading.products": "Products", "label.heading.branch": "Branch", @@ -105,6 +114,8 @@ "label.input.paidloans": "Paid Loans", "label.heading.principal": "Principal", "label.heading.amount": "Amount", + "label.heading.minAmount": "Minimum Amount to be charged", + "label.heading.maxAmount": "Maximum Amount to be charged", "label.heading.date": "Date", "label.heading.transactiontype": "Transaction Type", "label.heading.due": "Due", @@ -114,9 +125,26 @@ "label.heading.installmentamount": "Installment Amount", "label.heading.resourceid": "Resource ID", "label.heading.details": "Details", + "label.heading.information": "Information", + "label.heading.decisionLevelOne": "Decision Level One", + "label.heading.decisionLevelTwo": "Decision Level Two", + "label.heading.decisionLevelThree": "Decision Level Three", + "label.heading.decisionLevelFour": "Decision Level Four", + "label.heading.decisionLevelFive": "Decision Level Five", + "label.heading.revenue": "Revenue", + "label.heading.expense": "Expense", "label.heading.identitydocuments": "Identity Documents", "label.heading.clientapproval": "Client Approval", "label.heading.loanapproval": "Loan Approval", + "label.heading.loanreviewapplication": "Loan Review Application", + "label.heading.loancollateralreview": "Loan Collateral Review", + "label.heading.loanduediligence": "Loan Due Diligence", + "label.heading.icReviewLevelOne": "IC-Review Level One", + "label.heading.icReviewLevelTwo": "IC-Review Level Two", + "label.heading.icReviewLevelThree": "IC-Review Level Three", + "label.heading.icReviewLevelFour": "IC-Review Level Four", + "label.heading.icReviewLevelFive": "IC-Review Level Five", + "label.heading.loanPrepareAndSignContract": "Loan Prepare And Sign Contract", "label.heading.loandisbursal": "Loan Disbursal", "label.heading.checkerinbox": "Checker Inbox", "label.heading.enterclientsactivationdate": "Enter Clients Activation Date:", @@ -138,6 +166,9 @@ "label.heading.fromdate": "From Date:", "label.heading.interestrate": "Interest Rate", "label.heading.patternupdate": "Pattern Update", + "label.heading.information": "Business Information", + "label.heading.revenue": "Business Revenue", + "label.heading.expense": "Business Expenses", "label.input.collateralName": "Collateral Name", "label.input.quantity": "Quantity", "label.input.collateralSelection": "Collaterals", @@ -151,7 +182,11 @@ "label.heading.due.savings.collections": "Due savings collections", "label.heading.loanamount": "Original Loan", "label.heading.clientprincipalloan" : "Client Principal Loan", - "label.heading.grouplprincipalloan" : "Group Principal Loan", + "label.heading.grouplprincipalloan" : "Requested Principal Loan", + "label.heading.groupactualprincipalloan" : "Actual Principal Loan", + "label.heading.lastRepaymentDate" : "Last Repayment date", + "label.heading.outStandingAmount" : "Outstanding amount", + "label.heading.lastRepaymentAmount" : "Last repayment amount", "label.heading.outstandingamount": "Loan Balance", "label.heading.dueamount": "Amount Paid", "label.heading.principal.outstanding": "Principal Outstanding", @@ -208,6 +243,13 @@ "label.heading.createdby": "Created By", "label.heading.campaign": "Campaign", "label.heading.isactive": "Status", + "label.heading.otherexpenses": "Other Expenses", + "label.heading.otherexpensesamount": "Other Expenses Amount", + "label.heading.businessType": "Business Type", + "label.heading.sourceOfCapital": "Source Of Capital", + "label.heading.totalEmployee": "Total Employee", + "label.heading.totalEmployee": "Total Employee", + "label.heading.doneBy": "Done By", "#Menu Links": "..", "label.menu.selectloanofficer": "Select Staff", "label.menu.selectone": "Select One", @@ -233,6 +275,8 @@ "label.anchor.editpermissions": "Edit Permissions", "#Inputs": "..", "label.input.name": "Name", + "label.input.title": "Title", + "label.input.ownership": "Ownership", "label.input.unittype": "Unit Type", "label.input.pcttobase": "Percentage To Base", "label.input.baseprice": "Base Price", @@ -257,6 +301,7 @@ "label.input.enternote": "Enter note:", "label.input.notes": "Notes", "label.input.externalid": " External ID", + "label.input.department": "Department", "label.input.active": "Active", "label.input.enablepaymenttypes": "Enable", "label.input.enablefreewithdrawal": "Enable Free Withdrawal", @@ -275,10 +320,13 @@ "label.input.filterbynameorstatusoroffice": "Filter by name, status, or office", "label.input.filterbyname": "Filter by name", "label.input.transactiondate": "Transaction date", + "label.input.unlockdate": "Unlocked Date", + "label.input.nextWithdrawalDate": "Next Withdrawal Date", "label.input.fromdate": "From date", "label.input.todate": "To date", "label.input.amount": "Amount", - "label.input.disbursedamount": "Disbursed Amount", + "label.input.minAmount": "Minimum Amount to be charged", + "label.input.maxAmount": "Maximum Amount to be charged", "label.input.branchoffice": "Branch office", "label.input.center": "Center", "label.input.group": "Group", @@ -321,9 +369,11 @@ "label.button.previous": "Previous", "label.button.createcollateral": "Create Collateral", "label.button.viewcollaterals": "View Collaterals", + "label.button.viewbusinessdetails": "View Business Details", "label.button.createclientcollateral": "Create Client Collateral", "label.button.next": "Next", "label.button.save": "Submit", + "label.button.addmember": "Add Member", "label.button.searchdata": "Search Data", "label.button.cancel": "Cancel", "label.button.edit": "Edit", @@ -342,6 +392,7 @@ "label.button.staffassignmenthistory": "Staff Assignment History ", "label.button.activate": "Activate", "label.button.newloan": "New Loan", + "label.button.addbusinessdetail": "Add Business Detail", "label.button.newshareaccount": "New Share Account", "label.button.transferclient": "Transfer Client", "label.button.newsaving": "New Saving", @@ -364,11 +415,27 @@ "label.button.productivecollectionsheet": "Productive Collection Sheet", "label.button.more": "More", "label.button.reject": "Reject", + "label.button.addmember": "Add Member", "label.button.suspend": "Suspend", "label.button.pay": "Pay", "label.button.clientscreenreports": "Client Screen Reports", "label.button.summary": "Summary", "label.button.updatedefaultsavings": "Update Default Savings", + "label.anchor.validation.limits": "Validation Limits", + "label.anchor.create.validation.limit": "Create Validation Limit", + "label.anchor.edit.validation.limit": "Edit Validation Limit", + "label.heading.maximumsingledepositamount": "Max Single Deposit Amount", + "label.heading.maximumcumulativebalance": "Max Cumulative Balance", + "label.heading.defaultsinglewithdrawlimit": "Default Single Withdraw Limit", + "label.heading.defaultdailywithdrawlimit": "Default Daily Withdraw Limit", + "label.heading.maximumclientspecificsinglewithdrawlimit": "Max Client Specific Single Withdraw Limit", + "label.heading.maximumclientspecificdailywithdrawlimit": "Max Client Specific Daily Withdraw Limit", + "label.heading.editvalidationlimit": "Edit Validation Limit", + "validationLimit.clientLevel.name": "Client Level", + "label.heading.clientLevel": "Client Level", + "label.button.createvalidation" : "Create Validation Limit", + "label.input.dailyWithdrawLimit": "Daily withdraw limit", + "label.input.singleWithdrawLimit": "Single Withdraw Limit", "label.button.submit": "Submit", "label.button.selectAll": "Select All", "label.button.deselectAll": "Deselect All", @@ -380,7 +447,11 @@ "label.button.dividends": "Dividends", "label.button.postdividends": "Post Dividends", "label.button.proceed": "Proceed", + "label.button.addExpenses": "Add Expenses", + "label.button.updateExpenses": "Modify Expenses", + "label.button.deleteExpenses": "Delete Expenses", "label.button.addAddress": "Add Address", + "label.button.createtask": "Add Task", "#Misc Labels": "..", "label.uniquelyidentifiedwithid": "Uniquely identified with ID", "label.belongsto": "Belongs To", @@ -509,6 +580,14 @@ "validation.msg.floatingrate.isBaseLendingRate.baselendingrate.duplicate": "Base lending rate is already defined", "validation.msg.floatingrate.isDifferentialToBaseLendingRate.no.baselending.rate.defined": "The base lending rate doesn't exists", "validation.msg.floatingrate.isDifferentialToBaseLendingRate.cannot.be.true.for.baselendingrate": "isDifferentialToBaseLendingRate cannot be true for floating rate marked as Base Lending Rate", + "validation.msg.savingsaccount.amount.validation.msg.amount.exceeds.daily.withdraw.limit": "Withdraw amount would exceed total daily withdraw limit of {{params[1].value[0]}}", + "validation.msg.savingsaccount.amount.validation.msg.amount.exceeds.maximum.transaction.limit": "Withdraw amount exceeds maximum transaction limit of {{params[1].value[0]}}", + "error.msg.fixeddepositaccount.account.trasaction.deposit.notallowed": "Deposit transaction not allowed on Fixed Deposit Account", + "validation.msg.savingsaccount.amount.validation.msg.amount.exceeds.single.deposit.limit": "Deposit amount exceeds single deposit limit of {{params[1].value[0]}}", + "validation.msg.savingsaccount.amount.validation.msg.amount.exceeds.single.withdraw.limit":"Withdraw amount exceeds single withdraw limit of {{params[1].value[0]}}", + "validation.msg.savingsaccount.amount.validation.msg.cumulative.balance.exceeds.limit": "Deposit amount would cause cumulative balance to exceed limit of {{params[1].value[0]}}", + "validation.msg.savingsaccount.daily.withdraw.limit.cannot.exceed.global.limit": "Daily withdraw limit cannot exceed global validation limit", + "validation.msg.savingsaccount.singleWithdrawLimit.maximum.transaction.limit.cannot.exceed.global.limit": "Maximum transaction limit cannot exceed global validation limit", "validation.msg.batch.jlg.no.clients.defined": "There is no clients selected for this request", "#Tooltips": "..", "label.tooltip.incomefromfees": "An Income account which is credited when a fee is paid by account holder on this account", @@ -681,7 +760,7 @@ "#------": "------------", "#Clients": "....", "#Headings": "..", - "label.heading.familymembers": "Family Members", + "label.heading.nextOfKin": "Next Of Kin", "label.heading.identities": "Identities", "label.heading.uniqueidentification": "Unique ID Number", "label.heading.identitydocs": "Identification Documents", @@ -690,6 +769,7 @@ "label.heading.documents": "Documents", "label.heading.editclient": "Edit Client", "label.heading.uploadclientdocument": "Upload Client Document", + "label.heading.uploadsavingsdocument": "Upload Savings Document", "label.heading.addclientidentifier": "Add Client Identifier", "label.heading.downloadSavedReports": "Download Credit Reports", "label.heading.groupclosed": "Group Closed", @@ -700,6 +780,7 @@ "label.heading.selectclientimage": "Select Client Image", "label.heading.captureclientimage": "Capture Client Image", "label.heading.deleteclientimage": "Delete Client Image", + "label.heading.deleteownerimage": "Delete Owner Image", "label.heading.selectclientsignature": "Select Client Signature", "label.heading.clientsignature": "Client Signature", "label.heading.clientscreenreport": "Client Screen Report", @@ -722,6 +803,7 @@ "label.anchor.reactivate": "Reactivate", "label.anchor.undoReject": "Undo Rejection", "label.anchor.undoWithdrawn": "Undo Withdrawal", + "label.anchor.loanapprovalmatrix": "Loan Approval Matrix", "#Inputs": "..", "label.input.filterbynameaccno": "Filter display by name/client number/staff/office", "label.input.searchByNameAccNo": "Find by name/mobile/client number/external ID/identifier", @@ -755,6 +837,7 @@ "label.button.loandetails": "Loan Details", "label.button.upload": "Upload", "label.button.download": "Download", + "label.button.documents": "Documents", "label.button.capture": "Capture", "label.button.viewclosedloans": "View Closed Loans", "label.button.viewclosedsavings": "View Closed Savings", @@ -860,7 +943,9 @@ "label.heading.editgroup": "Edit Group", "label.heading.managemembers": "Manage Members", "label.heading.associatenewmembers": "Associate New Members", + "label.heading.gsimassociatenewmembers": "GSim Associate New Members", "label.heading.groupmembers": "Group Members", + "label.heading.gsimAccountMember": "GSim Account Members", "label.heading.transferclientsbetweengroups": "Transfer Client between Groups", "label.heading.destinationgroupdetails": "Destination Group Details", "label.heading.nextmeetingon": "Next Meeting on", @@ -877,9 +962,20 @@ "label.menu.selectstaff": "Select Staff", "label.menu.selectgroup": "Select Group", "label.menu.gender": "Select Gender", + "label.menu.businessType": "Select Business Type", + "label.menu.surveyLocation": "Select Survey Location", + "label.menu.cohort": "Select Cohort", + "label.menu.country": "Select Country", + "label.menu.program": "Select Program", + "label.menu.department": "Select Department", + "label.menu.sourceOfCapital": "Select Source Of Capital", + "label.menu.bestMonth": "Select Best Month", + "label.menu.worstmonth": "Select Worst Month", + "label.menu.whenLastPurchase": "Select Last Purchase", "#Anchors": "..", "label.anchor.groups": "Groups", "label.anchor.viewgroup": "View Group", + "label.anchor.viewGSimAccount": "View GSim Account", "label.anchor.attachmeeting": "Attach Meeting", "label.anchor.editmeeting": "Edit Meeting", "label.anchor.creategroup": "Create Group", @@ -1134,11 +1230,14 @@ "label.input.date.of.opening.balances": "Date of opening balances", "label.input.opening.balances.contra.account": "Opening balances contra", "label.input.smsprovider": "SMS Provider", + "label.input.maximumloanprincipalamount": "Maximum Loan Principal Amount", + "label.input.minimumloanterm": "Minimum Loan Term", + "label.input.maximumloanterm": "Maximum Loan Term", "#journalEntryType code ": ".............", "journalEntryType.credit": "Credit", "journalEntrytType.debit": "Debit", "#Buttons": "..", - "label.button.addfamilymember": "Add Family Member", + "label.button.addNextOfKin": "Add Next Of Kin", "label.button.listview": "List View", "label.button.treeview": "Tree View", "label.button.addaccount": "Add Account", @@ -1296,7 +1395,9 @@ "label.button.createreport": "Create Report", "label.button.parameters": "Parameters", "label.button.exportcsv": "Export CSV", + "label.button.exportexcel2": "Export XLSX", "label.button.export": "Export", + "label.button.exportSchedule": "Export Schedule", "#Misc Labels": "..", "label.selectallowedparameter": "Select allowed parameter", "startDateSelect": "Start Date", @@ -1341,6 +1442,7 @@ "label.heading.loanproduct": "Loan Product", "label.heading.addloancharge": "Add Loan Charge", "label.heading.addloancollateral": "Add Loan Collateral", + "label.heading.addduediligence": "Add Due Diligence", "label.heading.createcollateral": "Create Collateral", "label.heading.uploaddocument": "Upload Document", "label.heading.assignloanofficer": "Assign Loan Officer", @@ -1360,6 +1462,14 @@ "label.heading.editloancharge": "Edit Loan Charge", "label.heading.clientdetails": "Client Details", "label.heading.approveloanaccount": "Approve Loan Account", + "label.heading.reviewapplicationloanaccount": "Review Application Loan Account", + "label.heading.collateralreviewloanaccount": "Collateral Review Loan Account", + "label.heading.icreviewleveloneloanaccount": "Ic Review Level One Loan Account", + "label.heading.icreviewleveltwoloanaccount": "Ic Review Level Two Loan Account", + "label.heading.icreviewlevelthreeloanaccount": "Ic Review Level Three Loan Account", + "label.heading.icreviewlevelfourloanaccount": "Ic Review Level Four Loan Account", + "label.heading.icreviewlevelfiveloanaccount": "Ic Review Level Five Loan Account", + "label.heading.prepareandsigncontractloanaccount": "Prepare And Sign Contract Loan Account", "label.heading.rejectloanaccount": "Reject Loan Account", "label.heading.withdrawloanaccount": "Withdraw Loan Account", "label.heading.undoapproveloanaccount": "Undo Approve Loan Account", @@ -1368,6 +1478,8 @@ "label.heading.loanrepayments": "Loan Repayments", "label.heading.loanwaiveinterest": "Waive Interest", "label.heading.writeoffloanaccount": "Write Off Loan Account", + "label.heading.payoffloanaccount": "Pay Off Loan Account", + "label.heading.changerepaymentprincipal": "Change Loan Repayment Principal", "label.heading.closeloanaccountasrescheduled": "Close Loan Account as Rescheduled", "label.heading.closeloanaccount": "Close Loan Account", "label.heading.unassignloanofficer": "Unassign Loan Officer", @@ -1414,8 +1526,10 @@ "label.heading.loancollaterals": "Loan Collateral", "label.heading.enterpaymentdate": "Enter Payment Date", "label.heading.loandocuments": "Loan Documents", + "label.heading.accountdocuments": "Account Documents", "label.heading.guarantordetails": "Guarantor Details", "label.heading.transactions": "Transactions", + "label.heading.contributions": "Group Contributions", "label.heading.interestChargedFrom": "Interest Charged From", "label.heading.advanceaccountingrules": "Advance Accounting Rules", "label.heading.writtenoff": "Written Off", @@ -1481,6 +1595,8 @@ "label.anchor.viewcollateral": "View Collateral", "label.anchor.viewschedule": "Schedule", "label.anchor.loanapplication": "New Loan Application", + "label.anchor.addclientbusinessdetail": "Add Client Business Detail", + "label.anchor.viewclientbusinessdetail": "View Client Business Detail", "label.anchor.modifyloanapplication": "Modify Loan Application", "label.anchor.loanscreenreport": "Loan screen report", "label.anchor.recoverypayment": "Recovery Repayment", @@ -1496,6 +1612,7 @@ "label.input.charge": "Charge", "label.input.chargetime": "Charge time", "label.input.collateraltype": "Collateral type", + "label.input.surveylocation": "Survey Location", "label.input.relationship": "Relationship", "label.input.dob": "DOB", "label.input.address": "Address", @@ -1510,9 +1627,14 @@ "label.input.interestchargedfrom": "Interest charged from", "label.input.firstrepaymenton": "First repayment on", "label.input.value": "Value", + "label.input.surveyname": "Survey Name", "label.input.stringValue": "String Value", "label.input.existingclient": "Existing client", "label.input.approvedondate": "Approved on", + "label.input.reviewApplicationOn": "Review Application on", + "label.input.collateralReviewOn": "Collateral Review on", + "label.input.icReviewOn": "Ic Review on", + "label.input.prepareAndSignContractOn": "Prepare And Sign Contract on", "label.input.rejectedondate": "Rejected on", "label.input.withdrawnondate": "Withdrawn on", "label.input.disbursedondate": "Disbursed on Date", @@ -1521,16 +1643,22 @@ "label.input.closedondate": "Closed on", "label.input.loanofficerunassigneddate": "Unassigned on", "label.input.paymenttype": "Payment types", + "label.input.transactorname": "Transactor Name", + "label.input.transactorphonenumber": "Transactor Phone Number", "label.heading.paymenttypes": "Payment types", "label.anchor.paymenttypes": "Payment types", "label.view.paymenttypes": "Payment types", "label.input.actions": "Actions", "label.input.linksavings": "Link savings", + "label.input.vendorForBnpl": "Vendor for BNPL", + "label.input.vendorSavingsaccount": "Vendor Savings Account", + "label.input.groupSavingsAccountLinkage": "Link Group Savings", "label.input.installment": "Select Installment", "label.input.loan.disbursaldate": "Disbursement date", "label.input.loan.approvaldate": "Approval date", "label.input.loan.createdondate": "Creation date", "label.input.hide.accrual.transactions": "Hide accruals", + "label.input.show.accrual.transactions": "Show accruals", "label.input.hide.deleted.guarantor": "Hide Deleted Guarantors", "label.input.createStandingInstruction": "Create standing instructions at disbursement", "label.input.isfloatingrate": "Is Floating Rate?", @@ -1539,6 +1667,7 @@ "label.input.preclose.interest.calculation.strategy": "Pre-closure interest calculation rule", "loanPreClosureInterestCalculationStrategy.tillPreClosureDate": "Calculate until pre-closure date", "loanPreClosureInterestCalculationStrategy.tillRestFrequencyDate": "Calculate until rest frequency date", + "loanPreClosureInterestCalculationStrategy.tillExpectedMaturityDate": "Calculate until expected maturity date", "label.input.isConfigLoanAttributes": "Allow overriding select terms and settings in loan accounts", "label.input.rescheduleReasonId": "Reason for Rescheduling", "label.input.changeRepaymentDate": "Change Repayment Date", @@ -1557,7 +1686,10 @@ "label.input.installmentOn": "Reschedule from Installment On", "label.input.applicationdate": "Application Date", "label.input.isTopup": "Is Topup Loan", + "label.input.payoffondate": "Pay Off On Date", "label.input.loanIdToClose": "Choose loan to close", + "label.input.totalTransactionAmount": "Total Transaction Amount", + "label.input.derivedTotalTransactionAmount": "Derived Total Transaction Amount", "#Buttons": "..", "label.button.addloancharge": "Add Loan Charge", "label.button.addcollateral": "Add Collateral", @@ -1584,6 +1716,7 @@ "label.button.reschedule": "Reschedule", "label.button.recreate": "Recreate", "label.button.foreclosure": "Foreclosure", + "label.button.payoff": "Pay-Off", "#Misc Labels": "..", "label.selectpurpose": "Select purpose", "label.selectloanproduct": "Select loan product", @@ -1642,13 +1775,16 @@ "label.tooltip.loanproduct.floatinginterestrate": "These fields are used to define the minimum, default, maximum, and period for the floating interest rate allowed for the loan product. The minimum, default, and maximum floating interest rates are expressed as percentages.", "label.tooltip.loanproduct.variableinstallments": "These fields are used to define the minimum, maximum gap that should be present between the installments for the loan product", "label.tooltip.loanproduct.canUseForTopup": "If selected, the Loan Product can be used to apply for Topup Loans.", + "label.tooltip.loanproduct.loanTermIncludesToppedUpLoanTerm": "If selected, the new loan account will have it's loan term plus other loan term from the topped up loan term", "#tool tip for new loan account": "..", "label.tooltip.product": "The name of the loan product that the loan account is based upon", + "label.tooltip.linkGroupSavingsAccountId": "Link the Group Savings Account This Client has made contributions to", "label.tooltip.loanofficer": "The financial institution representative who has responsibility for, and interacts with, the client/group associated with a loan account", "label.tooltip.loanpurpose": "Provides an indication of how the funds provided through the loan will be directed and can be used to group loans with the same purpose for reporting", "label.tooltip.submittedon": "The date the loan account application was received", "label.tooltip.disbursementon": "The date that the loan account is expected to be disbursed", "label.tooltip.externalid": "Provides an external id for the loan account", + "label.tooltip.department": "Provides Department for the loan account", "label.tooltip.firstrepaymenton": "May be entered to override the date the system would schedule", "label.tooltip.interestchargedfrom": "May be entered to override the date the system would start charging interest", "label.tooltip.moratorium": "The moratorium information will default from the loan product settings, but can be changed for this loan account", @@ -1697,6 +1833,41 @@ "label.tooltip.charge.enablefreewithdrawal": "Charge-Free Transactions to a certain no. of transactions", "label.tooltip.charge.freeWithdrawalFrequency": "Number of transactions free-charge", "label.tooltip.charge.restartCountFrequency": "Restart the count for free-charge transactions", + "label.tooltip.clientbusinessdetail.businesstype": "This identifies the business type the client is dealing in", + "label.tooltip.clientbusinessdetail.startingcapital": "The total amount of money the client started the business with", + "label.tooltip.clientbusinessdetail.businesscreationdate": "Date on when the business was started", + "label.tooltip.clientbusinessdetail.sourceofcapital": "Source of capital invested in this business", + "label.tooltip.clientbusinessdetail.totalemployees": "Total Number of employees working in this business", + "label.tooltip.clientbusinessdetail.businessrevenue": "Total amount this business has generated", + "label.tooltip.clientbusinessdetail.averagemonthlyrevenue": "Total average amount this business generates per month", + "label.tooltip.clientbusinessdetail.bestmonth": "Month this business performed the most", + "label.tooltip.clientbusinessdetail.reasonforbestmonth": "Reason why this Month the business performed the most", + "label.tooltip.clientbusinessdetail.worstmonth": "Month this business performed the worst", + "label.tooltip.clientbusinessdetail.reasonforworstmonth": "Reason why this Month the business performed the worst", + "label.tooltip.clientbusinessdetail.numberofpurchase": "Number of times you re-stock/purchases for this business", + "label.tooltip.clientbusinessdetail.purchasefrequency": "Purchase Frequency", + "label.tooltip.clientbusinessdetail.totalpurchaselastmonth": "Total purchase last month", + "label.tooltip.clientbusinessdetail.lastpurchase": "Your last purchase month", + "label.tooltip.clientbusinessdetail.lastpurchaseamount": "Your last purchase total amount", + "label.tooltip.clientbusinessdetail.whenlastpurchase": "When did you do the last purchase", + "label.tooltip.clientbusinessdetail.businessassetamount": "Total business asset amount", + "label.tooltip.clientbusinessdetail.amountatcash": "Total amount in cash for this business", + "label.tooltip.clientbusinessdetail.amountatsaving": "Total amount in savings for this business", + "label.tooltip.clientbusinessdetail.amountatinventory": "Total amount in inventory for this business", + "label.tooltip.clientbusinessdetail.fixedassetcost": "Total cost for fixed asset", + "label.tooltip.clientbusinessdetail.totalintax": "Total amount in taxes", + "label.tooltip.clientbusinessdetail.totalintransport": "Total amount in transportation", + "label.tooltip.clientbusinessdetail.totalinrent": "Total amount in rent", + "label.tooltip.clientbusinessdetail.totalincommunication": "Total amount in communication", + "label.tooltip.clientbusinessdetail.otherexpense": "other expenses", + "label.tooltip.clientbusinessdetail.otherexpenseamount": "Total amount in other expenses", + "label.tooltip.clientbusinessdetail.totalutility": "Total amount in utilities", + "label.tooltip.clientbusinessdetail.totalworkersalary": "Total worker salary", + "label.tooltip.clientbusinessdetail.totalwage": "Total wage", + "label.tooltip.clientbusinessdetail.society": "society", + "label.tooltip.approvalmatrix.maximumloanprincipalamount": "The Maximum Loan Principal amount to be authorized for disbursement", + "label.tooltip.approvalmatrix.minimumloanterm": "The Minimum Loan term to be authorized for disbursement", + "label.tooltip.approvalmatrix.maximumloanterm": "The Maximum Loan term to be authorized for disbursement", "#Enumeration & Error Messages": "..", "loanTransactionType.disbursement": "Disbursement", "loanTransactionType.repayment": "Repayment", @@ -1786,6 +1957,7 @@ "error.msg.loan.approval.cannot.be.a.future.date": "The approved on date cannot be in the future.", "validation.msg.loanapplication.rejectedOnDate.cannot.be.blank": "Rejected on date is mandatory.", "validation.msg.loanapplication.withdrawnOnDate.cannot.be.blank": "Withdrawn on date is mandatory.", + "validation.msg.loanapplication.loanId.max.active.loans.exceeded": "You cannot approve more loans beyond the set max limit for an individual", "error.msg.loan.reject.cannot.be.before.submittal.date": "The loan withdrawn/rejected on date cannot be before its submitted on date.", "error.msg.loan.reject.cannot.be.a.future.date": "The withdrawn/rejected on date cannot be in the future.", "validation.msg.loan.disbursement.actualDisbursementDate.cannot.be.blank": "Actual disbursement date is mandatory.", @@ -1898,6 +2070,8 @@ "label.heading.reasonforblock": "Reason for Block/Hold", "label.heading.depositmoneytosavingaccount": "Deposit Money to Saving Account", "label.heading.withdrawmoneyfromsavingaccount": "Withdraw Money from Saving Account", + "label.heading.unlocksavingsaccount": "Unlock Saving Account", + "label.heading.nextWithdrawalDate": "Next Withdrawal Date", "label.heading.savingaccountapplyannualFee": "Apply Annual Fee", "label.heading.closesavingaccount": "Close Saving Account", "label.heading.editsavingaccounttransaction": "Edit Saving Account Transaction", @@ -1919,6 +2093,7 @@ "label.heading.repaymentsevery": "Repayments Every", "label.heading.fieldofficer": "Field Officer", "label.heading.accountdetail": "Account Detail", + "label.heading.duediligencedetail": "Due Diligence Details", "label.heading.totaldeposits": "Total Deposits", "label.heading.feeorpenalty": "Fee/Penalty", "label.heading.paymentdueat": "Payment due at", @@ -1956,6 +2131,7 @@ "label.heading.minRequiredBalance": "Minimum balance", "label.heading.interest.recalulation.settings": "Interest Recalculation Settings", "label.heading.withholdtax": "Is withhold tax Applicable", + "label.heading.addPenaltyOnMissedTargetSavings": "Add Penalty charge on missed target savings", "label.heading.withholdtaxgroup": "Withhold Tax group", "label.heading.marketprice": "Market Price", "label.heading.shareapplication": "New Shares Application", @@ -1968,6 +2144,13 @@ "label.heading.rejectsharespurchase": "Reject Shares Purchase Request", "label.heading.initiatedividend": "Initiate Dividend", "label.heading.closeshareaccount": "Close Share Account", + "label.heading.surveyname": "Survey Name", + "label.heading.surveylocation": "Survey Location", + "label.heading.startdate": "Start Date", + "label.heading.enddate": "End Date", + "label.heading.cohort": "Cohort", + "label.heading.program": "Program", + "label.heading.country": "Country", "#Anchors": "..", "label.anchor.addsavingcharges": "Add Saving Charges", "label.anchor.viewsavingaccount": "View Saving Account", @@ -1984,6 +2167,14 @@ "label.anchor.sharesapplication": "Shares Application", "label.anchor.viewshareaccount": "View Share Account", "label.anchor.holdaccount": "Hold Account", + "label.anchor.reviewapplication": "Review Application", + "label.anchor.collateralReview": "Collateral Review", + "label.anchor.icreviewlevelone": "IC Review Level One", + "label.anchor.icreviewleveltwo": "IC Review Level Two", + "label.anchor.icreviewlevelthree": "IC Review Level Three", + "label.anchor.icreviewlevelfour": "IC Review Level Four", + "label.anchor.icreviewlevelfive": "IC Review Level Five", + "label.anchor.prepareandsigncontract": "Prepare And Sign Contract", "#Inputs": "..", "label.input.charges": "Charges", "label.input.chargecalculation": "Charge calculation", @@ -2009,10 +2200,12 @@ "label.input.marketpriceperiods": "Market price periods", "label.input.requreddate": "Requested Date", "label.input.currencyinmultiplesof": "Currency in multiples of", + "label.input.withdrawalFrequency": "Withdraw Frequency", "label.input.interestcompoundingperiod": "Interest compounding period", "label.input.interestpostingperiod": "Interest posting period", "label.input.interestcalculatedusing": "Interest calculated using", "label.input.daysinyears": "Days in year", + "label.savingsproduct.withdraw.frequency": "Withdraw Frequency", "label.input.daysinmonth": "Days in month", "label.input.minimumopeningbalance": "Minimum opening balance", "label.input.lockinPeriodFrequency": "Lock-in period", @@ -2032,6 +2225,10 @@ "label.input.checkValidate": "Validation Options", "label.input.postInterestValidationOnClosure": "Is Interest Posting required on closure date?", "label.input.accountnumber": "Account Number", + "label.input.bankname": "Bank Name", + "label.input.industry" : "Industry", + "label.input.sector": "Sector", + "label.input.mainbankdetails": "Main Bank Account Details", "label.input.paymentypeid": "Payment type id", "label.input.showpaymentdetails": "Show payment details", "label.input.accnum": "Account#", @@ -2062,6 +2259,7 @@ "label.input.enforceMinRequiredBalance": "Enforce minimum balance", "label.input.minRequiredBalance": "Minimum balance", "label.input.withholdtax": "Is Withhold tax applicable", + "label.input.addPenaltyOnMissedTargetSavings": "Add Penalty charge on missed target savings", "label.input.requesteddate": "Request Date", "label.input.dividendperiodstartdate": "Dividend Period Start Date", "label.input.dividendperiodenddate": "Dividend Period End Date", @@ -2075,6 +2273,7 @@ "label.button.undoapproval": "Undo Approval", "label.button.deposit": "Deposit", "label.button.postInterestAsOn": "Post Interest As On", + "label.button.postAccrualInterestAsOn": "Post Accrual Interest As On", "label.button.withdraw": "Withdraw", "label.button.hold": "Hold", "label.button.unhold": "Unhold Account", @@ -2096,6 +2295,15 @@ "label.button.rejectadditionalshares": "Reject Additional Shares", "label.button.redeemshares": "Redeem Shares", "label.button.releasefund": "Release Fund", + "label.button.reviewapplication": "Review Application", + "label.button.duediligence": "Due Diligence", + "label.button.collateralreview": "Collateral Review", + "label.button.icreviewlevelone": "IC Review Level One", + "label.button.icreviewleveltwo": "IC Review Level Two", + "label.button.icreviewlevelthree": "IC Review Level Three", + "label.button.icreviewlevelfour": "IC Review Level Four", + "label.button.icreviewlevelfive": "IC Review Level Five", + "label.button.prepareandsigncontract": "Prepare And Sign Contract", "#Misc Labels": "..", "label.selectcharge": "Select charge", "label.selectsavingproduct": "Select saving product", @@ -2119,6 +2327,7 @@ "label.withdrawalfee": "Withdrawal fee", "label.lastActiveTransactionDate": "Last Active Transaction Date", "label.subStatus": "Sub Status", + "label.blockNarration": "Block/Unblock Narration", "label.daysToInactive": "Days to Inactive", "label.daysToDormancy": "Days to Dormancy", "label.daysToEscheat": "Days to Escheat", @@ -2149,6 +2358,8 @@ "label.account.deposit.frequency": "Deposit Frequency", "label.account.closed.on.date": "Closed on Date", "label.heading.interest.calculation.date": "Interest Recalculation Date", + "label.heading.previousFlexWithdrawalDate": "Previous Withdrawal Date", + "label.heading.nextFlexWithdrawalDate": "Next Withdrawal Date", "#tool tip for saving products": "..", "label.tooltip.productname": "A unique identifier for the saving product", "label.tooltip.shortname": "A unique identifier for the saving product", @@ -2180,6 +2391,7 @@ "label.tooltip.lienallowed": "Indicates whether saving accounts based on this saving product may have an lien allowed", "label.tooltip.maxallowedlienlimit":"Sets the maximum allowed lien amount for a saving account that is allowed to have an lien", "label.tooltip.nominalannualinterestrateoverdraft": "Default interest rate on overdraft", + "label.tooltip.postoverdraftinterestondeposit": "Overdraft interest will be posted upon each deposit as long as the account is in overdraft", "label.tooltip.minoverdraftforinterestcalculation": "Sets the overdraft required for interest calculation", "label.tooltip.savingreference": "An Asset account (typically a Cash account), to which the amount is debited when a deposit is made by the account holder and credit when the account holder makes a withdrawal", "label.tooltip.overdraftprotfolio": "An Asset account (typically a Cash account), that increases when a client makes an overdraft withdrawal", @@ -2188,7 +2400,9 @@ "label.tooltip.Writeoffoverdraft": "An Expense account, which increases when a client does not repay overdraft balance", "label.tooltip.incomefromoverdraftinterest": "An Income account, where income generated when client pays interest on overdrafts", "label.tooltip.savingsuspense": "An Asset account that is used a suspense account for tracking Portfolio of Loans under transfer", + "label.tooltip.interestPayableAccountId": "A Liability Account that is used on interest payable account", "label.tooltip.withholdtax": "An boolean flag to attach taxes to interest posting", + "label.tooltip.addPenaltyOnMissedTargetSavings": "This adds a penalty charge on the Account that failed to reach it's target savings . All Interest Accrued on this account will be reversed by the penalty charge of type Specified due date", "label.tooltip.sharereference": "An Asset account (typically a Cash account), to which the amount is debited when new shares purchased by the account holder and credit when the account holder makes a redeem", "label.tooltip.sharecontrol": "A Liability account which denotes the Share deposit accounts portfolio is debited when share purchase is approved and credited when share purchase is rejected", "#Tooltips for deposit products": "..", @@ -2681,6 +2895,8 @@ "label.heading.addnewmap": "Add New Entity Mapping", "label.heading.editmap": "Edit Entity Mapping", "label.heading.surveys": "List of All Surveys", + "label.heading.mytasks": "List of Tasks", + "label.heading.mytask": "My Task", "label.heading.createsurvey": "Create Survey", "label.heading.questions": "Questions", "label.heading.key": "Key", @@ -2699,6 +2915,7 @@ "label.anchor.createhook": "Create Hook", "label.anchor.entitytoentitymapping": "Entity To Entity Mapping", "label.anchor.managesurveys": "Manage Surveys", + "label.anchor.mytasks": "My Tasks", "label.anchor.edithook": "Edit Hook", "label.anchor.audit": "Audit", "label.anchor.managedatatables": "Manage Data tables", @@ -2726,12 +2943,14 @@ "label.anchor.configuration": "Configurations", "label.anchor.addcodevalue": "Add Code Value", "label.anchor.managemembers": "Manage Members", + "label.anchor.addMemberToGSimAccount": "Add Member To GSim Account", "label.anchor.accountNumberPreferences": "Account Number Preferences", "label.anchor.addAccountNumberPreferences": "Add Account Number Preferences", "label.anchor.viewAccountNumberPreferences": "View Account Number Preferences", "label.anchor.editAccountNumberPreferences": "Edit Account Number Preferences", "label.anchor.viewEntityMapping": "Entity Mapping", "label.anchor.externalServices": "External Services", + "label.anchor.loanApprovalMatrix": "Loan Approval Matrix Settings", "label.anchor.addressConfiguration": "Address configuration", "label.anchor.fieldconfiguration": "Entity Field Configuration", "#Inputs": "..", @@ -2771,12 +2990,14 @@ "label.input.jobname": "Job name", "label.input.filterbyversion": "Filter by Version", "label.input.resourceid": "Resource id", + "label.input.clientid": "Client ID", "label.input.joinedon": "Joined On", "label.input.accountType": "Select Account Type", "label.input.addPrefix": "Add Prefix to Account", "label.input.prefixField": "Prefix Field", "label.input.prefixcharacter": "Prefix Character", "label.input.searchsurveys": "Search Surveys", + "label.input.searchtasks": "Search Tasks", "#Localize system defined codes": "...", "Customer Identifier": "Customer identifier", "LoanCollateral": "Loan collateral", @@ -2894,6 +3115,7 @@ "label.defineormodifyhooks": "Define hooks", "label.definemappings": "Define or modify entity to entity mappings", "label.managesurveys": "Manage your surveys", + "label.managetasks": "Manage your Tasks", "label.makerchecker.task.created.description": "The action is created and waiting for checker approval", "label.makerchecker.task.created.description.view.details": "Click on details to view the details of created action.", "label.makerchecker.task.approved.successfully": "The checker action has been performed successfully.", @@ -3000,6 +3222,7 @@ "label.heading.mappenaltiestospecificincomeaccounts": "Map Penalties to Specific Income Accounts", "label.heading.liabilities": "Liabilities", "label.heading.expenses": "Expenses", + "label.heading.householdexpenses": "Household Expenses", "label.heading.income": "Income", "label.heading.penalty": "Penalty", "label.heading.editcharge": "Edit Charge", @@ -3056,6 +3279,7 @@ "label.heading.interestcompoundingperiod": "Interest Compounding Period", "label.heading.interestpostingperiod": "Interest Posting Period", "label.heading.interestcalculatedusing": "Interest Calculated Using", + "label.heading.withdrawalFrequency": "Withdraw Frequency", "label.heading.daysinyears": "Days in Years", "label.heading.minimumopeningbalance": "Minimum Opening Balance", "label.heading.lockinPeriodFrequency": "Lock-in Period", @@ -3100,6 +3324,49 @@ "label.heading.chargeamount": "Charge Amount", "label.heading.sharereference": "Shares Reference", "label.heading.sharecontrol": "Shares Suspense Control", + "label.heading.createtask": "Create New Task", + "label.heading.businesstype": "Business Type", + "label.heading.businesscreationdate": "Business Since", + "label.heading.startingcapital": "Starting Capital", + "label.heading.sourceofcapital": "Source Of Capital", + "label.heading.totalemployees": "Total Employees", + "label.heading.businessrevenue": "Business Revenue", + "label.heading.averagemonthlyrevenue": "Average Monthly Revenue", + "label.heading.bestmonth": "Best Month", + "label.heading.reasonforbestmonth": "Why best month", + "label.heading.worstmonth": "Worst Month", + "label.heading.reasonforworstmonth": "Why worst month", + "label.heading.numberofpurchase": "Purchase", + "label.heading.purchasefrequency": "How often do you purchase", + "label.heading.totalpurchaselastmonth": "Purchase Last Month", + "label.heading.lastpurchaseamount": "Last Purchase Amount", + "label.heading.whenlastpurchase": "When Last Purchase", + "label.heading.businessassetamount": "Business Assets", + "label.heading.amountatcash": "Amount In Cash", + "label.heading.amountatsaving": "Amount In Savings", + "label.heading.amountatinventory": "Amount In Inventory", + "label.heading.fixedassetcost": "Fixed Asset Cost", + "label.heading.businessassetcost": "Business Assets", + "label.heading.totalintax": "Tax", + "label.heading.totalintransport": "Transport", + "label.heading.totalinrent": "Rent", + "label.heading.totalincommunication": "Communication", + "label.heading.otherexpense": "Other Expenses", + "label.heading.otherexpenseamount": "Other Expense amount", + "label.heading.totalutility": "Utilities", + "label.heading.totalworkersalary": "Worker's salary", + "label.heading.totalwage": "Wages", + "label.heading.society": "Society", + "label.heading.unsecuredloanfirstcycle": "Unsecured Loan : First Cycle", + "label.heading.unsecuredloansecondcycle": "Unsecured Loan : Second Cycle", + "label.heading.securedloanfirstcycle": "Secured Loan : First Cycle", + "label.heading.securedloansecondcycle": "Secured Loan : Second Cycle", + "label.heading.maximumloanprincipalamount": "Maximum Loan Principal Amount", + "label.heading.minimumloanterm": "Minimum Loan Term", + "label.heading.maximumloanterm": "Maximum Loan Term", + "label.heading.levelOneUnsecuredFirstCycleMaxAmount": "Level One Unsecured Maximum Loan Amount", + "label.heading.levelOneUnsecuredFirstCycleMinTerm": "Level One Unsecured Minimum Loan Term", + "label.heading.levelOneUnsecuredFirstCycleMaxTerm": "Level One Unsecured Maximum Loan Term", "#Anchors": "..", "label.anchor.products": "Products", "label.anchor.charges": "Charges", @@ -3144,6 +3411,12 @@ "label.anchor.createcampaign": "Create Campaign", "label.anchor.bulkimport": "Bulk import", "#Inputs": "..", + "label.input.foodexpensesamount": "Food Expenses Amount", + "label.input.schoolexpensesamount": "School Expenses Amount", + "label.input.rentexpensesamount": "Rent Expenses Amount", + "label.input.utilitiesexpensesamount": "Utilities Expenses Amount", + "label.input.otherexpenses": "Other Expenses", + "label.input.otherexpensesamount": "Other Expenses Amount", "label.input.selectproduct": "Select product", "label.input.allowedproducts": "Allowed products", "label.input.restrictedproducts": "Restricted products", @@ -3153,6 +3426,8 @@ "label.input.startdate": "Start date", "label.input.enddate": "End date", "label.input.closedate": "Close date", + "label.input.productType": "Product Type", + "label.input.productCategory": "Product Category", "label.input.includeinborrowerloancounter": "Include in customer loan counter", "label.input.decimalplace": "Decimal places", "label.input.principal": "Principal", @@ -3175,8 +3450,12 @@ "label.input.islinedtofloatinginterestrates": "Is Linked to Floating Interest Rates?", "label.input.isfloatingcalculationallowed": "Is Floating Calculation Allowed??", "label.input.isvariableinstallmentsallowed": "Is Variable Installments Allowed?", + "label.input.isBnplLoanProduct": "Is BNPL Loan Product?", + "label.input.requiresEquityContribution": "Require Equity Contribution?", + "label.input.equityContributionLoanPercentage": "Equity Contribution as Loan Percentage", "label.input.variableinstallments": "Variable Installments", "label.input.canUseForTopup": "Is allowed to be used for providing Topup Loans?", + "label.input.loanTermIncludesToppedUpLoanTerm": "Loan term includes topped up loan term ?", "label.input.minimumgap": "Minimum gap between Installments", "label.input.maximumgap": "Maximum gap between Installments", "label.input.minimuminstallmentamount": "Minimum Installment Amount", @@ -3186,6 +3465,8 @@ "label.input.interestcalculationperiod": "Interest calculation period", "label.input.allowpartialperiodinterestcalcualtion": "Calculate interest for exact days in partial period", "label.input.arearstolerance": "Arrears tolerance", + "label.input.numberOfRepaymentsToCarryForward": "Number of repayments to TopUp", + "label.input.loanTermToTopUp": "Loan Term To TopUp", "label.input.repaymentstrategy": "Repayment strategy", "label.input.grace": "Moratorium", "label.input.onprincipalpayment": "On principal payment", @@ -3210,6 +3491,8 @@ "label.input.loseswrittenoff": "Losses written off", "label.input.overpaymentliability": "Over payment liability", "label.input.chargesappliesto": "Charges applies to", + "label.input.maxoccurrence": "Max Occurrence", + "label.heading.maxoccurrence": "Max Occurrence", "label.input.ispenalty": "Is penalty?", "label.input.multiplesof": "Multiples of", "label.input.savingreference": "Saving reference", @@ -3222,6 +3505,7 @@ "label.input.decimalplaces": "Decimal places", "label.input.applywithdrawalfeefortransfers": "Apply withdrawal fee for transfers", "label.input.savingstransfersinsuspenpense": "Savings transfers in suspense", + "label.input.interestPayableAccountId": "Interest Payable", "label.input.interestratechart.name": "Name", "label.input.interestratechart.description": "Description", "label.input.interestratechart.valid.from": "Valid From Date", @@ -3273,6 +3557,38 @@ "label.input.sharereference": "Share reference", "label.input.sharecontrol": "Share Suspense control", "label.input.equity": "Equity", + "label.input.businesstype": "Business Type", + "label.input.businesscreationdate": "Business Since", + "label.input.startingcapital": "Starting Capital", + "label.input.sourceofcapital": "Source Of Capital", + "label.input.totalemployees": "Total Employees", + "label.input.businessrevenue": "Business Revenue", + "label.input.averagemonthlyrevenue": "Average Monthly Revenue", + "label.input.bestmonth": "Best Month", + "label.input.reasonforbestmonth": "Why best month", + "label.input.worstmonth": "Worst Month", + "label.input.reasonforworstmonth": "Why worst month", + "label.input.numberofpurchase": "Purchase", + "label.input.purchasefrequency": "How often do you purchase", + "label.input.totalpurchaselastmonth": "Purchase Last Month", + "label.input.whenlastpurchase": "When last purchase", + "label.input.lastpurchaseamount": "Last Purchase Amount", + "label.input.businessassetamount": "Business Assets", + "label.input.amountatcash": "Amount In Cash", + "label.input.amountatsaving": "Amount In Savings", + "label.input.amountatinventory": "Amount In Inventory", + "label.input.fixedassetcost": "Fixed Asset Cost", + "label.input.businessassetcost": "Business Assets", + "label.input.totalintax": "Tax", + "label.input.totalintransport": "Transport", + "label.input.totalinrent": "Rent", + "label.input.totalincommunication": "Communication", + "label.input.otherexpense": "Other Expenses", + "label.input.otherexpenseamount": "Other Expense amount", + "label.input.totalutility": "Utilities", + "label.input.totalworkersalary": "Worker's salary", + "label.input.totalwage": "Wages", + "label.input.society": "Society", "#Buttons": "..", "label.button.createcharge": "Create Charge", "label.button.createloanproduct": "Create Loan Product", @@ -3289,6 +3605,9 @@ "label.button.createtaxgroup": "Create Tax Group", "label.button.initiatedividend": "Initiate Dividend", "label.button.createcampaign": "Create Campaign", + "label.button.createbusinessDetails": "Create Client Business Details", + "label.button.createloanapprovalmatrix": "Create Loan Approval Matrix", + "label.button.updateLoanapprovalmatrix": "Update Loan Approval Matrix", "#Misc Labels": "..", "label.selectproduct": "Select Product", "label.selectfund": "Select fund", @@ -3332,6 +3651,7 @@ "chargeTimeType.atmWithdrawalFee":"ATM Withdrawal Fee", "chargeTimeType.atmPurchaseFee":"ATM Purchase Fee", "chargeTimeType.tranchedisbursement": "Tranche Disbursement", + "chargeTimeType.fdaPartialLiquidationFee": "Partial Liquidation Fee", "chargeCalculationType.percent.of.amount": "% Approved Amount", "chargeCalculationType.percent.of.amount.and.interest": "% Loan Amount + Interest", "chargeCalculationType.percent.of.interest": "% Interest", @@ -3814,6 +4134,7 @@ "label.input.overdraftfee": "Overdraft Fee", "label.input.overdraftlimit": "Maximum Overdraft Amount Limit", "label.input.nominalannualinterestrateoverdraft": "Nominal annual interest for overdraft", + "label.input.postoverdraftinterestondeposit": "Collect Overdraft Interest On Deposit", "label.input.lienallowed": "Is Lien Allowed", "label.input.maxallowedlienlimit":"Maximum Lien Amount Limit", "label.input.minoverdraftforinterestcalculation": "Min Overdraft Required For Interest Calculation", @@ -3901,7 +4222,7 @@ "label.input.no.of.overdue.days.to.change.loan.into.npa": "Maximum number of days a loan may be overdue before becoming a NPA (non performing asset)", "label.heading.overduedaysfornpa": "overdue Days For NPA", "error.msg.loan.disburse.to.savings.requires.linked.account": "Requires linked saving account to disburse loan", - "label.input.trasfertosavings": "Trasfer Interest to Linked Savings Account", + "label.input.trasfertosavings": "Transfer Interest to Linked Savings Account", "validation.msg.fixeddepositaccount.linkAccountId.cannot.be.blank": "Linked savings account is required", "label.anchor.officeglaccount": "Office GL Account", "label.anchor.office": "Offices", @@ -3974,6 +4295,8 @@ "deposutAccountOnHoldTransactionType.hold": "Hold", "deposutAccountOnHoldTransactionType.release": "Release", "label.heading.transactionType": "Transaction Type", + "label.heading.transactorName": "Transactor Name", + "label.heading.transactorPhoneNumber": "Transactor Mobile", "label.heading.transactionDate": "Transaction Date", "validation.msg.code.value.description.exceeds.max.length": "Description cannot be over {{params[0].value}} characters long..", "#------------------": "------------", @@ -4082,6 +4405,7 @@ "label.input.iscashpayment": "Is Cash Payment?", "label.anchor.editpaymenttype": "Edit Payment Type", "label.externalServices": "External Services Configuration", + "label.loanApprovalMatrix": "This setting enhances the Loan Decision Engine at Investment Committee (IC) Review Stage", "label.input.country": "Country", "label.input.creditbureauId": "Credit Bureau Id", "label.input.creditbureau": "Credit Bureau Name", @@ -4104,6 +4428,8 @@ "label.input.division": "Division", "label.input.township": "Township", "label.input.wardvillage": "Ward Village", + "label.input.vaultTargetDate": "Vault Target Date", + "label.input.vaultTargetAmount": "Vault Target Amount", "label.menu.selectnationalId": "Select NationalId", "label.S3.description": "S3 Amazon Service Configuration", "label.SMTP.description": "Email Service Configuration", @@ -4265,6 +4591,11 @@ "error.msg.non.empty.datatable.cannot.be.deleted": "non empty datatable can not be deleted.", "error.msg.non.empty.datatable.column.cannot.be.deleted": "non empty datatable columns can not be deleted.", "error.msg.non.empty.datatable.mandatory.column.cannot.be.added": "non empty datatable mandatory columns can not be added.", + "error.msg.loan.account.should.extend.decision.engine.to.review.Loan.application": "Loan Account is not permitted for Approval since new workflow [Add-More-Stages-To-A-Loan-Life-Cycle] is activated and next status is [Review Application]", + "error.msg.invalid.loan.type.not.supported.for.Ic.Review": "This Loan Type [ GLIM ] , is not supported for IC Review Operations .", + "error.msg.glim.loan.cannot.be.approved.directly": "GLIM Loan cannot be approved directly. Please approve the GLIM Account associated to this loan", + "error.msg.loan.account.should.extend.decision.engine.to.review.Loan.application.to.be.disbursed": "Loan Account is not permitted for Disbursement since new workflow [Add-More-Stages-To-A-Loan-Life-Cycle] is activated and next stage is [Review Application]", + "error.msg.glim.loan.cannot.be.disbursed.directly": "GLIM Loan cannot be disbursed directly. Please Disburse the GLIM Account associated to this loan", "label.heading.depositaccounttype": "Deposit Account Type", "label.input.activationcharge": "Activation Charge", " # teller management localization": "---", @@ -4386,6 +4717,8 @@ "label.input.new.emi" : "New EMI", "label.input.emi.change.upto" : "EMI change End Date", "label.input.changeEMI" : "Change EMI", + "label.input.changePrincipalAmount" : "Change Fixed Principal Amount", + "label.input.fixedPrincipalAmount" : "Fixed Principal Amount", "label.input.installment.date" : "Installment Date", "error.msg.user.self.service.user.already.exist" : "Self Service User ID is already created. Go to Admin -> Users to edit or delete the self-service user.", @@ -4414,6 +4747,212 @@ "label.tooltip.fixed.pricipal.percentage.per.installment" : "Principal portion of the instalments except the last installment will be fixed to this value.", "label.input.change.fixed.principal.percentage.per.installment" : "Change Fixed Principal % per instalment", "label.input.new.fixed.principal.percentage.per.installment" : "New Fixed Principal % per instalment", + "label.input.businessowners":"Business Owners", + "label.button.addBusinessOwners": "Add BusinessOwners", + "label.input.businessOwnerNumber" : "Number", + "label.input.bvn": "BVN", + "label.input.nin": "NIN", + "label.input.streetNumberAndName":"Street Number and Name", + "label.input.address1": "Address1", + "label.input.address2": "Address2", + "label.input.address3": "Address3", + "label.input.landmark": "Landmark", + "label.input.postalCode": "Postal Code", + "label.heading.businessOwners": "Business Owners", + "label.heading.selectOwnerSelfi": "Select Owner Selfi", + "label.input.userselfi":"User Selfi", + "label.button.uploaduserselfi": "Upload User Selfi", + "label.input.employmentInfo":"Employment Info", + "label.button.addEmploymentInfo": "Add EmploymentInfo", + "label.heading.employmentInfo": "Employment Info", + "label.input.employerName": "Employer Name", + "label.input.businessName": "Business Name", + "label.input.nameOfSchool": "Name Of School", + "label.input.monthlyIncome": "Monthly Income", + "label.input.employmentStatus": "Employment Status", + "label.menu.employmentStatus": "Select Employment status", + "label.menu.city": "Select City", + "label.menu.lga": "Select Lga", + "label.input.businessOwnerId": "Business Owner ID", + "label.heading.uploadvalidid": "Upload Valid Id", + "label.input.uploadProofOfAddress" : "Upload Proof Of Address", + "label.button.uploadProofOfAddress": "Upload Proof Of Address", + "label.button.uploadOwnerId": "Upload Owner Id", + "label.button.holdAmount": "Hold Amount", + "label.heading.holdamountsavingaccount": "Hold Amount Saving Account", + "label.button.releaseamount": "Release Amount", + "label.input.reasonForBlock" : "Reason For Block", + "label.button.blockDebit": "Block Debit", + "label.button.unblockDebit": "Unblock Debit", + "label.button.blockCredit": "Block Credit", + "label.button.unblockCredit": "Unblock Credit", + "label.button.freeze": "Freeze", + "label.button.unlock": "Unlock Account", + "label.button.nextWithdrawalDate": "Next Withdrawal Date", + "label.blockNarration.select": "Select Block or Unblock Narration", + "label.input.pndComment": "Comment", + "label.input.numberOfCreditTransactions" : "Number of Credit transactions", + "label.input.numberOfDebitTransactions" : "Number of Debit transactions", + "label.tooltip.numberOfCreditTransactions": "Number of credit transaction should be made on savings account to qualify for interest posting", + "label.tooltip.numberOfDebitTransactions": "Number of debit transaction should be made on savings account to qualify for interest posting", + "label.input.isInterestPostingConfigUpdate": "Update NewValues To Old SavingsAccount ", + "label.tooltip.isInterestPostingConfigUpdate" : "If That will true new values of number for credit transaction and debit transaction and balance required for interest calculation will set in old savings account" , + "label.heading.isInterestPostingConfigUpdate": "Update NewValues To Old SavingsAccount ", + "label.heading.numberOfCreditTransactions" : "Number of Credit transactions", + "label.heading.numberOfDebitTransactions" : "Number of Debit transactions", + "chargeTimeType.disburseToSavings": "Disburse To Savings", + + "label.heading.linkedaccnum": "Linked Account Number", + "label.button.partiallyLiquidate": "Partially Liquidate", + "label.button.partialliquidation": "Partial Liquidation", + "label.button.topUp": "Fixed Deposit Top Up", + "label.button.liquidationdate": "Liquidation Date", + "label.button.liquidationamount": "Amount to liquidate", + "label.button.balanceafterliquidation": "Balance after liquidation", + "label.button.remainingtenure": "Remaining Tenure", + "label.button.changetenure": "Change Tenure", + "label.button.topupamount": "Top Up Amount", + "label.button.newdepositamount": "New Deposit Amount", + "label.input.lga": "LGA", + "label.input.isusdproduct" : "Requires Forex Setup", + "label.tooltip.isusdproduct": "An boolean flag for check this product is usd product", + "label.totalinterestpayable": "Total Interest Payable", + "label.totalinterestaccrued": "Total Interest Accrued", + "label.accruedinterestcarriedfored": "Interest Accrued (carried forward)", + "validation.msg.fixeddepositaccount.liquidationAmount.is.less.than.min": "Liquidation amount must not be less than the minimum value 1", + "validation.msg.fixeddepositaccount.deposit.period.not.between.min.and.max.deposit.term": "Deposit period not between allowed min and max deposit term", + "validation.msg.fixeddepositaccount.liquidationAmount.liquidation.amount.must.be.less.than.maturity.amount": "Amount to liquidate must be less than maturity amount", + "label.button.postAccrualInterest": "Post Accrual Interest", + "label.input.varyamounts": "Vary Fees", + "label.heading.liquidationfeechart": "Liquidation Fee Chart", + "label.heading.liquidation.number": "Liquidation Number", + "label.heading.liquidation.fee.amount": "Fee Amount", + "label.tooltip.liquidation.feechart": "Variations of liquidation number and fee that should be applied on that number.", + "label.input.liquidation.allow": "Allow partial liquidation", + "label.input.liquidation.maximum": "Number of liquidations allowed", + "validation.msg.fixeddepositaccount.partial.liquidation.limit.exceeded": "Total number of allowed 'partial liquidation' has been exceeded", + "chargeTimeType.interestForfeited": "Interest Forfeited", + "label.checkbox.allowFreeWithdrawal": "Allow Free Withdrawals", + "error.msg.deposit.period.is.please.select.charge.which.have.no.free.withdrawal": "Deposit Period select `{{params[0].value}}` So please select charge with no of free withdrawals allowed for that", + "label.button.generatexls" : "Generate Excel", + "label.totalinteresttobeearned": "Interest to be Earned", + "label.input.allowManuallyEnterInterestRate": "Allow Manually Enter Interest Rate", + "label.tooltip.allowManuallyEnterInterestRate": "An boolean flag for allow user to enter manual interest rate on account creation", + "label.input.maxNumberOfLoanExtensionsAllowed": "Max Number Of Loan Extensions Allowed", + "maximum.number.of.loan.extensions.exceeded": "Maximum Number Of Loan Extensions Exceeded", + "label.input.isAccountLevelArrearsToleranceEnable":"Account Level Arrears Tolerance Enable", + "label.tooltip.loanproduct.isAccountLevelArrearsToleranceEnable": "An boolean flag for allow user to set arrears tolerance value on specific loan account", + "validation.msg.rescheduleloan.totalExtensions.maximum.number.of.loan.extensions.exceeded": "Maximum number of loan extensions exceeded", + "label.tooltip.interestforexactdaysinperiod":"When enabled and payments adjustment type is Reduce EMI amount, the interest calculated when there is an advance payment will only be for the days that have actually had interest accrue", + "label.input.interestforexactdaysinperiod": "Calculate interest for exact days in period", + "label.input.usefloatinginterestrate": "Use floating Interest Rate", + "label.heading.floatinginterestrate.valid.fromDate": "From Date", + "label.heading.floatinginterestrate.valid.endDate": "End Date", + "label.heading.floatinginterestrate.floatingInterestRate": "Floating Interest Rate", + "label.anchor.floatinginterestratevieweditdelete": "Add/Update/Edit Floating Interest Reate", + "label.label.addfloatinginterestrate": "Add Floating Interest Rate", + "label.input.businessname": "Business Name", + "label.heading.mnemonics": "Mnemonics", + "label.heading.initials": "Initials", + "label.input.altMobileNo": "Fixed Phone", + "label.input.businessregistered": "Business Registered", + "label.menu.businessRegistered": "Select Yes or No Option", + "label.menu.title": "Select Title Option", + "label.menu.maritalstatus": "Select Marital Status", + "label.input.ageinbusiness": "Age in Business", + "label.input.pep": "Is PEP", + "label.menu.pep" : "Select PEP| Yes or No", + "label.heading.guarantee.gender": "Gender", + "label.heading.guarantee.email": "Email", + "label.heading.guarantee.bvn": "BVN", + "label.heading.guarantee.pep": "Politically Exposed Person", + "label.heading.middlename": "Middle Name", + "label.heading.recurringDocuments": "Recurring Documents", + "validation.msg.client.dailyWithdrawLimit.maximum.dailyWithDraw.limit.cannot.exceed.global.limit": "Maximum dailyWithDraw limit cannot exceed global validation limit", + "validation.msg.client.singleWithdrawLimit.maximum.singleWithDraw.limit.cannot.exceed.global.limit": "Maximum SingleWithdraw limit cannot exceed global validation limit", + "task.status.pending": "PENDING", + "task.status.blocked": "BLOCKED", + "task.status.progress": "IN PROGRESS", + "task.status.completed": "COMPLETED", + "label.button.clientOtherInfo": "Other client info", + "label.heading.clientOtherInfo": "Add Other Info", + "label.input.strata": "Strata", + "label.input.nationality": "Nationality", + "label.input.numberOfChildren": "Number of children", + "label.input.numberOfDependent": "Number of dependents", + "label.input.yearArrivedInHostCountry": "Year arrived in host country", + "label.heading.strata": "Strata", + "label.heading.nationality": "Nationality", + "label.heading.numberOfChildren": "Number of children", + "label.heading.numberOfDependent": "Number of dependents", + "label.heading.yearArrivedInHostCountry": "Year arrived in host country", + "label.anchor.editClientOtherInfo": "Edit Client other info", + "label.anchor.clientOtherInfo": "Client other info", + "label.heading.editClientOtherInfo": "Edit Client other info", + "label.button.clientOtherInfoCompany" : "Company other client info", + "label.input.businessLocation": "Business Location", + "label.input.taxIdentificationNumber": "Tax Identification Number", + "label.input.coSignorsName": "Co-Signors Name", + "label.input.guarantor": "Guarantor", + "label.input.incomeGeneratingActivity": "Income Generating Activity", + "label.input.incomeGeneratingActivityMonthlyAmount": "Income Generating Activity Monthly Amount", + "label.input.telephoneNo": "Telephone No", + "error.msg.enable.client.other.info": "Please enable client other info config to proceed operation", + "error.msg.totalTransactionAmount.is.required": "Field [Total Transaction Amount] is required", + "error.msg.derivedTotalTransactionAmount.is.required": "Field [Derived Total Transaction Amount] is required", + "error.msg.transactionAmount.not.equal.to.derivedTransactionAmount": "Field [Transaction Amount] is not equal to [Derived Transaction Amount]", + "label.heading.businessLocation": "Business Location", + "label.heading.taxIdentificationNumber": "Tax Identification Number", + "label.heading.coSignorsName": "Co-Signors Name", + "label.heading.guarantor": "Guarantor", + "label.heading.incomeGeneratingActivity": "Income Generating Activity", + "label.heading.incomeGeneratingActivityMonthlyAmount": "Income Generating Activity Monthly Amount", + "label.heading.telephoneNo": "Telephone No", + "label.anchor.editClientOtherInfoCompany": "Edit Company other client info", + "label.heading.editCompanyClientOtherInfo": "Edit Company Client other info", + "label.anchor.clientRecruitmentSurvey": "Client Recruitment Survey", + "label.heading.addClientRecruitmentSurvey": "Add Client Recruitment Survey", + "label.input.country" : "Country", + "label.input.cohort": "Cohort", + "label.input.program": "Program", + "label.input.surveyName": "Survey Name", + "label.input.surveyLocation": "Survey Location", + "label.input.startDate": "Start Date", + "label.input.endDate": "End Date", + "label.button.clientRecruitmentSurvey": "Client Recruitment Survey", + "label.heading.clientRecruitmentSurvey": "Client Recruitment Survey", + "label.heading.country": "Country", + "label.heading.cohort": "Cohort", + "label.heading.program": "Program", + "label.heading.surveyName": "Survey Name", + "label.heading.surveyLocation": "Survey Location", + "label.heading.startDate": "Start Date", + "label.heading.endDate": "End Date", + "label.anchor.editClientRecruitmentSurvey": "Edit Client Recruitment Survey", + "label.heading.editClientRecruitmentSurvey": "Edit Client Recruitment Survey", + "label.anchor.collateralreview": "Collateral Review", + "label.input.additionalDetails": "Additional Details", + "label.button.additionalDetails": "Additional Details", + "label.input.upiNo": "UPI No", + "label.input.chassisNo": "Chassis No", + "label.input.collateralOwnerFirst": "Collateral Owner First", + "label.input.idNoOfCollateralOwnerFirst": "First Owner Id", + "label.input.collateralOwnerSecond": "Collateral Owner Second", + "label.input.idNoOfCollateralOwnerSecond": "Second Owner Id", + "label.input.worthOfCollateral": "Worth of Collateral", + "label.heading.province": "Province", + "label.heading.district": "District", + "label.heading.sector": "Sector", + "label.heading.cell": "Cell", + "label.heading.village": "Village", + "label.heading.upiNo" : "UPI No", + "label.heading.chassisNo": "Chassis No", + "label.heading.collateralOwnerFirst": "Collateral Owner First", + "label.heading.idNoOfCollateralOwnerFirst": "First Owner Id", + "label.heading.collateralOwnerSecond": "Collateral Owner Second", + "label.heading.idNoOfCollateralOwnerSecond": "Second Owner Id", + "label.heading.worthOfCollateral": "Worth of Collateral", + "label.heading.taxhistory": "Tax History", "----End---": "--End of file--- " } diff --git a/app/scripts/controllers/accounting/AccountingClosureController.js b/app/scripts/controllers/accounting/AccountingClosureController.js index 21e674be..830431e1 100644 --- a/app/scripts/controllers/accounting/AccountingClosureController.js +++ b/app/scripts/controllers/accounting/AccountingClosureController.js @@ -1,6 +1,6 @@ (function (module) { mifosX.controllers = _.extend(module, { - AccountingClosureController: function (scope, resourceFactory, location, anchorScroll, translate, routeParams, dateFilter) { + AccountingClosureController: function (scope, resourceFactory, location, translate, routeParams, dateFilter,anchorScroll) { scope.first = {}; scope.formData = {}; scope.first.date = new Date(); diff --git a/app/scripts/controllers/accounttransfers/CreateStandingInstructionController.js b/app/scripts/controllers/accounttransfers/CreateStandingInstructionController.js index 687a8812..488ee7af 100755 --- a/app/scripts/controllers/accounttransfers/CreateStandingInstructionController.js +++ b/app/scripts/controllers/accounttransfers/CreateStandingInstructionController.js @@ -1,6 +1,6 @@ (function (module) { mifosX.controllers = _.extend(module, { - CreateStandingInstructionController: function (scope, resourceFactory, location, routeParams, dateFilter) { + CreateStandingInstructionController: function ($q,scope, resourceFactory, location, routeParams, dateFilter) { scope.restrictDate = new Date(); var params = {clientId: routeParams.clientId,officeId:routeParams.officeId}; var accountType = routeParams.accountType || ''; @@ -9,7 +9,6 @@ else params.fromAccountType = 0; scope.toOffices = []; - scope.toClients = []; scope.toAccountTypes = []; scope.toAccounts = []; scope.destinationOptions = [{id:1,name:'own account'},{id:2,name:'with in bank'}]; @@ -31,18 +30,47 @@ scope.standinginstruction = data; scope.toOffices = data.toOfficeOptions; scope.toAccountTypes = data.toAccountTypeOptions; - scope.toClients = data.toClientOptions; scope.toAccounts = data.toAccountOptions; scope.formData.transferAmount = data.transferAmount; }); }; + scope.toAccountTypeChange = function () { + var fields; + if(scope.formData.toAccountType && scope.formData.toAccountType == 2){ + fields = 'savingsaccounts'; + }else if(scope.formData.toAccountType && scope.formData.toAccountType == 1){ + fields = 'glimaccounts,guarantorloanaccounts' + } + + if(fields && scope.formData.toClientId){ + scope.getToAccounts(scope.formData.toClientId,fields).then(function(data){ + scope.toAccounts = []; + if(data.savingsAccounts){ + scope.toAccounts = data.savingsAccounts; + } + if(data.glimAccounts){ + scope.toAccounts = data.glimAccounts; + } + + if(data.loanAccounts){ + scope.toAccounts.push(data.loanAccounts); + } + }); + } + + } + + scope.changeClient = function (client) { + scope.formData.toClientId = client.id; + scope.toAccountTypeChange(); + }; + scope.changedestination = function () { if(scope.destination == 1){ scope.allowclientedit = 'false'; scope.formData.toOfficeId = scope.formData.fromOfficeId; scope.formData.toClientId = scope.formData.fromClientId; - console.log(scope.formData); scope.changeEvent(); }else{ scope.allowclientedit = 'true'; @@ -51,6 +79,23 @@ } } + scope.toClientOptions=function(value){ + var deferred=$q.defer(); + resourceFactory.clientResource.getAllClients({limit:10,status: 'active', displayName:value, orderBy: 'displayName', officeId: + scope.formData.officeId,sortOrder: 'ASC'},function (data) { + deferred.resolve(data.pageItems); + }); + return deferred.promise; + } + + scope.getToAccounts=function(clientId,fields){ + var deferred=$q.defer(); + resourceFactory.clientAccountResource.getAllAccounts({clientId: clientId, fields: fields},function (data) { + deferred.resolve(data); + }); + return deferred.promise; + } + scope.submit = function () { this.formData.locale = scope.optlang.code; this.formData.dateFormat = scope.df; @@ -69,7 +114,7 @@ }; } }); - mifosX.ng.application.controller('CreateStandingInstructionController', ['$scope', 'ResourceFactory', '$location', '$routeParams', 'dateFilter', mifosX.controllers.CreateStandingInstructionController]).run(function ($log) { + mifosX.ng.application.controller('CreateStandingInstructionController', ['$q','$scope', 'ResourceFactory', '$location', '$routeParams', 'dateFilter', mifosX.controllers.CreateStandingInstructionController]).run(function ($log) { $log.info("CreateStandingInstructionController initialized"); }); }(mifosX.controllers || {})); \ No newline at end of file diff --git a/app/scripts/controllers/accounttransfers/MakeAccountTransferController.js b/app/scripts/controllers/accounttransfers/MakeAccountTransferController.js index 2086e90c..214f70b2 100644 --- a/app/scripts/controllers/accounttransfers/MakeAccountTransferController.js +++ b/app/scripts/controllers/accounttransfers/MakeAccountTransferController.js @@ -1,6 +1,6 @@ (function (module) { mifosX.controllers = _.extend(module, { - MakeAccountTransferController: function (scope, resourceFactory, location, routeParams, dateFilter) { + MakeAccountTransferController: function ($q,scope, resourceFactory, location, routeParams, dateFilter) { scope.restrictDate = new Date(); var params = {fromAccountId: routeParams.accountId}; var accountType = routeParams.accountType || ''; @@ -41,12 +41,21 @@ scope.transfer = data; scope.toOffices = data.toOfficeOptions; scope.toAccountTypes = data.toAccountTypeOptions; - scope.toClients = data.toClientOptions; + // scope.toClients = data.toClientOptions; scope.toAccounts = data.toAccountOptions; scope.formData.transferAmount = data.transferAmount; }); }; + scope.toClientOptions = function(value){ + var deferred = $q.defer(); + resourceFactory.clientResource.getAllClients({limit:10,status:'active', displayName: value, orderBy : 'displayName', officeId : this.formData.fromOfficeId, + sortOrder : 'ASC', orphansOnly : true}, function (data) { + deferred.resolve(data.pageItems); + }); + return deferred.promise; + }; + scope.submit = function () { this.formData.locale = scope.optlang.code; this.formData.dateFormat = scope.df; @@ -63,7 +72,7 @@ }; } }); - mifosX.ng.application.controller('MakeAccountTransferController', ['$scope', 'ResourceFactory', '$location', '$routeParams', 'dateFilter', mifosX.controllers.MakeAccountTransferController]).run(function ($log) { + mifosX.ng.application.controller('MakeAccountTransferController', ['$q','$scope', 'ResourceFactory', '$location', '$routeParams', 'dateFilter', mifosX.controllers.MakeAccountTransferController]).run(function ($log) { $log.info("MakeAccountTransferController initialized"); }); }(mifosX.controllers || {})); \ No newline at end of file diff --git a/app/scripts/controllers/client/AddBusinessOwnersController.js b/app/scripts/controllers/client/AddBusinessOwnersController.js new file mode 100644 index 00000000..9c53ff00 --- /dev/null +++ b/app/scripts/controllers/client/AddBusinessOwnersController.js @@ -0,0 +1,61 @@ +/** + * Created by nikpa on 26-06-2017. + */ + +(function (module) { + mifosX.controllers = _.extend(module, { + AddBusinessOwnersController: function (scope, resourceFactory, routeParams,dateFilter, location) { + + scope.formData={}; + scope.date = {}; + scope.countryOptions=[]; + scope.stateOptions=[]; + scope.cityOptions=[]; + scope.titleOptions=[]; + scope.typeIdOptions=[]; + clientId=routeParams.clientId; + businessOwnerId=routeParams.businessOwnerId; + + resourceFactory.businessOwnersTemplate.get({clientId:clientId},function(data) + { + scope.stateOptions=data.stateProvinceIdOptions; + scope.countryOptions=data.countryIdOptions; + scope.cityOptions=data.cityIdOptions; + scope.titleOptions=data.titleIdOptions; + scope.typeOptions=data.typeIdOptions; + }); + + scope.routeTo=function() + { + location.path('/viewclient/'+clientId); + } + + scope.addClientBusinessOwner=function() + { + + + this.formData.locale = scope.optlang.code; + this.formData.dateFormat = scope.df; + + if(scope.date.dateOfBirth){ + this.formData.dateOfBirth = dateFilter(scope.date.dateOfBirth, scope.df); + } + resourceFactory.businessOwners.post({clientId:clientId},scope.formData,function(data) + { + + location.path('/viewclient/'+clientId); + + + }) + } + + } + + + }); + mifosX.ng.application.controller('AddBusinessOwnersController', ['$scope','ResourceFactory', '$routeParams','dateFilter', '$location', mifosX.controllers.AddBusinessOwnersController]).run(function ($log) { + $log.info("AddBusinessOwnersController initialized"); + }); + +} +(mifosX.controllers || {})); diff --git a/app/scripts/controllers/client/AddClientBusinessDetailController.js b/app/scripts/controllers/client/AddClientBusinessDetailController.js new file mode 100755 index 00000000..71341bf4 --- /dev/null +++ b/app/scripts/controllers/client/AddClientBusinessDetailController.js @@ -0,0 +1,74 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + AddClientBusinessDetailController: function (scope, resourceFactory, location, dateFilter,WizardHandler, translate,routeParams) { + scope.formData = {}; + scope.showOrHideValue = "show"; + scope.first = {}; + scope.first.businessCreationDate = new Date(); + scope.clientId = routeParams.clientId; + scope.businessDetails = {}; + + + resourceFactory.clientBusinessDetailTemplate.get({clientId:scope.clientId},function (data) { + scope.clientbusinessDetails = data; + scope.businessTypeOptions = data.businessType; + scope.sourceOfCapitalOptions = data.sourceOfCapital; + scope.bestMonthOptions = data.bestMonth; + scope.worstMonthOptions = data.worstMonth; + scope.whenLastPurchaseOptions = data.worstMonth; + + if (data.clientAccount) { + scope.clientName = data.clientAccount.displayName; + } + if (scope.first.businessCreationDate) { + this.formData.businessCreationDate = dateFilter(scope.first.businessCreationDate, scope.df); + } + scope.businessDetails = angular.copy(scope.formData); + scope.isClicked = false; + + + + }); + + scope.$watch('formData',function(newVal){ + scope.businessDetails = angular.extend(scope.businessDetails,newVal); + },true); + + scope.formValue = function(array,model,findattr,retAttr){ + findattr = findattr ? findattr : 'id'; + retAttr = retAttr ? retAttr : 'value'; + console.log(findattr,retAttr,model); + return _.find(array, function (obj) { + return obj[findattr] === model; + })[retAttr]; + }; + + scope.goNext = function(form){ + WizardHandler.wizard().checkValid(form); + scope.isClicked = true; + } + + scope.cancel = function () { + location.path('/addbusinessdetail/'+scope.clientId); + }; + + + scope.submit = function () { + this.formData.locale = scope.optlang.code; + this.formData.dateFormat = scope.df; + + if (scope.first.businessCreationDate) { + this.formData.businessCreationDate = dateFilter(scope.first.businessCreationDate, scope.df); + } + resourceFactory.clientBusinessDetailResource.save({clientId:scope.clientId},this.formData, function (data) { + location.path('/viewclient/'+scope.clientId); + }); + }; + + + } + }); + mifosX.ng.application.controller('AddClientBusinessDetailController', ['$scope', 'ResourceFactory', '$location', 'dateFilter','WizardHandler', '$translate','$routeParams', mifosX.controllers.AddClientBusinessDetailController]).run(function ($log) { + $log.info("AddClientBusinessDetailController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/client/AddEmploymentInfoController.js b/app/scripts/controllers/client/AddEmploymentInfoController.js new file mode 100644 index 00000000..add4ebfd --- /dev/null +++ b/app/scripts/controllers/client/AddEmploymentInfoController.js @@ -0,0 +1,84 @@ +/** + * Created by nikpa on 26-06-2017. + */ + +(function (module) { + mifosX.controllers = _.extend(module, { + AddEmploymentInfoController: function (scope, resourceFactory, routeParams,dateFilter, location) { + + scope.formData={}; + scope.date = {}; + scope.countryOptions=[]; + scope.stateOptions=[]; + scope.lgaOptions=[]; + scope.cityOptions=[]; + scope.employmentStatusOptions=[]; + clientId=routeParams.clientId; + + resourceFactory.employmentInfoTemplate.get({clientId:clientId},function(data) + { + scope.stateOptions=data.stateProvinceIdOptions; + scope.countryOptions=data.countryIdOptions; + scope.lgaOptions=data.lgaIdOptions; + scope.cityOptions=data.cityIdOptions; + scope.employmentStatusOptions=data.employmentStatusOptions; + scope.bankOptions = data.bankOptions; + scope.industryOptions = data.industryOptions; + + }); + + scope.routeTo=function() + { + location.path('/viewclient/'+clientId); + } + + scope.displayFields = function (employmentStatus) { + console.log(employmentStatus); + if(employmentStatus.name == 'Currently in a job') { + scope.showJobOption = true; + scope.showBusinessOption = false; + scope.showStudentOptions = false; + scope.showJobSearching = false; + }else if(employmentStatus.name == 'Self-employed') { + scope.showBusinessOption = true; + scope.showJobOption = false; + scope.showStudentOptions = false; + scope.showJobSearching = false; + } + else if(employmentStatus.name == 'Student') { + scope.showStudentOptions = true; + scope.showBusinessOption = false; + scope.showJobOption = false; + scope.showJobSearching = false; + } + else if(employmentStatus.name == 'Job searching') { + scope.showJobSearching = true; + scope.showBusinessOption = false; + scope.showJobOption = false; + scope.showStudentOptions = false; + } + }; + + scope.addClientEmploymentInfo=function() + { + this.formData.locale = scope.optlang.code; + this.formData.dateFormat = scope.df; + this.formData.employmentStatusId = scope.formData.employmentStatus.id; + delete this.formData.employmentStatus; + + resourceFactory.employmentInformation.post({clientId:clientId},scope.formData,function(data) + { + location.path('/viewclient/'+clientId); + }) + } + + } + + + }); + mifosX.ng.application.controller('AddEmploymentInfoController', ['$scope','ResourceFactory', '$routeParams','dateFilter', '$location', mifosX.controllers.AddEmploymentInfoController]).run(function ($log) { + $log.info("AddEmploymentInfoController initialized"); + }); + +} +(mifosX.controllers || {})); diff --git a/app/scripts/controllers/client/AddExpensesController.js b/app/scripts/controllers/client/AddExpensesController.js new file mode 100644 index 00000000..2963c48c --- /dev/null +++ b/app/scripts/controllers/client/AddExpensesController.js @@ -0,0 +1,54 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + AddExpensesController: function ($scope, resourceFactory, routeParams, location) { + + $scope.formData={}; + $scope.expenses=[]; + $scope.expensesAddedDataArray = []; + $scope.otherExpensesList = []; + $scope.otherExpensesData = {}; + $scope.editable=false; + clientId=routeParams.clientId; + + resourceFactory.clientExpensesTemplateResource.getOtherExpenses({clientId: clientId}, function(data) { + $scope.expenses=data.otherExpenses; + + }); + + + $scope.routeTo=function() + { + location.path('/viewclient/'+clientId); + } + + $scope.addOtherExpenses = function () { + let addedExpense= $scope.expensesAddedDataArray.find((expense) => $scope.otherExpensesData.otherExpensesId == expense.otherExpensesId) + if(!addedExpense && $scope.otherExpensesData.otherExpensesId && $scope.otherExpensesData.amount){ + var description=$scope.expenses.filter((expense) => $scope.otherExpensesData.otherExpensesId == expense.id)[0].name; + $scope.otherExpensesList.push({otherExpensesId: $scope.otherExpensesData.otherExpensesId, description: description, amount: $scope.otherExpensesData.amount}); + $scope.expensesAddedDataArray.push({otherExpensesId: $scope.otherExpensesData.otherExpensesId, otherExpensesAmount: $scope.otherExpensesData.amount}); + } + }; + + $scope.deleteOtherExpenses = function (index) { + $scope.otherExpensesId = $scope.otherExpensesList[index].otherExpensesId; + $scope.expensesAddedDataArray = $scope.expensesAddedDataArray.filter((expense) => expense.otherExpensesId != $scope.otherExpensesId); + $scope.otherExpensesList.splice(index, 1); + }; + + $scope.save = function () { + $scope.formData.otherExpensesList=$scope.expensesAddedDataArray + resourceFactory.clientExpensesResource.save({clientId: clientId},$scope.formData,function (data) { + location.path('/viewclient/'+clientId); + }); + }; + } + + + }); + mifosX.ng.application.controller('AddExpensesController', ['$scope','ResourceFactory', '$routeParams', '$location', mifosX.controllers.AddExpensesController]).run(function ($log) { + $log.info("AddExpensesController initialized"); + }); + +} +(mifosX.controllers || {})); diff --git a/app/scripts/controllers/client/AddFamilyMembersController.js b/app/scripts/controllers/client/AddFamilyMembersController.js index 14b9a5d3..1273d85d 100644 --- a/app/scripts/controllers/client/AddFamilyMembersController.js +++ b/app/scripts/controllers/client/AddFamilyMembersController.js @@ -17,6 +17,11 @@ scope.genderIdOptions=data.genderIdOptions; scope.maritalStatusIdOptions=data.maritalStatusIdOptions; scope.professionIdOptions=data.professionIdOptions; + scope.countryOptions = data.countryIdOptions; + scope.stateOptions = data.stateProvinceIdOptions; + scope.cityOptions = data.cityIdOptions; + scope.addressTypes = data.addressTypeIdOptions; + }); diff --git a/app/scripts/controllers/client/BulkImportClientsController.js b/app/scripts/controllers/client/BulkImportClientsController.js index 30316984..56336623 100644 --- a/app/scripts/controllers/client/BulkImportClientsController.js +++ b/app/scripts/controllers/client/BulkImportClientsController.js @@ -58,7 +58,7 @@ if(scope.formData.legalForm=="Person"){ changedLegalForm="CLIENTS_PERSON"; }else if(scope.formData.legalForm=="Entity") { - changedLegalForm = "CLIENTS_ENTTTY"; + changedLegalForm = "CLIENTS_ENTITY"; } if (scope.first.queryParams.indexOf("legalFormType") == -1) { scope.first.queryParams = scope.first.queryParams + '&' + 'legalFormType=' + changedLegalForm; @@ -74,7 +74,7 @@ if (scope.formData.file.name.toLowerCase().indexOf("person")!=-1) { scope.formData.entityType = "CLIENTS_PERSON"; }else if (scope.formData.file.name.toLowerCase().indexOf("entity")!=-1){ - scope.formData.entityType="CLIENTS_ENTTTY"; + scope.formData.entityType="CLIENTS_ENTITY"; } }; diff --git a/app/scripts/controllers/client/BusinessOwnerDocumentController.js b/app/scripts/controllers/client/BusinessOwnerDocumentController.js new file mode 100644 index 00000000..80a5c94e --- /dev/null +++ b/app/scripts/controllers/client/BusinessOwnerDocumentController.js @@ -0,0 +1,27 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + BusinessOwnerDocumentController: function (scope, location, http, routeParams, API_VERSION, Upload, $rootScope) { + scope.ownerId = routeParams.ownerId; + scope.clientId = routeParams.clientId; + scope.onFileSelect = function (files) { + scope.formData.file = files[0]; + }; + + scope.submit = function () { + Upload.upload({ + url: $rootScope.hostUrl + API_VERSION + '/business_owners/' + scope.ownerId + '/documents', + data: { name : scope.formData.name, description : scope.formData.description, file: scope.formData.file}, + }).then(function (data) { + // to fix IE not refreshing the model + if (!scope.$$phase) { + scope.$apply(); + } + location.path('/viewclient/' + scope.clientId); + }); + }; + } + }); + mifosX.ng.application.controller('BusinessOwnerDocumentController', ['$scope', '$location', '$http', '$routeParams', 'API_VERSION', 'Upload', '$rootScope', mifosX.controllers.BusinessOwnerDocumentController]).run(function ($log) { + $log.info("BusinessOwnerDocumentController initialized"); + }); +}(mifosX.controllers || {})); \ No newline at end of file diff --git a/app/scripts/controllers/client/ClientOtherInfoController.js b/app/scripts/controllers/client/ClientOtherInfoController.js new file mode 100644 index 00000000..9396d6e3 --- /dev/null +++ b/app/scripts/controllers/client/ClientOtherInfoController.js @@ -0,0 +1,42 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + ClientOtherInfoController: function (scope, resourceFactory, routeParams, location, route) { + + scope.formData = {}; + scope.clientId = routeParams.clientId; + scope.otherInfoData = {}; + scope.exists= false; + + resourceFactory.clientOtherInfoTemplateResource.get({clientId:routeParams.clientId}, function(data){ + scope.strataOptions = data.strataOptions; + scope.nationalityOptions = data.nationalityOptions; + scope.yearArrivedInHostCountryOptions = data.yearArrivedInHostCountryOptions; + }); + + resourceFactory.clientOtherInfoResource.getAll({clientId:routeParams.clientId}, function(data){ + scope.otherInfoData = data[0]; + if(scope.otherInfoData){ + scope.exists = true; + } + + }); + + scope.cancel = function () { + location.path('/viewclient/' + scope.clientId); + }; + + scope.submit = function () { + this.formData.locale = scope.optlang.code; + this.formData.dateFormat = scope.df; + + resourceFactory.clientOtherInfoResource.save({clientId: scope.clientId}, this.formData, function (data) { + route.reload(); + }); + }; + + } + }); + mifosX.ng.application.controller('ClientOtherInfoController', ['$scope', 'ResourceFactory', '$routeParams', '$location', '$route', mifosX.controllers.ClientOtherInfoController]).run(function ($log) { + $log.info("ClientOtherInfoController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/client/ClientOtherInfoEntityController.js b/app/scripts/controllers/client/ClientOtherInfoEntityController.js new file mode 100644 index 00000000..f03a37c8 --- /dev/null +++ b/app/scripts/controllers/client/ClientOtherInfoEntityController.js @@ -0,0 +1,40 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + ClientOtherInfoEntityController: function (scope, resourceFactory, routeParams, location, route) { + + scope.formData = {}; + scope.clientId = routeParams.clientId; + scope.otherInfoData = {}; + scope.exists= false; + + resourceFactory.clientOtherInfoTemplateResource.get({clientId:routeParams.clientId}, function(data){ + scope.strataOptions = data.strataOptions; + }); + + resourceFactory.clientOtherInfoEntityResource.getAll({clientId:routeParams.clientId}, function(data){ + scope.otherInfoData = data[0]; + if(scope.otherInfoData){ + scope.exists = true; + } + + }); + + scope.cancel = function () { + location.path('/viewclient/' + scope.clientId); + }; + + scope.submit = function () { + this.formData.locale = scope.optlang.code; + this.formData.dateFormat = scope.df; + + resourceFactory.clientOtherInfoResource.save({clientId: scope.clientId}, this.formData, function (data) { + route.reload(); + }); + }; + + } + }); + mifosX.ng.application.controller('ClientOtherInfoEntityController', ['$scope', 'ResourceFactory', '$routeParams', '$location', '$route', mifosX.controllers.ClientOtherInfoEntityController]).run(function ($log) { + $log.info("ClientOtherInfoEntityController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/client/ClientRecruitmentSurveyController.js b/app/scripts/controllers/client/ClientRecruitmentSurveyController.js new file mode 100644 index 00000000..7a6c4921 --- /dev/null +++ b/app/scripts/controllers/client/ClientRecruitmentSurveyController.js @@ -0,0 +1,45 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + ClientRecruitmentSurveyController: function (scope, resourceFactory, routeParams, location, dateFilter, route) { + + scope.formData = {}; + scope.clientId = routeParams.clientId; + scope.surveyData = {}; + scope.exists= false; + + resourceFactory.clientRecruitmentSurveyTemplateResource.get({clientId:routeParams.clientId}, function(data){ + scope.countryOptions = data.countryOptions; + scope.cohortOptions = data.cohortOptions; + scope.programOptions = data.programOptions; + scope.surveyLocationOptions = data.surveyLocationOptions; + }); + + resourceFactory.recruitmentSurveyResource.getAll({clientId:routeParams.clientId}, function(data){ + scope.surveyData = data[0]; + if(scope.surveyData){ + scope.exists = true; + } + + }); + + scope.cancel = function () { + location.path('/viewclient/' + scope.clientId); + }; + + scope.submit = function () { + this.formData.locale = scope.optlang.code; + this.formData.dateFormat = scope.df; + this.formData.startDate = dateFilter(scope.formData.startDate, scope.df); + this.formData.endDate = dateFilter(scope.formData.endDate, scope.df); + + resourceFactory.clientRecruitmentSurveyResource.save({clientId: scope.clientId}, this.formData, function (data) { + route.reload(); + }); + }; + + } + }); + mifosX.ng.application.controller('ClientRecruitmentSurveyController', ['$scope', 'ResourceFactory', '$routeParams', '$location', 'dateFilter', '$route', mifosX.controllers.ClientRecruitmentSurveyController]).run(function ($log) { + $log.info("ClientRecruitmentSurveyController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/client/CreateClientCollateralController.js b/app/scripts/controllers/client/CreateClientCollateralController.js index e9e03a19..b86e0c35 100644 --- a/app/scripts/controllers/client/CreateClientCollateralController.js +++ b/app/scripts/controllers/client/CreateClientCollateralController.js @@ -8,6 +8,9 @@ scope.disable = true; scope.collateralDataRequestBody = {}; scope.collateralId; + scope.additionalCollateralDetailsEnabled = false; + scope.additionalDetailsAddOrRemove = false; + scope.additionalDetails = {}; scope.updateValues = function () { scope.formData.quantity = scope.formData.quantity * 1.0; @@ -36,6 +39,37 @@ resourceFactory.collateralResource.getAllCollaterals(function (data) { scope.collaterals = data; }); + resourceFactory.clientAdditionalCollateralTemplateResource.get({clientId: scope.clientId}, function (data) { + scope.provinceOptions = data.provinces; + scope.districtOptions = data.districts; + scope.sectorOptions = data.sectors; + scope.villageOptions = data.villages; + scope.cellOptions = data.cells; + }); + resourceFactory.configurationResourceByName.get({name:'Enable-Client-Collateral-Addition_Details'},function (data) { + scope.additionalCollateralDetailsEnabled = data.enabled; + }); + + scope.addAdditionalDetails = function () { + scope.additionalDetailsAddOrRemove = scope.additionalDetailsAddOrRemove == true ? false : true; + scope.additionalDetails = {}; + } + scope.createAdditionalDetails = function () { + if(scope.additionalDetailsAddOrRemove && scope.additionalCollateralDetailsEnabled){ + this.formData.upiNo = scope.additionalDetails.upiNo; + this.formData.chassisNo = scope.additionalDetails.chassisNo; + this.formData.collateralOwnerFirst = scope.additionalDetails.collateralOwnerFirst; + this.formData.idNoOfCollateralOwnerFirst = scope.additionalDetails.idNoOfCollateralOwnerFirst; + this.formData.collateralOwnerSecond = scope.additionalDetails.collateralOwnerSecond; + this.formData.idNoOfCollateralOwnerSecond = scope.additionalDetails.idNoOfCollateralOwnerSecond; + this.formData.worthOfCollateral = scope.additionalDetails.worthOfCollateral; + this.formData.provinceId = scope.additionalDetails.provinceId; + this.formData.districtId = scope.additionalDetails.districtId; + this.formData.sectorId = scope.additionalDetails.sectorId; + this.formData.villageId = scope.additionalDetails.villageId; + this.formData.cellId = scope.additionalDetails.cellId; + } + } scope.cancel = function () { location.path('/viewclient/' + scope.clientId); @@ -51,6 +85,7 @@ delete this.formData.unitType; delete this.formData.total; delete this.formData.totalCollateral; + scope.createAdditionalDetails(); resourceFactory.clientcollateralResource.save({clientId: scope.clientId}, this.formData, function (data) { location.path('/viewclient/' + scope.clientId + '/viewclientcollateral/' + data.resourceId); diff --git a/app/scripts/controllers/client/CreateClientController.js b/app/scripts/controllers/client/CreateClientController.js index b44b01da..f7b07499 100755 --- a/app/scripts/controllers/client/CreateClientController.js +++ b/app/scripts/controllers/client/CreateClientController.js @@ -18,6 +18,7 @@ scope.forceOffice = null; scope.showNonPersonOptions = false; scope.clientPersonId = 1; + scope.titleOptions = []; //address scope.addressTypes=[]; scope.countryOptions=[]; @@ -36,6 +37,11 @@ scope.formDat.datatables = []; scope.tf = "HH:mm"; scope.clientId = routeParams.clientId; + scope.businessOwnersArray=[]; + scope.formData.businessOwners=[]; + scope.employmentInfoArray=[]; + //Business + scope.businessRegisteredOptions = [{id: true, name: 'Yes'}, {id: false, name: 'No'}]; var requestParams = {staffInSelectedOfficeOnly:true}; if (routeParams.groupId) { @@ -44,6 +50,10 @@ if (routeParams.officeId) { requestParams.officeId = routeParams.officeId; } + + resourceFactory.validationLimitTemplateResource.get(function (data) { + scope.template = data; + }); resourceFactory.clientTemplateResource.get(requestParams, function (data) { scope.offices = data.officeOptions; scope.staffs = data.staffOptions; @@ -55,6 +65,8 @@ scope.clientNonPersonConstitutionOptions = data.clientNonPersonConstitutionOptions; scope.clientNonPersonMainBusinessLineOptions = data.clientNonPersonMainBusinessLineOptions; scope.clientLegalFormOptions = data.clientLegalFormOptions; + scope.clientLevelOptions = data.clientLevelOptions; + scope.titleOptions = data.titleOptions; scope.datatables = data.datatables; if (!_.isUndefined(scope.datatables) && scope.datatables.length > 0) { scope.noOfTabs = scope.datatables.length + 1; @@ -97,14 +109,32 @@ } } - + scope.businessOwnerEnabled=data.isBusinessOwnerEnabled; + if (scope.businessOwnerEnabled === true) { + scope.countryOptions = data.ownersData[0].countryIdOptions; + scope.stateOptions = data.ownersData[0].stateProvinceIdOptions; + scope.titleOptions = data.ownersData[0].titleIdOptions; + scope.cityOptions = data.ownersData[0].cityIdOptions; + scope.typeOptions = data.ownersData[0].typeIdOptions; + } + scope.employmentInfoEnabled=data.isEmploymentInfoEnabled; + if (scope.employmentInfoEnabled === true) { + scope.countryOptions = data.employmentInfoData[0].countryIdOptions; + scope.stateOptions = data.employmentInfoData[0].stateProvinceIdOptions; + scope.cityOptions = data.employmentInfoData[0].cityIdOptions; + scope.lgaOptions = data.employmentInfoData[0].lgaIdOptions; + scope.employmentStatusOptions = data.employmentInfoData[0].employmentStatusOptions; + scope.bankOptions = data.employmentInfoData[0].bankOptions; + scope.industryOptions = data.employmentInfoData[0].industryOptions; + } scope.enableAddress=data.isAddressEnabled; if (scope.enableAddress === true) { scope.addressTypes = data.address[0].addressTypeIdOptions; scope.countryOptions = data.address[0].countryIdOptions; scope.stateOptions = data.address[0].stateProvinceIdOptions; - + scope.lgaOptions = data.address[0].lgaIdOptions; + resourceFactory.addressFieldConfiguration.get({entity:entityname},function(data){ for(var i=0;i ({id: item.otherExpense.id, description: item.otherExpense.name, + amount: item.amount + })) + + $scope.expensesAddedDataArray=data.otherExpensesData.map(e => ({ + otherExpensesId:e.otherExpense.id,otherExpensesAmount:e.amount})) + + }); + + + + $scope.routeTo=function() + { + location.path('/viewclient/'+clientId); + } + + $scope.addOtherExpenses = function () { + let addedExpense= $scope.expensesAddedDataArray.find((expense) => $scope.otherExpensesData.otherExpensesId == expense.otherExpensesId) + if(!addedExpense && $scope.otherExpensesData.otherExpensesId && $scope.otherExpensesData.amount){ + var description=$scope.expenses.filter((expense) => $scope.otherExpensesData.otherExpensesId == expense.id)[0].name; + $scope.otherExpensesList.push({otherExpensesId: $scope.otherExpensesData.otherExpensesId, description: description, amount: $scope.otherExpensesData.amount}); + $scope.expensesAddedDataArray.push({otherExpensesId: $scope.otherExpensesData.otherExpensesId, otherExpensesAmount: $scope.otherExpensesData.amount}); + } + }; + + $scope.deleteOtherExpenses = function (index) { + $scope.otherExpensesId = $scope.otherExpensesList[index].id; + $scope.expensesAddedDataArray = $scope.expensesAddedDataArray.filter((expense) => expense.otherExpensesId != $scope.otherExpensesId); + $scope.otherExpensesList.splice(index, 1); + }; + + $scope.save = function () { + $scope.formData.otherExpensesList=$scope.expensesAddedDataArray + resourceFactory.clientExpensesResource.update({clientId: clientId,householdExpensesId:$scope.householdExpensesId},$scope.formData,function (data) { + location.path('/viewclient/'+clientId); + }); + }; + } + + + }); + mifosX.ng.application.controller('EditExpensesController', ['$scope','ResourceFactory', '$routeParams', '$location', mifosX.controllers.EditExpensesController]).run(function ($log) { + $log.info("EditExpensesController initialized"); + }); + +} +(mifosX.controllers || {})); diff --git a/app/scripts/controllers/client/EditFamilyMemberController.js b/app/scripts/controllers/client/EditFamilyMemberController.js index 2bc6659d..014c24b2 100644 --- a/app/scripts/controllers/client/EditFamilyMemberController.js +++ b/app/scripts/controllers/client/EditFamilyMemberController.js @@ -16,6 +16,10 @@ scope.genderIdOptions=data.genderIdOptions; scope.maritalStatusIdOptions=data.maritalStatusIdOptions; scope.professionIdOptions=data.professionIdOptions; + scope.countryOptions = data.countryIdOptions; + scope.stateOptions = data.stateProvinceIdOptions; + scope.cityOptions = data.cityIdOptions; + scope.addressTypes = data.addressTypeIdOptions; }); @@ -48,6 +52,11 @@ delete scope.formData.gender; delete scope.formData.profession; delete scope.formData.relationship; + delete scope.formData.stateName; + delete scope.formData.countryName; + delete scope.formData.titleName; + delete scope.formData.cityName; + delete scope.formData.addressType; this.formData.locale = scope.optlang.code; this.formData.dateFormat = scope.df; diff --git a/app/scripts/controllers/client/ViewAllClientCollateralsController.js b/app/scripts/controllers/client/ViewAllClientCollateralsController.js index 26f931fb..33be5946 100644 --- a/app/scripts/controllers/client/ViewAllClientCollateralsController.js +++ b/app/scripts/controllers/client/ViewAllClientCollateralsController.js @@ -1,3 +1,4 @@ + (function (module) { mifosX.controllers = _.extend(module, { ViewAllClientCollateralController: function (scope, resourceFactory, routeParams, location) { diff --git a/app/scripts/controllers/client/ViewClientBusinessDetailController.js b/app/scripts/controllers/client/ViewClientBusinessDetailController.js new file mode 100755 index 00000000..48604e6e --- /dev/null +++ b/app/scripts/controllers/client/ViewClientBusinessDetailController.js @@ -0,0 +1,44 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + ViewClientBusinessDetailController: function (scope, resourceFactory, location, dateFilter,translate,routeParams) { + scope.formData = {}; + scope.showOrHideValue = "show"; + scope.clientId = routeParams.clientId; + scope.businessDetailId = routeParams.businessDetailId; + scope.businessDetails = {}; + scope.isClientBusinessDetailEnabled = false; + + + resourceFactory.clientBusinessDetailTemplate.get({clientId:scope.clientId},function (data) { + scope.clientbusinessDetails = data; + scope.businessTypeOptions = data.businessType; + scope.sourceOfCapitalOptions = data.sourceOfCapital; + scope.bestMonthOptions = data.bestMonth; + scope.worstMonthOptions = data.worstMonth; + scope.whenLastPurchaseOptions = data.worstMonth; + + if (data.clientAccount) { + scope.clientName = data.clientAccount.displayName; + } + scope.isClientBusinessDetailEnabled = data.isClientBusinessDetailEnabled; + + scope.businessDetails = angular.copy(scope.formData); + }); + + resourceFactory.clientBusinessDetailResource.get({clientId:scope.clientId,businessDetailId:scope.businessDetailId},function (data) { + scope.details = data; + }); + + scope.deletebusinessDetail = function () { + resourceFactory.clientBusinessDetailResource.delete({clientId:scope.clientId,businessDetailId:scope.businessDetailId},function (data) { + location.path('/viewclient/'+scope.clientId); + }); + + }; + + } + }); + mifosX.ng.application.controller('ViewClientBusinessDetailController', ['$scope', 'ResourceFactory', '$location', 'dateFilter', '$translate','$routeParams', mifosX.controllers.ViewClientBusinessDetailController]).run(function ($log) { + $log.info("ViewClientBusinessDetailController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/client/ViewClientCollateralController.js b/app/scripts/controllers/client/ViewClientCollateralController.js index 1d30ea46..27d3b622 100644 --- a/app/scripts/controllers/client/ViewClientCollateralController.js +++ b/app/scripts/controllers/client/ViewClientCollateralController.js @@ -6,9 +6,12 @@ scope.clientId = routeParams.id; scope.collateralId = routeParams.collateralId; scope.loanTransactions = []; + scope.collateral = {}; + scope.additionalDetails = {}; resourceFactory.clientcollateralResource.get({clientId: scope.clientId, collateralParamId: scope.collateralId}, function (data) { scope.collateral = data; + scope.additionalDetails = data.additionalDetails; scope.loanTransactions = scope.collateral.loanTransactionData; for (var i=0; i -1)) { + var amount = parseFloat(scope.formData.depositAmount); + var depositPeriod = parseFloat(scope.formData.depositPeriod); + var periodFrequency = scope.formData.depositPeriodFrequencyId; + var filteredSlabs = scope.chartSlabs.filter(function (x) { return amount >= x.amountRangeFrom && (amount <= x.amountRangeTo || !x.amountRangeTo) }); + filteredSlabs.map(function(x) { + + var period = scope.computePeriod(depositPeriod, periodFrequency, x.periodType.id); + console.log("x", period); + if(x.toPeriod && x.fromPeriod){ + if (period && x.fromPeriod <= period && x.toPeriod >= period) { + scope.formData.nominalAnnualInterestRate = x.annualInterestRate; + }}else + if (period && x.fromPeriod <= period){ + scope.formData.nominalAnnualInterestRate = x.annualInterestRate; + } + + }); + } + }; + + scope.computePeriod = function(depositPeriod, depositPeriodFrequency, filteredPeriod) { + if (depositPeriodFrequency == filteredPeriod) { + return depositPeriod; + } + if (filteredPeriod == 0) { + if (depositPeriodFrequency == 1) { + return depositPeriod * 7; + } + if (depositPeriodFrequency == 2) { + return depositPeriod * 30; + } + if (depositPeriodFrequency == 3) { + return depositPeriod * 365; + } + } else if (filteredPeriod == 1) { + if (depositPeriodFrequency == 0) { + return depositPeriod / 7; + } + if (depositPeriodFrequency == 2) { + return depositPeriod * 4; + } + if (depositPeriodFrequency == 3) { + return depositPeriod * 52; + } + } else if (filteredPeriod == 2) { + if (depositPeriodFrequency == 0) { + return depositPeriod / 30; + } + if (depositPeriodFrequency == 1) { + return depositPeriod / 4; + } + if (depositPeriodFrequency == 3) { + return depositPeriod * 12; + } + } else if (filteredPeriod == 3) { + if (depositPeriodFrequency == 0) { + return depositPeriod / 365; + } + if (depositPeriodFrequency == 1) { + return depositPeriod / 52; + } + if (depositPeriodFrequency == 2) { + return depositPeriod / 12; + } + } + }; + + scope.$watch('formData',function(newVal){ scope.fixedDetails = angular.extend(scope.fixedDetails,newVal); }); @@ -190,6 +273,11 @@ if (scope.charges[i].chargeTimeType.value == 'Monthly Fee' || scope.charges[i].chargeTimeType.code=='chargeTimeType.weeklyFee') { chargeData.feeInterval = scope.charges[i].feeInterval; } + + if(scope.charges[i].chargeTimeType.code = 'chargeTimeType.fdaPartialLiquidationFee'){ + delete chargeData.amount + } + this.formData.charges.push(chargeData); } } diff --git a/app/scripts/controllers/deposits/fixed/EditDepositAccountController.js b/app/scripts/controllers/deposits/fixed/EditDepositAccountController.js index ff2e59da..ebb09e69 100755 --- a/app/scripts/controllers/deposits/fixed/EditDepositAccountController.js +++ b/app/scripts/controllers/deposits/fixed/EditDepositAccountController.js @@ -62,12 +62,14 @@ scope.formData.depositPeriod = data.depositPeriod; scope.formData.lockinPeriodFrequency = data.lockinPeriodFrequency; scope.formData.withHoldTax = data.withHoldTax; - scope.formData.maturityInstructionId = data.onAccountClosure.id; + scope.formData.maturityInstructionId = data.onAccountClosure != null ? data.onAccountClosure.id : ""; scope.formData.transferToSavingsId = data.transferToSavingsId; /* FIX-ME: uncomment annualFeeAmount when datepicker avialable, because it depends on the date field 'annualFeeOnMonthDay'*/ //scope.formData.annualFeeAmount = data.annualFeeAmount; //scope.formData.withdrawalFeeAmount = data.withdrawalFeeAmount; //scope.formData.withdrawalFeeForTransfers = data.withdrawalFeeForTransfers; + scope.formData.allowPartialLiquidation = data.allowPartialLiquidation; + scope.formData.totalLiquidationAllowed = data.totalLiquidationAllowed; if (data.interestCompoundingPeriodType) scope.formData.interestCompoundingPeriodType = data.interestCompoundingPeriodType.id; if (data.interestPostingPeriodType) scope.formData.interestPostingPeriodType = data.interestPostingPeriodType.id; @@ -130,6 +132,8 @@ scope.formData.depositPeriod = data.depositPeriod; scope.formData.lockinPeriodFrequency = data.lockinPeriodFrequency; scope.formData.withHoldTax = data.withHoldTax; + scope.formData.allowPartialLiquidation = data.allowPartialLiquidation; + scope.formData.totalLiquidationAllowed = data.totalLiquidationAllowed; if (data.interestCompoundingPeriodType) scope.formData.interestCompoundingPeriodType = data.interestCompoundingPeriodType.id; if (data.interestPostingPeriodType) scope.formData.interestPostingPeriodType = data.interestPostingPeriodType.id; diff --git a/app/scripts/controllers/deposits/fixed/FixedDepositAccountActionsController.js b/app/scripts/controllers/deposits/fixed/FixedDepositAccountActionsController.js index 98c00334..ee40f228 100644 --- a/app/scripts/controllers/deposits/fixed/FixedDepositAccountActionsController.js +++ b/app/scripts/controllers/deposits/fixed/FixedDepositAccountActionsController.js @@ -196,6 +196,12 @@ case "waive": scope.waiveCharge = true; break; + case "postAccrualInterestAsOn": + scope.labelName = 'label.input.transactiondate'; + scope.modelName = 'transactionDate'; + scope.showDateField = true; + scope.showAccountNumber=true; + break; } scope.cancel = function () { @@ -208,6 +214,12 @@ this.formData.locale = scope.optlang.code; this.formData.dateFormat = scope.df; } + if(scope.action=="postAccrualInterestAsOn"){ + if (this.formData.transactionDate) { + this.formData.transactionDate = dateFilter(this.formData.transactionDate, scope.df); + } + this.formData.isPostInterestAsOn=true; + } if (scope.action == "deposit" || scope.action == "withdrawal" || scope.action == "modifytransaction") { if (scope.action == "withdrawal") { if (this.formData.transactionDate) { diff --git a/app/scripts/controllers/deposits/fixed/FixedDepositAccountPartialLiquidationController.js b/app/scripts/controllers/deposits/fixed/FixedDepositAccountPartialLiquidationController.js new file mode 100644 index 00000000..495c550e --- /dev/null +++ b/app/scripts/controllers/deposits/fixed/FixedDepositAccountPartialLiquidationController.js @@ -0,0 +1,102 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + FixedDepositAccountPartialLiquidationController: function (scope, resourceFactory, location, routeParams, dateFilter) { + + scope.data = {}; + scope.accountId = routeParams.id; + scope.savingAccountId = routeParams.id; + scope.formData = { liquidationAmount: 0, depositPeriodFrequencyId: 0 }; + scope.restrictDate = new Date(); + scope.changeTenure = false; + scope.date = { submittedOnDate: new Date() }; + + resourceFactory.fixedDepositAccountResource.get({ + accountId: scope.accountId, + template: 'true' + }, function (data) { + scope.data = data; + scope.chart = data.accountChart; + scope.chartSlabs = scope.chart.chartSlabs; + scope.fetchMaturityAmount(); + }); + + scope.fetchMaturityAmount = () => { + let formData = { + locale: scope.optlang.code, + dateFormat: scope.df, + closedOnDate: dateFilter(scope.date.submittedOnDate, scope.df) + }; + resourceFactory.fixedDepositAccountResource.save({ accountId: routeParams.id, command: 'calculatePrematureAmount' }, formData, function (data) { + scope.data.maturityAmount = data.maturityAmount; + scope.calculateOutstanding(); + }); + }; + + scope.calculateRemainingTenure = () => { + if (!scope.changeTenure && scope.date.submittedOnDate) { + let today = Array.isArray(scope.date.submittedOnDate) ? dateFilter(scope.date.submittedOnDate, scope.df) : scope.date.submittedOnDate; + let maturityDate = new Date(dateFilter(scope.data.maturityDate, scope.df)); + scope.formData.depositPeriod = Math.floor((maturityDate - today) / (1000 * 60 * 60 * 24)); + } + scope.calculateInterestRate(); + scope.calculateInterest(); + }; + + scope.calculateOutstanding = () => { + scope.balanceAfterLqdn = scope.data.maturityAmount - scope.formData.liquidationAmount; + scope.calculateRemainingTenure(); + }; + + scope.calculateInterestRate = () => { + let amount = parseFloat(scope.balanceAfterLqdn); + let depositPeriod = parseFloat(scope.formData.depositPeriod); + let periodFrequency = scope.formData.depositPeriodFrequencyId; + let filteredSlabs = scope.chartSlabs.filter(function (x) { + return amount >= x.amountRangeFrom && (amount <= x.amountRangeTo || !x.amountRangeTo) + }); + filteredSlabs.map(x => { + let period = scope.computePeriod(depositPeriod, periodFrequency, x.periodType.id); + if (period && x.fromPeriod <= period && x.toPeriod >= period) { + scope.interestRate = x.annualInterestRate; + } + }); + }; + + scope.calculateInterest = function () { + let dailyRate = (scope.interestRate / 100) / 365; + scope.interestToBeEarned = scope.balanceAfterLqdn * dailyRate * scope.formData.depositPeriod; + scope.maturityAmount = scope.balanceAfterLqdn + scope.interestToBeEarned; + }; + + scope.cancel = function () { + location.path('/viewfixeddepositaccount/' + routeParams.id); + }; + + scope.submit = function () { + const params = { command: "partialLiquidation", accountId: scope.accountId }; + if (scope.date) { + this.formData.submittedOnDate = dateFilter(scope.date.submittedOnDate, scope.df); + } + this.formData.locale = scope.optlang.code; + this.formData.dateFormat = scope.df; + resourceFactory.fixedDepositAccountResource.save(params, this.formData, () => location.path('/viewclient/' + scope.data.clientId)); + }; + + scope.computePeriod = function (depositPeriod, depositPeriodFrequency, filteredPeriod) { + if (depositPeriodFrequency === filteredPeriod) { + return depositPeriod; + } + if (filteredPeriod === 1) { + return depositPeriod / 7; + } else if (filteredPeriod === 2) { + return depositPeriod / 30; + } else if (filteredPeriod === 3) { + return depositPeriod / 365; + } + }; + } + }); + mifosX.ng.application.controller('FixedDepositAccountPartialLiquidationController', ['$scope', 'ResourceFactory', '$location', '$routeParams', 'dateFilter', mifosX.controllers.FixedDepositAccountPartialLiquidationController]).run(function ($log) { + $log.info("FixedDepositAccountPartialLiquidationController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/deposits/fixed/FixedDepositAccountTopUpController.js b/app/scripts/controllers/deposits/fixed/FixedDepositAccountTopUpController.js new file mode 100644 index 00000000..ca4c920e --- /dev/null +++ b/app/scripts/controllers/deposits/fixed/FixedDepositAccountTopUpController.js @@ -0,0 +1,93 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + FixedDepositAccountTopUpController: function (scope, resourceFactory, location, routeParams, dateFilter) { + + scope.data = {}; + scope.accountId = routeParams.id; + scope.savingAccountId = routeParams.id; + scope.formData = {depositAmount: 0, depositPeriodFrequencyId: 0}; + scope.restrictDate = new Date(); + scope.changeTenure = false; + scope.topUpAmount = 0; + scope.origTenure = null; + scope.date = {submittedOnDate: new Date()}; + + resourceFactory.fixedDepositAccountResource.get({ + accountId: scope.accountId, + template: 'true' + }, function (data) { + scope.data = data; + scope.chart = data.accountChart; + scope.chartSlabs = scope.chart.chartSlabs; + scope.calculateRemainingTenure(); + scope.calculateNewDepositAmount(); + }); + + scope.calculateNewDepositAmount = () => { + scope.formData.depositAmount = parseFloat(scope.data.depositAmount) + parseFloat(scope.topUpAmount); + }; + + scope.calculateRemainingTenure = () => { + if (!scope.changeTenure && scope.date.submittedOnDate) { + let today = Array.isArray(scope.date.submittedOnDate) ? dateFilter(scope.date.submittedOnDate, scope.df) : scope.date.submittedOnDate; + let maturityDate = new Date(dateFilter(scope.data.maturityDate, scope.df)); + scope.formData.depositPeriod = Math.floor((maturityDate - today) / (1000 * 60 * 60 * 24)); + if (scope.origTenure === null) scope.origTenure = scope.formData.depositPeriod; + } + scope.calculateInterestRate(); + }; + + scope.validatePeriod = () => { + if (scope.origTenure && scope.origTenure > scope.formData.depositPeriod) { + scope.formData.depositPeriod = scope.origTenure; + scope.calculateInterestRate(); + } + }; + + scope.calculateInterestRate = () => { + let amount = parseFloat(scope.formData.depositAmount); + let depositPeriod = parseFloat(scope.formData.depositPeriod); + let periodFrequency = scope.formData.depositPeriodFrequencyId; + let filteredSlabs = scope.chartSlabs.filter(function (x) { + return amount >= x.amountRangeFrom && amount <= x.amountRangeTo + }); + filteredSlabs.map(x => { + let period = scope.computePeriod(depositPeriod, periodFrequency, x.periodType.id); + if (period && x.fromPeriod <= period && x.toPeriod >= period) { + scope.interestRate = x.annualInterestRate; + } + }); + }; + + scope.cancel = function () { + location.path('/viewfixeddepositaccount/' + routeParams.id); + }; + + scope.submit = function () { + const params = {command: "topUp", accountId: scope.accountId}; + if (scope.date) { + this.formData.submittedOnDate = dateFilter(scope.date.submittedOnDate, scope.df); + } + this.formData.locale = scope.optlang.code; + this.formData.dateFormat = scope.df; + resourceFactory.fixedDepositAccountResource.save(params, this.formData, () => location.path('/viewclient/' + scope.data.clientId)); + }; + + scope.computePeriod = function (depositPeriod, depositPeriodFrequency, filteredPeriod) { + if (depositPeriodFrequency === filteredPeriod) { + return depositPeriod; + } + if (filteredPeriod === 1) { + return depositPeriod / 7; + } else if (filteredPeriod === 2) { + return depositPeriod / 30; + } else if (filteredPeriod === 3) { + return depositPeriod / 365; + } + }; + } + }); + mifosX.ng.application.controller('FixedDepositAccountTopUpController', ['$scope', 'ResourceFactory', '$location', '$routeParams', 'dateFilter', mifosX.controllers.FixedDepositAccountTopUpController]).run(function ($log) { + $log.info("FixedDepositAccountTopUpController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/deposits/fixed/ViewFixedDepositAccountDetailsController.js b/app/scripts/controllers/deposits/fixed/ViewFixedDepositAccountDetailsController.js index 8c7d25d5..3ee3587f 100755 --- a/app/scripts/controllers/deposits/fixed/ViewFixedDepositAccountDetailsController.js +++ b/app/scripts/controllers/deposits/fixed/ViewFixedDepositAccountDetailsController.js @@ -1,6 +1,8 @@ (function (module) { mifosX.controllers = _.extend(module, { ViewFixedDepositAccountDetailsController: function (scope, routeParams, resourceFactory, paginatorService, location, route, dateFilter,$uibModal) { + scope.transactions = []; + scope.isDebit = function (savingsTransactionType) { return savingsTransactionType.withdrawal == true || savingsTransactionType.feeDeduction == true || savingsTransactionType.withholdTax == true; }; @@ -57,20 +59,23 @@ route.reload(); }); break; - /* case "applyAnnualFees": - location.path('/savingaccountcharge/' + accountId + '/applyAnnualFees/' + scope.annualChargeId); - break; - case "transferFunds": - if (scope.savingaccountdetails.clientId) { - location.path('/accounttransfers/fromsavings/'+accountId); - } - break;*/ + case "postAccrualInterest": + resourceFactory.fixedDepositAccountResource.save({accountId: accountId, command: 'postAccrualInterest'}, {}, function (data) { + route.reload(); + }); + break; case "close": location.path('/fixeddepositaccount/' + accountId + '/close'); break; case "prematureClose": location.path('/fixeddepositaccount/' + accountId + '/prematureClose'); break; + case "partiallyLiquidate": + location.path('/fixeddepositaccount/' + accountId + '/partiallyLiquidate'); + break; + case "topUp": + location.path('/fixeddepositaccount/' + accountId + '/topUp'); + break; case "enableWithHoldTax": var changes = { withHoldTax:true @@ -87,6 +92,9 @@ route.reload(); }); break; + case "postAccrualInterestAsOn": + location.path('/fixeddepositaccount/' + accountId + '/postAccrualInterestAsOn'); + break; } }; @@ -98,13 +106,30 @@ } }; - resourceFactory.fixedDepositAccountResource.get({accountId: routeParams.id, associations: 'all'}, function (data) { + resourceFactory.fixedDepositAccountResource.get({accountId: routeParams.id, associations: 'all', + offset: 0, + limit: scope.clientsPerPage + }, function (data) { scope.savingaccountdetails = data; - scope.savingaccountdetails.availableBalance = scope.savingaccountdetails.enforceMinRequiredBalance?(scope.savingaccountdetails.summary.accountBalance - scope.savingaccountdetails.minRequiredOpeningBalance):scope.savingaccountdetails.summary.accountBalance; + + if(scope.savingaccountdetails.enforceMinRequiredBalance){ + scope.availableBalanceEnforced = (scope.savingaccountdetails.summary.accountBalance - scope.savingaccountdetails.minRequiredOpeningBalance); + }else { + scope.availableBalanceEnforced = scope.savingaccountdetails.summary.accountBalance; + + } + scope.convertDateArrayToObject('date'); scope.chartSlabs = scope.savingaccountdetails.accountChart.chartSlabs; scope.status = data.status.value; scope.heading = (!scope.savingaccountdetails.status.rejected && !scope.savingaccountdetails.status.submittedAndPendingApproval)?'label.heading.interestchart':'label.heading.summary'; + + if (scope.savingaccountdetails.accruedInterestCarriedForward) { + scope.savingaccountdetails.summary.totalInterestEarned += scope.savingaccountdetails.accruedInterestCarriedForward; + } else { + scope.savingaccountdetails.accruedInterestCarriedForward = 0; + } + if (scope.status == "Submitted and pending approval" || scope.status == "Active" || scope.status == "Approved") { scope.choice = true; } @@ -166,14 +191,28 @@ { name: "button.calculateInterest", icon: "fa fa-table" + }, + { + name: "button.postAccrualInterestAsOn", + icon: "icon-arrow-right", + taskPermissionName:"POSTACCRUALINTERESTASON_SAVINGSACCOUNT" } ], options: [ { name: "button.postInterest" }, + { + name: "button.postAccrualInterest" + }, { name: "button.addcharge" + }, + { + name: "button.partiallyLiquidate" + }, + { + name: "button.topUp" } ] @@ -252,6 +291,34 @@ scope.isCollapsed = false; }; + scope.transactionsPerPage = 15; + + scope.getResultsPage = function (pageNumber) { + if(scope.searchText){ + var startPosition = (pageNumber - 1) * scope.transactionsPerPage; + scope.transactions = scope.savingaccountdetails.transactions.slice(startPosition, startPosition + scope.transactionsPerPage); + return; + } + resourceFactory.fixedDepositAccountResource.get({accountId: routeParams.id, associations: 'all', + offset: ((pageNumber - 1) * scope.transactionsPerPage), + limit: scope.clientsPerPage + }, function (data) { + scope.savingaccountdetails = data; + scope.transactions = scope.savingaccountdetails.transactions; + }); + } + scope.initPage = function () { + resourceFactory.fixedDepositAccountResource.get({accountId: routeParams.id, associations: 'all', + offset: 0, + limit: scope.transactionsPerPage + }, function (data) { + scope.savingaccountdetails = data; + scope.totalTransactions = scope.savingaccountdetails.transactionSize; + scope.transactions = scope.savingaccountdetails.transactions; + }); + } + + scope.initPage(); scope.deletestandinginstruction = function (id) { $uibModal.open({ templateUrl: 'delInstruction.html', @@ -310,7 +377,9 @@ } }); }; - + scope.viewAccrualTransaction = function(){ + location.path("/viewaccrualtransaction/").search({fixedDepositId: scope.savingaccountdetails.id}); + }; scope.deleteAll = function (apptableName, entityId) { resourceFactory.DataTablesResource.delete({datatablename: apptableName, entityId: entityId, genericResultSet: 'true'}, {}, function (data) { route.reload(); diff --git a/app/scripts/controllers/deposits/recurring/CreateRecurringDepositAccountController.js b/app/scripts/controllers/deposits/recurring/CreateRecurringDepositAccountController.js index 38d87bce..f7e33c1e 100755 --- a/app/scripts/controllers/deposits/recurring/CreateRecurringDepositAccountController.js +++ b/app/scripts/controllers/deposits/recurring/CreateRecurringDepositAccountController.js @@ -41,6 +41,7 @@ scope.chargeOptions = data.chargeOptions; scope.clientName = data.clientName; scope.groupName = data.groupName; + scope.savingsAccounts = data.savingsAccounts; }); scope.goNext = function(form){ diff --git a/app/scripts/controllers/deposits/recurring/EditRecurringDepositAccountController.js b/app/scripts/controllers/deposits/recurring/EditRecurringDepositAccountController.js index f8eb1b09..c937ce51 100755 --- a/app/scripts/controllers/deposits/recurring/EditRecurringDepositAccountController.js +++ b/app/scripts/controllers/deposits/recurring/EditRecurringDepositAccountController.js @@ -13,7 +13,7 @@ scope.fromDate = {}; //required for date formatting scope.endDate = {};//required for date formatting - resourceFactory.recurringDepositAccountResource.get({accountId: scope.accountId, template: 'true', associations: 'charges'}, function (data) { + resourceFactory.recurringDepositAccountResource.get({accountId: scope.accountId, template: 'true', associations: 'charges, linkedAccount'}, function (data) { scope.data = data; scope.charges = data.charges || []; if (scope.charges) { @@ -40,6 +40,10 @@ } scope.formData.productId = data.depositProductId; scope.products = data.productOptions; + scope.savingsAccounts = data.savingsAccounts; + if (data.linkedAccount) { + scope.formData.linkAccountId = data.linkedAccount.id; + } if (data.fieldOfficerId != 0)scope.formData.fieldOfficerId = data.fieldOfficerId; if (data.timeline) { var submittedOnDate = dateFilter(data.timeline.submittedOnDate, scope.df); diff --git a/app/scripts/controllers/deposits/recurring/RecurringDepositAccountActionsController.js b/app/scripts/controllers/deposits/recurring/RecurringDepositAccountActionsController.js index b6ed0f84..ab428d79 100755 --- a/app/scripts/controllers/deposits/recurring/RecurringDepositAccountActionsController.js +++ b/app/scripts/controllers/deposits/recurring/RecurringDepositAccountActionsController.js @@ -206,6 +206,12 @@ case "waive": scope.waiveCharge = true; break; + case "postAccrualInterestAsOn": + scope.labelName = 'label.input.transactiondate'; + scope.modelName = 'transactionDate'; + scope.showDateField = true; + scope.showAccountNumber=true; + break; } scope.cancel = function () { @@ -311,7 +317,12 @@ scope.showPaymentType=true; return; } - } + }else if(scope.action=="postAccrualInterestAsOn"){ + if (this.formData.transactionDate) { + this.formData.transactionDate = dateFilter(this.formData.transactionDate, scope.df); + } + this.formData.isPostInterestAsOn=true; + } resourceFactory.recurringDepositAccountResource.save(params, this.formData, function (data) { location.path('/viewrecurringdepositaccount/' + data.savingsId); diff --git a/app/scripts/controllers/deposits/recurring/RecurringDocumentController.js b/app/scripts/controllers/deposits/recurring/RecurringDocumentController.js new file mode 100644 index 00000000..50da5481 --- /dev/null +++ b/app/scripts/controllers/deposits/recurring/RecurringDocumentController.js @@ -0,0 +1,26 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + RecurringDocumentController: function (scope, location, http, routeParams, API_VERSION, Upload, $rootScope) { + scope.accountId = routeParams.id; + scope.onFileSelect = function (files) { + scope.formData.file = files[0]; + }; + + scope.submit = function () { + Upload.upload({ + url: $rootScope.hostUrl + API_VERSION + '/recurring/' + scope.accountId + '/documents', + data: { name : scope.formData.name, description : scope.formData.description, file: scope.formData.file}, + }).then(function (data) { + // to fix IE not refreshing the model + if (!scope.$$phase) { + scope.$apply(); + } + location.path('/viewrecurringdepositaccount/' + scope.accountId); + }); + }; + } + }); + mifosX.ng.application.controller('RecurringDocumentController', ['$scope', '$location', '$http', '$routeParams', 'API_VERSION', 'Upload', '$rootScope', mifosX.controllers.RecurringDocumentController]).run(function ($log) { + $log.info("RecurringDocumentController initialized"); + }); +}(mifosX.controllers || {})); \ No newline at end of file diff --git a/app/scripts/controllers/deposits/recurring/ViewRecurringDepositAccountDetailsController.js b/app/scripts/controllers/deposits/recurring/ViewRecurringDepositAccountDetailsController.js index ff4b8ff8..ed2f996e 100755 --- a/app/scripts/controllers/deposits/recurring/ViewRecurringDepositAccountDetailsController.js +++ b/app/scripts/controllers/deposits/recurring/ViewRecurringDepositAccountDetailsController.js @@ -1,6 +1,8 @@ (function (module) { mifosX.controllers = _.extend(module, { - ViewRecurringDepositAccountDetailsController: function (scope, routeParams, resourceFactory, paginatorService, location, route, dateFilter,$uibModal) { + ViewRecurringDepositAccountDetailsController: function (scope, routeParams, resourceFactory, paginatorService, location, route, dateFilter,$uibModal, API_VERSION, $sce, $rootScope, $window) { + scope.transactions = []; + scope.f = []; scope.isDebit = function (savingsTransactionType) { return savingsTransactionType.withdrawal == true || savingsTransactionType.feeDeduction == true || savingsTransactionType.withholdTax == true; }; @@ -92,10 +94,21 @@ route.reload(); }); break; + case "postAccrualInterest": + resourceFactory.recurringDepositAccountResource.save({accountId: accountId, command: 'postAccrualInterest'}, {}, function (data) { + route.reload(); + }); + break; + case "postAccrualInterestAsOn": + location.path('/recurringdepositaccount/' + accountId + '/postAccrualInterestAsOn'); + break; } }; - resourceFactory.recurringDepositAccountResource.get({accountId: routeParams.id, associations: 'all'}, function (data) { + resourceFactory.recurringDepositAccountResource.get({accountId: routeParams.id, associations: 'all', + offset: 0, + limit: scope.clientsPerPage + }, function (data) { scope.savingaccountdetails = data; scope.savingaccountdetails.availableBalance = scope.savingaccountdetails.enforceMinRequiredBalance?(scope.savingaccountdetails.summary.accountBalance - scope.savingaccountdetails.minRequiredOpeningBalance):scope.savingaccountdetails.summary.accountBalance; scope.convertDateArrayToObject('date'); @@ -168,12 +181,20 @@ { name: "button.calculateInterest", icon: "fa fa-table" + }, + { + name: "button.postAccrualInterestAsOn", + icon: "icon-arrow-right", + taskPermissionName:"POSTACCRUALINTERESTASON_SAVINGSACCOUNT" } ], options: [ { name: "button.postInterest" }, + { + name: "button.postAccrualInterest" + }, { name: "button.addcharge" } @@ -290,6 +311,36 @@ scope.isCollapsed = false; }; + scope.transactionsPerPage = 15; + + scope.getResultsPage = function (pageNumber) { + if(scope.searchText){ + var startPosition = (pageNumber - 1) * scope.transactionsPerPage; + scope.transactions = scope.savingaccountdetails.transactions.slice(startPosition, startPosition + scope.transactionsPerPage); + return; + } + resourceFactory.recurringDepositAccountResource.get({accountId: routeParams.id, associations: 'all', + offset: ((pageNumber - 1) * scope.transactionsPerPage), + limit: scope.clientsPerPage + }, function (data) { + scope.savingaccountdetails = data; + scope.transactions = scope.savingaccountdetails.transactions; + }); + } + scope.initPage = function () { + resourceFactory.recurringDepositAccountResource.get({accountId: routeParams.id, associations: 'all', + offset: 0, + limit: scope.transactionsPerPage + }, function (data) { + scope.savingaccountdetails = data; + scope.totalTransactions = scope.savingaccountdetails.transactionSize; + scope.transactions = scope.savingaccountdetails.transactions; + }); + + } + + scope.initPage(); + scope.deletestandinginstruction = function (id) { $uibModal.open({ templateUrl: 'delInstruction.html', @@ -366,7 +417,9 @@ scope.modifyTransaction = function (accountId, transactionId) { location.path('/recurringdepositaccount/' + accountId + '/modifytransaction?transactionId=' + transactionId); }; - + scope.viewAccrualTransaction = function(){ + location.path("/viewaccrualtransaction/").search({recurringDepositId: scope.savingaccountdetails.id}); + }; scope.incentives = function(index){ $uibModal.open({ templateUrl: 'incentive.html', @@ -405,9 +458,41 @@ } }; + scope.getRecurringDocuments = function () { + resourceFactory.RecurringDocumentResource.getRecurringDocuments({accountId: routeParams.id}, function (data) { + for (var i in data) { + var recurringdocs = {}; + recurringdocs = API_VERSION + '/recurring/' + data[i].parentEntityId + '/documents/' + data[i].id + '/attachment?tenantIdentifier=' + $rootScope.tenantIdentifier; + data[i].docUrl = recurringdocs; + if (data[i].fileName) + if (data[i].fileName.toLowerCase().indexOf('.jpg') != -1 || data[i].fileName.toLowerCase().indexOf('.jpeg') != -1 || data[i].fileName.toLowerCase().indexOf('.png') != -1) + data[i].fileIsImage = true; + if (data[i].type) + if (data[i].type.toLowerCase().indexOf('image') != -1) + data[i].fileIsImage = true; + } + scope.recurringDocuments = data; + }); + + }; + scope.deleteDocument = function (documentId, index) { + resourceFactory.RecurringDocumentResource.delete({accountId: scope.savingaccountdetails.id, documentId: documentId}, '', function (data) { + scope.recurringDocuments.splice(index, 1); + }); + }; + + scope.previewDocument = function (url, fileName) { + scope.preview = true; + scope.fileUrl = scope.hostUrl + url; + if(fileName.toLowerCase().indexOf('.png') != -1) + scope.fileType = 'image/png'; + else if((fileName.toLowerCase().indexOf('.jpg') != -1) || (fileName.toLowerCase().indexOf('.jpeg') != -1)) + scope.fileType = 'image/jpg'; + }; + } }); - mifosX.ng.application.controller('ViewRecurringDepositAccountDetailsController', ['$scope', '$routeParams', 'ResourceFactory', 'PaginatorService', '$location', '$route', 'dateFilter','$uibModal', mifosX.controllers.ViewRecurringDepositAccountDetailsController]).run(function ($log) { + mifosX.ng.application.controller('ViewRecurringDepositAccountDetailsController', ['$scope', '$routeParams', 'ResourceFactory', 'PaginatorService', '$location', '$route', 'dateFilter','$uibModal', 'API_VERSION', '$sce', '$rootScope', '$window', mifosX.controllers.ViewRecurringDepositAccountDetailsController]).run(function ($log) { $log.info("ViewRecurringDepositAccountDetailsController initialized"); }); }(mifosX.controllers || {})); diff --git a/app/scripts/controllers/groups/CreateGroupController.js b/app/scripts/controllers/groups/CreateGroupController.js index 5f72cc45..6f54c340 100644 --- a/app/scripts/controllers/groups/CreateGroupController.js +++ b/app/scripts/controllers/groups/CreateGroupController.js @@ -88,7 +88,7 @@ scope.clientOptions = function(value){ var deferred = $q.defer(); - resourceFactory.clientResource.getAllClientsWithoutLimit({displayName: value, orderBy : 'displayName', officeId : scope.formData.officeId, + resourceFactory.clientResource.getAllClientsWithoutStatus({limit:10 ,displayName: value, accountNo: value, orderBy : 'displayName', officeId : scope.formData.officeId, sortOrder : 'ASC', orphansOnly : true}, function (data) { deferred.resolve(data.pageItems); }); diff --git a/app/scripts/controllers/groups/MemberManageController.js b/app/scripts/controllers/groups/MemberManageController.js index fc81eaab..50e69046 100644 --- a/app/scripts/controllers/groups/MemberManageController.js +++ b/app/scripts/controllers/groups/MemberManageController.js @@ -11,7 +11,7 @@ scope.clientOptions = function(value){ var deferred = $q.defer(); - resourceFactory.clientResource.getAllClientsWithoutLimit({displayName: value, orderBy : 'displayName', officeId : scope.group.officeId, + resourceFactory.clientResource.getAllClientsWithoutStatus({limit: 10, displayName: value, orderBy : 'displayName', officeId : scope.group.officeId, sortOrder : 'ASC', orphansOnly : true}, function (data) { deferred.resolve(data.pageItems); }); diff --git a/app/scripts/controllers/groups/ViewGroupController.js b/app/scripts/controllers/groups/ViewGroupController.js index 49c910b0..bab336ae 100644 --- a/app/scripts/controllers/groups/ViewGroupController.js +++ b/app/scripts/controllers/groups/ViewGroupController.js @@ -49,7 +49,11 @@ resourceFactory.runReportsResource.get({reportSource: 'GroupSummaryCounts', genericResultSet: 'false', R_groupId: routeParams.id}, function (data) { scope.summary = data[0]; }); - resourceFactory.groupAccountResource.get({groupId: routeParams.id}, function (data) { + resourceFactory.groupAccountResource.get({groupId: routeParams.id, fields: "savingsaccounts,grouploanindividualmonitoringaccounts,loanaccounts,memberloanaccounts,membersavingsaccounts,guarantorloanaccounts,memberguarantorloanaccounts"}, function (data) { + scope.groupAccounts = data; + }); + + resourceFactory.groupAccountResource.get({groupId: routeParams.id, fields: "savingsaccounts"}, function (data) { scope.groupAccounts = data; }); resourceFactory.groupNotesResource.getAllNotes({groupId: routeParams.id}, function (data) { diff --git a/app/scripts/controllers/loanAccount/ApproveLoanDueDiligenceController.js b/app/scripts/controllers/loanAccount/ApproveLoanDueDiligenceController.js new file mode 100644 index 00000000..5bc5f690 --- /dev/null +++ b/app/scripts/controllers/loanAccount/ApproveLoanDueDiligenceController.js @@ -0,0 +1,56 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + ApproveLoanDueDiligenceController: function (scope, resourceFactory, routeParams, location, dateFilter,routeParams) { + + scope.loandetails = []; + scope.formData = {}; + scope.loanId = routeParams.id; + scope.inparams = {resourceType: 'template', activeOnly: 'true'}; + scope.first = {}; + scope.first.startDate = new Date(); + scope.second = {}; + scope.second.endDate = new Date(); + scope.third = {}; + scope.third.dueDiligenceOn = new Date(); + + + resourceFactory.dueDiligenceLoanDecisionEngineResource.getTemplate({loanId: scope.loanId}, function (data) { + scope.loandetails = data; + scope.productId = data.loanProductId; + scope.cohortOptions = data.cohortOptions; + scope.countryOptions = data.countryOptions; + scope.surveyLocationOptions = data.surveyLocationOptions; + scope.programOptions = data.programOptions; + }); + + + scope.cancel = function () { + location.path('/viewloanaccount/' + scope.loanId); + }; + + scope.submit = function () { + this.formData.locale = scope.optlang.code; + this.formData.dateFormat = scope.df; + + if (scope.first.startDate) { + this.formData.startDate = dateFilter(scope.first.startDate, scope.df); + } + if (scope.second.endDate) { + this.formData.endDate = dateFilter(scope.second.endDate, scope.df); + } + if (scope.third.dueDiligenceOn) { + this.formData.dueDiligenceOn = dateFilter(scope.third.dueDiligenceOn, scope.df); + } + + + resourceFactory.approveDueDiligenceLoanDecisionEngineResource.approveDueDiligence({loanId: scope.loanId},this.formData, function (data) { + location.path('/viewloanaccount/' + data.loanId ); + }); + }; + + } + }); + mifosX.ng.application.controller('ApproveLoanDueDiligenceController', ['$scope', 'ResourceFactory', '$routeParams', '$location','dateFilter','$routeParams', mifosX.controllers.ApproveLoanDueDiligenceController]).run(function ($log) { + $log.info("ApproveLoanDueDiligenceController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/loanAccount/CreditReportUploadThitsaWorksController.js b/app/scripts/controllers/loanAccount/CreditReportUploadThitsaWorksController.js index 93961aa0..feedfae5 100644 --- a/app/scripts/controllers/loanAccount/CreditReportUploadThitsaWorksController.js +++ b/app/scripts/controllers/loanAccount/CreditReportUploadThitsaWorksController.js @@ -22,7 +22,7 @@ }); }; - resourceFactory.clientResource.getAllClients({clientId : scope.clientId}, function (data) { + resourceFactory.clientResource.getAllClients({limit:10, clientId : scope.clientId}, function (data) { scope.displayName = data.displayName; }); diff --git a/app/scripts/controllers/loanAccount/EditGuarantorController.js b/app/scripts/controllers/loanAccount/EditGuarantorController.js index 5dfe5dee..b106f658 100755 --- a/app/scripts/controllers/loanAccount/EditGuarantorController.js +++ b/app/scripts/controllers/loanAccount/EditGuarantorController.js @@ -5,8 +5,18 @@ scope.clientview = false; scope.date = {}; scope.restrictDate = new Date(); + scope.yesNoOptions = [{ + "id": 1, + "name": "Yes", + "position": 1 + },{ + "id": 2, + "name": "No", + "position": 2 + }]; resourceFactory.guarantorResource.get({ loanId: routeParams.loanId, templateResource: routeParams.id, template: true}, function (data) { scope.template = data; + scope.genderOptions = scope.template.genderOptions; scope.formData = { firstname: data.firstname, lastname: data.lastname, @@ -25,6 +35,38 @@ if (data.dob) { scope.date.first = new Date(dateFilter(data.dob, scope.df)); } + + //add pep option if selected + if(data.pep){ + scope.formData.pepId = 1 + } + + if(!data.pep){ + scope.formData.pepId = 2; + } + + //add bvn if selected + if(data.bvn){ + scope.formData.bvn = data.bvn; + } + + //add email if selected + if(data.email){ + scope.formData.email = data.email; + } + + //add middle name if selected + if(data.middlename){ + scope.formData.middlename = data.middlename; + } + + //add gender if selected + if(data.gender){ + scope.formData.genderId = data.gender.id; + } + + console.log(scope.formData); + }); scope.submit = function () { var guarantor = {}; @@ -42,6 +84,28 @@ guarantor.housePhoneNumber = this.formData.residence; guarantor.clientRelationshipTypeId = this.formData.relationshipType; guarantor.guarantorTypeId = 3; + + if(this.formData.middlename){ + guarantor.middlename = this.formData.middlename; + } + + if(this.formData.email){ + guarantor.email = this.formData.email; + } + + if(this.formData.bvn){ + guarantor.bvn = this.formData.bvn; + } + + //add pep option if selected + if(this.formData.pepId){ + guarantor.pep = this.formData.pepId == 1 ? true : false; + } + + if(this.formData.genderId){ + guarantor.genderId = this.formData.genderId; + } + resourceFactory.guarantorResource.update({ loanId: routeParams.loanId, templateResource: routeParams.id}, guarantor, function (data) { location.path('listguarantors/' + routeParams.loanId); }); diff --git a/app/scripts/controllers/loanAccount/EditLoanAccAppController.js b/app/scripts/controllers/loanAccount/EditLoanAccAppController.js index 14bad683..d5333d97 100755 --- a/app/scripts/controllers/loanAccount/EditLoanAccAppController.js +++ b/app/scripts/controllers/loanAccount/EditLoanAccAppController.js @@ -10,6 +10,11 @@ scope.restrictDate = new Date(); scope.date = {}; scope.rateFlag = false; + scope.interestRateChart = {} + + scope.toVendorClients = [] + scope.toVendorAccounts = []; + scope.vendorSavingsAccountOptions = []; resourceFactory.loanResource.get({loanId: routeParams.id, template: true, associations: 'charges,collateral,meeting,multiDisburseDetails',staffInSelectedOfficeOnly:true}, function (data) { scope.loanaccountinfo = data; @@ -43,6 +48,7 @@ scope.formData.loanOfficerId = data.loanOfficerId; scope.formData.loanPurposeId = data.loanPurposeId; scope.formData.externalId = data.externalId; + scope.formData.department = data.department.id //update collaterals resourceFactory.clientcollateralTemplateResource.getAllCollaterals({clientId: scope.clientId}, function(data) { @@ -174,6 +180,21 @@ scope.formData.isTopup = scope.loanaccountinfo.isTopup; scope.formData.loanIdToClose = scope.loanaccountinfo.closureLoanId; + scope.formData.isBnplLoan = scope.loanaccountinfo.isBnplLoan; + scope.formData.equityContributionLoanPercentage = scope.loanaccountinfo.equityContributionLoanPercentage; + scope.formData.requiresEquityContribution = scope.loanaccountinfo.requiresEquityContribution; + scope.toVendorClients = scope.loanaccountinfo.vendorClientOptions; + scope.vendorSavingsAccountOptions = scope.loanaccountinfo.vendorSavingsAccountOptions; + if(scope.loanaccountinfo.vendorClientOptions != null && scope.loanaccountinfo.linkedVendorAccount != null){ + for (var i in scope.loanaccountinfo.vendorClientOptions) { + var vendorClient = scope.loanaccountinfo.vendorClientOptions[i]; + if( vendorClient.id == scope.loanaccountinfo.linkedVendorAccount.clientId ){ + scope.toVendorClientData = vendorClient.id + ' ' + vendorClient.displayName; + break; + } + } + } + if (scope.loanaccountinfo.meeting) { scope.formData.syncRepaymentsWithMeeting = true; } @@ -181,6 +202,12 @@ if (scope.loanaccountinfo.linkedAccount) { scope.formData.linkAccountId = scope.loanaccountinfo.linkedAccount.id; } + if (scope.loanaccountinfo.linkedVendorAccount) { + scope.formData.linkVendorAccountId = scope.loanaccountinfo.linkedVendorAccount.id; + } + if (scope.loanaccountinfo.groupSavingsAccountId) { + scope.formData.groupSavingsAccountId = scope.loanaccountinfo.groupSavingsAccountId; + } if (scope.loanaccountinfo.isInterestRecalculationEnabled && scope.loanaccountinfo.interestRecalculationData.recalculationRestFrequencyDate) { scope.date.recalculationRestFrequencyDate = new Date(scope.loanaccountinfo.interestRecalculationData.recalculationRestFrequencyDate); } @@ -206,6 +233,9 @@ }else{ scope.rateFlag=false; } + if(scope.loanaccountinfo.jlgInterestChartRateSummaryData != null && scope.loanaccountinfo.jlgInterestChartRateSummaryData !== undefined){ + scope.interestRateChart = scope.loanaccountinfo.jlgInterestChartRateSummaryData; + } }; //Rate @@ -230,6 +260,27 @@ return exist; }; + scope.bnplValueChanged = () => { + scope.formData.requiresEquityContribution = scope.loanaccountinfo.requiresEquityContribution; + scope.formData.equityContributionLoanPercentage = scope.loanaccountinfo.equityContributionLoanPercentage; + }; + + scope.changeVendorClient = function (client) { + var inparams = { resourceType: 'template', productId: scope.formData.productId, templateType: scope.templateType }; + if (scope.clientId) { + inparams.clientId = scope.clientId; + } + if (scope.groupId) { + inparams.groupId = scope.groupId; + } + inparams.staffInSelectedOfficeOnly = true; + + inparams.vendorClientId = client.id; + resourceFactory.loanResource.get(inparams, function (data) { + scope.vendorSavingsAccountOptions = data.vendorSavingsAccountOptions; + }); + }; + scope.calculateRates = function(){ var total = 0; scope.formData.rates.forEach(function(rate){ @@ -281,6 +332,36 @@ } }; + scope.computeInterestRateForJlg = function() { + //Reset interest to default + scope.formData.interestRatePerPeriod = scope.loanaccountinfo != null ? scope.loanaccountinfo.interestRatePerPeriod : ''; + if(scope.formData.loanTermFrequency == 1 && scope.formData.loanTermFrequencyType == 1){ + var disbursementDate = dateFilter(scope.formData.expectedDisbursementDate, scope.df); + var nextMeetingDate = dateFilter(new Date(scope.loanaccountinfo.calendarOptions[0].nextTenRecurringDates[0]),scope.df); + var loanTermFrequency = scope.formData.loanTermFrequency; + var loanTermFrequencyType = scope.formData.loanTermFrequencyType; + var diffInDisbursementAndMeetingDates = scope.diffDate(disbursementDate,nextMeetingDate); + + angular.forEach(scope.loanaccountinfo.jlgInterestChartRateSummaryData, function(value, key) { + if(diffInDisbursementAndMeetingDates == value.dayOfWeek){ + scope.formData.interestRatePerPeriod = value.interestRate; + } + }) + } + }; + + scope.diffDate = function(disbursementDate,nextMeetingDate){ + var msPerDay = 8.64e7; + + var x0 = new Date(disbursementDate); + var x1 = new Date(nextMeetingDate); + + x0.setHours(12,0,0); + x1.setHours(12,0,0); + + return Math.round( (x1 - x0) / msPerDay ); + }; + scope.syncDisbursementWithMeetingchange = function () { if (scope.formData.syncDisbursementWithMeeting) { scope.formData.syncRepaymentsWithMeeting = true; @@ -334,6 +415,9 @@ uiConfigService.appendConfigToScope(scope); + scope.$watch("formData.expectedDisbursementDate", function(newValue, oldValue) { + scope.computeInterestRateForJlg(); + }); scope.submit = function () { // Make sure charges and collaterals are empty before initializing. diff --git a/app/scripts/controllers/loanAccount/GlimLoanAccountActionsController.js b/app/scripts/controllers/loanAccount/GlimLoanAccountActionsController.js index b6d1dd2a..b65962ea 100644 --- a/app/scripts/controllers/loanAccount/GlimLoanAccountActionsController.js +++ b/app/scripts/controllers/loanAccount/GlimLoanAccountActionsController.js @@ -20,6 +20,7 @@ scope.disbursementDetails = []; scope.showTrancheAmountTotal = 0; scope.processDate = false; + scope.showRepaymentTable=false; var prevLoanAmount; @@ -70,7 +71,7 @@ }); // start of glim - resourceFactory.glimLoanTemplate.get({glimId: scope.glimId}, function (data) { + resourceFactory.glimLoanTemplate.get({glimId: scope.glimId,isRepayment: false}, function (data) { scope.glimAccounts = data; if(scope.approvalArray.length!=0) @@ -174,7 +175,7 @@ scope.glimAccounts=[]; scope.totalLoanAmount=0; scope.showDisbursalTable=true; - resourceFactory.glimLoanTemplate.get({glimId: scope.glimId}, function (data) { + resourceFactory.glimLoanTemplate.get({glimId: scope.glimId,isRepayment: false}, function (data) { scope.glimAccounts = data; if(scope.approvalArray.length!=0) @@ -244,21 +245,12 @@ scope.repaymentArray=[]; scope.glimRepaymentAccounts=[]; scope.modelName = 'transactionDate'; - resourceFactory.loanTrxnsTemplateResource.get({loanId: scope.accountId, command: 'repayment'}, function (data) { - scope.paymentTypes = data.paymentTypeOptions; - if (data.paymentTypeOptions.length > 0) { - scope.formData.paymentTypeId = data.paymentTypeOptions[0].id; - } - // scope.formData.transactionAmount = data.amount; - scope.formData[scope.modelName] = new Date(data.date) || new Date(); - if(data.penaltyChargesPortion>0){ - scope.showPenaltyPortionDisplay = true; - } - }); + //scope.repaymentArray=new Array(); - resourceFactory.glimLoanTemplate.get({glimId: scope.glimId}, function (data) { + resourceFactory.glimLoanTemplate.get({glimId: scope.glimId,isRepayment: true}, function (data) { scope.glimRepaymentAccounts = data; + scope.isTemplateReceived=false; if(scope.repaymentArray.length!=0) { @@ -271,21 +263,27 @@ temp.clientName=data[i].clientName; temp.childLoanId=data[i].childLoanId; temp.childLoanAccountNo=data[i].childLoanAccountNo; - - resourceFactory.loanTrxnsTemplateResource.get({loanId: data[i].childLoanId, command: 'repayment'}, function (data1) { - if(data1.amount) - { - temp.transactionAmount=data1.amount; - } - else { - temp.transactionAmount=0; - } - //console.log(temp.transactionAmount); - }); + temp.transactionAmount=data[i].nextRepaymentAmount; scope.repaymentArray.push(temp); + if(scope.isTemplateReceived == false && data[i].loanStatus.id == 300){ + scope.isTemplateReceived=true; + resourceFactory.loanTrxnsTemplateResource.get({loanId: data[i].childLoanId, command: 'repayment'}, function (data) { + scope.paymentTypes = data.paymentTypeOptions; + if (data.paymentTypeOptions.length > 0) { + scope.formData.paymentTypeId = data.paymentTypeOptions[0].id; + } + // scope.formData.transactionAmount = data.amount; + scope.formData[scope.modelName] = new Date(data.date) || new Date(); + if(data.penaltyChargesPortion>0){ + scope.showPenaltyPortionDisplay = true; + } + }); + } + } + scope.calculateTotalRepaymentAmount(); }); scope.title = 'label.heading.loanrepayments'; @@ -739,7 +737,8 @@ else if(scope.action=="glimrepayment") { scope.formData.formDataArray=[]; - + scope.formData.totalTransactionAmount = scope.totalTransactionAmount; + scope.formData.derivedTotalTransactionAmount = scope.derivedTotalTransactionAmount; var j=0; for(j=0;j { + scope.formData.requiresEquityContribution = scope.loanaccountinfo.requiresEquityContribution; + scope.formData.equityContributionLoanPercentage = scope.loanaccountinfo.equityContributionLoanPercentage; + }; + + scope.changeVendorClient = function (client) { + scope.inparams.vendorClientId = client.id; + resourceFactory.loanResource.get(scope.inparams, function (data) { + scope.vendorSavingsAccountOptions = data.vendorSavingsAccountOptions; + }); + }; + scope.$watch('formData',function(newVal){ scope.loandetails = angular.extend(scope.loandetails,newVal); },true); @@ -257,7 +283,9 @@ return obj[findattr] === model; })[retAttr]; }; - + scope.$watch("date.second", function(newValue, oldValue) { + scope.computeInterestRateForJlg(); + }); scope.addCharge = function () { if (scope.chargeFormData.chargeId) { resourceFactory.chargeResource.get({chargeId: this.chargeFormData.chargeId, template: 'true'}, function (data) { @@ -286,6 +314,36 @@ scope.formData.syncDisbursementWithMeeting = false; } }; + scope.computeInterestRateForJlg = function() { + //Reset interest to default + scope.formData.interestRatePerPeriod = scope.loanaccountinfo != null ? scope.loanaccountinfo.interestRatePerPeriod : ''; + if(scope.formData.loanTermFrequency == 1 && scope.formData.loanTermFrequencyType == 1){ + var disbursementDate = dateFilter(scope.date.second, scope.df); + var nextMeetingDate = dateFilter(new Date(scope.loanaccountinfo.calendarOptions[0].nextTenRecurringDates[0]),scope.df); + var loanTermFrequency = scope.formData.loanTermFrequency; + var loanTermFrequencyType = scope.formData.loanTermFrequencyType; + var diffInDisbursementAndMeetingDates = scope.diffDate(disbursementDate,nextMeetingDate); + + angular.forEach(scope.loanaccountinfo.jlgInterestChartRateSummaryData, function(value, key) { + if(diffInDisbursementAndMeetingDates == value.dayOfWeek){ + scope.formData.interestRatePerPeriod = value.interestRate; + } + }) + + } + }; + + scope.diffDate = function(disbursementDate,nextMeetingDate){ + var msPerDay = 8.64e7; + + var x0 = new Date(disbursementDate); + var x1 = new Date(nextMeetingDate); + + x0.setHours(12,0,0); + x1.setHours(12,0,0); + + return Math.round( (x1 - x0) / msPerDay ); + }; scope.syncDisbursementWithMeetingchange = function () { if (scope.formData.syncDisbursementWithMeeting) { @@ -313,6 +371,7 @@ }; scope.previewRepayments = function () { + scope.calculateTopUpCarryForwardSchedules(); // Make sure charges and collaterals are empty before initializing. delete scope.formData.charges; delete scope.formData.collateral; @@ -358,6 +417,9 @@ this.formData.loanType = scope.inparams.templateType; this.formData.expectedDisbursementDate = reqSecondDate; this.formData.submittedOnDate = reqFirstDate; + if(scope.carryForwardLoanTerm > 0){ + this.formData.loanTermIncludesToppedUpLoanTerm = scope.loanaccountinfo.product.loanTermIncludesToppedUpLoanTerm; + } if(this.formData.interestCalculationPeriodType == 0){ this.formData.allowPartialPeriodInterestCalcualtion = false; } @@ -369,6 +431,7 @@ } + uiConfigService.appendConfigToScope(scope); //return input type @@ -426,6 +489,11 @@ if (this.formData.syncRepaymentsWithMeeting) { this.formData.calendarId = scope.loanaccountinfo.calendarOptions[0].id; } + + + if(scope.carryForwardLoanTerm > 0){ + this.formData.loanTermIncludesToppedUpLoanTerm = scope.loanaccountinfo.product.loanTermIncludesToppedUpLoanTerm; + } delete this.formData.syncRepaymentsWithMeeting; this.formData.interestChargedFromDate = reqThirdDate; this.formData.repaymentsStartingFromDate = reqFourthDate; @@ -470,10 +538,26 @@ delete scope.formData.datatables; } resourceFactory.loanResource.save(this.formData, function (data) { + scope.carryForwardLoanTerm = 0; location.path('/viewloanaccount/' + data.loanId); }); }; + scope.calculateTopUpCarryForwardSchedules = function () { + scope.carryForwardLoanTerm = 0; + scope.topUpCarryForward.loanIdToClose = this.formData.loanIdToClose; + scope.topUpCarryForward.isTopup = this.formData.isTopup; + scope.topUpCarryForward.loanTermIncludesToppedUpLoanTerm = scope.loanaccountinfo.product.loanTermIncludesToppedUpLoanTerm; + + if(scope.topUpCarryForward.loanIdToClose != null && scope.topUpCarryForward.isTopup != null && scope.topUpCarryForward.loanTermIncludesToppedUpLoanTerm){ + resourceFactory.loanResource.save({command: 'calculateTopUpCarryForwardSchedules'}, scope.topUpCarryForward, function (data) { + scope.carryForwardLoanTerm = data.carryForwardLoanTerm; + scope.formData.numberOfRepaymentsToCarryForward = scope.carryForwardLoanTerm; + scope.formData.loanTermToTopUp = scope.carryForwardLoanTerm; + }); + } + } + scope.cancel = function () { if (scope.groupId) { location.path('/viewgroup/' + scope.groupId); diff --git a/app/scripts/controllers/loanAccount/RescheduleLoansRequestController.js b/app/scripts/controllers/loanAccount/RescheduleLoansRequestController.js index f0431ebb..15e294d7 100644 --- a/app/scripts/controllers/loanAccount/RescheduleLoansRequestController.js +++ b/app/scripts/controllers/loanAccount/RescheduleLoansRequestController.js @@ -4,13 +4,17 @@ scope.loanId = routeParams.loanId; scope.formData = {}; scope.rejectData = {}; + scope.adjustFuturePayments = true; scope.formData.submittedOnDate = new Date(); - resourceFactory.loanRescheduleResource.template({scheduleId:'template'},function(data){ + resourceFactory.loanRescheduleResource.template({scheduleId:'template', loanId:scope.loanId},function(data){ if (data.length > 0) { scope.formData.rescheduleReasonId = data.rescheduleReasons[0].id; } scope.codes = data.rescheduleReasons; + let transactionDate = data.loanTransactionData.date; + scope.adjustFuturePayments = data.adjustFuturePayments; + scope.formData.rescheduleFromDate =new Date(transactionDate) || new Date(); }); scope.cancel = function () { location.path('/viewloanaccount/' + scope.loanId); @@ -36,4 +40,4 @@ mifosX.ng.application.controller('RescheduleLoansRequestController', ['$scope', 'ResourceFactory', '$routeParams', '$location', 'dateFilter', mifosX.controllers.RescheduleLoansRequestController]).run(function ($log) { $log.info("RescheduleLoansRequestController initialized"); }); -}(mifosX.controllers || {})); \ No newline at end of file +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/loanAccount/ViewGLIMAccountController.js b/app/scripts/controllers/loanAccount/ViewGLIMAccountController.js index cf2805d2..0c98c407 100644 --- a/app/scripts/controllers/loanAccount/ViewGLIMAccountController.js +++ b/app/scripts/controllers/loanAccount/ViewGLIMAccountController.js @@ -8,15 +8,18 @@ scope.groupGLIMAccounts={}; scope.productName=""; scope.buttons={}; + scope.isExtendLoanLifeCycleConfig = false; scope.routeToLoan = function (id) { location.path('/viewloanaccount/' + id); }; var parentglimid=0; + resourceFactory.configurationResourceByName.get({name:'Add-More-Stages-To-A-Loan-Life-Cycle'},function (data) { + scope.isExtendLoanLifeCycleConfig = data.enabled; + }); - - resourceFactory.glimLoanTemplate.get({glimId: scope.glimId}, function (data) { + resourceFactory.glimLoanTemplate.get({glimId: scope.glimId,isRepayment: false}, function (data) { scope.glimAccounts = data; @@ -29,7 +32,7 @@ temp.childLoanId=data[i].childLoanId; temp.childLoanAccountNo=data[i].childLoanAccountNo; temp.approvedLoanAmount=parseFloat(data[i].childPrincipalAmount); - + temp.actualPrincipalAmount=parseFloat(data[i].actualPrincipalAmount); scope.totalLoanAmount+=parseFloat(data[i].childPrincipalAmount); diff --git a/app/scripts/controllers/loanAccount/ViewLoanDetailsController.js b/app/scripts/controllers/loanAccount/ViewLoanDetailsController.js index 8d6a9eda..7795ed54 100755 --- a/app/scripts/controllers/loanAccount/ViewLoanDetailsController.js +++ b/app/scripts/controllers/loanAccount/ViewLoanDetailsController.js @@ -1,6 +1,6 @@ (function (module) { mifosX.controllers = _.extend(module, { - ViewLoanDetailsController: function (scope, routeParams, resourceFactory,paginatorService, location, route, http, $uibModal, dateFilter, API_VERSION, $sce, $rootScope) { + ViewLoanDetailsController: function (scope, routeParams, resourceFactory,paginatorService, location, route, http, $uibModal, dateFilter, API_VERSION, $sce, $rootScope, $window) { scope.loandocuments = []; scope.report = false; scope.hidePentahoReport = true; @@ -86,6 +86,10 @@ case "writeoff": location.path('/loanaccount/' + accountId + '/writeoff'); break; + case "payoff": + location.path('/loanaccount/' + accountId + '/payoff'); + break; + case "recoverypayment": location.path('/loanaccount/' + accountId + '/recoverypayment'); break; @@ -124,6 +128,33 @@ case "foreclosure": location.path('loanforeclosure/' + accountId); break; + case "reviewapplication": + location.path('/loanaccount/' + accountId + '/reviewapplication'); + break; + case "duediligence": + location.path('/viewloanaccount/' + accountId + '/duediligence'); + break; + case "collateralreview": + location.path('/loanaccount/' + accountId + '/collateralreview'); + break; + case "icreviewlevelone": + location.path('/loanaccount/' + accountId + '/icreviewlevelone'); + break; + case "icreviewleveltwo": + location.path('/loanaccount/' + accountId + '/icreviewleveltwo'); + break; + case "icreviewlevelthree": + location.path('/loanaccount/' + accountId + '/icreviewlevelthree'); + break; + case "icreviewlevelfour": + location.path('/loanaccount/' + accountId + '/icreviewlevelfour'); + break; + case "icreviewlevelfive": + location.path('/loanaccount/' + accountId + '/icreviewlevelfive'); + break; + case "prepareandsigncontract": + location.path('/loanaccount/' + accountId + '/prepareandsigncontract'); + break; } }; @@ -158,10 +189,13 @@ scope.convertDateArrayToObject('date'); scope.recalculateInterest = data.recalculateInterest || true; scope.isWaived = scope.loandetails.repaymentSchedule.totalWaived > 0; - scope.date.fromDate = new Date(data.timeline.actualDisbursementDate); + scope.date.fromDate = new Date(data.timeline.actualDisbursementDate); scope.date.toDate = new Date(); scope.status = data.status.value; scope.chargeAction = data.status.value == "Submitted and pending approval" ? true : false; + if(scope.status == 'Submitted and pending approval' || scope.status == 'Approved'){ + scope.date.fromDate = new Date(data.timeline.submittedOnDate); + } scope.decimals = data.currency.decimalPlaces; if (scope.loandetails.charges) { scope.charges = scope.loandetails.charges; @@ -183,6 +217,77 @@ if (scope.status == "Submitted and pending approval" || scope.status == "Active" || scope.status == "Approved") { scope.choice = true; } + function getLoanStage(data) { + if((data.isExtendLoanLifeCycleConfig == false)){ + return { + name: "button.approve", + icon: "fa fa-check", + taskPermissionName: 'APPROVE_LOAN' + }; + }else if((data.isExtendLoanLifeCycleConfig == true && (data.loanDecisionState == null || data.loanDecisionState == ""))){ + return { + name: "button.reviewapplication", + icon: "fa fa-check", + taskPermissionName: 'ACCEPT_LOANAPPLICATIONREVIEW' + }; + }else if((data.isExtendLoanLifeCycleConfig == true && (data.loanDecisionState != null && data.loanDecisionState.value == "REVIEW_APPLICATION"))){ + return { + name: "button.duediligence", + icon: "fa fa-check", + taskPermissionName: 'ACCEPT_DUEDILIGENCE' + }; + }else if((data.isExtendLoanLifeCycleConfig == true && (data.loanDecisionState != null && data.loanDecisionState.value == "DUE_DILIGENCE"))){ + return { + name: "button.collateralreview", + icon: "fa fa-check", + taskPermissionName: 'ACCEPT_LOANCOLLATERALREVIEW' + }; + }else if((data.isExtendLoanLifeCycleConfig == true && (data.loanDecisionState != null && data.loanDecisionState.value == "COLLATERAL_REVIEW"))){ + return { + name: "button.icreviewlevelone", + icon: "fa fa-check", + taskPermissionName: 'ACCEPT_LOANICREVIEWDECISIONLEVELONE' + }; + }else if((data.isExtendLoanLifeCycleConfig == true && (data.loanDecisionState != null && data.loanDecisionState.value == "IC_REVIEW_LEVEL_ONE" && data.nextLoanIcReviewDecisionState.value == "IC_REVIEW_LEVEL_TWO"))){ + return { + name: "button.icreviewleveltwo", + icon: "fa fa-check", + taskPermissionName: 'ACCEPT_LOANICREVIEWDECISIONLEVELTWO' + }; + }else if((data.isExtendLoanLifeCycleConfig == true && (data.loanDecisionState != null && data.loanDecisionState.value == "IC_REVIEW_LEVEL_TWO" && data.nextLoanIcReviewDecisionState.value == "IC_REVIEW_LEVEL_THREE"))){ + return { + name: "button.icreviewlevelthree", + icon: "fa fa-check", + taskPermissionName: 'ACCEPT_LOANICREVIEWDECISIONLEVELTHREE' + }; + }else if((data.isExtendLoanLifeCycleConfig == true && (data.loanDecisionState != null && data.loanDecisionState.value == "IC_REVIEW_LEVEL_THREE" && data.nextLoanIcReviewDecisionState.value == "IC_REVIEW_LEVEL_FOUR"))){ + return { + name: "button.icreviewlevelfour", + icon: "fa fa-check", + taskPermissionName: 'ACCEPT_LOANICREVIEWDECISIONLEVELFOUR' + }; + }else if((data.isExtendLoanLifeCycleConfig == true && (data.loanDecisionState != null && data.loanDecisionState.value == "IC_REVIEW_LEVEL_FOUR" && data.nextLoanIcReviewDecisionState.value == "IC_REVIEW_LEVEL_FIVE"))){ + return { + name: "button.icreviewlevelfive", + icon: "fa fa-check", + taskPermissionName: 'ACCEPT_LOANICREVIEWDECISIONLEVELFIVE' + }; + }else if((data.isExtendLoanLifeCycleConfig == true && (data.loanDecisionState != null && data.nextLoanIcReviewDecisionState.value == "PREPARE_AND_SIGN_CONTRACT" && data.loanDecisionState.value != "PREPARE_AND_SIGN_CONTRACT"))){ + return { + name: "button.prepareandsigncontract", + icon: "fa fa-check", + taskPermissionName: 'ACCEPT_LOANPREPAREANDSIGNCONTRACT' + }; + } else if(((data.isExtendLoanLifeCycleConfig == true) && (data.loanDecisionState != null && data.nextLoanIcReviewDecisionState.value == "PREPARE_AND_SIGN_CONTRACT" && data.loanDecisionState.value == "PREPARE_AND_SIGN_CONTRACT"))){ + return { + name: "button.approve", + icon: "fa fa-check", + taskPermissionName: 'APPROVE_LOAN' + }; + }else{ + console.log("No Options Found here . . . . "); + } + } if (data.status.value == "Submitted and pending approval") { scope.buttons = { singlebuttons: [ { @@ -190,11 +295,7 @@ icon: "fa fa-plus", taskPermissionName: 'CREATE_LOANCHARGE' }, - { - name: "button.approve", - icon: "fa fa-check", - taskPermissionName: 'APPROVE_LOAN' - }, + getLoanStage(data), { name: "button.modifyapplication", icon: "fa fa-pincel-square-o", @@ -245,7 +346,6 @@ }) ; } } - if (data.status.value == "Approved") { scope.buttons = { singlebuttons: [ { @@ -290,7 +390,6 @@ }; } - if (data.status.value == "Active") { scope.buttons = { singlebuttons: [ { @@ -327,6 +426,11 @@ name: "button.writeoff", taskPermissionName: 'WRITEOFF_LOAN' }, + + { + name: "button.payoff", + taskPermissionName: 'PAY_OFF_LOAN' + }, { name: "button.close-rescheduled", taskPermissionName: 'CLOSEASRESCHEDULED_LOAN' @@ -569,15 +673,23 @@ location.path('/loan/'+scope.loandetails.id+'/viewcharge/'+chargeId).search({loanstatus:scope.loandetails.status.value}); }; - scope.viewprintdetails = function () { + scope.viewprintdetails = function (outputType) { //scope.printbtn = true; scope.report = true; scope.viewTransactionReport = false; scope.viewReport = true; scope.hidePentahoReport = true; - scope.formData.outputType = 'PDF'; - scope.baseURL = $rootScope.hostUrl + API_VERSION + "/runreports/" + encodeURIComponent("Client Loan Account Schedule"); - scope.baseURL += "?output-type=" + encodeURIComponent(scope.formData.outputType) + "&tenantIdentifier=" + $rootScope.tenantIdentifier+"&locale="+scope.optlang.code; + if(outputType === 'PDF'){ + scope.formData.outputType = 'PDF'; + }else{ + scope.formData.outputType = 'XLS'; + } + + + var reportURL = $rootScope.hostUrl + API_VERSION + "/runreports/" + encodeURIComponent("Client Loan Account Schedule"); + reportURL += "?output-type=" + encodeURIComponent(scope.formData.outputType) + "&tenantIdentifier=" + $rootScope.tenantIdentifier+"&locale="+scope.optlang.code; + + var reportParams = ""; scope.startDate = dateFilter(scope.date.fromDate, 'yyyy-MM-dd'); @@ -589,11 +701,28 @@ paramName = "R_selectLoan"; reportParams += encodeURIComponent(paramName) + "=" + encodeURIComponent(scope.loandetails.accountNo); if (reportParams > "") { - scope.baseURL += "&" + reportParams; + reportURL += "&" + reportParams; } // allow untrusted urls for iframe http://docs.angularjs.org/error/$sce/insecurl - scope.viewReportDetails = $sce.trustAsResourceUrl(scope.baseURL); + reportURL = $sce.trustAsResourceUrl(reportURL); + reportURL = $sce.valueOf(reportURL); + http.get(reportURL, {responseType: 'arraybuffer'}) + .then(function(response) { + let data = response.data; + let headers = response.headers; + var contentType = headers('Content-Type'); + var file = new Blob([data], {type: contentType}); + var fileContent = URL.createObjectURL(file); + + // Pass the form data to the iframe as a data url. + scope.baseURL = $sce.trustAsResourceUrl(fileContent); + scope.viewReportDetails = $sce.trustAsResourceUrl(fileContent); + }) + .catch(function(error){ + $log.error(`Error loading ${scope.reportType} report`); + $log.error(error); + }); }; scope.viewloantransactionreceipts = function (transactionId) { @@ -615,6 +744,7 @@ } // allow untrusted urls for iframe http://docs.angularjs.org/error/$sce/insecurl scope.viewReportDetails = $sce.trustAsResourceUrl(scope.baseURL); + $window.open(scope.viewReportDetails); //Just Testing If Data comes back but will be removed }; scope.viewloantransactionjournalentries = function(transactionId){ @@ -703,6 +833,12 @@ } return false; }; + scope.checkStatusNotActive = function(){ + if(scope.status == 'Submitted and pending approval' || scope.status == 'Approved'){ + return true; + } + return false; + }; scope.showAddDeleteTrancheButtons = function(action){ scope.return = true; @@ -732,7 +868,7 @@ }; } }); - mifosX.ng.application.controller('ViewLoanDetailsController', ['$scope', '$routeParams', 'ResourceFactory','PaginatorService', '$location', '$route', '$http', '$uibModal', 'dateFilter', 'API_VERSION', '$sce', '$rootScope', mifosX.controllers.ViewLoanDetailsController]).run(function ($log) { + mifosX.ng.application.controller('ViewLoanDetailsController', ['$scope', '$routeParams', 'ResourceFactory','PaginatorService', '$location', '$route', '$http', '$uibModal', 'dateFilter', 'API_VERSION', '$sce', '$rootScope','$window', mifosX.controllers.ViewLoanDetailsController]).run(function ($log) { $log.info("ViewLoanDetailsController initialized"); }); }(mifosX.controllers || {})); diff --git a/app/scripts/controllers/loanAccount/ViewRescheduleRequestController.js b/app/scripts/controllers/loanAccount/ViewRescheduleRequestController.js index 646fe19a..7e2838b6 100644 --- a/app/scripts/controllers/loanAccount/ViewRescheduleRequestController.js +++ b/app/scripts/controllers/loanAccount/ViewRescheduleRequestController.js @@ -13,6 +13,7 @@ scope.submittedOnDate = dateFilter(scope.submittedOnDate,"dd MMMM yyyy"); scope.loanRescheduleDetails.emichange = []; for(var i in scope.loanTermVariationsData) { + if(scope.loanTermVariationsData[i].termType.value == "dueDate") { scope.loanRescheduleDetails.adjustedDueDate = new Date(scope.loanTermVariationsData[i].dateValue); scope.loanRescheduleDetails.adjustedDueDate = dateFilter(scope.loanTermVariationsData[i].dateValue,"dd MMMM yyyy"); @@ -34,6 +35,11 @@ scope.extendRepaymentPeriod = true; } + if(scope.loanTermVariationsData[i].termType.value == "principalAmount") { + scope.loanRescheduleDetails.extraTerms = scope.loanTermVariationsData[i].decimalValue; + scope.principalAmountChange = true; + } + if(scope.loanTermVariationsData[i].termType.value == "interestRateForInstallment") { scope.loanRescheduleDetails.interestRate = scope.loanTermVariationsData[i].decimalValue; scope.adjustinterestrates = true; @@ -57,7 +63,9 @@ scope.reject = function(){ location.path('/loans/' + scope.loanId + '/rejectreschedulerequest/'+scope.requestId); }; + scope.approve = function(){ + location.path('/loans/' + scope.loanId + '/approvereschedulerequest/'+scope.requestId); }; @@ -66,7 +74,7 @@ }; scope.submit = function () { - location.path('/loans/' + scope.loanId + '/previewloanrepaymentschedule/'+scope.requestId); + location.path('/loans/' + scope.loanId + '/previewloanrepaymentschedule/'+scope.requestId); }; } diff --git a/app/scripts/controllers/main/TaskController.js b/app/scripts/controllers/main/TaskController.js index 8a942669..18e06d09 100644 --- a/app/scripts/controllers/main/TaskController.js +++ b/app/scripts/controllers/main/TaskController.js @@ -15,6 +15,7 @@ scope.restrictDate = new Date(); //this value will be changed within each specific tab scope.requestIdentifier = "loanId"; + scope.isExtendLoanLifeCycleConfig = false; scope.itemsPerPage = 15; @@ -26,6 +27,100 @@ }); }; scope.rescheduleData(); + resourceFactory.configurationResourceByName.get({name:'Add-More-Stages-To-A-Loan-Life-Cycle'},function (data) { + scope.isExtendLoanLifeCycleConfig = data.enabled; + }); + + //Review Application + scope.loanPendingReviewApplicationData = []; + scope.getLoanPendingReviewApplication = function(){ + var nextLoanDecisionStateValue = '100'; //100 will be interpreted as null in Backend + resourceFactory.getAllLoansPendingDecisionEngineResource.getAll({nextLoanDecisionState:nextLoanDecisionStateValue}, function (data) { + scope.loanPendingReviewApplicationData = data; + }); + }; + scope.getLoanPendingReviewApplication(); + + //Due Diligence + scope.loanPendingDueDiligenceData = []; + scope.getLoanPendingDueDiligence = function(){ + var nextLoanDecisionStateValue = '1000'; + resourceFactory.getAllLoansPendingDecisionEngineResource.getAll({nextLoanDecisionState:nextLoanDecisionStateValue}, function (data) { + scope.loanPendingDueDiligenceData = data; + }); + }; + scope.getLoanPendingDueDiligence(); + + //Collateral Review + scope.loanPendingCollateralReviewData = []; + scope.getLoanPendingCollateralReview = function(){ + var nextLoanDecisionStateValue = '1200'; + resourceFactory.getAllLoansPendingDecisionEngineResource.getAll({nextLoanDecisionState:nextLoanDecisionStateValue}, function (data) { + scope.loanPendingCollateralReviewData = data; + }); + }; + scope.getLoanPendingCollateralReview(); + + //IC Review Level One + scope.loanPendingIcReviewLevelOneData = []; + scope.getLoanPendingIcReviewLevelOne = function(){ + var nextLoanDecisionStateValue = '1300'; + resourceFactory.getAllLoansPendingDecisionEngineResource.getAll({nextLoanDecisionState:nextLoanDecisionStateValue}, function (data) { + scope.loanPendingIcReviewLevelOneData = data; + }); + }; + scope.getLoanPendingIcReviewLevelOne(); + + //IC Review Level Two + scope.loanPendingIcReviewLevelTwoData = []; + scope.getLoanPendingIcReviewLevelTwo = function(){ + var nextLoanDecisionStateValue = '1500'; + resourceFactory.getAllLoansPendingDecisionEngineResource.getAll({nextLoanDecisionState:nextLoanDecisionStateValue}, function (data) { + scope.loanPendingIcReviewLevelTwoData = data; + }); + }; + scope.getLoanPendingIcReviewLevelTwo(); + + //IC Review Level Three + scope.loanPendingIcReviewLevelThreeData = []; + scope.getLoanPendingIcReviewLevelThree = function(){ + var nextLoanDecisionStateValue = '1600'; + resourceFactory.getAllLoansPendingDecisionEngineResource.getAll({nextLoanDecisionState:nextLoanDecisionStateValue}, function (data) { + scope.loanPendingIcReviewLevelThreeData = data; + }); + }; + scope.getLoanPendingIcReviewLevelThree(); + + //IC Review Level Four + scope.loanPendingIcReviewLevelFourData = []; + scope.getLoanPendingIcReviewLevelFour = function(){ + var nextLoanDecisionStateValue = '1700'; + resourceFactory.getAllLoansPendingDecisionEngineResource.getAll({nextLoanDecisionState:nextLoanDecisionStateValue}, function (data) { + scope.loanPendingIcReviewLevelFourData = data; + }); + }; + scope.getLoanPendingIcReviewLevelFour(); + + //IC Review Level Five + scope.loanPendingIcReviewLevelFiveData = []; + scope.getLoanPendingIcReviewLevelFive = function(){ + var nextLoanDecisionStateValue = '1800'; + resourceFactory.getAllLoansPendingDecisionEngineResource.getAll({nextLoanDecisionState:nextLoanDecisionStateValue}, function (data) { + scope.loanPendingIcReviewLevelFiveData = data; + }); + }; + scope.getLoanPendingIcReviewLevelFive(); + + //Prepare And Sign Contract + scope.loanPendingPrepareAndSignContractData = []; + scope.getLoanPendingPrepareAndSignContract = function(){ + var nextLoanDecisionStateValue = '1900'; + resourceFactory.getAllLoansPendingDecisionEngineResource.getAll({nextLoanDecisionState:nextLoanDecisionStateValue}, function (data) { + scope.loanPendingPrepareAndSignContractData = data; + }); + }; + scope.getLoanPendingPrepareAndSignContract(); + resourceFactory.checkerInboxResource.get({templateResource: 'searchtemplate'}, function (data) { scope.checkerTemplate = data; @@ -332,7 +427,7 @@ }); - resourceFactory.clientResource.getAllClients({status: 'pending'}, function (data) { + resourceFactory.clientResource.getAllClients({limit:50, status: 'pending'}, function (data) { scope.groupedClients = _.groupBy(data.pageItems, "officeName"); }); diff --git a/app/scripts/controllers/product/AddSavingsProductFloatingInterestRateController.js b/app/scripts/controllers/product/AddSavingsProductFloatingInterestRateController.js new file mode 100644 index 00000000..6de63874 --- /dev/null +++ b/app/scripts/controllers/product/AddSavingsProductFloatingInterestRateController.js @@ -0,0 +1,29 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + AddSavingsProductFloatingInterestRateController: function (scope, routeParams, resourceFactory, location, dateFilter) { + scope.savingProductsFloatingInterestRate = {}; + scope.productId = routeParams.productId; + scope.floatingInterestRateId = routeParams.floatingInterestrateId; + + scope.submit = function () { + fromDateSelected = dateFilter(scope.savingProductsFloatingInterestRate.fromDate, scope.df); + endDateSelected = dateFilter(scope.savingProductsFloatingInterestRate.endDate, scope.df); + floatingInterestRateValue = scope.savingProductsFloatingInterestRate.floatingInterestRate; + var updatedSavingProductFloatingInterestRate = { + "fromDate": fromDateSelected, + "endDate": endDateSelected, + "floatingInterestRateValue": floatingInterestRateValue, + "dateFormat": scope.df, + "locale": scope.optlang.code, + }; + + resourceFactory.savingProductsFloatingInterestRateResource.save({savingProductId: scope.productId}, updatedSavingProductFloatingInterestRate, function (data) { + location.path('/viewsavingproduct/' + scope.productId + '/floatinginterestrate'); //viewsavingproduct/:productId/floatinginterestrate/:floatinginterestrateId + }); + }; + } + }); + mifosX.ng.application.controller('AddSavingsProductFloatingInterestRateController', ['$scope', '$routeParams', 'ResourceFactory', '$location','dateFilter', mifosX.controllers.AddSavingsProductFloatingInterestRateController]).run(function ($log) { + $log.info("AddSavingsProductFloatingInterestRateController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/product/CreateChargeController.js b/app/scripts/controllers/product/CreateChargeController.js index 8d81fa46..7c22b2f4 100644 --- a/app/scripts/controllers/product/CreateChargeController.js +++ b/app/scripts/controllers/product/CreateChargeController.js @@ -10,14 +10,22 @@ scope.first.date = new Date(); scope.translate = translate; scope.showFrequencyOptions = false; - scope.showPenalty = true ; + scope.showPenalty = true; scope.showfreewithdrawalfrequency = false; scope.showrestartfrequency = false; scope.paymentTypes = []; + scope.showMinAndMaxAmountSettings = false; + scope.loanChargeCalculationType = false; + scope.loanChargeTimeChange = false; + scope.varyAmounts = false; + scope.showAmountRangeSelector = false; + scope.showMaxOccurrence = false; + scope.chart = {}; resourceFactory.chargeTemplateResource.get(function (data) { scope.template = data; scope.showChargePaymentByField = true; + scope.showMinAndMaxAmountSettings = false; scope.chargeCalculationTypeOptions = data.chargeCalculationTypeOptions; scope.chargeTimeTypeOptions = data.chargeTimeTypeOptions; @@ -29,64 +37,86 @@ scope.expenseAccountOptions = data.expenseAccountOptions; scope.accountMappingForChargeConfig = data.accountMappingForChargeConfig; scope.accountMappingForCharge = []; - + + scope.chart.chartSlabs = []; + var accountMappingForChargeConfigVar = scope.accountMappingForChargeConfig.toLowerCase(); - if(accountMappingForChargeConfigVar.indexOf("asset") > -1){ + if (accountMappingForChargeConfigVar.indexOf("asset") > -1) { scope.accountMappingForCharge = scope.accountMappingForCharge.concat(scope.assetAccountOptions); } - if(accountMappingForChargeConfigVar.indexOf("liability") > -1){ + if (accountMappingForChargeConfigVar.indexOf("liability") > -1) { scope.accountMappingForCharge = scope.accountMappingForCharge.concat(scope.liabilityAccountOptions); } - if(accountMappingForChargeConfigVar.indexOf("expense") > -1){ + if (accountMappingForChargeConfigVar.indexOf("expense") > -1) { scope.accountMappingForCharge = scope.accountMappingForCharge.concat(scope.expenseAccountOptions); } - if(accountMappingForChargeConfigVar.indexOf("income") > -1){ + if (accountMappingForChargeConfigVar.indexOf("income") > -1) { scope.accountMappingForCharge = scope.accountMappingForCharge.concat(scope.incomeAccountOptions); } }); scope.chargeAppliesToSelected = function (chargeAppliesId) { - switch(chargeAppliesId) { + switch (chargeAppliesId) { case 1: scope.showChargePaymentByField = true; scope.chargeCalculationTypeOptions = scope.template.loanChargeCalculationTypeOptions; scope.chargeTimeTypeOptions = scope.template.loanChargeTimeTypeOptions; scope.showGLAccount = false; - break ; + scope.showMinAndMaxAmountSettings = false; + break; case 2: scope.showChargePaymentByField = false; scope.chargeCalculationTypeOptions = scope.template.savingsChargeCalculationTypeOptions; scope.chargeTimeTypeOptions = scope.template.savingsChargeTimeTypeOptions; scope.addfeefrequency = false; scope.showGLAccount = true; - break ; + scope.showMinAndMaxAmountSettings = true; + break; case 3: scope.showChargePaymentByField = false; scope.chargeCalculationTypeOptions = scope.template.clientChargeCalculationTypeOptions; scope.chargeTimeTypeOptions = scope.template.clientChargeTimeTypeOptions; scope.addfeefrequency = false; scope.showGLAccount = true; - break ; + scope.showMinAndMaxAmountSettings = false; + break; case 4: scope.showChargePaymentByField = false; scope.chargeCalculationTypeOptions = scope.template.shareChargeCalculationTypeOptions; scope.chargeTimeTypeOptions = scope.template.shareChargeTimeTypeOptions; scope.addfeefrequency = false; scope.showGLAccount = false; - scope.showPenalty = false ; - break ; + scope.showPenalty = false; + scope.showMinAndMaxAmountSettings = false; + break; + } + + + } + scope.chargeCalculationTypeChange = function (chargeCalculationType) { + scope.loanChargeCalculationType = false; + if (chargeCalculationType == 1) { + scope.loanChargeCalculationType = false; + } else { + scope.loanChargeCalculationType = true; } - - } //when chargeAppliesTo is savings, below logic is //to display 'Due date' field, if chargeTimeType is //'annual fee' or 'monthly fee' scope.chargeTimeChange = function (chargeTimeType) { scope.showFrequencyOptions = false; - if(chargeTimeType == 9){ + scope.showMaxOccurrence = false; + scope.loanChargeTimeChange = false; + if (chargeTimeType == 9) { scope.showFrequencyOptions = true; + scope.showMaxOccurrence = true; + } + if (chargeTimeType == 2) { + scope.loanChargeTimeChange = false; + } else { + scope.loanChargeTimeChange = true; } if (scope.showChargePaymentByField === false) { for (var i in scope.chargeTimeTypeOptions) { @@ -113,25 +143,92 @@ scope.showenablefreewithdrawal = true; scope.showenablepaymenttype = true; } - else{ + else { scope.showenablefreewithdrawal = false; scope.showenablepaymenttype = false; scope.showdatefield = false; scope.repeatEvery = false; } - } + } + + + } + } + + if (chargeTimeType == 19) { + scope.showAmountRangeSelector = true; + } else { + scope.showAmountRangeSelector = false; + } + } + /** + * Add a new row with default values for entering chart details + */ + scope.addNewRow = function () { + var fromPeriod = ''; + var toPeriod = ''; + var amountRangeTo = ''; + if (_.isNull(scope.chart.chartSlabs) || _.isUndefined(scope.chart.chartSlabs)) { + scope.chart.chartSlabs = []; + } else { + var lastChartSlab = {}; + if (scope.chart.chartSlabs.length > 0) { + lastChartSlab = angular.copy(scope.chart.chartSlabs[scope.chart.chartSlabs.length - 1]); + } else { + lastChartSlab = null; + } + if (!(_.isNull(lastChartSlab) || _.isUndefined(lastChartSlab))) { + if (scope.isPrimaryGroupingByAmount) { + if ((_.isNull(lastChartSlab.toPeriod) || _.isUndefined(lastChartSlab.toPeriod) || lastChartSlab.toPeriod.length == 0)) { + amountRangeFrom = _.isNull(lastChartSlab) ? '' : parseFloat(lastChartSlab.amountRangeTo) + 1; + fromPeriod = (_.isNull(lastChartSlab.fromPeriod) || _.isUndefined(lastChartSlab.fromPeriod) || lastChartSlab.fromPeriod.length == 0) ? '' : 1; + } else { + amountRangeFrom = lastChartSlab.amountRangeFrom; + amountRangeTo = lastChartSlab.amountRangeTo; + fromPeriod = _.isNull(lastChartSlab) ? '' : parseInt(lastChartSlab.toPeriod) + 1; + } + } else { + if ((_.isNull(lastChartSlab.amountRangeTo) || _.isUndefined(lastChartSlab.amountRangeTo) || lastChartSlab.amountRangeTo.length == 0)) { + amountRangeFrom = (_.isNull(lastChartSlab.amountRangeFrom) || _.isUndefined(lastChartSlab.amountRangeFrom) || lastChartSlab.amountRangeFrom.length == 0) ? '' : 1; + fromPeriod = _.isNull(lastChartSlab) ? '' : parseFloat(lastChartSlab.toPeriod) + 1; + } else { + fromPeriod = lastChartSlab.fromPeriod; + toPeriod = lastChartSlab.toPeriod; + amountRangeFrom = _.isNull(lastChartSlab) ? '' : parseInt(lastChartSlab.amountRangeTo) + 1; + } } + periodType = angular.copy(lastChartSlab.periodType); } + } + + + var chartSlab = { + "fromPeriod": fromPeriod, + }; + if (!_.isUndefined(toPeriod) && toPeriod.length > 0) { + chartSlab.toPeriod = toPeriod; + } + if (!_.isUndefined(amountRangeTo) && amountRangeTo.length > 0) { + chartSlab.amountRangeTo = amountRangeTo; + } + scope.chart.chartSlabs.push(chartSlab); + } + /** + * Remove chart details row + */ + scope.removeRow = function (index) { + scope.chart.chartSlabs.splice(index, 1); } - resourceFactory.paymentTypeResource.getAll( function (data) { + + resourceFactory.paymentTypeResource.getAll(function (data) { scope.paymentTypes = data; }); - resourceFactory.loanProductResource.get({resourceType: 'template'}, function (data) { + resourceFactory.loanProductResource.get({ resourceType: 'template' }, function (data) { scope.product = data; const i = 1; scope.filteredItems = scope.product.repaymentFrequencyTypeOptions.slice(0, i).concat(scope.product.repaymentFrequencyTypeOptions.slice(i + 1, scope.product.repaymentFrequencyTypeOptions.length)); @@ -145,14 +242,14 @@ scope.choice = 0; } - if(this.formData.enablepaymenttypes){ + if (this.formData.enablepaymenttypes) { scope.choice = 1; - }else if(!this.formData.enablepaymenttypes){ + } else if (!this.formData.enablepaymenttypes) { scope.choice = 0; } }; - scope.setOptions = function() { + scope.setOptions = function () { if (this.formData.enableFreeWithdrawalCharge) { scope.showfreewithdrawalfrequency = true; scope.showrestartfrequency = true; @@ -162,31 +259,29 @@ scope.showrestartfrequency = false; } - if(this.formData.enablePaymentType){ + if (this.formData.enablePaymentType) { scope.showpaymenttype = true; - }else if(!this.formData.enablePaymentType){ + } else if (!this.formData.enablePaymentType) { scope.showpaymenttype = false; } }; - scope.hideweek = function(){ - return this.formData.countFrequencyType.id !==1; + scope.hideweek = function () { + return this.formData.countFrequencyType.id !== 1; }; - scope.filterChargeCalculations = function(chargeTimeType) { + scope.filterChargeCalculations = function (chargeTimeType) { - return function (item) { - if (chargeTimeType == 12 && ((item.id == 3) || (item.id == 4))) - { - return false; - } - if (chargeTimeType != 12 && item.id == 5) - { - return false; - } - return true; - }; - }; + return function (item) { + if (chargeTimeType == 12 && ((item.id == 3) || (item.id == 4))) { + return false; + } + if (chargeTimeType != 12 && item.id == 5) { + return false; + } + return true; + }; + }; scope.submit = function () { //when chargeTimeType is 'annual' or 'monthly fee' then feeOnMonthDay added to //the formData @@ -198,7 +293,7 @@ } } - if( (scope.formData.chargeAppliesTo === 1 || scope.formData.chargeAppliesTo === 3 )&& scope.addfeefrequency == 'false'){ + if ((scope.formData.chargeAppliesTo === 1 || scope.formData.chargeAppliesTo === 3) && scope.addfeefrequency == 'false') { scope.formData.feeFrequency = null; scope.formData.feeInterval = null; } @@ -206,11 +301,17 @@ if (!scope.showChargePaymentByField) { delete this.formData.chargePaymentMode; } + + if(scope.varyAmounts){ + this.formData.chart = scope.chart + this.formData.amount = 0 + } this.formData.active = this.formData.active || false; this.formData.enableFreeWithdrawalCharge = this.formData.enableFreeWithdrawalCharge || false; this.formData.enablePaymentType = this.formData.enablePaymentType || false; this.formData.locale = scope.optlang.code; this.formData.monthDayFormat = 'dd MMM'; + resourceFactory.chargeResource.save(this.formData, function (data) { location.path('/viewcharge/' + data.resourceId); }); diff --git a/app/scripts/controllers/product/CreateFixedDepositProductController.js b/app/scripts/controllers/product/CreateFixedDepositProductController.js index 595e9758..38e66552 100755 --- a/app/scripts/controllers/product/CreateFixedDepositProductController.js +++ b/app/scripts/controllers/product/CreateFixedDepositProductController.js @@ -25,7 +25,8 @@ scope.liabilityAccountOptions = scope.product.accountingMappingOptions.liabilityAccountOptions || []; scope.incomeAccountOptions = scope.product.accountingMappingOptions.incomeAccountOptions || []; scope.expenseAccountOptions = scope.product.accountingMappingOptions.expenseAccountOptions || []; - + scope.productCategories = data.productCategories; + scope.productTypes = data.productTypes; scope.formData.currencyCode = data.currencyOptions[0].code; scope.formData.digitsAfterDecimal = data.currencyOptions[0].decimalPlaces; scope.formData.interestCompoundingPeriodType = data.interestCompoundingPeriodType.id; @@ -69,6 +70,19 @@ scope.showOrHideValue = 'show'; } } + scope.isAccountingEnabled = function () { + if (scope.formData.accountingRule == 2 || scope.formData.accountingRule == 3 ) { + return true; + } + return false; + } + + scope.isAccrualAccountingEnabled = function () { + if (scope.formData.accountingRule == 3 ) { + return true; + } + return false; + } scope.chargeSelected = function (chargeId) { if (chargeId) { diff --git a/app/scripts/controllers/product/CreateInterestRateChartController.js b/app/scripts/controllers/product/CreateInterestRateChartController.js index a6fc3ace..a1f79b80 100755 --- a/app/scripts/controllers/product/CreateInterestRateChartController.js +++ b/app/scripts/controllers/product/CreateInterestRateChartController.js @@ -36,7 +36,7 @@ scope.addNewRow = function () { var fromPeriod = ''; var amountRangeFrom = ''; - var periodType = ''; + var periodType = {}; var toPeriod = ''; var amountRangeTo = ''; if (_.isNull(scope.chart.chartSlabs) || _.isUndefined(scope.chart.chartSlabs)) { diff --git a/app/scripts/controllers/product/CreateLoanProductController.js b/app/scripts/controllers/product/CreateLoanProductController.js index 2171dd9a..e4fe3623 100755 --- a/app/scripts/controllers/product/CreateLoanProductController.js +++ b/app/scripts/controllers/product/CreateLoanProductController.js @@ -36,6 +36,9 @@ //Rates scope.rates = []; scope.rateFlag = false; + //set chart template + scope.chart = []; + scope.chart.chartSlabs = []; for (var i = 1; i <= 28; i++) { scope.interestRecalculationOnDayTypeOptions.push(i); } @@ -49,6 +52,8 @@ scope.penaltyOptions = scope.product.penaltyOptions || []; scope.chargeOptions = scope.product.chargeOptions || []; scope.overduecharges = []; + scope.productCategories=data.productCategories; + scope.productTypes=data.productTypes; for (var i in scope.penaltyOptions) { if (scope.penaltyOptions[i].chargeTimeType.code == 'chargeTimeType.overdueInstallment') { scope.overduecharges.push(scope.penaltyOptions[i]); @@ -83,6 +88,8 @@ scope.formData.isFloatingInterestRateCalculationAllowed = false ; scope.formData.isLinkedToFloatingInterestRates = false ; scope.formData.allowVariableInstallments = false ; + scope.formData.isBnplLoanProduct = false; + scope.formData.requiresEquityContribution = false; scope.product.interestRecalculationNthDayTypeOptions.push({"code" : "onDay", "id" : -2, "value" : "on day"}); scope.loanproduct = angular.copy(scope.formData); scope.isClicked = false; @@ -270,6 +277,11 @@ return false; } + scope.bnplValueChanged = () => { + scope.formData.requiresEquityContribution = false; + scope.formData.equityContributionLoanPercentage = null; + }; + scope.isAccrualAccountingEnabled = function () { if (scope.formData.accountingRule == 3 || scope.formData.accountingRule == 4) { return true; @@ -442,10 +454,140 @@ delete this.formData.recalculationRestFrequencyOnDayType; delete this.formData.recalculationRestFrequencyNthDayType; } + if(scope.chart.chartSlabs.length > 0){ + var newChart = copyChartData(scope.chart); + if(newChart.chartSlabs.length > 0){ + this.formData.charts = [];//declare charts array + this.formData.charts.push(newChart); + } + } resourceFactory.loanProductResource.save(this.formData, function (data) { location.path('/viewloanproduct/' + data.resourceId); }); }; + + /** + * Add a new row with default values for entering chart details + */ + scope.addNewRow = function () { + var fromPeriod = ''; + var amountRangeFrom = ''; + var periodType = {}; + var toPeriod = ''; + var amountRangeTo = ''; + if (_.isNull(scope.chart.chartSlabs) || _.isUndefined(scope.chart.chartSlabs)) { + scope.chart.chartSlabs = []; + } else { + var lastChartSlab = {}; + if (scope.chart.chartSlabs.length > 0) { + lastChartSlab = angular.copy(scope.chart.chartSlabs[scope.chart.chartSlabs.length - 1]); + }else{ + lastChartSlab = null; + } + if (!(_.isNull(lastChartSlab) || _.isUndefined(lastChartSlab))) { + if(scope.isPrimaryGroupingByAmount){ + if((_.isNull(lastChartSlab.toPeriod) || _.isUndefined(lastChartSlab.toPeriod) || lastChartSlab.toPeriod.length == 0)){ + amountRangeFrom = _.isNull(lastChartSlab) ? '' : parseFloat(lastChartSlab.amountRangeTo) + 1; + fromPeriod = (_.isNull(lastChartSlab.fromPeriod) || _.isUndefined(lastChartSlab.fromPeriod) || lastChartSlab.fromPeriod.length == 0)? '' : 1; + }else{ + amountRangeFrom = lastChartSlab.amountRangeFrom; + amountRangeTo = lastChartSlab.amountRangeTo; + fromPeriod = _.isNull(lastChartSlab) ? '' : parseInt(lastChartSlab.toPeriod) + 1; + } + }else{ + if((_.isNull(lastChartSlab.amountRangeTo) || _.isUndefined(lastChartSlab.amountRangeTo) || lastChartSlab.amountRangeTo.length == 0)){ + amountRangeFrom = (_.isNull(lastChartSlab.amountRangeFrom) || _.isUndefined(lastChartSlab.amountRangeFrom) || lastChartSlab.amountRangeFrom.length == 0) ? '' : 1; + fromPeriod = _.isNull(lastChartSlab) ? '' : parseFloat(lastChartSlab.toPeriod) + 1; + }else{ + fromPeriod = lastChartSlab.fromPeriod; + toPeriod = lastChartSlab.toPeriod; + amountRangeFrom = _.isNull(lastChartSlab) ? '' : parseInt(lastChartSlab.amountRangeTo) + 1; + } + } + periodType = 2 + } + } + + + var chartSlab = { + "fromPeriod": fromPeriod, + "periodType": periodType, + + }; + if(!_.isUndefined(toPeriod) && toPeriod.length > 0){ + chartSlab.toPeriod = toPeriod; + } + scope.chart.chartSlabs.push(chartSlab); + } + + /** + * Remove chart details row + */ + scope.removeRow = function (index) { + scope.chart.chartSlabs.splice(index, 1); + } + + /** + * create new chart data object + */ + + copyChartData = function () { + var newChartData = { + dateFormat: scope.df, + locale: scope.optlang.code, + fromDate: dateFilter(new Date(), scope.df), + chartSlabs: angular.copy(copyChartSlabs(scope.chart.chartSlabs)) + } + + //remove empty values + _.each(newChartData, function (v, k) { + if (!v) + delete newChartData[k]; + }); + + return newChartData; + } + + /** + * copy all chart details to a new Array + * @param chartSlabs + * @returns {Array} + */ + copyChartSlabs = function (chartSlabs) { + var detailsArray = []; + _.each(chartSlabs, function (chartSlab) { + var chartSlabData = copyChartSlab(chartSlab); + detailsArray.push(chartSlabData); + }); + return detailsArray; + } + + /** + * create new chart detail object data from chartSlab + * @param chartSlab + * + */ + + copyChartSlab = function (chartSlab) { + var newChartSlabData = { + id: chartSlab.id, + fromPeriod: chartSlab.fromPeriod, + toPeriod: chartSlab.toPeriod, + annualInterestRate: chartSlab.annualInterestRate, + locale: scope.optlang.code, + periodType : 2 + } + //remove empty values + _.each(newChartSlabData, function (v, k) { + if (!v && v != 0) { + // alert('key:' + k + " and value:" + v); + delete newChartSlabData[k]; + } + }); + + return newChartSlabData; + } + } }); mifosX.ng.application.controller('CreateLoanProductController', ['$scope','$rootScope', 'ResourceFactory', '$location', 'dateFilter','WizardHandler', '$translate', mifosX.controllers.CreateLoanProductController]).run(function ($log) { diff --git a/app/scripts/controllers/product/CreateRecurringDepositProductController.js b/app/scripts/controllers/product/CreateRecurringDepositProductController.js index f0c739a4..c26f7a1f 100755 --- a/app/scripts/controllers/product/CreateRecurringDepositProductController.js +++ b/app/scripts/controllers/product/CreateRecurringDepositProductController.js @@ -25,7 +25,8 @@ scope.liabilityAccountOptions = scope.product.accountingMappingOptions.liabilityAccountOptions || []; scope.incomeAccountOptions = scope.product.accountingMappingOptions.incomeAccountOptions || []; scope.expenseAccountOptions = scope.product.accountingMappingOptions.expenseAccountOptions || []; - + scope.productCategories = data.productCategories; + scope.productTypes = data.productTypes; scope.formData.currencyCode = data.currencyOptions[0].code; scope.formData.digitsAfterDecimal = data.currencyOptions[0].decimalPlaces; scope.formData.interestCompoundingPeriodType = data.interestCompoundingPeriodType.id; @@ -53,6 +54,20 @@ return obj[findattr] === model; })[retAttr]; }; + + scope.isAccountingEnabled = function () { + if (scope.formData.accountingRule == 2 || scope.formData.accountingRule == 3 ) { + return true; + } + return false; + } + + scope.isAccrualAccountingEnabled = function () { + if (scope.formData.accountingRule == 3 ) { + return true; + } + return false; + } //advanced accounting rule scope.showOrHide = function (showOrHideValue) { diff --git a/app/scripts/controllers/product/CreateSavingProductController.js b/app/scripts/controllers/product/CreateSavingProductController.js index 0304d450..0c345c2f 100644 --- a/app/scripts/controllers/product/CreateSavingProductController.js +++ b/app/scripts/controllers/product/CreateSavingProductController.js @@ -1,6 +1,6 @@ (function (module) { mifosX.controllers = _.extend(module, { - CreateSavingProductController: function (scope, $rootScope, resourceFactory, location , WizardHandler) { + CreateSavingProductController: function (scope, $rootScope, resourceFactory, location , dateFilter, WizardHandler) { scope.formData = {}; scope.savingproduct = {}; scope.charges = []; @@ -10,10 +10,13 @@ scope.penaltySpecificIncomeaccounts = []; scope.configureFundOption = {}; scope.isClicked = false; + scope.floatingInterestRates = []; resourceFactory.savingProductResource.get({resourceType: 'template'}, function (data) { scope.product = data; scope.product.chargeOptions = scope.product.chargeOptions || []; + scope.productCategories = data.productCategories; + scope.productTypes = data.productTypes; scope.assetAccountOptions = scope.product.accountingMappingOptions.assetAccountOptions || []; scope.liabilityAccountOptions = scope.product.accountingMappingOptions.liabilityAccountOptions || []; scope.incomeAccountOptions = scope.product.accountingMappingOptions.incomeAccountOptions || []; @@ -34,9 +37,10 @@ if(accountMappingForPaymentVar.indexOf("income") > -1){ scope.paymentOptions = scope.paymentOptions.concat(scope.incomeAccountOptions); } - + scope.formData.useFloatingInterestRate = false; + scope.formData.currencyCode = data.currencyOptions[0].code; scope.formData.digitsAfterDecimal = data.currencyOptions[0].decimalPlaces; scope.formData.interestCompoundingPeriodType = data.interestCompoundingPeriodType.id; @@ -78,6 +82,19 @@ scope.showOrHideValue = 'show'; } } + scope.isAccountingEnabled = function () { + if (scope.formData.accountingRule == 2 || scope.formData.accountingRule == 3 ) { + return true; + } + return false; + } + + scope.isAccrualAccountingEnabled = function () { + if (scope.formData.accountingRule == 3 ) { + return true; + } + return false; + } scope.chargeSelected = function (chargeId) { if (chargeId) { @@ -145,6 +162,56 @@ location.path('/savingproducts'); }; + /** + * Add floating interest rate from list + */ + scope.addNewRow = function () { + var fromDateSelected = ''; + var endDateSelected = ''; + var floatingInterestRateValue = ''; + if (_.isNull(scope.floatingInterestRates) || _.isUndefined(scope.floatingInterestRates)) { + scope.floatingInterestRates = []; + } else { + var lastFloatingInterestRate = {}; + if (scope.floatingInterestRates.length > 0) { + lastFloatingInterestRate = angular.copy(scope.floatingInterestRates[scope.floatingInterestRates.length - 1]); + }else{ + lastFloatingInterestRate = null; + } + if (!(_.isNull(lastFloatingInterestRate) || _.isUndefined(lastFloatingInterestRate))) { + fromDateSelected = dateFilter(lastFloatingInterestRate.fromDate, scope.df); + endDateSelected = dateFilter(lastFloatingInterestRate.endDate, scope.df); + floatingInterestRateValue = lastFloatingInterestRate.floatingInterestRateValue; + + /*var savingProductFloatingInterestRate = { + "fromDate": fromDateSelected, + "endDate": endDateSelected, + "floatingInterestRate": floatingInterestRateValue, + "dateFormat": scope.df, + "locale": scope.optlang.code, + }; + scope.floatingInterestRates.push(savingProductFloatingInterestRate);*/ + } + } + var savingProductFloatingInterestRate = { + "fromDate": fromDateSelected, + "endDate": endDateSelected, + "floatingInterestRateValue": floatingInterestRateValue, + "dateFormat": scope.df, + "locale": scope.optlang.code + }; + scope.floatingInterestRates.push(savingProductFloatingInterestRate); + }; + + /** + * Remove floating interest interest row + */ + scope.removeRow = function (index) { + scope.floatingInterestRates.splice(index, 1); + } + + //// + scope.submit = function () { scope.paymentChannelToFundSourceMappings = []; scope.feeToIncomeAccountMappings = []; @@ -192,6 +259,12 @@ this.formData.penaltyToIncomeAccountMappings = scope.penaltyToIncomeAccountMappings; this.formData.charges = scope.chargesSelected; this.formData.locale = scope.optlang.code; + for (var i in scope.floatingInterestRates) { + scope.floatingInterestRates[i].fromDate = dateFilter(scope.floatingInterestRates[i].fromDate, scope.df); + scope.floatingInterestRates[i].endDate = dateFilter(scope.floatingInterestRates[i].endDate, scope.df); + this.formData.nominalAnnualInterestRate = scope.floatingInterestRates[i].floatingInterestRateValue;//as nominal interest rate is required just populating it from any of floating rate + } + this.formData.floatingInterestRates = scope.floatingInterestRates; resourceFactory.savingProductResource.save(this.formData, function (data) { location.path('/viewsavingproduct/' + data.resourceId); @@ -199,7 +272,7 @@ } } }); - mifosX.ng.application.controller('CreateSavingProductController', ['$scope', '$rootScope', 'ResourceFactory', '$location','WizardHandler', mifosX.controllers.CreateSavingProductController]).run(function ($log) { + mifosX.ng.application.controller('CreateSavingProductController', ['$scope', '$rootScope', 'ResourceFactory', '$location','dateFilter','WizardHandler', mifosX.controllers.CreateSavingProductController]).run(function ($log) { $log.info("CreateSavingProductController initialized"); }); }(mifosX.controllers || {})); diff --git a/app/scripts/controllers/product/CreateValidationLimitController.js b/app/scripts/controllers/product/CreateValidationLimitController.js new file mode 100644 index 00000000..6488a2a2 --- /dev/null +++ b/app/scripts/controllers/product/CreateValidationLimitController.js @@ -0,0 +1,22 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + CreateValidationLimitController: function (scope, resourceFactory, location, dateFilter, translate) { + scope.template = []; + scope.formData = {}; + + resourceFactory.validationLimitTemplateResource.get(function (data) { + scope.template = data; + }); + + scope.submit = function () { + this.formData.locale = scope.optlang.code; + resourceFactory.validationLimitResource.save(this.formData, function (data) { + location.path('/validationlimit'); + }); + }; + } + }); + mifosX.ng.application.controller('CreateValidationLimitController', ['$scope', 'ResourceFactory', '$location', 'dateFilter', '$translate', mifosX.controllers.CreateValidationLimitController]).run(function ($log) { + $log.info("CreateValidationLimitController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/product/EditChargeController.js b/app/scripts/controllers/product/EditChargeController.js index bd560153..4aad9a83 100644 --- a/app/scripts/controllers/product/EditChargeController.js +++ b/app/scripts/controllers/product/EditChargeController.js @@ -6,8 +6,14 @@ scope.repeatEvery = false; scope.first = {}; scope.flag = false; - scope.showPenalty = true ; + scope.showPenalty = true ; + scope.showMinAndMaxAmountSettings = false; + scope.loanChargeCalculationType = false; + scope.loanChargeTimeChange = false; scope.paymentTypeOptions = []; + scope.varyAmounts = false; + scope.showAmountRangeSelector = false; + scope.chart = {}; resourceFactory.chargeResource.getCharge({chargeId: routeParams.id, template: true}, function (data) { scope.template = data; @@ -18,6 +24,11 @@ scope.expenseAccountOptions = data.expenseAccountOptions; scope.accountMappingForChargeConfig = data.accountMappingForChargeConfig; scope.accountMappingForCharge= []; + scope.varyAmounts = data.varyAmounts; + + if(data.varyAmounts){ + scope.chart.chartSlabs = data.charges; + } var accountMappingForChargeConfigVar = scope.accountMappingForChargeConfig.toLowerCase(); @@ -39,6 +50,11 @@ scope.template.chargeCalculationTypeOptions = scope.template.loanChargeCalculationTypeOptions; scope.flag = false; scope.showFrequencyOptions = true; + scope.showMaxOccurrence = true; + scope.showMinAndMaxAmountSettings = false; + if(typeof scope.paymentTypes !== 'undefined' || scope.paymentTypes != null){ + scope.template.chargeCalculationTypeOptions = scope.paymentTypes.loanChargeCalculationTypeOptions; + } } else if (data.chargeAppliesTo.value === "Savings") { scope.chargeTimeTypeOptions = data.savingsChargeTimeTypeOptions; scope.template.chargeCalculationTypeOptions = scope.template.savingsChargeCalculationTypeOptions; @@ -46,10 +62,12 @@ scope.flag = true; scope.showFrequencyOptions = false; scope.showGLAccount = true; + scope.showMinAndMaxAmountSettings = true; resourceFactory.paymentTypeResource.getAll( function (data) { scope.paymentTypeOptions = data; }); + scope.liquidationFee = data.chargeTimeType.id === "chargeTimeType.fdaPartialLiquidationFee" ? true : false; if(data.freeWithdrawal === true) { scope.showenablefreewithdrawal = true; scope.showpaymenttype = true; @@ -79,12 +97,14 @@ scope.showGLAccount = false; scope.showPenalty = false ; scope.flag = true; + scope.showMinAndMaxAmountSettings = false; }else { scope.flag = true; scope.template.chargeCalculationTypeOptions = data.clientChargeCalculationTypeOptions; scope.chargeTimeTypeOptions = scope.template.clientChargeTimeTypeOptions; scope.showFrequencyOptions = false; scope.showGLAccount = true; + scope.showMinAndMaxAmountSettings = false; } scope.formData = { @@ -100,8 +120,12 @@ chargeAppliesTo: data.chargeAppliesTo.id, chargeTimeType: data.chargeTimeType.id, chargeCalculationType: data.chargeCalculationType.id, - amount: data.amount + amount: data.amount, + minAmount: data.minAmount, + maxAmount: data.maxAmount, + maxOccurrence: data.maxOccurrence }; + if(data.incomeOrLiabilityAccount){ scope.formData.incomeAccountId = data.incomeOrLiabilityAccount.id; } @@ -115,7 +139,7 @@ } if(data.feeFrequency){ - scope.addfeefrequency = 'true'; + scope.addfeefrequency = true; scope.formData.feeFrequency = data.feeFrequency.id; scope.formData.feeInterval = data.feeInterval; } @@ -145,19 +169,24 @@ } else { scope.formData.chargePaymentMode = data.chargePaymentMode.id; } + if(data.chargeCalculationType){ + scope.chargeCalculationTypeChange(data.chargeCalculationType.id); + } + if(data.chargeTimeType){ + scope.chargeTimeChange(data.chargeTimeType.id); + } }); //when chargeAppliesTo is savings, below logic is //to display 'Due date' field, if chargeTimeType is // 'annual fee' or 'monthly fee' scope.chargeTimeChange = function (chargeTimeType) { - if ((chargeTimeType === 12) && (scope.template.chargeAppliesTo.value === "Loan")) - { - scope.showFrequencyOptions = false; - } - else - { - scope.showFrequencyOptions = true; - } + if ((chargeTimeType === 12) && (scope.template.chargeAppliesTo.value === "Loan") || chargeTimeType == 19 ) { + scope.showFrequencyOptions = false; + } + else { + scope.showMaxOccurrence = true; + scope.showFrequencyOptions = true; + } if (scope.formData.chargeAppliesTo === 2) { for (var i in scope.template.chargeTimeTypeOptions) { if (chargeTimeType === scope.template.chargeTimeTypeOptions[i].id) { @@ -175,7 +204,29 @@ } } } + if (chargeTimeType == 2) { + scope.loanChargeTimeChange = false; + } else { + scope.loanChargeTimeChange = true; + } + + if (chargeTimeType == 19) { + scope.showAmountRangeSelector = true; + scope.showenablefreewithdrawal = false; + } else { + scope.showAmountRangeSelector = false; + scope.showenablefreewithdrawal = true; + } } + scope.chargeCalculationTypeChange = function (chargeCalculationType) { + scope.loanChargeCalculationType = false; + if(chargeCalculationType == 1){ + scope.loanChargeCalculationType = false; + }else{ + scope.loanChargeCalculationType = true; + } + console.log(chargeCalculationType+" Charge Calculation type "+scope.loanChargeCalculationType); + } scope.filterChargeCalculations = function(chargeTimeType) { return function (item) { @@ -218,6 +269,64 @@ } }; + scope.addNewRow = function () { + var fromPeriod = ''; + var toPeriod = ''; + var amountRangeTo = ''; + if (_.isNull(scope.chart.chartSlabs) || _.isUndefined(scope.chart.chartSlabs)) { + scope.chart.chartSlabs = []; + } else { + var lastChartSlab = {}; + if (scope.chart.chartSlabs.length > 0) { + lastChartSlab = angular.copy(scope.chart.chartSlabs[scope.chart.chartSlabs.length - 1]); + } else { + lastChartSlab = null; + } + if (!(_.isNull(lastChartSlab) || _.isUndefined(lastChartSlab))) { + if (scope.isPrimaryGroupingByAmount) { + if ((_.isNull(lastChartSlab.toPeriod) || _.isUndefined(lastChartSlab.toPeriod) || lastChartSlab.toPeriod.length == 0)) { + amountRangeFrom = _.isNull(lastChartSlab) ? '' : parseFloat(lastChartSlab.amountRangeTo) + 1; + fromPeriod = (_.isNull(lastChartSlab.fromPeriod) || _.isUndefined(lastChartSlab.fromPeriod) || lastChartSlab.fromPeriod.length == 0) ? '' : 1; + } else { + amountRangeFrom = lastChartSlab.amountRangeFrom; + amountRangeTo = lastChartSlab.amountRangeTo; + fromPeriod = _.isNull(lastChartSlab) ? '' : parseInt(lastChartSlab.toPeriod) + 1; + } + } else { + if ((_.isNull(lastChartSlab.amountRangeTo) || _.isUndefined(lastChartSlab.amountRangeTo) || lastChartSlab.amountRangeTo.length == 0)) { + amountRangeFrom = (_.isNull(lastChartSlab.amountRangeFrom) || _.isUndefined(lastChartSlab.amountRangeFrom) || lastChartSlab.amountRangeFrom.length == 0) ? '' : 1; + fromPeriod = _.isNull(lastChartSlab) ? '' : parseFloat(lastChartSlab.toPeriod) + 1; + } else { + fromPeriod = lastChartSlab.fromPeriod; + toPeriod = lastChartSlab.toPeriod; + amountRangeFrom = _.isNull(lastChartSlab) ? '' : parseInt(lastChartSlab.amountRangeTo) + 1; + } + } + periodType = angular.copy(lastChartSlab.periodType); + } + } + + + var chartSlab = { + "fromPeriod": fromPeriod, + }; + if (!_.isUndefined(toPeriod) && toPeriod.length > 0) { + chartSlab.toPeriod = toPeriod; + } + if (!_.isUndefined(amountRangeTo) && amountRangeTo.length > 0) { + chartSlab.amountRangeTo = amountRangeTo; + } + scope.chart.chartSlabs.push(chartSlab); + } + + /** + * Remove chart details row + */ + scope.removeRow = function (index) { + scope.chart.chartSlabs.splice(index, 1); + } + + scope.submit = function () { if (scope.formData.chargeAppliesTo === 2) { if (scope.showdatefield === true) { @@ -229,6 +338,12 @@ scope.formData.feeFrequency = null; scope.formData.feeInterval = null; } + + if(scope.varyAmounts){ + this.formData.chart = scope.chart + delete this.formData.amount + } + this.formData.locale = scope.optlang.code; this.formData.active = this.formData.active || false; this.formData.enableFreeWithdrawalCharge = this.formData.enableFreeWithdrawalCharge || false; diff --git a/app/scripts/controllers/product/EditFixedDepositProductController.js b/app/scripts/controllers/product/EditFixedDepositProductController.js index 0a38a225..855a9b54 100755 --- a/app/scripts/controllers/product/EditFixedDepositProductController.js +++ b/app/scripts/controllers/product/EditFixedDepositProductController.js @@ -33,6 +33,8 @@ name: data.name, shortName: data.shortName, description: data.description, + productCategoryId: scope.product.productCategoryId, + productTypeId: scope.product.productTypeId, currencyCode: data.currency.code, digitsAfterDecimal: data.currency.decimalPlaces, inMultiplesOf: data.currency.inMultiplesOf, @@ -60,9 +62,15 @@ maxDepositTermTypeId: maxDepositTermTypeId, inMultiplesOfDepositTerm: data.inMultiplesOfDepositTerm, inMultiplesOfDepositTermTypeId: inMultiplesOfDepositTermTypeId, - withHoldTax: data.withHoldTax == true ? 'true' : 'false' + withHoldTax: data.withHoldTax == true ? 'true' : 'false', + isUSDProduct: data.isUSDProduct, + totalLiquidationAllowed: data.totalLiquidationAllowed, + allowPartialLiquidation: data.allowPartialLiquidation, + allowManuallyEnterInterestRate: data.allowManuallyEnterInterestRate } + scope.productCategories = data.productCategories; + scope.productTypes = data.productTypes; if(data.withHoldTax){ scope.formData.taxGroupId = data.taxGroup.id; } @@ -87,25 +95,41 @@ scope.formData.lockinPeriodFrequencyType = data.lockinPeriodFrequencyType.id; } - if (scope.formData.accountingRule == 2) { + if (scope.formData.accountingRule == 2 || scope.formData.accountingRule == 3) { + //Assets if(data.accountingMappings.savingsReferenceAccount){ scope.formData.savingsReferenceAccountId = data.accountingMappings.savingsReferenceAccount.id; } + if(data.accountingMappings){ + scope.formData.receivableFeeAccountId = data.accountingMappings.receivableFeeAccountId != null ? + data.accountingMappings.receivableFeeAccountId.id : null; + } + if(data.accountingMappings){ + scope.formData.receivablePenaltyAccountId = data.accountingMappings.receivablePenaltyAccountId != null ? + data.accountingMappings.receivablePenaltyAccountId.id : null; + } + //Liability if(data.accountingMappings.savingsControlAccount){ scope.formData.savingsControlAccountId = data.accountingMappings.savingsControlAccount.id; } if(data.accountingMappings.transfersInSuspenseAccount){ scope.formData.transfersInSuspenseAccountId = data.accountingMappings.transfersInSuspenseAccount.id; } + if(data.accountingMappings){ + scope.formData.interestPayableAccountId = data.accountingMappings.interestPayableAccountId != null ? + data.accountingMappings.interestPayableAccountId.id : null; + } if(data.accountingMappings.escheatLiabilityAccount){ scope.formData.escheatLiabilityId = data.accountingMappings.escheatLiabilityAccount.id; } + //Income if(data.accountingMappings.incomeFromFeeAccount){ scope.formData.incomeFromFeeAccountId = data.accountingMappings.incomeFromFeeAccount.id; } if(data.accountingMappings.incomeFromPenaltyAccount){ scope.formData.incomeFromPenaltyAccountId = data.accountingMappings.incomeFromPenaltyAccount.id; } + //Expense if(data.accountingMappings.interestOnSavingsAccount){ scope.formData.interestOnSavingsAccountId = data.accountingMappings.interestOnSavingsAccount.id; } @@ -147,7 +171,19 @@ }); } }); + scope.isAccountingEnabled = function () { + if (scope.formData.accountingRule == 2 || scope.formData.accountingRule == 3 ) { + return true; + } + return false; + } + scope.isAccrualAccountingEnabled = function () { + if (scope.formData.accountingRule == 3 ) { + return true; + } + return false; + } //advanced accounting rule scope.showOrHide = function (showOrHideValue) { diff --git a/app/scripts/controllers/product/EditLoanProductController.js b/app/scripts/controllers/product/EditLoanProductController.js index 6d8e7a28..784305fc 100755 --- a/app/scripts/controllers/product/EditLoanProductController.js +++ b/app/scripts/controllers/product/EditLoanProductController.js @@ -19,13 +19,19 @@ //Rates scope.rates = []; scope.rateFlag = false; + + scope.chart = {}; + for (var i = 1; i <= 28; i++) { scope.interestRecalculationOnDayTypeOptions.push(i); } resourceFactory.loanProductResource.get({loanProductId: routeParams.id, template: 'true'}, function (data) { scope.product = data; + scope.chart = scope.product.activeChart; scope.ratesEnabled = data.ratesEnabled; + scope.productCategories=data.productCategories; + scope.productTypes=data.productTypes; scope.assetAccountOptions = scope.product.accountingMappingOptions.assetAccountOptions || []; scope.incomeAccountOptions = scope.product.accountingMappingOptions.incomeAccountOptions || []; scope.expenseAccountOptions = scope.product.accountingMappingOptions.expenseAccountOptions || []; @@ -50,6 +56,8 @@ scope.product.interestRecalculationNthDayTypeOptions.push({"code" : "onDay", "id" : -2, "value" : "on day"}); scope.formData = { name: scope.product.name, + productCategoryId:scope.product.productCategoryId, + productTypeId:scope.product.productTypeId, shortName: scope.product.shortName, description: scope.product.description, fundId: scope.product.fundId, @@ -100,6 +108,11 @@ installmentAmountInMultiplesOf: scope.product.installmentAmountInMultiplesOf, canDefineInstallmentAmount : scope.product.canDefineInstallmentAmount, isEqualAmortization : scope.product.isEqualAmortization, + maxNumberOfLoanExtensionsAllowed : scope.product.maxNumberOfLoanExtensionsAllowed, + isAccountLevelArrearsToleranceEnable : scope.product.isAccountLevelArrearsToleranceEnable, + isBnplLoanProduct : scope.product.isBnplLoanProduct, + requiresEquityContribution : scope.product.requiresEquityContribution, + equityContributionLoanPercentage : scope.product.equityContributionLoanPercentage }; if (scope.product.isInterestRecalculationEnabled) { @@ -133,6 +146,10 @@ } } + if( scope.product.interestRecalculationData.rescheduleStrategyType.id == 3){ + scope.formData.advancePaymentInterestForExactDaysInPeriod = scope.product.interestRecalculationData.advancePaymentInterestForExactDaysInPeriod; + } + } if(scope.product.allowAttributeOverrides != null){ console.log('scope.product.allowAttributeOverrides : ',scope.product.allowAttributeOverrides); @@ -247,6 +264,7 @@ scope.formData.minimumGap = scope.product.minimumGap; scope.formData.maximumGap = scope.product.maximumGap; scope.formData.canUseForTopup = scope.product.canUseForTopup; + scope.formData.loanTermIncludesToppedUpLoanTerm = scope.product.loanTermIncludesToppedUpLoanTerm; //Rate Module scope.formData.rates = scope.product.rates; @@ -268,6 +286,11 @@ } }); + scope.bnplValueChanged = () => { + scope.formData.requiresEquityContribution = scope.product.requiresEquityContribution; + scope.formData.equityContributionLoanPercentage = scope.product.equityContributionLoanPercentage; + }; + //Rate scope.rateSelected = function(currentRate){ @@ -595,10 +618,158 @@ delete this.formData.recalculationRestFrequencyNthDayType; } + if(scope.chart){ + var newChart = copyChartData(scope.chart); + if(newChart.chartSlabs.length > 0){ + this.formData.charts = []; + this.formData.charts.push(newChart); + }else{ + this.formData.charts = []; + var chartData = { + id:scope.chart.id, + delete:true + } + this.formData.charts.push(chartData); + } + } + resourceFactory.loanProductResource.put({loanProductId: routeParams.id}, this.formData, function (data) { location.path('/viewloanproduct/' + data.resourceId); }); } + + /** + * Add a new row with default values for entering chart details + */ + scope.addNewRow = function () { + var fromPeriod = ''; + var amountRangeFrom = ''; + var toPeriod = ''; + var amountRangeTo = ''; + var periodType = {}; + if (_.isNull(scope.chart.chartSlabs) || _.isUndefined(scope.chart.chartSlabs)) { + scope.chart.chartSlabs = []; + } else { + var lastChartSlab = {}; + if (scope.chart.chartSlabs.length > 0) { + lastChartSlab = angular.copy(scope.chart.chartSlabs[scope.chart.chartSlabs.length - 1]); + }else{ + lastChartSlab = null; + } + if (!(_.isNull(lastChartSlab) || _.isUndefined(lastChartSlab))) { + if(scope.isPrimaryGroupingByAmount){ + if((_.isNull(lastChartSlab.toPeriod) || _.isUndefined(lastChartSlab.toPeriod) || lastChartSlab.toPeriod.length == 0)){ + amountRangeFrom = _.isNull(lastChartSlab) ? '' : parseFloat(lastChartSlab.amountRangeTo) + 1; + fromPeriod = (_.isNull(lastChartSlab.fromPeriod) || _.isUndefined(lastChartSlab.fromPeriod) || lastChartSlab.fromPeriod.length == 0)? '' : 1; + }else{ + amountRangeFrom = lastChartSlab.amountRangeFrom; + amountRangeTo = lastChartSlab.amountRangeTo; + fromPeriod = _.isNull(lastChartSlab) ? '' : parseInt(lastChartSlab.toPeriod) + 1; + } + }else{ + if((_.isNull(lastChartSlab.amountRangeTo) || _.isUndefined(lastChartSlab.amountRangeTo) || lastChartSlab.amountRangeTo.length == 0)){ + amountRangeFrom = (_.isNull(lastChartSlab.amountRangeFrom) || _.isUndefined(lastChartSlab.amountRangeFrom) || lastChartSlab.amountRangeFrom.length == 0) ? '' : 1; + fromPeriod = _.isNull(lastChartSlab) ? '' : parseFloat(lastChartSlab.toPeriod) + 1; + }else{ + fromPeriod = lastChartSlab.fromPeriod; + toPeriod = lastChartSlab.toPeriod; + amountRangeFrom = _.isNull(lastChartSlab) ? '' : parseInt(lastChartSlab.amountRangeTo) + 1; + } + } + periodType = 2 + } + } + + + var chartSlab = { + "fromPeriod": fromPeriod, + "periodType": periodType, + }; + if(!_.isUndefined(toPeriod) && toPeriod.length > 0){ + chartSlab.toPeriod = toPeriod; + } + scope.chart.chartSlabs.push(chartSlab); + } + + /** + * create new chart data object + */ + copyChartData = function () { + var newChartData = { + dateFormat: scope.df, + locale: scope.optlang.code, + fromDate: dateFilter(new Date(), scope.df), + chartSlabs: angular.copy(copyChartSlabs(scope.chart.chartSlabs)) + } + + //remove empty values + _.each(newChartData, function (v, k) { + if (!v) + delete newChartData[k]; + }); + + return newChartData; + } + + + /** + * copy all chart details to a new Array + * @param chartSlabs + * @returns {Array} + */ + copyChartSlabs = function (chartSlabs) { + var detailsArray = []; + _.each(chartSlabs, function (chartSlab) { + var chartSlabData = copyChartSlab(chartSlab); + detailsArray.push(chartSlabData); + }); + return detailsArray; + } + + /** + * create new chart detail object data from chartSlab + * @param chartSlab + * + */ + + copyChartSlab = function (chartSlab) { + var newChartSlabData = { + id: chartSlab.id, + fromPeriod: chartSlab.fromPeriod, + toPeriod: chartSlab.toPeriod, + annualInterestRate: chartSlab.annualInterestRate, + locale: scope.optlang.code, + periodType : 2 + } + //remove empty values + _.each(newChartSlabData, function (v, k) { + if (!v && v != 0) + delete newChartSlabData[k]; + }); + + return newChartSlabData; + } + + removeEmptyValues = function (objArray) { + _.each(objArray, function (v, k) { + //alert(k + ':' + v); + if (_.isNull(v) || _.isUndefined(v) || v === '') { + //alert('remove' + k + ':' + v); + delete objArray[k]; + } + + }); + + return objArray; + } + + /** + * Remove chart details row + */ + scope.removeRow = function (index) { + scope.chart.chartSlabs.splice(index, 1); + } + } }); mifosX.ng.application.controller('EditLoanProductController', ['$scope', 'ResourceFactory', '$location', '$routeParams', 'dateFilter', '$translate', mifosX.controllers.EditLoanProductController]).run(function ($log) { diff --git a/app/scripts/controllers/product/EditRecurringDepositProductController.js b/app/scripts/controllers/product/EditRecurringDepositProductController.js index 1e94c66f..7df7c683 100755 --- a/app/scripts/controllers/product/EditRecurringDepositProductController.js +++ b/app/scripts/controllers/product/EditRecurringDepositProductController.js @@ -33,6 +33,8 @@ shortName: data.shortName, description: data.description, currencyCode: data.currency.code, + productCategoryId: scope.product.productCategoryId, + productTypeId: scope.product.productTypeId, digitsAfterDecimal: data.currency.decimalPlaces, inMultiplesOf: data.currency.inMultiplesOf, minDepositAmount: data.minDepositAmount, @@ -57,11 +59,16 @@ inMultiplesOfDepositTermTypeId: inMultiplesOfDepositTermTypeId, isMandatoryDeposit:data.isMandatoryDeposit, allowWithdrawal:data.allowWithdrawal, + allowFreeWithdrawal:data.allowFreeWithdrawal, adjustAdvanceTowardsFuturePayments:data.adjustAdvanceTowardsFuturePayments, minBalanceForInterestCalculation:data.minBalanceForInterestCalculation, - withHoldTax: data.withHoldTax == true ? 'true' : 'false' + withHoldTax: data.withHoldTax == true ? 'true' : 'false', + addPenaltyOnMissedTargetSavings: data.addPenaltyOnMissedTargetSavings } + scope.productCategories = data.productCategories; + scope.productTypes = data.productTypes; + if(data.withHoldTax){ scope.formData.taxGroupId = data.taxGroup.id; } @@ -87,13 +94,29 @@ scope.formData.lockinPeriodFrequencyType = data.lockinPeriodFrequencyType.id; } - if (scope.formData.accountingRule == 2) { + if (scope.formData.accountingRule == 2 || scope.formData.accountingRule == 3) { + scope.formData.savingsReferenceAccountId = data.accountingMappings.savingsReferenceAccount.id; scope.formData.savingsControlAccountId = data.accountingMappings.savingsControlAccount.id; scope.formData.transfersInSuspenseAccountId = data.accountingMappings.transfersInSuspenseAccount.id; scope.formData.incomeFromFeeAccountId = data.accountingMappings.incomeFromFeeAccount.id; scope.formData.incomeFromPenaltyAccountId = data.accountingMappings.incomeFromPenaltyAccount.id; scope.formData.interestOnSavingsAccountId = data.accountingMappings.interestOnSavingsAccount.id; + scope.formData.writeOffAccountId = data.accountingMappings.writeOffAccount.id; + scope.formData.overdraftPortfolioControlId = data.accountingMappings.overdraftPortfolioControl.id; + scope.formData.incomeFromInterestId = data.accountingMappings.incomeFromInterest.id; + if(data.accountingMappings.receivableInterestAccountId) { + scope.formData.receivableInterestAccountId = data.accountingMappings.receivableInterestAccountId.id; + } + if(data.accountingMappings.receivableFeeAccountId) { + scope.formData.receivableFeeAccountId = data.accountingMappings.receivableFeeAccountId.id; + } + if(data.accountingMappings.receivablePenaltyAccountId) { + scope.formData.receivablePenaltyAccountId = data.accountingMappings.receivablePenaltyAccountId.id; + } + if(data.accountingMappings.interestPayableAccountId) { + scope.formData.interestPayableAccountId = data.accountingMappings.interestPayableAccountId.id; + } _.each(scope.product.paymentChannelToFundSourceMappings, function (fundSource) { scope.configureFundOptions.push({ diff --git a/app/scripts/controllers/product/EditSavingProductController.js b/app/scripts/controllers/product/EditSavingProductController.js index 612734b0..9623afd3 100755 --- a/app/scripts/controllers/product/EditSavingProductController.js +++ b/app/scripts/controllers/product/EditSavingProductController.js @@ -21,6 +21,8 @@ shortName: data.shortName, description: data.description, currencyCode: data.currency.code, + productCategoryId: scope.product.productCategoryId, + productTypeId: scope.product.productTypeId, digitsAfterDecimal: data.currency.decimalPlaces, inMultiplesOf: data.currency.inMultiplesOf, nominalAnnualInterestRate: data.nominalAnnualInterestRate, @@ -32,10 +34,11 @@ interestCalculationType: data.interestCalculationType.id, interestCalculationDaysInYearType: data.interestCalculationDaysInYearType.id, accountingRule: data.accountingRule.id, - allowOverdraft: data.allowOverdraft == true ? 'true' : 'false', + allowOverdraft: data.allowOverdraft, overdraftLimit: data.overdraftLimit, nominalAnnualInterestRateOverdraft: data.nominalAnnualInterestRateOverdraft, minOverdraftForInterestCalculation: data.minOverdraftForInterestCalculation, + postOverdraftInterestOnDeposit: data.postOverdraftInterestOnDeposit, minBalanceForInterestCalculation: data.minBalanceForInterestCalculation, enforceMinRequiredBalance: data.enforceMinRequiredBalance, minRequiredBalance:data.minRequiredBalance, @@ -43,9 +46,17 @@ isDormancyTrackingActive: data.isDormancyTrackingActive == true ? 'true':'false', daysToInactive: data.daysToInactive, daysToDormancy: data.daysToDormancy, - daysToEscheat: data.daysToEscheat + daysToEscheat: data.daysToEscheat, + isInterestPostingConfigUpdate: data.isInterestPostingConfigUpdate, + numOfCreditTransaction: data.numOfCreditTransaction, + numOfDebitTransaction: data.numOfDebitTransaction, + withdrawalFrequency: data.withdrawalFrequency, + withdrawalFrequencyEnum: data.withdrawalFrequencyEnum == null ? null : data.withdrawalFrequencyEnum.id, } scope.paymentOptions = []; + + scope.productCategories = data.productCategories; + scope.productTypes = data.productTypes; // scope.accountMappingForPayment = scope.product.accountMappingForPayment.toLowerCase(); var accountMappingForPaymentVar = scope.accountMappingForPayment; @@ -70,35 +81,59 @@ scope.formData.lockinPeriodFrequencyType = data.lockinPeriodFrequencyType.id; } - if(data.accountingMappings.savingsReferenceAccount){ - scope.formData.savingsReferenceAccountId = data.accountingMappings.savingsReferenceAccount.id; + if(data.accountingMappings){ + scope.formData.savingsReferenceAccountId = data.accountingMappings.savingsReferenceAccount != null ? + data.accountingMappings.savingsReferenceAccount.id : null; + } + if(data.accountingMappings){ + scope.formData.savingsControlAccountId = data.accountingMappings.savingsControlAccount != null ? + data.accountingMappings.savingsControlAccount.id : null; + } + if(data.accountingMappings){ + scope.formData.receivableInterestAccountId = data.accountingMappings.receivableInterestAccountId != null ? + data.accountingMappings.receivableInterestAccountId.id : null; + } + if(data.accountingMappings){ + scope.formData.receivableFeeAccountId = data.accountingMappings.receivableFeeAccountId != null ? + data.accountingMappings.receivableFeeAccountId.id : null; + } + if(data.accountingMappings){ + scope.formData.receivablePenaltyAccountId = data.accountingMappings.receivablePenaltyAccountId != null ? + data.accountingMappings.receivablePenaltyAccountId.id : null; } - if(data.accountingMappings.savingsControlAccount){ - scope.formData.savingsControlAccountId = data.accountingMappings.savingsControlAccount.id; + if(data.accountingMappings){ + scope.formData.transfersInSuspenseAccountId = data.accountingMappings.transfersInSuspenseAccount != null ? data.accountingMappings.transfersInSuspenseAccount.id + :null; } - if(data.accountingMappings.transfersInSuspenseAccount){ - scope.formData.transfersInSuspenseAccountId = data.accountingMappings.transfersInSuspenseAccount.id; + if(data.accountingMappings){ + scope.formData.escheatLiabilityId = data.accountingMappings.escheatLiabilityAccount != null ? + data.accountingMappings.escheatLiabilityAccount.id : null; } - if(data.accountingMappings.escheatLiabilityAccount){ - scope.formData.escheatLiabilityId = data.accountingMappings.escheatLiabilityAccount.id; + if(data.accountingMappings){ + scope.formData.interestPayableAccountId = data.accountingMappings.interestPayableAccountId != null ? + data.accountingMappings.interestPayableAccountId.id : null; } - if(data.accountingMappings.incomeFromFeeAccount){ - scope.formData.incomeFromFeeAccountId = data.accountingMappings.incomeFromFeeAccount.id; + if(data.accountingMappings){ + scope.formData.incomeFromFeeAccountId = data.accountingMappings.incomeFromFeeAccount != null ? + data.accountingMappings.incomeFromFeeAccount.id : null; } - if(data.accountingMappings.incomeFromPenaltyAccount){ - scope.formData.incomeFromPenaltyAccountId = data.accountingMappings.incomeFromPenaltyAccount.id; + if(data.accountingMappings){ + scope.formData.incomeFromPenaltyAccountId = data.accountingMappings.incomeFromPenaltyAccount != null ? + data.accountingMappings.incomeFromPenaltyAccount.id: null; } - if(data.accountingMappings.interestOnSavingsAccount){ - scope.formData.interestOnSavingsAccountId = data.accountingMappings.interestOnSavingsAccount.id; + if(data.accountingMappings){ + scope.formData.interestOnSavingsAccountId = data.accountingMappings.interestOnSavingsAccount != null ? + data.accountingMappings.interestOnSavingsAccount.id : null; } - if(data.accountingMappings.writeOffAccount){ - scope.formData.writeOffAccountId = data.accountingMappings.writeOffAccount.id; + if(data.accountingMappings){ + scope.formData.writeOffAccountId = data.accountingMappings.writeOffAccount !=null ? data.accountingMappings.writeOffAccount.id : null; } - if(data.accountingMappings.overdraftPortfolioControl){ - scope.formData.overdraftPortfolioControlId = data.accountingMappings.overdraftPortfolioControl.id; + if(data.accountingMappings){ + scope.formData.overdraftPortfolioControlId = data.accountingMappings.overdraftPortfolioControl !=null ? + data.accountingMappings.overdraftPortfolioControl.id : null; } - if(data.accountingMappings.incomeFromInterest){ - scope.formData.incomeFromInterestId = data.accountingMappings.incomeFromInterest.id; + if(data.accountingMappings){ + scope.formData.incomeFromInterestId = data.accountingMappings.incomeFromInterest !=null ? data.accountingMappings.incomeFromInterest.id : null; } _.each(scope.product.paymentChannelToFundSourceMappings, function (fundSource) { @@ -140,7 +175,19 @@ scope.showOrHideValue = 'show'; } } + scope.isAccountingEnabled = function () { + if (scope.formData.accountingRule == 2 || scope.formData.accountingRule == 3 ) { + return true; + } + return false; + } + scope.isAccrualAccountingEnabled = function () { + if (scope.formData.accountingRule == 3 ) { + return true; + } + return false; + } scope.chargeSelected = function (chargeId) { if (chargeId) { resourceFactory.chargeResource.get({chargeId: chargeId, template: 'true'}, this.formData, function (data) { diff --git a/app/scripts/controllers/product/EditSavingsProductFloatingInterestRateController.js b/app/scripts/controllers/product/EditSavingsProductFloatingInterestRateController.js new file mode 100644 index 00000000..80b760b2 --- /dev/null +++ b/app/scripts/controllers/product/EditSavingsProductFloatingInterestRateController.js @@ -0,0 +1,40 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + EditSavingsProductFloatingInterestRateController: function (scope, routeParams, resourceFactory, location, dateFilter) { + resourceFactory.savingProductsFloatingInterestRateResource.get({savingProductId: routeParams.productId, floatingInterestRateId: routeParams.floatingInterestrateId}, function (data) { + scope.savingProductsFloatingInterestRate = data; + if (scope.savingProductsFloatingInterestRate.fromDate) { + var fromDate = dateFilter(scope.savingProductsFloatingInterestRate.fromDate, scope.df); + scope.savingProductsFloatingInterestRate.fromDate = new Date(fromDate); + } + + if (scope.savingProductsFloatingInterestRate.endDate) { + var endDate = dateFilter(scope.savingProductsFloatingInterestRate.endDate, scope.df); + scope.savingProductsFloatingInterestRate.endDate = new Date(endDate); + } + }); + scope.productId = routeParams.productId; + scope.floatingInterestRateId = routeParams.floatingInterestrateId; + + scope.submit = function () { + fromDateSelected = dateFilter(scope.savingProductsFloatingInterestRate.fromDate, scope.df); + endDateSelected = dateFilter(scope.savingProductsFloatingInterestRate.endDate, scope.df); + floatingInterestRateValue = scope.savingProductsFloatingInterestRate.floatingInterestRate; + var updatedSavingProductFloatingInterestRate = { + "fromDate": fromDateSelected, + "endDate": endDateSelected, + "floatingInterestRateValue": floatingInterestRateValue, + "dateFormat": scope.df, + "locale": scope.optlang.code, + }; + + resourceFactory.savingProductsFloatingInterestRateResource.update({savingProductId: scope.productId, floatingInterestRateId: scope.floatingInterestRateId}, updatedSavingProductFloatingInterestRate, function (data) { + location.path('/viewsavingproduct/' + scope.productId + '/floatinginterestrate/' + scope.floatingInterestRateId); //viewsavingproduct/:productId/floatinginterestrate/:floatinginterestrateId + }); + }; + } + }); + mifosX.ng.application.controller('EditSavingsProductFloatingInterestRateController', ['$scope', '$routeParams', 'ResourceFactory', '$location','dateFilter', mifosX.controllers.EditSavingsProductFloatingInterestRateController]).run(function ($log) { + $log.info("EditSavingsProductFloatingInterestRateController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/product/EditValidationLimitController.js b/app/scripts/controllers/product/EditValidationLimitController.js new file mode 100644 index 00000000..5d030424 --- /dev/null +++ b/app/scripts/controllers/product/EditValidationLimitController.js @@ -0,0 +1,33 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + EditValidationLimitController: function (scope, resourceFactory, location, routeParams, dateFilter) { + scope.template = []; + + resourceFactory.validationLimitResource.getValidationLimit({ + validationLimitId: routeParams.id, + template: true + }, function (data) { + scope.template = data; + + scope.formData = { + clientLevelId: data.clientLevel.id, + maximumSingleDepositAmount: data.maximumSingleDepositAmount, + maximumCumulativeBalance: data.maximumCumulativeBalance, + maximumSingleWithdrawLimit: data.maximumSingleWithdrawLimit, + maximumDailyWithdrawLimit: data.maximumDailyWithdrawLimit, + maximumClientSpecificSingleWithdrawLimit: data.maximumClientSpecificSingleWithdrawLimit, + maximumClientSpecificDailyWithdrawLimit: data.maximumClientSpecificDailyWithdrawLimit + }; + }); + scope.submit = function () { + this.formData.locale = scope.optlang.code; + resourceFactory.validationLimitResource.update({validationLimitId: routeParams.id}, this.formData, function (data) { + location.path('/validationlimit'); + }); + }; + } + }); + mifosX.ng.application.controller('EditValidationLimitController', ['$scope', 'ResourceFactory', '$location', '$routeParams', 'dateFilter', mifosX.controllers.EditValidationLimitController]).run(function ($log) { + $log.info("EditValidationLimitController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/product/SavingsProductFloatingInterestRateController.js b/app/scripts/controllers/product/SavingsProductFloatingInterestRateController.js new file mode 100644 index 00000000..c39ae025 --- /dev/null +++ b/app/scripts/controllers/product/SavingsProductFloatingInterestRateController.js @@ -0,0 +1,41 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + SavingsProductFloatingInterestRateController: function (scope, routeParams, location, resourceFactory, route, $uibModal) { + + resourceFactory.savingProductsFloatingInterestRateResource.get({savingProductId: routeParams.productId, floatingInterestRateId: routeParams.floatingInterestrateId}, function (data) { + scope.savingProductsFloatingInterestRate = data; + }); + + scope.productId = routeParams.productId; + scope.floatingInterestRateId = routeParams.floatingInterestrateId; + + scope.deletefloatingInterestRate = function () { + $uibModal.open({ + templateUrl: 'deleteglfir.html', + controller: FloatingInterestDeleteCtrl + }); + }; + + var FloatingInterestDeleteCtrl = function ($scope, $uibModalInstance) { + $scope.delete = function () { + resourceFactory.savingProductsFloatingInterestRateResource.delete({savingProductId: routeParams.productId, floatingInterestRateId: routeParams.floatingInterestrateId}, {}, function (data) { + $uibModalInstance.close('delete'); + location.path('/viewsavingproduct/'+ scope.productId +'/floatinginterestrate'); + }); + }; + $scope.cancel = function () { + $uibModalInstance.dismiss('cancel'); + }; + }; + + scope.changeState = function (disabled) { + resourceFactory.accountCoaResource.update({'glAccountId': routeParams.id}, {disabled: !disabled}, function (data) { + route.reload(); + }); + }; + } + }); + mifosX.ng.application.controller('SavingsProductFloatingInterestRateController', ['$scope', '$routeParams', '$location', 'ResourceFactory', '$route', '$uibModal', mifosX.controllers.SavingsProductFloatingInterestRateController]).run(function ($log) { + $log.info("SavingsProductFloatingInterestRateController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/product/ValidationLimitController.js b/app/scripts/controllers/product/ValidationLimitController.js new file mode 100644 index 00000000..86cc32b6 --- /dev/null +++ b/app/scripts/controllers/product/ValidationLimitController.js @@ -0,0 +1,19 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + ValidationLimitController: function (scope, resourceFactory, location) { + scope.validationLimits = []; + + scope.routeTo = function (id) { + location.path('/viewvalidationlimit/' + id); + }; + + resourceFactory.validationLimitResource.getAllValidationLimit(function (data) { + scope.validationLimits = data; + console.log(scope.validationLimits); + }); + } + }); + mifosX.ng.application.controller('ValidationLimitController', ['$scope', 'ResourceFactory', '$location', mifosX.controllers.ValidationLimitController]).run(function ($log) { + $log.info("ValidationLimitController initialized"); + }); +}(mifosX.controllers || {})); \ No newline at end of file diff --git a/app/scripts/controllers/product/ViewChargeController.js b/app/scripts/controllers/product/ViewChargeController.js index 4206c012..c7594bef 100644 --- a/app/scripts/controllers/product/ViewChargeController.js +++ b/app/scripts/controllers/product/ViewChargeController.js @@ -3,6 +3,7 @@ ViewChargeController: function (scope, routeParams, resourceFactory, location, $uibModal) { scope.charge = []; scope.choice = 0; + scope.varyAmounts = true; resourceFactory.chargeResource.get({chargeId: routeParams.id}, function (data) { scope.charge = data; diff --git a/app/scripts/controllers/product/ViewFixedDepositProductController.js b/app/scripts/controllers/product/ViewFixedDepositProductController.js index 162c0e31..66293268 100755 --- a/app/scripts/controllers/product/ViewFixedDepositProductController.js +++ b/app/scripts/controllers/product/ViewFixedDepositProductController.js @@ -3,8 +3,12 @@ ViewFixedDepositProductController: function(scope, routeParams , location , anchorScroll , resourceFactory,$uibModal ) { resourceFactory.fixedDepositProductResource.get({productId: routeParams.productId , template: 'true'} , function(data) { scope.depositproduct = data; + let productType = data.productTypes.filter(pt=>pt.id===data.productTypeId)[0] + scope.depositproduct.productType = productType?productType.name:''; + let productCategory = data.productCategories.filter(pc=>pc.id===data.productCategoryId)[0] + scope.depositproduct.productCategory = productCategory?productCategory.name:''; scope.chartSlabs = scope.depositproduct.activeChart.chartSlabs; - scope.hasAccounting = data.accountingRule.id == 2 ? true : false; + scope.hasAccounting = data.accountingRule.id == 2 || data.accountingRule.id == 3 ? true : false; }); scope.scrollto = function (link){ diff --git a/app/scripts/controllers/product/ViewLoanProductController.js b/app/scripts/controllers/product/ViewLoanProductController.js index c6360ae5..39b84e9a 100755 --- a/app/scripts/controllers/product/ViewLoanProductController.js +++ b/app/scripts/controllers/product/ViewLoanProductController.js @@ -7,6 +7,10 @@ resourceFactory.loanProductResource.get({loanProductId: routeParams.id, template: 'true'}, function (data) { scope.loanproduct = data; + let productType = data.productTypes.filter(pt=>pt.id===data.productTypeId)[0] + scope.loanproduct.productType = productType ? productType.name: ''; + let productCategory = data.productCategories.filter(pc=>pc.id===data.productCategoryId)[0] + scope.loanproduct.productCategory = productCategory ? productCategory.name: ''; if (data.accountingRule.id == 2 || data.accountingRule.id == 3 || data.accountingRule.id == 4) { scope.isAccountingEnabled = true; } diff --git a/app/scripts/controllers/product/ViewRecurringDepositProductController.js b/app/scripts/controllers/product/ViewRecurringDepositProductController.js index 0292ea49..d152dede 100755 --- a/app/scripts/controllers/product/ViewRecurringDepositProductController.js +++ b/app/scripts/controllers/product/ViewRecurringDepositProductController.js @@ -3,8 +3,12 @@ ViewRecurringDepositProductController: function(scope, routeParams , location , anchorScroll , resourceFactory,$uibModal ) { resourceFactory.recurringDepositProductResource.get({productId: routeParams.productId , template: 'true'} , function(data) { scope.depositproduct = data; + let productType = data.productTypes.filter(pt=>pt.id===data.productTypeId)[0] + scope.depositproduct.productType = productType ? productType.name: ''; + let productCategory = data.productCategories.filter(pc=>pc.id===data.productCategoryId)[0] + scope.depositproduct.productCategory = productCategory ? productCategory.name: ''; scope.chartSlabs = scope.depositproduct.activeChart.chartSlabs; - scope.hasAccounting = data.accountingRule.id == 2 ? true : false; + scope.hasAccounting = data.accountingRule.id == 2 || data.accountingRule.id == 3 ? true : false; }); scope.scrollto = function (link){ diff --git a/app/scripts/controllers/product/ViewSavingProductController.js b/app/scripts/controllers/product/ViewSavingProductController.js index e968d2f9..6ca5a407 100644 --- a/app/scripts/controllers/product/ViewSavingProductController.js +++ b/app/scripts/controllers/product/ViewSavingProductController.js @@ -3,7 +3,12 @@ ViewSavingProductController: function (scope, routeParams, location, anchorScroll, resourceFactory) { resourceFactory.savingProductResource.get({savingProductId: routeParams.id, template: 'true'}, function (data) { scope.savingproduct = data; - scope.hasAccounting = data.accountingRule.id == 2 ? true : false; + let productType = data.productTypes.filter(pt=>pt.id===data.productTypeId)[0] + scope.savingproduct.productType = productType ? productType.name: ''; + let productCategory = data.productCategories.filter(pc=>pc.id===data.productCategoryId)[0] + scope.savingproduct.productCategory = productCategory ? productCategory.name: ''; + scope.chartSlabs = scope.depositproduct.activeChart.chartSlabs; + scope.hasAccounting = data.accountingRule.id == 2 || data.accountingRule.id == 3 ? true : false; }); scope.scrollto = function (link) { diff --git a/app/scripts/controllers/product/ViewSavingsProductFloatingInterestRatesController.js b/app/scripts/controllers/product/ViewSavingsProductFloatingInterestRatesController.js new file mode 100644 index 00000000..dd13e68c --- /dev/null +++ b/app/scripts/controllers/product/ViewSavingsProductFloatingInterestRatesController.js @@ -0,0 +1,18 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + ViewSavingsProductFloatingInterestRatesController: function (scope, routeParams, location, anchorScroll, resourceFactory) { + resourceFactory.savingProductResource.get({savingProductId: routeParams.id, template: 'true'}, function (data) { + scope.savingproduct = data; + }); + + scope.productId = routeParams.id; + + scope.routeTo = function (id) { + location.path('/viewsavingproduct/'+ scope.productId +'/floatinginterestrate/' + id); + }; + } + }); + mifosX.ng.application.controller('ViewSavingsProductFloatingInterestRatesController', ['$scope', '$routeParams', '$location', '$anchorScroll' , 'ResourceFactory', mifosX.controllers.ViewSavingsProductFloatingInterestRatesController]).run(function ($log) { + $log.info("ViewSavingsProductFloatingInterestRatesController initialized"); + }); +}(mifosX.controllers || {})); \ No newline at end of file diff --git a/app/scripts/controllers/product/ViewValidationLimitController.js b/app/scripts/controllers/product/ViewValidationLimitController.js new file mode 100644 index 00000000..403c52ba --- /dev/null +++ b/app/scripts/controllers/product/ViewValidationLimitController.js @@ -0,0 +1,14 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + ViewValidationLimitController: function (scope, routeParams, resourceFactory, location, $uibModal) { + scope.validationLimit = []; + scope.choice = 0; + resourceFactory.validationLimitResource.getValidationLimit({validationLimitId: routeParams.id}, function (data) { + scope.validationLimit = data; + }); + } + }); + mifosX.ng.application.controller('ViewValidationLimitController', ['$scope', '$routeParams', 'ResourceFactory', '$location', '$uibModal', mifosX.controllers.ViewValidationLimitController]).run(function ($log) { + $log.info("ViewValidationLimitController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/product/tax/ViewTaxComponentController.js b/app/scripts/controllers/product/tax/ViewTaxComponentController.js index 197ba89d..90d8cc9c 100644 --- a/app/scripts/controllers/product/tax/ViewTaxComponentController.js +++ b/app/scripts/controllers/product/tax/ViewTaxComponentController.js @@ -4,6 +4,7 @@ resourceFactory.taxcomponent.get({taxComponentId: routeParams.taxComponentId, template: 'true'},function (data) { scope.taxComponent = data; + scope.componentHistory = data.taxComponentHistories; }); } diff --git a/app/scripts/controllers/reports/RunReportsController.js b/app/scripts/controllers/reports/RunReportsController.js index ab1680b0..63fbc239 100644 --- a/app/scripts/controllers/reports/RunReportsController.js +++ b/app/scripts/controllers/reports/RunReportsController.js @@ -128,6 +128,13 @@ return collapsed; }; + scope.exportexcel = function () { + const aboutData = scope.reportName+'.xlsx'; + let htmltable = angular.element(document).find('#report-export-table'); + const html = htmltable[0].outerHTML; + window.open('data:application/vnd.ms-excel;charset=utf-8,' + encodeURIComponent(html), aboutData); + } + function invalidDate(checkDate) { // validates for yyyy-mm-dd returns true if invalid, false is valid var dateformat = /^\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}$/; diff --git a/app/scripts/controllers/savings/AddMemberToGSimAccountController.js b/app/scripts/controllers/savings/AddMemberToGSimAccountController.js new file mode 100644 index 00000000..d0a78268 --- /dev/null +++ b/app/scripts/controllers/savings/AddMemberToGSimAccountController.js @@ -0,0 +1,69 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + AddMemberToGSimAccountController: function ($q, scope, routeParams, route, location, resourceFactory, $uibModal) { + scope.groupId=routeParams.groupId; + scope.gsimAccountNumber=routeParams.gsimAccountNumber; + scope.parentGSIMId=routeParams.parentGSIMId; + scope.gsimChildAccountId=routeParams.gsimChildAccountId; + scope.allMembers = []; + scope.formData = {}; + scope.lockinPeriodFrequencyTypeStandBy; + scope.lockinPeriodFrequencyStandBy; + + resourceFactory.savingsResource.get({accountId: scope.gsimChildAccountId, template: 'true', associations: 'charges',staffInSelectedOfficeOnly:'true'}, function (data) { + scope.data = data; + if (data.groupId) { + scope.formData.groupId = data.groupId; + scope.groupName = data.groupName; + } + scope.formData.nominalAnnualInterestRate = data.nominalAnnualInterestRate; + scope.formData.productId = data.savingsProductId; + scope.products = data.productOptions; + scope.formData.lockinPeriodFrequency = data.lockinPeriodFrequency; + scope.lockinPeriodFrequencyStandBy = data.lockinPeriodFrequency; + scope.formData.locale = "en"; + scope.formData.isGSIM = true; + if (data.lockinPeriodFrequencyType){ + scope.formData.lockinPeriodFrequencyType = data.lockinPeriodFrequencyType.id; + scope.lockinPeriodFrequencyTypeStandBy = data.lockinPeriodFrequencyType.id; + } + console.log(scope.data); + }); + + + scope.viewClient = function (item) { + scope.client = item; + }; + + scope.clientOptions = function(value){ + var deferred = $q.defer(); + resourceFactory.groupGSIMAccountResource.getAllGSimAccountMembersWithOutSavingsAccount({groupId: scope.groupId,parentGSIMAccountNo:scope.gsimAccountNumber,name: value, orderBy : 'name', sortOrder : 'ASC'}, function (data) { + deferred.resolve(data[0].savingsSummaryCustoms); + }); + return deferred.promise; + }; + + resourceFactory.groupGSIMAccountResource.get({groupId: scope.groupId,parentGSIMAccountNo:scope.gsimAccountNumber}, function (data) { + scope.allMembers = data[0].childGSIMAccounts; + }); + + scope.submit = function () { + this.formData.clientId = scope.client.id; + + resourceFactory.addMemberToGsimResource.addmember({'parentAccountId': scope.parentGSIMId}, this.formData, function (data) { + location.path('/viewgsimaccount/' + scope.groupId+"/"+scope.gsimAccountNumber); + }); + }; + + scope.cancel = function(){ + scope.available = ""; + this.formData.vaultTargetAmount = null; + this.formData.lockinPeriodFrequency = scope.lockinPeriodFrequencyStandBy; + this.formData.lockinPeriodFrequencyType = scope.lockinPeriodFrequencyTypeStandBy; + } + } + }); + mifosX.ng.application.controller('AddMemberToGSimAccountController', ['$q','$scope', '$routeParams', '$route', '$location', 'ResourceFactory', '$uibModal', mifosX.controllers.AddMemberToGSimAccountController]).run(function ($log) { + $log.info("AddMemberToGSimAccountController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/savings/AddNewSavingsChargeController.js b/app/scripts/controllers/savings/AddNewSavingsChargeController.js index 3df800e1..faa44d74 100644 --- a/app/scripts/controllers/savings/AddNewSavingsChargeController.js +++ b/app/scripts/controllers/savings/AddNewSavingsChargeController.js @@ -15,6 +15,8 @@ scope.chargeTimeType = data.chargeTimeType.id; scope.chargeDetails = data; scope.formData.amount = data.amount; + scope.minAmount = data.minAmount; + scope.maxAmount = data.maxAmount; if(data.chargeTimeType.value === "Withdrawal Fee" || data.chargeTimeType.value === "Saving No Activity Fee"){ scope.dueDateNotRequired = true; diff --git a/app/scripts/controllers/savings/CreateGSIMAccountController.js b/app/scripts/controllers/savings/CreateGSIMAccountController.js index 8e030e0a..060ea93e 100644 --- a/app/scripts/controllers/savings/CreateGSIMAccountController.js +++ b/app/scripts/controllers/savings/CreateGSIMAccountController.js @@ -1,332 +1,332 @@ -(function (module) { - mifosX.controllers = _.extend(module, { - CreateGSIMAccountController: function (scope, resourceFactory, location, routeParams, dateFilter, WizardHandler) { - scope.products = []; - scope.fieldOfficers = []; - scope.formData1 = {}; - scope.formData = {}; - scope.formDat = {}; - scope.restrictDate = new Date(); - scope.clientId = routeParams.clientId; - scope.groupId = routeParams.groupId; - scope.date = {}; - scope.date.submittedOnDate = new Date(); - scope.datatables = []; - scope.noOfTabs = 1; - scope.step = '-'; - scope.formData1.datatables = []; - scope.formDat.datatables = []; - scope.tf = "HH:mm"; - scope.tempDataTables = []; - scope.isAllClientSelected = false; - scope.group={}; - scope.group.clients=[]; - - if (routeParams.centerEntity) { - scope.centerEntity = true; - } - scope.charges = []; - scope.inparams = {}; - if (scope.clientId) { - scope.inparams.clientId = scope.clientId - } - ; - if (scope.groupId) { - scope.inparams.groupId = scope.groupId - } - ; - if (scope.centerId) { - scope.inparams.centerId = scope.centerId - } - ; - - scope.inparams.staffInSelectedOfficeOnly = true; - - resourceFactory.groupClients.get({groupId:scope.groupId,associations:'activeClientMembers'}, function (data) { - - scope.group= data; - scope.group.clients= data.activeClientMembers; - }); - - scope.checkerInboxAllCheckBoxesMet = function() { - if(!angular.isUndefined(scope.group.clients)) { - var count = 0; - for (var i in scope.group.clients) { - if(scope.group.clients[i].isSelected){ - count++; - } - } - scope.isAllClientSelected = (scope.group.clients.length==count); - return scope.isAllClientSelected; - } - } - scope.checkerInboxAllCheckBoxesClicked = function() { - scope.isAllClientSelected = !scope.isAllClientSelected; - if(!angular.isUndefined(scope.group.clients)) { - for (var i in scope.group.clients) { - scope.group.clients[i].isSelected = scope.isAllClientSelected; - } - } - } - resourceFactory.savingsTemplateResource.get(scope.inparams, function (data) { - scope.products = data.productOptions; - scope.chargeOptions = data.chargeOptions; - scope.clientName = data.clientName; - scope.groupName = data.groupName; - scope.datatables = data.datatables; - scope.handleDatatables(scope.datatables); - }); - - scope.handleDatatables = function (datatables) { - if (!_.isUndefined(datatables) && datatables.length > 0) { - scope.formData1.datatables = []; - scope.formDat.datatables = []; - scope.noOfTabs = datatables.length + 1; - angular.forEach(datatables, function (datatable, index) { - scope.updateColumnHeaders(datatable.columnHeaderData); - angular.forEach(datatable.columnHeaderData, function (colHeader, i) { - if (_.isEmpty(scope.formDat.datatables[index])) { - scope.formDat.datatables[index] = {data: {}}; - } - - if (_.isEmpty(scope.formData1.datatables[index])) { - scope.formData1.datatables[index] = { - registeredTableName: datatable.registeredTableName, - data: {locale: scope.optlang.code} - }; - } - - if (datatable.columnHeaderData[i].columnDisplayType == 'DATETIME') { - scope.formDat.datatables[index].data[datatable.columnHeaderData[i].columnName] = {}; - } - }); - }); - } - }; - - scope.updateColumnHeaders = function(columnHeaderData) { - var colName = columnHeaderData[0].columnName; - if (colName == 'id') { - columnHeaderData.splice(0, 1); - } - - colName = columnHeaderData[0].columnName; - if (colName == 'client_id' || colName == 'office_id' || colName == 'group_id' || colName == 'center_id' || colName == 'loan_id' || colName == 'savings_account_id') { - columnHeaderData.splice(0, 1); - } - }; - - scope.changeProduct = function () { - _.isUndefined(scope.datatables) ? scope.tempDataTables = [] : scope.tempDataTables = scope.datatables; - WizardHandler.wizard().removeSteps(1, scope.tempDataTables.length); - scope.inparams.productId = scope.formData1.productId; - resourceFactory.savingsTemplateResource.get(scope.inparams, function (data) { - - scope.data = data; - scope.charges = data.charges; - - for (var i in scope.charges) { - if (scope.charges[i].chargeTimeType.value === "Annual Fee" && scope.charges[i].feeOnMonthDay) { - scope.charges[i].feeOnMonthDay.push('2013'); - scope.charges[i].feeOnMonthDay = new Date(dateFilter(scope.charges[i].feeOnMonthDay, scope.df)); - } - } - scope.fieldOfficers = data.fieldOfficerOptions; - scope.formData1.nominalAnnualInterestRate = data.nominalAnnualInterestRate; - scope.formData1.minRequiredOpeningBalance = data.minRequiredOpeningBalance; - scope.formData1.lockinPeriodFrequency = data.lockinPeriodFrequency; - scope.formData1.withdrawalFeeAmount = data.withdrawalFeeAmount; - scope.formData1.withdrawalFeeForTransfers = data.withdrawalFeeForTransfers; - scope.formData1.allowOverdraft = data.allowOverdraft; - scope.formData1.overdraftLimit = data.overdraftLimit; - scope.formData1.nominalAnnualInterestRateOverdraft = data.nominalAnnualInterestRateOverdraft; - scope.formData1.minOverdraftForInterestCalculation = data.minOverdraftForInterestCalculation; - scope.formData1.enforceMinRequiredBalance = data.enforceMinRequiredBalance; - scope.formData1.minRequiredBalance = data.minRequiredBalance; - scope.formData1.withHoldTax = data.withHoldTax; - - if (data.interestCompoundingPeriodType) scope.formData1.interestCompoundingPeriodType = data.interestCompoundingPeriodType.id; - if (data.interestPostingPeriodType) scope.formData1.interestPostingPeriodType = data.interestPostingPeriodType.id; - if (data.interestCalculationType) scope.formData1.interestCalculationType = data.interestCalculationType.id; - if (data.interestCalculationDaysInYearType) scope.formData1.interestCalculationDaysInYearType = data.interestCalculationDaysInYearType.id; - if (data.lockinPeriodFrequencyType) scope.formData1.lockinPeriodFrequencyType = data.lockinPeriodFrequencyType.id; - if (data.withdrawalFeeType) scope.formData1.withdrawalFeeType = data.withdrawalFeeType.id; - scope.datatables = data.datatables; - scope.handleDatatables(scope.datatables); - }); - }; - - 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, scope.df)); - } - } else if (data.chargeTimeType.value == "Monthly Fee") { - if (data.feeOnMonthDay) { - data.feeOnMonthDay.push(2013); - data.feeOnMonthDay = new Date(dateFilter(data.feeOnMonthDay, scope.df)); - } - } - scope.charges.push(data); - scope.chargeId = undefined; - }); - } else { - scope.errorchargeevent = true; - scope.labelchargeerror = "selectcharge"; - } - } - - scope.deleteCharge = function (index) { - scope.charges.splice(index, 1); - } - - scope.fieldType = function (type) { - var fieldType = ""; - if (type) { - if (type == 'CODELOOKUP' || type == 'CODEVALUE') { - fieldType = 'SELECT'; - } else if (type == 'DATE') { - fieldType = 'DATE'; - } else if (type == 'DATETIME') { - fieldType = 'DATETIME'; - } else if (type == 'BOOLEAN') { - fieldType = 'BOOLEAN'; - } else { - fieldType = 'TEXT'; - } - } - return fieldType; - }; - - var applicationId= Math.floor((Math.random() * 9999999999) + 1); - scope.submit = function () { - - if (scope.date) { - this.formData1.submittedOnDate = dateFilter(scope.date.submittedOnDate, scope.df); - } - this.formData1.locale = scope.optlang.code; - this.formData1.dateFormat = scope.df; - this.formData1.monthDayFormat = "dd MMM"; - this.formData1.charges = []; - - if (scope.charges.length > 0) { - - for (var i in scope.charges) { - - if (scope.charges[i].chargeTimeType.value == 'Annual Fee') { - this.formData1.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.formData1.charges.push({ chargeId: scope.charges[i].chargeId, amount: scope.charges[i].amount, - dueDate: dateFilter(scope.charges[i].dueDate, scope.df)}); - } else if (scope.charges[i].chargeTimeType.value == 'Monthly Fee') { - this.formData1.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 if (scope.charges[i].chargeTimeType.value == 'Weekly Fee') { - this.formData1.charges.push({ chargeId: scope.charges[i].chargeId, amount: scope.charges[i].amount, dueDate: dateFilter(scope.charges[i].dueDate, scope.df), feeInterval: scope.charges[i].feeInterval}); - } - else { - this.formData1.charges.push({ chargeId: scope.charges[i].chargeId, amount: scope.charges[i].amount}); - } - } - } - - if (!_.isUndefined(scope.datatables) && scope.datatables.length > 0) { - angular.forEach(scope.datatables, function (datatable, index) { - scope.columnHeaders = datatable.columnHeaderData; - angular.forEach(scope.columnHeaders, function (colHeader, i) { - scope.dateFormat = scope.df + " " + scope.tf - if (scope.columnHeaders[i].columnDisplayType == 'DATE') { - if (!_.isUndefined(scope.formDat.datatables[index].data[scope.columnHeaders[i].columnName])) { - scope.formData1.datatables[index].data[scope.columnHeaders[i].columnName] = dateFilter(scope.formDat.datatables[index].data[scope.columnHeaders[i].columnName], - scope.dateFormat); - scope.formData1.datatables[index].data.dateFormat = scope.dateFormat; - } - } else if (scope.columnHeaders[i].columnDisplayType == 'DATETIME') { - if (!_.isUndefined(scope.formDat.datatables[index].data[scope.columnHeaders[i].columnName].date) && !_.isUndefined(scope.formDat.datatables[index].data[scope.columnHeaders[i].columnName].time)) { - scope.formData1.datatables[index].data[scope.columnHeaders[i].columnName] = dateFilter(scope.formDat.datatables[index].data[scope.columnHeaders[i].columnName].date, scope.df) - + " " + dateFilter(scope.formDat.datatables[index].data[scope.columnHeaders[i].columnName].time, scope.tf); - scope.formData1.datatables[index].data.dateFormat = scope.dateFormat; - } - } - }); - }); - } else { - delete scope.formData1.datatables; - } - - //count the number of selected applications - var applicationCount=0; - // count number of application - for (var i in scope.group.clients) { - if (scope.group.clients[i].isSelected) { - - applicationCount=applicationCount+1; - } - } - console.log('application count is'+applicationCount); - scope.formData1.isGSIM=true; - this.formData.clientArray=[]; - scope.formData1.groupId = scope.groupId; // - scope.formData1.applicationId=applicationId; // - var count=0; - scope.formData1.lastApplication=true; - var z=0; - for(var c in scope.group.clients) - { - if(scope.group.clients[c].isSelected) - { - if(z===0) - { - scope.formData1.isParentAccount=true; - } - z++; - if(z===applicationCount) - { - console.log("z is"+z); - console.log("val of z"+applicationCount); - scope.formData1.lastApplication=true; // - } - var temp={}; - temp=JSON.parse(JSON.stringify(scope.formData1)); - temp.clientId=scope.group.clients[c].id; - if(z!=applicationCount) - { - delete temp.lastApplication; - } - this.formData.clientArray[count++]=temp; - - if(z==1) - { - delete scope.formData1.isParentAccount; - } - - } - } - - resourceFactory.gsimResource.save(this.formData, function (data) { - location.path('/viewgroup/'+ scope.groupId); - }); - }; - - scope.cancel = function () { - if (scope.clientId) { - location.path('/viewclient/' + scope.clientId); - } else if (scope.centerEntity) { - location.path('/viewcenter/' + scope.groupId); - } else { - location.path('/viewgroup/' + scope.groupId); - } - } - } - }); - mifosX.ng.application.controller('CreateGSIMAccountController', ['$scope', 'ResourceFactory', '$location', '$routeParams', 'dateFilter', 'WizardHandler', mifosX.controllers.CreateGSIMAccountController]).run(function ($log) { - $log.info("CreateGSIMAccountController initialized"); - }); -}(mifosX.controllers || {})); - +(function (module) { + mifosX.controllers = _.extend(module, { + CreateGSIMAccountController: function (scope, resourceFactory, location, routeParams, dateFilter, WizardHandler) { + scope.products = []; + scope.fieldOfficers = []; + scope.formData1 = {}; + scope.formData = {}; + scope.formDat = {}; + scope.restrictDate = new Date(); + scope.clientId = routeParams.clientId; + scope.groupId = routeParams.groupId; + scope.date = {}; + scope.date.submittedOnDate = new Date(); + scope.date.vaultTargetDate = new Date(); + scope.datatables = []; + scope.noOfTabs = 1; + scope.step = '-'; + scope.formData1.datatables = []; + scope.formDat.datatables = []; + scope.tf = "HH:mm"; + scope.tempDataTables = []; + scope.isAllClientSelected = false; + scope.group={}; + scope.group.clients=[]; + + if (routeParams.centerEntity) { + scope.centerEntity = true; + } + scope.charges = []; + scope.inparams = {}; + if (scope.clientId) { + scope.inparams.clientId = scope.clientId + } + ; + if (scope.groupId) { + scope.inparams.groupId = scope.groupId + } + ; + if (scope.centerId) { + scope.inparams.centerId = scope.centerId + } + ; + + scope.inparams.staffInSelectedOfficeOnly = true; + + resourceFactory.groupClients.get({groupId:scope.groupId,associations:'activeClientMembers'}, function (data) { + + scope.group= data; + scope.group.clients= data.activeClientMembers; + }); + + scope.checkerInboxAllCheckBoxesMet = function() { + if(!angular.isUndefined(scope.group.clients)) { + var count = 0; + for (var i in scope.group.clients) { + if(scope.group.clients[i].isSelected){ + count++; + } + } + scope.isAllClientSelected = (scope.group.clients.length==count); + return scope.isAllClientSelected; + } + } + scope.checkerInboxAllCheckBoxesClicked = function() { + scope.isAllClientSelected = !scope.isAllClientSelected; + if(!angular.isUndefined(scope.group.clients)) { + for (var i in scope.group.clients) { + scope.group.clients[i].isSelected = scope.isAllClientSelected; + } + } + } + resourceFactory.savingsTemplateResource.get(scope.inparams, function (data) { + scope.products = data.productOptions; + scope.chargeOptions = data.chargeOptions; + scope.clientName = data.clientName; + scope.groupName = data.groupName; + scope.datatables = data.datatables; + scope.handleDatatables(scope.datatables); + }); + + scope.handleDatatables = function (datatables) { + if (!_.isUndefined(datatables) && datatables.length > 0) { + scope.formData1.datatables = []; + scope.formDat.datatables = []; + scope.noOfTabs = datatables.length + 1; + angular.forEach(datatables, function (datatable, index) { + scope.updateColumnHeaders(datatable.columnHeaderData); + angular.forEach(datatable.columnHeaderData, function (colHeader, i) { + if (_.isEmpty(scope.formDat.datatables[index])) { + scope.formDat.datatables[index] = {data: {}}; + } + + if (_.isEmpty(scope.formData1.datatables[index])) { + scope.formData1.datatables[index] = { + registeredTableName: datatable.registeredTableName, + data: {locale: scope.optlang.code} + }; + } + + if (datatable.columnHeaderData[i].columnDisplayType == 'DATETIME') { + scope.formDat.datatables[index].data[datatable.columnHeaderData[i].columnName] = {}; + } + }); + }); + } + }; + + scope.updateColumnHeaders = function(columnHeaderData) { + var colName = columnHeaderData[0].columnName; + if (colName == 'id') { + columnHeaderData.splice(0, 1); + } + + colName = columnHeaderData[0].columnName; + if (colName == 'client_id' || colName == 'office_id' || colName == 'group_id' || colName == 'center_id' || colName == 'loan_id' || colName == 'savings_account_id') { + columnHeaderData.splice(0, 1); + } + }; + + scope.changeProduct = function () { + _.isUndefined(scope.datatables) ? scope.tempDataTables = [] : scope.tempDataTables = scope.datatables; + WizardHandler.wizard().removeSteps(1, scope.tempDataTables.length); + scope.inparams.productId = scope.formData1.productId; + resourceFactory.savingsTemplateResource.get(scope.inparams, function (data) { + + scope.data = data; + scope.charges = data.charges; + + for (var i in scope.charges) { + if (scope.charges[i].chargeTimeType.value === "Annual Fee" && scope.charges[i].feeOnMonthDay) { + scope.charges[i].feeOnMonthDay.push('2013'); + scope.charges[i].feeOnMonthDay = new Date(dateFilter(scope.charges[i].feeOnMonthDay, scope.df)); + } + } + scope.fieldOfficers = data.fieldOfficerOptions; + scope.formData1.nominalAnnualInterestRate = data.nominalAnnualInterestRate; + scope.formData1.minRequiredOpeningBalance = data.minRequiredOpeningBalance; + scope.formData1.lockinPeriodFrequency = data.lockinPeriodFrequency; + scope.formData1.withdrawalFeeAmount = data.withdrawalFeeAmount; + scope.formData1.withdrawalFeeForTransfers = data.withdrawalFeeForTransfers; + scope.formData1.allowOverdraft = data.allowOverdraft; + scope.formData1.overdraftLimit = data.overdraftLimit; + scope.formData1.nominalAnnualInterestRateOverdraft = data.nominalAnnualInterestRateOverdraft; + scope.formData1.minOverdraftForInterestCalculation = data.minOverdraftForInterestCalculation; + scope.formData1.enforceMinRequiredBalance = data.enforceMinRequiredBalance; + scope.formData1.minRequiredBalance = data.minRequiredBalance; + scope.formData1.withHoldTax = data.withHoldTax; + + if (data.interestCompoundingPeriodType) scope.formData1.interestCompoundingPeriodType = data.interestCompoundingPeriodType.id; + if (data.interestPostingPeriodType) scope.formData1.interestPostingPeriodType = data.interestPostingPeriodType.id; + if (data.interestCalculationType) scope.formData1.interestCalculationType = data.interestCalculationType.id; + if (data.interestCalculationDaysInYearType) scope.formData1.interestCalculationDaysInYearType = data.interestCalculationDaysInYearType.id; + if (data.lockinPeriodFrequencyType) scope.formData1.lockinPeriodFrequencyType = data.lockinPeriodFrequencyType.id; + if (data.withdrawalFeeType) scope.formData1.withdrawalFeeType = data.withdrawalFeeType.id; + scope.datatables = data.datatables; + scope.handleDatatables(scope.datatables); + }); + }; + + 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, scope.df)); + } + } else if (data.chargeTimeType.value == "Monthly Fee") { + if (data.feeOnMonthDay) { + data.feeOnMonthDay.push(2013); + data.feeOnMonthDay = new Date(dateFilter(data.feeOnMonthDay, scope.df)); + } + } + scope.charges.push(data); + scope.chargeId = undefined; + }); + } else { + scope.errorchargeevent = true; + scope.labelchargeerror = "selectcharge"; + } + } + + scope.deleteCharge = function (index) { + scope.charges.splice(index, 1); + } + + scope.fieldType = function (type) { + var fieldType = ""; + if (type) { + if (type == 'CODELOOKUP' || type == 'CODEVALUE') { + fieldType = 'SELECT'; + } else if (type == 'DATE') { + fieldType = 'DATE'; + } else if (type == 'DATETIME') { + fieldType = 'DATETIME'; + } else if (type == 'BOOLEAN') { + fieldType = 'BOOLEAN'; + } else { + fieldType = 'TEXT'; + } + } + return fieldType; + }; + + var applicationId= Math.floor((Math.random() * 9999999999) + 1); + scope.submit = function () { + + if (scope.date) { + this.formData1.submittedOnDate = dateFilter(scope.date.submittedOnDate, scope.df); + this.formData1.vaultTargetDate = dateFilter(scope.date.vaultTargetDate, scope.df); + } + this.formData1.locale = scope.optlang.code; + this.formData1.dateFormat = scope.df; + this.formData1.monthDayFormat = "dd MMM"; + this.formData1.charges = []; + + if (scope.charges.length > 0) { + + for (var i in scope.charges) { + + if (scope.charges[i].chargeTimeType.value == 'Annual Fee') { + this.formData1.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.formData1.charges.push({ chargeId: scope.charges[i].chargeId, amount: scope.charges[i].amount, + dueDate: dateFilter(scope.charges[i].dueDate, scope.df)}); + } else if (scope.charges[i].chargeTimeType.value == 'Monthly Fee') { + this.formData1.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 if (scope.charges[i].chargeTimeType.value == 'Weekly Fee') { + this.formData1.charges.push({ chargeId: scope.charges[i].chargeId, amount: scope.charges[i].amount, dueDate: dateFilter(scope.charges[i].dueDate, scope.df), feeInterval: scope.charges[i].feeInterval}); + } + else { + this.formData1.charges.push({ chargeId: scope.charges[i].chargeId, amount: scope.charges[i].amount}); + } + } + } + + if (!_.isUndefined(scope.datatables) && scope.datatables.length > 0) { + angular.forEach(scope.datatables, function (datatable, index) { + scope.columnHeaders = datatable.columnHeaderData; + angular.forEach(scope.columnHeaders, function (colHeader, i) { + scope.dateFormat = scope.df + " " + scope.tf + if (scope.columnHeaders[i].columnDisplayType == 'DATE') { + if (!_.isUndefined(scope.formDat.datatables[index].data[scope.columnHeaders[i].columnName])) { + scope.formData1.datatables[index].data[scope.columnHeaders[i].columnName] = dateFilter(scope.formDat.datatables[index].data[scope.columnHeaders[i].columnName], + scope.dateFormat); + scope.formData1.datatables[index].data.dateFormat = scope.dateFormat; + } + } else if (scope.columnHeaders[i].columnDisplayType == 'DATETIME') { + if (!_.isUndefined(scope.formDat.datatables[index].data[scope.columnHeaders[i].columnName].date) && !_.isUndefined(scope.formDat.datatables[index].data[scope.columnHeaders[i].columnName].time)) { + scope.formData1.datatables[index].data[scope.columnHeaders[i].columnName] = dateFilter(scope.formDat.datatables[index].data[scope.columnHeaders[i].columnName].date, scope.df) + + " " + dateFilter(scope.formDat.datatables[index].data[scope.columnHeaders[i].columnName].time, scope.tf); + scope.formData1.datatables[index].data.dateFormat = scope.dateFormat; + } + } + }); + }); + } else { + delete scope.formData1.datatables; + } + + //count the number of selected applications + var applicationCount=0; + // count number of application + for (var i in scope.group.clients) { + if (scope.group.clients[i].isSelected) { + + applicationCount=applicationCount+1; + } + } + console.log('application count is'+applicationCount); + scope.formData1.isGSIM=true; + this.formData.clientArray=[]; + scope.formData1.groupId = scope.groupId; // + scope.formData1.applicationId=applicationId; // + var count=0; + scope.formData1.lastApplication=true; + var z=0; + for(var c in scope.group.clients) + { + if(scope.group.clients[c].isSelected) + { + if(z===0) + { + scope.formData1.isParentAccount=true; + } + z++; + if(z===applicationCount) + { + scope.formData1.lastApplication=true; // + } + var temp={}; + temp=JSON.parse(JSON.stringify(scope.formData1)); + temp.clientId=scope.group.clients[c].id; + if(z!=applicationCount) + { + delete temp.lastApplication; + } + this.formData.clientArray[count++]=temp; + + if(z==1) + { + delete scope.formData1.isParentAccount; + } + + } + } + + resourceFactory.gsimResource.save(this.formData, function (data) { + location.path('/viewgroup/'+ scope.groupId); + }); + }; + + scope.cancel = function () { + if (scope.clientId) { + location.path('/viewclient/' + scope.clientId); + } else if (scope.centerEntity) { + location.path('/viewcenter/' + scope.groupId); + } else { + location.path('/viewgroup/' + scope.groupId); + } + } + } + }); + mifosX.ng.application.controller('CreateGSIMAccountController', ['$scope', 'ResourceFactory', '$location', '$routeParams', 'dateFilter', 'WizardHandler', mifosX.controllers.CreateGSIMAccountController]).run(function ($log) { + $log.info("CreateGSIMAccountController initialized"); + }); +}(mifosX.controllers || {})); + diff --git a/app/scripts/controllers/savings/CreateSavingAccountController.js b/app/scripts/controllers/savings/CreateSavingAccountController.js index 2bf7f565..6dc745c0 100644 --- a/app/scripts/controllers/savings/CreateSavingAccountController.js +++ b/app/scripts/controllers/savings/CreateSavingAccountController.js @@ -123,6 +123,7 @@ scope.formData.withdrawalFeeForTransfers = data.withdrawalFeeForTransfers; scope.formData.allowOverdraft = data.allowOverdraft; scope.formData.overdraftLimit = data.overdraftLimit; + scope.formData.postOverdraftInterestOnDeposit = data.postOverdraftInterestOnDeposit; scope.formData.nominalAnnualInterestRateOverdraft = data.nominalAnnualInterestRateOverdraft; scope.formData.minOverdraftForInterestCalculation = data.minOverdraftForInterestCalculation; scope.formData.lienAllowed = data.lienAllowed; @@ -130,6 +131,22 @@ scope.formData.enforceMinRequiredBalance = data.enforceMinRequiredBalance; scope.formData.minRequiredBalance = data.minRequiredBalance; scope.formData.withHoldTax = data.withHoldTax; + scope.formData.useFloatingInterestRate = data.useFloatingInterestRate; + scope.formData.withdrawalFrequency = data.withdrawalFrequency; + if(data.floatingInterestRates){ + scope.formData.floatingInterestRates = data.floatingInterestRates; + for (var i in scope.formData.floatingInterestRates) { + if (scope.formData.floatingInterestRates[i].fromDate) { + var fromDate = dateFilter(scope.formData.floatingInterestRates[i].fromDate, scope.df); + scope.formData.floatingInterestRates[i].fromDate = new Date(fromDate); + } + if (scope.formData.floatingInterestRates[i].endDate) { + var endDate = dateFilter(scope.formData.floatingInterestRates[i].endDate, scope.df); + scope.formData.floatingInterestRates[i].endDate = new Date(endDate); + } + } + } + if (data.interestCompoundingPeriodType) scope.formData.interestCompoundingPeriodType = data.interestCompoundingPeriodType.id; if (data.interestPostingPeriodType) scope.formData.interestPostingPeriodType = data.interestPostingPeriodType.id; @@ -137,6 +154,8 @@ if (data.interestCalculationDaysInYearType) scope.formData.interestCalculationDaysInYearType = data.interestCalculationDaysInYearType.id; if (data.lockinPeriodFrequencyType) scope.formData.lockinPeriodFrequencyType = data.lockinPeriodFrequencyType.id; if (data.withdrawalFeeType) scope.formData.withdrawalFeeType = data.withdrawalFeeType.id; + if (data.withdrawalFrequencyEnum) scope.formData.withdrawalFrequencyEnum = data.withdrawalFrequencyEnum.id; + if (data.withdrawalFrequencyOptions) scope.formData.withdrawalFrequencyOptions = data.withdrawalFrequencyOptions; scope.datatables = data.datatables; scope.handleDatatables(scope.datatables); scope.disabled = false; @@ -260,6 +279,20 @@ delete scope.formData.datatables; } + if(scope.formData.floatingInterestRates){ + for (var i in scope.formData.floatingInterestRates) { + if (scope.formData.floatingInterestRates[i].fromDate) { + var fromDate = dateFilter(scope.formData.floatingInterestRates[i].fromDate, scope.df); + scope.formData.floatingInterestRates[i].fromDate = fromDate; + } + if (scope.formData.floatingInterestRates[i].endDate) { + var endDate = dateFilter(scope.formData.floatingInterestRates[i].endDate, scope.df); + scope.formData.floatingInterestRates[i].endDate = endDate; + } + scope.formData.floatingInterestRates[i].floatingInterestRateValue = scope.formData.floatingInterestRates[i].floatingInterestRate; + } + } + resourceFactory.savingsResource.save(this.formData, function (data) { location.path('/viewsavingaccount/' + data.savingsId); }); diff --git a/app/scripts/controllers/savings/EditGSIMAccountController.js b/app/scripts/controllers/savings/EditGSIMAccountController.js index ffea40a0..41d872dd 100644 --- a/app/scripts/controllers/savings/EditGSIMAccountController.js +++ b/app/scripts/controllers/savings/EditGSIMAccountController.js @@ -1,163 +1,167 @@ -(function (module) { - mifosX.controllers = _.extend(module, { - EditGSIMAccountController: function (scope, resourceFactory, location, routeParams, dateFilter) { - scope.products = []; - scope.fieldOfficers = []; - scope.formData = {}; - scope.accountId = routeParams.gsimChildAccountId; - scope.parentAccountId=routeParams.parentGSIMId; - scope.groupId=routeParams.groupId; - scope.gsimAccountNumber=routeParams.gsimAccountNumber; - scope.charges = []; - scope.restrictDate = new Date(); - resourceFactory.savingsResource.get({accountId: scope.accountId, template: 'true', associations: 'charges',staffInSelectedOfficeOnly:'true'}, 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, scope.df)); - } 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, scope.df)); - } else if (scope.charges[i].chargeTimeType.value == 'Specified due date') { - scope.charges[i].dueDate = new Date(dateFilter(scope.charges[i].dueDate, scope.df)); - } - } - } - - if (data.clientId) { - scope.formData.clientId = data.clientId; - scope.clientName = data.clientName; - } - if (data.groupId) { - scope.formData.groupId = data.groupId; - scope.groupName = data.groupName; - } - scope.formData.productId = data.savingsProductId; - scope.products = data.productOptions; - if (data.fieldOfficerId != 0)scope.formData.fieldOfficerId = data.fieldOfficerId; - if (data.timeline) { - var submittedOnDate = dateFilter(data.timeline.submittedOnDate, scope.df); - scope.formData.submittedOnDate = new Date(submittedOnDate); - } - scope.formData.externalId = data.externalId; - scope.fieldOfficers = data.fieldOfficerOptions; - scope.formData.nominalAnnualInterestRate = data.nominalAnnualInterestRate; - scope.formData.minRequiredOpeningBalance = data.minRequiredOpeningBalance; - scope.formData.lockinPeriodFrequency = data.lockinPeriodFrequency; - /* FIX-ME: uncomment annualFeeAmount when datepicker avialable, because it depends on the date field 'annualFeeOnMonthDay'*/ - scope.formData.withdrawalFeeAmount = data.withdrawalFeeAmount; - scope.formData.withdrawalFeeForTransfers = data.withdrawalFeeForTransfers; - scope.formData.allowOverdraft = data.allowOverdraft; - scope.formData.overdraftLimit = data.overdraftLimit; - scope.formData.nominalAnnualInterestRateOverdraft = data.nominalAnnualInterestRateOverdraft; - scope.formData.minOverdraftForInterestCalculation = data.minOverdraftForInterestCalculation; - scope.formData.enforceMinRequiredBalance = data.enforceMinRequiredBalance; - scope.formData.minRequiredBalance = data.minRequiredBalance; - scope.formData.withHoldTax = data.withHoldTax; - - if (data.interestCompoundingPeriodType) scope.formData.interestCompoundingPeriodType = data.interestCompoundingPeriodType.id; - if (data.interestPostingPeriodType) scope.formData.interestPostingPeriodType = data.interestPostingPeriodType.id; - if (data.interestCalculationType) scope.formData.interestCalculationType = data.interestCalculationType.id; - if (data.interestCalculationDaysInYearType) scope.formData.interestCalculationDaysInYearType = data.interestCalculationDaysInYearType.id; - if (data.lockinPeriodFrequencyType) scope.formData.lockinPeriodFrequencyType = data.lockinPeriodFrequencyType.id; - if (data.withdrawalFeeType) scope.formData.withdrawalFeeType = data.withdrawalFeeType.id; - - }); - - scope.changeProduct = function () { - var inparams = {productId: scope.formData.productId}; - if (scope.formData.clientId) inparams.clientId = scope.formData.clientId; - if (scope.formData.groupId) inparams.groupId = scope.formData.groupId; - resourceFactory.savingsTemplateResource.get(inparams, function (data) { - - scope.data = data; - - scope.fieldOfficers = data.fieldOfficerOptions; - scope.formData.nominalAnnualInterestRate = data.nominalAnnualInterestRate; - scope.formData.minRequiredOpeningBalance = data.minRequiredOpeningBalance; - scope.formData.lockinPeriodFrequency = data.lockinPeriodFrequency; - /* FIX-ME: uncomment annualFeeAmount when datepicker avialable, because it depends on the date field 'annualFeeOnMonthDay'*/ - scope.formData.withdrawalFeeAmount = data.withdrawalFeeAmount; - scope.formData.withdrawalFeeForTransfers = data.withdrawalFeeForTransfers; - scope.formData.withHoldTax = data.withHoldTax; - - if (data.interestCompoundingPeriodType) scope.formData.interestCompoundingPeriodType = data.interestCompoundingPeriodType.id; - if (data.interestPostingPeriodType) scope.formData.interestPostingPeriodType = data.interestPostingPeriodType.id; - if (data.interestCalculationType) scope.formData.interestCalculationType = data.interestCalculationType.id; - if (data.interestCalculationDaysInYearType) scope.formData.interestCalculationDaysInYearType = data.interestCalculationDaysInYearType.id; - if (data.lockinPeriodFrequencyType) scope.formData.lockinPeriodFrequencyType = data.lockinPeriodFrequencyType.id; - if (data.withdrawalFeeType) scope.formData.withdrawalFeeType = data.withdrawalFeeType.id; - }); - } - - 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, scope.df)); - } - } else if (data.chargeTimeType.value == "Monthly Fee") { - if (data.feeOnMonthDay) { - data.feeOnMonthDay.push(2013); - data.feeOnMonthDay = new Date(dateFilter(data.feeOnMonthDay, scope.df)); - } - } - - delete data.id; - scope.charges.push(data); - scope.chargeId = undefined; - }); - } else { - scope.errorchargeevent = true; - scope.labelchargeerror = "selectcharge"; - } - } - - scope.deleteCharge = function (index) { - scope.charges.splice(index, 1); - } - - scope.cancel = function () { - location.path('/viewgsimaccount/' + scope.groupId+'/'+scope.gsimAccountNumber); - } - - scope.submit = function () { - if (this.formData.submittedOnDate) this.formData.submittedOnDate = dateFilter(this.formData.submittedOnDate, scope.df); - this.formData.locale = scope.optlang.code; - this.formData.dateFormat = scope.df; - 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') { - 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, scope.df)}); - } 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.gsimResource.update({'parentAccountId': scope.parentAccountId}, this.formData, function (data) { - location.path('/viewsavingaccount/' + data.savingsId); - }); - }; - } - }); - mifosX.ng.application.controller('EditGSIMAccountController', ['$scope', 'ResourceFactory', '$location', '$routeParams', 'dateFilter', mifosX.controllers.EditGSIMAccountController]).run(function ($log) { - $log.info("EditGSIMAccountController initialized"); - }); -}(mifosX.controllers || {})); +(function (module) { + mifosX.controllers = _.extend(module, { + EditGSIMAccountController: function (scope, resourceFactory, location, routeParams, dateFilter) { + scope.products = []; + scope.fieldOfficers = []; + scope.formData = {}; + scope.accountId = routeParams.gsimChildAccountId; + scope.parentAccountId=routeParams.parentGSIMId; + scope.groupId=routeParams.groupId; + scope.gsimAccountNumber=routeParams.gsimAccountNumber; + scope.charges = []; + scope.restrictDate = new Date(); + resourceFactory.savingsResource.get({accountId: scope.accountId, template: 'true', associations: 'charges',staffInSelectedOfficeOnly:'true'}, 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, scope.df)); + } 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, scope.df)); + } else if (scope.charges[i].chargeTimeType.value == 'Specified due date') { + scope.charges[i].dueDate = new Date(dateFilter(scope.charges[i].dueDate, scope.df)); + } + } + } + if (data.clientId) { + scope.formData.clientId = data.clientId; + scope.clientName = data.clientName; + } + if (data.groupId) { + scope.formData.groupId = data.groupId; + scope.groupName = data.groupName; + } + scope.formData.productId = data.savingsProductId; + scope.products = data.productOptions; + if (data.fieldOfficerId != 0)scope.formData.fieldOfficerId = data.fieldOfficerId; + if (data.timeline) { + var submittedOnDate = dateFilter(data.timeline.submittedOnDate, scope.df); + scope.formData.submittedOnDate = new Date(submittedOnDate); + + var vaultTargetDate = dateFilter(data.vaultTargetDate, scope.df); + scope.formData.vaultTargetDate = new Date(vaultTargetDate); + } + + scope.fieldOfficers = data.fieldOfficerOptions; + scope.formData.nominalAnnualInterestRate = data.nominalAnnualInterestRate; + scope.formData.minRequiredOpeningBalance = data.minRequiredOpeningBalance; + scope.formData.lockinPeriodFrequency = data.lockinPeriodFrequency; + /* FIX-ME: uncomment annualFeeAmount when datepicker avialable, because it depends on the date field 'annualFeeOnMonthDay'*/ + scope.formData.withdrawalFeeAmount = data.withdrawalFeeAmount; + scope.formData.withdrawalFeeForTransfers = data.withdrawalFeeForTransfers; + scope.formData.allowOverdraft = data.allowOverdraft; + scope.formData.overdraftLimit = data.overdraftLimit; + scope.formData.nominalAnnualInterestRateOverdraft = data.nominalAnnualInterestRateOverdraft; + scope.formData.minOverdraftForInterestCalculation = data.minOverdraftForInterestCalculation; + scope.formData.enforceMinRequiredBalance = data.enforceMinRequiredBalance; + scope.formData.minRequiredBalance = data.minRequiredBalance; + scope.formData.withHoldTax = data.withHoldTax; + scope.formData.vaultTargetAmount = data.vaultTargetAmount; + if (data.interestCompoundingPeriodType) scope.formData.interestCompoundingPeriodType = data.interestCompoundingPeriodType.id; + if (data.interestPostingPeriodType) scope.formData.interestPostingPeriodType = data.interestPostingPeriodType.id; + if (data.interestCalculationType) scope.formData.interestCalculationType = data.interestCalculationType.id; + if (data.interestCalculationDaysInYearType) scope.formData.interestCalculationDaysInYearType = data.interestCalculationDaysInYearType.id; + if (data.lockinPeriodFrequencyType) scope.formData.lockinPeriodFrequencyType = data.lockinPeriodFrequencyType.id; + if (data.withdrawalFeeType) scope.formData.withdrawalFeeType = data.withdrawalFeeType.id; + + }); + + scope.changeProduct = function () { + var inparams = {productId: scope.formData.productId}; + if (scope.formData.clientId) inparams.clientId = scope.formData.clientId; + if (scope.formData.groupId) inparams.groupId = scope.formData.groupId; + resourceFactory.savingsTemplateResource.get(inparams, function (data) { + + scope.data = data; + + scope.fieldOfficers = data.fieldOfficerOptions; + scope.formData.nominalAnnualInterestRate = data.nominalAnnualInterestRate; + scope.formData.minRequiredOpeningBalance = data.minRequiredOpeningBalance; + scope.formData.lockinPeriodFrequency = data.lockinPeriodFrequency; + /* FIX-ME: uncomment annualFeeAmount when datepicker avialable, because it depends on the date field 'annualFeeOnMonthDay'*/ + scope.formData.withdrawalFeeAmount = data.withdrawalFeeAmount; + scope.formData.withdrawalFeeForTransfers = data.withdrawalFeeForTransfers; + scope.formData.withHoldTax = data.withHoldTax; + scope.formData.vaultTargetAmount = data.vaultTargetAmount; + scope.formData.vaultTargetDate = data.vaultTargetDate; + + if (data.interestCompoundingPeriodType) scope.formData.interestCompoundingPeriodType = data.interestCompoundingPeriodType.id; + if (data.interestPostingPeriodType) scope.formData.interestPostingPeriodType = data.interestPostingPeriodType.id; + if (data.interestCalculationType) scope.formData.interestCalculationType = data.interestCalculationType.id; + if (data.interestCalculationDaysInYearType) scope.formData.interestCalculationDaysInYearType = data.interestCalculationDaysInYearType.id; + if (data.lockinPeriodFrequencyType) scope.formData.lockinPeriodFrequencyType = data.lockinPeriodFrequencyType.id; + if (data.withdrawalFeeType) scope.formData.withdrawalFeeType = data.withdrawalFeeType.id; + }); + } + + 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, scope.df)); + } + } else if (data.chargeTimeType.value == "Monthly Fee") { + if (data.feeOnMonthDay) { + data.feeOnMonthDay.push(2013); + data.feeOnMonthDay = new Date(dateFilter(data.feeOnMonthDay, scope.df)); + } + } + delete data.id; + scope.charges.push(data); + scope.chargeId = undefined; + }); + } else { + scope.errorchargeevent = true; + scope.labelchargeerror = "selectcharge"; + } + } + + scope.deleteCharge = function (index) { + scope.charges.splice(index, 1); + } + + scope.cancel = function () { + location.path('/viewgsimaccount/' + scope.groupId+'/'+scope.gsimAccountNumber); + } + + scope.submit = function () { + if (this.formData.submittedOnDate) this.formData.submittedOnDate = dateFilter(this.formData.submittedOnDate, scope.df); + if (this.formData.vaultTargetDate) this.formData.vaultTargetDate = dateFilter(this.formData.vaultTargetDate, scope.df); + this.formData.locale = scope.optlang.code; + this.formData.dateFormat = scope.df; + 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') { + 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, scope.df)}); + } 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.gsimResource.update({'parentAccountId': scope.parentAccountId}, this.formData, function (data) { + location.path('/viewgsimaccount/' + scope.groupId+"/"+scope.gsimAccountNumber); + }); + }; + } + }); + mifosX.ng.application.controller('EditGSIMAccountController', ['$scope', 'ResourceFactory', '$location', '$routeParams', 'dateFilter', mifosX.controllers.EditGSIMAccountController]).run(function ($log) { + $log.info("EditGSIMAccountController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/savings/EditSavingAccountController.js b/app/scripts/controllers/savings/EditSavingAccountController.js index aa9981a6..25f8823b 100644 --- a/app/scripts/controllers/savings/EditSavingAccountController.js +++ b/app/scripts/controllers/savings/EditSavingAccountController.js @@ -59,6 +59,24 @@ scope.formData.enforceMinRequiredBalance = data.enforceMinRequiredBalance; scope.formData.minRequiredBalance = data.minRequiredBalance; scope.formData.withHoldTax = data.withHoldTax; + scope.formData.withdrawalFrequency = data.withdrawalFrequency; + scope.formData.withdrawalFrequencyEnum = data.withdrawalFrequencyEnum; + scope.formData.withdrawalFrequencyOptions = data.withdrawalFrequencyOptions; + + scope.formData.useFloatingInterestRate = data.useFloatingInterestRate; + if(data.floatingInterestRates){ + scope.formData.floatingInterestRates = data.floatingInterestRates; + for (var i in scope.formData.floatingInterestRates) { + if (scope.formData.floatingInterestRates[i].fromDate) { + var fromDate = dateFilter(scope.formData.floatingInterestRates[i].fromDate, scope.df); + scope.formData.floatingInterestRates[i].fromDate = new Date(fromDate); + } + if (scope.formData.floatingInterestRates[i].endDate) { + var endDate = dateFilter(scope.formData.floatingInterestRates[i].endDate, scope.df); + scope.formData.floatingInterestRates[i].endDate = new Date(endDate); + } + } + } if (data.interestCompoundingPeriodType) scope.formData.interestCompoundingPeriodType = data.interestCompoundingPeriodType.id; if (data.interestPostingPeriodType) scope.formData.interestPostingPeriodType = data.interestPostingPeriodType.id; @@ -157,7 +175,7 @@ } } } - + scope.formData.floatingInterestRates = []; resourceFactory.savingsResource.update({'accountId': scope.accountId}, this.formData, function (data) { location.path('/viewsavingaccount/' + data.savingsId); }); diff --git a/app/scripts/controllers/savings/SavingAccountActionsController.js b/app/scripts/controllers/savings/SavingAccountActionsController.js index 30e99e62..5c2a91a6 100644 --- a/app/scripts/controllers/savings/SavingAccountActionsController.js +++ b/app/scripts/controllers/savings/SavingAccountActionsController.js @@ -1,9 +1,10 @@ (function (module) { mifosX.controllers = _.extend(module, { - SavingAccountActionsController: function (scope, rootScope, resourceFactory, location, routeParams, dateFilter) { + SavingAccountActionsController: function (scope, rootScope, resourceFactory, location, routeParams, dateFilter, $timeout) { scope.action = routeParams.action || ""; scope.accountId = routeParams.id; + scope.subStatus = routeParams.subStatus; scope.savingAccountId = routeParams.id; scope.formData = {}; scope.entityformData = {}; @@ -13,10 +14,17 @@ scope.isTransaction = false; scope.transactionAmountField = false; scope.showPaymentDetails = false; + scope.isGroupLoan = false; scope.paymentTypes = []; + scope.membersOfGroup = []; scope.submittedDatatables = []; scope.tf = "HH:mm"; var submitStatus = []; + scope.holdAmount = false; + scope.showReasonForBlock = false; + scope.showReasonForBlockDebitCredit = false; + scope.blockNarrationTypes = []; + scope.transactionsPerPage = 15; rootScope.RequestEntities = function(entity,status,productId){ resourceFactory.entityDatatableChecksResource.getAll({limit:-1},function (response) { @@ -175,6 +183,14 @@ case "deposit": resourceFactory.savingsTrxnsTemplateResource.get({savingsId: scope.accountId}, function (data) { scope.paymentTypes = data.paymentTypeOptions; + scope.membersOfGroup = data.membersOfGroup; + //This implementation supports on deposit only. Don't include it on withdraw + if(data.groupId != null && data.groupId > 0){ + scope.isGroupLoan = true; + }else{ + scope.isGroupLoan = false; + } + }); scope.title = 'label.heading.depositmoneytosavingaccount'; scope.labelName = 'label.input.transactiondate'; @@ -196,6 +212,15 @@ scope.showAccountNumber=true; scope.taskPermissionName = 'POSTINTEREST_SAVINGSACCOUNT'; break; + case "postAccrualInterestAsOn": + resourceFactory.savingsTrxnsTemplateResource.get({savingsId: scope.accountId}, function (data) { + scope.accountnumber=data.accountNo; + }); + scope.labelName = 'label.input.transactiondate'; + scope.modelName = 'transactionDate'; + scope.showDateField = true; + scope.showAccountNumber=true; + break; case "withdrawal": resourceFactory.savingsTrxnsTemplateResource.get({savingsId: scope.accountId}, function (data) { scope.paymentTypes = data.paymentTypeOptions; @@ -247,6 +272,59 @@ scope.taskPermissionName = 'CLOSE_SAVINGSACCOUNT'; scope.fetchEntities('m_savings_account','CLOSE'); break; + case "freeze": + scope.showBlock = true; + scope.showReasonForBlockDebitCredit = true; + resourceFactory.savingsResource.get({accountId: routeParams.id, associations: 'all' + }, function (data) { + scope.savingsDetails = data; + scope.blockNarrationTypes = data.blockNarrationOptions; + scope.blockNarration = data.blockNarration; + scope.blockNarrationHistoryData = data.blockNarrationHistoryData; + scope.showPNDHistory = data.blockNarrationHistoryData != null; + console.log(data); + if(!data.subStatus.block){ + if(data.subStatus.blockDebit ){ + if(rootScope.hasPermission("UNBLOCKDEBIT_SAVINGSACCOUNT")){ + scope.debitStatus = true; + scope.buttonTextDebit = "label.button.unblockDebit"; + scope.taskPermissionNameDebit = 'UNBLOCKDEBIT_SAVINGSACCOUNT'; + } + }else{ + if(rootScope.hasPermission("BLOCKDEBIT_SAVINGSACCOUNT")){ + scope.debitStatus = true; + scope.buttonTextDebit = "label.button.blockDebit"; + scope.taskPermissionNameDebit = 'BLOCKDEBIT_SAVINGSACCOUNT'; + } + } + if(data.subStatus.blockCredit){ + if(rootScope.hasPermission("UNBLOCKCREDIT_SAVINGSACCOUNT")){ + scope.creditStatus = true; + scope.buttonTextCredit = "label.button.unblockCredit"; + scope.taskPermissionNameCredit = 'UNBLOCKCREDIT_SAVINGSACCOUNT';} + }else{ + if(rootScope.hasPermission("BLOCKCREDIT_SAVINGSACCOUNT")){ + scope.creditStatus = true; + scope.buttonTextCredit = "label.button.blockCredit"; + scope.taskPermissionNameCredit = 'BLOCKCREDIT_SAVINGSACCOUNT'; + } + }} + else{ + if(rootScope.hasPermission("UNBLOCKDEBIT_SAVINGSACCOUNT")){ + scope.debitStatus = true; + scope.buttonTextDebit = "label.button.unblockDebit"; + scope.taskPermissionNameDebit = 'UNBLOCKDEBIT_SAVINGSACCOUNT'; + } + if(rootScope.hasPermission("UNBLOCKCREDIT_SAVINGSACCOUNT")){ + scope.creditStatus = true; + scope.buttonTextCredit = "label.button.unblockCredit"; + scope.taskPermissionNameCredit = 'UNBLOCKCREDIT_SAVINGSACCOUNT'; + } + } + + }); + break; + case "modifytransaction": resourceFactory.savingsTrxnsResource.get({savingsId: scope.accountId, transactionId: routeParams.transactionId, template: 'true'}, function (data) { @@ -316,7 +394,7 @@ scope.paymentDatefield = true; scope.modelName = 'dueDate'; scope.taskPermissionName = 'PAY_SAVINGSACCOUNTCHARGE'; - scope.showNoteField = true; + scope.showNoteField = true; break; case "inactivate": scope.inactivateCharge = true; @@ -326,6 +404,37 @@ scope.waiveCharge = true; scope.taskPermissionName = 'WAIVE_SAVINGSACCOUNTCHARGE'; break; + case "holdAmount": + resourceFactory.savingsTrxnsTemplateResource.get({savingsId: scope.accountId}, function (data) { + scope.paymentTypes = data.paymentTypeOptions; + }); + scope.title = 'label.heading.holdamountsavingaccount'; + scope.labelName = 'label.input.transactiondate'; + scope.modelName = 'transactionDate'; + scope.showDateField = true; + scope.showNoteField = false; + scope.showReasonForBlock = true; + scope.isTransaction = true; + scope.transactionAmountField = true; + scope.showPaymentDetails = false; + scope.holdAmount= true; + scope.taskPermissionName = 'HOLDAMOUNT_SAVINGSACCOUNT'; + break; + case "unlock": + scope.title = 'label.heading.unlocksavingsaccount'; + scope.labelName = 'label.input.unlockdate'; + scope.modelName = 'unlockdate'; + scope.showDateField = true; + scope.taskPermissionName = 'UNLOCK_SAVINGSACCOUNT'; + break; + case "nextWithdrawalDate": + scope.title = 'label.heading.nextWithdrawalDate'; + scope.labelName = 'label.input.nextWithdrawalDate'; + scope.modelName = 'nextWithdrawalDate'; + scope.showDateField = true; + scope.restrictDate = null; + scope.taskPermissionName = 'NEXTWITHDRAWALDATE_SAVINGSACCOUNT'; + break; } scope.cancel = function () { @@ -338,7 +447,7 @@ this.formData.locale = scope.optlang.code; this.formData.dateFormat = scope.df; } - if (scope.action == "deposit" || scope.action == "withdrawal" || scope.action == "modifytransaction" || scope.action=="postInterestAsOn") { + if (scope.action == "deposit" || scope.action == "withdrawal" || scope.action == "holdAmount" || scope.action == "modifytransaction" || scope.action=="postInterestAsOn" || scope.action=="postAccrualInterestAsOn" || scope.action == "unlock" || scope.action == "nextWithdrawalDate") { if (scope.action == "withdrawal") { if (this.formData.transactionDate) { this.formData.transactionDate = dateFilter(this.formData.transactionDate, scope.df); @@ -361,6 +470,28 @@ } this.formData.isPostInterestAsOn=true; } + if(scope.action=="postAccrualInterestAsOn"){ + if (this.formData.transactionDate) { + this.formData.transactionDate = dateFilter(this.formData.transactionDate, scope.df); + } + this.formData.isPostInterestAsOn=true; + } + if (scope.action == "holdAmount") { + this.formData.remarks = this.formData.note; + if (this.formData.transactionDate) { + this.formData.transactionDate = dateFilter(this.formData.transactionDate, scope.df); + } + } + if(scope.action == "unlock"){ + if (this.formData.unlockdate) { + this.formData.unlockdate = dateFilter(this.formData.unlockdate, scope.df); + } + } + if(scope.action == "nextWithdrawalDate"){ + if (this.formData.nextWithdrawalDate) { + this.formData.nextWithdrawalDate = dateFilter(this.formData.nextWithdrawalDate, scope.df); + } + } params.savingsId = scope.accountId; resourceFactory.savingsTrxnsResource.save(params, this.formData, function (data) { @@ -428,6 +559,51 @@ } }; + scope.blockUnblockDebit = function(permission){ + console.log(permission); + if(scope.action == "freeze"){ + if (permission == "BLOCKDEBIT_SAVINGSACCOUNT") { + this.formData = { + narrationId: this.formData.narrationId, + reasonForBlock : this.formData.reasonForBlock, + pndComment : this.formData.reasonForBlock + } + scope.action = "blockDebit"; + } + if (permission == "UNBLOCKDEBIT_SAVINGSACCOUNT"){ + this.formData = { + narrationId: this.formData.narrationId, + reasonForBlock : this.formData.reasonForBlock, + pndComment : this.formData.reasonForBlock + } + scope.action = "unblockDebit"; + } + if (permission == "BLOCKCREDIT_SAVINGSACCOUNT") { + this.formData = { + narrationId: this.formData.narrationId, + reasonForBlock : this.formData.reasonForBlock, + pndComment : this.formData.reasonForBlock + } + scope.action = "blockCredit"; + } + if (permission == "UNBLOCKCREDIT_SAVINGSACCOUNT"){ + this.formData = { + narrationId: this.formData.narrationId, + reasonForBlock : this.formData.reasonForBlock, + pndComment : this.formData.reasonForBlock + } + scope.action = "unblockCredit"; + } + + + } + var params = {command: scope.action, accountId : scope.accountId}; + + resourceFactory.savingsResource.save(params, this.formData, function (data) { + location.path('/viewsavingaccount/' + data.savingsId); + }); + } + scope.submitDatatable = function(){ if(scope.datatables) { asyncLoop(Object.keys(scope.entityformData.datatables).length,function(loop){ @@ -473,8 +649,9 @@ } }; } + }); - mifosX.ng.application.controller('SavingAccountActionsController', ['$scope','$rootScope', 'ResourceFactory', '$location', '$routeParams', 'dateFilter', mifosX.controllers.SavingAccountActionsController]).run(function ($log) { + mifosX.ng.application.controller('SavingAccountActionsController', ['$scope','$rootScope', 'ResourceFactory', '$location', '$routeParams', 'dateFilter', '$timeout', mifosX.controllers.SavingAccountActionsController]).run(function ($log) { $log.info("SavingAccountActionsController initialized"); }); }(mifosX.controllers || {})); diff --git a/app/scripts/controllers/savings/SavingsDocumentController.js b/app/scripts/controllers/savings/SavingsDocumentController.js new file mode 100644 index 00000000..ee73a1f4 --- /dev/null +++ b/app/scripts/controllers/savings/SavingsDocumentController.js @@ -0,0 +1,30 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + SavingsDocumentController: function (scope, location, resourceFactory, http, routeParams, API_VERSION, Upload, $rootScope) { + scope.savingsId = routeParams.savingsId; + scope.onFileSelect = function (files) { + scope.formData.file = files[0]; + }; + + scope.submit = function () { + Upload.upload({ + url: $rootScope.hostUrl + API_VERSION + '/savings/' + scope.savingsId + '/documents', + data: { name : scope.formData.name, description : scope.formData.description, file: scope.formData.file}, + }).then(function (data) { + // to fix IE not refreshing the model + if (!scope.$$phase) { + scope.$apply(); + } + location.path('/savingaccount/' + scope.savingsId + '/documents'); + }); + }; + + resourceFactory.codeValueResource.getAllCodeValues({codeId: 34}, function (data) { + scope.documenttypes = data; + }); + } + }); + mifosX.ng.application.controller('SavingsDocumentController', ['$scope', '$location', 'ResourceFactory', '$http', '$routeParams', 'API_VERSION', 'Upload', '$rootScope', mifosX.controllers.SavingsDocumentController]).run(function ($log) { + $log.info("SavingsDocumentController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/savings/SavingsDocumentsController.js b/app/scripts/controllers/savings/SavingsDocumentsController.js new file mode 100644 index 00000000..6a0af1d6 --- /dev/null +++ b/app/scripts/controllers/savings/SavingsDocumentsController.js @@ -0,0 +1,47 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + SavingsDocumentsController: function (scope, resourceFactory, routeParams, location, route, $rootScope, API_VERSION) { + + scope.accountDocuments = []; + scope.savingsId = routeParams.savingsId; + + resourceFactory.savingsDocumentsResource.getAllSavingsDocuments({savingsId: routeParams.savingsId}, function (data) { + for (var l in data) { + + var docs = {}; + docs = API_VERSION + '/' + data[l].parentEntityType + '/' + data[l].parentEntityId + '/documents/' + data[l].id + '/attachment?tenantIdentifier=' + $rootScope.tenantIdentifier; + data[l].docUrl = docs; + if (data[l].fileName) + if (data[l].fileName.toLowerCase().indexOf('.jpg') != -1 || data[l].fileName.toLowerCase().indexOf('.jpeg') != -1 || data[l].fileName.toLowerCase().indexOf('.png') != -1) + data[l].fileIsImage = true; + if (data[l].type) + if (data[l].type.toLowerCase().indexOf('image') != -1) + data[l].fileIsImage = true; + } + scope.accountDocuments = data; + }); + + scope.deleteDocument = function (documentId, index) { + resourceFactory.savingsDocumentsResource.delete({savingsId: routeParams.savingsId, documentId: documentId}, '', function (data) { + scope.accountDocuments.splice(index, 1); + }); + }; + + scope.previewDocument = function (url, fileName) { + scope.preview = true; + scope.fileUrl = scope.hostUrl + url; + if(fileName.toLowerCase().indexOf('.png') != -1) + scope.fileType = 'image/png'; + else if(fileName.toLowerCase().indexOf('.jpg') != -1) + scope.fileType = 'image/jpg'; + else if(fileName.toLowerCase().indexOf('.jpeg') != -1) + scope.fileType = 'image/jpeg'; + }; + + } + }); + mifosX.ng.application.controller('SavingsDocumentsController', ['$scope', 'ResourceFactory', '$routeParams', '$location', '$route', '$rootScope', 'API_VERSION', mifosX.controllers.SavingsDocumentsController]).run(function ($log) { + $log.info("SavingsDocumentsController initialized"); + }); +}(mifosX.controllers || {})); + diff --git a/app/scripts/controllers/savings/ViewGSIMaccountController.js b/app/scripts/controllers/savings/ViewGSIMaccountController.js index c53f8680..004b45f9 100644 --- a/app/scripts/controllers/savings/ViewGSIMaccountController.js +++ b/app/scripts/controllers/savings/ViewGSIMaccountController.js @@ -1,212 +1,230 @@ -(function (module) { - mifosX.controllers = _.extend(module, { - ViewGSIMaccountController: function (scope, routeParams, route, location, resourceFactory, dateFilter, $uibModal) { - - scope.groupId=routeParams.groupId; - scope.gsimAccountNumber=routeParams.gsimAccountNumber; - scope.savingaccountdetails = []; - var gsimChildAccountId=0; - scope.staffData = {}; - scope.formData = {}; - scope.date = {}; - var parentGSIMId=0; - - - scope.convertDateArrayToObject = function(dateFieldName){ - for(var i in scope.savingaccountdetails.transactions){ - scope.savingaccountdetails.transactions[i][dateFieldName] = new Date(scope.savingaccountdetails.transactions[i].date); - } - }; - - resourceFactory.groupGSIMAccountResource.get({groupId: scope.groupId,parentGSIMAccountNo:scope.gsimAccountNumber}, function (data) { - scope.groupAccounts = data[0]; - gsimChildAccountId=data[0].childGSIMAccounts[0].id; - parentGSIMId=scope.groupAccounts.gsimId; - - resourceFactory.savingsResource.get({accountId: gsimChildAccountId, associations: 'all'}, function (data) { - scope.savingaccountdetails = data; - scope.convertDateArrayToObject('date'); - if(scope.savingaccountdetails.groupId) { - resourceFactory.groupResource.get({groupId: scope.savingaccountdetails.groupId}, function (data) { - scope.groupLevel = data.groupLevel; - }); - } - scope.showonhold = true; - if(angular.isUndefined(data.onHoldFunds)){ - scope.showonhold = false; - } - scope.staffData.staffId = data.staffId; - scope.date.toDate = new Date(); - scope.date.fromDate = new Date(data.timeline.activatedOnDate); - - scope.status = data.status.value; - if (scope.status == "Submitted and pending approval" || scope.status == "Active" || scope.status == "Approved") { - scope.choice = true; - } - scope.chargeAction = data.status.value == "Submitted and pending approval" ? true : false; - scope.chargePayAction = data.status.value == "Active" ? true : false; - if (scope.savingaccountdetails.charges) { - scope.charges = scope.savingaccountdetails.charges; - scope.chargeTableShow = true; - } else { - scope.chargeTableShow = false; - } - if (data.status.value == "Submitted and pending approval") { - scope.buttons = { singlebuttons: [ - { - name: "button.modifyapplication", - icon: "fa fa-pencil ", - taskPermissionName:"UPDATE_SAVINGSACCOUNT" - }, - { - name: "button.approve", - icon: "fa fa-check", - taskPermissionName:"APPROVE_SAVINGSACCOUNT" - }, - { - name: "button.reject", - icon: "fa fa-remove-circle", - taskPermissionName:"REJECT_SAVINGSACCOUNT" - } - ] - }; - } - - if (data.status.value == "Approved") { - scope.buttons = { singlebuttons: [ - { - name: "button.undoapproval", - icon: "fa faf-undo", - taskPermissionName:"APPROVALUNDO_SAVINGSACCOUNT" - }, - { - name: "button.activate", - icon: "fa fa-check", - taskPermissionName:"ACTIVATE_SAVINGSACCOUNT" - } - ] - }; - } - - if (data.status.value == "Active") { - scope.buttons = { singlebuttons: [ - - { - name: "button.deposit", - icon: "fa fa-arrow-right", - taskPermissionName:"DEPOSIT_SAVINGSACCOUNT" - }, - { - name: "button.close", - icon :"fa fa-ban-circle", - taskPermissionName:"CLOSE_SAVINGSACCOUNT" - } - ] - }; - } - if (data.annualFee) { - var annualdueDate = []; - annualdueDate = data.annualFee.feeOnMonthDay; - annualdueDate.push(new Date().getFullYear()); - scope.annualdueDate = new Date(annualdueDate); - }; - }); - }); - - scope.routeToSaving = function (id) { - location.path('/viewsavingaccount/' + id); - }; - console.log("outer"+parentGSIMId); - - scope.clickEvent = function (eventName, accountId) { - eventName = eventName || ""; - switch (eventName) { - case "modifyapplication": - location.path('/editgsimaccount/' + parentGSIMId+'/'+gsimChildAccountId+'/'+scope.groupId+'/'+scope.gsimAccountNumber); - break; - case "approve": - location.path('/gsimaccount/'+parentGSIMId +'/'+gsimChildAccountId+ '/approve/'+scope.groupId+'/'+scope.gsimAccountNumber); - break; - case "reject": - location.path('/gsimaccount/'+parentGSIMId +'/'+gsimChildAccountId+ '/reject/'+scope.groupId+'/'+scope.gsimAccountNumber); - break; - case "withdrawnbyclient": - location.path('/savingaccount/' + accountId + '/withdrawnByApplicant'); - break; - case "delete": - resourceFactory.savingsResource.delete({accountId: accountId}, {}, function (data) { - var destination = '/viewgroup/' + data.groupId; - if (data.clientId) destination = '/viewclient/' + data.clientId; - location.path(destination); - }); - break; - case "undoapproval": - location.path('/gsimaccount/'+parentGSIMId +'/'+gsimChildAccountId+ '/undoapproval/'+scope.groupId+'/'+scope.gsimAccountNumber); - break; - case "activate": - location.path('/gsimaccount/'+parentGSIMId +'/'+gsimChildAccountId+ '/activate/'+scope.groupId+'/'+scope.gsimAccountNumber); - break; - case "deposit": - location.path('/gsimaccount/'+parentGSIMId +'/'+gsimChildAccountId+ '/gsimDeposit/'+scope.groupId+'/'+scope.gsimAccountNumber); - break; - case "withdraw": - location.path('/gsimaccount/'+parentGSIMId +'/'+gsimChildAccountId+ '/gsimWithdrawal/'+scope.groupId+'/'+scope.gsimAccountNumber); - break; - case "addcharge": - location.path('/savingaccounts/' + accountId + '/charges'); - break; - case "calculateInterest": - resourceFactory.savingsResource.save({accountId: accountId, command: 'calculateInterest'}, {}, function (data) { - route.reload(); - }); - break; - case "postInterest": - resourceFactory.savingsResource.save({accountId: accountId, command: 'postInterest'}, {}, function (data) { - route.reload(); - }); - break; - case "applyAnnualFees": - location.path('/savingaccountcharge/' + accountId + '/applyAnnualFees/' + scope.annualChargeId); - break; - case "transferFunds": - if (scope.savingaccountdetails.clientId) { - location.path('/accounttransfers/fromsavings/' + accountId); - } - break; - case "close": - location.path('/gsimaccount/'+parentGSIMId +'/'+gsimChildAccountId+ '/close'); - break; - case "assignSavingsOfficer": - location.path('/assignsavingsofficer/' + accountId); - break; - case "unAssignSavingsOfficer": - location.path('/unassignsavingsofficer/' + accountId); - break; - case "enableWithHoldTax": - var changes = { - withHoldTax:true - }; - resourceFactory.savingsResource.update({accountId: accountId, command: 'updateWithHoldTax'}, changes, function (data) { - route.reload(); - }); - break; - case "disableWithHoldTax": - var changes = { - withHoldTax:false - }; - resourceFactory.savingsResource.update({accountId: accountId, command: 'updateWithHoldTax'}, changes, function (data) { - route.reload(); - }); - break; - case "postInterestAsOn": - location.path('/savingaccount/' + accountId + '/postInterestAsOn'); - break; - } - }; - - } - }); - mifosX.ng.application.controller('ViewGSIMaccountController', ['$scope', '$routeParams', '$route', '$location', 'ResourceFactory', 'dateFilter', '$uibModal', mifosX.controllers.ViewGSIMaccountController]).run(function ($log) { - $log.info("ViewGSIMaccountController initialized"); - }); -}(mifosX.controllers || {})); +(function (module) { + mifosX.controllers = _.extend(module, { + ViewGSIMaccountController: function (scope, routeParams, route, location, resourceFactory, dateFilter, $uibModal) { + + scope.groupId=routeParams.groupId; + scope.gsimAccountNumber=routeParams.gsimAccountNumber; + scope.savingaccountdetails = []; + var gsimChildAccountId=0; + scope.staffData = {}; + scope.formData = {}; + scope.date = {}; + var parentGSIMId=0; + + + scope.convertDateArrayToObject = function(dateFieldName){ + for(var i in scope.savingaccountdetails.transactions){ + scope.savingaccountdetails.transactions[i][dateFieldName] = new Date(scope.savingaccountdetails.transactions[i].date); + } + }; + + resourceFactory.groupGSIMAccountResource.get({groupId: scope.groupId,parentGSIMAccountNo:scope.gsimAccountNumber}, function (data) { + scope.groupAccounts = data[0]; + gsimChildAccountId=data[0].childGSIMAccounts[0].id; + parentGSIMId=scope.groupAccounts.gsimId; + + resourceFactory.savingsResource.get({accountId: gsimChildAccountId, associations: 'all'}, function (data) { + scope.savingaccountdetails = data; + scope.convertDateArrayToObject('date'); + if(scope.savingaccountdetails.groupId) { + resourceFactory.groupResource.get({groupId: scope.savingaccountdetails.groupId}, function (data) { + scope.groupLevel = data.groupLevel; + }); + } + scope.showonhold = true; + if(angular.isUndefined(data.onHoldFunds)){ + scope.showonhold = false; + } + scope.staffData.staffId = data.staffId; + scope.date.toDate = new Date(); + scope.date.fromDate = new Date(data.timeline.activatedOnDate); + + scope.status = data.status.value; + if (scope.status == "Submitted and pending approval" || scope.status == "Active" || scope.status == "Approved") { + scope.choice = true; + } + scope.chargeAction = data.status.value == "Submitted and pending approval" ? true : false; + scope.chargePayAction = data.status.value == "Active" ? true : false; + if (scope.savingaccountdetails.charges) { + scope.charges = scope.savingaccountdetails.charges; + scope.chargeTableShow = true; + } else { + scope.chargeTableShow = false; + } + if (data.status.value == "Submitted and pending approval") { + scope.buttons = { singlebuttons: [ + { + name: "button.modifyapplication", + icon: "fa fa-pencil ", + taskPermissionName:"UPDATE_SAVINGSACCOUNT" + }, + { + name: "button.approve", + icon: "fa fa-check", + taskPermissionName:"APPROVE_SAVINGSACCOUNT" + }, + { + name: "button.reject", + icon: "fa fa-remove-circle", + taskPermissionName:"REJECT_SAVINGSACCOUNT" + }, + { + name: "button.addmember", + icon: "fa fa-plus", + taskPermissionName:"ADDMEMBER_GSIMACCOUNT" + } + ] + }; + } + + if (data.status.value == "Approved") { + scope.buttons = { singlebuttons: [ + { + name: "button.undoapproval", + icon: "fa faf-undo", + taskPermissionName:"APPROVALUNDO_SAVINGSACCOUNT" + }, + { + name: "button.activate", + icon: "fa fa-check", + taskPermissionName:"ACTIVATE_SAVINGSACCOUNT" + }, + { + name: "button.addmember", + icon: "fa fa-plus", + taskPermissionName:"ADDMEMBER_GSIMACCOUNT" + } + ] + }; + } + + if (data.status.value == "Active") { + scope.buttons = { singlebuttons: [ + + { + name: "button.deposit", + icon: "fa fa-arrow-right", + taskPermissionName:"DEPOSIT_SAVINGSACCOUNT" + }, + { + name: "button.close", + icon :"fa fa-ban-circle", + taskPermissionName:"CLOSE_SAVINGSACCOUNT" + }, + { + name: "button.addmember", + icon: "fa fa-plus", + taskPermissionName:"ADDMEMBER_GSIMACCOUNT" + } + ] + }; + } + if (data.annualFee) { + var annualdueDate = []; + annualdueDate = data.annualFee.feeOnMonthDay; + annualdueDate.push(new Date().getFullYear()); + scope.annualdueDate = new Date(annualdueDate); + }; + }); + }); + + scope.routeToSaving = function (id) { + location.path('/viewsavingaccount/' + id); + }; + + + scope.clickEvent = function (eventName, accountId) { + eventName = eventName || ""; + switch (eventName) { + case "modifyapplication": + location.path('/editgsimaccount/' + parentGSIMId+'/'+gsimChildAccountId+'/'+scope.groupId+'/'+scope.gsimAccountNumber); + break; + case "approve": + location.path('/gsimaccount/'+parentGSIMId +'/'+gsimChildAccountId+ '/approve/'+scope.groupId+'/'+scope.gsimAccountNumber); + break; + case "reject": + location.path('/gsimaccount/'+parentGSIMId +'/'+gsimChildAccountId+ '/reject/'+scope.groupId+'/'+scope.gsimAccountNumber); + break; + case "addmember": + location.path('/savingsaccounts/'+parentGSIMId +'/'+gsimChildAccountId+ '/addmember/'+scope.groupId+'/'+scope.gsimAccountNumber); + break; + case "withdrawnbyclient": + location.path('/savingaccount/' + accountId + '/withdrawnByApplicant'); + break; + case "delete": + resourceFactory.savingsResource.delete({accountId: accountId}, {}, function (data) { + var destination = '/viewgroup/' + data.groupId; + if (data.clientId) destination = '/viewclient/' + data.clientId; + location.path(destination); + }); + break; + case "undoapproval": + location.path('/gsimaccount/'+parentGSIMId +'/'+gsimChildAccountId+ '/undoapproval/'+scope.groupId+'/'+scope.gsimAccountNumber); + break; + case "activate": + location.path('/gsimaccount/'+parentGSIMId +'/'+gsimChildAccountId+ '/activate/'+scope.groupId+'/'+scope.gsimAccountNumber); + break; + case "deposit": + location.path('/gsimaccount/'+parentGSIMId +'/'+gsimChildAccountId+ '/gsimDeposit/'+scope.groupId+'/'+scope.gsimAccountNumber); + break; + case "withdraw": + location.path('/gsimaccount/'+parentGSIMId +'/'+gsimChildAccountId+ '/gsimWithdrawal/'+scope.groupId+'/'+scope.gsimAccountNumber); + break; + case "addcharge": + location.path('/savingaccounts/' + accountId + '/charges'); + break; + case "calculateInterest": + resourceFactory.savingsResource.save({accountId: accountId, command: 'calculateInterest'}, {}, function (data) { + route.reload(); + }); + break; + case "postInterest": + resourceFactory.savingsResource.save({accountId: accountId, command: 'postInterest'}, {}, function (data) { + route.reload(); + }); + break; + case "applyAnnualFees": + location.path('/savingaccountcharge/' + accountId + '/applyAnnualFees/' + scope.annualChargeId); + break; + case "transferFunds": + if (scope.savingaccountdetails.clientId) { + location.path('/accounttransfers/fromsavings/' + accountId); + } + break; + case "close": + location.path('/gsimaccount/'+parentGSIMId +'/'+gsimChildAccountId+ '/close'); + break; + case "assignSavingsOfficer": + location.path('/assignsavingsofficer/' + accountId); + break; + case "unAssignSavingsOfficer": + location.path('/unassignsavingsofficer/' + accountId); + break; + case "enableWithHoldTax": + var changes = { + withHoldTax:true + }; + resourceFactory.savingsResource.update({accountId: accountId, command: 'updateWithHoldTax'}, changes, function (data) { + route.reload(); + }); + break; + case "disableWithHoldTax": + var changes = { + withHoldTax:false + }; + resourceFactory.savingsResource.update({accountId: accountId, command: 'updateWithHoldTax'}, changes, function (data) { + route.reload(); + }); + break; + case "postInterestAsOn": + location.path('/savingaccount/' + accountId + '/postInterestAsOn'); + break; + } + }; + + } + }); + mifosX.ng.application.controller('ViewGSIMaccountController', ['$scope', '$routeParams', '$route', '$location', 'ResourceFactory', 'dateFilter', '$uibModal', mifosX.controllers.ViewGSIMaccountController]).run(function ($log) { + $log.info("ViewGSIMaccountController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/savings/ViewSavingDepositAccrualTransactionController.js b/app/scripts/controllers/savings/ViewSavingDepositAccrualTransactionController.js new file mode 100644 index 00000000..f48207f3 --- /dev/null +++ b/app/scripts/controllers/savings/ViewSavingDepositAccrualTransactionController.js @@ -0,0 +1,181 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + ViewSavingDepositAccrualTransactionController: function (scope, routeParams, resourceFactory, paginatorService, location, $uibModal, route, dateFilter, $sce, $rootScope, API_VERSION) { + scope.report = false; + scope.hidePentahoReport = true; + scope.showActiveCharges = true; + scope.formData = {}; + scope.date = {}; + scope.staffData = {}; + scope.fieldOfficers = []; + scope.savingaccountdetails = []; + scope.subStatus = false; + scope.transactions = []; + scope.pages = 0; + + scope.transactionsPerPage = 15; + + + /*** + * we are using orderBy(https://docs.angularjs.org/api/ng/filter/orderBy) filter to sort fields in ui + * api returns dates in array format[yyyy, mm, dd], converting the array of dates to date object + * @param dateFieldName + */ + scope.convertDateArrayToObject = function (dateFieldName) { + for (var i in scope.savingaccountdetails.transactions) { + scope.savingaccountdetails.transactions[i][dateFieldName] = new Date(scope.savingaccountdetails.transactions[i].date); + } + }; + + scope.getResultsPage = function (pageNumber) { + if (location.search().savingsId != null) { + scope.getSavingsAccruals(pageNumber); + } else if (location.search().recurringDepositId != null) { + scope.getRecurringDepositAccruals(pageNumber); + } else if (location.search().fixedDepositId != null) { + scope.getFixedDepositAccruals(pageNumber); + } + } + + scope.routeTo = function (savingsAccountId, transactionId, accountTransfer) { + if (location.search().savingsId != null) { + location.path('/viewsavingtrxn/' + savingsAccountId + '/trxnId/' + transactionId); + } else if (location.search().recurringDepositId != null) { + location.path('/viewrecurringdepositaccounttrxn/' + savingsAccountId + '/' + transactionId); + } else if (location.search().fixedDepositId != null) { + location.path('/viewfixeddepositaccounttrxn/' + savingsAccountId + '/' + transactionId); + } + }; + + scope.getSavingsAccruals = function (pageNumber) { + if(scope.searchText){ + var startPosition = (pageNumber - 1) * scope.transactionsPerPage; + scope.transactions = scope.savingaccountdetails.transactions.slice(startPosition, startPosition + scope.transactionsPerPage); + return; + } + if(pageNumber != null){ + scope.pages = ((pageNumber - 1) * scope.transactionsPerPage); + } + resourceFactory.savingsResource.get({ accountId: location.search().savingsId, associations: 'accrualTransactions', + offset: scope.pages, + limit: scope.transactionsPerPage + }, function (data) { + scope.savingaccountdetails = data; + scope.totalTransactions = scope.savingaccountdetails.transactionSize; + scope.transactions = scope.savingaccountdetails.transactions; + }); + } + + scope.getFixedDepositAccruals = function (pageNumber) { + if(pageNumber != null){ + scope.pages = ((pageNumber - 1) * scope.transactionsPerPage); + } + resourceFactory.fixedDepositAccountResource.get({ + accountId: location.search().fixedDepositId, associations: 'accrualTransactions', + offset: scope.pages, + limit: scope.transactionsPerPage + }, function (data) { + scope.savingaccountdetails = data; + scope.convertDateArrayToObject('date'); + scope.totalTransactions = scope.savingaccountdetails.transactionSize; + scope.transactions = scope.savingaccountdetails.transactions; + }); + } + + scope.getRecurringDepositAccruals = function (pageNumber) { + if(pageNumber != null){ + scope.pages = ((pageNumber - 1) * scope.transactionsPerPage); + } + resourceFactory.recurringDepositAccountResource.get({ + accountId: location.search().recurringDepositId, associations: 'accrualTransactions', + offset: scope.pages, + limit: scope.transactionsPerPage + }, function (data) { + scope.savingaccountdetails = data; + scope.convertDateArrayToObject('date'); + scope.totalTransactions = scope.savingaccountdetails.transactionSize; + scope.transactions = scope.savingaccountdetails.transactions; + }); + } + + scope.initPage = function () { + if (location.search().savingsId != null) { + scope.getSavingsAccruals(null); + } else if (location.search().recurringDepositId != null) { + scope.getRecurringDepositAccruals(null); + } else if (location.search().fixedDepositId != null) { + scope.getFixedDepositAccruals(null); + } + } + + scope.initPage(); + + if (location.search().savingsId != null) { + scope.initPage(); + scope.formData.savingsaccountId = location.search().savingsId; + scope.isValid = true; + scope.path = "#/viewsavingaccount/" + location.search().savingsId; + } + if (location.search().recurringDepositId != null) { + scope.getRecurringDepositAccruals(1); + scope.formData.savingsaccountId = location.search().recurringDepositId; + scope.isValid = true; + scope.path = "#/viewrecurringdepositaccount/" + location.search().recurringDepositId; + } + + if (location.search().fixedDepositId != null) { + scope.getFixedDepositAccruals(1); + scope.formData.savingsaccountId = location.search().fixedDepositId; + scope.isValid = true; + scope.path = "#/viewfixeddepositaccount/" + location.search().fixedDepositId; + } + + scope.viewSavingsTransactionReceipts = function (transactionId) { + scope.report = true; + scope.viewTransactionReport = true; + scope.viewSavingReport = false; + scope.printbtn = false; + scope.viewReport = true; + scope.hidePentahoReport = true; + scope.formData.outputType = 'PDF'; + scope.baseURL = $rootScope.hostUrl + API_VERSION + "/runreports/" + encodeURIComponent("Savings Transaction Receipt"); + scope.baseURL += "?output-type=" + encodeURIComponent(scope.formData.outputType) + "&tenantIdentifier=" + $rootScope.tenantIdentifier + "&locale=" + scope.optlang.code; + + var reportParams = ""; + var paramName = "R_transactionId"; + reportParams += encodeURIComponent(paramName) + "=" + encodeURIComponent(transactionId); + if (reportParams > "") { + scope.baseURL += "&" + reportParams; + } + // allow untrusted urls for iframe http://docs.angularjs.org/error/$sce/insecurl + scope.viewReportDetails = $sce.trustAsResourceUrl(scope.baseURL); + + }; + + + scope.printReport = function () { + window.print(); + window.close(); + }; + + + scope.transactionSort = { + column: 'date', + descending: true + }; + + scope.changeTransactionSort = function (column) { + var sort = scope.transactionSort; + if (sort.column == column) { + sort.descending = !sort.descending; + } else { + sort.column = column; + sort.descending = true; + } + }; + } + }); + mifosX.ng.application.controller('ViewSavingDepositAccrualTransactionController', ['$scope', '$routeParams', 'ResourceFactory', 'PaginatorService', '$location', '$uibModal', '$route', 'dateFilter', '$sce', '$rootScope', 'API_VERSION', mifosX.controllers.ViewSavingDepositAccrualTransactionController]).run(function ($log) { + $log.info("ViewSavingDepositAccrualTransactionController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/savings/ViewSavingDetailsController.js b/app/scripts/controllers/savings/ViewSavingDetailsController.js old mode 100755 new mode 100644 index 3d7c7f2a..17047b62 --- a/app/scripts/controllers/savings/ViewSavingDetailsController.js +++ b/app/scripts/controllers/savings/ViewSavingDetailsController.js @@ -1,25 +1,33 @@ (function (module) { mifosX.controllers = _.extend(module, { - ViewSavingDetailsController: function (scope, routeParams, resourceFactory, paginatorService, location, $uibModal, route, dateFilter, $sce, $rootScope, API_VERSION) { + ViewSavingDetailsController: function (scope, routeParams, resourceFactory, paginatorService, location, $uibModal, route, dateFilter, $sce, $rootScope, API_VERSION, http) { scope.report = false; scope.hidePentahoReport = true; scope.showActiveCharges = true; + scope.isGroupLoan = false; scope.formData = {}; scope.date = {}; scope.staffData = {}; scope.fieldOfficers = []; scope.savingaccountdetails = []; + scope.transactions = []; + scope.subStatus = false; + scope.transactionsPerPage = 15; + scope.isDebit = function (savingsTransactionType) { return savingsTransactionType.withdrawal == true || savingsTransactionType.feeDeduction == true - || savingsTransactionType.overdraftInterest == true || savingsTransactionType.withholdTax == true || savingsTransactionType.amountHold == true; + || savingsTransactionType.overdraftInterest == true || savingsTransactionType.withholdTax == true || savingsTransactionType.amountHold == true + || savingsTransactionType.revokedInterest == true; }; - scope.routeTo = function (savingsAccountId, transactionId, accountTransfer, transferId) { + scope.routeTo = function (savingsAccountId, transactionId, accountTransfer, transferId,transactionType) { + if(transactionType != 'Revoked Interest'){ if (accountTransfer) { location.path('/viewaccounttransfers/' + transferId); } else { location.path('/viewsavingtrxn/' + savingsAccountId + '/trxnId/' + transactionId); } + } }; /*** @@ -98,6 +106,9 @@ case "close": location.path('/savingaccount/' + accountId + '/close'); break; + case "freeze" : + location.path('/savingaccount/' + accountId + '/freeze'); + break; case "assignSavingsOfficer": location.path('/assignsavingsofficer/' + accountId); break; @@ -123,17 +134,35 @@ case "postInterestAsOn": location.path('/savingaccount/' + accountId + '/postInterestAsOn'); break; + case "postAccrualInterestAsOn": + location.path('/savingaccount/' + accountId + '/postAccrualInterestAsOn'); + break; + case "holdAmount": + location.path('/savingaccount/' + accountId + '/holdAmount'); + break; case "hold": location.path('/savingaccount/'+accountId+ '/hold'); case "unhold": location.path('/savingaccount/'+accountId+ '/hold'); break; + case "unlock": + location.path('/savingaccount/'+accountId+ '/unlock'); + break; + case "nextWithdrawalDate": + location.path('/savingaccount/'+accountId+ '/nextWithdrawalDate'); + break; + case "documents": + location.path('/savingaccount/'+accountId+ '/documents'); + break; } }; - resourceFactory.savingsResource.get({accountId: routeParams.id, associations: 'all'}, function (data) { + resourceFactory.savingsResource.get({accountId: routeParams.id, associations: 'all', + offset: 0, + limit: scope.transactionsPerPage + }, function (data) { scope.savingaccountdetails = data; scope.savingaccountdetails.availableBalance = scope.savingaccountdetails.enforceMinRequiredBalance?((!scope.savingaccountdetails.lienAllowed)?(scope.savingaccountdetails.summary.accountBalance - scope.savingaccountdetails.minRequiredBalance):scope.savingaccountdetails.summary.availableBalance):scope.savingaccountdetails.summary.availableBalance; scope.convertDateArrayToObject('date'); @@ -150,10 +179,20 @@ scope.date.toDate = new Date(); scope.date.fromDate = new Date(data.timeline.activatedOnDate); + scope.totalTransactions = scope.savingaccountdetails.transactionSize; + scope.transactions = scope.savingaccountdetails.transactions; + scope.status = data.status.value; if (scope.status == "Submitted and pending approval" || scope.status == "Active" || scope.status == "Approved") { scope.choice = true; } + + if(data.groupId != null && data.groupId > 0){ + scope.isGroupLoan = true; + }else{ + scope.isGroupLoan = false; + } + scope.chargeAction = data.status.value == "Submitted and pending approval" ? true : false; scope.chargePayAction = data.status.value == "Active" ? true : false; if (scope.savingaccountdetails.charges) { @@ -224,6 +263,11 @@ icon: "icon-arrow-right", taskPermissionName:"POSTINTEREST_SAVINGSACCOUNT" }, + { + name: "button.postAccrualInterestAsOn", + icon: "icon-arrow-right", + taskPermissionName:"POSTACCRUALINTERESTASON_SAVINGSACCOUNT" + }, { name: "button.deposit", icon: "fa fa-arrow-up", @@ -244,8 +288,8 @@ icon: "fa fa-stop", taskPermissionName:"HOLD_SAVINGSACCOUNT" // } - ], - options: [ + ]}; + var buttonOptions = [ { name: "button.postInterest", taskPermissionName:"POSTINTEREST_SAVINGSACCOUNT" @@ -257,16 +301,68 @@ { name: "button.close", taskPermissionName:"CLOSE_SAVINGSACCOUNT" - } + }, + { + name: "button.holdAmount", + taskPermissionName : "HOLDAMOUNT_SAVINGSACCOUNT" + }, + { + name: "button.freeze", + taskPermissionName : "" + }, + { + name: "button.nextWithdrawalDate", + taskPermissionName : "NEXTWITHDRAWALDATE_SAVINGSACCOUNT" + }, + { + name: "button.documents", + taskPermissionName: "" + } ] + if($rootScope.hasPermission("UNBLOCKDEBIT_SAVINGSACCOUNT")){ + buttonOptions.forEach(function(v) { + if(v.name == "button.freeze") { + v.taskPermissionName = 'UNBLOCKDEBIT_SAVINGSACCOUNT';} + }); + } + if($rootScope.hasPermission("BLOCKDEBIT_SAVINGSACCOUNT")) { + buttonOptions.forEach(function(v) { + if(v.name == "button.freeze") { + v.taskPermissionName = 'BLOCKDEBIT_SAVINGSACCOUNT';} + }); + } + if ($rootScope.hasPermission("BLOCKCREDIT_SAVINGSACCOUNT")) { + buttonOptions.forEach(function(v) { + if(v.name == "button.freeze") { + v.taskPermissionName = 'BLOCKCREDIT_SAVINGSACCOUNT';} + }); + } + if($rootScope.hasPermission("UNBLOCKCREDIT_SAVINGSACCOUNT")){ + buttonOptions.forEach(function(v) { + if(v.name == "button.freeze") { + v.taskPermissionName = 'UNBLOCKCREDIT_SAVINGSACCOUNT';} + }); + } + + scope.buttons = { + singlebuttons: scope.buttons.singlebuttons, + options: buttonOptions }; + if (data.clientId) { scope.buttons.options.push({ name: "button.transferFunds", taskPermissionName:"CREATE_ACCOUNTTRANSFER" }); } + if (data.accountType == "GSIM") { + scope.buttons.options.push({ + name: "button.unlock", + taskPermissionName:"UNLOCK_SAVINGSACCOUNT" + }); + + } if (data.charges) { for (var i in scope.charges) { if (scope.charges[i].name == "Annual fee - INR") { @@ -298,7 +394,6 @@ name: "button.unhold", icon: "icon-arrow-stop", taskPermissionName: "UNHOLD_SAVINGSACCOUNT" - } ] }; @@ -316,6 +411,36 @@ }); }); + + scope.getResultsPage = function (pageNumber) { + if(scope.searchText){ + var startPosition = (pageNumber - 1) * scope.transactionsPerPage; + scope.transactions = scope.savingaccountdetails.transactions.slice(startPosition, startPosition + scope.transactionsPerPage); + return; + } + resourceFactory.savingsResource.get({accountId: routeParams.id, associations: 'all', + offset: ((pageNumber - 1) * scope.transactionsPerPage), + limit: scope.clientsPerPage + }, function (data) { + scope.savingaccountdetails = data; + scope.transactions = scope.savingaccountdetails.transactions; + }); + } + + scope.initPage = function () { + resourceFactory.savingsResource.get({accountId: routeParams.id, associations: 'all', + offset: 0, + limit: scope.transactionsPerPage + }, function (data) { + scope.savingaccountdetails = data; + scope.totalTransactions = scope.savingaccountdetails.transactionSize; + scope.transactions = scope.savingaccountdetails.transactions; + }); + + } + + scope.initPage(); + var fetchFunction = function (offset, limit, callback) { var params = {}; params.offset = offset; @@ -339,20 +464,7 @@ resourceFactory.DataTablesResource.getAllDataTables({apptable: 'm_savings_account'}, function (data) { scope.savingdatatables = data; }); - /*// Saving notes not yet implemented - resourceFactory.savingsResource.getAllNotes({accountId: routeParams.id,resourceType:'notes'}, function (data) { - scope.savingNotes = data; - }); - scope.saveNote = function () { - resourceFactory.savingsResource.save({accountId: routeParams.id, resourceType: 'notes'}, this.formData, function (data) { - var today = new Date(); - temp = { id: data.resourceId, note: scope.formData.note, createdByUsername: "test", createdOn: today }; - scope.savingNotes.push(temp); - scope.formData.note = ""; - scope.predicate = '-id'; - }); - };*/ scope.dataTableChange = function (datatable) { resourceFactory.DataTablesResource.getTableDetails({datatablename: datatable.registeredTableName, @@ -398,6 +510,9 @@ scope.viewJournalEntries = function(){ location.path("/searchtransaction/").search({savingsId: scope.savingaccountdetails.id}); }; + scope.viewAccrualTransaction = function(){ + location.path("/viewaccrualtransaction/").search({savingsId: scope.savingaccountdetails.id}); + }; scope.viewDataTable = function (registeredTableName,data){ if (scope.datatabledetails.isMultirow) { @@ -422,8 +537,9 @@ scope.viewReport = true; scope.hidePentahoReport = true; scope.formData.outputType = 'PDF'; - scope.baseURL = $rootScope.hostUrl + API_VERSION + "/runreports/" + encodeURIComponent("Client Saving Transactions"); - scope.baseURL += "?output-type=" + encodeURIComponent(scope.formData.outputType) + "&tenantIdentifier=" + $rootScope.tenantIdentifier+"&locale="+scope.optlang.code; + + var reportURL = $rootScope.hostUrl + API_VERSION + "/runreports/" + encodeURIComponent("Client Saving Transactions"); + reportURL += "?output-type=" + encodeURIComponent(scope.formData.outputType) + "&tenantIdentifier=" + $rootScope.tenantIdentifier+"&locale="+scope.optlang.code; var reportParams = ""; scope.startDate = dateFilter(scope.date.fromDate, 'yyyy-MM-dd'); @@ -435,11 +551,28 @@ paramName = "R_savingsAccountId"; reportParams += encodeURIComponent(paramName) + "=" + encodeURIComponent(scope.savingaccountdetails.accountNo); if (reportParams > "") { - scope.baseURL += "&" + reportParams; + reportURL += "&" + reportParams; } // allow untrusted urls for iframe http://docs.angularjs.org/error/$sce/insecurl - scope.viewReportDetails = $sce.trustAsResourceUrl(scope.baseURL); + reportURL = $sce.trustAsResourceUrl(reportURL); + reportURL = $sce.valueOf(reportURL); + + http.get(reportURL, { responseType: 'arraybuffer' }) + .then(function (response) { + let data = response.data; + let status = response.status; + let headers = response.headers; + let config = response.config; + var contentType = headers('Content-Type'); + var file = new Blob([data], { type: contentType }); + var fileContent = URL.createObjectURL(file); + scope.baseURL = $sce.trustAsResourceUrl(fileContent); + scope.viewReportDetails = $sce.trustAsResourceUrl(fileContent); + }).catch(function (error) { + $log.error(`Error loading ${scope.reportType} report`); + $log.error(error); + }); }; @@ -451,17 +584,37 @@ scope.viewReport = true; scope.hidePentahoReport = true; scope.formData.outputType = 'PDF'; - scope.baseURL = $rootScope.hostUrl + API_VERSION + "/runreports/" + encodeURIComponent("Savings Transaction Receipt"); - scope.baseURL += "?output-type=" + encodeURIComponent(scope.formData.outputType) + "&tenantIdentifier=" + $rootScope.tenantIdentifier+"&locale="+scope.optlang.code; + + var reportURL = $rootScope.hostUrl + API_VERSION + "/runreports/" + encodeURIComponent("Savings Transaction Receipt"); + reportURL += "?output-type=" + encodeURIComponent(scope.formData.outputType) + "&tenantIdentifier=" + $rootScope.tenantIdentifier+"&locale="+scope.optlang.code; + + var reportParams = ""; var paramName = "R_transactionId"; reportParams += encodeURIComponent(paramName) + "=" + encodeURIComponent(transactionId); if (reportParams > "") { - scope.baseURL += "&" + reportParams; + reportURL += "&" + reportParams; } - // allow untrusted urls for iframe http://docs.angularjs.org/error/$sce/insecurl - scope.viewReportDetails = $sce.trustAsResourceUrl(scope.baseURL); + + reportURL = $sce.trustAsResourceUrl(reportURL); + reportURL = $sce.valueOf(reportURL); + + http.get(reportURL, { responseType: 'arraybuffer' }) + .then(function (response) { + let data = response.data; + let status = response.status; + let headers = response.headers; + let config = response.config; + var contentType = headers('Content-Type'); + var file = new Blob([data], { type: contentType }); + var fileContent = URL.createObjectURL(file); + scope.baseURL = $sce.trustAsResourceUrl(fileContent); + scope.viewReportDetails = $sce.trustAsResourceUrl(fileContent); + }).catch(function (error) { + $log.error(`Error loading ${scope.reportType} report`); + $log.error(error); + }); }; @@ -529,7 +682,7 @@ } }); - mifosX.ng.application.controller('ViewSavingDetailsController', ['$scope', '$routeParams', 'ResourceFactory','PaginatorService' , '$location','$uibModal', '$route', 'dateFilter', '$sce', '$rootScope', 'API_VERSION', mifosX.controllers.ViewSavingDetailsController]).run(function ($log) { + mifosX.ng.application.controller('ViewSavingDetailsController', ['$scope', '$routeParams', 'ResourceFactory','PaginatorService' , '$location','$uibModal', '$route', 'dateFilter', '$sce', '$rootScope', 'API_VERSION', '$http', mifosX.controllers.ViewSavingDetailsController]).run(function ($log) { $log.info("ViewSavingDetailsController initialized"); }); }(mifosX.controllers || {})); diff --git a/app/scripts/controllers/savings/ViewSavingsTransactionController.js b/app/scripts/controllers/savings/ViewSavingsTransactionController.js index 75200fe1..aab80a92 100644 --- a/app/scripts/controllers/savings/ViewSavingsTransactionController.js +++ b/app/scripts/controllers/savings/ViewSavingsTransactionController.js @@ -23,7 +23,35 @@ } }); }; - + + scope.releaseAmount = function (accountId, transactionId) { + $uibModal.open({ + templateUrl: 'releaseamount.html', + controller: ReleaseAmountTransactionModel, + resolve: { + accountId: function () { + return accountId; + }, + transactionId: function () { + return transactionId; + } + } + }); + }; + var ReleaseAmountTransactionModel = function ($scope, $uibModalInstance, accountId, transactionId) { + $scope.releaseAmountTransaction = function () { + var params = {savingsId: accountId, transactionId: transactionId, command: 'releaseAmount'}; + var formData = {dateFormat: scope.df, locale: scope.optlang.code, transactionAmount: 0}; + formData.transactionDate = dateFilter(new Date(), scope.df); + resourceFactory.savingsTrxnsResource.save(params, formData, function (data) { + $uibModalInstance.close('delete'); + location.path('/viewsavingaccount/' + data.savingsId); + }); + }; + $scope.cancel = function () { + $uibModalInstance.dismiss('cancel'); + }; + }; var UndoTransactionModel = function ($scope, $uibModalInstance, accountId, transactionId) { $scope.undoTransaction = function () { var params = {savingsId: accountId, transactionId: transactionId, command: 'undo'}; diff --git a/app/scripts/controllers/system/AuditController.js b/app/scripts/controllers/system/AuditController.js index ec6a4023..632ea233 100644 --- a/app/scripts/controllers/system/AuditController.js +++ b/app/scripts/controllers/system/AuditController.js @@ -117,6 +117,12 @@ } else scope.searchCriteria.audit[9] = null; + if (scope.formData.clientId) { + params.clientId = scope.formData.clientId; + scope.searchCriteria.audit[10] = params.clientId; + } else + scope.searchCriteria.audit[10] = null; + scope.saveSC(); resourceFactory.auditResource.search(params, function (data) { scope.searchData.pageItems = data.pageItems; @@ -149,6 +155,7 @@ scope.date.second = null; scope.date.fourth = null; scope.formData.entity = ""; + scope.formData.clientId = null; scope.formData.checkedBy = ""; }; diff --git a/app/scripts/controllers/system/CreateHookController.js b/app/scripts/controllers/system/CreateHookController.js index 04150f10..12a8e02f 100644 --- a/app/scripts/controllers/system/CreateHookController.js +++ b/app/scripts/controllers/system/CreateHookController.js @@ -48,10 +48,7 @@ scope.ugdTemplate = []; scope.ugdTemplates = []; for (var i = 0; i < scope.allUgdTemplates.length; ++i) { - if (scope.allUgdTemplates[i].entity === name.toLowerCase() && - scope.allUgdTemplates[i].type === "SMS") { scope.ugdTemplates.push({name: scope.allUgdTemplates[i].name, id: scope.allUgdTemplates[i].id}); - } } scope.showUgdTemplatesDropdown = scope.ugdTemplateEntities.filter(function(entity) { return entity.name === name.toLowerCase() && diff --git a/app/scripts/controllers/system/DataTableEntryController.js b/app/scripts/controllers/system/DataTableEntryController.js index 2c887a7c..cc093298 100644 --- a/app/scripts/controllers/system/DataTableEntryController.js +++ b/app/scripts/controllers/system/DataTableEntryController.js @@ -15,7 +15,7 @@ scope.columnHeaders = []; scope.formData = {}; scope.isViewMode = true; - scope.tf = "HH:mm"; + scope.tf = "HH:MM:ss"; if(routeParams.mode && routeParams.mode == 'edit'){ scope.isViewMode = false; } diff --git a/app/scripts/controllers/system/LoanApprovalMatrixController.js b/app/scripts/controllers/system/LoanApprovalMatrixController.js new file mode 100755 index 00000000..51bebfca --- /dev/null +++ b/app/scripts/controllers/system/LoanApprovalMatrixController.js @@ -0,0 +1,50 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + LoanApprovalMatrixController: function (scope, resourceFactory, location ,WizardHandler, translate, routeParams) { + scope.formData = {}; + scope.showOrHideValue = "show"; + scope.matrixDetails = {}; + + resourceFactory.getApprovalMatrixEngineTemplateResource.get({}, function (data) { + scope.matrixDetails = data; + scope.formData.currency = scope.matrixDetails.currencyOptions[0].code; + }); + + + scope.$watch('formData',function(newVal){ + scope.matrixDetails = angular.extend(scope.matrixDetails,newVal); + },true); + + scope.formValue = function(array,model,findattr,retAttr){ + findattr = findattr ? findattr : 'id'; + retAttr = retAttr ? retAttr : 'value'; + console.log(findattr,retAttr,model); + return _.find(array, function (obj) { + return obj[findattr] === model; + })[retAttr]; + }; + + scope.goNext = function(form){ + WizardHandler.wizard().checkValid(form); + scope.isClicked = true; + } + + scope.cancel = function () { + location.path('/viewLoanApprovalMatrix/'); + }; + + + scope.submit = function () { + this.formData.locale = scope.optlang.code; + resourceFactory.addApprovalMatrixEngineResource.save(this.formData, function (data) { + location.path('/viewLoanApprovalMatrix/'); + }); + }; + + + } + }); + mifosX.ng.application.controller('LoanApprovalMatrixController', ['$scope', 'ResourceFactory', '$location','WizardHandler', '$translate','$routeParams', mifosX.controllers.LoanApprovalMatrixController]).run(function ($log) { + $log.info("LoanApprovalMatrixController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/system/MakeDataTableEntryController.js b/app/scripts/controllers/system/MakeDataTableEntryController.js index 094f58fd..5da42e3a 100644 --- a/app/scripts/controllers/system/MakeDataTableEntryController.js +++ b/app/scripts/controllers/system/MakeDataTableEntryController.js @@ -7,7 +7,7 @@ scope.columnHeaders = []; scope.formData = {}; scope.formDat = {}; - scope.tf = "HH:mm"; + scope.tf = "HH:MM:ss"; resourceFactory.DataTablesResource.getTableDetails({ datatablename: scope.tableName, entityId: scope.entityId, genericResultSet: 'true' }, function (data) { var colName = data.columnHeaders[0].columnName; diff --git a/app/scripts/controllers/system/UpdateLoanApprovalMatrixController.js b/app/scripts/controllers/system/UpdateLoanApprovalMatrixController.js new file mode 100755 index 00000000..89774040 --- /dev/null +++ b/app/scripts/controllers/system/UpdateLoanApprovalMatrixController.js @@ -0,0 +1,134 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + UpdateLoanApprovalMatrixController: function (scope, resourceFactory, location ,WizardHandler, translate, routeParams) { + scope.formData = {}; + scope.showOrHideValue = "show"; + scope.matrixDetails = {}; + + resourceFactory.getApprovalMatrixEngineTemplateResource.get({}, function (data) { + scope.matrixDetails = data; + }); + + resourceFactory.getAllApprovalMatrixDetailsEngineResource.get({approvalMatrixId: routeParams.approvalMatrixId}, function (data) { + scope.formData = { + currency: data.currencyData.code, + levelOneUnsecuredFirstCycleMaxAmount: data.levelOneUnsecuredFirstCycleMaxAmount, + levelOneUnsecuredFirstCycleMinTerm: data.levelOneUnsecuredFirstCycleMinTerm, + levelOneUnsecuredFirstCycleMaxTerm: data.levelOneUnsecuredFirstCycleMaxTerm, + + levelOneUnsecuredSecondCycleMaxAmount: data.levelOneUnsecuredSecondCycleMaxAmount, + levelOneUnsecuredSecondCycleMinTerm: data.levelOneUnsecuredSecondCycleMinTerm, + levelOneUnsecuredSecondCycleMaxTerm: data.levelOneUnsecuredSecondCycleMaxTerm, + + levelOneSecuredFirstCycleMaxAmount: data.levelOneSecuredFirstCycleMaxAmount, + levelOneSecuredFirstCycleMinTerm: data.levelOneSecuredFirstCycleMinTerm, + levelOneSecuredFirstCycleMaxTerm: data.levelOneSecuredFirstCycleMaxTerm, + + levelOneSecuredSecondCycleMaxAmount: data.levelOneSecuredSecondCycleMaxAmount, + levelOneSecuredSecondCycleMinTerm: data.levelOneSecuredSecondCycleMinTerm, + levelOneSecuredSecondCycleMaxTerm: data.levelOneSecuredSecondCycleMaxTerm, + + levelTwoUnsecuredFirstCycleMaxAmount: data.levelTwoUnsecuredFirstCycleMaxAmount, + levelTwoUnsecuredFirstCycleMinTerm: data.levelTwoUnsecuredFirstCycleMinTerm, + levelTwoUnsecuredFirstCycleMaxTerm: data.levelTwoUnsecuredFirstCycleMaxTerm, + + levelTwoUnsecuredSecondCycleMaxAmount: data.levelTwoUnsecuredSecondCycleMaxAmount, + levelTwoUnsecuredSecondCycleMinTerm: data.levelTwoUnsecuredSecondCycleMinTerm, + levelTwoUnsecuredSecondCycleMaxTerm: data.levelTwoUnsecuredSecondCycleMaxTerm, + + levelTwoSecuredFirstCycleMaxAmount: data.levelTwoSecuredFirstCycleMaxAmount, + levelTwoSecuredFirstCycleMinTerm: data.levelTwoSecuredFirstCycleMinTerm, + levelTwoSecuredFirstCycleMaxTerm: data.levelTwoSecuredFirstCycleMaxTerm, + + levelTwoSecuredSecondCycleMaxAmount: data.levelTwoSecuredSecondCycleMaxAmount, + levelTwoSecuredSecondCycleMinTerm: data.levelTwoSecuredSecondCycleMinTerm, + levelTwoSecuredSecondCycleMaxTerm: data.levelTwoSecuredSecondCycleMaxTerm, + + levelThreeUnsecuredFirstCycleMaxAmount: data.levelThreeUnsecuredFirstCycleMaxAmount, + levelThreeUnsecuredFirstCycleMinTerm: data.levelThreeUnsecuredFirstCycleMinTerm, + levelThreeUnsecuredFirstCycleMaxTerm: data.levelThreeUnsecuredFirstCycleMaxTerm, + + levelThreeUnsecuredSecondCycleMaxAmount: data.levelThreeUnsecuredSecondCycleMaxAmount, + levelThreeUnsecuredSecondCycleMinTerm: data.levelThreeUnsecuredSecondCycleMinTerm, + levelThreeUnsecuredSecondCycleMaxTerm: data.levelThreeUnsecuredSecondCycleMaxTerm, + + levelThreeSecuredFirstCycleMaxAmount: data.levelThreeSecuredFirstCycleMaxAmount, + levelThreeSecuredFirstCycleMinTerm: data.levelThreeSecuredFirstCycleMinTerm, + levelThreeSecuredFirstCycleMaxTerm: data.levelThreeSecuredFirstCycleMaxTerm, + + levelThreeSecuredSecondCycleMaxAmount: data.levelThreeSecuredSecondCycleMaxAmount, + levelThreeSecuredSecondCycleMinTerm: data.levelThreeSecuredSecondCycleMinTerm, + levelThreeSecuredSecondCycleMaxTerm: data.levelThreeSecuredSecondCycleMaxTerm, + + levelFourUnsecuredFirstCycleMaxAmount: data.levelFourUnsecuredFirstCycleMaxAmount, + levelFourUnsecuredFirstCycleMinTerm: data.levelFourUnsecuredFirstCycleMinTerm, + levelFourUnsecuredFirstCycleMaxTerm: data.levelFourUnsecuredFirstCycleMaxTerm, + + levelFourUnsecuredSecondCycleMaxAmount: data.levelFourUnsecuredSecondCycleMaxAmount, + levelFourUnsecuredSecondCycleMinTerm: data.levelFourUnsecuredSecondCycleMinTerm, + levelFourUnsecuredSecondCycleMaxTerm: data.levelFourUnsecuredSecondCycleMaxTerm, + + levelFourSecuredFirstCycleMaxAmount: data.levelFourSecuredFirstCycleMaxAmount, + levelFourSecuredFirstCycleMinTerm: data.levelFourSecuredFirstCycleMinTerm, + levelFourSecuredFirstCycleMaxTerm: data.levelFourSecuredFirstCycleMaxTerm, + + levelFourSecuredSecondCycleMaxAmount: data.levelFourSecuredSecondCycleMaxAmount, + levelFourSecuredSecondCycleMinTerm: data.levelFourSecuredSecondCycleMinTerm, + levelFourSecuredSecondCycleMaxTerm: data.levelFourSecuredSecondCycleMaxTerm, + + levelFiveUnsecuredFirstCycleMaxAmount: data.levelFiveUnsecuredFirstCycleMaxAmount, + levelFiveUnsecuredFirstCycleMinTerm: data.levelFiveUnsecuredFirstCycleMinTerm, + levelFiveUnsecuredFirstCycleMaxTerm: data.levelFiveUnsecuredFirstCycleMaxTerm, + + levelFiveUnsecuredSecondCycleMaxAmount: data.levelFiveUnsecuredSecondCycleMaxAmount, + levelFiveUnsecuredSecondCycleMinTerm: data.levelFiveUnsecuredSecondCycleMinTerm, + levelFiveUnsecuredSecondCycleMaxTerm: data.levelFiveUnsecuredSecondCycleMaxTerm, + + levelFiveSecuredFirstCycleMaxAmount: data.levelFiveSecuredFirstCycleMaxAmount, + levelFiveSecuredFirstCycleMinTerm: data.levelFiveSecuredFirstCycleMinTerm, + levelFiveSecuredFirstCycleMaxTerm: data.levelFiveSecuredFirstCycleMaxTerm, + + levelFiveSecuredSecondCycleMaxAmount: data.levelFiveSecuredSecondCycleMaxAmount, + levelFiveSecuredSecondCycleMinTerm: data.levelFiveSecuredSecondCycleMinTerm, + levelFiveSecuredSecondCycleMaxTerm: data.levelFiveSecuredSecondCycleMaxTerm + }; + }); + + + scope.$watch('formData',function(newVal){ + scope.matrixDetails = angular.extend(scope.matrixDetails,newVal); + },true); + + scope.formValue = function(array,model,findattr,retAttr){ + findattr = findattr ? findattr : 'id'; + retAttr = retAttr ? retAttr : 'value'; + console.log(findattr,retAttr,model); + return _.find(array, function (obj) { + return obj[findattr] === model; + })[retAttr]; + }; + + scope.goNext = function(form){ + WizardHandler.wizard().checkValid(form); + scope.isClicked = true; + } + + scope.cancel = function () { + location.path('/viewLoanApprovalMatrix/'); + }; + + + scope.submit = function () { + this.formData.locale = scope.optlang.code; + resourceFactory.updateApprovalMatrixDetailsEngineResource.put({approvalMatrixId:routeParams.approvalMatrixId},this.formData, function (data) { + location.path('/viewLoanApprovalMatrix/'); + }); + }; + + + } + }); + mifosX.ng.application.controller('UpdateLoanApprovalMatrixController', ['$scope', 'ResourceFactory', '$location','WizardHandler', '$translate','$routeParams', mifosX.controllers.UpdateLoanApprovalMatrixController]).run(function ($log) { + $log.info("UpdateLoanApprovalMatrixController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/system/ViewLoanApprovalMatrixController.js b/app/scripts/controllers/system/ViewLoanApprovalMatrixController.js new file mode 100755 index 00000000..e6681b3f --- /dev/null +++ b/app/scripts/controllers/system/ViewLoanApprovalMatrixController.js @@ -0,0 +1,23 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + ViewLoanApprovalMatrixController: function (scope, resourceFactory, location ,WizardHandler, translate, routeParams) { + scope.matrixDetails = []; + scope.configurations = []; + + resourceFactory.getApprovalMatrixEngineTemplateResource.get({}, function (data) { + scope.configurations = data; + }); + resourceFactory.getAllApprovalMatrixEngineResource.getAll({}, function (data) { + scope.matrixDetails = data; + }); + scope.routeTo=function(id) + { + location.path('/viewLoanApprovalMatrixDetails/'+ id); + } + + } + }); + mifosX.ng.application.controller('ViewLoanApprovalMatrixController', ['$scope', 'ResourceFactory', '$location','WizardHandler', '$translate','$routeParams', mifosX.controllers.ViewLoanApprovalMatrixController]).run(function ($log) { + $log.info("ViewLoanApprovalMatrixController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/system/ViewLoanApprovalMatrixDetailsController.js b/app/scripts/controllers/system/ViewLoanApprovalMatrixDetailsController.js new file mode 100755 index 00000000..b0810acf --- /dev/null +++ b/app/scripts/controllers/system/ViewLoanApprovalMatrixDetailsController.js @@ -0,0 +1,27 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + ViewLoanApprovalMatrixDetailsController: function (scope, resourceFactory, location ,WizardHandler, translate, routeParams) { + scope.matrixDetails = []; + scope.configurations = []; + + + resourceFactory.getApprovalMatrixEngineTemplateResource.get({}, function (data) { + scope.configurations = data; + }); + resourceFactory.getAllApprovalMatrixDetailsEngineResource.get({approvalMatrixId: routeParams.approvalMatrixId}, function (data) { + scope.matrixDetails = data; + }); + + scope.deleteLoanApprovalMatrix = function () { + resourceFactory.deleteApprovalMatrixDetailsEngineResource.delete({approvalMatrixId:routeParams.approvalMatrixId},function (data) { + location.path('/viewLoanApprovalMatrix/'); + }); + + }; + + } + }); + mifosX.ng.application.controller('ViewLoanApprovalMatrixDetailsController', ['$scope', 'ResourceFactory', '$location','WizardHandler', '$translate','$routeParams', mifosX.controllers.ViewLoanApprovalMatrixDetailsController]).run(function ($log) { + $log.info("ViewLoanApprovalMatrixDetailsController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/tasks/ManageTasksController.js b/app/scripts/controllers/tasks/ManageTasksController.js new file mode 100644 index 00000000..4c415008 --- /dev/null +++ b/app/scripts/controllers/tasks/ManageTasksController.js @@ -0,0 +1,37 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + ManageTasksController: function (scope, resourceFactory, location,dateFilter) { + scope.tasksList = []; + scope.option = {}; + scope.formData = { + }; + + scope.getAllTasks = function(){ + resourceFactory.tasksResource.getAll(function(data){ + scope.tasksList = data; + }); + }; + + scope.getAllTasks(); + + + scope.createTask = function(){ + scope.formData.locale = scope.optlang.code; + scope.formData.dateFormat = scope.df; + scope.formData.dueDate = dateFilter(scope.formData.dueDate, scope.df); + resourceFactory.tasksResource.save(scope.formData,function(data){ + location.path('/viewmytask/'+data.resourceId); + }); + } + + scope.routeTo = function(id){ + location.path('/viewmytask/'+id); + }; + + } + }); + + mifosX.ng.application.controller('ManageTasksController', ['$scope', 'ResourceFactory', '$location','dateFilter', mifosX.controllers.ManageTasksController]).run(function ($log) { + $log.info("ManageTasksController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/tasks/ViewTasksController.js b/app/scripts/controllers/tasks/ViewTasksController.js new file mode 100644 index 00000000..a3b5655c --- /dev/null +++ b/app/scripts/controllers/tasks/ViewTasksController.js @@ -0,0 +1,16 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + ViewTasksController: function (scope, resourceFactory,routeParams, location) { + scope.formData ={}; + scope.showQuestions = true; + scope.id = routeParams.id; + resourceFactory.tasksResource.get({taskId : scope.id},{},function(data){ + scope.formData = data; + }); + } + }); + + mifosX.ng.application.controller('ViewTasksController', ['$scope', 'ResourceFactory', '$routeParams', '$location', mifosX.controllers.ViewTasksController]).run(function ($log) { + $log.info("ViewTasksController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/template/CreateTemplateController.js b/app/scripts/controllers/template/CreateTemplateController.js index 07aa3b11..1c2bd529 100644 --- a/app/scripts/controllers/template/CreateTemplateController.js +++ b/app/scripts/controllers/template/CreateTemplateController.js @@ -12,6 +12,9 @@ scope.formData.type = data.types[0].id; scope.templateKeyEntity = "Client"; scope.clientKeys(); + scope.loanKeys(); + scope.savingsAccountKeys(); + scope.groupKeys(); scope.mappers.push({ mappersorder: 0, mapperskey: "client", @@ -21,19 +24,212 @@ }); scope.clientKeys = function () { - scope.templateKeys = ["{{client.accountNo}}", "{{client.status.value}}", "{{client.fullname}}", - "{{client.displayName}}", "{{client.officeName}}", "{{#client.groups}}", "{{/client.groups}}"]; + scope.clientTemplateKeys = ["{{client.id}}", + "{{client.accountNumber}}", + "{{client.transferToOffice}}", + "{{client.status}}", + "{{client.subStatus}}", + "{{client.activationDate}}", + "{{client.officeJoiningDate}}", + "{{client.firstname}}", + "{{client.middlename}}", + "{{client.lastname}}", + "{{client.fullname}}", + "{{client.displayName}}", + "{{client.mobileNo}}", + "{{client.emailAddress}}", + "{{client.isStaff}}", + "{{client.externalId}}", + "{{client.dateOfBirth}}", + "{{client.gender}}", + "{{client.staff}}", + "{{client.accountNumberRequiresAutoGeneration}}", + "{{client.closureReason}}", + "{{client.closureDate}}", + "{{client.rejectionReason}}", + "{{client.rejectionDate}}", + "{{client.rejectedBy}}", + "{{client.withdrawalReason}}", + "{{client.withdrawalDate}}", + "{{client.withdrawnBy}}", + "{{client.reactivateDate}}", + "{{client.reactivatedBy}}", + "{{client.closedBy}}", + "{{client.submittedOnDate}}", + "{{client.activatedBy}}", + "{{client.savingsProductId}}", + "{{client.savingsAccountId}}", + "{{client.clientType}}", + "{{client.clientClassification}}", + "{{client.legalForm}}", + "{{client.reopenedDate}}", + "{{client.reopenedBy}}", + "{{client.proposedTransferDate}}", + "{{client.clientCollateralManagements}}"]; + scope.additionalInfo = ["{{activity}}","{{time}}","{{clientId}}","{{loanId}}", "{{bvn}}","{{resourceId}}"]; scope.templateEntity = [ {"entityName": "Client", - "templateKeys": scope.templateKeys} + "templateKeys": scope.clientTemplateKeys + }, { + "entityName": "SavingsAccount", + "templateKeys": scope.savingsAccountTemplateKeys + }, + { + "entityName": "Loan", + "templateKeys": scope.loanTemplateKeys + }, + { + "entityName": "Repayment Schedule", + "templateKeys": scope.repaymentTemplateKeys + }, + { + "entityName": "Loan Product", + "templateKeys": scope.loanProductTemplateKeys + }, + { + "entityName": "Loan Summary", + "templateKeys": scope.loanSummaryTemplateKeys + }, + { + "entityName": "Group", + "templateKeys": scope.groupTemplateKeys + }, + {"entityName": "Additional Info", + "templateKeys": scope.additionalInfo + } ]; CKEDITOR.instances.templateeditor.setData(''); }; scope.loanKeys = function () { - CKEDITOR.instances.templateeditor.setData(''); - scope.loanTemplateKeys = ["{{loan.accountNo}}", "{{loan.status.value}}", "{{loan.loanProductId}}", - "{{loan.loanProductName}}", "{{loan.loanProductDescription}}"]; + //CKEDITOR.instances.templateeditor.setData(''); + scope.loanProductTemplateKeys = ["{{loan.loanProduct.fund}}", + "{{loan.loanProduct.transactionProcessingStrategy}}", + "{{loan.loanProduct.productName}}", + "{{loan.loanProduct.shortName}}", + "{{loan.loanProduct.description}}", + "{{loan.loanProduct.charges}}", + "{{loan.loanProduct.rates}}", + "{{loan.loanProduct.loanProductRelatedDetail}}", + "{{loan.loanProduct.loanProductMinMaxConstraints}}", + "{{loan.loanProduct.accountingRule}}", + "{{loan.loanProduct.includeInBorrowerCycle}}", + "{{loan.loanProduct.useBorrowerCycle}}", + "{{loan.loanProduct.loanProducTrancheDetails}}", + "{{loan.loanProduct.startDate}}", + "{{loan.loanProduct.closeDate}}", + "{{loan.loanProduct.externalId}}", + "{{loan.loanProduct.borrowerCycleVariations}}", + "{{loan.loanProduct.overdueDaysForNPA}}", + "{{loan.loanProduct.minimumDaysBetweenDisbursalAndFirstRepayment}}", + "{{loan.loanProduct.productInterestRecalculationDetails}}", + "{{loan.loanProduct.holdGuaranteeFunds}}", + "{{loan.loanProduct.loanProductGuaranteeDetails}}", + "{{loan.loanProduct.loanConfigurableAttributes}}", + "{{loan.loanProduct.principalThresholdForLastInstallment}}", + "{{loan.loanProduct.accountMovesOutOfNPAOnlyOnArrearsCompletion}}", + "{{loan.loanProduct.canDefineInstallmentAmount}}", + "{{loan.loanProduct.installmentAmountInMultiplesOf}}", + "{{loan.loanProduct.isLinkedToFloatingInterestRate}}", + "{{loan.loanProduct.floatingRates}}", + "{{loan.loanProduct.allowVariabeInstallments}}", + "{{loan.loanProduct.variableInstallmentConfig}}", + "{{loan.loanProduct.syncExpectedWithDisbursementDate}}", + "{{loan.loanProduct.canUseForTopup}}", + "{{loan.loanProduct.fixedPrincipalPercentagePerInstallment}}", + "{{loan.loanProduct.disallowExpectedDisbursements}}", + "{{loan.loanProduct.allowApprovedDisbursedAmountsOverApplied}}", + "{{loan.loanProduct.overAppliedCalculationType}}", + "{{loan.loanProduct.overAppliedNumber}}", + "{{loan.loanProduct.loanTermIncludesToppedUpLoanTerm}}", + "{{loan.loanProduct.maxNumberOfLoanExtensionsAllowed}}", + "{{loan.loanProduct.isAccountLevelArrearsToleranceEnable}}", + "{{loan.loanProduct.charts}}", + "{{loan.loanProduct.isBnplLoanProduct}}", + "{{loan.loanProduct.requiresEquityContribution}}", + "{{loan.loanProduct.equityContributionLoanPercentage}}", + "{{loan.loanProduct.productCategory}}", + "{{loan.loanProduct.productType}}", + "{{loan.loanProduct.maintainInterestRateOnLoanTermExtension}}"]; + scope.loanTemplateKeys = [ + "{{loan.accountNumber}}", + "{{loan.externalId}}", + "{{loan.client}}", + "{{loan.group}}", + "{{loan.glim}}", + "{{loan.loanType}}", + "{{loan.fund}}", + "{{loan.loanOfficer}}", + "{{loan.loanPurpose}}", + "{{loan.transactionProcessingStrategy}}", + "{{loan.loanRepaymentScheduleDetail}}", + "{{loan.termFrequency}}", + "{{loan.termPeriodFrequencyType}}", + "{{loan.loanStatus}}", + "{{loan.syncDisbursementWithMeeting}}", + "{{loan.submittedOnDate}}", + "{{loan.rejectedOnDate}}", + "{{loan.rejectedBy}}", + "{{loan.withdrawnOnDate}}", + "{{loan.withdrawnBy}}", + "{{loan.approvedOnDate}}", + "{{loan.approvedBy}}", + "{{loan.expectedDisbursementDate}}", + "{{loan.actualDisbursementDate}}", + "{{loan.disbursedBy}}", + "{{loan.closedOnDate}}", + "{{loan.closedBy}}", + "{{loan.writtenOffOnDate}}", + "{{loan.rescheduledOnDate}}", + "{{loan.rescheduledByUser}}", + "{{loan.expectedMaturityDate}}", + "{{loan.actualMaturityDate}}", + "{{loan.expectedFirstRepaymentOnDate}}", + "{{loan.interestChargedFromDate}}", + "{{loan.totalOverpaid}}", + "{{loan.loanCounter}}", + "{{loan.loanProductCounter}}", + "{{loan.charges}}", + "{{loan.trancheCharges}}", + "{{loan.collateral}}", + "{{loan.loanCollateralManagements}}", + "{{loan.loanOfficerHistory}}", + "{{loan.repaymentScheduleInstallments}}", + "{{loan.loanTransactions}}", + "{{loan.accountNumberRequiresAutoGeneration}}", + "{{loan.transactionProcessorFactory}}", + "{{loan.loanLifecycleStateMachine}}", + "{{loan.loanSummaryWrapper}}", + "{{loan.proposedPrincipal}}", + "{{loan.approvedPrincipal}}", + "{{loan.netDisbursalAmount}}", + "{{loan.fixedEmiAmount}}", + "{{loan.maxOutstandingLoanBalance}}", + "{{loan.disbursementDetails}}", + "{{loan.postDatedChecks}}", + "{{loan.loanTermVariations}}", + "{{loan.totalRecovered}}", + "{{loan.loanInterestRecalculationDetails}}", + "{{loan.isNpa}}", + "{{loan.accruedTill}}", + "{{loan.createStandingInstructionAtDisbursement}}", + "{{loan.guaranteeAmountDerived}}", + "{{loan.interestRecalculatedOn}}", + "{{loan.isFloatingInterestRate}}", + "{{loan.interestRateDifferential}}", + "{{loan.writeOffReason}}", + "{{loan.loanSubStatus}}", + "{{loan.isTopup}}", + "{{loan.loanTopupDetails}}", + "{{loan.rates}}", + "{{loan.fixedPrincipalPercentagePerInstallment}}", + "{{loan.loanTermIncludesToppedUpLoanTerm}}", + "{{loan.isDisburseToSavingsLoan}}", + "{{loan.total_extensions}}", + "{{loan.isBnplLoan}}", + "{{loan.requiresEquityContribution}}", + "{{loan.equityContributionLoanPercentage}}", + "{{loan.department}}"]; scope.repaymentTemplateKeys = ["{{loan.repaymentSchedule.loanTermInDays}}", "{{loan.repaymentSchedule.totalPrincipalDisbursed}}", "{{loan.repaymentSchedule.totalPrincipalExpected}}", "{{loan.repaymentSchedule.totalPrincipalPaid}}", "{{loan.repaymentSchedule.totalInterestCharged}}", "{{loan.repaymentSchedule.totalFeeChargesCharged}}", @@ -41,18 +237,204 @@ "{{loan.repaymentSchedule.totalWrittenOff}}", "{{loan.repaymentSchedule.totalRepaymentExpected}}", "{{loan.repaymentSchedule.totalRepayment}}", "{{loan.repaymentSchedule.totalPaidInAdvance}}", "{{loan.repaymentSchedule.totalPaidLate}}", "{{loan.repaymentSchedule.totalOutstanding}}"]; + scope.loanSummaryTemplateKeys = ["{{loan.summary.totalPrincipalDisbursed}}", + "{{loan.summary.totalPrincipalRepaid}}", + "{{loan.summary.totalPrincipalWrittenOff}}", + "{{loan.summary.totalPrincipalOutstanding}}", + "{{loan.summary.totalInterestCharged}}", + "{{loan.summary.totalInterestRepaid}}", + "{{loan.summary.totalInterestWaived}}", + "{{loan.summary.totalInterestWrittenOff}}", + "{{loan.summary.totalInterestOutstanding}}", + "{{loan.summary.totalFeeChargesCharged}}", + "{{loan.summary.totalFeeChargesDueAtDisbursement}}", + "{{loan.summary.totalFeeChargesRepaid}}", + "{{loan.summary.totalFeeChargesWaived}}", + "{{loan.summary.totalFeeChargesWrittenOff}}", + "{{loan.summary.totalFeeChargesOutstanding}}", + "{{loan.summary.totalPenaltyChargesCharged}}", + "{{loan.summary.totalPenaltyChargesRepaid}}", + "{{loan.summary.totalPenaltyChargesWaived}}", + "{{loan.summary.totalPenaltyChargesWrittenOff}}", + "{{loan.summary.totalPenaltyChargesOutstanding}}", + "{{loan.summary.totalExpectedRepayment}}", + "{{loan.summary.totalRepayment}}", + "{{loan.summary.totalExpectedCostOfLoan}}", + "{{loan.summary.totalCostOfLoan}}", + "{{loan.summary.totalWaived}}", + "{{loan.summary.totalWrittenOff}}", + "{{loan.summary.totalOutstanding}}"]; scope.templateEntity = [ {"entityName": "Loan", "templateKeys": scope.loanTemplateKeys }, {"entityName": "Repayment Schedule", "templateKeys": scope.repaymentTemplateKeys + }, + {"entityName": "Loan Product", + "templateKeys": scope.loanProductTemplateKeys + }, + {"entityName": "Loan Summary", + "templateKeys": scope.loanSummaryTemplateKeys + }, + { + "entityName": "Savings Account", + "templateKeys": scope.savingsAccountTemplateKeys + }, + {"entityName": "Client", + "templateKeys": scope.clientTemplateKeys + }, + { + "entityName": "Group", + "templateKeys": scope.groupTemplateKeys + }, + {"entityName": "Additional Info", + "templateKeys": scope.additionalInfo + } + ]; + CKEDITOR.instances.templateeditor.setData(''); + }; + + scope.savingsAccountKeys = function () { + scope.savingsAccountTemplateKeys = ["{{savingsAccount.id}}", + "{{savingsAccount.client.id}}", + "{{savingsAccount.accountNumber}}", + "{{savingsAccount.externalId}}", + "{{savingsAccount.product.name}}", + "{{savingsAccount.product.id}}", + "{{savingsAccount.savingsOfficer}}", + "{{savingsAccount.status}}", + "{{savingsAccount.sub_status}}", + "{{savingsAccount.accountType}}", + "{{savingsAccount.submittedOnDate}}", + "{{savingsAccount.rejectedOnDate}}", + "{{savingsAccount.withdrawnOnDate}}", + "{{savingsAccount.withdrawnBy}}", + "{{savingsAccount.approvedOnDate}}", + "{{savingsAccount.activatedOnDate}}", + "{{savingsAccount.activatedBy}}", + "{{savingsAccount.closedOnDate}}", + "{{savingsAccount.closedBy}}", + "{{savingsAccount.reasonForBlock}}", + "{{savingsAccount.currency}}", + "{{savingsAccount.nominalAnnualInterestRate}}", + "{{savingsAccount.interestCompoundingPeriodType}}", + "{{savingsAccount.interestPostingPeriodType}}", + "{{savingsAccount.interestCalculationType}}", + "{{savingsAccount.interestCalculationDaysInYearType}}", + "{{savingsAccount.minRequiredOpeningBalance}}", + "{{savingsAccount.lockinPeriodFrequency}}", + "{{savingsAccount.lockinPeriodFrequencyType}}", + "{{savingsAccount.lockedInUntilDate}}", + "{{savingsAccount.withdrawalFeeApplicableForTransfer}}", + "{{savingsAccount.allowOverdraft}}", + "{{savingsAccount.overdraftLimit}}", + "{{savingsAccount.nominalAnnualInterestRateOverdraft}}", + "{{savingsAccount.minOverdraftForInterestCalculation}}", + "{{savingsAccount.postOverdraftInterestOnDeposit}}", + "{{savingsAccount.enforceMinRequiredBalance}}", + "{{savingsAccount.minRequiredBalance}}", + "{{savingsAccount.lienAllowed}}", + "{{savingsAccount.maxAllowedLienLimit}}", + "{{savingsAccount.onHoldFunds}}", + "{{savingsAccount.startInterestCalculationDate}}", + "{{savingsAccount.summary}}" + ]; + + scope.templateEntity = [ + { + "entityName": "Savings Account", + "templateKeys": scope.savingsAccountTemplateKeys}, + { + "entityName": "Loan", + "templateKeys": scope.loanTemplateKeys + }, + { + "entityName": "Repayment Schedule", + "templateKeys": scope.repaymentTemplateKeys + }, + { + "entityName": "Loan Product", + "templateKeys": scope.loanProductTemplateKeys + }, + { + "entityName": "Loan Summary", + "templateKeys": scope.loanSummaryTemplateKeys + }, + { + "entityName": "Client", + "templateKeys": scope.clientTemplateKeys + }, + { + "entityName": "Group", + "templateKeys": scope.groupTemplateKeys + }, + { + "entityName": "Additional Info", + "templateKeys": scope.additionalInfo + } + ]; + CKEDITOR.instances.templateeditor.setData(''); + }; + + scope.groupKeys = function () { + scope.groupTemplateKeys = ["{{group.id}}", + "{{group.name}}", + "{{group.accountNumber}}", + "{{group.externalId}}", + "{{group.status}}", + "{{group.activationDate}}", + "{{group.office}}", + "{{group.office.id}}", + "{{group.staff}}", + "{{group.staff.id}}", + "{{group.parent}}", + "{{group.parent.id}}", + "{{group.groupLevel}}", + "{{group.groupLevel.id}}", + "{{group.hierarchy}}", + "{{group.submittedOnDate}}" + ]; + + scope.templateEntity = [ + { + "entityName": "Group", + "templateKeys": scope.groupTemplateKeys + }, + { + "entityName": "SavingsAccount", + "templateKeys": scope.savingsAccountTemplateKeys + }, + { + "entityName": "Loan", + "templateKeys": scope.loanTemplateKeys + }, + { + "entityName": "Repayment Schedule", + "templateKeys": scope.repaymentTemplateKeys + }, + { + "entityName": "Loan Product", + "templateKeys": scope.loanProductTemplateKeys + }, + { + "entityName": "Loan Summary", + "templateKeys": scope.loanSummaryTemplateKeys + }, + { + "entityName": "Client", + "templateKeys": scope.clientTemplateKeys + }, + { + "entityName": "Additional Info", + "templateKeys": scope.additionalInfo } ]; + CKEDITOR.instances.templateeditor.setData(''); }; scope.entityChange = function (entityId) { - if (entityId !== 0) { + if (entityId === 1) { scope.mappers.splice(0, 1, { mappersorder: 0, mapperskey: "loan", @@ -61,7 +443,7 @@ }); scope.loanKeys(); scope.templateKeyEntity = "Loan"; - } else { + } else if (entityId === 0){ scope.templateKeyEntity = "Client"; scope.mappers.splice(0, 1, { mappersorder: 0, @@ -70,6 +452,28 @@ defaultAddIcon: 'true' }); scope.clientKeys(); + scope.loanKeys(); + scope.savingsAccountKeys(); + scope.groupKeys(); + } else if (entityId === 2){ + scope.templateKeyEntity = "Savings Account"; + scope.mappers.splice(0, 1, { + mappersorder: 0, + mapperskey: "savingsaccount", + mappersvalue: "savingsaccounts/{{savingsAccountId}}?tenantIdentifier=" + $rootScope.tenantIdentifier, + defaultAddIcon: 'true' + }); + scope.savingsAccountKeys(); + } + else if (entityId === 3){ + scope.templateKeyEntity = "Group"; + scope.mappers.splice(0, 1, { + mappersorder: 0, + mapperskey: "group", + mappersvalue: "group/{{groupId}}?tenantIdentifier=" + $rootScope.tenantIdentifier, + defaultAddIcon: 'true' + }); + scope.groupKeys(); } }; diff --git a/app/scripts/controllers/template/EditTemplateController.js b/app/scripts/controllers/template/EditTemplateController.js index b991f3c8..ae64a454 100644 --- a/app/scripts/controllers/template/EditTemplateController.js +++ b/app/scripts/controllers/template/EditTemplateController.js @@ -44,29 +44,220 @@ } } - if (data.template.entity == "client") { + scope.clientKeys(); - } else if (data.template.entity == "loan") { scope.loanKeys(); - } + scope.savingsAccountKeys(); + scope.groupKeys(); + console.log(data.template.text); CKEDITOR.instances.templateeditor.insertHtml(data.template.text); }); scope.clientKeys = function () { - scope.clientTemplateKeys = ["{{client.accountNo}}", "{{client.status.value}}", "{{client.fullname}}", - "{{client.displayName}}", "{{client.officeName}}", "{{#client.groups}}", "{{/client.groups}}"]; + scope.clientTemplateKeys = ["{{client.id}}", + "{{client.accountNumber}}", + "{{client.transferToOffice}}", + "{{client.status}}", + "{{client.subStatus}}", + "{{client.activationDate}}", + "{{client.officeJoiningDate}}", + "{{client.firstname}}", + "{{client.middlename}}", + "{{client.lastname}}", + "{{client.fullname}}", + "{{client.displayName}}", + "{{client.mobileNo}}", + "{{client.emailAddress}}", + "{{client.isStaff}}", + "{{client.externalId}}", + "{{client.dateOfBirth}}", + "{{client.gender}}", + "{{client.staff}}", + "{{client.accountNumberRequiresAutoGeneration}}", + "{{client.closureReason}}", + "{{client.closureDate}}", + "{{client.rejectionReason}}", + "{{client.rejectionDate}}", + "{{client.rejectedBy}}", + "{{client.withdrawalReason}}", + "{{client.withdrawalDate}}", + "{{client.withdrawnBy}}", + "{{client.reactivateDate}}", + "{{client.reactivatedBy}}", + "{{client.closedBy}}", + "{{client.submittedOnDate}}", + "{{client.activatedBy}}", + "{{client.savingsProductId}}", + "{{client.savingsAccountId}}", + "{{client.clientType}}", + "{{client.clientClassification}}", + "{{client.legalForm}}", + "{{client.reopenedDate}}", + "{{client.reopenedBy}}", + "{{client.proposedTransferDate}}", + "{{client.clientCollateralManagements}}"]; + scope.additionalInfo = ["{{activity}}","{{time}}","{{clientId}}","{{loanId}}", "{{bvn}}","{{resourceId}}"]; scope.templateEntity = [ {"entityName": "Client", - "templateKeys": scope.clientTemplateKeys} + "templateKeys": scope.clientTemplateKeys + }, { + "entityName": "SavingsAccount", + "templateKeys": scope.savingsAccountTemplateKeys + }, + { + "entityName": "Loan", + "templateKeys": scope.loanTemplateKeys + }, + { + "entityName": "Repayment Schedule", + "templateKeys": scope.repaymentTemplateKeys + }, + { + "entityName": "Loan Product", + "templateKeys": scope.loanProductTemplateKeys + }, + { + "entityName": "Loan Summary", + "templateKeys": scope.loanSummaryTemplateKeys + }, + { + "entityName": "Group", + "templateKeys": scope.groupTemplateKeys + }, + {"entityName": "Additional Info", + "templateKeys": scope.additionalInfo + } ]; - if (scope.templateKeyEntity != "client") { - CKEDITOR.instances.templateeditor.setData(''); - } - } + }; scope.loanKeys = function () { - scope.loanTemplateKeys = ["{{loan.accountNo}}", "{{loan.status.value}}", "{{loan.loanProductId}}", - "{{loan.loanProductName}}", "{{loan.loanProductDescription}}"]; + scope.loanProductTemplateKeys = ["{{loan.loanProduct.fund}}", + "{{loan.loanProduct.transactionProcessingStrategy}}", + "{{loan.loanProduct.productName}}", + "{{loan.loanProduct.shortName}}", + "{{loan.loanProduct.description}}", + "{{loan.loanProduct.charges}}", + "{{loan.loanProduct.rates}}", + "{{loan.loanProduct.loanProductRelatedDetail}}", + "{{loan.loanProduct.loanProductMinMaxConstraints}}", + "{{loan.loanProduct.accountingRule}}", + "{{loan.loanProduct.includeInBorrowerCycle}}", + "{{loan.loanProduct.useBorrowerCycle}}", + "{{loan.loanProduct.loanProducTrancheDetails}}", + "{{loan.loanProduct.startDate}}", + "{{loan.loanProduct.closeDate}}", + "{{loan.loanProduct.externalId}}", + "{{loan.loanProduct.borrowerCycleVariations}}", + "{{loan.loanProduct.overdueDaysForNPA}}", + "{{loan.loanProduct.minimumDaysBetweenDisbursalAndFirstRepayment}}", + "{{loan.loanProduct.productInterestRecalculationDetails}}", + "{{loan.loanProduct.holdGuaranteeFunds}}", + "{{loan.loanProduct.loanProductGuaranteeDetails}}", + "{{loan.loanProduct.loanConfigurableAttributes}}", + "{{loan.loanProduct.principalThresholdForLastInstallment}}", + "{{loan.loanProduct.accountMovesOutOfNPAOnlyOnArrearsCompletion}}", + "{{loan.loanProduct.canDefineInstallmentAmount}}", + "{{loan.loanProduct.installmentAmountInMultiplesOf}}", + "{{loan.loanProduct.isLinkedToFloatingInterestRate}}", + "{{loan.loanProduct.floatingRates}}", + "{{loan.loanProduct.allowVariabeInstallments}}", + "{{loan.loanProduct.variableInstallmentConfig}}", + "{{loan.loanProduct.syncExpectedWithDisbursementDate}}", + "{{loan.loanProduct.canUseForTopup}}", + "{{loan.loanProduct.fixedPrincipalPercentagePerInstallment}}", + "{{loan.loanProduct.disallowExpectedDisbursements}}", + "{{loan.loanProduct.allowApprovedDisbursedAmountsOverApplied}}", + "{{loan.loanProduct.overAppliedCalculationType}}", + "{{loan.loanProduct.overAppliedNumber}}", + "{{loan.loanProduct.loanTermIncludesToppedUpLoanTerm}}", + "{{loan.loanProduct.maxNumberOfLoanExtensionsAllowed}}", + "{{loan.loanProduct.isAccountLevelArrearsToleranceEnable}}", + "{{loan.loanProduct.charts}}", + "{{loan.loanProduct.isBnplLoanProduct}}", + "{{loan.loanProduct.requiresEquityContribution}}", + "{{loan.loanProduct.equityContributionLoanPercentage}}", + "{{loan.loanProduct.productCategory}}", + "{{loan.loanProduct.productType}}", + "{{loan.loanProduct.maintainInterestRateOnLoanTermExtension}}"]; + scope.loanTemplateKeys = [ + "{{loan.accountNumber}}", + "{{loan.externalId}}", + "{{loan.client}}", + "{{loan.group}}", + "{{loan.glim}}", + "{{loan.loanType}}", + "{{loan.fund}}", + "{{loan.loanOfficer}}", + "{{loan.loanPurpose}}", + "{{loan.transactionProcessingStrategy}}", + "{{loan.loanRepaymentScheduleDetail}}", + "{{loan.termFrequency}}", + "{{loan.termPeriodFrequencyType}}", + "{{loan.loanStatus}}", + "{{loan.syncDisbursementWithMeeting}}", + "{{loan.submittedOnDate}}", + "{{loan.rejectedOnDate}}", + "{{loan.rejectedBy}}", + "{{loan.withdrawnOnDate}}", + "{{loan.withdrawnBy}}", + "{{loan.approvedOnDate}}", + "{{loan.approvedBy}}", + "{{loan.expectedDisbursementDate}}", + "{{loan.actualDisbursementDate}}", + "{{loan.disbursedBy}}", + "{{loan.closedOnDate}}", + "{{loan.closedBy}}", + "{{loan.writtenOffOnDate}}", + "{{loan.rescheduledOnDate}}", + "{{loan.rescheduledByUser}}", + "{{loan.expectedMaturityDate}}", + "{{loan.actualMaturityDate}}", + "{{loan.expectedFirstRepaymentOnDate}}", + "{{loan.interestChargedFromDate}}", + "{{loan.totalOverpaid}}", + "{{loan.loanCounter}}", + "{{loan.loanProductCounter}}", + "{{loan.charges}}", + "{{loan.trancheCharges}}", + "{{loan.collateral}}", + "{{loan.loanCollateralManagements}}", + "{{loan.loanOfficerHistory}}", + "{{loan.repaymentScheduleInstallments}}", + "{{loan.loanTransactions}}", + "{{loan.accountNumberRequiresAutoGeneration}}", + "{{loan.transactionProcessorFactory}}", + "{{loan.loanLifecycleStateMachine}}", + "{{loan.loanSummaryWrapper}}", + "{{loan.proposedPrincipal}}", + "{{loan.approvedPrincipal}}", + "{{loan.netDisbursalAmount}}", + "{{loan.fixedEmiAmount}}", + "{{loan.maxOutstandingLoanBalance}}", + "{{loan.disbursementDetails}}", + "{{loan.postDatedChecks}}", + "{{loan.loanTermVariations}}", + "{{loan.totalRecovered}}", + "{{loan.loanInterestRecalculationDetails}}", + "{{loan.isNpa}}", + "{{loan.accruedTill}}", + "{{loan.createStandingInstructionAtDisbursement}}", + "{{loan.guaranteeAmountDerived}}", + "{{loan.interestRecalculatedOn}}", + "{{loan.isFloatingInterestRate}}", + "{{loan.interestRateDifferential}}", + "{{loan.writeOffReason}}", + "{{loan.loanSubStatus}}", + "{{loan.isTopup}}", + "{{loan.loanTopupDetails}}", + "{{loan.rates}}", + "{{loan.fixedPrincipalPercentagePerInstallment}}", + "{{loan.loanTermIncludesToppedUpLoanTerm}}", + "{{loan.isDisburseToSavingsLoan}}", + "{{loan.total_extensions}}", + "{{loan.isBnplLoan}}", + "{{loan.requiresEquityContribution}}", + "{{loan.equityContributionLoanPercentage}}", + "{{loan.department}}"]; scope.repaymentTemplateKeys = ["{{loan.repaymentSchedule.loanTermInDays}}", "{{loan.repaymentSchedule.totalPrincipalDisbursed}}", "{{loan.repaymentSchedule.totalPrincipalExpected}}", "{{loan.repaymentSchedule.totalPrincipalPaid}}", "{{loan.repaymentSchedule.totalInterestCharged}}", "{{loan.repaymentSchedule.totalFeeChargesCharged}}", @@ -74,21 +265,201 @@ "{{loan.repaymentSchedule.totalWrittenOff}}", "{{loan.repaymentSchedule.totalRepaymentExpected}}", "{{loan.repaymentSchedule.totalRepayment}}", "{{loan.repaymentSchedule.totalPaidInAdvance}}", "{{loan.repaymentSchedule.totalPaidLate}}", "{{loan.repaymentSchedule.totalOutstanding}}"]; + scope.loanSummaryTemplateKeys = ["{{loan.summary.totalPrincipalDisbursed}}", + "{{loan.summary.totalPrincipalRepaid}}", + "{{loan.summary.totalPrincipalWrittenOff}}", + "{{loan.summary.totalPrincipalOutstanding}}", + "{{loan.summary.totalInterestCharged}}", + "{{loan.summary.totalInterestRepaid}}", + "{{loan.summary.totalInterestWaived}}", + "{{loan.summary.totalInterestWrittenOff}}", + "{{loan.summary.totalInterestOutstanding}}", + "{{loan.summary.totalFeeChargesCharged}}", + "{{loan.summary.totalFeeChargesDueAtDisbursement}}", + "{{loan.summary.totalFeeChargesRepaid}}", + "{{loan.summary.totalFeeChargesWaived}}", + "{{loan.summary.totalFeeChargesWrittenOff}}", + "{{loan.summary.totalFeeChargesOutstanding}}", + "{{loan.summary.totalPenaltyChargesCharged}}", + "{{loan.summary.totalPenaltyChargesRepaid}}", + "{{loan.summary.totalPenaltyChargesWaived}}", + "{{loan.summary.totalPenaltyChargesWrittenOff}}", + "{{loan.summary.totalPenaltyChargesOutstanding}}", + "{{loan.summary.totalExpectedRepayment}}", + "{{loan.summary.totalRepayment}}", + "{{loan.summary.totalExpectedCostOfLoan}}", + "{{loan.summary.totalCostOfLoan}}", + "{{loan.summary.totalWaived}}", + "{{loan.summary.totalWrittenOff}}", + "{{loan.summary.totalOutstanding}}"]; scope.templateEntity = [ {"entityName": "Loan", "templateKeys": scope.loanTemplateKeys }, {"entityName": "Repayment Schedule", "templateKeys": scope.repaymentTemplateKeys + }, + {"entityName": "Loan Product", + "templateKeys": scope.loanProductTemplateKeys + }, + {"entityName": "Loan Summary", + "templateKeys": scope.loanSummaryTemplateKeys + }, + { + "entityName": "Savings Account", + "templateKeys": scope.savingsAccountTemplateKeys + }, + {"entityName": "Client", + "templateKeys": scope.clientTemplateKeys + }, + { + "entityName": "Group", + "templateKeys": scope.groupTemplateKeys + }, + {"entityName": "Additional Info", + "templateKeys": scope.additionalInfo } ]; - if (scope.templateKeyEntity != "loan") { - CKEDITOR.instances.templateeditor.setData(''); - } - } + }; + + scope.savingsAccountKeys = function () { + scope.savingsAccountTemplateKeys = ["{{savingsAccount.id}}", + "{{savingsAccount.client.id}}", + "{{savingsAccount.accountNumber}}", + "{{savingsAccount.externalId}}", + "{{savingsAccount.product.name}}", + "{{savingsAccount.product.id}}", + "{{savingsAccount.savingsOfficer}}", + "{{savingsAccount.status}}", + "{{savingsAccount.sub_status}}", + "{{savingsAccount.accountType}}", + "{{savingsAccount.submittedOnDate}}", + "{{savingsAccount.rejectedOnDate}}", + "{{savingsAccount.withdrawnOnDate}}", + "{{savingsAccount.withdrawnBy}}", + "{{savingsAccount.approvedOnDate}}", + "{{savingsAccount.activatedOnDate}}", + "{{savingsAccount.activatedBy}}", + "{{savingsAccount.closedOnDate}}", + "{{savingsAccount.closedBy}}", + "{{savingsAccount.reasonForBlock}}", + "{{savingsAccount.currency}}", + "{{savingsAccount.nominalAnnualInterestRate}}", + "{{savingsAccount.interestCompoundingPeriodType}}", + "{{savingsAccount.interestPostingPeriodType}}", + "{{savingsAccount.interestCalculationType}}", + "{{savingsAccount.interestCalculationDaysInYearType}}", + "{{savingsAccount.minRequiredOpeningBalance}}", + "{{savingsAccount.lockinPeriodFrequency}}", + "{{savingsAccount.lockinPeriodFrequencyType}}", + "{{savingsAccount.lockedInUntilDate}}", + "{{savingsAccount.withdrawalFeeApplicableForTransfer}}", + "{{savingsAccount.allowOverdraft}}", + "{{savingsAccount.overdraftLimit}}", + "{{savingsAccount.nominalAnnualInterestRateOverdraft}}", + "{{savingsAccount.minOverdraftForInterestCalculation}}", + "{{savingsAccount.postOverdraftInterestOnDeposit}}", + "{{savingsAccount.enforceMinRequiredBalance}}", + "{{savingsAccount.minRequiredBalance}}", + "{{savingsAccount.lienAllowed}}", + "{{savingsAccount.maxAllowedLienLimit}}", + "{{savingsAccount.onHoldFunds}}", + "{{savingsAccount.startInterestCalculationDate}}", + "{{savingsAccount.summary}}" + ]; + + scope.templateEntity = [ + { + "entityName": "Savings Account", + "templateKeys": scope.savingsAccountTemplateKeys}, + { + "entityName": "Loan", + "templateKeys": scope.loanTemplateKeys + }, + { + "entityName": "Repayment Schedule", + "templateKeys": scope.repaymentTemplateKeys + }, + { + "entityName": "Loan Product", + "templateKeys": scope.loanProductTemplateKeys + }, + { + "entityName": "Loan Summary", + "templateKeys": scope.loanSummaryTemplateKeys + }, + { + "entityName": "Client", + "templateKeys": scope.clientTemplateKeys + }, + { + "entityName": "Group", + "templateKeys": scope.groupTemplateKeys + }, + { + "entityName": "Additional Info", + "templateKeys": scope.additionalInfo + } + ]; + }; + + scope.groupKeys = function () { + scope.groupTemplateKeys = ["{{group.id}}", + "{{group.name}}", + "{{group.accountNumber}}", + "{{group.externalId}}", + "{{group.status}}", + "{{group.activationDate}}", + "{{group.office}}", + "{{group.office.id}}", + "{{group.staff}}", + "{{group.staff.id}}", + "{{group.parent}}", + "{{group.parent.id}}", + "{{group.groupLevel}}", + "{{group.groupLevel.id}}", + "{{group.hierarchy}}", + "{{group.submittedOnDate}}" + ]; + + scope.templateEntity = [ + { + "entityName": "Group", + "templateKeys": scope.groupTemplateKeys + }, + { + "entityName": "SavingsAccount", + "templateKeys": scope.savingsAccountTemplateKeys + }, + { + "entityName": "Loan", + "templateKeys": scope.loanTemplateKeys + }, + { + "entityName": "Repayment Schedule", + "templateKeys": scope.repaymentTemplateKeys + }, + { + "entityName": "Loan Product", + "templateKeys": scope.loanProductTemplateKeys + }, + { + "entityName": "Loan Summary", + "templateKeys": scope.loanSummaryTemplateKeys + }, + { + "entityName": "Client", + "templateKeys": scope.clientTemplateKeys + }, + { + "entityName": "Additional Info", + "templateKeys": scope.additionalInfo + } + ]; + }; scope.entityChange = function (entityId) { - if (entityId != 0) { + if (entityId === 1) { scope.mappers.splice(0, 1, { mappersorder: 0, mapperskey: "loan", @@ -97,7 +468,7 @@ }); scope.loanKeys(); scope.templateKeyEntity = "Loan"; - } else { + } else if (entityId === 0){ scope.templateKeyEntity = "Client"; scope.mappers.splice(0, 1, { mappersorder: 0, @@ -106,6 +477,28 @@ defaultAddIcon: 'true' }); scope.clientKeys(); + scope.templateKeyEntity = "Client"; + } else if (entityId === 2){ + scope.templateKeyEntity = "SavingsAccount"; + scope.mappers.splice(0, 1, { + mappersorder: 0, + mapperskey: "savingsaccount", + mappersvalue: "savingsaccounts/{{savingsAccountId}}?tenantIdentifier=" + $rootScope.tenantIdentifier, + defaultAddIcon: 'true' + }); + scope.savingsAccountKeys(); + scope.templateKeyEntity = "Client"; + } + else if (entityId === 3){ + scope.templateKeyEntity = "Group"; + scope.mappers.splice(0, 1, { + mappersorder: 0, + mapperskey: "group", + mappersvalue: "group/{{groupId}}?tenantIdentifier=" + $rootScope.tenantIdentifier, + defaultAddIcon: 'true' + }); + scope.groupKeys(); + scope.templateKeyEntity = "Group"; } } diff --git a/app/scripts/filters/StatusLookup.js b/app/scripts/filters/StatusLookup.js index b42abaeb..fbebcb76 100644 --- a/app/scripts/filters/StatusLookup.js +++ b/app/scripts/filters/StatusLookup.js @@ -11,6 +11,15 @@ "loanStatusType.approved": "statusApproved", "loanStatusType.active": "statusactive", "loanStatusType.overpaid": "statusoverpaid", + "loanDecisionStateType.submitted.and.review.Pending": "statusreviewapplication", + "loanDecisionStateType.submitted.and.due.diligence.Pending": "statusduediligence", + "loanDecisionStateType.submitted.and.collateral.review.Pending": "statuscollateralreview", + "loanDecisionStateType.submitted.and.ic.level.one.Pending": "statusiclevelone", + "loanDecisionStateType.submitted.and.ic.level.two.Pending": "statusicleveltwo", + "loanDecisionStateType.submitted.and.ic.level.three.Pending": "statusiclevelthree", + "loanDecisionStateType.submitted.and.ic.four.Pending": "statusiclevelfour", + "loanDecisionStateType.submitted.and.ic.five.Pending": "statusiclevelfive", + "loanDecisionStateType.submitted.and.prepare.sign.contract.Pending": "statusprepareandsign", "savingsAccountStatusType.submitted.and.pending.approval": "statuspending", "savingsAccountStatusType.approved": "statusApproved", "savingsAccountStatusType.active": "statusactive", diff --git a/app/scripts/initialTasks.js b/app/scripts/initialTasks.js index bef273bb..21292c9e 100644 --- a/app/scripts/initialTasks.js +++ b/app/scripts/initialTasks.js @@ -1,6 +1,5 @@ - -(function (mifosX) { - var defineHeaders = function ($httpProvider, $translateProvider, ResourceFactoryProvider, HttpServiceProvider, $idleProvider, $keepaliveProvider, IDLE_DURATION, WARN_DURATION, KEEPALIVE_INTERVAL) { +(function(mifosX) { + var defineHeaders = function($httpProvider, $translateProvider, ResourceFactoryProvider, HttpServiceProvider, $idleProvider, $keepaliveProvider, IDLE_DURATION, WARN_DURATION, KEEPALIVE_INTERVAL, FINERACT_BASE_URL) { var mainLink = getLocation(window.location.href); var baseApiUrl = "https://demo.mifos.io"; var host = ""; @@ -26,6 +25,8 @@ } //accessing from a file system or other servers else { + var baseApiUrlEnv = FINERACT_BASE_URL; + if (mainLink.hostname != "") { baseApiUrl = "https://" + mainLink.hostname + (mainLink.port ? ':' + mainLink.port : ''); } @@ -33,6 +34,11 @@ if (QueryParameters["baseApiUrl"]) { baseApiUrl = QueryParameters["baseApiUrl"]; } + + if (baseApiUrlEnv !== '$FINERACT_BASE_URL') { + baseApiUrl = baseApiUrlEnv; + } + var queryLink = getLocation(baseApiUrl); host = "https://" + queryLink.hostname + (queryLink.port ? ':' + queryLink.port : ''); portNumber = queryLink.port; @@ -46,8 +52,8 @@ } ResourceFactoryProvider.setBaseUrl(host); - HttpServiceProvider.addRequestInterceptor('demoUrl', function (config) { - return _.extend(config, {url: host + config.url }); + HttpServiceProvider.addRequestInterceptor('demoUrl', function(config) { + return _.extend(config, { url: host + config.url }); }); // Enable CORS! (see e.g. http://enable-cors.org/) @@ -73,19 +79,19 @@ $idleProvider.warningDuration(WARN_DURATION); //warning time(sec) $keepaliveProvider.interval(KEEPALIVE_INTERVAL); //keep-alive ping }; - mifosX.ng.application.config(defineHeaders).run(function ($log, $idle) { + mifosX.ng.application.config(defineHeaders).run(function($log, $idle) { $log.info("Initial tasks are done!"); $idle.watch(); }); }(mifosX || {})); -getLocation = function (href) { +getLocation = function(href) { var l = document.createElement("a"); l.href = href; return l; }; -QueryParameters = (function () { +QueryParameters = (function() { var result = {}; if (window.location.search) { // split up the query string and store in an associative array @@ -96,4 +102,4 @@ QueryParameters = (function () { } } return result; -}()); +}()); \ No newline at end of file diff --git a/app/scripts/mifosXComponents.js b/app/scripts/mifosXComponents.js old mode 100755 new mode 100644 index ea5582f1..48ff10be --- a/app/scripts/mifosXComponents.js +++ b/app/scripts/mifosXComponents.js @@ -72,6 +72,12 @@ define(['Q', 'underscore', 'mifosX'], function (Q) { 'client/ClientChargesOverviewController', 'client/SurveyController', 'client/ViewClientSurveyController', + 'client/ClientOtherInfoController', + 'client/EditClientOtherInfoController', + 'client/ClientOtherInfoEntityController', + 'client/EditClientOtherInfoEntityController', + 'client/ClientRecruitmentSurveyController', + 'client/EditClientRecruitmentSurveyController', 'product/LoanProductController', 'product/CreateLoanProductController', 'product/CreateSavingProductController', @@ -85,6 +91,10 @@ define(['Q', 'underscore', 'mifosX'], function (Q) { 'product/floatingrates/EditFloatingRateController', 'product/SavingProductController', 'product/ViewSavingProductController', + 'product/ViewSavingsProductFloatingInterestRatesController', + 'product/SavingsProductFloatingInterestRateController', + 'product/EditSavingsProductFloatingInterestRateController', + 'product/AddSavingsProductFloatingInterestRateController', 'product/ShareProductController', 'product/ViewShareProductController', 'product/CreateShareProductController', @@ -185,6 +195,12 @@ define(['Q', 'underscore', 'mifosX'], function (Q) { 'system/ManageSurveysController', 'system/EditSurveyController', 'system/ViewSurveyController', + 'system/LoanApprovalMatrixController', + 'system/ViewLoanApprovalMatrixController', + 'system/ViewLoanApprovalMatrixDetailsController', + 'system/UpdateLoanApprovalMatrixController', + 'tasks/ManageTasksController', + 'tasks/ViewTasksController', 'organization/HolController', 'organization/ViewHolController', 'organization/EditHolidayController', @@ -198,8 +214,11 @@ define(['Q', 'underscore', 'mifosX'], function (Q) { 'reports/XBRLReportController', 'savings/CreateSavingAccountController', 'savings/ViewSavingDetailsController', + 'savings/ViewSavingDepositAccrualTransactionController', 'savings/HoldSavingsAccountController', 'savings/HoldSavingsTransactionController', + 'savings/SavingsDocumentsController', + 'savings/SavingsDocumentController', 'shares/CreateShareAccountController', 'shares/ViewShareAccountController', 'shares/EditShareAccountController', @@ -231,12 +250,14 @@ define(['Q', 'underscore', 'mifosX'], function (Q) { 'deposits/fixed/EditDepositAccountController', 'deposits/fixed/AddNewFixedDepositChargeController', 'deposits/fixed/ViewFixedDepositTransactionController', + 'deposits/fixed/FixedDepositAccountTopUpController', 'deposits/recurring/RecurringDepositAccountActionsController', 'deposits/recurring/ViewRecurringDepositAccountDetailsController', 'deposits/recurring/CreateRecurringDepositAccountController', 'deposits/recurring/EditRecurringDepositAccountController', 'deposits/recurring/AddNewRecurringDepositChargeController', 'deposits/recurring/ViewRecurringDepositTransactionController', + 'deposits/recurring/RecurringDocumentController', 'groups/CreateGroupController', 'groups/EditGroupController', 'groups/GroupAttendanceController', @@ -317,6 +338,8 @@ define(['Q', 'underscore', 'mifosX'], function (Q) { 'configurations/CreditBureauConfigurationController', 'configurations/AddNewCreditBureauConfigurationController', 'configurations/EditCreditBureauConfigurationController', + 'client/AddExpensesController', + 'client/EditExpensesController', 'notification/NotificationsController', 'selfservice/CreateSelfServiceUserController', 'notification/NotificationsController', @@ -352,11 +375,26 @@ define(['Q', 'underscore', 'mifosX'], function (Q) { 'loanAccount/NewGLIMAccountController', 'loanAccount/ViewGLIMAccountController', 'loanAccount/GlimLoanAccountActionsController', + 'loanAccount/ApproveLoanDueDiligenceController', 'savings/CreateGSIMAccountController', 'savings/ViewGSIMaccountController', 'savings/GSIMAccountActionsController', 'savings/EditGSIMAccountController', - 'savings/AddNewMemberToGSIMController' + 'savings/AddNewMemberToGSIMController', + 'savings/AddMemberToGSimAccountController', + 'client/AddBusinessOwnersController', + 'client/EditBusinessOwnersController', + 'client/AddEmploymentInfoController', + 'client/EditEmploymentInfoController', + 'client/BusinessOwnerDocumentController', + 'client/AddClientBusinessDetailController', + 'client/ViewClientBusinessDetailController', + 'client/EditClientBusinessDetailController', + 'product/ValidationLimitController', + 'product/CreateValidationLimitController', + 'product/EditValidationLimitController', + 'product/ViewValidationLimitController', + 'deposits/fixed/FixedDepositAccountPartialLiquidationController' ], filters: [ 'StatusLookup', diff --git a/app/scripts/modules/configurations.js b/app/scripts/modules/configurations.js index 1be8f6ae..d8c0948e 100644 --- a/app/scripts/modules/configurations.js +++ b/app/scripts/modules/configurations.js @@ -2,6 +2,7 @@ angular.module('configurations', []) .constant('API_VERSION', '/fineract-provider/api/v1') .constant('IDLE_DURATION', 30 * 60) .constant('WARN_DURATION', 10) + .constant('FINERACT_BASE_URL', '$FINERACT_BASE_URL') .constant('KEEPALIVE_INTERVAL', 15 * 60) .constant('SECURITY', 'basicauth'); // Use SECURITY constant as 'oauth' to enable Oauth2 on community app diff --git a/app/scripts/routes.js b/app/scripts/routes.js index 7550953d..d9b326db 100755 --- a/app/scripts/routes.js +++ b/app/scripts/routes.js @@ -16,6 +16,18 @@ .when('/products', { templateUrl: 'views/products/products.html' }) + .when('/validationlimit', { + templateUrl: 'views/products/validationsLimit.html' + }) + .when('/createvalidationlimit', { + templateUrl: 'views/products/createvalidationlimit.html' + }) + .when('/editvalidationlimit/:id', { + templateUrl: 'views/products/editvalidationlimit.html' + }) + .when('/viewvalidationlimit/:id', { + templateUrl: 'views/products/viewvalidationlimit.html' + }) .when('/templates', { templateUrl: 'views/templates/templates.html' }) @@ -109,6 +121,9 @@ .when('/addclientdocument/:clientId', { templateUrl: 'views/clients/addclientdocument.html' }) + .when('/addbusinessownerdocument/:ownerId/:clientId', { + templateUrl: 'views/clients/addBusinessOwnersDocument.html' + }) .when('/clientclosedloanaccount/:clientId', { templateUrl: 'views/clients/clientclosedloanaccount.html' }) @@ -130,6 +145,24 @@ .when('/clients/survey/:clientId', { templateUrl: 'views/surveys/viewclientsurvey.html' }) + .when('/clientOtherInfo/:clientId', { + templateUrl: 'views/clients/clientotherinfo.html' + }) + .when('/editclientOtherInfo/:clientId/:otherInfoId', { + templateUrl: 'views/clients/editclientotherinfo.html' + }) + .when('/clientOtherInfoEntity/:clientId', { + templateUrl: 'views/clients/clientotherinfoentity.html' + }) + .when('/editclientOtherInfoEntity/:clientId/:otherInfoId', { + templateUrl: 'views/clients/editclientotherinfoentity.html' + }) + .when('/clientRecruitmentSurvey/:clientId', { + templateUrl: 'views/clients/clientrecruitmentsurvey.html' + }) + .when('/editclientRecruitmentSurvey/:clientId/:surveyId', { + templateUrl: 'views/clients/editclientrecruitmentsurvey.html' + }) .when('/newclientloanaccount/:clientId', { templateUrl: 'views/loans/newloanaccount.html' }) @@ -148,12 +181,18 @@ .when('/viewloanaccount/:id', { templateUrl: 'views/loans/viewloanaccountdetails.html' }) + .when('/viewloanaccount/:id/duediligence', { + templateUrl: 'views/loans/loanDueDiligence.html' + }) .when('/viewglimaccount/:groupId/:id/:glimId', { templateUrl: 'views/loans/viewglimaccount.html' }) .when('/viewgsimaccount/:groupId/:gsimAccountNumber', { templateUrl: 'views/savings/viewgsimaccount.html' }) + .when('/savingsaccounts/:parentGSIMId/:gsimChildAccountId/addmember/:groupId/:gsimAccountNumber', { + templateUrl: 'views/savings/addMemberToGSimAccount.html' + }) .when('/adjustrepaymentschedule/:accountId', { templateUrl: 'views/loans/AdjustRepaymentSchdule.html' }) @@ -269,6 +308,18 @@ .when('/viewsavingproduct/:id', { templateUrl: 'views/products/viewsavingproduct.html' }) + .when('/viewsavingproduct/:id/floatinginterestrate', { + templateUrl: 'views/products/viewsavingproductfloatinginterestrates.html' + }) + .when('/viewsavingproduct/:productId/floatinginterestrate/:floatingInterestrateId', { + templateUrl: 'views/products/viewsavingproductfloatinginterestrate.html' + }) + .when('/editsavingproduct/:productId/floatinginterestrate/:floatingInterestrateId', { + templateUrl: 'views/products/editsavingproductfloatinginterestrate.html' + }) + .when('/viewsavingproduct/:productId/addfloatinginterestrate', { + templateUrl: 'views/products/addsavingproductfloatinginterestrate.html' + }) .when('/fixeddepositproducts', { templateUrl: 'views/products/fixeddepositproducts.html' }) @@ -386,6 +437,9 @@ .when('/searchtransaction', { templateUrl: 'views/accounting/search_transaction.html' }) + .when('/viewaccrualtransaction', { + templateUrl: 'views/savings/view_savings_account_accruals.html' + }) .when('/accounts_closure', { templateUrl: 'views/accounting/accounts_closure.html' }) @@ -572,6 +626,12 @@ .when('/savingaccount/:savingsId/hold', { templateUrl: 'views/savings/holdSavingsAccount.html' }) + .when('/savingaccount/:savingsId/documents', { + templateUrl: 'views/savings/documents.html' + }) + .when('/addsavingsdocument/:savingsId', { + templateUrl: 'views/savings/addsavingsdocument.html' + }) .when('/viewsavingsholdtransactions/:savingsId', { templateUrl: 'views/savings/holdSavingsTransactions.html' }) @@ -632,6 +692,12 @@ .when('/fixeddepositaccount/:id/charges', { templateUrl: 'views/deposits/fixed/add_new_fixed_deposit_charge.html' }) + .when('/fixeddepositaccount/:id/partiallyLiquidate', { + templateUrl: 'views/deposits/fixed/fixed_deposit_account_partial_liquidation.html' + }) + .when('/fixeddepositaccount/:id/topUp', { + templateUrl: 'views/deposits/fixed/fixed_deposit_account_top_up.html' + }) .when('/fixeddepositaccount/:id/:action', { templateUrl: 'views/deposits/fixed/fixed_deposit_account_actions.html' }) @@ -662,6 +728,9 @@ .when('/viewrecurringdepositaccounttrxn/:accountId/:transactionId', { templateUrl: 'views/deposits/recurring/view_recurring_deposit_transaction.html' }) + .when('/addrecurringdocument/:id', { + templateUrl: 'views/deposits/recurring/addrecurringdocument.html' + }) .when('/viewgroup/:id', { templateUrl: 'views/groups/viewgroup.html' }) @@ -962,6 +1031,12 @@ .when('/editAddress/:addrType/:addrId/:clientId', { templateUrl: 'views/administration/EditAddress.html' }) + .when('/addExpenses/:clientId', { + templateUrl: 'views/clients/AddExpenses.html' + }) + .when('/editExpenses/:clientId', { + templateUrl: 'views/clients/EditExpenses.html' + }) .when('/smscampaigns', { templateUrl: 'views/organization/smscampaigns/smscampaigns.html' }) @@ -983,6 +1058,18 @@ .when('/surveys',{ templateUrl: 'views/surveys/surveys.html' }) + .when('/mytasks',{ + templateUrl: 'views/mytasks/mytasks.html' + }) + .when('/mytasks/add',{ + templateUrl: 'views/mytasks/createmytask.html' + }) + .when('/editmytask/:id',{ + templateUrl: 'views/mytasks/editmytask.html' + }) + .when('/viewmytask/:id',{ + templateUrl: 'views/mytasks/viewmytask.html' + }) .when('/surveys/add',{ templateUrl: 'views/surveys/createsurvey.html' }) @@ -995,6 +1082,18 @@ .when('/addfamilymembers/:clientId/', { templateUrl: 'views/clients/addfamilymembers.html' }) + .when('/addBusinessOwners/:clientId/', { + templateUrl: 'views/clients/addBusinessOwners.html' + }) + .when('/editBusinessOwners/:clientId/:businessOwnerId', { + templateUrl: 'views/clients/editBusinessOwners.html' + }) + .when('/addEmploymentInfo/:clientId/', { + templateUrl: 'views/clients/addEmploymentInfo.html' + }) + .when('/editEmploymentInfo/:clientId/:employmentInfoId', { + templateUrl: 'views/clients/editEmploymentInfo.html' + }) .when('/bulkimportoffices', { templateUrl: 'views/organization/bulkimport/bulkimportoffices.html' }) @@ -1109,6 +1208,27 @@ .when('/creditreport/thitsaworkUploadCreditbureau/:clientId/:cbId', { templateUrl: 'views/loans/creditReportUpload_ThitsaWorks.html' }) + .when('/addbusinessdetail/:clientId', { + templateUrl: 'views/clients/addClientBusinessDetail.html' + }) + .when('/viewclient/:clientId/viewbusinessdetail/:businessDetailId', { + templateUrl: 'views/clients/viewbusinessdetail.html' + }) + .when('/viewclient/:clientId/editbusinessdetail/:businessDetailId', { + templateUrl: 'views/clients/editClientBusinessDetail.html' + }) + .when('/loanApprovalMatrix', { + templateUrl: 'views/administration/loanApprovalMatrix.html' + }) + .when('/viewLoanApprovalMatrix', { + templateUrl: 'views/administration/viewLoanApprovalMatrix.html' + }) + .when('/viewLoanApprovalMatrixDetails/:approvalMatrixId', { + templateUrl: 'views/administration/ViewLoanApprovalMatrixDetails.html' + }) + .when('/updateLoanApprovalMatrix/:approvalMatrixId', { + templateUrl: 'views/administration/updateLoanApprovalMatrix.html' + }) .otherwise({ templateUrl: "views/errors/404.html" }); diff --git a/app/scripts/services/ResourceFactoryProvider.js b/app/scripts/services/ResourceFactoryProvider.js index 76b07667..d73fd262 100755 --- a/app/scripts/services/ResourceFactoryProvider.js +++ b/app/scripts/services/ResourceFactoryProvider.js @@ -47,9 +47,9 @@ importResource: defineResource(apiVer + "/imports", {}, { getImports: {method: 'GET', params: {}, isArray: true} }), - clientResource: defineResource(apiVer + "/clients/:clientId/:anotherresource", {clientId: '@clientId', anotherresource: '@anotherresource', status: '@status'}, { - getAllClients: {method: 'GET', params: {limit: 1000, status: '@status'}}, - getAllClientsWithoutLimit: {method: 'GET', params: {}}, + clientResource: defineResource(apiVer + "/clients/:clientId/:anotherresource", {clientId: '@clientId', anotherresource: '@anotherresource', status: '@status', limit: '@limit'}, { + getAllClients: {method: 'GET', params: {limit: '@limit', status: '@status'}}, + getAllClientsWithoutStatus: {method: 'GET', params: {limit: '@limit'}}, getClientClosureReasons: {method: 'GET', params: {}}, getAllClientDocuments: {method: 'GET', params: {}, isArray: true}, update: { method: 'PUT'}, @@ -69,8 +69,8 @@ clientDocumentsResource: defineResource(apiVer + "/clients/:clientId/documents/:documentId", {clientId: '@clientId', documentId: '@documentId'}, { getAllClientDocuments: {method: 'GET', params: {}, isArray: true} }), - clientAccountResource: defineResource(apiVer + "/clients/:clientId/accounts", {clientId: '@clientId'}, { - getAllClients: {method: 'GET', params: {}} + clientAccountResource: defineResource(apiVer + "/clients/:clientId/accounts", {clientId: '@clientId', fields: '@fields'}, { + getAllAccounts: {method: 'GET', params: {fields: '@fields'}} }), clientNotesResource: defineResource(apiVer + "/clients/:clientId/notes/:noteId", {clientId: '@clientId', noteId: '@noteId'}, { getAllNotes: {method: 'GET', params: {}, isArray: true}, @@ -89,12 +89,44 @@ clientDocumentTemplateResource: defineResource(apiVer + "/clients/:clientId/documentsuploaded", {clientId: '@clientId'}, { get: {method: 'GET', params: {}} }), + clientOtherInfoTemplateResource: defineResource(apiVer + "/clients/:clientId/otherInfo/template", {clientId: '@clientId'}, { + get: {method: 'GET', params: {}} + }), + clientOtherInfoResource: defineResource(apiVer + "/clients/:clientId/otherInfo", {clientId: '@clientId'}, { + getAll: {method: 'GET', params: {}, isArray: true}, + }), + otherInfoResource: defineResource(apiVer + "/clients/:clientId/otherInfo/:otherInfoId", {clientId: '@clientId', otherInfoId: '@otherInfoId'}, { + get: {method: 'GET', params: {}}, + put: {method: 'PUT', params: {}}, + }), + clientOtherInfoEntityResource: defineResource(apiVer + "/clients/:clientId/otherInfo/entity", {clientId: '@clientId'}, { + getAll: {method: 'GET', params: {}, isArray: true}, + }), + otherInfoEntityResource: defineResource(apiVer + "/clients/:clientId/otherInfo/entity/:otherInfoId", {clientId: '@clientId', otherInfoId: '@otherInfoId'}, { + get: {method: 'GET', params: {}}, + }), + clientRecruitmentSurveyTemplateResource: defineResource(apiVer + "/clients/:clientId/recruitmentSurvey/template", {clientId: '@clientId'}, { + get: {method: 'GET', params: {}} + }), + clientRecruitmentSurveyResource: defineResource(apiVer + "/clients/:clientId/recruitmentSurvey/:surveyId", {clientId: '@clientId', surveyId: '@surveyId'}, { + get: {method: 'GET', params: {}}, + put: {method: 'PUT', params: {}}, + }), + recruitmentSurveyResource: defineResource(apiVer + "/clients/:clientId/recruitmentSurvey", {clientId: '@clientId'}, { + getAll: {method: 'GET', params: {}, isArray: true}, + }), surveyResource: defineResource(apiVer + "/surveys/:surveyId", {surveyId: '@surveyId'}, { getAll: {method: 'GET', params: {}, isArray: true}, get: {method: 'GET', params: {surveyId: '@surveyId'}, isArray: false}, update: {method: 'PUT', params: {surveyId: '@surveyId'}}, activateOrDeactivate: {method: 'POST', params: {surveyId: '@surveyId',command: '@command'}}, }), + + tasksResource: defineResource(apiVer + "/tasks/:taskId", {taskId: '@taskId'}, { + getAll: {method: 'GET', params: {status: '@status'}, isArray: true}, + get: {method: 'GET', params: {taskId: '@taskId'}, isArray: false}, + update: {method: 'PUT', params: {surveyId: '@taskId'}}, + }), surveyScorecardResource: defineResource(apiVer + "/surveys/scorecards/:surveyId", {surveyId: '@surveyId'}, { post: {method: 'POST', params: {}, isArray: false} }), @@ -112,12 +144,13 @@ groupSummaryResource: defineResource(apiVer + "/runreports/:reportSource", {reportSource: '@reportSource'}, { getSummary: {method: 'GET', params: {}} }), - groupAccountResource: defineResource(apiVer + "/groups/:groupId/accounts", {groupId: '@groupId'}, { - getAll: {method: 'GET', params: {}} + groupAccountResource: defineResource(apiVer + "/groups/:groupId/accounts", {groupId: '@groupId', fields: '@fields'}, { + getAll: {method: 'GET', params: {fields: '@fields'}} }), groupGSIMAccountResource: defineResource(apiVer + "/groups/:groupId/gsimaccounts", {groupId: '@groupId',parentGSIMAccountNo: '@parentGSIMAccountNo', parentGSIMId:'@parentGSIMId'}, { - get: {method: 'GET', params: {},isArray:true} + get: {method: 'GET', params: {},isArray:true}, + getAllGSimAccountMembersWithOutSavingsAccount: {method: 'GET', params: {},isArray:true} }), groupGLIMAccountResource: defineResource(apiVer + "/groups/:groupId/glimaccounts", {groupId: '@groupId',parentLoanAccountNo:'@parentLoanAccountNo'}, { get: {method: 'GET', params: {},isArray: true} @@ -176,6 +209,9 @@ clientcollateralTemplateResource: defineResource(apiVer + "/clients/:clientId/collaterals/template", {clientId: '@clientId', prodId: '@prodId'}, { getAllCollaterals: {method: 'GET', params: {prodId: '@prodId'}, isArray: true}, }), + clientAdditionalCollateralTemplateResource: defineResource(apiVer + "/clients/:clientId/collaterals/additionalDetailsTemplate", {clientId: '@clientId'}, { + template: {method: 'GET', params: {}}, + }), collateralResource: defineResource(apiVer + "/collateral-management/:collateralId", {collateralId: '@collateralId'}, { getAllCollaterals: {method: 'GET', params: {}, isArray: true}, get: {method: 'GET', params: {}}, @@ -194,6 +230,13 @@ getAllSavingProducts: {method: 'GET', params: {}, isArray: true}, update: {method: 'PUT', params: {}} }), + savingProductsFloatingInterestRateResource: defineResource(apiVer + "/savingsproducts/:savingProductId/floatinginterestrates/:floatingInterestRateId", {savingProductId: '@savingProductId', floatingInterestRateId: '@floatingInterestRateId'}, { + getAllSavingProductFloatingInterestRates: {method: 'GET', params: {}, isArray: true}, + get: {method: 'GET', params: {}}, + save: {method: 'POST', params: {}}, + update: {method: 'PUT', params: {}}, + delete: {method: 'DELETE'} + }), fixedDepositProductResource: defineResource(apiVer + "/fixeddepositproducts/:productId/:resourceType", {productId: '@productId', resourceType: '@resourceType'}, { getAllFixedDepositProducts: {method: 'GET', params: {}, isArray: true}, update: {method: 'PUT', params: {}} @@ -243,7 +286,7 @@ glimLoan: defineResource(apiVer + "/loans/glimAccount/:glimId", {glimId:'@glimId',command: '@command'}, { post: {method: 'POST', params: {}} }), - glimLoanTemplate: defineResource(apiVer + "/loans/glimAccount/:glimId", {glimId:'@glimId'}, { + glimLoanTemplate: defineResource(apiVer + "/loans/glimAccount/:glimId", {glimId:'@glimId',isRepayment: '@isRepayment'}, { get:{method:'GET',params: {},isArray: true} }), LoanEditDisburseResource: defineResource(apiVer + "/loans/:loanId/disbursements/:disbursementId", {loanId: '@loanId', disbursementId: '@disbursementId'}, { @@ -256,6 +299,9 @@ LoanDocumentResource: defineResource(apiVer + "/loans/:loanId/documents/:documentId", {loanId: '@loanId', documentId: '@documentId'}, { getLoanDocuments: {method: 'GET', params: {}, isArray: true} }), + RecurringDocumentResource: defineResource(apiVer + "/recurring/:accountId/documents/:documentId", {accountId: '@accountId', documentId: '@documentId'}, { + getRecurringDocuments: {method: 'GET', params: {}, isArray: true} + }), currencyConfigResource: defineResource(apiVer + "/currencies", {}, { get: {method: 'GET', params: {}}, update: { method: 'PUT'}, @@ -376,10 +422,16 @@ getAllNotes: {method: 'GET', params: {}, isArray: true}, update: {method: 'PUT'} }), + savingsDocumentsResource: defineResource(apiVer + "/savings/:savingsId/documents/:documentId", {savingsId: '@savingsId', documentId: '@documentId'}, { + getAllSavingsDocuments: {method: 'GET', params: {}, isArray: true} + }), gsimResource: defineResource(apiVer + "/savingsaccounts/gsim/:parentAccountId", {parentAccountId:'@parentAccountId'}, { post: {method: 'POST', params: {}}, update: {method: 'PUT'} }), + addMemberToGsimResource: defineResource(apiVer + "/savingsaccounts/addmember/:parentAccountId", {parentAccountId:'@parentAccountId'}, { + addmember: {method: 'POST', params: {}} + }), gsimCommandsResource: defineResource(apiVer + "/savingsaccounts/gsimcommands/:parentAccountId", {parentAccountId:'@parentAccountId',command:'@command'}, { post: {method: 'POST', params: {}} }), @@ -431,6 +483,18 @@ recurringDepositTrxnsResource: defineResource(apiVer + "/recurringdepositaccounts/:savingsId/transactions/:transactionId", {savingsId: '@savingsId', transactionId: '@transactionId'}, { get: {method: 'GET', params: {savingsId: '@savingsId', transactionId: '@transactionId'}} }), + clientExpensesTemplateResource: defineResource(apiVer + "/clients/:clientId/householdExpenses", {clientId: '@clientId'}, { + getOtherExpenses: {method: 'GET'} + }), + + clientExpensesResource: defineResource(apiVer + "/clients/:clientId/householdExpenses", {clientId: '@clientId'}, { + save: {method: 'POST'} + }), + clientExpensesResource: defineResource(apiVer + "/clients/:clientId/householdExpenses/:householdExpensesId", {clientId: '@clientId',householdExpensesId:'@householdExpensesId'}, { + deleteExpense: {method: 'DELETE'}, + update: {method: 'PUT'} + }), + accountTransferResource: defineResource(apiVer + "/accounttransfers/:transferId", {transferId: '@transferId'}, { get: {method: 'GET', params: {transferId: '@transferId'}} }), @@ -482,8 +546,8 @@ get: {method: 'GET', params: {}}, update: {method: 'PUT', params: {}} }), - configurationResourceByName: defineResource(apiVer + "/configurations/", {configName: '@configName'}, { - get: {method: 'GET', params: {configName:'configName'}} + configurationResourceByName: defineResource(apiVer + "/configurations/name/:name", {name: '@name'}, { + get: {method: 'GET', params: {}} }), cacheResource: defineResource(apiVer + "/caches", {}, { get: {method: 'GET', params: {}, isArray: true}, @@ -503,7 +567,7 @@ loanRescheduleResource: defineResource(apiVer + "/rescheduleloans/:scheduleId",{scheduleId:'@scheduleId', command: '@command'},{ get: {method: 'GET',params:{}}, getAll: {method: 'GET', params: {}, isArray: true}, - template: {method: 'GET',params:{}}, + template: {method: 'GET',params:{loanId:'@loanId'}}, preview:{method:'GET',params:{command:'previewLoanReschedule'}}, put: {method: 'POST', params: {command:'reschedule'}}, reject:{method:'POST',params:{command:'reject'}}, @@ -641,6 +705,109 @@ familyMemberTemplate:defineResource(apiVer+"/clients/:clientId/familymembers/template",{},{ get:{method: 'GET',params:{}} }), + businessOwners:defineResource(apiVer+"/clients/:clientId/businessOwners/",{},{ + + get:{method: 'GET',isArray: true }, + post:{method:'POST',params:{}} + + }), + businessOwner:defineResource(apiVer+"/clients/:clientId/businessOwners/:businessOwnerId",{},{ + + get:{method: 'GET',params:{} }, + delete:{method: 'DELETE',params:{}}, + put:{method:'PUT',params:{}} + + }), + + businessOwnerStatus:defineResource(apiVer+"/clients/:clientId/businessOwners/:businessOwnerId/updateOwnerStatus",{},{ + + get:{method:'GET',params:{status:'@status'}}, + }), + businessOwnersTemplate:defineResource(apiVer+"/clients/:clientId/businessOwners/template",{},{ + get:{method: 'GET',params:{}} + }), + employmentInformation:defineResource(apiVer+"/clients/:clientId/employmentInfo/",{},{ + + get:{method: 'GET',isArray: true }, + post:{method:'POST',params:{}} + + }), + employmentInfo:defineResource(apiVer+"/clients/:clientId/employmentInfo/:employmentInfoId",{},{ + + get:{method: 'GET',params:{} }, + delete:{method: 'DELETE',params:{}}, + put:{method:'PUT',params:{}} + + }), + employmentInfoTemplate:defineResource(apiVer+"/clients/:clientId/employmentInfo/template",{},{ + get:{method: 'GET',params:{}} + }), + employmentInfoStatus:defineResource(apiVer+"/clients/:clientId/employmentInfo/:employmentInfoId/updateInfoStatus",{},{ + get:{method:'GET',params:{status:'@status'}} + }), + businessOwnersDocumentsResource: defineResource(apiVer + "/business_owners/:ownerId/documents/:documentId", {clientId: '@ownerId', documentId: '@documentId'}, { + getAllBusinessOwnerDocuments: {method: 'GET', params: {}, isArray: true} + }), + clientBusinessDetailResource: defineResource(apiVer + "/clients/:clientId/businessDetail/:businessDetailId/", {clientId: '@clientId',businessDetailId: '@businessDetailId'}, { + getAllClientBusinessDetails: {method: 'GET', params: {}}, + put: {method: 'PUT', params: {}}, + save: {method: 'POST', params: {}}, + delete:{method: 'DELETE',params:{}}, + }), + clientBusinessDetailTemplate:defineResource(apiVer+"/clients/:clientId/businessDetail/template",{clientId: '@clientId'},{ + get:{method: 'GET',params:{}} + }), + loanDecisionEngineResource: defineResource(apiVer + "/loans/decision/reviewApplication/:loanId", {loanId: '@loanId'}, { + reviewApplication: {method: 'POST', params: {}}, + }), + collateralReviewLoanDecisionEngineResource: defineResource(apiVer + "/loans/decision/collateralReview/:loanId", {loanId: '@loanId'}, { + collateralReview: {method: 'POST', params: {}}, + }), + approveDueDiligenceLoanDecisionEngineResource: defineResource(apiVer + "/loans/decision/dueDiligence/:loanId", {loanId: '@loanId'}, { + approveDueDiligence: {method: 'POST', params: {}}, + }), + dueDiligenceLoanDecisionEngineResource: defineResource(apiVer + "/loans/decision/template/:loanId", {loanId: '@loanId'}, { + getTemplate: {method: 'GET', params: {}}, + }), + addApprovalMatrixEngineResource: defineResource(apiVer + "/loans/decision/approvalMatrix/createApprovalMatrix", {}, { + save: {method: 'POST', params: {}}, + }), + getApprovalMatrixEngineTemplateResource: defineResource(apiVer + "/loans/decision/template/approvalMatrix", {}, { + get: {method: 'GET', params: {}}, + }), + getAllApprovalMatrixEngineResource: defineResource(apiVer + "/loans/decision/getAllApprovalMatrix", {}, { + getAll: {method: 'GET', params: {},isArray:true}, + }), + getAllApprovalMatrixDetailsEngineResource: defineResource(apiVer + "/loans/decision/getApprovalMatrixDetails/:approvalMatrixId",{approvalMatrixId: '@approvalMatrixId'}, { + get: {method: 'GET', params:{}}, + }), + deleteApprovalMatrixDetailsEngineResource: defineResource(apiVer + "/loans/decision/approvalMatrix/:approvalMatrixId",{approvalMatrixId: '@approvalMatrixId'}, { + delete: {method: 'DELETE', params:{}}, + }), + updateApprovalMatrixDetailsEngineResource: defineResource(apiVer + "/loans/decision/updateApprovalMatrix/:approvalMatrixId",{approvalMatrixId: '@approvalMatrixId'}, { + put: {method: 'PUT', params:{}}, + }), + icReviewLevelOneLoanDecisionEngineResource: defineResource(apiVer + "/loans/decision/icReviewDecisionLevelOne/:loanId", {loanId: '@loanId'}, { + acceptIcReviewLevelOne: {method: 'POST', params: {}}, + }), + icReviewLevelTwoLoanDecisionEngineResource: defineResource(apiVer + "/loans/decision/icReviewDecisionLevelTwo/:loanId", {loanId: '@loanId'}, { + acceptIcReviewLevelTwo: {method: 'POST', params: {}}, + }), + icReviewLevelThreeLoanDecisionEngineResource: defineResource(apiVer + "/loans/decision/icReviewDecisionLevelThree/:loanId", {loanId: '@loanId'}, { + acceptIcReviewLevelThree: {method: 'POST', params: {}}, + }), + icReviewLevelFourLoanDecisionEngineResource: defineResource(apiVer + "/loans/decision/icReviewDecisionLevelFour/:loanId", {loanId: '@loanId'}, { + acceptIcReviewLevelFour: {method: 'POST', params: {}}, + }), + icReviewLevelFiveLoanDecisionEngineResource: defineResource(apiVer + "/loans/decision/icReviewDecisionLevelFive/:loanId", {loanId: '@loanId'}, { + acceptIcReviewLevelFive: {method: 'POST', params: {}}, + }), + prepareAndSignContractLoanDecisionEngineResource: defineResource(apiVer + "/loans/decision/prepareAndSignContract/:loanId", {loanId: '@loanId'}, { + acceptPrepareAndSignContract: {method: 'POST', params: {}}, + }), + getAllLoansPendingDecisionEngineResource: defineResource(apiVer + "/loans/decision/getAllLoansPendingDecisionEngine/:nextLoanDecisionState",{nextLoanDecisionState: '@nextLoanDecisionState'}, { + getAll: {method: 'GET', params:{}, isArray : true}, + }), provisioningcriteria: defineResource(apiVer + "/provisioningcriteria/:criteriaId",{criteriaId:'@criteriaId'},{ get: {method: 'GET',params:{}}, getAll: {method: 'GET',params:{}, isArray : true}, @@ -817,6 +984,15 @@ getAllConfigs: {method: 'GET', params: {}}, put: {method: 'PUT', params: {}} }), + validationLimitResource: defineResource(apiVer + "/validationlimit/:validationLimitId", { validationLimitId: '@validationLimitId' }, { + getAllValidationLimit: { method: 'GET', params: {}, isArray: true }, + getValidationLimit: { method: 'GET', params: {} }, + update: { method: 'PUT', params: {} } + }), + validationLimitTemplateResource: defineResource(apiVer + "/validationlimit/template", { + get: { method: 'GET', params: {}, isArray: true } + + }), rateResource: defineResource(apiVer + "/rates/:rateId", {rateId: '@rateId'}, { getAllRates: {method: 'GET', params: {}, isArray: true}, getRate: {method: 'GET', params: {}}, diff --git a/app/styles-dev/main/components/_content.scss b/app/styles-dev/main/components/_content.scss index 55969d66..f9772269 100644 --- a/app/styles-dev/main/components/_content.scss +++ b/app/styles-dev/main/components/_content.scss @@ -458,6 +458,33 @@ span.required { .statusgood { color: #008000; } +.statusreviewapplication { + color: #B17A4E; +} +.statusduediligence { + color: #D0005E; +} +.statuscollateralreview { + color: #0E7B90; +} +.statusiclevelone { + color: #7d8950; +} +.statusicleveltwo { + color: #AB3D7B; +} +.statusiclevelthree { + color: #D35400; +} +.statusiclevelfour { + color: #9B59B6; +} +.statusiclevelfive { + color: #A8577B; +} +.statusprepareandsign { + color: #4E85B1; +} .statushold { color: #FFFF00; diff --git a/app/styles/styles.css b/app/styles/styles.css index f1cddb92..fbd5b0cd 100644 --- a/app/styles/styles.css +++ b/app/styles/styles.css @@ -8983,7 +8983,6 @@ input[type="submit"] { button[disabled], html input[disabled] { cursor: default; - opacity: 50%; } /* line 311, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_normalize.scss */ @@ -9146,6 +9145,20 @@ th { } /* line 85, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_print.scss */ + .table { + border-collapse: collapse !important; + } + /* line 88, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_print.scss */ + .table td, + .table th { + background-color: #fff !important; + } + + /* line 94, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_print.scss */ + .table-bordered th, + .table-bordered td { + border: 1px solid #ddd !important; + } } @font-face { font-family: 'Glyphicons Halflings'; @@ -12264,7 +12277,84 @@ th { } /* line 22, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ +.table { + width: 100%; + max-width: 100%; + margin-bottom: 20px; +} +/* line 31, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ +.table > thead > tr > th, +.table > thead > tr > td, +.table > tbody > tr > th, +.table > tbody > tr > td, +.table > tfoot > tr > th, +.table > tfoot > tr > td { + padding: 8px; + line-height: 1.42857; + vertical-align: top; + border-top: 1px solid #ddd; +} +/* line 41, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ +.table > thead > tr > th { + vertical-align: bottom; + border-bottom: 2px solid #ddd; +} +/* line 50, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ +.table > caption + thead > tr:first-child > th, +.table > caption + thead > tr:first-child > td, +.table > colgroup + thead > tr:first-child > th, +.table > colgroup + thead > tr:first-child > td, +.table > thead:first-child > tr:first-child > th, +.table > thead:first-child > tr:first-child > td { + border-top: 0; +} +/* line 57, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ +.table > tbody + tbody { + border-top: 2px solid #ddd; +} +/* line 62, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ +.table .table { + background-color: #fff; +} + +/* line 75, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ +.table-condensed > thead > tr > th, +.table-condensed > thead > tr > td, +.table-condensed > tbody > tr > th, +.table-condensed > tbody > tr > td, +.table-condensed > tfoot > tr > th, +.table-condensed > tfoot > tr > td { + padding: 5px; +} + +/* line 88, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ +.table-bordered { + border: 1px solid #ddd; +} +/* line 94, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ +.table-bordered > thead > tr > th, +.table-bordered > thead > tr > td, +.table-bordered > tbody > tr > th, +.table-bordered > tbody > tr > td, +.table-bordered > tfoot > tr > th, +.table-bordered > tfoot > tr > td { + border: 1px solid #ddd; +} +/* line 101, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ +.table-bordered > thead > tr > th, +.table-bordered > thead > tr > td { + border-bottom-width: 2px; +} +/* line 114, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ +.table-striped > tbody > tr:nth-of-type(odd) { + background-color: #f9f9f9; +} + +/* line 125, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ +.table-hover > tbody > tr:hover { + background-color: #f5f5f5; +} /* line 135, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ table col[class*="col-"] { @@ -12282,6 +12372,162 @@ table th[class*="col-"] { } /* line 9, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_table-row.scss */ +.table > thead > tr > td.active, +.table > thead > tr > th.active, .table > thead > tr.active > td, .table > thead > tr.active > th, +.table > tbody > tr > td.active, +.table > tbody > tr > th.active, +.table > tbody > tr.active > td, +.table > tbody > tr.active > th, +.table > tfoot > tr > td.active, +.table > tfoot > tr > th.active, +.table > tfoot > tr.active > td, +.table > tfoot > tr.active > th { + background-color: #f5f5f5; +} + +/* line 20, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_table-row.scss */ +.table-hover > tbody > tr > td.active:hover, +.table-hover > tbody > tr > th.active:hover, .table-hover > tbody > tr.active:hover > td, .table-hover > tbody > tr:hover > .active, .table-hover > tbody > tr.active:hover > th { + background-color: #e8e8e8; +} + +/* line 9, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_table-row.scss */ +.table > thead > tr > td.success, +.table > thead > tr > th.success, .table > thead > tr.success > td, .table > thead > tr.success > th, +.table > tbody > tr > td.success, +.table > tbody > tr > th.success, +.table > tbody > tr.success > td, +.table > tbody > tr.success > th, +.table > tfoot > tr > td.success, +.table > tfoot > tr > th.success, +.table > tfoot > tr.success > td, +.table > tfoot > tr.success > th { + background-color: #dff0d8; +} + +/* line 20, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_table-row.scss */ +.table-hover > tbody > tr > td.success:hover, +.table-hover > tbody > tr > th.success:hover, .table-hover > tbody > tr.success:hover > td, .table-hover > tbody > tr:hover > .success, .table-hover > tbody > tr.success:hover > th { + background-color: #d0e9c6; +} + +/* line 9, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_table-row.scss */ +.table > thead > tr > td.info, +.table > thead > tr > th.info, .table > thead > tr.info > td, .table > thead > tr.info > th, +.table > tbody > tr > td.info, +.table > tbody > tr > th.info, +.table > tbody > tr.info > td, +.table > tbody > tr.info > th, +.table > tfoot > tr > td.info, +.table > tfoot > tr > th.info, +.table > tfoot > tr.info > td, +.table > tfoot > tr.info > th { + background-color: #d9edf7; +} + +/* line 20, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_table-row.scss */ +.table-hover > tbody > tr > td.info:hover, +.table-hover > tbody > tr > th.info:hover, .table-hover > tbody > tr.info:hover > td, .table-hover > tbody > tr:hover > .info, .table-hover > tbody > tr.info:hover > th { + background-color: #c4e3f3; +} + +/* line 9, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_table-row.scss */ +.table > thead > tr > td.warning, +.table > thead > tr > th.warning, .table > thead > tr.warning > td, .table > thead > tr.warning > th, +.table > tbody > tr > td.warning, +.table > tbody > tr > th.warning, +.table > tbody > tr.warning > td, +.table > tbody > tr.warning > th, +.table > tfoot > tr > td.warning, +.table > tfoot > tr > th.warning, +.table > tfoot > tr.warning > td, +.table > tfoot > tr.warning > th { + background-color: #fcf8e3; +} + +/* line 20, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_table-row.scss */ +.table-hover > tbody > tr > td.warning:hover, +.table-hover > tbody > tr > th.warning:hover, .table-hover > tbody > tr.warning:hover > td, .table-hover > tbody > tr:hover > .warning, .table-hover > tbody > tr.warning:hover > th { + background-color: #faf2cc; +} + +/* line 9, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_table-row.scss */ +.table > thead > tr > td.danger, +.table > thead > tr > th.danger, .table > thead > tr.danger > td, .table > thead > tr.danger > th, +.table > tbody > tr > td.danger, +.table > tbody > tr > th.danger, +.table > tbody > tr.danger > td, +.table > tbody > tr.danger > th, +.table > tfoot > tr > td.danger, +.table > tfoot > tr > th.danger, +.table > tfoot > tr.danger > td, +.table > tfoot > tr.danger > th { + background-color: #f2dede; +} + +/* line 20, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_table-row.scss */ +.table-hover > tbody > tr > td.danger:hover, +.table-hover > tbody > tr > th.danger:hover, .table-hover > tbody > tr.danger:hover > td, .table-hover > tbody > tr:hover > .danger, .table-hover > tbody > tr.danger:hover > th { + background-color: #ebcccc; +} + +/* line 171, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ +.table-responsive { + overflow-x: auto; + min-height: 0.01%; +} +@media screen and (max-width: 767px) { + /* line 171, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ + .table-responsive { + width: 100%; + margin-bottom: 15px; + overflow-y: hidden; + -ms-overflow-style: -ms-autohiding-scrollbar; + border: 1px solid #ddd; + } + /* line 183, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ + .table-responsive > .table { + margin-bottom: 0; + } + /* line 191, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ + .table-responsive > .table > thead > tr > th, + .table-responsive > .table > thead > tr > td, + .table-responsive > .table > tbody > tr > th, + .table-responsive > .table > tbody > tr > td, + .table-responsive > .table > tfoot > tr > th, + .table-responsive > .table > tfoot > tr > td { + white-space: nowrap; + } + /* line 200, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ + .table-responsive > .table-bordered { + border: 0; + } + /* line 208, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ + .table-responsive > .table-bordered > thead > tr > th:first-child, + .table-responsive > .table-bordered > thead > tr > td:first-child, + .table-responsive > .table-bordered > tbody > tr > th:first-child, + .table-responsive > .table-bordered > tbody > tr > td:first-child, + .table-responsive > .table-bordered > tfoot > tr > th:first-child, + .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; + } + /* line 212, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ + .table-responsive > .table-bordered > thead > tr > th:last-child, + .table-responsive > .table-bordered > thead > tr > td:last-child, + .table-responsive > .table-bordered > tbody > tr > th:last-child, + .table-responsive > .table-bordered > tbody > tr > td:last-child, + .table-responsive > .table-bordered > tfoot > tr > th:last-child, + .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; + } + /* line 225, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss */ + .table-responsive > .table-bordered > tbody > tr:last-child > th, + .table-responsive > .table-bordered > tbody > tr:last-child > td, + .table-responsive > .table-bordered > tfoot > tr:last-child > th, + .table-responsive > .table-bordered > tfoot > tr:last-child > td { + border-bottom: 0; + } +} /* line 10, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_forms.scss */ fieldset { @@ -15818,7 +16064,164 @@ button.list-group-item-danger.active:focus { } /* line 110, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss */ - +.panel > .table, +.panel > .table-responsive > .table, +.panel > .panel-collapse > .table { + margin-bottom: 0; +} +/* line 115, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss */ +.panel > .table caption, +.panel > .table-responsive > .table caption, +.panel > .panel-collapse > .table caption { + padding-left: 15px; + padding-right: 15px; +} +/* line 121, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss */ +.panel > .table:first-child, +.panel > .table-responsive:first-child > .table:first-child { + border-top-right-radius: 3px; + border-top-left-radius: 3px; +} +/* line 127, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss */ +.panel > .table:first-child > thead:first-child > tr:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +/* line 131, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss */ +.panel > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { + border-top-left-radius: 3px; +} +/* line 135, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss */ +.panel > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { + border-top-right-radius: 3px; +} +/* line 143, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss */ +.panel > .table:last-child, +.panel > .table-responsive:last-child > .table:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +/* line 149, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss */ +.panel > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; +} +/* line 153, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss */ +.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { + border-bottom-left-radius: 3px; +} +/* line 157, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss */ +.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { + border-bottom-right-radius: 3px; +} +/* line 164, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss */ +.panel > .panel-body + .table, +.panel > .panel-body + .table-responsive, +.panel > .table + .panel-body, +.panel > .table-responsive + .panel-body { + border-top: 1px solid #ddd; +} +/* line 170, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss */ +.panel > .table > tbody:first-child > tr:first-child th, +.panel > .table > tbody:first-child > tr:first-child td { + border-top: 0; +} +/* line 174, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss */ +.panel > .table-bordered, +.panel > .table-responsive > .table-bordered { + border: 0; +} +/* line 181, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss */ +.panel > .table-bordered > thead > tr > th:first-child, +.panel > .table-bordered > thead > tr > td:first-child, +.panel > .table-bordered > tbody > tr > th:first-child, +.panel > .table-bordered > tbody > tr > td:first-child, +.panel > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-bordered > tfoot > tr > td:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; +} +/* line 185, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss */ +.panel > .table-bordered > thead > tr > th:last-child, +.panel > .table-bordered > thead > tr > td:last-child, +.panel > .table-bordered > tbody > tr > th:last-child, +.panel > .table-bordered > tbody > tr > td:last-child, +.panel > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-bordered > tfoot > tr > td:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; +} +/* line 194, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss */ +.panel > .table-bordered > thead > tr:first-child > td, +.panel > .table-bordered > thead > tr:first-child > th, +.panel > .table-bordered > tbody > tr:first-child > td, +.panel > .table-bordered > tbody > tr:first-child > th, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > td, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { + border-bottom: 0; +} +/* line 203, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss */ +.panel > .table-bordered > tbody > tr:last-child > td, +.panel > .table-bordered > tbody > tr:last-child > th, +.panel > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-bordered > tfoot > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { + border-bottom: 0; +} +/* line 210, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss */ +.panel > .table-responsive { + border: 0; + margin-bottom: 0; +} /* line 222, ../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss */ .panel-group { @@ -19674,8 +20077,6 @@ button.close { content: ""; } -/* line 1, ../bower_components/angular-bootstrap/table.css */ - /* Load style components */ /* @import this file */ /* line 3, ../styles-dev/main/components/_alerts.scss */ @@ -20224,36 +20625,72 @@ span.required { .card .statusgood { color: #008000; } -/* line 462, ../styles-dev/main/components/_content.scss */ +/* line 461, ../styles-dev/main/components/_content.scss */ +.card .statusreviewapplication { + color: #B17A4E; +} +/* line 464, ../styles-dev/main/components/_content.scss */ +.card .statusduediligence { + color: #D0005E; +} +/* line 467, ../styles-dev/main/components/_content.scss */ +.card .statuscollateralreview { + color: #0E7B90; +} +/* line 470, ../styles-dev/main/components/_content.scss */ +.card .statusiclevelone { + color: #7d8950; +} +/* line 473, ../styles-dev/main/components/_content.scss */ +.card .statusicleveltwo { + color: #AB3D7B; +} +/* line 476, ../styles-dev/main/components/_content.scss */ +.card .statusiclevelthree { + color: #D35400; +} +/* line 479, ../styles-dev/main/components/_content.scss */ +.card .statusiclevelfour { + color: #9B59B6; +} +/* line 482, ../styles-dev/main/components/_content.scss */ +.card .statusiclevelfive { + color: #A8577B; +} +/* line 485, ../styles-dev/main/components/_content.scss */ +.card .statusprepareandsign { + color: #4E85B1; +} +/* line 489, ../styles-dev/main/components/_content.scss */ .card .statushold { color: #FFFF00; } -/* line 466, ../styles-dev/main/components/_content.scss */ +/* line 493, ../styles-dev/main/components/_content.scss */ .card .statusprogresspendingtab { color: #F7FE2E; } -/* line 470, ../styles-dev/main/components/_content.scss */ +/* line 497, ../styles-dev/main/components/_content.scss */ .card .statusprogresstab { color: #FFA500; } -/* line 474, ../styles-dev/main/components/_content.scss */ +/* line 501, ../styles-dev/main/components/_content.scss */ .card .statusprogresscompletedtab { color: #298A08; } -/* line 478, ../styles-dev/main/components/_content.scss */ +/* line 505, ../styles-dev/main/components/_content.scss */ .card a { cursor: pointer; } -/* line 482, ../styles-dev/main/components/_content.scss */ +/* line 509, ../styles-dev/main/components/_content.scss */ .card .error { color: #d9534f; } -/* line 486, ../styles-dev/main/components/_content.scss */ +/* line 513, ../styles-dev/main/components/_content.scss */ .card .toolbar { height: 40px; border-bottom: 1px solid #e5e5e5; } -/* line 490, ../styles-dev/main/components/_content.scss */ +/* line 517, ../styles-dev/main/components/_content.scss */ .card .toolbar > h4 { float: left; margin: 0; @@ -20261,7 +20698,7 @@ span.required { font-size: 18px; font-weight: bold; } -/* line 500, ../styles-dev/main/components/_content.scss */ +/* line 527, ../styles-dev/main/components/_content.scss */ .card .toolbar > .btn-group .btn { border: none; border-radius: 0; @@ -20269,28 +20706,28 @@ span.required { height: 39px; min-width: 39px; } -/* line 506, ../styles-dev/main/components/_content.scss */ +/* line 533, ../styles-dev/main/components/_content.scss */ .card .toolbar > .btn-group .btn:hover { border: none; border-left: 1px solid #e5e5e5; } -/* line 511, ../styles-dev/main/components/_content.scss */ +/* line 538, ../styles-dev/main/components/_content.scss */ .card .toolbar > .btn-group .btn.btn-default:hover { background: #f5f5f5; color: #5bc0de; } -/* line 517, ../styles-dev/main/components/_content.scss */ +/* line 544, ../styles-dev/main/components/_content.scss */ .card .toolbar > .btn-group.open .dropdown-toggle { -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } -/* line 523, ../styles-dev/main/components/_content.scss */ +/* line 550, ../styles-dev/main/components/_content.scss */ .card .toolbar > .btn-group.btn-group-right { float: right; } -/* line 531, ../styles-dev/main/components/_content.scss */ +/* line 558, ../styles-dev/main/components/_content.scss */ .pre-wrap { white-space: pre-wrap; } @@ -20784,6 +21221,16 @@ div.chosen-container.chosen-container-single { padding: 8px 5px; } +/* line 76, ../styles-dev/main/components/_notifications.scss */ +.new-notification { + font-weight: bold; + border-left: #4f99ed solid 2px; +} +/* line 80, ../styles-dev/main/components/_notifications.scss */ +.new-notification h4 { + font-weight: bold; +} + /* line 1, ../styles-dev/main/components/_report.scss */ .graybg { background-color: #f0f0f0; @@ -20936,9 +21383,7 @@ div.chosen-container.chosen-container-single { padding-left: 30px; } - /* line 108, ../styles-dev/main/components/_report.scss */ - .paddedleft80 { padding-left: 8%; } @@ -21983,10 +22428,3 @@ Interactive Layer transform: rotate(360deg); } } -.strike-grey{ - text-decoration: line-through; - color: rgb(202 140 45); -} -.amber{ - color: rgb(202 140 45); -} \ No newline at end of file diff --git a/app/views/accounttransfers/create_standinginstruction.html b/app/views/accounttransfers/create_standinginstruction.html index ba01fccb..c0bf8293 100755 --- a/app/views/accounttransfers/create_standinginstruction.html +++ b/app/views/accounttransfers/create_standinginstruction.html @@ -160,20 +160,17 @@ +
+ + + + +
-
- -
-
- -
-
- -
+
@@ -185,7 +182,7 @@
diff --git a/app/views/accounttransfers/make_accounttransfer.html b/app/views/accounttransfers/make_accounttransfer.html index 4d2e7ad7..2d8ace15 100644 --- a/app/views/accounttransfers/make_accounttransfer.html +++ b/app/views/accounttransfers/make_accounttransfer.html @@ -53,8 +53,9 @@

{{ 'label.heading.accounttransfers' | translate }}

class="required">*
-
diff --git a/app/views/administration/AddressForm.html b/app/views/administration/AddressForm.html index 8e58808e..c2289346 100644 --- a/app/views/administration/AddressForm.html +++ b/app/views/administration/AddressForm.html @@ -100,8 +100,16 @@ value="formData.state_province_id">
-
- +
+
+ +
+
+ +
diff --git a/app/views/administration/EditAddress.html b/app/views/administration/EditAddress.html index 46386c8d..46f0957e 100644 --- a/app/views/administration/EditAddress.html +++ b/app/views/administration/EditAddress.html @@ -81,12 +81,20 @@
-
- +
+
+ +
+
+ +
@@ -95,7 +103,7 @@
diff --git a/app/views/administration/ViewLoanApprovalMatrixDetails.html b/app/views/administration/ViewLoanApprovalMatrixDetails.html new file mode 100644 index 00000000..082483ae --- /dev/null +++ b/app/views/administration/ViewLoanApprovalMatrixDetails.html @@ -0,0 +1,407 @@ +
+
+
+
+
+   {{'label.button.updateLoanapprovalmatrix' | translate}} + + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{'label.heading.currency' | translate}} :{{matrixDetails.currency}}
+ {{'label.heading.decisionLevelOne' | translate}} {{'label.heading.unsecuredloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelOneUnsecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelOneUnsecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelOneUnsecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelOne' | translate}} {{'label.heading.unsecuredloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelOneUnsecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelOneUnsecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelOneUnsecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelOne' | translate}} {{'label.heading.securedloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelOneSecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelOneSecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelOneSecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelOne' | translate}} {{'label.heading.securedloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelOneSecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelOneSecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelOneSecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelTwo' | translate}} {{'label.heading.unsecuredloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelTwoUnsecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelTwoUnsecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelTwoUnsecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelTwo' | translate}} {{'label.heading.unsecuredloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelTwoUnsecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelTwoUnsecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelTwoUnsecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelTwo' | translate}} {{'label.heading.securedloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelTwoSecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelTwoSecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelTwoSecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelTwo' | translate}} {{'label.heading.securedloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelTwoSecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelTwoSecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelTwoSecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelThree' | translate}} {{'label.heading.unsecuredloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelThreeUnsecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelThreeUnsecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelThreeUnsecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelThree' | translate}} {{'label.heading.unsecuredloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelThreeUnsecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelThreeUnsecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelThreeUnsecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelThree' | translate}} {{'label.heading.securedloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelThreeSecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelThreeSecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelThreeSecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelThree' | translate}} {{'label.heading.securedloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelThreeSecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelThreeSecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelThreeSecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelFour' | translate}} {{'label.heading.unsecuredloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFourUnsecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFourUnsecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFourUnsecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelFour' | translate}} {{'label.heading.unsecuredloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFourUnsecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFourUnsecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFourUnsecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelFour' | translate}} {{'label.heading.securedloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFourSecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFourSecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFourSecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelFour' | translate}} {{'label.heading.securedloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFourSecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFourSecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFourSecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelFive' | translate}} {{'label.heading.unsecuredloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFiveUnsecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFiveUnsecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFiveUnsecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelFive' | translate}} {{'label.heading.unsecuredloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFiveUnsecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFiveUnsecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFiveUnsecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelFive' | translate}} {{'label.heading.securedloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFiveSecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFiveSecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFiveSecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelFive' | translate}} {{'label.heading.securedloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFiveSecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFiveSecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFiveSecuredSecondCycleMaxTerm}}
+
+
+
\ No newline at end of file diff --git a/app/views/administration/createuser.html b/app/views/administration/createuser.html index cb4e4930..2cae6bac 100644 --- a/app/views/administration/createuser.html +++ b/app/views/administration/createuser.html @@ -178,7 +178,7 @@ diff --git a/app/views/administration/loanApprovalMatrix.html b/app/views/administration/loanApprovalMatrix.html new file mode 100644 index 00000000..f646c04d --- /dev/null +++ b/app/views/administration/loanApprovalMatrix.html @@ -0,0 +1,1415 @@ +
+ + + +
+
+ +
+
+ + +
+ +
+
+

{{ 'label.heading.unsecuredloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.unsecuredloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+

{{ 'label.heading.securedloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.securedloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+
+
+ +
+
+ +
+
+

{{ 'label.heading.unsecuredloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.unsecuredloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+

{{ 'label.heading.securedloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.securedloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+
+
+ +
+
+ +
+
+

{{ 'label.heading.unsecuredloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.unsecuredloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+

{{ 'label.heading.securedloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.securedloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+
+
+ +
+
+ +
+
+

{{ 'label.heading.unsecuredloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.unsecuredloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+

{{ 'label.heading.securedloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.securedloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+
+
+ +
+
+ +
+
+

{{ 'label.heading.unsecuredloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.unsecuredloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+

{{ 'label.heading.securedloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.securedloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{'label.heading.currency' | translate}} :{{matrixDetails.currency}}
+ {{'label.heading.decisionLevelOne' | translate}} {{'label.heading.unsecuredloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelOneUnsecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelOneUnsecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelOneUnsecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelOne' | translate}} {{'label.heading.unsecuredloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelOneUnsecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelOneUnsecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelOneUnsecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelOne' | translate}} {{'label.heading.securedloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelOneSecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelOneSecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelOneSecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelOne' | translate}} {{'label.heading.securedloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelOneSecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelOneSecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelOneSecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelTwo' | translate}} {{'label.heading.unsecuredloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelTwoUnsecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelTwoUnsecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelTwoUnsecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelTwo' | translate}} {{'label.heading.unsecuredloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelTwoUnsecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelTwoUnsecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelTwoUnsecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelTwo' | translate}} {{'label.heading.securedloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelTwoSecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelTwoSecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelTwoSecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelTwo' | translate}} {{'label.heading.securedloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelTwoSecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelTwoSecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelTwoSecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelThree' | translate}} {{'label.heading.unsecuredloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelThreeUnsecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelThreeUnsecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelThreeUnsecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelThree' | translate}} {{'label.heading.unsecuredloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelThreeUnsecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelThreeUnsecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelThreeUnsecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelThree' | translate}} {{'label.heading.securedloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelThreeSecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelThreeSecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelThreeSecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelThree' | translate}} {{'label.heading.securedloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelThreeSecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelThreeSecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelThreeSecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelFour' | translate}} {{'label.heading.unsecuredloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFourUnsecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFourUnsecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFourUnsecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelFour' | translate}} {{'label.heading.unsecuredloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFourUnsecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFourUnsecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFourUnsecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelFour' | translate}} {{'label.heading.securedloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFourSecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFourSecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFourSecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelFour' | translate}} {{'label.heading.securedloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFourSecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFourSecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFourSecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelFive' | translate}} {{'label.heading.unsecuredloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFiveUnsecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFiveUnsecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFiveUnsecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelFive' | translate}} {{'label.heading.unsecuredloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFiveUnsecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFiveUnsecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFiveUnsecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelFive' | translate}} {{'label.heading.securedloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFiveSecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFiveSecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFiveSecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelFive' | translate}} {{'label.heading.securedloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFiveSecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFiveSecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFiveSecuredSecondCycleMaxTerm}}
+
+
+
+
+ + +
+
+ + +
+
+
+
+
diff --git a/app/views/administration/system.html b/app/views/administration/system.html index f39c6cdb..ce3d4365 100644 --- a/app/views/administration/system.html +++ b/app/views/administration/system.html @@ -49,6 +49,11 @@

{{'label.managesurveys' | translate}}

+ +

  {{'label.anchor.mytasks' + | translate}}

+

{{'label.managetasks' | translate}}

+
- \ No newline at end of file + diff --git a/app/views/administration/updateLoanApprovalMatrix.html b/app/views/administration/updateLoanApprovalMatrix.html new file mode 100644 index 00000000..d9cf0414 --- /dev/null +++ b/app/views/administration/updateLoanApprovalMatrix.html @@ -0,0 +1,1415 @@ +
+ + + +
+
+ +
+
+ + +
+ +
+
+

{{ 'label.heading.unsecuredloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.unsecuredloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+

{{ 'label.heading.securedloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.securedloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+
+
+ +
+
+ +
+
+

{{ 'label.heading.unsecuredloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.unsecuredloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+

{{ 'label.heading.securedloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.securedloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+
+
+ +
+
+ +
+
+

{{ 'label.heading.unsecuredloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.unsecuredloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+

{{ 'label.heading.securedloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.securedloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+
+
+ +
+
+ +
+
+

{{ 'label.heading.unsecuredloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.unsecuredloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+

{{ 'label.heading.securedloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.securedloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+
+
+ +
+
+ +
+
+

{{ 'label.heading.unsecuredloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.unsecuredloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+

{{ 'label.heading.securedloanfirstcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+

{{ 'label.heading.securedloansecondcycle' | translate }}

+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{'label.heading.currency' | translate}} :{{matrixDetails.currency}}
+ {{'label.heading.decisionLevelOne' | translate}} {{'label.heading.unsecuredloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelOneUnsecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelOneUnsecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelOneUnsecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelOne' | translate}} {{'label.heading.unsecuredloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelOneUnsecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelOneUnsecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelOneUnsecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelOne' | translate}} {{'label.heading.securedloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelOneSecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelOneSecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelOneSecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelOne' | translate}} {{'label.heading.securedloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelOneSecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelOneSecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelOneSecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelTwo' | translate}} {{'label.heading.unsecuredloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelTwoUnsecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelTwoUnsecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelTwoUnsecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelTwo' | translate}} {{'label.heading.unsecuredloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelTwoUnsecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelTwoUnsecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelTwoUnsecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelTwo' | translate}} {{'label.heading.securedloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelTwoSecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelTwoSecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelTwoSecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelTwo' | translate}} {{'label.heading.securedloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelTwoSecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelTwoSecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelTwoSecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelThree' | translate}} {{'label.heading.unsecuredloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelThreeUnsecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelThreeUnsecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelThreeUnsecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelThree' | translate}} {{'label.heading.unsecuredloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelThreeUnsecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelThreeUnsecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelThreeUnsecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelThree' | translate}} {{'label.heading.securedloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelThreeSecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelThreeSecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelThreeSecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelThree' | translate}} {{'label.heading.securedloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelThreeSecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelThreeSecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelThreeSecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelFour' | translate}} {{'label.heading.unsecuredloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFourUnsecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFourUnsecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFourUnsecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelFour' | translate}} {{'label.heading.unsecuredloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFourUnsecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFourUnsecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFourUnsecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelFour' | translate}} {{'label.heading.securedloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFourSecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFourSecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFourSecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelFour' | translate}} {{'label.heading.securedloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFourSecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFourSecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFourSecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelFive' | translate}} {{'label.heading.unsecuredloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFiveUnsecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFiveUnsecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFiveUnsecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelFive' | translate}} {{'label.heading.unsecuredloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFiveUnsecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFiveUnsecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFiveUnsecuredSecondCycleMaxTerm}}
+ {{'label.heading.decisionLevelFive' | translate}} {{'label.heading.securedloanfirstcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFiveSecuredFirstCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFiveSecuredFirstCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFiveSecuredFirstCycleMaxTerm}}
+ {{'label.heading.decisionLevelFive' | translate}} {{'label.heading.securedloansecondcycle' | translate}} +
{{'label.heading.maximumloanprincipalamount' | translate}} :{{matrixDetails.levelFiveSecuredSecondCycleMaxAmount}}
{{'label.heading.minimumloanterm' | translate}} :{{matrixDetails.levelFiveSecuredSecondCycleMinTerm}}
{{'label.heading.maximumloanterm' | translate}} :{{matrixDetails.levelFiveSecuredSecondCycleMaxTerm}}
+
+
+
+
+ + +
+
+ + +
+
+
+
+
diff --git a/app/views/administration/viewLoanApprovalMatrix.html b/app/views/administration/viewLoanApprovalMatrix.html new file mode 100644 index 00000000..6aea10f3 --- /dev/null +++ b/app/views/administration/viewLoanApprovalMatrix.html @@ -0,0 +1,44 @@ +
+
+
+

List of Loan Approval Matrix

+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
{{'label.heading.id' | translate}}{{'label.heading.currency' | translate}}{{'label.heading.levelOneUnsecuredFirstCycleMaxAmount' | translate}}{{'label.heading.levelOneUnsecuredFirstCycleMinTerm' | translate}}{{'label.heading.levelOneUnsecuredFirstCycleMaxTerm' | translate}}
{{matrixDetail.id}}{{matrixDetail.currency}}{{matrixDetail.levelOneUnsecuredFirstCycleMaxAmount}}{{matrixDetail.levelOneUnsecuredFirstCycleMinTerm}}{{matrixDetail.levelOneUnsecuredFirstCycleMaxTerm}}
+ +
+
+ + +
diff --git a/app/views/clients/AddExpenses.html b/app/views/clients/AddExpenses.html new file mode 100644 index 00000000..170208f9 --- /dev/null +++ b/app/views/clients/AddExpenses.html @@ -0,0 +1,81 @@ +
+
+ +
+
+ +
+ +
+
+
+ + +
+ +
+
+
+ + +
+ +
+ +
+
+ +
+ +
+
+
+ +    +
+ +
+ +
+
+
+ + + + + + + + + + +
{{'label.heading.otherexpenses' | translate}}{{'label.heading.otherexpensesamount' | translate}}
+ + + + + + + +
+
+
+ + +
+
+ +
+
\ No newline at end of file diff --git a/app/views/clients/EditExpenses.html b/app/views/clients/EditExpenses.html new file mode 100644 index 00000000..49319225 --- /dev/null +++ b/app/views/clients/EditExpenses.html @@ -0,0 +1,81 @@ +
+
+ +
+
+ +
+ +
+
+
+ + +
+ +
+
+
+ + +
+ +
+ +
+
+ +
+ +
+
+
+ +    +
+ +
+ +
+
+
+ + + + + + + + + + +
{{'label.heading.otherexpenses' | translate}}{{'label.heading.otherexpensesamount' | translate}}
+ + + + + + + +
+
+
+ + +
+
+ +
+
\ No newline at end of file diff --git a/app/views/clients/addBusinessOwners.html b/app/views/clients/addBusinessOwners.html new file mode 100644 index 00000000..68177fd9 --- /dev/null +++ b/app/views/clients/addBusinessOwners.html @@ -0,0 +1,217 @@ +
+ + +
+ +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + +
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+ + +
+ +
+
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+ +
+
+
+ +
+
+ +
+
+
+ +
+ +
+
+ +
+
+ +
+
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+ +
+ + + + + + +
+ +
+ +
+
\ No newline at end of file diff --git a/app/views/clients/addBusinessOwnersdocument.html b/app/views/clients/addBusinessOwnersdocument.html new file mode 100644 index 00000000..57e4892c --- /dev/null +++ b/app/views/clients/addBusinessOwnersdocument.html @@ -0,0 +1,50 @@ +
+ +
+ +
+ {{'label.heading.uploadclientdocument' | translate}} +
+ + +
+ +
+
+ +
+
+ +
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+ + + + +
+
+
+
diff --git a/app/views/clients/addClientBusinessDetail.html b/app/views/clients/addClientBusinessDetail.html new file mode 100644 index 00000000..208bc9b7 --- /dev/null +++ b/app/views/clients/addClientBusinessDetail.html @@ -0,0 +1,695 @@ +
+ + + +
+
+ + +
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+
+
+ +
+
+ + +
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+
+
+ +
+
+ + +
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+
+ + +
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+   +
+ {{'label.heading.details' | translate}} +
{{'label.heading.businesstype' | translate}} :{{businessDetails.businessType}}
{{'label.heading.startingcapital' | translate}} :{{businessDetails.startingCapital}}
{{ 'label.heading.businesscreationdate' | translate }} :{{first.businessCreationDate | DateFormat}}
{{ 'label.heading.sourceofcapital' | translate }} :{{businessDetails.sourceOfCapital}}
{{ 'label.heading.externalid' | translate }} :{{businessDetails.externalId}}
{{ 'label.heading.totalemployees' | translate }} :{{businessDetails.totalEmployee}}
{{ 'label.heading.businessrevenue' | translate }} :{{businessDetails.businessRevenue}}
{{ 'label.heading.averagemonthlyrevenue' | translate }} :{{businessDetails.averageMonthlyRevenue}}
{{ 'label.heading.bestmonth' | translate }} :{{businessDetails.bestMonth}}
{{ 'label.heading.reasonforbestmonth' | translate }} :{{businessDetails.reasonForBestMonth}}
{{ 'label.heading.worstmonth' | translate }} :{{businessDetails.worstMonth}}
{{ 'label.heading.reasonforworstmonth' | translate }} :{{businessDetails.reasonForWorstMonth}}
{{ 'label.heading.numberofpurchase' | translate }} :{{businessDetails.numberOfPurchase}}
{{ 'label.heading.purchasefrequency' | translate }} :{{businessDetails.purchaseFrequency}}
{{ 'label.heading.totalpurchaselastmonth' | translate }} :{{businessDetails.totalPurchaseLastMonth}}
{{ 'label.heading.whenlastpurchase' | translate }} :{{businessDetails.whenLastPurchase}}
{{ 'label.heading.lastpurchaseamount' | translate }} :{{businessDetails.lastPurchaseAmount}}
{{ 'label.heading.businessassetamount' | translate }} :{{businessDetails.businessAssetAmount}}
{{ 'label.heading.amountatcash' | translate }} :{{businessDetails.amountAtCash}}
{{ 'label.heading.amountatsaving' | translate }} :{{businessDetails.amountAtSaving}}
{{ 'label.heading.amountatinventory' | translate }} :{{businessDetails.amountAtInventory}}
{{ 'label.heading.fixedassetcost' | translate }} :{{businessDetails.fixedAssetCost}}
{{ 'label.heading.totalintax' | translate }} :{{businessDetails.totalInTax}}
{{ 'label.heading.totalintransport' | translate }} :{{businessDetails.totalInTransport}}
{{ 'label.heading.totalinrent' | translate }} :{{businessDetails.totalInRent}}
{{ 'label.heading.totalincommunication' | translate }} :{{businessDetails.totalInCommunication}}
{{ 'label.heading.otherexpense' | translate }} :{{businessDetails.otherExpense}}
{{ 'label.heading.otherexpenseamount' | translate }} :{{businessDetails.otherExpenseAmount}}
{{ 'label.heading.totalutility' | translate }} :{{businessDetails.totalUtility}}
{{ 'label.heading.totalworkersalary' | translate }} :{{businessDetails.totalWorkerSalary}}
{{ 'label.heading.totalwage' | translate }} :{{businessDetails.totalWage}}
{{ 'label.heading.society' | translate }} :{{businessDetails.society}}
+
+
+
+
+ + +
+
+ + +
+
+
+
+
diff --git a/app/views/clients/addEmploymentInfo.html b/app/views/clients/addEmploymentInfo.html new file mode 100644 index 00000000..518ddd20 --- /dev/null +++ b/app/views/clients/addEmploymentInfo.html @@ -0,0 +1,173 @@ +
+ + +
+ +
+
+
+ +
+
+ +
+
+
+
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ + +
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+ + +
+ +
+ +
+
+
+ + + +
+ +
+ +
+
\ No newline at end of file diff --git a/app/views/clients/addfamilymembers.html b/app/views/clients/addfamilymembers.html index 0ffb06f0..92d0c861 100644 --- a/app/views/clients/addfamilymembers.html +++ b/app/views/clients/addfamilymembers.html @@ -31,7 +31,13 @@ +
+ +
+ +
+
@@ -124,12 +130,96 @@
+ ng-model="date.dateOfBirth" is-open="opened1" min="minDate" max="restrictDate" class="form-control"/> +
+ +
+
+
+ +
+
+ + +
+
+
+ + +
+
+
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+ +
+
+
+ +
+
+ +
+
+
+ +
+ +
+
+ +
+
+ +
+
+
+ + +
+ +
+ +
+
+ +
+ + + + + +
+
+

Client Other Info

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
{{'label.heading.strata' | translate}}{{otherInfoData.strata.name}}
{{'label.heading.nationality' | translate}}{{otherInfoData.nationality.name}}
{{'label.heading.numberOfChildren' | translate}}{{otherInfoData.numberOfChildren}}
{{'label.heading.numberOfDependent' | translate}}{{otherInfoData.numberOfDependents}}
{{'label.heading.yearArrivedInHostCountry' | translate}}{{otherInfoData.yearArrivedInHostCountry.name}}
+ +
+
+
+ \ No newline at end of file diff --git a/app/views/clients/clientotherinfoentity.html b/app/views/clients/clientotherinfoentity.html new file mode 100644 index 00000000..5fb0957e --- /dev/null +++ b/app/views/clients/clientotherinfoentity.html @@ -0,0 +1,147 @@ +
+ +
+
+
+

{{ 'label.heading.clientOtherInfo' | translate }}

+
+
+
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+
+
+
+
+
+

Client Other Info

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{'label.heading.businessLocation' | translate}}{{otherInfoData.businessLocation}}
{{'label.heading.taxIdentificationNumber' | translate}}{{otherInfoData.taxIdentificationNumber}}
{{'label.heading.coSignorsName' | translate}}{{otherInfoData.coSignors}}
{{'label.heading.guarantor' | translate}}{{otherInfoData.guarantor}}
{{'label.heading.incomeGeneratingActivity' | translate}}{{otherInfoData.incomeGeneratingActivity}}
{{'label.heading.incomeGeneratingActivityMonthlyAmount' | translate}}{{otherInfoData.incomeGeneratingActivityMonthlyAmount}}
{{'label.heading.telephoneNo' | translate}}{{otherInfoData.telephoneNumber}}
+ +
+
+
+
\ No newline at end of file diff --git a/app/views/clients/clientrecruitmentsurvey.html b/app/views/clients/clientrecruitmentsurvey.html new file mode 100644 index 00000000..e013e8a2 --- /dev/null +++ b/app/views/clients/clientrecruitmentsurvey.html @@ -0,0 +1,147 @@ +
+ +
+
+
+

{{ 'label.heading.addClientRecruitmentSurvey' | translate }}

+
+
+
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + +
+ +
+
+
+
+
+
+

{{'label.heading.clientRecruitmentSurvey' | translate}}

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{'label.heading.surveyName' | translate}}{{surveyData.surveyName}}
{{'label.heading.surveyLocation' | translate}}{{surveyData.surveyLocation.name}}
{{'label.heading.startDate' | translate}}{{surveyData.startDate | DateFormat}}
{{'label.heading.endDate' | translate}}{{surveyData.endDate | DateFormat}}
{{'label.heading.country' | translate}}{{surveyData.country.name}}
{{'label.heading.cohort' | translate}}{{surveyData.cohort.name}}
{{'label.heading.program' | translate}}{{surveyData.program.name}}
+ +
+
+
+
\ No newline at end of file diff --git a/app/views/clients/createclient.html b/app/views/clients/createclient.html index 4d61a4c4..04e7a666 100755 --- a/app/views/clients/createclient.html +++ b/app/views/clients/createclient.html @@ -45,6 +45,42 @@ + +
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
@@ -144,6 +180,23 @@
+
+
+ +
+ +
+
+ + + {{'label.mustbenumeric' | translate}} + + +
+ +
+
+
+
+ + +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
@@ -223,12 +303,12 @@
+ class="required">*
@@ -282,7 +362,50 @@ ng-model="first.submitondate" is-open="opened1" min="'2000-01-01'" max="restrictDate" class="form-control" />
+ + +
+ +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+ + +
+ +
+ +
@@ -303,8 +426,8 @@
+
+
+ +
+
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+ +
+ + +
+ +
+
+ +
+ + +
+ +
+ + +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ + +
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ + +
+ +
+
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ +
+ +
+
+ +
+
+ +
+ +
+
+ +
+
+
+ +
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+ + +
+ +
+
+ +
+ + +
+ +
+
+
+ +
+ +
+
+ +
+
+ +
+
+
+

{{ 'label.input.employmentInfo' | translate }} 

+
+
+ +
+ + +
+ +
+ + +
+ +
+ +
+ +
+ +
+ +
+ + +
+ +
+ +
+ + +
+ + +
+ +
+ +
+ +
+ +
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+ + +
+ +
+ +
+ +
+ +
+ +
+
+ +

{{ 'label.input.address' | translate }} 

+ ng-click="addAddress()">

@@ -483,15 +1100,15 @@

{{ 'label.input.address' | translate }} 
+ ng-model="addressArray[$index].addressTypeId" class="form-control" + ng-options="addressType.id as addressType.name for addressType in addressTypes " + value="addressTypeId" required late-validate>
+ class="fa fa-times">

+ class="form-control">
-
+
+
+ +
+
+ +
+
+
@@ -26,16 +31,28 @@

{{ 'label.heading.createcollateral' | translate }}

- +
+ + +
+ +
+
- +
- -
+ +
+
+ + +
+ +
+
@@ -45,6 +62,17 @@

{{ 'label.heading.createcollateral' | translate }}

+
+ + +
+ +
+
+ +
+
@@ -54,6 +82,17 @@

{{ 'label.heading.createcollateral' | translate }}

+
+ + +
+ +
+
+ +
+
@@ -63,6 +102,13 @@

{{ 'label.heading.createcollateral' | translate }}

+
+ + +
+ +
+
@@ -86,7 +132,13 @@

{{ 'label.heading.createcollateral' | translate }}

+
+ +
+ +
+
@@ -96,9 +148,55 @@

{{ 'label.heading.createcollateral' | translate }}

+
+ + +
+ +
+
+ +
+
+
+
+ +
+ +
+ + +
+ +
+
+
+ +
+ +
+ +
+ +
+
+
+ +
+ +
-
+ + + + + +
+ + + + + \ No newline at end of file diff --git a/app/views/clients/editClientBusinessDetail.html b/app/views/clients/editClientBusinessDetail.html new file mode 100644 index 00000000..48db2579 --- /dev/null +++ b/app/views/clients/editClientBusinessDetail.html @@ -0,0 +1,695 @@ +
+ + + +
+
+ + +
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+
+
+ +
+
+ + +
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+
+
+ +
+
+ + +
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+ + +
+ +
+
+
+ + +
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+   +
+ {{'label.heading.details' | translate}} +
{{'label.heading.businesstype' | translate}} :{{businessDetails.businessType}}
{{'label.heading.startingcapital' | translate}} :{{businessDetails.startingCapital}}
{{ 'label.heading.businesscreationdate' | translate }} :{{first.businessCreationDate | DateFormat}}
{{ 'label.heading.sourceofcapital' | translate }} :{{businessDetails.sourceOfCapital}}
{{ 'label.heading.externalid' | translate }} :{{businessDetails.externalId}}
{{ 'label.heading.totalemployees' | translate }} :{{businessDetails.totalEmployee}}
{{ 'label.heading.businessrevenue' | translate }} :{{businessDetails.businessRevenue}}
{{ 'label.heading.averagemonthlyrevenue' | translate }} :{{businessDetails.averageMonthlyRevenue}}
{{ 'label.heading.bestmonth' | translate }} :{{businessDetails.bestMonth}}
{{ 'label.heading.reasonforbestmonth' | translate }} :{{businessDetails.reasonForBestMonth}}
{{ 'label.heading.worstmonth' | translate }} :{{businessDetails.worstMonth}}
{{ 'label.heading.reasonforworstmonth' | translate }} :{{businessDetails.reasonForWorstMonth}}
{{ 'label.heading.numberofpurchase' | translate }} :{{businessDetails.numberOfPurchase}}
{{ 'label.heading.purchasefrequency' | translate }} :{{businessDetails.purchaseFrequency}}
{{ 'label.heading.totalpurchaselastmonth' | translate }} :{{businessDetails.totalPurchaseLastMonth}}
{{ 'label.heading.whenlastpurchase' | translate }} :{{businessDetails.whenLastPurchase}}
{{ 'label.heading.lastpurchaseamount' | translate }} :{{businessDetails.lastPurchaseAmount}}
{{ 'label.heading.businessassetamount' | translate }} :{{businessDetails.businessAssetAmount}}
{{ 'label.heading.amountatcash' | translate }} :{{businessDetails.amountAtCash}}
{{ 'label.heading.amountatsaving' | translate }} :{{businessDetails.amountAtSaving}}
{{ 'label.heading.amountatinventory' | translate }} :{{businessDetails.amountAtInventory}}
{{ 'label.heading.fixedassetcost' | translate }} :{{businessDetails.fixedAssetCost}}
{{ 'label.heading.totalintax' | translate }} :{{businessDetails.totalInTax}}
{{ 'label.heading.totalintransport' | translate }} :{{businessDetails.totalInTransport}}
{{ 'label.heading.totalinrent' | translate }} :{{businessDetails.totalInRent}}
{{ 'label.heading.totalincommunication' | translate }} :{{businessDetails.totalInCommunication}}
{{ 'label.heading.otherexpense' | translate }} :{{businessDetails.otherExpense}}
{{ 'label.heading.otherexpenseamount' | translate }} :{{businessDetails.otherExpenseAmount}}
{{ 'label.heading.totalutility' | translate }} :{{businessDetails.totalUtility}}
{{ 'label.heading.totalworkersalary' | translate }} :{{businessDetails.totalWorkerSalary}}
{{ 'label.heading.totalwage' | translate }} :{{businessDetails.totalWage}}
{{ 'label.heading.society' | translate }} :{{businessDetails.society}}
+
+
+
+
+ + +
+
+ + +
+
+
+
+
diff --git a/app/views/clients/editEmploymentInfo.html b/app/views/clients/editEmploymentInfo.html new file mode 100644 index 00000000..edcce3ca --- /dev/null +++ b/app/views/clients/editEmploymentInfo.html @@ -0,0 +1,177 @@ +
+ + +
+ +
+
+
+ +
+
+ +
+
+
+
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ + +
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+ + +
+ +
+ +
+
+
+ + + +
+ +
+ +
+
\ No newline at end of file diff --git a/app/views/clients/editclient.html b/app/views/clients/editclient.html index 8269fde3..4de5477c 100755 --- a/app/views/clients/editclient.html +++ b/app/views/clients/editclient.html @@ -42,7 +42,33 @@ - +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
@@ -138,6 +164,22 @@
+
+ +
+ +
+
+ + + {{'label.mustbenumeric' | translate}} + + +
+ +
@@ -172,6 +214,34 @@
+
+
+
+ + +
+ +
+
+
+
+
+
+
+ + +
+ +
+
+
+
+
@@ -216,12 +286,12 @@
+ class="required">*
@@ -245,13 +315,42 @@
-
+ ng-model="date.submittedOnDate" is-open="opened1" max="restrictDate" class="form-control" min="'2000-01-01'" + max="restrictDate"/>
+ + +
+ +
+
+ +
+ +
+
+
+ +
+ +
+ + +
+ +
+
+ +
+ +
+
diff --git a/app/views/clients/editclientcollateral.html b/app/views/clients/editclientcollateral.html index 2a39e498..7915e159 100644 --- a/app/views/clients/editclientcollateral.html +++ b/app/views/clients/editclientcollateral.html @@ -51,10 +51,133 @@

{{ 'label.heading.editcollateral' | translate }}

- +
+
+
{{ 'label.input.additionalDetails' | translate }} 
+
+
+
+
+ + +
+ +
+
+
+
+
+ + +
+ +
+
+
+
+
+ + +
+ +
+
+ +
+
+
+
+
+ + +
+ +
+
+ +
+
+
+
+
+ + +
+ +
+
+
+
+
+ + +
+ +
+
+
+
+
+ + +
+ +
+
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
-
diff --git a/app/views/clients/editclientotherinfo.html b/app/views/clients/editclientotherinfo.html new file mode 100644 index 00000000..82ce9982 --- /dev/null +++ b/app/views/clients/editclientotherinfo.html @@ -0,0 +1,81 @@ +
+ +
+
+
+

{{ 'label.heading.editClientOtherInfo' | translate }}

+
+
+
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+
+ + +
+ +
+
+
+
+
\ No newline at end of file diff --git a/app/views/clients/editclientotherinfoentity.html b/app/views/clients/editclientotherinfoentity.html new file mode 100644 index 00000000..c2462ede --- /dev/null +++ b/app/views/clients/editclientotherinfoentity.html @@ -0,0 +1,101 @@ +
+ +
+
+
+

{{ 'label.heading.editClientOtherInfo' | translate }}

+
+
+
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+
+
+
+
\ No newline at end of file diff --git a/app/views/clients/editclientrecruitmentsurvey.html b/app/views/clients/editclientrecruitmentsurvey.html new file mode 100644 index 00000000..5aec1a2f --- /dev/null +++ b/app/views/clients/editclientrecruitmentsurvey.html @@ -0,0 +1,101 @@ +
+ +
+
+
+

{{ 'label.heading.editClientRecruitmentSurvey' | translate }}

+
+
+
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + +
+ +
+
+
+
+
\ No newline at end of file diff --git a/app/views/clients/editfamilymembers.html b/app/views/clients/editfamilymembers.html index 5e08a61f..b04fb3b6 100644 --- a/app/views/clients/editfamilymembers.html +++ b/app/views/clients/editfamilymembers.html @@ -31,7 +31,13 @@
+
+ +
+ +
+
@@ -131,8 +137,92 @@
+
+
+ +
+
+ + +
+
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+ +
+
+
+ +
+
+ +
+
+
+ +
+ +
+
+ +
+
+ +
+
+
+ + +
+ +
+ +
+
+ +
+ + {{clientbusinessDetails.businesstype}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+   +
+ {{'label.heading.information' | translate}} +
{{'label.heading.businesstype' | translate}} :{{details.businessTypeId.name}}
{{'label.heading.externalid' | translate}} :{{details.externalId}}
{{'label.heading.startingcapital' | translate}} :{{details.startingCapital}}
{{'label.heading.sourceofcapital' | translate}} :{{details.sourceOfCapitalId.name}}
{{'label.heading.businesscreationdate' | translate}} :{{details.businessCreationDate | DateFormat }}
{{'label.heading.totalemployees' | translate}} :{{details.totalEmployee}}
+ {{'label.heading.revenue' | translate}} +
{{'label.heading.businessrevenue' | translate}} :{{details.businessRevenue}}
{{'label.heading.averagemonthlyrevenue' | translate}} :{{details.averageMonthlyRevenue}}
{{'label.heading.bestmonth' | translate}} :{{details.bestMonthId.value}}
{{'label.heading.reasonforbestmonth' | translate}} :{{details.reasonForBestMonth}}
{{'label.heading.worstmonth' | translate}} :{{details.worstMonthId.value}}
{{'label.heading.reasonforworstmonth' | translate}} :{{details.reasonForWorstMonth}}
{{'label.heading.numberofpurchase' | translate}} :{{details.numberOfPurchase}}
{{'label.heading.purchasefrequency' | translate}} :{{details.purchaseFrequency}}
{{'label.heading.totalpurchaselastmonth' | translate}} :{{details.totalPurchaseLastMonth}}
{{'label.heading.whenlastpurchase' | translate}} :{{details.lastPurchase.value}}
{{'label.heading.lastpurchaseamount' | translate}} :{{details.lastPurchaseAmount}}
{{'label.heading.businessassetamount' | translate}} :{{details.businessAsset}}
{{'label.heading.amountatinventory' | translate}} :{{details.amountAtInventory}}
{{'label.heading.fixedassetcost' | translate}} :{{details.fixedAssetCost}}
{{'label.heading.amountatcash' | translate}} :{{details.amountAtCash}}
{{'label.heading.amountatsaving' | translate}} :{{details.amountAtSaving}}
+ {{'label.heading.expense' | translate}} +
{{'label.heading.totalintax' | translate}} :{{details.totalInTax}}
{{'label.heading.totalintransport' | translate}} :{{details.totalInTransport}}
{{'label.heading.totalinrent' | translate}} :{{details.totalInRent}}
{{'label.heading.totalincommunication' | translate}} :{{details.totalInCommunication}}
{{'label.heading.otherexpense' | translate}} :{{details.otherExpense}}
{{'label.heading.otherexpenseamount' | translate}} :{{details.otherExpenseAmount}}
{{'label.heading.totalutility' | translate}} :{{details.totalUtility}}
{{'label.heading.totalworkersalary' | translate}} :{{details.totalWorkerSalary}}
{{'label.heading.totalwage' | translate}} :{{details.totalWage}}
{{'label.heading.society' | translate}} :{{details.society}}
+ + {{'label.button.top' | translate}} +
+ + + + diff --git a/app/views/clients/viewclient.html b/app/views/clients/viewclient.html index 61cd5975..6ac9acc3 100755 --- a/app/views/clients/viewclient.html +++ b/app/views/clients/viewclient.html @@ -67,6 +67,20 @@

{{'label.heading.selectclientimage' | translate}}

+ + + +
+
+
+
+ {{'label.button.edit' | translate}} + +
+
+
+
+
+
+ + + + + + + + + + + + + +
{{ 'label.heading.floatinginterestrate.valid.fromDate' | translate }}{{savingProductsFloatingInterestRate.fromDate | DateFormat}}
{{ 'label.heading.floatinginterestrate.valid.endDate' | translate }}{{ savingProductsFloatingInterestRate.endDate | DateFormat}}
{{ 'label.heading.floatinginterestrate.floatingInterestRate' | translate }}{{savingProductsFloatingInterestRate.floatingInterestRate}}
+
+
+
+ \ No newline at end of file diff --git a/app/views/products/viewsavingproductfloatinginterestrates.html b/app/views/products/viewsavingproductfloatinginterestrates.html new file mode 100644 index 00000000..771db7e6 --- /dev/null +++ b/app/views/products/viewsavingproductfloatinginterestrates.html @@ -0,0 +1,39 @@ +
+
+ +
+
+ +
+ + + + + + + + + + + + + + + +
{{'label.heading.floatinginterestrate.valid.fromDate' | translate}}{{'label.heading.floatinginterestrate.valid.endDate' | translate}}{{'label.heading.floatinginterestrate.floatingInterestRate' | translate}}
{{floatingInterestRate.fromDate | DateFormat}}{{floatingInterestRate.endDate | DateFormat}}{{floatingInterestRate.floatingInterestRate}}
+
+
+
+





+
+
+
diff --git a/app/views/products/viewvalidationlimit.html b/app/views/products/viewvalidationlimit.html new file mode 100644 index 00000000..03376c30 --- /dev/null +++ b/app/views/products/viewvalidationlimit.html @@ -0,0 +1,50 @@ +
+ +
+

{{validationLimit.clientLevel.name}} + +

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{'label.heading.clientLevel' | translate}}{{validationLimit.clientLevel.name}}
{{'label.heading.maximumsingledepositamount' | translate}}{{validationLimit.maximumSingleDepositAmount|number}}
{{'label.heading.maximumcumulativebalance' | translate}}{{validationLimit.maximumCumulativeBalance|number}}
{{'label.heading.defaultsinglewithdrawlimit' | translate}}{{validationLimit.maximumSingleWithdrawLimit|number}}
{{'label.heading.defaultdailywithdrawlimit' | translate}}{{validationLimit.maximumDailyWithdrawLimit|number}}
{{'label.heading.maximumclientspecificsinglewithdrawlimit' | translate}}{{validationLimit.maximumClientSpecificSingleWithdrawLimit|number}}
{{'label.heading.maximumclientspecificdailywithdrawlimit' | translate}}{{validationLimit.maximumClientSpecificDailyWithdrawLimit|number}}
+
+
+
+
\ No newline at end of file diff --git a/app/views/reports/run_reports.html b/app/views/reports/run_reports.html index b7bf958f..bb100dcc 100644 --- a/app/views/reports/run_reports.html +++ b/app/views/reports/run_reports.html @@ -132,7 +132,10 @@
- +
@@ -153,6 +156,26 @@ + + + + + + + + + + + + + + + +
{{columnHeader.columnName}}
+ {{col}} +
diff --git a/app/views/savings/addMemberToGSimAccount.html b/app/views/savings/addMemberToGSimAccount.html new file mode 100644 index 00000000..eb9a2034 --- /dev/null +++ b/app/views/savings/addMemberToGSimAccount.html @@ -0,0 +1,136 @@ +
+ + + + +
+
+
+

{{'label.heading.gsimassociatenewmembers' | translate}}

+
+
+
+
+
+
+
+ +
+ +
+
+
+
+

{{client.id}} : {{client.name}}: {{client.officeName}}

+
+ + + + + + + + + + + + + + + +
+ + + +
+ + + + +
+ + +
+   + + +
+
+ +
+ + +
+ +
+
+
+
+
+ {{'label.heading.gsimAccountMember' | translate}} +
+
+ +
+
+
+
+ +
+ +
+
+
\ No newline at end of file diff --git a/app/views/savings/addnewsavingscharge.html b/app/views/savings/addnewsavingscharge.html index de4348a4..39710775 100644 --- a/app/views/savings/addnewsavingscharge.html +++ b/app/views/savings/addnewsavingscharge.html @@ -27,10 +27,27 @@ class="required">*
- - + +
+
+ + +
+ + +
+
+
+ + +
+ + +
+
+
diff --git a/app/views/savings/addsavingsdocument.html b/app/views/savings/addsavingsdocument.html new file mode 100644 index 00000000..c24242c1 --- /dev/null +++ b/app/views/savings/addsavingsdocument.html @@ -0,0 +1,54 @@ +
+ +
+ +
+ {{'label.heading.uploadsavingsdocument' | translate}} +
+ + +
+ +
+
+ +
+
+ +
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+ + + + +
+
+
+
diff --git a/app/views/savings/documents.html b/app/views/savings/documents.html new file mode 100644 index 00000000..65733284 --- /dev/null +++ b/app/views/savings/documents.html @@ -0,0 +1,41 @@ +
+ +
+
+
+

{{ 'label.heading.accountdocuments' | translate }}

+
+ + + + + + + + + + + + + + + + + + +
{{'label.heading.name' | translate}}{{'label.heading.description' | translate}}{{'label.heading.filename' | translate}}{{'label.heading.actions' | translate}}
{{document.name}}{{document.description}}{{document.fileName}} +   + + +
+ +
+
+
diff --git a/app/views/savings/edit_gsim_account_application.html b/app/views/savings/edit_gsim_account_application.html index 4c2dc9e7..d601e1fd 100644 --- a/app/views/savings/edit_gsim_account_application.html +++ b/app/views/savings/edit_gsim_account_application.html @@ -1,296 +1,307 @@ -
-
- -
- -
-
- {{ 'label.heading.editsavingapplication' | translate }} - - - - - - - - - - - - - -
- - - - - - - -
- - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - - - - - -
- - - - -
- - -
- - - - - - -
-   - -
-
-   - -
-  {{ 'label.input.allowoverdraft' | translate }}  - - - -
- - - - - -
-  {{ 'label.input.enforceMinRequiredBalance' | translate }}  - - - -
{{'label.heading.minbalanceforinterestcalculation' | translate}}
-  {{ 'label.input.withholdtax' | translate }}  - - - {{data.taxGroup.name}} -
-
- - - - - - {{'label.'+labelchargeerror | translate}} - - - - - - - - - - - - - - - - - - - - - - - - - -
{{'label.heading.name' | translate}}{{'label.heading.type' | translate}}{{'label.heading.amount' | translate}}{{'label.heading.collectedon' | translate}}{{'label.heading.date' | translate}}{{'label.heading.repaymentsevery' | translate}}{{'label.heading.actions' | translate}}
{{charge.name}},{{charge.currency.displaySymbol}}{{charge.chargeCalculationType.value}}{{charge.chargeTimeType.value}} - - - - - - - -
-
-
- - -
- -
-
-
+
+
+ +
+ +
+
+ {{ 'label.heading.editsavingapplication' | translate }} + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + +
+ + + + +
+ + +
+ + + + + + +
+   + +
+
+   + +
+  {{ 'label.input.allowoverdraft' | translate }}  + + + +
+ + + + + +
+  {{ 'label.input.enforceMinRequiredBalance' | translate }}  + + + +
{{'label.heading.minbalanceforinterestcalculation' | translate}}
+  {{ 'label.input.withholdtax' | translate }}  + + + {{data.taxGroup.name}} +
+ + + + + + +
+
+ + + + + + {{'label.'+labelchargeerror | translate}} + + + + + + + + + + + + + + + + + + + + + + + + + +
{{'label.heading.name' | translate}}{{'label.heading.type' | translate}}{{'label.heading.amount' | translate}}{{'label.heading.collectedon' | translate}}{{'label.heading.date' | translate}}{{'label.heading.repaymentsevery' | translate}}{{'label.heading.actions' | translate}}
{{charge.name}},{{charge.currency.displaySymbol}}{{charge.chargeCalculationType.value}}{{charge.chargeTimeType.value}} + + + + + + + +
+
+
+ + +
+ +
+
+
diff --git a/app/views/savings/edit_saving_account_application.html b/app/views/savings/edit_saving_account_application.html index a99e2b29..792b8d43 100755 --- a/app/views/savings/edit_saving_account_application.html +++ b/app/views/savings/edit_saving_account_application.html @@ -72,6 +72,10 @@

{{ 'label.heading.editsavingapplication' | translate }}

+ +
+
+ + +
+
+
+ + + + + + + + +
+
+
+ + + + + + + + + + + + + +
{{'label.heading.floatinginterestrate.valid.fromDate' | translate}}{{'label.heading.floatinginterestrate.valid.endDate' | translate}}{{'label.heading.floatinginterestrate.floatingInterestRate' | translate}}
{{ floatingInterestRate.fromDate | DateFormat}} {{ floatingInterestRate.endDate | DateFormat}} {{ floatingInterestRate.floatingInterestRate }}
+ + +
+
+
+ + - - - - - @@ -159,6 +193,24 @@

{{ 'label.heading.editsavingapplication' | translate }}

+ + + + + + + + + + + + + + + + + + + - + + + + + + + + + @@ -386,7 +398,48 @@

{{'label.heading.availableBalance' | translate}}: {{savingaccountdetails.cur

+ + + + + + + + + + + + +
@@ -97,15 +140,6 @@

{{ 'label.heading.editsavingapplication' | translate }}

value="{{type.id}}" class="form-control width170px">
- - -
+ + +
+ + +
  @@ -224,6 +276,15 @@

{{ 'label.heading.editsavingapplication' | translate }}

{{'label.heading.minbalanceforinterestcalculation' | translate}} {{data.minBalanceForInterestCalculation}}
{{'label.heading.numberOfCreditTransactions' | translate}} {{data.numOfCreditTransaction}}
{{'label.heading.numberOfDebitTransactions' | translate}} {{data.numOfDebitTransaction}}
diff --git a/app/views/savings/gsimapplication.html b/app/views/savings/gsimapplication.html index 54f5ea30..dad20e29 100644 --- a/app/views/savings/gsimapplication.html +++ b/app/views/savings/gsimapplication.html @@ -1,416 +1,426 @@ -
-
- -
-
-
-
-
- -
- -
-
-
-
-
-
- -
- {{ 'label.heading.gsimaccount' | translate }} - - - - - - - - - - - - - -
- - - - - - - -
- - - - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - - - - - -
- - - - -
- - -
- - - - - - -
-   - -
-
-   - -
-  {{ 'label.input.allowoverdraft' | translate }}  - - - -
- - - - - -
-  {{ 'label.input.enforceMinRequiredBalance' | translate }}  - - - -
{{'label.heading.minbalanceforinterestcalculation' | translate}}{{data.minBalanceForInterestCalculation | number}}
-  {{ 'label.input.withholdtax' | translate }}  - - - {{data.taxGroup.name}} -
- - -
- - - - - - - - - - - - - - - - - -
{{'label.heading.clientid' | translate}}{{'label.heading.clientname' | translate}}
- - {{client.id}}{{client.displayName}}
-
- -
- - - - - - {{'label.'+labelchargeerror | translate}} - - - - - - - - - - - - - - - - - - - - - -
{{'label.heading.name' | translate}}{{'label.heading.type' | translate}}{{'label.heading.amount' | translate}}{{'label.heading.collectedon' | translate}}{{'label.heading.date' | translate}}{{'label.heading.repaymentsevery' | translate}}{{'label.heading.actions' | translate}}
{{charge.name}},{{charge.currency.displaySymbol}}{{charge.chargeCalculationType.value}}{{charge.chargeTimeType.value}} - - - - - - - -
-
-
- -
- - -
-
-
-
-
-
- -
- -
-

{{datatable.registeredTableName}}

-
-
- - -
- - -
-
- -
-
- -
-
-
- - -
- - - - -
-
-
- -
-
- {{'label.button.cancel' | translate}} - - -
-
-
-
-
-
-
-
-
-
+
+
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+ +
+ {{ 'label.heading.gsimaccount' | translate }} + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + +
+ + + + +
+ + +
+ + + + + + +
+   + +
+
+   + +
+  {{ 'label.input.allowoverdraft' | translate }}  + + + +
+ + + + + +
+  {{ 'label.input.enforceMinRequiredBalance' | translate }}  + + + +
{{'label.heading.minbalanceforinterestcalculation' | translate}}{{data.minBalanceForInterestCalculation | number}}
+  {{ 'label.input.withholdtax' | translate }}  + + + {{data.taxGroup.name}} +
+ + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + +
{{'label.heading.clientid' | translate}}{{'label.heading.clientname' | translate}}
+ + {{client.id}}{{client.displayName}}
+
+ +
+ + + + + + {{'label.'+labelchargeerror | translate}} + + + + + + + + + + + + + + + + + + + + + +
{{'label.heading.name' | translate}}{{'label.heading.type' | translate}}{{'label.heading.amount' | translate}}{{'label.heading.collectedon' | translate}}{{'label.heading.date' | translate}}{{'label.heading.repaymentsevery' | translate}}{{'label.heading.actions' | translate}}
{{charge.name}},{{charge.currency.displaySymbol}}{{charge.chargeCalculationType.value}}{{charge.chargeTimeType.value}} + + + + + + + +
+
+
+ +
+ + +
+
+
+
+
+
+ +
+ +
+

{{datatable.registeredTableName}}

+
+
+ + +
+ + +
+
+ +
+
+ +
+
+
+ + +
+ + + + +
+
+
+ +
+
+ {{'label.button.cancel' | translate}} + + +
+
+
+
+
+
+
+
+
+
diff --git a/app/views/savings/new_saving_account_application.html b/app/views/savings/new_saving_account_application.html index 4fbb3251..1b8bce19 100755 --- a/app/views/savings/new_saving_account_application.html +++ b/app/views/savings/new_saving_account_application.html @@ -99,7 +99,7 @@ {{data.currency.decimalPlaces}} -
+
@@ -110,19 +110,40 @@
-
+
+ -
- +
+ +
+
+
+
+ + + + + + + + + + + +
{{'label.heading.floatinginterestrate.valid.fromDate' | translate}}{{'label.heading.floatinginterestrate.valid.endDate' | translate}}{{'label.heading.floatinginterestrate.floatingInterestRate' | translate}}
{{ floatingInterestRate.fromDate | DateFormat}} {{ floatingInterestRate.endDate | DateFormat}} {{ floatingInterestRate.floatingInterestRate }}
- +
- +
+
+ +
+ +
+
+ +
+ +
+ +
+ +
+ +
+
+
  @@ -208,6 +255,15 @@
+
+
+ +
+
+ +
+
  @@ -234,10 +290,18 @@
-
+
{{'label.heading.minbalanceforinterestcalculation' | translate}}
{{data.minBalanceForInterestCalculation | number}}
+
+
{{'label.heading.numberOfCreditTransactions' | translate}}
+
{{data.numOfCreditTransaction | number}}
+
+
+
{{'label.heading.numberOfDebitTransactions' | translate}}
+
{{data.numOfDebitTransaction | number}}
+
  diff --git a/app/views/savings/saving_account_actions.html b/app/views/savings/saving_account_actions.html index 35c9420d..e3da52eb 100644 --- a/app/views/savings/saving_account_actions.html +++ b/app/views/savings/saving_account_actions.html @@ -5,7 +5,7 @@ -
+
Entry in ` {{table}} ` has been made successfully. If the inputs are changed, the entries will be updated.
@@ -66,7 +66,7 @@
-
+
@@ -77,6 +77,28 @@
+
+ + + +
+ +
+
+
+ +
+ +
+
+
@@ -148,6 +170,14 @@
+
+ + +
+ +
+
@@ -179,14 +209,86 @@
-
+
+
+
+
+
+ + +
+
+ + +
+ +
+
+ +
+ + + + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ {{'label.heading.updatedon' | translate}} + + {{'label.heading.updatedby' | translate}} + + {{'label.heading.type' | translate}} + + {{'label.blockNarration' | translate}} + + {{'label.input.pndComment' | translate}} +
{{blockNarrationHistory.blockNarrationDateString}}{{blockNarrationHistory.submittedByUsername}}{{blockNarrationHistory.subStatus}}{{blockNarrationHistory.blockNarrationValue}}{{blockNarrationHistory.blockNarrationComment}}
+
+ + +
diff --git a/app/views/savings/view_saving_account_details.html b/app/views/savings/view_saving_account_details.html old mode 100755 new mode 100644 index b9a10174..d0c2fffb --- a/app/views/savings/view_saving_account_details.html +++ b/app/views/savings/view_saving_account_details.html @@ -214,12 +214,18 @@

{{'label.heading.availableBalance' | translate}}: {{savingaccountdetails.cur

{{'label.interestrate' | translate}} {{savingaccountdetails.nominalAnnualInterestRate}}%
{{'label.input.usefloatinginterestrate' | translate}}{{savingaccountdetails.useFloatingInterestRate}} +
{{'label.interestcompoundingperiod' | translate}} @@ -269,6 +275,12 @@

{{'label.heading.availableBalance' | translate}}: {{savingaccountdetails.cur

{{savingaccountdetails.subStatus.value}}
{{'label.blockNarration' | translate}} + {{savingaccountdetails.blockNarration.name}} +
{{'label.daysToInactive' | translate}} {{savingaccountdetails.taxGroup.name}}
+ {{'label.heading.withdrawalFrequency' | + translate}} + {{savingaccountdetails.withdrawalFrequency | number}} {{savingaccountdetails.withdrawalFrequencyEnum.value}} +
+ {{'label.heading.previousFlexWithdrawalDate' | + translate}} + {{savingaccountdetails.previousFlexWithdrawalDate | DateFormat}} +
+ {{'label.heading.nextFlexWithdrawalDate' | + translate}} + {{savingaccountdetails.nextFlexWithdrawalDate | DateFormat}} +
+ + + + + + + + + + + + + + +
{{'label.heading.floatinginterestrate' | translate}}
{{'label.heading.floatinginterestrate.valid.fromDate' | translate}}{{'label.heading.floatinginterestrate.valid.endDate' | translate}}{{'label.heading.floatinginterestrate.floatingInterestRate' | translate}}
{{ floatingInterestRate.fromDate | DateFormat}} {{ floatingInterestRate.endDate | DateFormat}} {{ floatingInterestRate.floatingInterestRate }}
+
@@ -464,6 +517,10 @@

{{'label.heading.availableBalance' | translate}}: {{savingaccountdetails.cur ng-click="viewJournalEntries()" style="margin-right: 8px;"> {{'label.button.viewjournalentries' | translate}} +

@@ -478,6 +535,12 @@

{{'label.heading.availableBalance' | translate}}: {{savingaccountdetails.cur

+ + @@ -487,45 +550,59 @@

{{'label.heading.availableBalance' | translate}}: {{savingaccountdetails.cur

+ - + + + +
{{'label.heading.transactiontype' | translate}} + {{'label.heading.transactorName' | translate}} + + {{'label.heading.transactorPhoneNumber' | translate}} + {{'label.heading.debit' | translate}} {{'label.heading.balance' | translate}} + {{'label.heading.doneBy' | translate}} + {{'label.heading.viewreceipts' | translate}}
+ data-ng-click="routeTo(transaction.accountId,transaction.id,transaction.transfer,transaction.transfer.id,transaction.transactionType.value)"> {{transaction.id}} + data-ng-click="routeTo(transaction.accountId,transaction.id,transaction.transfer,transaction.transfer.id,transaction.transactionType.value)"> {{transaction.date | DateFormat}} + data-ng-click="routeTo(transaction.accountId,transaction.id,transaction.transfer,transaction.transfer.id,transaction.transactionType.value)"> {{transaction.transactionType.value}}(R) + data-ng-click="routeTo(transaction.accountId,transaction.id,transaction.transfer,transaction.transfer.id,transaction.transactionType.value)" data-ng-show="isGroupLoan"> + {{transaction.paymentDetailData.transactorName}} + + {{transaction.paymentDetailData.transactorPhoneNumber}} +
{{transaction.amount| number}}
+ data-ng-click="routeTo(transaction.accountId,transaction.id,transaction.transfer,transaction.transfer.id,transaction.transactionType.value)">
{{transaction.amount| number}}
+ data-ng-click="routeTo(transaction.accountId,transaction.id,transaction.transfer,transaction.transfer.id,transaction.transactionType.value)"> {{transaction.runningBalance| number}} + {{transaction.submittedByUsername}} + @@ -534,6 +611,10 @@

{{'label.heading.availableBalance' | translate}}: {{savingaccountdetails.cur

+ +
+
diff --git a/app/views/savings/view_saving_transaction.html b/app/views/savings/view_saving_transaction.html index 1dfe2097..d65a076f 100644 --- a/app/views/savings/view_saving_transaction.html +++ b/app/views/savings/view_saving_transaction.html @@ -18,6 +18,17 @@

{{'label.button.undo' | translate}}

+

@@ -29,7 +40,8 @@

{{ 'label.heading.transactiondetails' | translate}}

href="#/savingaccount/{{transaction.accountId}}/modifytransaction?transactionId={{transaction.id}}" class="btn btn-primary">{{ 'label.button.edit' | translate}} {{ 'label.button.undo' | translate}} + class="fa fa-trash-o ">
{{ 'label.button.undo' | translate}}  + {{ 'label.button.releaseamount' | translate}}
diff --git a/app/views/savings/view_savings_account_accruals.html b/app/views/savings/view_savings_account_accruals.html new file mode 100644 index 00000000..e7ed2dad --- /dev/null +++ b/app/views/savings/view_savings_account_accruals.html @@ -0,0 +1,105 @@ +
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
{{'label.heading.id' | + translate}} + + {{'label.heading.transactiondate' | translate}} + + {{'label.heading.transactiontype' | translate}} + {{'label.heading.debit' | + translate}} + {{'label.heading.credit' + | translate}} + + {{'label.heading.balance' | translate}} + + {{'label.heading.viewreceipts' | translate}} +
+ {{transaction.id}} + + {{transaction.date | DateFormat}} + + {{transaction.transactionType.value}} + +
+ {{transaction.amount| number}} +
+
+
+ {{transaction.amount| number}} +
+
+ {{transaction.runningBalance| number}} + + + +
+ + + +
+ +
+ +
+ +
+ +
+
+
\ No newline at end of file diff --git a/app/views/system/addhook.html b/app/views/system/addhook.html index d8bf34bb..07def4a8 100644 --- a/app/views/system/addhook.html +++ b/app/views/system/addhook.html @@ -48,10 +48,12 @@

{{'label.heading.createhook' | translate}}

-
- - - +
+ + + + +
diff --git a/app/views/system/audit.html b/app/views/system/audit.html index 326b239a..4732d5ae 100644 --- a/app/views/system/audit.html +++ b/app/views/system/audit.html @@ -37,6 +37,7 @@
+ + +
+
diff --git a/app/views/system/makedatatableentry.html b/app/views/system/makedatatableentry.html index 475ebc88..f0fc4763 100644 --- a/app/views/system/makedatatableentry.html +++ b/app/views/system/makedatatableentry.html @@ -33,7 +33,7 @@

{{ 'label.heading.datatablename' | translate }}-{{tableName}}
-
diff --git a/app/views/system/viewdatatableentry.html b/app/views/system/viewdatatableentry.html index 9d7e069a..535b2c05 100644 --- a/app/views/system/viewdatatableentry.html +++ b/app/views/system/viewdatatableentry.html @@ -63,7 +63,7 @@

{{ 'label.heading.editdatatableentry' | translate }}

is-open="opened{{$index}}" class="form-control"/>
-
diff --git a/app/views/tasks.html b/app/views/tasks.html index 31f3262e..46c1d804 100644 --- a/app/views/tasks.html +++ b/app/views/tasks.html @@ -168,7 +168,7 @@

{{'label.heading.approve' | translate}}

template-url="bower_components/angular-utils-pagination/dirPagination.tpl.html"/> - +
@@ -258,7 +258,686 @@

{{'label.heading.enterclientsactivationdate' | - + + +
+

+ + + + + + +
+ + + +
+
+ +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + +
{{'label.heading.client' | translate}}{{'label.heading.loan' | translate}}{{'label.heading.amount' | translate}}{{'label.heading.loanpurpose' | translate}}
{{loan.clientName}} + {{loan.loanProductName}}({{loan.accountNo}}) + {{loan.principal | number}}{{loan.loanPurposeName}}
+
+
+ +
+
+
+ +
+ + + + + + + +
+ + + +
+
+ +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + +
{{'label.heading.client' | translate}}{{'label.heading.loan' | translate}}{{'label.heading.amount' | translate}}{{'label.heading.loanpurpose' | translate}}
{{loan.clientName}} + {{loan.loanProductName}}({{loan.accountNo}}) + {{loan.principal | number}}{{loan.loanPurposeName}}
+
+
+ +
+
+
+ +
+ + + + + + + +
+ + + +
+
+ +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + +
{{'label.heading.client' | translate}}{{'label.heading.loan' | translate}}{{'label.heading.amount' | translate}}{{'label.heading.loanpurpose' | translate}}
{{loan.clientName}} + {{loan.loanProductName}}({{loan.accountNo}}) + {{loan.principal | number}}{{loan.loanPurposeName}}
+
+
+ +
+
+
+ + +
+ + + + + + + +
+ + + +
+
+ +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + +
{{'label.heading.client' | translate}}{{'label.heading.loan' | translate}}{{'label.heading.amount' | translate}}{{'label.heading.loanpurpose' | translate}}
{{loan.clientName}} + {{loan.loanProductName}}({{loan.accountNo}}) + {{loan.principal | number}}{{loan.loanPurposeName}}
+
+
+ +
+
+
+ +
+ + + + + + + +
+ + + +
+
+ +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + +
{{'label.heading.client' | translate}}{{'label.heading.loan' | translate}}{{'label.heading.amount' | translate}}{{'label.heading.loanpurpose' | translate}}
{{loan.clientName}} + {{loan.loanProductName}}({{loan.accountNo}}) + {{loan.principal | number}}{{loan.loanPurposeName}}
+
+
+ +
+
+
+ +
+ + + + + + + +
+ + + +
+
+ +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + +
{{'label.heading.client' | translate}}{{'label.heading.loan' | translate}}{{'label.heading.amount' | translate}}{{'label.heading.loanpurpose' | translate}}
{{loan.clientName}} + {{loan.loanProductName}}({{loan.accountNo}}) + {{loan.principal | number}}{{loan.loanPurposeName}}
+
+
+ +
+
+
+ +
+ + + + + + + +
+ + + +
+
+ +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + +
{{'label.heading.client' | translate}}{{'label.heading.loan' | translate}}{{'label.heading.amount' | translate}}{{'label.heading.loanpurpose' | translate}}
{{loan.clientName}} + {{loan.loanProductName}}({{loan.accountNo}}) + {{loan.principal | number}}{{loan.loanPurposeName}}
+
+
+ +
+
+
+ +
+ + + + + + + +
+ + + +
+
+ +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + +
{{'label.heading.client' | translate}}{{'label.heading.loan' | translate}}{{'label.heading.amount' | translate}}{{'label.heading.loanpurpose' | translate}}
{{loan.clientName}} + {{loan.loanProductName}}({{loan.accountNo}}) + {{loan.principal | number}}{{loan.loanPurposeName}}
+
+
+ +
+
+
+ + +
+ + + + + + + +
+ + + +
+
+ +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + +
{{'label.heading.client' | translate}}{{'label.heading.loan' | translate}}{{'label.heading.amount' | translate}}{{'label.heading.loanpurpose' | translate}}
{{loan.clientName}} + {{loan.loanProductName}}({{loan.accountNo}}) + {{loan.principal | number}}{{loan.loanPurposeName}}
+
+
+ +
+
+
+ +
@@ -335,7 +1014,7 @@

{{'label.heading.approve' | translate}}

- +
@@ -400,7 +1079,6 @@

{{'label.heading.rescheduleloan' | translate}}

template-url="bower_components/angular-utils-pagination/dirPagination.tpl.html"/> -
diff --git a/conf/ca-bundle.pem b/conf/ca-bundle.pem new file mode 100644 index 00000000..5698b601 --- /dev/null +++ b/conf/ca-bundle.pem @@ -0,0 +1,96 @@ +-----BEGIN CERTIFICATE----- +MIIGHzCCBQegAwIBAgISBCHHXN5pV24n9RYnBhqLXfoJMA0GCSqGSIb3DQEBCwUA +MDIxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQD +EwJSMzAeFw0yMTEwMjcwOTE4MTdaFw0yMjAxMjUwOTE4MTZaMBcxFTATBgNVBAMM +DCoucmV2dmluZy5pbzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKuo +yCJxvXuKYnNpp8N5ZcFLN6p1TRXxx1wIc/s7OH1JrjHEkAsa3o4JcbYTQelCI0wC +qCurwe5OVo+g1o1couKCW+nMmLzY6puOUwJUFaElk3BHbf/AdR6x/wJFfYuqucPh +ghG+vyG/Ymg+R0WvKvL6GHpCRSILrSzBcsVtk7zcHVKK8FHweEtyqQiZ+dmFdaMB +fO4a73YZBFuzdmraV65fLUWzJPgxoxOY2F5galwFDlamLxGDIk7gTfAfxvSF7pNf +7Gj4CdgepCCkWYhxApJp49wdZHk4ZHorbP0TKwH8M2H8ANYCf3A65E6QxJbk38+t +LuHAeCQ48HfX4+sGavujllX2vJc+whjwphnuIoWMHzau9KFQfK9xPCnFGiQ9gYkJ +B9ofkb3Sbji7LngjJBebqDE8FyAAdyf8aQb5MDaJK+lcz1V+jHrO8mBt6P2cmhr6 +/HKRBxhA20ObIzCa50VW6SNfXUOABXDt8lD+/5/N3nI/AHUBUb7cTL8YNvivTH2m +ge1XoCTKGS+761IR7Ecrucj7/6RmGaRWCN7S6G889Vi9Z4Bxc/t76ieRmnuarNju +DAS2/fgkS++6aaqFrUoBN28ZYyBSrq0Wzv5IGBAr4Bc6bOdVHMIZC7VQ6zZ3D2Fh ++S5oUQT1YfFaNoFfzv6m3bzWIOWaDFtjoOFYIqBnAgMBAAGjggJIMIICRDAOBgNV +HQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1Ud +EwEB/wQCMAAwHQYDVR0OBBYEFAdUmv7BrbqGpqojAC7mgvpHtTTdMB8GA1UdIwQY +MBaAFBQusxe3WFbLrlAJQOYfr52LFMLGMFUGCCsGAQUFBwEBBEkwRzAhBggrBgEF +BQcwAYYVaHR0cDovL3IzLm8ubGVuY3Iub3JnMCIGCCsGAQUFBzAChhZodHRwOi8v +cjMuaS5sZW5jci5vcmcvMBcGA1UdEQQQMA6CDCoucmV2dmluZy5pbzBMBgNVHSAE +RTBDMAgGBmeBDAECATA3BgsrBgEEAYLfEwEBATAoMCYGCCsGAQUFBwIBFhpodHRw +Oi8vY3BzLmxldHNlbmNyeXB0Lm9yZzCCAQUGCisGAQQB1nkCBAIEgfYEgfMA8QB2 +AN+lXqtogk8fbK3uuF9OPlrqzaISpGpejjsSwCBEXCpzAAABfMFB9AsAAAQDAEcw +RQIhALWiFDd8+uY80KcD0Bbb2aXyjImVLXdh3NJ1fRsG1RN2AiBQft6wyM37rs0T +GPzU1f0UWakAMkOxlAY8zbOfxukcOQB3AEalVet1+pEgMLWiiWn0830RLEF0vv1J +uIWr8vxw/m1HAAABfMFB9DQAAAQDAEgwRgIhAJ3Vzp+OhuokYOt1a4h4Gc/r334C +3ziIvQyzFcykeAoRAiEA7ypre0/gxFpj7q6/mO/qiFqn7amYbjRhpRHKHq+WhM4w +DQYJKoZIhvcNAQELBQADggEBAIj1fxsoVooWYz/umhaoeV3jti+1gOy4IdD+v89M +OLFv85BG1xpU8oP9ej97NTnUL0vSTZXtFXr6h6Qh3v/dqVGs2I1K8FRTSjxHi9JI +85jd82MXSBRVlumKHXpJZoSSITh+NqQYfrurxFRVH2pyFHzd6gmxHWaMRz90bNyh +Bjwv0UeIsRfbzV+USP5NERbxU9ADK/5f2/uo1+drCpGUY3hfJtziC5De78X8M+OH +fq9eb/RlnQ+NsHia85cuMtQY4l6Rk/bfbXdk7SiqNiBW1gaD8JF04tLDqGk9oI6h +CPEeRy3iiPSXJqy56u/be9UDMDgBjKUVkUNV1cntSh8Kego= +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw +TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh +cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMjAwOTA0MDAwMDAw +WhcNMjUwOTE1MTYwMDAwWjAyMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNTGV0J3Mg +RW5jcnlwdDELMAkGA1UEAxMCUjMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK +AoIBAQC7AhUozPaglNMPEuyNVZLD+ILxmaZ6QoinXSaqtSu5xUyxr45r+XXIo9cP +R5QUVTVXjJ6oojkZ9YI8QqlObvU7wy7bjcCwXPNZOOftz2nwWgsbvsCUJCWH+jdx +sxPnHKzhm+/b5DtFUkWWqcFTzjTIUu61ru2P3mBw4qVUq7ZtDpelQDRrK9O8Zutm +NHz6a4uPVymZ+DAXXbpyb/uBxa3Shlg9F8fnCbvxK/eG3MHacV3URuPMrSXBiLxg +Z3Vms/EY96Jc5lP/Ooi2R6X/ExjqmAl3P51T+c8B5fWmcBcUr2Ok/5mzk53cU6cG +/kiFHaFpriV1uxPMUgP17VGhi9sVAgMBAAGjggEIMIIBBDAOBgNVHQ8BAf8EBAMC +AYYwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMBMBIGA1UdEwEB/wQIMAYB +Af8CAQAwHQYDVR0OBBYEFBQusxe3WFbLrlAJQOYfr52LFMLGMB8GA1UdIwQYMBaA +FHm0WeZ7tuXkAXOACIjIGlj26ZtuMDIGCCsGAQUFBwEBBCYwJDAiBggrBgEFBQcw +AoYWaHR0cDovL3gxLmkubGVuY3Iub3JnLzAnBgNVHR8EIDAeMBygGqAYhhZodHRw +Oi8veDEuYy5sZW5jci5vcmcvMCIGA1UdIAQbMBkwCAYGZ4EMAQIBMA0GCysGAQQB +gt8TAQEBMA0GCSqGSIb3DQEBCwUAA4ICAQCFyk5HPqP3hUSFvNVneLKYY611TR6W +PTNlclQtgaDqw+34IL9fzLdwALduO/ZelN7kIJ+m74uyA+eitRY8kc607TkC53wl +ikfmZW4/RvTZ8M6UK+5UzhK8jCdLuMGYL6KvzXGRSgi3yLgjewQtCPkIVz6D2QQz +CkcheAmCJ8MqyJu5zlzyZMjAvnnAT45tRAxekrsu94sQ4egdRCnbWSDtY7kh+BIm +lJNXoB1lBMEKIq4QDUOXoRgffuDghje1WrG9ML+Hbisq/yFOGwXD9RiX8F6sw6W4 +avAuvDszue5L3sz85K+EC4Y/wFVDNvZo4TYXao6Z0f+lQKc0t8DQYzk1OXVu8rp2 +yJMC6alLbBfODALZvYH7n7do1AZls4I9d1P4jnkDrQoxB3UqQ9hVl3LEKQ73xF1O +yK5GhDDX8oVfGKF5u+decIsH4YaTw7mP3GFxJSqv3+0lUFJoi5Lc5da149p90Ids +hCExroL1+7mryIkXPeFM5TgO9r0rvZaBFOvV2z0gp35Z0+L4WPlbuEjN/lxPFin+ +HlUjr8gRsI3qfJOQFy/9rKIJR0Y/8Omwt/8oTWgy1mdeHmmjk7j1nYsvC9JSQ6Zv +MldlTTKB3zhThV1+XWYp6rjd5JW1zbVWEkLNxE7GJThEUG3szgBVGP7pSWTUTsqX +nLRbwHOoq7hHwg== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIFYDCCBEigAwIBAgIQQAF3ITfU6UK47naqPGQKtzANBgkqhkiG9w0BAQsFADA/ +MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT +DkRTVCBSb290IENBIFgzMB4XDTIxMDEyMDE5MTQwM1oXDTI0MDkzMDE4MTQwM1ow +TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh +cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwggIiMA0GCSqGSIb3DQEB +AQUAA4ICDwAwggIKAoICAQCt6CRz9BQ385ueK1coHIe+3LffOJCMbjzmV6B493XC +ov71am72AE8o295ohmxEk7axY/0UEmu/H9LqMZshftEzPLpI9d1537O4/xLxIZpL +wYqGcWlKZmZsj348cL+tKSIG8+TA5oCu4kuPt5l+lAOf00eXfJlII1PoOK5PCm+D +LtFJV4yAdLbaL9A4jXsDcCEbdfIwPPqPrt3aY6vrFk/CjhFLfs8L6P+1dy70sntK +4EwSJQxwjQMpoOFTJOwT2e4ZvxCzSow/iaNhUd6shweU9GNx7C7ib1uYgeGJXDR5 +bHbvO5BieebbpJovJsXQEOEO3tkQjhb7t/eo98flAgeYjzYIlefiN5YNNnWe+w5y +sR2bvAP5SQXYgd0FtCrWQemsAXaVCg/Y39W9Eh81LygXbNKYwagJZHduRze6zqxZ +Xmidf3LWicUGQSk+WT7dJvUkyRGnWqNMQB9GoZm1pzpRboY7nn1ypxIFeFntPlF4 +FQsDj43QLwWyPntKHEtzBRL8xurgUBN8Q5N0s8p0544fAQjQMNRbcTa0B7rBMDBc +SLeCO5imfWCKoqMpgsy6vYMEG6KDA0Gh1gXxG8K28Kh8hjtGqEgqiNx2mna/H2ql +PRmP6zjzZN7IKw0KKP/32+IVQtQi0Cdd4Xn+GOdwiK1O5tmLOsbdJ1Fu/7xk9TND +TwIDAQABo4IBRjCCAUIwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw +SwYIKwYBBQUHAQEEPzA9MDsGCCsGAQUFBzAChi9odHRwOi8vYXBwcy5pZGVudHJ1 +c3QuY29tL3Jvb3RzL2RzdHJvb3RjYXgzLnA3YzAfBgNVHSMEGDAWgBTEp7Gkeyxx ++tvhS5B1/8QVYIWJEDBUBgNVHSAETTBLMAgGBmeBDAECATA/BgsrBgEEAYLfEwEB +ATAwMC4GCCsGAQUFBwIBFiJodHRwOi8vY3BzLnJvb3QteDEubGV0c2VuY3J5cHQu +b3JnMDwGA1UdHwQ1MDMwMaAvoC2GK2h0dHA6Ly9jcmwuaWRlbnRydXN0LmNvbS9E +U1RST09UQ0FYM0NSTC5jcmwwHQYDVR0OBBYEFHm0WeZ7tuXkAXOACIjIGlj26Ztu +MA0GCSqGSIb3DQEBCwUAA4IBAQAKcwBslm7/DlLQrt2M51oGrS+o44+/yQoDFVDC +5WxCu2+b9LRPwkSICHXM6webFGJueN7sJ7o5XPWioW5WlHAQU7G75K/QosMrAdSW +9MUgNTP52GE24HGNtLi1qoJFlcDyqSMo59ahy2cI2qBDLKobkx/J3vWraV0T9VuG +WCLKTVXkcGdtwlfFRjlBz4pYg1htmf5X6DYO8A4jqv2Il9DjXA6USbW1FzXSLr9O +he8Y4IWS6wY7bCkjCWDcRQJMEhg76fsO3txE+FiYruq9RUWhiF1myv4Q6W+CyBFC +Dfvp7OOGAN6dEOM4+qR9sdjoSYKEBpsr6GtPAQw4dy753ec5 +-----END CERTIFICATE----- diff --git a/conf/default.conf b/conf/default.conf new file mode 100644 index 00000000..784e6854 --- /dev/null +++ b/conf/default.conf @@ -0,0 +1,36 @@ +server { + listen 80 default_server; + listen [::]:80 default_server; + server_name _; + + server_tokens off; + + proxy_cookie_path / "/; HttpOnly; Secure"; + + location / { + root /usr/share/nginx/html; + try_files $uri $uri/ /index.html; + } + + location ^~ /_health { + types { } default_type "text/plain; charset=utf-8"; + return 200 "UP"; + } + + location /v1/ { + error_log /var/log/nginx/error.log error; + access_log off; + + proxy_pass http://fih:8080/v1/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Host $host:$server_port; + proxy_set_header X-Forwarded-Server $host; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Real-IP $remote_addr; + #proxy_pass_header X-XSRF-TOKEN; + } +} \ No newline at end of file diff --git a/conf/default.conf.template b/conf/default.conf.template new file mode 100644 index 00000000..b7366245 --- /dev/null +++ b/conf/default.conf.template @@ -0,0 +1,74 @@ +#server { +# listen 80 default_server; +# listen [::]:80 default_server; +# server_name _; +# return 301 https://${DOLLAR}host${DOLLAR}request_uri; +#} + +# site + +server { + listen 80; + listen 443 default_server ssl http2; + listen [::]:443 ssl http2 default_server; + server_name ${FINERACT_DOMAIN}; + + server_tokens off; + + ssl_certificate /etc/ssl/keys/cert.pem; + ssl_certificate_key /etc/ssl/keys/key.pem; + + ssl_protocols TLSv1.2; + ssl_prefer_server_ciphers on; + ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"; + #ssl_ecdh_curve secp384r1; # Requires nginx >= 1.1.0 + ssl_ecdh_curve prime256v1; # FIX: Android 7.0 bug + ssl_session_cache shared:SSL:10m; + ssl_session_tickets off; # Requires nginx >= 1.5.9 + ssl_stapling on; # Requires nginx >= 1.3.7 + ssl_stapling_verify on; # Requires nginx => 1.3.7 + resolver 8.8.8.8 8.8.4.4 valid=300s; + resolver_timeout 5s; + add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"; + add_header X-Frame-Options DENY; + add_header X-Content-Type-Options nosniff; + add_header Access-Control-Allow_Credentials true; + add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range'; + add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH'; + + error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 420 422 423 424 426 428 429 431 444 449 450 451 500 501 502 503 504 505 506 507 508 509 510 511 /error.html; + + proxy_cookie_path / "/; HttpOnly; Secure"; + + location / { + root /usr/share/nginx/html; + } + + location ^~ /_health { + types { } default_type "text/plain; charset=utf-8"; + return 200 "UP"; + } + + location ^~ /self { + root /usr/share/nginx/html/self; + } + + location ${FINERACT_BASE_URL} { + error_log /var/log/nginx/error.log error; + access_log off; + + proxy_pass ${FINERACT_PROXY_URL}; + proxy_http_version 1.1; + proxy_ssl_server_name on; + proxy_read_timeout 600; + proxy_set_header Upgrade ${DOLLAR}http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host ${DOLLAR}host; + proxy_set_header X-Forwarded-Host ${DOLLAR}host:${DOLLAR}server_port; + proxy_set_header X-Forwarded-Server ${DOLLAR}host; + proxy_set_header X-Forwarded-Proto ${DOLLAR}scheme; + proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for; + proxy_set_header X-Real-IP ${DOLLAR}remote_addr; + #proxy_pass_header X-XSRF-TOKEN; + } +} \ No newline at end of file diff --git a/conf/default.conf.template.bak b/conf/default.conf.template.bak new file mode 100644 index 00000000..4e5bc445 --- /dev/null +++ b/conf/default.conf.template.bak @@ -0,0 +1,59 @@ +#server { + # listen 80 default_server; + # listen [::]:80 default_server; + # server_name _; + # return 301 https://${DOLLAR}host${DOLLAR}request_uri; + #} + + # site + + server { + listen 80; + + + resolver 8.8.8.8 8.8.4.4 valid=300s; + resolver_timeout 5s; + add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"; + add_header X-Frame-Options DENY; + add_header X-Content-Type-Options nosniff; + add_header Access-Control-Allow_Credentials true; + add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range'; + add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH'; + + error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 420 422 423 424 426 428 429 431 444 449 450 451 500 501 502 503 504 505 506 507 508 509 510 511 /error.html; + + proxy_cookie_path / "/; HttpOnly; Secure"; + + location / { + root /usr/share/nginx/html; + } + + location ^~ /_health { + types { } default_type "text/plain; charset=utf-8"; + return 200 "UP"; + } + + location ^~ /self { + root /usr/share/nginx/html/self; + } + + location ${FINERACT_BASE_URL} { + error_log /var/log/nginx/error.log error; + access_log off; + + proxy_pass ${FINERACT_PROXY_URL}; + proxy_http_version 1.1; + proxy_ssl_server_name on; + proxy_read_timeout 600; + proxy_set_header Upgrade ${DOLLAR}http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host ${DOLLAR}host; + proxy_set_header X-Forwarded-Host ${DOLLAR}host:${DOLLAR}server_port; + proxy_set_header X-Forwarded-Server ${DOLLAR}host; + proxy_set_header X-Forwarded-Proto ${DOLLAR}scheme; + proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for; + proxy_set_header X-Real-IP ${DOLLAR}remote_addr; + #proxy_pass_header X-XSRF-TOKEN; + } + } + diff --git a/conf/nginx.conf b/conf/nginx.conf new file mode 100644 index 00000000..5885bf7f --- /dev/null +++ b/conf/nginx.conf @@ -0,0 +1,31 @@ +user nginx; +worker_processes 1; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + + +events { + worker_connections 10000; +} + + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + include /etc/nginx/conf.d/*.conf; +} \ No newline at end of file diff --git a/conf/private-key.pem b/conf/private-key.pem new file mode 100644 index 00000000..e3ac0ac0 --- /dev/null +++ b/conf/private-key.pem @@ -0,0 +1,52 @@ +-----BEGIN PRIVATE KEY----- +MIIJRAIBADANBgkqhkiG9w0BAQEFAASCCS4wggkqAgEAAoICAQCrqMgicb17imJz +aafDeWXBSzeqdU0V8cdcCHP7Ozh9Sa4xxJALGt6OCXG2E0HpQiNMAqgrq8HuTlaP +oNaNXKLiglvpzJi82OqbjlMCVBWhJZNwR23/wHUesf8CRX2LqrnD4YIRvr8hv2Jo +PkdFryry+hh6QkUiC60swXLFbZO83B1SivBR8HhLcqkImfnZhXWjAXzuGu92GQRb +s3Zq2leuXy1FsyT4MaMTmNheYGpcBQ5Wpi8RgyJO4E3wH8b0he6TX+xo+AnYHqQg +pFmIcQKSaePcHWR5OGR6K2z9EysB/DNh/ADWAn9wOuROkMSW5N/PrS7hwHgkOPB3 +1+PrBmr7o5ZV9ryXPsIY8KYZ7iKFjB82rvShUHyvcTwpxRokPYGJCQfaH5G90m44 +uy54IyQXm6gxPBcgAHcn/GkG+TA2iSvpXM9Vfox6zvJgbej9nJoa+vxykQcYQNtD +myMwmudFVukjX11DgAVw7fJQ/v+fzd5yPwB1AVG+3Ey/GDb4r0x9poHtV6Akyhkv +u+tSEexHK7nI+/+kZhmkVgje0uhvPPVYvWeAcXP7e+onkZp7mqzY7gwEtv34JEvv +ummqha1KATdvGWMgUq6tFs7+SBgQK+AXOmznVRzCGQu1UOs2dw9hYfkuaFEE9WHx +WjaBX87+pt281iDlmgxbY6DhWCKgZwIDAQABAoICACPxEQZ1PjFRxk9X/fJlxrJ0 +J1GfgeZoW0+fzXj661cASGLPP0Gz/IlM3Ow8l/5ZBL7zh3atXcuhx2oHSSUMEmbO +2KPZXNmdqXGsmSDRrj2xem915Ug5acxlhHlbR3Ao7QBghTVl9OsCAX7GG3IxvRJm +3x0qJwN74mSOlJNV4CsZA2K3CJ5/dRCHD3Fnm/K5iOn6c8f/B8h4cHsq1k6FLPqr +nvULD2CQNA70X8lS8rIVtOzbmttV06ckO+1dGfE04cElwoAv/w+rSr4y6zQwRVOW +rEj4NoNTFWanFQjgLI8b2T5Y32vv1fMPwaHZme/mOB5pqnlGLWGYMnFFWMlq7Jcv +uxQkQSnahf9t4yjv48704QsA2KzfMYaxiEiTOrkrjGdzzhlMqhmqpirekT6zakgU +gR6f3LCnmy0I08ASuD5rqL4Y+uHI/crQ+TjmKW9QIVK2yweJUMT4ZqM12Sqm854e +8hgpuaWFYsnop2Np9T3kYZ7OTMcjhk5iJLsvjDnkAnkS8oXKUUyBzK3i2XgW+Q8T +iJb0p6nYILK2q+ZTm9whUb+/awqYFe6OiYg9LIkzITkmf4Kb29Kq1mZ7nJQ5/dWo +zMcJ9LeMOfefM4C9Gf4RqP2tQTrsFnAg2q3/SLKpJqKIcKd1l+D7jS89bQLMg82S +wVq+mpBxVWViksUIXhXRAoIBAQDdtRj6yBzNqwB55259Tfn8j70Jt/WierINsN9z +xczxwtm1NvjXAXCQ74LLpHbCUFvORMhyRDIJagmZBZ4x5MwB2IKat5W2gaz3qnVf +xpxlVTywLy8DM9B/Fn7/rIDaSGoUMC3IYfc3dUalFZQs/yaeZkvJDHh4oRub63nk +CF3o/clPcEffLP61Sa3VFYOQqnnWZaBRTfAjNoSgs8uXMG1gudOA2gyzDxvAnPoY +XM6TtobHQ+xjuturZLoHoPPiqozaujDsuQFjaYN40CACZV81+Spmo65gUo0isTz/ +vtQA9EBHirAEOO2O0zsfbpxWtERKl2IUlebEQMesdewulqGrAoIBAQDGNfCLLDiN +0tCaN8Uqq0yaHq6hjI/FxLAO06ybhP0k6SCtrCThEgfXRRJ05Cpo1LaQXDlrspt/ +zdzBebSNFNgd5Y7y4Qj0CpVynIuCgVl2ifR9qc+ePK6uCadh9VC3NnlOItTCHkYS +AbhEu9Oq7HB/qaQ9/gixLypjbso3lqRSe67UJb50QCCc+n9C5ZJ/mAetw+ZzkoBw +NipapuHqX9fTF94EpNjDuErYvT/a/BxytlzA3olRnMNSHZ+z2KYYxG8LNKxhpxIL +Vo2OHenKXfhrkL73QM4kyRVfOSvm7qI7INgQHHupno3qTeKxzXM0VpNItLJKpDL2 +XzVj9VjggXg1AoIBAQCCiY1iow5qfgOywvQILTBCZ3NbVIf5GZraesimRtFLi3lZ +vDs5hKx9ebgeJQCTmnLjeRY4STTY3Ck4gtlI8Ti44XzMkclBgwqPbDrdoHgXJd+s +sKtSjGB3Y4x1B2F6pGZo6pEaSawgaBmnO5RaBgT8AKkggAoypFE4NaY4AEEi3MJ5 +1ldK7RgvL2l9a8RiGi3QcVe6Z1Q7t27Rm+sEYswTxnXkiP4vM3cYqpSKYaJz0GV8 +z95QPgX23UC3GypdzCNQ6Y3C448QtGBncstV/c/YXJN9iWQzbIeS5J5Qyk/TG/z4 +4oyOf+JHVNGbySmd11faP1XNXxFXffjS7z+XkrMvAoIBAQClzqN9WK2qfisAhxzJ +l+iJmJcPDw2KLAH3NT1UD4jP4rDyd2mWWcXzX5WT8PZFIYPi+TMTk6Ke4/ACbTQL +PN+ZCtps9LDPrTbdXHUb4+aZ0ceTg4TpYuvhLLQ3rsYprUkGgv6lsDt/fq7N2K21 +cvqc4KVDMonE5qa37Qr+O2cUlOBoGXbbunVNvALPTEojsGLkCldyYKBOvhDqKmYb +8LcToAiaq+ekujrqWk3be0C0+TZYJRCME+4UeDGLefVgDJqzrglx2xeuImZh90YG +glt4Z+pH3Y9UmF3nfWTrVr6hZdU4jQspljgzQ5oakLoJk0676GSpKfhzvqtkBe6m +R8ftAoIBAQCnYpj6T/XqfV1W6rRKJR5D1eLzB7jG1ZxjV+4YhxYxojq1PvJYePG0 +JcFEKGylFp91C7uExxoxv9gF88xqthtmLv+6lLZHD5BLANZAWOY+pJ8YlfpjUNKe +eqEGO5OEHy/8XyZcLt1lSx+1BA/vWRw0yG9mbGgUPwtqNFeCIW89cvrKf0A4+hcW +PrFDYgmwln5ao8Zjo0VTPiqk4HKMXNmiBVlkw/QGjiIowvbcvSGqRGqZApczMQjE +n8zkH4fhDrwp4FIjyEojabZiCS0hp+fDgUCmLpTHNGyoo2uGkBcQwuCMbcr2lHrl +aOt2Jz83tl2gMiU3ZA5sGbsJVPaSS9Ll +-----END PRIVATE KEY----- diff --git a/nginx-conf/server_tokens.conf b/nginx-conf/server_tokens.conf new file mode 100644 index 00000000..b7a0bcba --- /dev/null +++ b/nginx-conf/server_tokens.conf @@ -0,0 +1 @@ +server_tokens off; \ No newline at end of file diff --git a/nginx-conf/timeout.conf b/nginx-conf/timeout.conf new file mode 100644 index 00000000..dfa34ac1 --- /dev/null +++ b/nginx-conf/timeout.conf @@ -0,0 +1,4 @@ +proxy_connect_timeout 600; +proxy_send_timeout 600; +proxy_read_timeout 600; +send_timeout 600; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index b7feb200..8afc7cfb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3125,12 +3125,6 @@ } } }, - "graceful-fs": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", - "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", - "dev": true - }, "graceful-readlink": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", @@ -3553,258 +3547,6 @@ } } }, - "grunt-devcode": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/grunt-devcode/-/grunt-devcode-0.0.4.tgz", - "integrity": "sha1-pTfB/efuEzGxjf3Ae/iPDFteOwc=", - "dev": true, - "requires": { - "grunt": "~0.4.0" - }, - "dependencies": { - "argparse": { - "version": "0.1.16", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz", - "integrity": "sha1-z9AeD7uj1srtBJ+9dY1A9lGW9Xw=", - "dev": true, - "requires": { - "underscore": "~1.7.0", - "underscore.string": "~2.4.0" - }, - "dependencies": { - "underscore.string": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz", - "integrity": "sha1-jN2PusTi0uoefi6Al8QvRCKA+Fs=", - "dev": true - } - } - }, - "async": { - "version": "0.1.22", - "resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz", - "integrity": "sha1-D8GqoIig4+8Ovi2IMbqw3PiEUGE=", - "dev": true - }, - "dateformat": { - "version": "1.0.2-1.2.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.2-1.2.3.tgz", - "integrity": "sha1-sCIMAt6YYXQztyhRz0fePfLNvuk=", - "dev": true - }, - "esprima": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", - "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=", - "dev": true - }, - "findup-sync": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.1.3.tgz", - "integrity": "sha1-fz56l7gjksZTvwZYm9hRkOk8NoM=", - "dev": true, - "requires": { - "glob": "~3.2.9", - "lodash": "~2.4.1" - }, - "dependencies": { - "glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", - "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", - "dev": true, - "requires": { - "inherits": "2", - "minimatch": "0.3" - } - }, - "lodash": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", - "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", - "dev": true - }, - "minimatch": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", - "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", - "dev": true, - "requires": { - "lru-cache": "2", - "sigmund": "~1.0.0" - } - } - } - }, - "glob": { - "version": "3.1.21", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", - "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", - "dev": true, - "requires": { - "graceful-fs": "~1.2.0", - "inherits": "1", - "minimatch": "~0.2.11" - }, - "dependencies": { - "inherits": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", - "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", - "dev": true - } - } - }, - "grunt": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.5.tgz", - "integrity": "sha1-VpN81RlDJK3/bSB2MYMqnWuk5/A=", - "dev": true, - "requires": { - "async": "~0.1.22", - "coffee-script": "~1.3.3", - "colors": "~0.6.2", - "dateformat": "1.0.2-1.2.3", - "eventemitter2": "~0.4.13", - "exit": "~0.1.1", - "findup-sync": "~0.1.2", - "getobject": "~0.1.0", - "glob": "~3.1.21", - "grunt-legacy-log": "~0.1.0", - "grunt-legacy-util": "~0.2.0", - "hooker": "~0.2.3", - "iconv-lite": "~0.2.11", - "js-yaml": "~2.0.5", - "lodash": "~0.9.2", - "minimatch": "~0.2.12", - "nopt": "~1.0.10", - "rimraf": "~2.2.8", - "underscore.string": "~2.2.1", - "which": "~1.0.5" - } - }, - "grunt-legacy-log": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-0.1.3.tgz", - "integrity": "sha1-7ClCboAwIa9ZAp+H0vnNczWgVTE=", - "dev": true, - "requires": { - "colors": "~0.6.2", - "grunt-legacy-log-utils": "~0.1.1", - "hooker": "~0.2.3", - "lodash": "~2.4.1", - "underscore.string": "~2.3.3" - }, - "dependencies": { - "lodash": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", - "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", - "dev": true - }, - "underscore.string": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz", - "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0=", - "dev": true - } - } - }, - "grunt-legacy-log-utils": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-0.1.1.tgz", - "integrity": "sha1-wHBrndkGThFvNvI/5OawSGcsD34=", - "dev": true, - "requires": { - "colors": "~0.6.2", - "lodash": "~2.4.1", - "underscore.string": "~2.3.3" - }, - "dependencies": { - "lodash": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", - "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", - "dev": true - }, - "underscore.string": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz", - "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0=", - "dev": true - } - } - }, - "grunt-legacy-util": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-0.2.0.tgz", - "integrity": "sha1-kzJIhNv343qf98Am3/RR2UqeVUs=", - "dev": true, - "requires": { - "async": "~0.1.22", - "exit": "~0.1.1", - "getobject": "~0.1.0", - "hooker": "~0.2.3", - "lodash": "~0.9.2", - "underscore.string": "~2.2.1", - "which": "~1.0.5" - } - }, - "iconv-lite": { - "version": "0.2.11", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz", - "integrity": "sha1-HOYKOleGSiktEyH/RgnKS7llrcg=", - "dev": true - }, - "js-yaml": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-2.0.5.tgz", - "integrity": "sha1-olrmUJmZ6X3yeMZxnaEb0Gh3Q6g=", - "dev": true, - "requires": { - "argparse": "~ 0.1.11", - "esprima": "~ 1.0.2" - } - }, - "lodash": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-0.9.2.tgz", - "integrity": "sha1-jzSZxSRdNG1oLlsNO0B2fgnxqSw=", - "dev": true - }, - "minimatch": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", - "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", - "dev": true, - "requires": { - "lru-cache": "2", - "sigmund": "~1.0.0" - } - }, - "nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "rimraf": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", - "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=", - "dev": true - }, - "underscore.string": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz", - "integrity": "sha1-18D6KvXVoaZ/QlPa7pgTLnM/Dxk=", - "dev": true - } - } - }, "grunt-gh-pages": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/grunt-gh-pages/-/grunt-gh-pages-4.0.0.tgz", @@ -4099,6 +3841,16 @@ } } }, + "grunt-preprocess": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/grunt-preprocess/-/grunt-preprocess-5.1.0.tgz", + "integrity": "sha512-akQU6U8ULt8gLC6yeGFSBqWQUAqMQPFMm0jAIL4FVIIEkzp3unjDUxu/ZBpbJhiQ9i4IP1M1S6wsdMjE0QsrhQ==", + "dev": true, + "requires": { + "lodash": "^4.5.0", + "preprocess": "^3.0.2" + } + }, "grunt-replace": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/grunt-replace/-/grunt-replace-1.0.1.tgz", @@ -5915,12 +5667,6 @@ "signal-exit": "^3.0.0" } }, - "lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", - "dev": true - }, "make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", @@ -7263,6 +7009,15 @@ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", "dev": true }, + "preprocess": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/preprocess/-/preprocess-3.2.0.tgz", + "integrity": "sha512-cO+Rf+Ose/eD+ze8Hxd9p9nS1xT8thYqv8owG/V8+IS/Remd7Z17SvaRK/oJxp08yaM8zb+QTckDKJUul2pk7g==", + "dev": true, + "requires": { + "xregexp": "3.1.0" + } + }, "preserve": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", @@ -8257,12 +8012,6 @@ "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=", "dev": true }, - "sigmund": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", - "dev": true - }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", @@ -9422,12 +9171,6 @@ "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", "dev": true }, - "underscore": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", - "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=", - "dev": true - }, "underscore.string": { "version": "3.3.5", "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.5.tgz", @@ -9853,6 +9596,12 @@ "integrity": "sha1-GFqIjATspGw+QHDZn3tJ3jUomS0=", "dev": true }, + "xregexp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-3.1.0.tgz", + "integrity": "sha512-4Y1x6DyB8xRoxosooa6PlGWqmmSKatbzhrftZ7Purmm4B8R4qIEJG1A2hZsdz5DhmIqS0msC0I7KEq93GphEVg==", + "dev": true + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index a4ed6f69..c733ffaa 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "grunt-contrib-requirejs": "1.0.0", "grunt-contrib-uglify": "5.0.0", "grunt-contrib-watch": "1.1.0", - "grunt-devcode": "0.0.4", + "grunt-preprocess": "5.1.0", "grunt-gh-pages": "4.0.0", "grunt-hashres": "0.4.1", "grunt-html-validation": "0.1.18", diff --git a/static/html/.nojekyll b/static/html/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/static/html/50x.html b/static/html/50x.html new file mode 100644 index 00000000..9071e0a2 --- /dev/null +++ b/static/html/50x.html @@ -0,0 +1,21 @@ + + + +Error + + + +

An error occurred.

+

Sorry, the page you are looking for is currently unavailable.
+Please try again later.

+

If you are the system administrator of this resource then you should check +the error log for details.

+

Faithfully yours, nginx.

+ + diff --git a/static/html/SpecRunner.html b/static/html/SpecRunner.html new file mode 100644 index 00000000..a7882952 --- /dev/null +++ b/static/html/SpecRunner.html @@ -0,0 +1,98 @@ + + + + Jasmine Spec Runner + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/html/angular/i18n/angular-locale_en.js b/static/html/angular/i18n/angular-locale_en.js new file mode 100644 index 00000000..ae07737c --- /dev/null +++ b/static/html/angular/i18n/angular-locale_en.js @@ -0,0 +1,99 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "macFrac": 0, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "macFrac": 0, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "(\u00a4", + "negSuf": ")", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "en", + "pluralCat": function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); \ No newline at end of file diff --git a/static/html/angular/i18n/angular-locale_es.js b/static/html/angular/i18n/angular-locale_es.js new file mode 100644 index 00000000..91aba876 --- /dev/null +++ b/static/html/angular/i18n/angular-locale_es.js @@ -0,0 +1,99 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom", + "lun", + "mar", + "mi\u00e9", + "jue", + "vie", + "s\u00e1b" + ], + "SHORTMONTH": [ + "ene", + "feb", + "mar", + "abr", + "may", + "jun", + "jul", + "ago", + "sep", + "oct", + "nov", + "dic" + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "dd/MM/yyyy HH:mm:ss", + "mediumDate": "dd/MM/yyyy", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "macFrac": 0, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "macFrac": 0, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "es", + "pluralCat": function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); \ No newline at end of file diff --git a/static/html/angular/i18n/angular-locale_fr.js b/static/html/angular/i18n/angular-locale_fr.js new file mode 100644 index 00000000..b45cdc2b --- /dev/null +++ b/static/html/angular/i18n/angular-locale_fr.js @@ -0,0 +1,99 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "dimanche", + "lundi", + "mardi", + "mercredi", + "jeudi", + "vendredi", + "samedi" + ], + "MONTH": [ + "janvier", + "f\u00e9vrier", + "mars", + "avril", + "mai", + "juin", + "juillet", + "ao\u00fbt", + "septembre", + "octobre", + "novembre", + "d\u00e9cembre" + ], + "SHORTDAY": [ + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam." + ], + "SHORTMONTH": [ + "janv.", + "f\u00e9vr.", + "mars", + "avr.", + "mai", + "juin", + "juil.", + "ao\u00fbt", + "sept.", + "oct.", + "nov.", + "d\u00e9c." + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "macFrac": 0, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "macFrac": 0, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "(", + "negSuf": "\u00a0\u00a4)", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "fr", + "pluralCat": function (n) { if (n >= 0 && n <= 2 && n != 2) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); \ No newline at end of file diff --git a/static/html/angular/i18n/angular-locale_hi.js b/static/html/angular/i18n/angular-locale_hi.js new file mode 100644 index 00000000..165c639e --- /dev/null +++ b/static/html/angular/i18n/angular-locale_hi.js @@ -0,0 +1,99 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "am", + "pm" + ], + "DAY": [ + "\u0930\u0935\u093f\u0935\u093e\u0930", + "\u0938\u094b\u092e\u0935\u093e\u0930", + "\u092e\u0902\u0917\u0932\u0935\u093e\u0930", + "\u092c\u0941\u0927\u0935\u093e\u0930", + "\u092c\u0943\u0939\u0938\u094d\u092a\u0924\u093f\u0935\u093e\u0930", + "\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930", + "\u0936\u0928\u093f\u0935\u093e\u0930" + ], + "MONTH": [ + "\u091c\u0928\u0935\u0930\u0940", + "\u092b\u0930\u0935\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u0905\u092a\u094d\u0930\u0948\u0932", + "\u092e\u0908", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u093e\u0908", + "\u0905\u0917\u0938\u094d\u0924", + "\u0938\u093f\u0924\u092e\u094d\u092c\u0930", + "\u0905\u0915\u094d\u0924\u0942\u092c\u0930", + "\u0928\u0935\u092e\u094d\u092c\u0930", + "\u0926\u093f\u0938\u092e\u094d\u092c\u0930" + ], + "SHORTDAY": [ + "\u0930\u0935\u093f.", + "\u0938\u094b\u092e.", + "\u092e\u0902\u0917\u0932.", + "\u092c\u0941\u0927.", + "\u092c\u0943\u0939.", + "\u0936\u0941\u0915\u094d\u0930.", + "\u0936\u0928\u093f." + ], + "SHORTMONTH": [ + "\u091c\u0928\u0935\u0930\u0940", + "\u092b\u0930\u0935\u0930\u0940", + "\u092e\u093e\u0930\u094d\u091a", + "\u0905\u092a\u094d\u0930\u0948\u0932", + "\u092e\u0908", + "\u091c\u0942\u0928", + "\u091c\u0941\u0932\u093e\u0908", + "\u0905\u0917\u0938\u094d\u0924", + "\u0938\u093f\u0924\u092e\u094d\u092c\u0930", + "\u0905\u0915\u094d\u0924\u0942\u092c\u0930", + "\u0928\u0935\u092e\u094d\u092c\u0930", + "\u0926\u093f\u0938\u092e\u094d\u092c\u0930" + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "dd-MM-yyyy h:mm:ss a", + "mediumDate": "dd-MM-yyyy", + "mediumTime": "h:mm:ss a", + "short": "d-M-yy h:mm a", + "shortDate": "d-M-yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20b9", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 2, + "lgSize": 3, + "macFrac": 0, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 2, + "lgSize": 3, + "macFrac": 0, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "\u00a4\u00a0-", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "hi", + "pluralCat": function (n) { if (n == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); \ No newline at end of file diff --git a/static/html/angular/i18n/angular-locale_ka.js b/static/html/angular/i18n/angular-locale_ka.js new file mode 100644 index 00000000..2c4c53d1 --- /dev/null +++ b/static/html/angular/i18n/angular-locale_ka.js @@ -0,0 +1,99 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u10d3\u10d8\u10da\u10d8\u10e1", + "\u10e1\u10d0\u10e6\u10d0\u10db\u10dd\u10e1" + ], + "DAY": [ + "\u10d9\u10d5\u10d8\u10e0\u10d0", + "\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8", + "\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8", + "\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8", + "\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8", + "\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10d8", + "\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8" + ], + "MONTH": [ + "\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10d8", + "\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10d8", + "\u10db\u10d0\u10e0\u10e2\u10d8", + "\u10d0\u10de\u10e0\u10d8\u10da\u10d8", + "\u10db\u10d0\u10d8\u10e1\u10d8", + "\u10d8\u10d5\u10dc\u10d8\u10e1\u10d8", + "\u10d8\u10d5\u10da\u10d8\u10e1\u10d8", + "\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10dd", + "\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10d8", + "\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10d8", + "\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10d8", + "\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10d8" + ], + "SHORTDAY": [ + "\u10d9\u10d5\u10d8", + "\u10dd\u10e0\u10e8", + "\u10e1\u10d0\u10db", + "\u10dd\u10d7\u10ee", + "\u10ee\u10e3\u10d7", + "\u10de\u10d0\u10e0", + "\u10e8\u10d0\u10d1" + ], + "SHORTMONTH": [ + "\u10d8\u10d0\u10dc", + "\u10d7\u10d4\u10d1", + "\u10db\u10d0\u10e0", + "\u10d0\u10de\u10e0", + "\u10db\u10d0\u10d8", + "\u10d8\u10d5\u10dc", + "\u10d8\u10d5\u10da", + "\u10d0\u10d2\u10d5", + "\u10e1\u10d4\u10e5", + "\u10dd\u10e5\u10e2", + "\u10dc\u10dd\u10d4", + "\u10d3\u10d4\u10d9" + ], + "fullDate": "EEEE, dd MMMM, y", + "longDate": "d MMMM, y", + "medium": "d MMM, y HH:mm:ss", + "mediumDate": "d MMM, y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "GEL", + "DECIMAL_SEP": ",", + "GROUP_SEP": "\u00a0", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "macFrac": 0, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "macFrac": 0, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "ka", + "pluralCat": function (n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); \ No newline at end of file diff --git a/static/html/angular/i18n/angular-locale_pt.js b/static/html/angular/i18n/angular-locale_pt.js new file mode 100644 index 00000000..b9be5cc6 --- /dev/null +++ b/static/html/angular/i18n/angular-locale_pt.js @@ -0,0 +1,99 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "domingo", + "segunda-feira", + "ter\u00e7a-feira", + "quarta-feira", + "quinta-feira", + "sexta-feira", + "s\u00e1bado" + ], + "MONTH": [ + "janeiro", + "fevereiro", + "mar\u00e7o", + "abril", + "maio", + "junho", + "julho", + "agosto", + "setembro", + "outubro", + "novembro", + "dezembro" + ], + "SHORTDAY": [ + "dom", + "seg", + "ter", + "qua", + "qui", + "sex", + "s\u00e1b" + ], + "SHORTMONTH": [ + "jan", + "fev", + "mar", + "abr", + "mai", + "jun", + "jul", + "ago", + "set", + "out", + "nov", + "dez" + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "dd/MM/yyyy HH:mm:ss", + "mediumDate": "dd/MM/yyyy", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "R$", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "macFrac": 0, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "macFrac": 0, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "(\u00a4", + "negSuf": ")", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "pt", + "pluralCat": function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); \ No newline at end of file diff --git a/static/html/angular/i18n/angular-locale_zh_cn.js b/static/html/angular/i18n/angular-locale_zh_cn.js new file mode 100644 index 00000000..787d1fd2 --- /dev/null +++ b/static/html/angular/i18n/angular-locale_zh_cn.js @@ -0,0 +1,99 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "\u4e0a\u5348", + "\u4e0b\u5348" + ], + "DAY": [ + "\u661f\u671f\u65e5", + "\u661f\u671f\u4e00", + "\u661f\u671f\u4e8c", + "\u661f\u671f\u4e09", + "\u661f\u671f\u56db", + "\u661f\u671f\u4e94", + "\u661f\u671f\u516d" + ], + "MONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "SHORTDAY": [ + "\u5468\u65e5", + "\u5468\u4e00", + "\u5468\u4e8c", + "\u5468\u4e09", + "\u5468\u56db", + "\u5468\u4e94", + "\u5468\u516d" + ], + "SHORTMONTH": [ + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708" + ], + "fullDate": "y\u5e74M\u6708d\u65e5EEEE", + "longDate": "y\u5e74M\u6708d\u65e5", + "medium": "yyyy-M-d ah:mm:ss", + "mediumDate": "yyyy-M-d", + "mediumTime": "ah:mm:ss", + "short": "yy-M-d ah:mm", + "shortDate": "yy-M-d", + "shortTime": "ah:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u00a5", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "macFrac": 0, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "macFrac": 0, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "(\u00a4", + "negSuf": ")", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "zh-cn", + "pluralCat": function (n) { return PLURAL_CATEGORY.OTHER;} +}); +}]); \ No newline at end of file diff --git a/static/html/bower_components/angular-animate/angular-animate.min.js b/static/html/bower_components/angular-animate/angular-animate.min.js new file mode 100644 index 00000000..96dcfb63 --- /dev/null +++ b/static/html/bower_components/angular-animate/angular-animate.min.js @@ -0,0 +1,59 @@ +/* + AngularJS v1.7.9 + (c) 2010-2018 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(Y,z){'use strict';function Fa(a,b,c){if(!a)throw Pa("areq",b||"?",c||"required");return a}function Ga(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;Z(a)&&(a=a.join(" "));Z(b)&&(b=b.join(" "));return a+" "+b}function Qa(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function $(a,b,c){var d="";a=Z(a)?a:a&&G(a)&&a.length?a.split(/\s+/):[];s(a,function(a,k){a&&0=a&&(a=t,t=0,b.push(f),f=[]);f.push(g);g.children.forEach(function(a){t++;c.push(a)});a--}f.length&&b.push(f);return b}(c)}var C=[],U=aa(a);return function(e, +H,u){function t(a){a=a.hasAttribute("ng-animate-ref")?[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];s(a,function(a){var c=a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)});return b}function I(a){var b=[],c={};s(a,function(a,d){var l=K(a.element),g=0<=["enter","move"].indexOf(a.event),l=a.structural?t(l):[];if(l.length){var f=g?"to":"from";s(l,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]||{};c[b][f]={animationID:d,element:A(a)}})}else b.push(a)});var d={},g={};s(c,function(c, +t){var f=c.from,e=c.to;if(f&&e){var h=a[f.animationID],k=a[e.animationID],E=f.animationID.toString();if(!g[E]){var I=g[E]={structural:!0,beforeStart:function(){h.beforeStart();k.beforeStart()},close:function(){h.close();k.close()},classes:da(h.classes,k.classes),from:h,to:k,anchors:[]};I.classes.length?b.push(I):(b.push(h),b.push(k))}g[E].anchors.push({out:f.element,"in":e.element})}else f=f?f.animationID:e.animationID,e=f.toString(),d[e]||(d[e]=!0,b.push(a[f]))});return b}function da(a,b){a=a.split(" "); +b=b.split(" ");for(var c=[],d=0;d=G&&b>=D&&(la=!0,v()))}function F(){function b(){if(!P){u(!1);s(y,function(a){l.style[a[0]]=a[1]});H(a,g);c.addClass(a,ba);if(p.recalculateTimingStyles){T=l.getAttribute("class")+" "+V;ka=k.cacheKey(l,ja,g.addClass,g.removeClass);r=z(l,T,ka,!1);ga=r.maxDelay;W= +Math.max(ga,0);D=r.maxDuration;if(0===D){v();return}p.hasTransitions=0n.expectedEndTime)?f.cancel(n.timer):h.push(v)}F&&(m=f(d,m,!1),h[0]={timer:m,expectedEndTime:e},h.push(v),a.data("$$animateCss",h));if(w.length)a.on(w.join(" "),q);g.to&&(g.cleanupStyles&&Ma(E,l,Object.keys(g.to)),Ja(a,g))}}function d(){var b=a.data("$$animateCss");if(b){for(var c=1;c1){q[d].element.data(r,c.direction);var j=p.getCurrentIndex();angular.isNumber(j)&&q[j].element&&q[j].element.data(r,c.direction),a.$currentTransition=!0,e.on("addClass",q[d].element,function(b,c){if("close"===c&&(a.$currentTransition=null,e.off("addClass",b),t.length)){var d=t.pop().slide,g=d.index,i=g>p.getCurrentIndex()?"next":"prev";f(),h(d,g,i)}})}a.active=c.index,s=c.index,g(d),l()}}function i(a){for(var b=0;b0&&(n=c(m,b))}function m(){var b=+a.interval;o&&!isNaN(b)&&b>0&&q.length?a.next():a.pause()}var n,o,p=this,q=p.slides=a.slides=[],r="uib-slideDirection",s=a.active,t=[],u=!1;p.addSlide=function(b,c){q.push({slide:b,element:c}),q.sort(function(a,b){return+a.slide.index-+b.slide.index}),(b.index===a.active||1===q.length&&!angular.isNumber(a.active))&&(a.$currentTransition&&(a.$currentTransition=null),s=b.index,a.active=b.index,g(s),p.select(q[i(b)]),1===q.length&&a.play())},p.getCurrentIndex=function(){for(var a=0;a0&&s===c?c>=q.length?(s=q.length-1,a.active=s,g(s),p.select(q[q.length-1])):(s=c,a.active=s,g(s),p.select(q[c])):s>c&&(s--,a.active=s),0===q.length&&(s=null,a.active=null,f())},p.select=a.select=function(b,c){var d=i(b.slide);void 0===c&&(c=d>p.getCurrentIndex()?"next":"prev"),b.slide.index===s||a.$currentTransition?b&&b.slide.index!==s&&a.$currentTransition&&t.push(q[d]):h(b.slide,d,c)},a.indexOfSlide=function(a){return+a.slide.index},a.isActive=function(b){return a.active===b.slide.index},a.isPrevDisabled=function(){return 0===a.active&&a.noWrap()},a.isNextDisabled=function(){return a.active===q.length-1&&a.noWrap()},a.pause=function(){a.noPause||(o=!1,j())},a.play=function(){o||(o=!0,l())},a.$on("$destroy",function(){u=!0,j()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",l),a.$watchCollection("slides",k),a.$watch("active",function(a){if(angular.isNumber(a)&&s!==a){for(var b=0;b-1){var g=!1;a=a.split("");for(var h=f;h-1){a=a.split(""),e[f]="("+d.regex+")",a[f]="$";for(var g=f+1,h=f+d.key.length;h>g;g++)e[g]="",a[g]="$";a=a.join(""),c.push({index:f,key:d.key,apply:d[b],matcher:d.regex})}}),{regex:new RegExp("^"+e.join("")+"$"),map:d(c,"index")}}function f(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function g(a){return parseInt(a,10)}function h(a,b){return a&&b?l(a,b):a}function i(a,b){return a&&b?l(a,b,!0):a}function j(a,b){var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function k(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function l(a,b,c){c=c?-1:1;var d=j(b,a.getTimezoneOffset());return k(a,c*(d-a.getTimezoneOffset()))}var m,n,o=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){m=b.id,this.parsers={},this.formatters={},n=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){a=+a,this.year=69>a?a+2e3:a+1900},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=g(c+d),this.minutes+=g(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}]},this.init(),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==m&&this.init(),this.formatters[c]||(this.formatters[c]=e(c,"formatter"));var d=this.formatters[c],f=d.map,g=c;return f.reduce(function(b,c,d){var e=g.match(new RegExp("(.*)"+c.key));e&&angular.isString(e[1])&&(b+=e[1],g=g.replace(e[1]+c.key,""));var h=d===f.length-1?g:"";return c.apply?b+c.apply.call(null,a)+h:b+h},"")},this.parse=function(c,d,g){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(o,"\\$&"),b.id!==m&&this.init(),this.parsers[d]||(this.parsers[d]=e(d,"apply"));var h=this.parsers[d],i=h.regex,j=h.map,k=c.match(i),l=!1;if(k&&k.length){var n,p;angular.isDate(g)&&!isNaN(g.getTime())?n={year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:(g&&a.warn("dateparser:","baseDate is not a valid date"),n={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var q=1,r=k.length;r>q;q++){var s=j[q-1];"Z"===s.matcher&&(l=!0),s.apply&&s.apply.call(n,k[q])}var t=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return f(n.year,n.month,n.date)&&(!angular.isDate(g)||isNaN(g.getTime())||l?(p=new Date(0),t.call(p,n.year,n.month,n.date),u.call(p,n.hours||0,n.minutes||0,n.seconds||0,n.milliseconds||0)):(p=new Date(g),t.call(p,n.year,n.month,n.date),u.call(p,n.hours,n.minutes,n.seconds,n.milliseconds))),p}},this.toTimezone=h,this.fromTimezone=i,this.timezoneToOffset=j,this.addDateMinutes=k,this.convertTimezoneToLocal=l}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass"]).value("$datepickerSuppressError",!1).value("$datepickerLiteralWarning",!0).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerLiteralWarning","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i,j,k){function l(b){a.datepickerMode=b,a.datepickerOptions.datepickerMode=b}var m=this,n={$setViewValue:angular.noop},o={},p=[];!!b.datepickerOptions;a.datepickerOptions||(a.datepickerOptions={}),this.modes=["day","month","year"],["customClass","dateDisabled","datepickerMode","formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","maxDate","maxMode","minDate","minMode","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"].forEach(function(b){switch(b){case"customClass":case"dateDisabled":a[b]=a.datepickerOptions[b]||angular.noop;break;case"datepickerMode":a.datepickerMode=angular.isDefined(a.datepickerOptions.datepickerMode)?a.datepickerOptions.datepickerMode:h.datepickerMode;break;case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":m[b]=angular.isDefined(a.datepickerOptions[b])?d(a.datepickerOptions[b])(a.$parent):h[b];break;case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":m[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:h[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?m.startingDay=a.datepickerOptions.startingDay:angular.isNumber(h.startingDay)?m.startingDay=h.startingDay:m.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.$watch("datepickerOptions."+b,function(a){a?angular.isDate(a)?m[b]=k.fromTimezone(new Date(a),o.timezone):(i&&f.warn("Literal date support has been deprecated, please switch to date object usage"),m[b]=new Date(g(a,"medium"))):m[b]=h[b]?k.fromTimezone(new Date(h[b]),o.timezone):null,m.refreshView()});break;case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){m[b]=a[b]=angular.isDefined(c)?c:datepickerOptions[b],("minMode"===b&&m.modes.indexOf(a.datepickerOptions.datepickerMode)m.modes.indexOf(m[b]))&&(a.datepickerMode=m[b],a.datepickerOptions.datepickerMode=m[b])}):m[b]=a[b]=h[b]||null}}),a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(b.disabled)||!1,angular.isDefined(b.ngDisabled)&&p.push(a.$parent.$watch(b.ngDisabled,function(b){a.disabled=b,m.refreshView()})),a.isActive=function(b){return 0===m.compare(b.date,m.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(b){n=b,o=b.$options||h.ngModelOptions,a.datepickerOptions.initDate?(m.activeDate=k.fromTimezone(a.datepickerOptions.initDate,o.timezone)||new Date,a.$watch("datepickerOptions.initDate",function(a){a&&(n.$isEmpty(n.$modelValue)||n.$invalid)&&(m.activeDate=k.fromTimezone(a,o.timezone),m.refreshView())})):m.activeDate=new Date,this.activeDate=n.$modelValue?k.fromTimezone(new Date(n.$modelValue),o.timezone):k.fromTimezone(new Date,o.timezone),n.$render=function(){m.render()}},this.render=function(){if(n.$viewValue){var a=new Date(n.$viewValue),b=!isNaN(a);b?this.activeDate=k.fromTimezone(a,o.timezone):j||f.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=n.$viewValue?new Date(n.$viewValue):null;b=k.fromTimezone(b,o.timezone),n.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=n.$viewValue?new Date(n.$viewValue):null;d=k.fromTimezone(d,o.timezone);var e=new Date;e=k.fromTimezone(e,o.timezone);var f=this.compare(b,e),g={date:b,label:k.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),past:0>f,current:0===f,future:f>0,customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=g),m.activeDate&&0===this.compare(g.date,m.activeDate)&&(a.activeDt=g),g},this.isDisabled=function(b){return a.disabled||this.minDate&&this.compare(b,this.minDate)<0||this.maxDate&&this.compare(b,this.maxDate)>0||a.dateDisabled&&a.dateDisabled({date:b,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===m.minMode){var c=n.$viewValue?k.fromTimezone(new Date(n.$viewValue),o.timezone):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=k.toTimezone(c,o.timezone),n.$setViewValue(c),n.$render()}else m.activeDate=b,l(m.modes[m.modes.indexOf(a.datepickerMode)-1]),a.$emit("uib:datepicker.mode");a.$broadcast("uib:datepicker.focus")},a.move=function(a){var b=m.activeDate.getFullYear()+a*(m.step.years||0),c=m.activeDate.getMonth()+a*(m.step.months||0);m.activeDate.setFullYear(b,c,1),m.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===m.maxMode&&1===b||a.datepickerMode===m.minMode&&-1===b||(l(m.modes[m.modes.indexOf(a.datepickerMode)+b]),a.$emit("uib:datepicker.mode"))},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var q=function(){m.element[0].focus()};a.$on("uib:datepicker.focus",q),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),m.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(m.isDisabled(m.activeDate))return;a.select(m.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(m.handleKeyDown(c,b),m.refreshView()):a.toggleMode("up"===c?1:-1)},a.$on("$destroy",function(){for(;p.length;)p.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerOptions:"=?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d,e={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},f={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/},g=/(HTML|BODY)/;return{getRawNode:function(a){return a.nodeName?a:a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(e){if(e){if(angular.isUndefined(d)){var f=a.find("body");f.addClass("uib-position-body-scrollbar-measure"),d=b.innerWidth-f[0].clientWidth,d=isFinite(d)?d:0,f.removeClass("uib-position-body-scrollbar-measure")}return d}if(angular.isUndefined(c)){var g=angular.element('
');a.find("body").append(g),c=g[0].offsetWidth-g[0].clientWidth,c=isFinite(c)?c:0,g.remove()}return c},scrollbarPadding:function(a){a=this.getRawNode(a);var c=b.getComputedStyle(a),d=this.parseStyle(c.paddingRight),e=this.parseStyle(c.paddingBottom),f=this.scrollParent(a,!1,!0),h=this.scrollbarWidth(f,g.test(f.tagName));return{scrollbarWidth:h,widthOverflow:f.scrollWidth>f.clientWidth,right:d+h,originalRight:d,heightOverflow:f.scrollHeight>f.clientHeight,bottom:e+h,originalBottom:e}},isScrollable:function(a,c){a=this.getRawNode(a);var d=c?e.hidden:e.normal,f=b.getComputedStyle(a);return d.test(f.overflow+f.overflowY+f.overflowX); +},scrollParent:function(c,d,f){c=this.getRawNode(c);var g=d?e.hidden:e.normal,h=a[0].documentElement,i=b.getComputedStyle(c);if(f&&g.test(i.overflow+i.overflowY+i.overflowX))return c;var j="absolute"===i.position,k=c.parentElement||h;if(k===h||"fixed"===i.position)return h;for(;k.parentElement&&k!==h;){var l=b.getComputedStyle(k);if(j&&"static"!==l.position&&(j=!1),!j&&g.test(l.overflow+l.overflowY+l.overflowX))break;k=k.parentElement}return k},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=f.auto.test(a);return b&&(a=a.replace(f.auto,"")),a=a.split("-"),a[0]=a[0]||"top",f.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",f.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,e){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=e?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a,e),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(f.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":f.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var e=angular.element(d).hasClass("tooltip-inner"),g=e?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){var h={top:"",bottom:"",left:"",right:""};if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css(h);var i="border-"+c[0]+"-width",j=b.getComputedStyle(g)[i],k="border-";k+=f.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],k+="-radius";var l=b.getComputedStyle(e?d:a)[k];switch(c[0]){case"top":h.bottom=e?"0":"-"+j;break;case"bottom":h.top=e?"0":"-"+j;break;case"left":h.right=e?"0":"-"+j;break;case"right":h.left=e?"0":"-"+j}h[c[1]]=l,angular.element(g).css(h)}}}}}]),angular.module("ui.bootstrap.datepickerPopup",["ui.bootstrap.datepicker","ui.bootstrap.position"]).value("$datepickerPopupLiteralWarning",!0).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepickerPopup/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0,placement:"auto bottom-left"}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$log","$parse","$window","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig","$datepickerPopupLiteralWarning",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){function q(b){var c=l.parse(b,w,a.date);if(isNaN(c))for(var d=0;d
"),G?(J=G.timezone,a.ngModelOptions=angular.copy(G),a.ngModelOptions.timezone=null,a.ngModelOptions.updateOnDefault===!0&&(a.ngModelOptions.updateOn=a.ngModelOptions.updateOn?a.ngModelOptions.updateOn+" default":"default"),C.attr("ng-model-options","ngModelOptions")):J=null,C.attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":A}),D=angular.element(C.children()[0]),D.attr("template-url",B),a.datepickerOptions||(a.datepickerOptions={}),K&&"month"===c.type&&(a.datepickerOptions.datepickerMode="month",a.datepickerOptions.minMode="month"),D.attr("datepicker-options","datepickerOptions"),K?F.$formatters.push(function(b){return a.date=l.fromTimezone(b,J),b}):(F.$$parserName="date",F.$validators.date=s,F.$parsers.unshift(r),F.$formatters.push(function(b){return F.$isEmpty(b)?(a.date=b,b):(a.date=l.fromTimezone(b,J),angular.isNumber(a.date)&&(a.date=new Date(a.date)),l.filter(a.date,w))})),F.$viewChangeListeners.push(function(){a.date=q(F.$viewValue)}),b.on("keydown",u),H=d(C)(a),C.remove(),y?h.find("body").append(H):b.after(H),a.$on("$destroy",function(){for(a.isOpen===!0&&(i.$$phase||a.$apply(function(){a.isOpen=!1})),H.remove(),b.off("keydown",u),h.off("click",t),E&&E.off("scroll",v),angular.element(g).off("resize",v);L.length;)L.shift()()})},a.getText=function(b){return a[b+"Text"]||m[b+"Text"]},a.isDisabled=function(b){"today"===b&&(b=l.fromTimezone(new Date,J));var c={};return angular.forEach(["minDate","maxDate"],function(b){a.datepickerOptions[b]?angular.isDate(a.datepickerOptions[b])?c[b]=l.fromTimezone(new Date(a.datepickerOptions[b]),J):(p&&e.warn("Literal date support has been deprecated, please switch to date object usage"),c[b]=new Date(k(a.datepickerOptions[b],"medium"))):c[b]=null}),a.datepickerOptions&&c.minDate&&a.compare(b,c.minDate)<0||c.maxDate&&a.compare(b,c.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?l.filter(a.date,w):null;b.val(d),F.$setViewValue(d),x&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b,c){if(c.stopPropagation(),"today"===b){var d=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate())):b=new Date(d.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(c){c.stopPropagation(),a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&L.push(a.$parent.$watch(f(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(d){d?a.disabled?a.isOpen=!1:n(function(){v(),z&&a.$broadcast("uib:datepicker.focus"),h.on("click",t);var d=c.popupPlacement?c.popupPlacement:m.placement;y||j.parsePlacement(d)[2]?(E=E||angular.element(j.scrollParent(b)),E&&E.on("scroll",v)):E=null,angular.element(g).on("resize",v)},0,!1):(h.off("click",t),E&&E.off("scroll",v),angular.element(g).off("resize",v))}),a.$on("uib:datepicker.mode",function(){n(v,0,!1)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepickerPopup/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b,f){c||(a.on("click",d),f.on("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b,f){c===b&&(c=null,a.off("click",d),f.off("keydown",e))};var d=function(a){if(c&&!(a&&"disabled"===c.getAutoClose()||a&&3===a.which)){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(a.stopPropagation(),c.focusToggleElement(),d()):c.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.appendToOpenClass,q=e.openClass,r=angular.noop,s=c.onToggle?d(c.onToggle):angular.noop,t=!1,u=null,v=!1,w=i.find("body");b.addClass("dropdown"),this.init=function(){if(c.isOpen&&(m=d(c.isOpen),r=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),angular.isDefined(c.dropdownAppendTo)){var e=d(c.dropdownAppendTo)(o);e&&(u=angular.element(e))}t=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.keyboardNav),t&&!u&&(u=w),u&&n.dropdownMenu&&(u.append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen,angular.isFunction(r)&&r(o,o.isOpen),o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return v},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(u&&n.dropdownMenu){var e,i,m=h.positionElements(b,n.dropdownMenu,"bottom-left",!0);if(e={top:m.top+"px",display:c?"block":"none"},i=n.dropdownMenu.hasClass("dropdown-menu-right"),i?(e.left="auto",e.right=window.innerWidth-(m.left+b.prop("offsetWidth"))+"px"):(e.left=m.left+"px",e.right="auto"),!t){var v=h.offset(u);e.top=m.top-v.top+"px",i?e.right=window.innerWidth-(m.left-v.left+b.prop("offsetWidth"))+"px":e.left=m.left-v.left+"px"}n.dropdownMenu.css(e)}var w=u?u:b,x=w.hasClass(u?p:q);if(x===!c&&g[c?"addClass":"removeClass"](w,u?p:q).then(function(){angular.isDefined(c)&&c!==d&&s(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o,b);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var y=angular.element('');n.dropdownMenu.replaceWith(y),n.dropdownMenu=y}f.close(o,b),n.selectedOption=null}angular.isFunction(r)&&r(a,c)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c-1&&y>a&&(a=y),a}function l(a,b){var c=v.get(a).value,d=c.appendTo;v.remove(a),z=v.top(),z&&(y=parseInt(z.value.modalDomEl.attr("index"),10)),o(c.modalDomEl,c.modalScope,function(){var b=c.openedClass||u;w.remove(b,a);var e=w.hasKey(b);d.toggleClass(b,e),!e&&t&&t.heightOverflow&&t.scrollbarWidth&&(t.originalRight?d.css({paddingRight:t.originalRight+"px"}):d.css({paddingRight:""}),t=null),m(!0)},c.closedDeferred),n(),b&&b.focus?b.focus():d.focus&&d.focus()}function m(a){var b;v.length()>0&&(b=v.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function n(){if(r&&-1===k()){var a=s;o(r,s,function(){a=null}),r=void 0,s=void 0}}function o(b,c,d,e){function g(){g.done||(g.done=!0,a.leave(b).then(function(){b.remove(),e&&e.resolve()}),c.$destroy(),d&&d())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(x.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function p(a){if(a.isDefaultPrevented())return a;var b=v.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){x.dismiss(b.key,"escape key press")}));break;case 9:var c=x.loadFocusElementList(b),d=!1;a.shiftKey?(x.isFocusInFirstItem(a,c)||x.isModalFocused(a,b))&&(d=x.focusLastFocusableElement(c)):x.isFocusInLastItem(a,c)&&(d=x.focusFirstFocusableElement(c)),d&&(a.preventDefault(),a.stopPropagation())}}function q(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var r,s,t,u="modal-open",v=h.createNew(),w=g.createNew(),x={NOW_CLOSING_EVENT:"modal.stack.now-closing"},y=0,z=null,A="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(k,function(a){s&&(s.index=a)}),c.on("keydown",p),e.$on("$destroy",function(){c.off("keydown",p)}),x.open=function(b,f){var g=c[0].activeElement,h=f.openedClass||u;m(!1),z=v.top(),v.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),w.put(h,b);var j=f.appendTo,l=k();if(!j.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");l>=0&&!r&&(s=e.$new(!0),s.modalOptions=f,s.index=l,r=angular.element('
'),r.attr("backdrop-class",f.backdropClass),f.animation&&r.attr("modal-animation","true"),d(r)(s),a.enter(r,j),t=i.scrollbarPadding(j),t.heightOverflow&&t.scrollbarWidth&&j.css({paddingRight:t.right+"px"})),y=z?parseInt(z.value.modalDomEl.attr("index"),10)+1:0;var n=angular.element('
');n.attr({"template-url":f.windowTemplateUrl,"window-class":f.windowClass,"window-top-class":f.windowTopClass,size:f.size,index:y,animate:"animate"}).html(f.content),f.animation&&n.attr("modal-animation","true"),j.addClass(h),a.enter(d(n)(f.scope),j),v.top().value.modalDomEl=n,v.top().value.modalOpener=g},x.close=function(a,b){var c=v.get(a);return c&&q(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),l(a,c.value.modalOpener),!0):!c},x.dismiss=function(a,b){var c=v.get(a);return c&&q(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),l(a,c.value.modalOpener),!0):!c},x.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},x.getTop=function(){return v.top()},x.modalRendered=function(a){var b=v.get(a);b&&b.value.renderDeferred.resolve()},x.focusFirstFocusableElement=function(a){return a.length>0?(a[0].focus(),!0):!1},x.focusLastFocusableElement=function(a){return a.length>0?(a[a.length-1].focus(),!0):!1},x.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},x.isFocusInFirstItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[0]:!1},x.isFocusInLastItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[b.length-1]:!1},x.loadFocusElementList=function(a){if(a){var b=a.value.modalDomEl;if(b&&b.length){var c=b[0].querySelectorAll(A);return c?Array.prototype.filter.call(c,function(a){return j(a)}):c}}},x}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return r}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=c.all([i(e),g.resolve(e.resolve,{},null,null)]);return q=k=c.all([k]).then(j,j).then(function(a){var c=e.scope||b,d=c.$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var g,i,j={};e.controller&&(j.$scope=d,j.$uibModalInstance=p,angular.forEach(a[1],function(a,b){j[b]=a}),i=f(e.controller,j,!0),e.controllerAs?(g=i.instance,e.bindToController&&(g.$close=d.$close,g.$dismiss=d.$dismiss,angular.extend(g,c)),g=i(),d[e.controllerAs]=g):g=i(),angular.isFunction(g.$onInit)&&g.$onInit()),h.open(p,{scope:d,deferred:l,renderDeferred:o,closedDeferred:n,content:a[0],animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo}),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===q&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(a,e){b.ngModelCtrl=a,b.config=e,a.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(d.itemsPerPage,function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=e.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var n=f(h,m(h),h===a);c.push(n)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var o=f(d-1,"...",!1);c.unshift(o)}if(l){if(3===d){var p=f(2,"2",!1);c.unshift(p)}var q=f(1,"1",!1);c.unshift(q)}}if(b>e){if(!l||b-2>e){var r=f(e+1,"...",!1);c.push(r)}if(l){if(e===b-2){var s=f(b-1,b-1,!1);c.push(s)}var t=f(b,b,!1);c.push(t)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers,m=angular.isDefined(b.pageLabel)?function(c){return a.$parent.$eval(b.pageLabel,{$page:c})}:angular.identity;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var n=this.render;this.render=function(){n(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},replace:!0,link:function(a,c,d,e){var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),o.removeTop(),b=null)}}var o=m.createNew();return h.on("keypress",n),k.$on("$destroy",function(){h.off("keypress",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="
'; +return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){N.isOpen?q():m()}function m(){M&&!a.$eval(d[k+"Enable"])||(u(),x(),N.popupDelay?G||(G=g(r,N.popupDelay,!1)):r())}function q(){s(),N.popupCloseDelay?H||(H=g(t,N.popupCloseDelay,!1)):t()}function r(){return s(),u(),N.content?(v(),void N.$evalAsync(function(){N.isOpen=!0,y(!0),S()})):angular.noop}function s(){G&&(g.cancel(G),G=null),I&&(g.cancel(I),I=null)}function t(){N&&N.$evalAsync(function(){N&&(N.isOpen=!1,y(!1),N.animation?F||(F=g(w,150,!1)):w())})}function u(){H&&(g.cancel(H),H=null),F&&(g.cancel(F),F=null)}function v(){D||(E=N.$new(),D=c(E,function(a){K?h.find("body").append(a):b.after(a)}),z())}function w(){s(),u(),A(),D&&(D.remove(),D=null),E&&(E.$destroy(),E=null)}function x(){N.title=d[k+"Title"],Q?N.content=Q(a):N.content=d[e],N.popupClass=d[k+"Class"],N.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=i.parsePlacement(N.placement);J=b[1]?b[0]+"-"+b[1]:b[0];var c=parseInt(d[k+"PopupDelay"],10),f=parseInt(d[k+"PopupCloseDelay"],10);N.popupDelay=isNaN(c)?n.popupDelay:c,N.popupCloseDelay=isNaN(f)?n.popupCloseDelay:f}function y(b){P&&angular.isFunction(P.assign)&&P.assign(a,b)}function z(){R.length=0,Q?(R.push(a.$watch(Q,function(a){N.content=a,!a&&N.isOpen&&t()})),R.push(E.$watch(function(){O||(O=!0,E.$$postDigest(function(){O=!1,N&&N.isOpen&&S()}))}))):R.push(d.$observe(e,function(a){N.content=a,!a&&N.isOpen?t():S()})),R.push(d.$observe(k+"Title",function(a){N.title=a,N.isOpen&&S()})),R.push(d.$observe(k+"Placement",function(a){N.placement=a?a:n.placement,N.isOpen&&S()}))}function A(){R.length&&(angular.forEach(R,function(a){a()}),R.length=0)}function B(a){N&&N.isOpen&&D&&(b[0].contains(a.target)||D[0].contains(a.target)||q())}function C(){var a=d[k+"Trigger"];T(),L=p(a),"none"!==L.show&&L.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===L.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(L.hide[c],q)),b.on("keypress",function(a){27===a.which&&q()})})}var D,E,F,G,H,I,J,K=angular.isDefined(n.appendToBody)?n.appendToBody:!1,L=p(void 0),M=angular.isDefined(d[k+"Enable"]),N=a.$new(!0),O=!1,P=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,Q=n.useContentExp?l(d[e]):!1,R=[],S=function(){D&&D.html()&&(I||(I=g(function(){var a=i.positionElements(b,D,N.placement,K);D.css({top:a.top+"px",left:a.left+"px"}),D.hasClass(a.placement.split("-")[0])||(D.removeClass(J.split("-")[0]),D.addClass(a.placement.split("-")[0])),D.hasClass(n.placementClassPrefix+a.placement)||(D.removeClass(n.placementClassPrefix+J),D.addClass(n.placementClassPrefix+a.placement)),D.hasClass("uib-position-measure")?(i.positionArrow(D,a.placement),D.removeClass("uib-position-measure")):J!==a.placement&&i.positionArrow(D,a.placement),J=a.placement,I=null},0,!1)))};N.origScope=a,N.isOpen=!1,o.add(N,{close:t}),N.contentExp=function(){return N.content},d.$observe("disabled",function(a){a&&s(),a&&N.isOpen&&t()}),P&&a.$watch(P,function(a){N&&!a===N.isOpen&&j()});var T=function(){L.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j))}),L.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};C();var U=a.$eval(d[k+"Animation"]);N.animation=angular.isDefined(U)?!!U:n.animation;var V,W=k+"AppendToBody";V=W in d&&void 0===d[W]?!0:a.$eval(d[W]),K=angular.isDefined(V)?V:K,a.$on("$destroy",function(){T(),w(),o.remove(N),N=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}b.popupClass&&c.addClass(b.popupClass),b.animation()&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{uibTitle:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",uibTitle:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{uibTitle:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){function d(){return angular.isDefined(a.maxParam)?a.maxParam:c.max}var e=this,f=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=d(),this.addBar=function(a,b,c){f||b.css({transition:"none"}),this.bars.push(a),a.max=d(),a.title=c&&angular.isDefined(c.title)?c.title:"progressbar",a.$watch("value",function(b){a.recalculatePercentage()}),a.recalculatePercentage=function(){var b=e.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);b>100&&(a.percent-=b-100)},a.$on("$destroy",function(){b=null,e.removeBar(a)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("maxParam",function(a){e.bars.forEach(function(a){a.max=d(),a.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{maxParam:"=?max"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",maxParam:"=?max",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,enableReset:!0,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop},e=this;this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff,this.enableReset=angular.isDefined(b.enableReset)?a.$parent.$eval(b.enableReset):c.enableReset;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){if(!a.readonly&&b>=0&&b<=a.range.length){var c=e.enableReset&&d.$viewValue===b?0:b;d.$setViewValue(c),d.$render()}},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue,a.title=e.getTitle(a.value-1)}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?readOnly",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){function b(a){for(var b=0;bb.index?1:a.index0&&13>b:b>=0&&24>b;return c&&""!==a.hours?(a.showMeridian&&(12===b&&(b=0),a.meridian===v[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes,c=b>=0&&60>b;return c&&""!==a.minutes?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a,b){return null===a?"":angular.isDefined(a)&&a.toString().length<2&&!b?"0"+a:a.toString()}function l(a){m(),u.$setViewValue(new Date(s)),n(a)}function m(){u.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(u.$modelValue){var c=s.getHours(),d=s.getMinutes(),e=s.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c,!w),"m"!==b&&(a.minutes=k(d)),a.meridian=s.getHours()<12?v[0]:v[1],"s"!==b&&(a.seconds=k(e)),a.meridian=s.getHours()<12?v[0]:v[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=v[0]}function o(a){s=q(s,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}function r(){return(null===a.hours||""===a.hours)&&(null===a.minutes||""===a.minutes)&&(!a.showSeconds||a.showSeconds&&(null===a.seconds||""===a.seconds))}var s=new Date,t=[],u={$setViewValue:angular.noop},v=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS,w=angular.isDefined(c.padHours)?a.$parent.$eval(c.padHours):!0;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){u=b,u.$render=this.render,u.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2),i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var x=g.hourStep;c.hourStep&&t.push(a.$parent.$watch(d(c.hourStep),function(a){x=+a}));var y=g.minuteStep;c.minuteStep&&t.push(a.$parent.$watch(d(c.minuteStep),function(a){y=+a}));var z;t.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);z=isNaN(b)?void 0:b}));var A;t.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);A=isNaN(b)?void 0:b}));var B=!1;c.ngDisabled&&t.push(a.$parent.$watch(d(c.ngDisabled),function(a){B=a})),a.noIncrementHours=function(){var a=p(s,60*x);return B||a>A||s>a&&z>a},a.noDecrementHours=function(){var a=p(s,60*-x);return B||z>a||a>s&&a>A},a.noIncrementMinutes=function(){var a=p(s,y);return B||a>A||s>a&&z>a},a.noDecrementMinutes=function(){var a=p(s,-y);return B||z>a||a>s&&a>A},a.noIncrementSeconds=function(){var a=q(s,C);return B||a>A||s>a&&z>a},a.noDecrementSeconds=function(){var a=q(s,-C);return B||z>a||a>s&&a>A},a.noToggleMeridian=function(){return s.getHours()<12?B||p(s,720)>A:B||p(s,-720)0};b.bind("mousewheel wheel",function(b){B||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){B||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.bind("mousewheel wheel",function(b){B||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.bind("keydown",function(b){B||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.bind("keydown",function(b){B||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.bind("keydown",function(b){B||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){u.$setViewValue(null),u.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c),angular.isDefined(d)&&(a.invalidSeconds=d)};a.updateHours=function(){var a=h(),b=i();u.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(s.setHours(a),s.setMinutes(b),z>s||s>A?e(!0):l("h")):e(!0)},b.bind("blur",function(b){u.$setTouched(),r()?m():null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours,!w)})}),a.updateMinutes=function(){var a=i(),b=h();u.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(s.setHours(b),s.setMinutes(a),z>s||s>A?e(void 0,!0):l("m")):e(void 0,!0)},c.bind("blur",function(b){u.$setTouched(),r()?m():null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();u.$setDirty(),angular.isDefined(a)?(s.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.bind("blur",function(b){r()?m():!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=u.$viewValue;isNaN(b)?(u.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(s=b),z>s||s>A?(u.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*x*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-x*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*y)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-y)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(C)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-C)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(s.getHours()<12?60:-60)):a.meridian=a.meridian===v[0]?v[1]:v[0])},a.blur=function(){u.$setTouched()},a.$on("$destroy",function(){for(;t.length;)t.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),Y()}function o(){N.position=D?l.offset(b):l.position(b),N.position.top+=b.prop("offsetHeight")}var p,q,r=[9,13,27,38,40],s=200,t=a.$eval(c.typeaheadMinLength);t||0===t||(t=1),a.$watch(c.typeaheadMinLength,function(a){t=a||0===a?a:1});var u=a.$eval(c.typeaheadWaitMs)||0,v=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){v=a!==!1});var w,x,y=e(c.typeaheadLoading).assign||angular.noop,z=e(c.typeaheadOnSelect),A=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,B=e(c.typeaheadNoResults).assign||angular.noop,C=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,D=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,E=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,F=a.$eval(c.typeaheadFocusFirst)!==!1,G=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,H=e(c.typeaheadIsOpen).assign||angular.noop,I=a.$eval(c.typeaheadShowHint)||!1,J=e(c.ngModel),K=e(c.ngModel+"($$$p)"),L=function(b,c){return angular.isFunction(J(a))&&q&&q.$options&&q.$options.getterSetter?K(b,{$$$p:c}):J.assign(b,c)},M=m.parse(c.uibTypeahead),N=a.$new(),O=a.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q,R;I&&(Q=angular.element("
"),Q.css("position","relative"),b.after(Q),R=b.clone(),R.attr("placeholder",""),R.attr("tabindex","-1"),R.val(""),R.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),Q.append(R),R.after(b));var S=angular.element("
");S.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&S.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&S.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var T=function(){I&&R.val("")},U=function(){N.matches=[],N.activeIdx=-1,b.attr("aria-expanded",!1),T()},V=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",V(a))});var W=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},X=function(c,d){var e={$viewValue:c};y(a,!0),B(a,!1),f.when(M.source(a,e)).then(function(f){var g=c===p.$viewValue;if(g&&w)if(f&&f.length>0){N.activeIdx=F?0:-1,B(a,!1),N.matches.length=0;for(var h=0;h0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?R.val(c+i.slice(c.length)):R.val("")}}else U(),B(a,!0);g&&y(a,!1)},function(){U(),y(a,!1),B(a,!0)})};D&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var Y=k(function(){N.matches.length&&o(),N.moveInProgress=!1},s);N.moveInProgress=!1,N.query=void 0;var Z,$=function(a){Z=g(function(){X(a)},u)},_=function(){Z&&g.cancel(Z)};U(),N.assignIsOpen=function(b){H(a,b)},N.select=function(d,e){var f,h,i={};x=!0,i[M.itemName]=h=N.matches[d].model,f=M.modelMapper(a,i),L(a,f),p.$setValidity("editable",!0),p.$setValidity("parse",!0),z(a,{$item:h,$model:f,$label:M.viewMapper(a,i),$event:e}),U(),N.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(b){if(0!==N.matches.length&&-1!==r.indexOf(b.which)){if(-1===N.activeIdx&&(9===b.which||13===b.which)||9===b.which&&b.shiftKey)return U(),void N.$digest();b.preventDefault();var c;switch(b.which){case 9:case 13:N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(N.activeIdx,b)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(N.activeIdx,b)});break;case 27:b.stopPropagation(),U(),a.$digest();break;case 38:N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest(),c=S.find("li")[N.activeIdx],c.parentNode.scrollTop=c.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),c=S.find("li")[N.activeIdx],c.parentNode.scrollTop=c.offsetTop}}}),b.bind("focus",function(a){w=!0,0!==t||p.$viewValue||g(function(){X(p.$viewValue,a)},0)}),b.bind("blur",function(a){A&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?k(function(){N.select(N.activeIdx,a)},N.debounceUpdate.blur):N.select(N.activeIdx,a)})),!v&&p.$error.editable&&(p.$setViewValue(),p.$setValidity("editable",!0),p.$setValidity("parse",!0),b.val("")),w=!1,x=!1});var aa=function(c){b[0]!==c.target&&3!==c.which&&0!==N.matches.length&&(U(),j.$$phase||a.$digest())};h.on("click",aa),a.$on("$destroy",function(){h.off("click",aa),(D||E)&&ba.remove(),D&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),S.remove(),I&&Q.remove()});var ba=d(S)(N);D?h.find("body").append(ba):E?angular.element(E).eq(0).append(ba):b.after(ba),this.init=function(b,c){p=b,q=c,N.debounceUpdate=p.$options&&e(p.$options.debounce)(a),p.$parsers.unshift(function(b){return w=!0,0===t||b&&b.length>=t?u>0?(_(),$(b)):X(b):(y(a,!1),_(),U()),v?b:b?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0),null)}),p.$formatters.push(function(b){var c,d,e={};return v||p.$setValidity("editable",!0),C?(e.$model=b,C(a,e)):(e[M.itemName]=b,c=M.viewMapper(a,e),e[M.itemName]=void 0,d=M.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"$&"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'
\n \n
\n
\n
\n
\n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'
')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'\n'); +}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'
\n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'
\n \n \n \n
\n')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{{::label.abbr}}
{{ weekNumbers[$index] }}\n \n
\n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n')}]),angular.module("uib/template/datepickerPopup/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepickerPopup/popup.html",'
\n \n
\n')}]),angular.module("uib/template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/backdrop.html",'\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html",'\n')}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'
\n
\n
\n
\n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'
\n
\n
\n
\n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'
\n
\n
\n
\n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'
\n
\n\n
\n

\n
\n
\n
\n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'
\n
\n\n
\n

\n
\n
\n
\n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'
\n
\n\n
\n

\n
\n
\n
\n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'
\n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'
')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'
\n
\n
\n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'\n ({{ $index < value ? \'*\' : \' \' }})\n \n\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'\n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'
\n \n
\n
\n
\n
\n
\n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
  
\n \n :\n \n :\n \n
  
\n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibCarouselCss&&angular.element(document).find("head").prepend(''),angular.$$uibCarouselCss=!0}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerCss&&angular.element(document).find("head").prepend(''),angular.$$uibDatepickerCss=!0}),angular.module("ui.bootstrap.position").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibPositionCss&&angular.element(document).find("head").prepend(''),angular.$$uibPositionCss=!0}),angular.module("ui.bootstrap.datepickerPopup").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerpopupCss&&angular.element(document).find("head").prepend(''),angular.$$uibDatepickerpopupCss=!0}),angular.module("ui.bootstrap.tooltip").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTooltipCss&&angular.element(document).find("head").prepend(''),angular.$$uibTooltipCss=!0}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTimepickerCss&&angular.element(document).find("head").prepend(''),angular.$$uibTimepickerCss=!0}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTypeaheadCss&&angular.element(document).find("head").prepend(''),angular.$$uibTypeaheadCss=!0}); \ No newline at end of file diff --git a/static/html/bower_components/angular-bootstrap/ui-bootstrap.min.js b/static/html/bower_components/angular-bootstrap/ui-bootstrap.min.js new file mode 100644 index 00000000..8cfd7f0e --- /dev/null +++ b/static/html/bower_components/angular-bootstrap/ui-bootstrap.min.js @@ -0,0 +1,10 @@ +/* + * angular-ui-bootstrap + * http://angular-ui.github.io/bootstrap/ + + * Version: 1.3.2 - 2016-04-14 + * License: MIT + */angular.module("ui.bootstrap",["ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(a,b,c,d){var e=d.has("$animateCss")?d.get("$animateCss"):null;return{link:function(d,f,g){function h(){f.hasClass("collapse")&&f.hasClass("in")||b.resolve(l(d)).then(function(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{addClass:"in",easing:"ease",to:{height:f[0].scrollHeight+"px"}}).start()["finally"](i):a.addClass(f,"in",{to:{height:f[0].scrollHeight+"px"}}).then(i)})}function i(){f.removeClass("collapsing").addClass("collapse").css({height:"auto"}),m(d)}function j(){return f.hasClass("collapse")||f.hasClass("in")?void b.resolve(n(d)).then(function(){f.css({height:f[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),e?e(f,{removeClass:"in",to:{height:"0"}}).start()["finally"](k):a.removeClass(f,"in",{to:{height:"0"}}).then(k)}):k()}function k(){f.css({height:"0"}),f.removeClass("collapsing").addClass("collapse"),o(d)}var l=c(g.expanding),m=c(g.expanded),n=c(g.collapsing),o=c(g.collapsed);d.$eval(g.uibCollapse)||f.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css({height:"auto"}),d.$watch(g.uibCollapse,function(a){a?j():h()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",panelClass:"@?",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)};var e="accordiongroup-"+a.$id+"-"+Math.floor(1e4*Math.random());a.headingId=e+"-tab",a.panelId=e+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.uibAccordionTransclude]},function(a){if(a){var c=angular.element(b[0].querySelector("[uib-accordion-header]"));c.html(""),c.append(a)}})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(a,b,c,d){a.closeable=!!b.close;var e=angular.isDefined(b.dismissOnTimeout)?c(b.dismissOnTimeout)(a.$parent):null;e&&d(function(){a.close()},parseInt(e,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);a&&!angular.isDefined(d.uncheckable)||b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":void 0)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(){for(;t.length;)t.shift()}function g(a){for(var b=0;b1){q[d].element.data(r,c.direction);var j=p.getCurrentIndex();angular.isNumber(j)&&q[j].element&&q[j].element.data(r,c.direction),a.$currentTransition=!0,e.on("addClass",q[d].element,function(b,c){if("close"===c&&(a.$currentTransition=null,e.off("addClass",b),t.length)){var d=t.pop().slide,g=d.index,i=g>p.getCurrentIndex()?"next":"prev";f(),h(d,g,i)}})}a.active=c.index,s=c.index,g(d),l()}}function i(a){for(var b=0;b0&&(n=c(m,b))}function m(){var b=+a.interval;o&&!isNaN(b)&&b>0&&q.length?a.next():a.pause()}var n,o,p=this,q=p.slides=a.slides=[],r="uib-slideDirection",s=a.active,t=[],u=!1;p.addSlide=function(b,c){q.push({slide:b,element:c}),q.sort(function(a,b){return+a.slide.index-+b.slide.index}),(b.index===a.active||1===q.length&&!angular.isNumber(a.active))&&(a.$currentTransition&&(a.$currentTransition=null),s=b.index,a.active=b.index,g(s),p.select(q[i(b)]),1===q.length&&a.play())},p.getCurrentIndex=function(){for(var a=0;a0&&s===c?c>=q.length?(s=q.length-1,a.active=s,g(s),p.select(q[q.length-1])):(s=c,a.active=s,g(s),p.select(q[c])):s>c&&(s--,a.active=s),0===q.length&&(s=null,a.active=null,f())},p.select=a.select=function(b,c){var d=i(b.slide);void 0===c&&(c=d>p.getCurrentIndex()?"next":"prev"),b.slide.index===s||a.$currentTransition?b&&b.slide.index!==s&&a.$currentTransition&&t.push(q[d]):h(b.slide,d,c)},a.indexOfSlide=function(a){return+a.slide.index},a.isActive=function(b){return a.active===b.slide.index},a.isPrevDisabled=function(){return 0===a.active&&a.noWrap()},a.isNextDisabled=function(){return a.active===q.length-1&&a.noWrap()},a.pause=function(){a.noPause||(o=!1,j())},a.play=function(){o||(o=!0,l())},a.$on("$destroy",function(){u=!0,j()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",l),a.$watchCollection("slides",k),a.$watch("active",function(a){if(angular.isNumber(a)&&s!==a){for(var b=0;b-1){var g=!1;a=a.split("");for(var h=f;h-1){a=a.split(""),e[f]="("+d.regex+")",a[f]="$";for(var g=f+1,h=f+d.key.length;h>g;g++)e[g]="",a[g]="$";a=a.join(""),c.push({index:f,key:d.key,apply:d[b],matcher:d.regex})}}),{regex:new RegExp("^"+e.join("")+"$"),map:d(c,"index")}}function f(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function g(a){return parseInt(a,10)}function h(a,b){return a&&b?l(a,b):a}function i(a,b){return a&&b?l(a,b,!0):a}function j(a,b){var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function k(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function l(a,b,c){c=c?-1:1;var d=j(b,a.getTimezoneOffset());return k(a,c*(d-a.getTimezoneOffset()))}var m,n,o=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){m=b.id,this.parsers={},this.formatters={},n=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){a=+a,this.year=69>a?a+2e3:a+1900},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=g(c+d),this.minutes+=g(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}]},this.init(),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==m&&this.init(),this.formatters[c]||(this.formatters[c]=e(c,"formatter"));var d=this.formatters[c],f=d.map,g=c;return f.reduce(function(b,c,d){var e=g.match(new RegExp("(.*)"+c.key));e&&angular.isString(e[1])&&(b+=e[1],g=g.replace(e[1]+c.key,""));var h=d===f.length-1?g:"";return c.apply?b+c.apply.call(null,a)+h:b+h},"")},this.parse=function(c,d,g){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(o,"\\$&"),b.id!==m&&this.init(),this.parsers[d]||(this.parsers[d]=e(d,"apply"));var h=this.parsers[d],i=h.regex,j=h.map,k=c.match(i),l=!1;if(k&&k.length){var n,p;angular.isDate(g)&&!isNaN(g.getTime())?n={year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:(g&&a.warn("dateparser:","baseDate is not a valid date"),n={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var q=1,r=k.length;r>q;q++){var s=j[q-1];"Z"===s.matcher&&(l=!0),s.apply&&s.apply.call(n,k[q])}var t=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return f(n.year,n.month,n.date)&&(!angular.isDate(g)||isNaN(g.getTime())||l?(p=new Date(0),t.call(p,n.year,n.month,n.date),u.call(p,n.hours||0,n.minutes||0,n.seconds||0,n.milliseconds||0)):(p=new Date(g),t.call(p,n.year,n.month,n.date),u.call(p,n.hours,n.minutes,n.seconds,n.milliseconds))),p}},this.toTimezone=h,this.fromTimezone=i,this.timezoneToOffset=j,this.addDateMinutes=k,this.convertTimezoneToLocal=l}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass"]).value("$datepickerSuppressError",!1).value("$datepickerLiteralWarning",!0).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerLiteralWarning","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i,j,k){function l(b){a.datepickerMode=b,a.datepickerOptions.datepickerMode=b}var m=this,n={$setViewValue:angular.noop},o={},p=[];!!b.datepickerOptions;a.datepickerOptions||(a.datepickerOptions={}),this.modes=["day","month","year"],["customClass","dateDisabled","datepickerMode","formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","maxDate","maxMode","minDate","minMode","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"].forEach(function(b){switch(b){case"customClass":case"dateDisabled":a[b]=a.datepickerOptions[b]||angular.noop;break;case"datepickerMode":a.datepickerMode=angular.isDefined(a.datepickerOptions.datepickerMode)?a.datepickerOptions.datepickerMode:h.datepickerMode;break;case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":m[b]=angular.isDefined(a.datepickerOptions[b])?d(a.datepickerOptions[b])(a.$parent):h[b];break;case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":m[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:h[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?m.startingDay=a.datepickerOptions.startingDay:angular.isNumber(h.startingDay)?m.startingDay=h.startingDay:m.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.$watch("datepickerOptions."+b,function(a){a?angular.isDate(a)?m[b]=k.fromTimezone(new Date(a),o.timezone):(i&&f.warn("Literal date support has been deprecated, please switch to date object usage"),m[b]=new Date(g(a,"medium"))):m[b]=h[b]?k.fromTimezone(new Date(h[b]),o.timezone):null,m.refreshView()});break;case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){m[b]=a[b]=angular.isDefined(c)?c:datepickerOptions[b],("minMode"===b&&m.modes.indexOf(a.datepickerOptions.datepickerMode)m.modes.indexOf(m[b]))&&(a.datepickerMode=m[b],a.datepickerOptions.datepickerMode=m[b])}):m[b]=a[b]=h[b]||null}}),a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(b.disabled)||!1,angular.isDefined(b.ngDisabled)&&p.push(a.$parent.$watch(b.ngDisabled,function(b){a.disabled=b,m.refreshView()})),a.isActive=function(b){return 0===m.compare(b.date,m.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(b){n=b,o=b.$options||h.ngModelOptions,a.datepickerOptions.initDate?(m.activeDate=k.fromTimezone(a.datepickerOptions.initDate,o.timezone)||new Date,a.$watch("datepickerOptions.initDate",function(a){a&&(n.$isEmpty(n.$modelValue)||n.$invalid)&&(m.activeDate=k.fromTimezone(a,o.timezone),m.refreshView())})):m.activeDate=new Date,this.activeDate=n.$modelValue?k.fromTimezone(new Date(n.$modelValue),o.timezone):k.fromTimezone(new Date,o.timezone),n.$render=function(){m.render()}},this.render=function(){if(n.$viewValue){var a=new Date(n.$viewValue),b=!isNaN(a);b?this.activeDate=k.fromTimezone(a,o.timezone):j||f.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=n.$viewValue?new Date(n.$viewValue):null;b=k.fromTimezone(b,o.timezone),n.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=n.$viewValue?new Date(n.$viewValue):null;d=k.fromTimezone(d,o.timezone);var e=new Date;e=k.fromTimezone(e,o.timezone);var f=this.compare(b,e),g={date:b,label:k.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),past:0>f,current:0===f,future:f>0,customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=g),m.activeDate&&0===this.compare(g.date,m.activeDate)&&(a.activeDt=g),g},this.isDisabled=function(b){return a.disabled||this.minDate&&this.compare(b,this.minDate)<0||this.maxDate&&this.compare(b,this.maxDate)>0||a.dateDisabled&&a.dateDisabled({date:b,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===m.minMode){var c=n.$viewValue?k.fromTimezone(new Date(n.$viewValue),o.timezone):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=k.toTimezone(c,o.timezone),n.$setViewValue(c),n.$render()}else m.activeDate=b,l(m.modes[m.modes.indexOf(a.datepickerMode)-1]),a.$emit("uib:datepicker.mode");a.$broadcast("uib:datepicker.focus")},a.move=function(a){var b=m.activeDate.getFullYear()+a*(m.step.years||0),c=m.activeDate.getMonth()+a*(m.step.months||0);m.activeDate.setFullYear(b,c,1),m.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===m.maxMode&&1===b||a.datepickerMode===m.minMode&&-1===b||(l(m.modes[m.modes.indexOf(a.datepickerMode)+b]),a.$emit("uib:datepicker.mode"))},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var q=function(){m.element[0].focus()};a.$on("uib:datepicker.focus",q),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),m.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(m.isDisabled(m.activeDate))return;a.select(m.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(m.handleKeyDown(c,b),m.refreshView()):a.toggleMode("up"===c?1:-1)},a.$on("$destroy",function(){for(;p.length;)p.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerOptions:"=?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d,e={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},f={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/},g=/(HTML|BODY)/;return{getRawNode:function(a){return a.nodeName?a:a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(e){if(e){if(angular.isUndefined(d)){var f=a.find("body");f.addClass("uib-position-body-scrollbar-measure"),d=b.innerWidth-f[0].clientWidth,d=isFinite(d)?d:0,f.removeClass("uib-position-body-scrollbar-measure")}return d}if(angular.isUndefined(c)){var g=angular.element('
');a.find("body").append(g),c=g[0].offsetWidth-g[0].clientWidth,c=isFinite(c)?c:0,g.remove()}return c},scrollbarPadding:function(a){a=this.getRawNode(a);var c=b.getComputedStyle(a),d=this.parseStyle(c.paddingRight),e=this.parseStyle(c.paddingBottom),f=this.scrollParent(a,!1,!0),h=this.scrollbarWidth(f,g.test(f.tagName));return{scrollbarWidth:h,widthOverflow:f.scrollWidth>f.clientWidth,right:d+h,originalRight:d,heightOverflow:f.scrollHeight>f.clientHeight,bottom:e+h,originalBottom:e}},isScrollable:function(a,c){a=this.getRawNode(a);var d=c?e.hidden:e.normal,f=b.getComputedStyle(a);return d.test(f.overflow+f.overflowY+f.overflowX)},scrollParent:function(c,d,f){c=this.getRawNode(c);var g=d?e.hidden:e.normal,h=a[0].documentElement,i=b.getComputedStyle(c);if(f&&g.test(i.overflow+i.overflowY+i.overflowX))return c;var j="absolute"===i.position,k=c.parentElement||h;if(k===h||"fixed"===i.position)return h;for(;k.parentElement&&k!==h;){var l=b.getComputedStyle(k);if(j&&"static"!==l.position&&(j=!1),!j&&g.test(l.overflow+l.overflowY+l.overflowX))break;k=k.parentElement}return k},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight), +top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=f.auto.test(a);return b&&(a=a.replace(f.auto,"")),a=a.split("-"),a[0]=a[0]||"top",f.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",f.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,e){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=e?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a,e),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(f.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":f.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var e=angular.element(d).hasClass("tooltip-inner"),g=e?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){var h={top:"",bottom:"",left:"",right:""};if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css(h);var i="border-"+c[0]+"-width",j=b.getComputedStyle(g)[i],k="border-";k+=f.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],k+="-radius";var l=b.getComputedStyle(e?d:a)[k];switch(c[0]){case"top":h.bottom=e?"0":"-"+j;break;case"bottom":h.top=e?"0":"-"+j;break;case"left":h.right=e?"0":"-"+j;break;case"right":h.left=e?"0":"-"+j}h[c[1]]=l,angular.element(g).css(h)}}}}}]),angular.module("ui.bootstrap.datepickerPopup",["ui.bootstrap.datepicker","ui.bootstrap.position"]).value("$datepickerPopupLiteralWarning",!0).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepickerPopup/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0,placement:"auto bottom-left"}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$log","$parse","$window","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig","$datepickerPopupLiteralWarning",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){function q(b){var c=l.parse(b,w,a.date);if(isNaN(c))for(var d=0;d
"),G?(J=G.timezone,a.ngModelOptions=angular.copy(G),a.ngModelOptions.timezone=null,a.ngModelOptions.updateOnDefault===!0&&(a.ngModelOptions.updateOn=a.ngModelOptions.updateOn?a.ngModelOptions.updateOn+" default":"default"),C.attr("ng-model-options","ngModelOptions")):J=null,C.attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":A}),D=angular.element(C.children()[0]),D.attr("template-url",B),a.datepickerOptions||(a.datepickerOptions={}),K&&"month"===c.type&&(a.datepickerOptions.datepickerMode="month",a.datepickerOptions.minMode="month"),D.attr("datepicker-options","datepickerOptions"),K?F.$formatters.push(function(b){return a.date=l.fromTimezone(b,J),b}):(F.$$parserName="date",F.$validators.date=s,F.$parsers.unshift(r),F.$formatters.push(function(b){return F.$isEmpty(b)?(a.date=b,b):(a.date=l.fromTimezone(b,J),angular.isNumber(a.date)&&(a.date=new Date(a.date)),l.filter(a.date,w))})),F.$viewChangeListeners.push(function(){a.date=q(F.$viewValue)}),b.on("keydown",u),H=d(C)(a),C.remove(),y?h.find("body").append(H):b.after(H),a.$on("$destroy",function(){for(a.isOpen===!0&&(i.$$phase||a.$apply(function(){a.isOpen=!1})),H.remove(),b.off("keydown",u),h.off("click",t),E&&E.off("scroll",v),angular.element(g).off("resize",v);L.length;)L.shift()()})},a.getText=function(b){return a[b+"Text"]||m[b+"Text"]},a.isDisabled=function(b){"today"===b&&(b=l.fromTimezone(new Date,J));var c={};return angular.forEach(["minDate","maxDate"],function(b){a.datepickerOptions[b]?angular.isDate(a.datepickerOptions[b])?c[b]=l.fromTimezone(new Date(a.datepickerOptions[b]),J):(p&&e.warn("Literal date support has been deprecated, please switch to date object usage"),c[b]=new Date(k(a.datepickerOptions[b],"medium"))):c[b]=null}),a.datepickerOptions&&c.minDate&&a.compare(b,c.minDate)<0||c.maxDate&&a.compare(b,c.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?l.filter(a.date,w):null;b.val(d),F.$setViewValue(d),x&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b,c){if(c.stopPropagation(),"today"===b){var d=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate())):b=new Date(d.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(c){c.stopPropagation(),a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&L.push(a.$parent.$watch(f(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(d){d?a.disabled?a.isOpen=!1:n(function(){v(),z&&a.$broadcast("uib:datepicker.focus"),h.on("click",t);var d=c.popupPlacement?c.popupPlacement:m.placement;y||j.parsePlacement(d)[2]?(E=E||angular.element(j.scrollParent(b)),E&&E.on("scroll",v)):E=null,angular.element(g).on("resize",v)},0,!1):(h.off("click",t),E&&E.off("scroll",v),angular.element(g).off("resize",v))}),a.$on("uib:datepicker.mode",function(){n(v,0,!1)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepickerPopup/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b,f){c||(a.on("click",d),f.on("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b,f){c===b&&(c=null,a.off("click",d),f.off("keydown",e))};var d=function(a){if(c&&!(a&&"disabled"===c.getAutoClose()||a&&3===a.which)){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(a.stopPropagation(),c.focusToggleElement(),d()):c.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.appendToOpenClass,q=e.openClass,r=angular.noop,s=c.onToggle?d(c.onToggle):angular.noop,t=!1,u=null,v=!1,w=i.find("body");b.addClass("dropdown"),this.init=function(){if(c.isOpen&&(m=d(c.isOpen),r=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),angular.isDefined(c.dropdownAppendTo)){var e=d(c.dropdownAppendTo)(o);e&&(u=angular.element(e))}t=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.keyboardNav),t&&!u&&(u=w),u&&n.dropdownMenu&&(u.append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen,angular.isFunction(r)&&r(o,o.isOpen),o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return v},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(u&&n.dropdownMenu){var e,i,m=h.positionElements(b,n.dropdownMenu,"bottom-left",!0);if(e={top:m.top+"px",display:c?"block":"none"},i=n.dropdownMenu.hasClass("dropdown-menu-right"),i?(e.left="auto",e.right=window.innerWidth-(m.left+b.prop("offsetWidth"))+"px"):(e.left=m.left+"px",e.right="auto"),!t){var v=h.offset(u);e.top=m.top-v.top+"px",i?e.right=window.innerWidth-(m.left-v.left+b.prop("offsetWidth"))+"px":e.left=m.left-v.left+"px"}n.dropdownMenu.css(e)}var w=u?u:b,x=w.hasClass(u?p:q);if(x===!c&&g[c?"addClass":"removeClass"](w,u?p:q).then(function(){angular.isDefined(c)&&c!==d&&s(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o,b);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var y=angular.element('');n.dropdownMenu.replaceWith(y),n.dropdownMenu=y}f.close(o,b),n.selectedOption=null}angular.isFunction(r)&&r(a,c)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c-1&&y>a&&(a=y),a}function l(a,b){var c=v.get(a).value,d=c.appendTo;v.remove(a),z=v.top(),z&&(y=parseInt(z.value.modalDomEl.attr("index"),10)),o(c.modalDomEl,c.modalScope,function(){var b=c.openedClass||u;w.remove(b,a);var e=w.hasKey(b);d.toggleClass(b,e),!e&&t&&t.heightOverflow&&t.scrollbarWidth&&(t.originalRight?d.css({paddingRight:t.originalRight+"px"}):d.css({paddingRight:""}),t=null),m(!0)},c.closedDeferred),n(),b&&b.focus?b.focus():d.focus&&d.focus()}function m(a){var b;v.length()>0&&(b=v.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function n(){if(r&&-1===k()){var a=s;o(r,s,function(){a=null}),r=void 0,s=void 0}}function o(b,c,d,e){function g(){g.done||(g.done=!0,a.leave(b).then(function(){b.remove(),e&&e.resolve()}),c.$destroy(),d&&d())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(x.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function p(a){if(a.isDefaultPrevented())return a;var b=v.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){x.dismiss(b.key,"escape key press")}));break;case 9:var c=x.loadFocusElementList(b),d=!1;a.shiftKey?(x.isFocusInFirstItem(a,c)||x.isModalFocused(a,b))&&(d=x.focusLastFocusableElement(c)):x.isFocusInLastItem(a,c)&&(d=x.focusFirstFocusableElement(c)),d&&(a.preventDefault(),a.stopPropagation())}}function q(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var r,s,t,u="modal-open",v=h.createNew(),w=g.createNew(),x={NOW_CLOSING_EVENT:"modal.stack.now-closing"},y=0,z=null,A="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(k,function(a){s&&(s.index=a)}),c.on("keydown",p),e.$on("$destroy",function(){c.off("keydown",p)}),x.open=function(b,f){var g=c[0].activeElement,h=f.openedClass||u;m(!1),z=v.top(),v.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),w.put(h,b);var j=f.appendTo,l=k();if(!j.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");l>=0&&!r&&(s=e.$new(!0),s.modalOptions=f,s.index=l,r=angular.element('
'),r.attr("backdrop-class",f.backdropClass),f.animation&&r.attr("modal-animation","true"),d(r)(s),a.enter(r,j),t=i.scrollbarPadding(j),t.heightOverflow&&t.scrollbarWidth&&j.css({paddingRight:t.right+"px"})),y=z?parseInt(z.value.modalDomEl.attr("index"),10)+1:0;var n=angular.element('
');n.attr({"template-url":f.windowTemplateUrl,"window-class":f.windowClass,"window-top-class":f.windowTopClass,size:f.size,index:y,animate:"animate"}).html(f.content),f.animation&&n.attr("modal-animation","true"),j.addClass(h),a.enter(d(n)(f.scope),j),v.top().value.modalDomEl=n,v.top().value.modalOpener=g},x.close=function(a,b){var c=v.get(a);return c&&q(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),l(a,c.value.modalOpener),!0):!c},x.dismiss=function(a,b){var c=v.get(a);return c&&q(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),l(a,c.value.modalOpener),!0):!c},x.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},x.getTop=function(){return v.top()},x.modalRendered=function(a){var b=v.get(a);b&&b.value.renderDeferred.resolve()},x.focusFirstFocusableElement=function(a){return a.length>0?(a[0].focus(),!0):!1},x.focusLastFocusableElement=function(a){return a.length>0?(a[a.length-1].focus(),!0):!1},x.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},x.isFocusInFirstItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[0]:!1},x.isFocusInLastItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[b.length-1]:!1},x.loadFocusElementList=function(a){if(a){var b=a.value.modalDomEl;if(b&&b.length){var c=b[0].querySelectorAll(A);return c?Array.prototype.filter.call(c,function(a){return j(a)}):c}}},x}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return r}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=c.all([i(e),g.resolve(e.resolve,{},null,null)]);return q=k=c.all([k]).then(j,j).then(function(a){var c=e.scope||b,d=c.$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var g,i,j={};e.controller&&(j.$scope=d,j.$uibModalInstance=p,angular.forEach(a[1],function(a,b){j[b]=a}),i=f(e.controller,j,!0),e.controllerAs?(g=i.instance,e.bindToController&&(g.$close=d.$close,g.$dismiss=d.$dismiss,angular.extend(g,c)),g=i(),d[e.controllerAs]=g):g=i(),angular.isFunction(g.$onInit)&&g.$onInit()),h.open(p,{scope:d,deferred:l,renderDeferred:o,closedDeferred:n,content:a[0],animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo}),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===q&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(a,e){b.ngModelCtrl=a,b.config=e,a.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(d.itemsPerPage,function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=e.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var n=f(h,m(h),h===a);c.push(n)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var o=f(d-1,"...",!1);c.unshift(o)}if(l){if(3===d){var p=f(2,"2",!1);c.unshift(p)}var q=f(1,"1",!1);c.unshift(q)}}if(b>e){if(!l||b-2>e){var r=f(e+1,"...",!1);c.push(r)}if(l){if(e===b-2){var s=f(b-1,b-1,!1);c.push(s)}var t=f(b,b,!1);c.push(t)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers,m=angular.isDefined(b.pageLabel)?function(c){return a.$parent.$eval(b.pageLabel,{$page:c})}:angular.identity;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var n=this.render;this.render=function(){n(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},replace:!0,link:function(a,c,d,e){var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),o.removeTop(),b=null)}}var o=m.createNew();return h.on("keypress",n),k.$on("$destroy",function(){h.off("keypress",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="
';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){N.isOpen?q():m()}function m(){M&&!a.$eval(d[k+"Enable"])||(u(),x(),N.popupDelay?G||(G=g(r,N.popupDelay,!1)):r())}function q(){s(),N.popupCloseDelay?H||(H=g(t,N.popupCloseDelay,!1)):t()}function r(){return s(),u(),N.content?(v(),void N.$evalAsync(function(){N.isOpen=!0,y(!0),S()})):angular.noop}function s(){G&&(g.cancel(G),G=null),I&&(g.cancel(I),I=null)}function t(){N&&N.$evalAsync(function(){N&&(N.isOpen=!1,y(!1),N.animation?F||(F=g(w,150,!1)):w())})}function u(){H&&(g.cancel(H),H=null),F&&(g.cancel(F),F=null)}function v(){D||(E=N.$new(),D=c(E,function(a){K?h.find("body").append(a):b.after(a)}),z())}function w(){s(),u(),A(),D&&(D.remove(),D=null),E&&(E.$destroy(),E=null)}function x(){N.title=d[k+"Title"],Q?N.content=Q(a):N.content=d[e],N.popupClass=d[k+"Class"],N.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=i.parsePlacement(N.placement);J=b[1]?b[0]+"-"+b[1]:b[0];var c=parseInt(d[k+"PopupDelay"],10),f=parseInt(d[k+"PopupCloseDelay"],10); +N.popupDelay=isNaN(c)?n.popupDelay:c,N.popupCloseDelay=isNaN(f)?n.popupCloseDelay:f}function y(b){P&&angular.isFunction(P.assign)&&P.assign(a,b)}function z(){R.length=0,Q?(R.push(a.$watch(Q,function(a){N.content=a,!a&&N.isOpen&&t()})),R.push(E.$watch(function(){O||(O=!0,E.$$postDigest(function(){O=!1,N&&N.isOpen&&S()}))}))):R.push(d.$observe(e,function(a){N.content=a,!a&&N.isOpen?t():S()})),R.push(d.$observe(k+"Title",function(a){N.title=a,N.isOpen&&S()})),R.push(d.$observe(k+"Placement",function(a){N.placement=a?a:n.placement,N.isOpen&&S()}))}function A(){R.length&&(angular.forEach(R,function(a){a()}),R.length=0)}function B(a){N&&N.isOpen&&D&&(b[0].contains(a.target)||D[0].contains(a.target)||q())}function C(){var a=d[k+"Trigger"];T(),L=p(a),"none"!==L.show&&L.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===L.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(L.hide[c],q)),b.on("keypress",function(a){27===a.which&&q()})})}var D,E,F,G,H,I,J,K=angular.isDefined(n.appendToBody)?n.appendToBody:!1,L=p(void 0),M=angular.isDefined(d[k+"Enable"]),N=a.$new(!0),O=!1,P=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,Q=n.useContentExp?l(d[e]):!1,R=[],S=function(){D&&D.html()&&(I||(I=g(function(){var a=i.positionElements(b,D,N.placement,K);D.css({top:a.top+"px",left:a.left+"px"}),D.hasClass(a.placement.split("-")[0])||(D.removeClass(J.split("-")[0]),D.addClass(a.placement.split("-")[0])),D.hasClass(n.placementClassPrefix+a.placement)||(D.removeClass(n.placementClassPrefix+J),D.addClass(n.placementClassPrefix+a.placement)),D.hasClass("uib-position-measure")?(i.positionArrow(D,a.placement),D.removeClass("uib-position-measure")):J!==a.placement&&i.positionArrow(D,a.placement),J=a.placement,I=null},0,!1)))};N.origScope=a,N.isOpen=!1,o.add(N,{close:t}),N.contentExp=function(){return N.content},d.$observe("disabled",function(a){a&&s(),a&&N.isOpen&&t()}),P&&a.$watch(P,function(a){N&&!a===N.isOpen&&j()});var T=function(){L.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j))}),L.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};C();var U=a.$eval(d[k+"Animation"]);N.animation=angular.isDefined(U)?!!U:n.animation;var V,W=k+"AppendToBody";V=W in d&&void 0===d[W]?!0:a.$eval(d[W]),K=angular.isDefined(V)?V:K,a.$on("$destroy",function(){T(),w(),o.remove(N),N=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}b.popupClass&&c.addClass(b.popupClass),b.animation()&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{uibTitle:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",uibTitle:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{uibTitle:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){function d(){return angular.isDefined(a.maxParam)?a.maxParam:c.max}var e=this,f=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=d(),this.addBar=function(a,b,c){f||b.css({transition:"none"}),this.bars.push(a),a.max=d(),a.title=c&&angular.isDefined(c.title)?c.title:"progressbar",a.$watch("value",function(b){a.recalculatePercentage()}),a.recalculatePercentage=function(){var b=e.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);b>100&&(a.percent-=b-100)},a.$on("$destroy",function(){b=null,e.removeBar(a)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("maxParam",function(a){e.bars.forEach(function(a){a.max=d(),a.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{maxParam:"=?max"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",maxParam:"=?max",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,enableReset:!0,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop},e=this;this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff,this.enableReset=angular.isDefined(b.enableReset)?a.$parent.$eval(b.enableReset):c.enableReset;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){if(!a.readonly&&b>=0&&b<=a.range.length){var c=e.enableReset&&d.$viewValue===b?0:b;d.$setViewValue(c),d.$render()}},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue,a.title=e.getTitle(a.value-1)}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?readOnly",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){function b(a){for(var b=0;bb.index?1:a.index0&&13>b:b>=0&&24>b;return c&&""!==a.hours?(a.showMeridian&&(12===b&&(b=0),a.meridian===v[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes,c=b>=0&&60>b;return c&&""!==a.minutes?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a,b){return null===a?"":angular.isDefined(a)&&a.toString().length<2&&!b?"0"+a:a.toString()}function l(a){m(),u.$setViewValue(new Date(s)),n(a)}function m(){u.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(u.$modelValue){var c=s.getHours(),d=s.getMinutes(),e=s.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c,!w),"m"!==b&&(a.minutes=k(d)),a.meridian=s.getHours()<12?v[0]:v[1],"s"!==b&&(a.seconds=k(e)),a.meridian=s.getHours()<12?v[0]:v[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=v[0]}function o(a){s=q(s,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}function r(){return(null===a.hours||""===a.hours)&&(null===a.minutes||""===a.minutes)&&(!a.showSeconds||a.showSeconds&&(null===a.seconds||""===a.seconds))}var s=new Date,t=[],u={$setViewValue:angular.noop},v=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS,w=angular.isDefined(c.padHours)?a.$parent.$eval(c.padHours):!0;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){u=b,u.$render=this.render,u.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2),i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var x=g.hourStep;c.hourStep&&t.push(a.$parent.$watch(d(c.hourStep),function(a){x=+a}));var y=g.minuteStep;c.minuteStep&&t.push(a.$parent.$watch(d(c.minuteStep),function(a){y=+a}));var z;t.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);z=isNaN(b)?void 0:b}));var A;t.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);A=isNaN(b)?void 0:b}));var B=!1;c.ngDisabled&&t.push(a.$parent.$watch(d(c.ngDisabled),function(a){B=a})),a.noIncrementHours=function(){var a=p(s,60*x);return B||a>A||s>a&&z>a},a.noDecrementHours=function(){var a=p(s,60*-x);return B||z>a||a>s&&a>A},a.noIncrementMinutes=function(){var a=p(s,y);return B||a>A||s>a&&z>a},a.noDecrementMinutes=function(){var a=p(s,-y);return B||z>a||a>s&&a>A},a.noIncrementSeconds=function(){var a=q(s,C);return B||a>A||s>a&&z>a},a.noDecrementSeconds=function(){var a=q(s,-C);return B||z>a||a>s&&a>A},a.noToggleMeridian=function(){return s.getHours()<12?B||p(s,720)>A:B||p(s,-720)0};b.bind("mousewheel wheel",function(b){B||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){B||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.bind("mousewheel wheel",function(b){B||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.bind("keydown",function(b){B||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.bind("keydown",function(b){B||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.bind("keydown",function(b){B||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){u.$setViewValue(null),u.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c),angular.isDefined(d)&&(a.invalidSeconds=d)};a.updateHours=function(){var a=h(),b=i();u.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(s.setHours(a),s.setMinutes(b),z>s||s>A?e(!0):l("h")):e(!0)},b.bind("blur",function(b){u.$setTouched(),r()?m():null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours,!w)})}),a.updateMinutes=function(){var a=i(),b=h();u.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(s.setHours(b),s.setMinutes(a),z>s||s>A?e(void 0,!0):l("m")):e(void 0,!0)},c.bind("blur",function(b){u.$setTouched(),r()?m():null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();u.$setDirty(),angular.isDefined(a)?(s.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.bind("blur",function(b){r()?m():!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=u.$viewValue;isNaN(b)?(u.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(s=b),z>s||s>A?(u.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*x*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-x*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*y)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-y)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(C)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-C)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(s.getHours()<12?60:-60)):a.meridian=a.meridian===v[0]?v[1]:v[0])},a.blur=function(){u.$setTouched()},a.$on("$destroy",function(){for(;t.length;)t.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),Y()}function o(){N.position=D?l.offset(b):l.position(b),N.position.top+=b.prop("offsetHeight")}var p,q,r=[9,13,27,38,40],s=200,t=a.$eval(c.typeaheadMinLength);t||0===t||(t=1),a.$watch(c.typeaheadMinLength,function(a){t=a||0===a?a:1});var u=a.$eval(c.typeaheadWaitMs)||0,v=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){v=a!==!1});var w,x,y=e(c.typeaheadLoading).assign||angular.noop,z=e(c.typeaheadOnSelect),A=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,B=e(c.typeaheadNoResults).assign||angular.noop,C=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,D=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,E=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,F=a.$eval(c.typeaheadFocusFirst)!==!1,G=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,H=e(c.typeaheadIsOpen).assign||angular.noop,I=a.$eval(c.typeaheadShowHint)||!1,J=e(c.ngModel),K=e(c.ngModel+"($$$p)"),L=function(b,c){return angular.isFunction(J(a))&&q&&q.$options&&q.$options.getterSetter?K(b,{$$$p:c}):J.assign(b,c)},M=m.parse(c.uibTypeahead),N=a.$new(),O=a.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q,R;I&&(Q=angular.element("
"),Q.css("position","relative"),b.after(Q),R=b.clone(),R.attr("placeholder",""),R.attr("tabindex","-1"),R.val(""),R.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),Q.append(R),R.after(b));var S=angular.element("
");S.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&S.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&S.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var T=function(){I&&R.val("")},U=function(){N.matches=[],N.activeIdx=-1,b.attr("aria-expanded",!1),T()},V=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",V(a))});var W=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},X=function(c,d){var e={$viewValue:c};y(a,!0),B(a,!1),f.when(M.source(a,e)).then(function(f){var g=c===p.$viewValue;if(g&&w)if(f&&f.length>0){N.activeIdx=F?0:-1,B(a,!1),N.matches.length=0;for(var h=0;h0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?R.val(c+i.slice(c.length)):R.val("")}}else U(),B(a,!0);g&&y(a,!1)},function(){U(),y(a,!1),B(a,!0)})};D&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var Y=k(function(){N.matches.length&&o(),N.moveInProgress=!1},s);N.moveInProgress=!1,N.query=void 0;var Z,$=function(a){Z=g(function(){X(a)},u)},_=function(){Z&&g.cancel(Z)};U(),N.assignIsOpen=function(b){H(a,b)},N.select=function(d,e){var f,h,i={};x=!0,i[M.itemName]=h=N.matches[d].model,f=M.modelMapper(a,i),L(a,f),p.$setValidity("editable",!0),p.$setValidity("parse",!0),z(a,{$item:h,$model:f,$label:M.viewMapper(a,i),$event:e}),U(),N.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(b){if(0!==N.matches.length&&-1!==r.indexOf(b.which)){if(-1===N.activeIdx&&(9===b.which||13===b.which)||9===b.which&&b.shiftKey)return U(),void N.$digest();b.preventDefault();var c;switch(b.which){case 9:case 13:N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(N.activeIdx,b)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(N.activeIdx,b)});break;case 27:b.stopPropagation(),U(),a.$digest();break;case 38:N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest(),c=S.find("li")[N.activeIdx],c.parentNode.scrollTop=c.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),c=S.find("li")[N.activeIdx],c.parentNode.scrollTop=c.offsetTop}}}),b.bind("focus",function(a){w=!0,0!==t||p.$viewValue||g(function(){X(p.$viewValue,a)},0)}),b.bind("blur",function(a){A&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?k(function(){N.select(N.activeIdx,a)},N.debounceUpdate.blur):N.select(N.activeIdx,a)})),!v&&p.$error.editable&&(p.$setViewValue(),p.$setValidity("editable",!0),p.$setValidity("parse",!0),b.val("")),w=!1,x=!1});var aa=function(c){b[0]!==c.target&&3!==c.which&&0!==N.matches.length&&(U(),j.$$phase||a.$digest())};h.on("click",aa),a.$on("$destroy",function(){h.off("click",aa),(D||E)&&ba.remove(),D&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),S.remove(),I&&Q.remove()});var ba=d(S)(N);D?h.find("body").append(ba):E?angular.element(E).eq(0).append(ba):b.after(ba),this.init=function(b,c){p=b,q=c,N.debounceUpdate=p.$options&&e(p.$options.debounce)(a),p.$parsers.unshift(function(b){return w=!0,0===t||b&&b.length>=t?u>0?(_(),$(b)):X(b):(y(a,!1),_(),U()),v?b:b?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0),null)}),p.$formatters.push(function(b){var c,d,e={};return v||p.$setValidity("editable",!0),C?(e.$model=b,C(a,e)):(e[M.itemName]=b,c=M.viewMapper(a,e),e[M.itemName]=void 0,d=M.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"$&"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibCarouselCss&&angular.element(document).find("head").prepend(''),angular.$$uibCarouselCss=!0}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerCss&&angular.element(document).find("head").prepend(''),angular.$$uibDatepickerCss=!0}),angular.module("ui.bootstrap.position").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibPositionCss&&angular.element(document).find("head").prepend(''),angular.$$uibPositionCss=!0}),angular.module("ui.bootstrap.datepickerPopup").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerpopupCss&&angular.element(document).find("head").prepend(''),angular.$$uibDatepickerpopupCss=!0}),angular.module("ui.bootstrap.tooltip").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTooltipCss&&angular.element(document).find("head").prepend(''), +angular.$$uibTooltipCss=!0}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTimepickerCss&&angular.element(document).find("head").prepend(''),angular.$$uibTimepickerCss=!0}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTypeaheadCss&&angular.element(document).find("head").prepend(''),angular.$$uibTypeaheadCss=!0}); \ No newline at end of file diff --git a/static/html/bower_components/angular-dynamic-locale/tmhDynamicLocale.min.js b/static/html/bower_components/angular-dynamic-locale/tmhDynamicLocale.min.js new file mode 100644 index 00000000..10b9d18e --- /dev/null +++ b/static/html/bower_components/angular-dynamic-locale/tmhDynamicLocale.min.js @@ -0,0 +1,7 @@ +/** + * Angular Dynamic Locale - 0.1.37 + * https://github.com/lgalfaso/angular-dynamic-locale + * License: MIT + */ +!function(e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():e()}(function(){"use strict";return angular.module("tmh.dynamicLocale",[]).config(["$provide",function(e){function t(e){return e.$stateful=!0,e}e.decorator("dateFilter",["$delegate",t]),e.decorator("numberFilter",["$delegate",t]),e.decorator("currencyFilter",["$delegate",t])}]).constant("tmhDynamicLocale.STORAGE_KEY","tmhDynamicLocale.locale").provider("tmhDynamicLocale",["tmhDynamicLocale.STORAGE_KEY",function(e){var u,y,p,$,s="angular/i18n/angular-locale_{{locale}}.js",d="tmhDynamicLocaleStorageCache",v=e,f="get",L="put",S={},g={};function h(e,t,o,n,a,r,c){function i(n,a){$===o&&(angular.forEach(n,function(e,t){a[t]?angular.isArray(a[t])&&(n[t].length=a[t].length):delete n[t]}),angular.forEach(a,function(e,t){angular.isArray(a[t])||angular.isObject(a[t])?(n[t]||(n[t]=angular.isArray(a[t])?[]:{}),i(n[t],a[t])):n[t]=a[t]}))}if(S[o])return S[$=o];var l,u,s,d,f,g,h,m=a.defer();return o===$?m.resolve(t):(l=r.get(o))?($=o,n.$evalAsync(function(){i(t,l),p[L](v,o),n.$broadcast("$localeChangeSuccess",o,t),m.resolve(t)})):(S[$=o]=m.promise,a=e,u=function(){var e=angular.injector(["ngLocale"]).get("$locale");i(t,e),r.put(o,e),delete S[o],n.$applyAsync(function(){p[L](v,o),n.$broadcast("$localeChangeSuccess",o,t),m.resolve(t)})},s=function(){delete S[o],n.$applyAsync(function(){$===o&&($=t.id),n.$broadcast("$localeChangeError",o),m.reject(o)})},d=c,f=document.createElement("script"),g=y||document.getElementsByTagName("body")[0],h=!1,f.type="text/javascript",f.readyState?f.onreadystatechange=function(){"complete"!==f.readyState&&"loaded"!==f.readyState||(f.onreadystatechange=null,d(function(){h||(h=!0,f.parentNode===g&&g.removeChild(f),u())},30,!1))}:(f.onload=function(){h||(h=!0,f.parentNode===g&&g.removeChild(f),u())},f.onerror=function(){h||(h=!0,f.parentNode===g&&g.removeChild(f),s())}),f.src=a,f.async=!0,g.appendChild(f)),m.promise}this.localeLocationPattern=function(e){return e?(s=e,this):s},this.appendScriptTo=function(e){y=e},this.useStorage=function(e){d=e,f="get",L="put"},this.useCookieStorage=function(){angular.version.minor<7?this.useStorage("$cookieStore"):(this.useStorage("$cookies"),f="getObject",L="putObject")},this.defaultLocale=function(e){u=e},this.storageKey=function(e){return e?(v=e,this):v},this.addLocalePatternValue=function(e,t){g[e]=t},this.$get=["$rootScope","$injector","$interpolate","$locale","$q","tmhDynamicLocaleCache","$timeout",function(n,e,t,a,o,r,c){var i=t(s);return p=e.get(d),n.$evalAsync(function(){var e;(e=p[f](v)||u)&&l(e)}),{set:l,get:function(){return $}};function l(e){var t={locale:e,angularVersion:angular.version.full};return h(i(angular.extend({},g,t)),a,e,n,o,r,c)}}]}]).provider("tmhDynamicLocaleCache",function(){this.$get=["$cacheFactory",function(e){return e("tmh.dynamicLocales")}]}).provider("tmhDynamicLocaleStorageCache",function(){this.$get=["$cacheFactory",function(e){return e("tmh.dynamicLocales.store")}]}).run(["tmhDynamicLocale",angular.noop]),"tmh.dynamicLocale"}); +//# sourceMappingURL=tmhDynamicLocale.min.js.map \ No newline at end of file diff --git a/static/html/bower_components/angular-mocks/angular-mocks.min.js b/static/html/bower_components/angular-mocks/angular-mocks.min.js new file mode 100644 index 00000000..56f1ba19 --- /dev/null +++ b/static/html/bower_components/angular-mocks/angular-mocks.min.js @@ -0,0 +1,2 @@ +/*! mifosx-community-app 2022-07-11 */ +!function(a,b){"use strict";function c(a,b){var c=[],d=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[?*])?/g,function(a,b,d,e){var f="?"===e||"*?"===e,g="*"===e||"*?"===e;return c.push({name:d,optional:f}),b=b||"",(f?"(?:"+b:b+"(?:")+(g?"(.+?)":"([^/]+)")+(f?"?)?":")")}).replace(/([/$*])/g,"\\$1");return b.ignoreTrailingSlashes&&(d=d.replace(/\/+$/,"")+"/*"),{keys:c,regexp:new RegExp("^"+d+"(?:[?#]|$)",b.caseInsensitiveMatch?"i":"")}}function d(a){var b,c=/^(-?\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;if(b=a.match(c)){var d=new Date(0),f=0,g=0;return b[9]&&(f=e(b[9]+b[10]),g=e(b[9]+b[11])),d.setUTCFullYear(e(b[1]),e(b[2])-1,e(b[3])),d.setUTCHours(e(b[4]||0)-f,e(b[5]||0)-g,e(b[6]||0),e(b[7]||0)),d}return a}function e(a){return parseInt(a,10)}function f(a,b,c){var d="";for(0>a&&(d="-",a=-a),a=""+a;a.lengthb;b++)if(r[b]===k){r.splice(b,1),g(-1,void 0,"",void 0,a);break}}return!f&&i&&(i.then?i.then(function(){l(b.isDefined(i.$$timeoutId)?"timeout":"abort")}):d(function(){l("timeout")},i)),k.description=a+" "+c,k}function x(a){var b=new Error(a);return b.$$passToExceptionHandler=!0,b}var y=new k,z=p[0],A=!1;if(y.$$events=m,y.upload.$$events=n,z&&z.match(a,c)){if(!z.matchData(e))throw x("Expected "+z+" with different data\nEXPECTED: "+v(z.data)+"\nGOT: "+e);if(!z.matchHeaders(h))throw x("Expected "+z+" with different headers\nEXPECTED: "+v(z.headers)+"\nGOT: "+v(h));if(p.shift(),z.response)return void r.push(w(z));A=!0}for(var B,C=q?o.length:-1;B=o[q?--C:++C];)if(B.match(a,c,e,h||{})){if(B.response)(f?f.defer:s)(w(B));else{if(!B.passThrough)throw x("No response defined !");u(a,c,e,g,h,i,j,l,m,n)}return}if(A)throw x("No response defined !");throw x("Unexpected request: "+a+" "+c+"\n"+(z?"Expected "+z:"No more request expected"))}function m(a){b.forEach(["GET","DELETE","JSONP","HEAD"],function(c){l[a+c]=function(d,e,f){return h(arguments,0,"url"),b.isUndefined(d)&&(d=null),l[a](c,d,void 0,e,f)}}),b.forEach(["PUT","POST","PATCH"],function(c){l[a+c]=function(d,e,f,g){return h(arguments,0,"url"),b.isUndefined(d)&&(d=null),l[a](c,d,e,f,g)}})}function n(a){var b=i(a),d={caseInsensitiveMatch:!0,ignoreTrailingSlashes:!0};return c(b,d)}var o=[],p=[],q=!1,r=[],s=b.bind(r,r.push),t=b.copy,u=e.$$originalHttpBackend||e;return l.when=function(a,b,c,d,e){h(arguments,1,"url");var i=new j(a,b,c,d,e),k={respond:function(a,b,c,d){return i.passThrough=void 0,i.response=g(a,b,c,d),k}};return f&&(k.passThrough=function(){return i.response=void 0,i.passThrough=!0,k}),o.push(i),k},l.matchLatestDefinitionEnabled=function(a){return b.isDefined(a)?(q=a,this):q},m("when"),l.whenRoute=function(a,b){var c=n(b);return l.when(a,c.regexp,void 0,void 0,c.keys)},l.expect=function(a,b,c,d,e){h(arguments,1,"url");var f=new j(a,b,c,d,e),i={respond:function(a,b,c,d){return f.response=g(a,b,c,d),i}};return p.push(f),i},m("expect"),l.expectRoute=function(a,b){var c=n(b);return l.expect(a,c.regexp,void 0,void 0,c.keys)},l.flush=function(c,d,e){if(e!==!1&&a.$digest(),d=d||0,d>=r.length)throw new Error("No pending request to flush !");if(b.isDefined(c)&&null!==c)for(;c--;){var f=r.splice(d,1);if(!f.length)throw new Error("No more pending request to flush !");f[0]()}else for(;r.length>d;)r.splice(d,1)[0]();l.verifyNoOutstandingExpectation(e)},l.verifyNoOutstandingExpectation=function(b){if(b!==!1&&a.$digest(),p.length)throw new Error("Unsatisfied requests: "+p.join(", "))},l.verifyNoOutstandingRequest=function(b){if(b!==!1&&a.$digest(),r.length){var c=r.map(function(a){return a.description});throw new Error("Unflushed requests: "+r.length+"\n "+c.join("\n "))}},l.resetExpectations=function(){p.length=0,r.length=0},l.$$originalHttpBackend=u,l}function h(a,c,d){if(a.length>c&&b.isUndefined(a[c]))throw new Error("Undefined argument `"+d+"`; the argument is provided but not defined")}function i(a){return a.replace(/[?#].*$/,"")}function j(a,c,d,e,f){function g(a){var b=/^([^?]*)\?(.*)$/,d=b.exec(c),e=b.exec(a);return!(!d||!e)&&d[1]===e[1]&&h(d[2])===h(e[2])}function h(a){return a.split("&").sort().join("&")}function j(a){var d={};if(!(c&&b.isFunction(c.test)&&f&&f.length))return d;var e=c.exec(a);if(!e)return d;for(var g=1,h=e.length;h>g;++g){var i=f[g-1],j=e[g];i&&j&&(d[i.name||i]=j)}return d}function k(a){var c={},d=a.split("&").filter(b.identity).map(function(a){return a.replace(/\+/g,"%20").split("=")});return b.forEach(d,function(a){var d=l(a[0]);if(b.isDefined(d)){var e=b.isDefined(a[1])?l(a[1]):!0;hasOwnProperty.call(c,d)?b.isArray(c[d])?c[d].push(e):c[d]=[c[d],e]:c[d]=e}}),c}function l(a){try{return decodeURIComponent(a)}catch(b){}}this.data=d,this.headers=e,this.match=function(c,d,e,f){return a!==c?!1:this.matchUrl(d)?b.isDefined(e)&&!this.matchData(e)?!1:b.isDefined(f)&&!this.matchHeaders(f)?!1:!0:!1},this.matchUrl=function(a){return c?b.isFunction(c.test)?c.test(a):b.isFunction(c)?c(a):c===a||g(a):!0},this.matchHeaders=function(a){return b.isUndefined(e)?!0:b.isFunction(e)?e(a):b.equals(e,a)},this.matchData=function(a){return b.isUndefined(d)?!0:d&&b.isFunction(d.test)?d.test(a):d&&b.isFunction(d)?d(a):d&&!b.isString(d)?b.equals(b.fromJson(b.toJson(d)),b.fromJson(a)):d==a},this.toString=function(){return a+" "+c},this.params=function(a){var c=-1===a.indexOf("?")?"":a.substring(a.indexOf("?")+1),d=i(a);return b.extend(k(c),j(d))}}function k(){k.$$lastInstance=this,this.open=function(a,b,c){this.$$method=a,this.$$url=b,this.$$async=c,this.$$reqHeaders={},this.$$respHeaders={}},this.send=function(a){this.$$data=a},this.setRequestHeader=function(a,b){this.$$reqHeaders[a]=b},this.getResponseHeader=function(a){var c=this.$$respHeaders[a];return c?c:(a=b.$$lowercase(a),(c=this.$$respHeaders[a])?c:(c=void 0,b.forEach(this.$$respHeaders,function(d,e){c||b.$$lowercase(e)!==a||(c=d)}),c))},this.getAllResponseHeaders=function(){var a=[];return b.forEach(this.$$respHeaders,function(b,c){a.push(c+": "+b)}),a.join("\n")},this.abort=function(){isFunction(this.onabort)&&this.onabort()},this.$$events={},this.addEventListener=function(a,c){b.isUndefined(this.$$events[a])&&(this.$$events[a]=[]),this.$$events[a].push(c)},this.upload={$$events:{},addEventListener:this.addEventListener}}function l(){return b.mock.$ControllerDecorator=["$delegate",function(a){return function(c,d,e,f){if(e&&"object"==typeof e){var g=a(c,d,!0,f),h=g();return b.extend(h,e),h}return a(c,d,e,f)}}],b.mock.$ControllerDecorator}b.mock={},b.mock.$BrowserProvider=function(){this.$get=["$log","$$taskTrackerFactory",function(a,c){return new b.mock.$Browser(a,c)}]},b.mock.$Browser=function(a,c){var d=this,e=c(a);this.isMock=!0,d.$$url="http://server/",d.$$lastUrl=d.$$url,d.pollFns=[],d.$$completeOutstandingRequest=e.completeTask,d.$$incOutstandingRequestCount=e.incTaskCount,d.notifyWhenNoOutstandingRequests=e.notifyWhenNoPendingTasks,d.onUrlChange=function(a){return d.pollFns.push(function(){(d.$$lastUrl!==d.$$url||d.$$state!==d.$$lastState)&&(d.$$lastUrl=d.$$url,d.$$lastState=d.$$state,a(d.$$url,d.$$state))}),a},d.$$applicationDestroyed=b.noop,d.$$checkUrlChange=b.noop,d.deferredFns=[],d.deferredNextId=0,d.defer=function(a,b,c){var f=d.deferredNextId++;return b=b||0,c=c||e.DEFAULT_TASK_TYPE,e.incTaskCount(c),d.deferredFns.push({id:f,type:c,time:d.defer.now+b,fn:a}),d.deferredFns.sort(function(a,b){return a.time-b.time}),f},d.defer.now=0,d.defer.cancel=function(a){var c;if(b.forEach(d.deferredFns,function(b,d){b.id===a&&(c=d)}),b.isDefined(c)){var f=d.deferredFns.splice(c,1)[0];return e.completeTask(b.noop,f.type),!0}return!1},d.defer.flush=function(a){var c;if(b.isDefined(a))c=d.defer.now+a;else{if(!d.deferredFns.length)throw new Error("No deferred tasks to be flushed");c=d.deferredFns[d.deferredFns.length-1].time}for(;d.deferredFns.length&&d.deferredFns[0].time<=c;){d.defer.now=d.deferredFns[0].time;var f=d.deferredFns.shift();e.completeTask(f.fn,f.type)}d.defer.now=c},d.defer.getPendingTasks=function(a){return a?d.deferredFns.filter(function(b){return b.type===a}):d.deferredFns},d.defer.formatPendingTasks=function(a){return a.map(function(a){return"{id: "+a.id+", type: "+a.type+", time: "+a.time+"}"})},d.defer.verifyNoPendingTasks=function(a){var b=d.defer.getPendingTasks(a);if(b.length){var c=d.defer.formatPendingTasks(b).join("\n ");throw new Error("Deferred tasks to flush ("+b.length+"):\n "+c)}},d.$$baseHref="/",d.baseHref=function(){return this.$$baseHref}},b.mock.$Browser.prototype={poll:function(){b.forEach(this.pollFns,function(a){a()})},url:function(a,c,d){return b.isUndefined(d)&&(d=null),a?(this.$$url=a.replace(/#$/,""),this.$$state=b.copy(d),this):this.$$url},state:function(){return this.$$state}},b.mock.$FlushPendingTasksProvider=function(){this.$get=["$browser",function(a){return function(b){return a.defer.flush(b)}}]},b.mock.$VerifyNoPendingTasksProvider=function(){this.$get=["$browser",function(a){return function(b){return a.defer.verifyNoPendingTasks(b)}}]},b.mock.$ExceptionHandlerProvider=function(){var a;this.mode=function(b){switch(b){case"log":case"rethrow":var c=[];a=function(a){if(1===arguments.length?c.push(a):c.push([].slice.call(arguments,0)),"rethrow"===b)throw a},a.errors=c;break;default:throw new Error("Unknown mode '"+b+"', only 'log'/'rethrow' modes are allowed!")}},this.$get=function(){return a},this.mode("rethrow")},b.mock.$LogProvider=function(){function a(a,b,c){return a.concat(Array.prototype.slice.call(b,c))}var c=!0;this.debugEnabled=function(a){return b.isDefined(a)?(c=a,this):c},this.$get=function(){var d={log:function(){d.log.logs.push(a([],arguments,0))},warn:function(){d.warn.logs.push(a([],arguments,0))},info:function(){d.info.logs.push(a([],arguments,0))},error:function(){d.error.logs.push(a([],arguments,0))},debug:function(){c&&d.debug.logs.push(a([],arguments,0))}};return d.reset=function(){d.log.logs=[],d.info.logs=[],d.warn.logs=[],d.error.logs=[],d.debug.logs=[]},d.assertEmpty=function(){var a=[];if(b.forEach(["error","warn","info","log","debug"],function(c){b.forEach(d[c].logs,function(d){b.forEach(d,function(b){a.push("MOCK $log ("+c+"): "+String(b)+"\n"+(b.stack||""))})})}),a.length)throw a.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or an expected log message was not checked and removed:"),a.push(""),new Error(a.join("\n---------\n"))},d.reset(),d}},b.mock.$IntervalProvider=function(){this.$get=["$browser","$$intervalFactory",function(a,b){var c=[],d=0,e=0,f=function(b,f,g,h){var i=d++,j=h?function(){b(),a.defer.flush()}:b;return c.push({nextTime:e+(f||0),delay:f||1,fn:j,id:i,deferred:g}),c.sort(function(a,b){return a.nextTime-b.nextTime}),i},g=function(a){for(var b=c.length-1;b>=0;b--)if(c[b].id===a){c.splice(b,1);break}},h=b(f,g);return h.cancel=function(a){if(!a)return!1;for(var b=c.length-1;b>=0;b--)if(c[b].id===a.$$intervalId){var d=c[b].deferred;return d.promise.then(void 0,function(){}),d.reject("canceled"),c.splice(b,1),!0}return!1},h.flush=function(a){var b=e;for(e+=a;c.length&&c[0].nextTime<=e;){var d=c[0];d.fn(),d.nextTime===b&&d.nextTime++,d.nextTime+=d.delay,c.sort(function(a,b){return a.nextTime-b.nextTime})}return a},h}]},b.mock.TzDate=function(a,c){var e=new Date(0);if(b.isString(c)){var g=c;if(e.origDate=d(c),c=e.origDate.getTime(),isNaN(c))throw{name:"Illegal Argument",message:"Arg '"+g+"' passed into TzDate constructor is not a valid date string"}}else e.origDate=new Date(c);var h=new Date(c).getTimezoneOffset();e.offsetDiff=60*h*1e3-1e3*a*60*60,e.date=new Date(c+e.offsetDiff),e.getTime=function(){return e.date.getTime()-e.offsetDiff},e.toLocaleDateString=function(){return e.date.toLocaleDateString()},e.getFullYear=function(){return e.date.getFullYear()},e.getMonth=function(){return e.date.getMonth()},e.getDate=function(){return e.date.getDate()},e.getHours=function(){return e.date.getHours()},e.getMinutes=function(){return e.date.getMinutes()},e.getSeconds=function(){return e.date.getSeconds()},e.getMilliseconds=function(){return e.date.getMilliseconds()},e.getTimezoneOffset=function(){return 60*a},e.getUTCFullYear=function(){return e.origDate.getUTCFullYear()},e.getUTCMonth=function(){return e.origDate.getUTCMonth()},e.getUTCDate=function(){return e.origDate.getUTCDate()},e.getUTCHours=function(){return e.origDate.getUTCHours()},e.getUTCMinutes=function(){return e.origDate.getUTCMinutes()},e.getUTCSeconds=function(){return e.origDate.getUTCSeconds()},e.getUTCMilliseconds=function(){return e.origDate.getUTCMilliseconds()},e.getDay=function(){return e.date.getDay()},e.toISOString&&(e.toISOString=function(){return f(e.origDate.getUTCFullYear(),4)+"-"+f(e.origDate.getUTCMonth()+1,2)+"-"+f(e.origDate.getUTCDate(),2)+"T"+f(e.origDate.getUTCHours(),2)+":"+f(e.origDate.getUTCMinutes(),2)+":"+f(e.origDate.getUTCSeconds(),2)+"."+f(e.origDate.getUTCMilliseconds(),3)+"Z"});var i=["getUTCDay","getYear","setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds","setYear","toDateString","toGMTString","toJSON","toLocaleFormat","toLocaleString","toLocaleTimeString","toSource","toString","toTimeString","toUTCString","valueOf"];return b.forEach(i,function(a){e[a]=function(){throw new Error("Method '"+a+"' is not implemented in the TzDate mock")}}),e},b.mock.TzDate.prototype=Date.prototype,b.mock.animate=b.module("ngAnimateMock",["ng"]).info({angularVersion:"1.7.9"}).config(["$provide",function(a){a.factory("$$forceReflow",function(){function a(){a.totalReflows++}return a.totalReflows=0,a}),a.factory("$$animateAsyncRun",function(){var a=[],b=function(){return function(b){a.push(b)}};return b.flush=function(){if(0===a.length)return!1;for(var b=0;b"),b.forEach(a,function(a){e.append(b.element(a).clone())}),e=e.html()):b.isArray(a)?(e=[],b.forEach(a,function(a){e.push(c(a))}),e="[ "+e.join(", ")+" ]"):e=b.isObject(a)?b.isFunction(a.$eval)&&b.isFunction(a.$apply)?d(a):a instanceof Error?a.stack||""+a.name+": "+a.message:b.toJson(a,!0):String(a),e}function d(a,c){c=c||" ";var e=[c+"Scope("+a.$id+"): {"];for(var f in a)Object.prototype.hasOwnProperty.call(a,f)&&!f.match(/^(\$|this)/)&&e.push(" "+f+": "+b.toJson(a[f]));for(var g=a.$$childHead;g;)e.push(d(g,c+" ")),g=g.$$nextSibling;return e.push("}"),e.join("\n"+c)}return c(a)},b.mock.$httpBackendDecorator=["$rootScope","$timeout","$delegate",g],b.mock.$TimeoutDecorator=["$delegate","$browser",function(a,b){return a.flush=function(a){b.defer.flush(a)},a.verifyNoPendingTasks=function(){var a=b.defer.getPendingTasks();if(a.length){var c=b.defer.formatPendingTasks(a).join("\n "),d=a.some(function(a){return"$timeout"===a.type}),e=d?"":"\n\nNone of the pending tasks are timeouts. If you only want to verify pending timeouts, use `$verifyNoPendingTasks('$timeout')` instead.";throw new Error("Deferred tasks to flush ("+a.length+"):\n "+c+e)}},a}],b.mock.$RAFDecorator=["$delegate",function(a){var b=function(a){var c=b.queue.length;return b.queue.push(a),function(){b.queue.splice(c,1)}};return b.queue=[],b.supported=a.supported,b.flush=function(){if(0===b.queue.length)throw new Error("No rAF callbacks present");for(var a=b.queue.length,c=0;a>c;c++)b.queue[c]();b.queue=b.queue.slice(c)},b}];var m;b.mock.$RootElementProvider=function(){this.$get=["$injector",function(a){return m=b.element("
").data("$injector",a)}]},b.mock.$ComponentControllerProvider=["$compileProvider",function(a){this.$get=["$controller","$injector","$rootScope",function(a,b,c){return function(d,e,f,g){var h=b.get(d+"Directive"),i=h.filter(function(a){return a.controller&&a.controllerAs&&"E"===a.restrict});if(0===i.length)throw new Error("No component found");if(i.length>1)throw new Error("Too many components found");var j=i[0];return e=e||{},e.$scope=e.$scope||c.$new(!0),a(j.controller,e,f,g||j.controllerAs)}}]}],b.module("ngMock",["ng"]).provider({$browser:b.mock.$BrowserProvider,$exceptionHandler:b.mock.$ExceptionHandlerProvider,$log:b.mock.$LogProvider,$interval:b.mock.$IntervalProvider,$rootElement:b.mock.$RootElementProvider,$componentController:b.mock.$ComponentControllerProvider,$flushPendingTasks:b.mock.$FlushPendingTasksProvider,$verifyNoPendingTasks:b.mock.$VerifyNoPendingTasksProvider}).config(["$provide","$compileProvider",function(a,c){a.decorator("$timeout",b.mock.$TimeoutDecorator),a.decorator("$$rAF",b.mock.$RAFDecorator),a.decorator("$rootScope",b.mock.$RootScopeDecorator),a.decorator("$controller",l(c)),a.decorator("$httpBackend",b.mock.$httpBackendDecorator)}]).info({angularVersion:"1.7.9"}),b.module("ngMockE2E",["ng"]).config(["$provide",function(a){a.decorator("$httpBackend",b.mock.e2e.$httpBackendDecorator)}]).info({angularVersion:"1.7.9"}),b.mock.e2e={},b.mock.e2e.$httpBackendDecorator=["$rootScope","$timeout","$delegate","$browser",g],b.mock.$RootScopeDecorator=["$delegate",function(a){function b(){for(var a,b=0,c=[this.$$childHead];c.length;)for(a=c.shift();a;)b+=1,c.push(a.$$childHead),a=a.$$nextSibling;return b}function c(){for(var a,b=this.$$watchers?this.$$watchers.length:0,c=[this.$$childHead];c.length;)for(a=c.shift();a;)b+=a.$$watchers?a.$$watchers.length:0,c.push(a.$$childHead),a=a.$$nextSibling;return b}var d=Object.getPrototypeOf(a);return d.$countChildScopes=b,d.$countWatchers=c,a}],function(c){function d(){this.shared=!1,this.sharedError=null,this.cleanupAfterEach=function(){return!this.shared||this.sharedError}}if(c){var e=null,f=new d,g=[],h=function(){return!!e};b.mock.$$annotate=b.injector.$$annotate,b.injector.$$annotate=function(a){return"function"!=typeof a||a.$inject||g.push(a),b.mock.$$annotate.apply(this,arguments)};var i=a.module=b.mock.module=function(){function a(){if(e.$injector)throw new Error("Injector already created, can not register a module!");var a,d=e.$modules||(e.$modules=[]);b.forEach(c,function(c){a=b.isObject(c)&&!b.isArray(c)?["$provide",function(a){b.forEach(c,function(b,c){a.value(c,b)})}]:c,e.$providerInjector?e.$providerInjector.invoke(a):d.push(a)})}var c=Array.prototype.slice.call(arguments,0);return h()?a():a};i.$$beforeAllHook=a.before||a.beforeAll,i.$$afterAllHook=a.after||a.afterAll,i.$$currentSpec=function(a){return 0===arguments.length?a:void(e=a)},i.sharedInjector=function(){if(!i.$$beforeAllHook||!i.$$afterAllHook)throw Error("sharedInjector() cannot be used unless your test runner defines beforeAll/afterAll");var a=!1;i.$$beforeAllHook(function(){if(f.shared)throw f.sharedError=Error("sharedInjector() cannot be called inside a context that has already called sharedInjector()"),f.sharedError;a=!0,e=this,f.shared=!0}),i.$$afterAllHook(function(){a?(f=new d,i.$$cleanup()):f.sharedError=null})},i.$$beforeEach=function(){if(f.shared&&e&&e!==this){var a=e;e=this,b.forEach(["$injector","$modules","$providerInjector","$injectorStrict"],function(b){e[b]=a[b],a[b]=null})}else e=this,m=null,g=[]},i.$$afterEach=function(){f.cleanupAfterEach()&&i.$$cleanup()},i.$$cleanup=function(){var a=e.$injector;if(g.forEach(function(a){delete a.$inject}),e.$injector=null,e.$modules=null,e.$providerInjector=null,e=null,a){var c=a.get("$rootElement"),d=c&&c[0],f=m?[m[0]]:[];!d||m&&d===m[0]||f.push(d),b.element.cleanData(f);var h=a.get("$rootScope");h&&h.$destroy&&h.$destroy()}b.forEach(b.element.fragments,function(a,c){delete b.element.fragments[c]}),k.$$lastInstance=null,b.forEach(b.callbacks,function(a,c){delete b.callbacks[c]}),b.callbacks.$$counter=0},(a.beforeEach||a.setup)(i.$$beforeEach),(a.afterEach||a.teardown)(i.$$afterEach);var j=function(a,b){this.message=a.message,this.name=a.name,a.line&&(this.line=a.line),a.sourceId&&(this.sourceId=a.sourceId),a.stack&&b&&(this.stack=a.stack+"\n"+b.stack),a.stackArray&&(this.stackArray=a.stackArray)};j.prototype=Error.prototype,a.inject=b.mock.inject=function(){function a(){var a=e.$modules||[],f=!!e.$injectorStrict;a.unshift(["$injector",function(a){e.$providerInjector=a}]),a.unshift("ngMock"),a.unshift("ng");var g=e.$injector;g||(f&&b.forEach(a,function(a){"function"==typeof a&&b.injector.$$annotate(a)}),g=e.$injector=b.injector(a,f),e.$injectorStrict=f);for(var h=0,i=c.length;i>h;h++){e.$injectorStrict&&g.annotate(c[h]);try{g.invoke(c[h]||b.noop,this)}catch(k){if(k.stack&&d)throw new j(k,d);throw k}finally{d=null}}}var c=Array.prototype.slice.call(arguments,0),d=new Error("Declaration Location");if(!d.stack)try{throw d}catch(f){}return h()?a.call(e):a},b.mock.inject.strictDi=function(a){function b(){if(a!==e.$injectorStrict){if(e.$injector)throw new Error("Injector already created, can not modify strict annotations");e.$injectorStrict=a}}return a=arguments.length?!!a:!0,h()?b():b}}}(a.jasmine||a.mocha),function(){function b(){if("_cached"in b)return b._cached;if(!a.document.createTouch||!a.document.createTouchList)return b._cached=!1,!1;try{a.document.createEvent("TouchEvent")}catch(c){return b._cached=!1,!1}return b._cached=!0,!0}function c(b,c,d,e){var f=new a.Event(c);d=d||0,e=e||0;var g=a.document.createTouch(a,b,Date.now(),d,e,d,e),h=a.document.createTouchList(g);return f.touches=h,f}function d(){if("_cached"in d)return d._cached;d._cached=!1;var b=a.document;if(b){var c=b.createElement("div"),e=c.cloneNode();c.appendChild(e),c.addEventListener("e",function(){d._cached=!0});var f=a.document.createEvent("Events");f.initEvent("e",!0,!0),e.dispatchEvent(f)}return d._cached}function e(a,b){var c=!1,d=b.stopPropagation;b.stopPropagation=function(){c=!0,d.apply(b,arguments)},f(b,a);do a.dispatchEvent(b);while(!c&&(a=a.parentNode))}function f(a,b){a._target=b,Object.defineProperty(a,"target",{get:function(){return this._target}})}function g(b){for(;b=b.parentNode;)if(b===a)return!0;return!1}a.browserTrigger=function(f,h,i){function j(a){return-1!==l.indexOf(a)}if(f&&!f.nodeName&&(f=f[0]),f){i=i||{};var k=i.relatedTarget||f,l=i.keys,m=i.x,n=i.y,o=f.type?f.type.toLowerCase():null,p=f.nodeName.toLowerCase();h||(h={text:"change",textarea:"change",hidden:"change",password:"change",button:"click",submit:"click",reset:"click",image:"click",checkbox:"click",radio:"click","select-one":"change","select-multiple":"change",_default_:"click"}[o||"_default_"]),"option"===p&&(f.parentNode.value=f.value,f=f.parentNode,h="change"),l=l||[];var q;if(/transitionend/.test(h))if(a.WebKitTransitionEvent)q=new a.WebKitTransitionEvent(h,i),q.initEvent(h,i.bubbles,!0);else try{q=new a.TransitionEvent(h,i)}catch(r){q=a.document.createEvent("TransitionEvent"),q.initTransitionEvent(h,i.bubbles,null,null,i.elapsedTime||0)}else if(/animationend/.test(h))if(a.WebKitAnimationEvent)q=new a.WebKitAnimationEvent(h,i),q.initEvent(h,i.bubbles,!0);else try{q=new a.AnimationEvent(h,i)}catch(r){q=a.document.createEvent("AnimationEvent"),q.initAnimationEvent(h,i.bubbles,null,null,i.elapsedTime||0)}else if(/touch/.test(h)&&b())q=c(f,h,m,n);else if(/key/.test(h))q=a.document.createEvent("Events"),q.initEvent(h,i.bubbles,i.cancelable),q.view=a,q.ctrlKey=j("ctrl"),q.altKey=j("alt"),q.shiftKey=j("shift"),q.metaKey=j("meta"),q.keyCode=i.keyCode,q.charCode=i.charCode,q.which=i.which;else if(/composition/.test(h))try{q=new a.CompositionEvent(h,{data:i.data})}catch(r){q=a.document.createEvent("CompositionEvent",{}),q.initCompositionEvent(h,i.bubbles,i.cancelable,a,i.data,null)}else q=a.document.createEvent("MouseEvents"),m=m||0,n=n||0,q.initMouseEvent(h,!0,!0,a,0,m,n,m,n,j("ctrl"),j("alt"),j("shift"),j("meta"),0,k);if(q.$manualTimeStamp=i.timeStamp,q)return!i.bubbles||d()||g(f)?f.dispatchEvent(q):void e(f,q)}}}()}(window,window.angular); \ No newline at end of file diff --git a/static/html/bower_components/angular-resource/angular-resource.min.js b/static/html/bower_components/angular-resource/angular-resource.min.js new file mode 100644 index 00000000..7acd0218 --- /dev/null +++ b/static/html/bower_components/angular-resource/angular-resource.min.js @@ -0,0 +1,15 @@ +/* + AngularJS v1.8.3 + (c) 2010-2020 Google LLC. http://angularjs.org + License: MIT +*/ +(function(T,a){'use strict';function M(m,f){f=f||{};a.forEach(f,function(a,d){delete f[d]});for(var d in m)!m.hasOwnProperty(d)||"$"===d.charAt(0)&&"$"===d.charAt(1)||(f[d]=m[d]);return f}var B=a.$$minErr("$resource"),H=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;a.module("ngResource",["ng"]).info({angularVersion:"1.8.3"}).provider("$resource",function(){var m=/^https?:\/\/\[[^\]]*][^/]*/,f=this;this.defaults={stripTrailingSlashes:!0,cancellable:!1,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET", +isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}};this.$get=["$http","$log","$q","$timeout",function(d,F,G,N){function C(a,d){this.template=a;this.defaults=n({},f.defaults,d);this.urlParams={}}var O=a.noop,r=a.forEach,n=a.extend,R=a.copy,P=a.isArray,D=a.isDefined,x=a.isFunction,I=a.isNumber,y=a.$$encodeUriQuery,S=a.$$encodeUriSegment;C.prototype={setUrlParams:function(a,d,f){var g=this,c=f||g.template,s,h,n="",b=g.urlParams=Object.create(null);r(c.split(/\W/),function(a){if("hasOwnProperty"=== +a)throw B("badname");!/^\d+$/.test(a)&&a&&(new RegExp("(^|[^\\\\]):"+a+"(\\W|$)")).test(c)&&(b[a]={isQueryParamValue:(new RegExp("\\?.*=:"+a+"(?:\\W|$)")).test(c)})});c=c.replace(/\\:/g,":");c=c.replace(m,function(b){n=b;return""});d=d||{};r(g.urlParams,function(b,a){s=d.hasOwnProperty(a)?d[a]:g.defaults[a];D(s)&&null!==s?(h=b.isQueryParamValue?y(s,!0):S(s),c=c.replace(new RegExp(":"+a+"(\\W|$)","g"),function(b,a){return h+a})):c=c.replace(new RegExp("(/?):"+a+"(\\W|$)","g"),function(b,a,e){return"/"=== +e.charAt(0)?e:a+e})});g.defaults.stripTrailingSlashes&&(c=c.replace(/\/+$/,"")||"/");c=c.replace(/\/\.(?=\w+($|\?))/,".");a.url=n+c.replace(/\/(\\|%5C)\./,"/.");r(d,function(b,c){g.urlParams[c]||(a.params=a.params||{},a.params[c]=b)})}};return function(m,y,z,g){function c(b,c){var d={};c=n({},y,c);r(c,function(c,f){x(c)&&(c=c(b));var e;if(c&&c.charAt&&"@"===c.charAt(0)){e=b;var k=c.substr(1);if(null==k||""===k||"hasOwnProperty"===k||!H.test("."+k))throw B("badmember",k);for(var k=k.split("."),h=0, +n=k.length;h/g,">")}function A(a){for(;a;){if(a.nodeType===s.Node.ELEMENT_NODE)for(var e=a.attributes,d=0,b=e.length;d"))},end:function(a){a=q(a);d||!0!==m[a]||!0===r[a]||(b(""));a==d&&(d=!1)},chars:function(a){d|| +b(L(a))}}};J=s.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)};var z=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=/([^#-~ |!])/g,r=f("area,br,col,hr,img,wbr"),x=f("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),p=f("rp,rt"),n=h({},p,x),x=h({},x,f("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),p=h({},p,f("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")), +l=f("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),w=f("script,style"),m=h({},r,x,p,n),O=f("background,cite,href,longdesc,src,xlink:href,xml:base"),n=f("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"), +p=f("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan", +!0),M=h({},O,p,n),N=function(a,e){function d(b){b=""+b;try{var d=(new a.DOMParser).parseFromString(b,"text/html").body;d.firstChild.remove();return d}catch(e){}}function b(a){c.innerHTML=a;e.documentMode&&A(c);return c}var g;if(e&&e.implementation)g=e.implementation.createHTMLDocument("inert");else throw D("noinert");var c=(g.documentElement||g.getDocumentElement()).querySelector("body");c.innerHTML='';return c.querySelector("svg")? +(c.innerHTML='

',c.querySelector("svg img")?d:b):function(b){b=""+b;try{b=encodeURI(b)}catch(d){return}var e=new a.XMLHttpRequest;e.responseType="document";e.open("GET","data:text/html;charset=utf-8,"+b,!1);e.send(null);b=e.response.body;b.firstChild.remove();return b}}(s,s.document)}).info({angularVersion:"1.7.9"});c.module("ngSanitize").filter("linky",["$sanitize",function(f){var h=/((s?ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i, +t=/^mailto:/i,q=c.$$minErr("linky"),s=c.isDefined,A=c.isFunction,v=c.isObject,y=c.isString;return function(c,z,u){function r(c){c&&l.push(P(c))}function x(c,g){var f,a=p(c);l.push("');r(g);l.push("")}if(null==c||""===c)return c;if(!y(c))throw q("notstring",c);for(var p=A(u)?u:v(u)?function(){return u}:function(){return{}},n=c,l=[],w,m;c=n.match(h);)w=c[0],c[2]|| +c[4]||(w=(c[3]?"http://":"mailto:")+w),m=c.index,r(n.substr(0,m)),x(w,c[0].replace(t,"")),n=n.substring(m+c[0].length);r(n);return f(l.join(""))}}])})(window,window.angular); +//# sourceMappingURL=angular-sanitize.min.js.map diff --git a/static/html/bower_components/angular-touch/angular-touch.min.js b/static/html/bower_components/angular-touch/angular-touch.min.js new file mode 100644 index 00000000..c6b0f472 --- /dev/null +++ b/static/html/bower_components/angular-touch/angular-touch.min.js @@ -0,0 +1,10 @@ +/* + AngularJS v1.7.9 + (c) 2010-2018 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(t,p){'use strict';function q(g,h,s){n.directive(g,["$parse","$swipe",function(a,b){return function(c,e,f){function k(a){if(!d)return!1;var b=Math.abs(a.y-d.y);a=(a.x-d.x)*h;return l&&75>b&&0b/a}var m=a(f[g]),d,l,r=["touch"];p.isDefined(f.ngSwipeDisableMouse)||r.push("mouse");b.bind(e,{start:function(a,b){d=a;l=!0},cancel:function(a){l=!1},end:function(a,b){k(a)&&c.$apply(function(){e.triggerHandler(s);m(c,{$event:b})})}},r)}}])}var n=p.module("ngTouch",[]);n.info({angularVersion:"1.7.9"}); +n.factory("$swipe",[function(){function g(a){a=a.originalEvent||a;var b=a.touches&&a.touches.length?a.touches:[a];a=a.changedTouches&&a.changedTouches[0]||b[0];return{x:a.clientX,y:a.clientY}}function h(a,b){var c=[];p.forEach(a,function(a){(a=n[a][b])&&c.push(a)});return c.join(" ")}var n={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"},pointer:{start:"pointerdown",move:"pointermove",end:"pointerup",cancel:"pointercancel"}}; +return{bind:function(a,b,c){var e,f,k,m,d=!1;c=c||["mouse","touch","pointer"];a.on(h(c,"start"),function(a){k=g(a);d=!0;f=e=0;m=k;b.start&&b.start(k,a)});var l=h(c,"cancel");if(l)a.on(l,function(a){d=!1;b.cancel&&b.cancel(a)});a.on(h(c,"move"),function(a){if(d&&k){var c=g(a);e+=Math.abs(c.x-m.x);f+=Math.abs(c.y-m.y);m=c;10>e&&10>f||(f>e?(d=!1,b.cancel&&b.cancel(a)):(a.preventDefault(),b.move&&b.move(c,a)))}});a.on(h(c,"end"),function(a){d&&(d=!1,b.end&&b.end(g(a),a))})}}}]);q("ngSwipeLeft",-1,"swipeleft"); +q("ngSwipeRight",1,"swiperight")})(window,window.angular); +//# sourceMappingURL=angular-touch.min.js.map diff --git a/static/html/bower_components/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js b/static/html/bower_components/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js new file mode 100644 index 00000000..a66674d4 --- /dev/null +++ b/static/html/bower_components/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js @@ -0,0 +1,6 @@ +/*! + * angular-translate - v2.18.2 - 2020-01-04 + * + * Copyright (c) 2020 The angular-translate team, Pascal Precht; Licensed MIT + */ +!function(e,i){"function"==typeof define&&define.amd?define([],function(){return i()}):"object"==typeof module&&module.exports?module.exports=i():i()}(0,function(){function e(n,a){"use strict";return function(r){if(!(r&&(angular.isArray(r.files)||angular.isString(r.prefix)&&angular.isString(r.suffix))))throw new Error("Couldn't load static files, no files and prefix or suffix specified!");r.files||(r.files=[{prefix:r.prefix,suffix:r.suffix}]);for(var e=function(e){if(!e||!angular.isString(e.prefix)||!angular.isString(e.suffix))throw new Error("Couldn't load static file, no prefix or suffix specified!");var i=[e.prefix,r.key,e.suffix].join("");return angular.isObject(r.fileMap)&&r.fileMap[i]&&(i=r.fileMap[i]),a(angular.extend({url:i,method:"GET"},r.$http)).then(function(e){return e.data},function(){return n.reject(r.key)})},i=[],t=r.files.length,f=0;f");return e.text(t),e.html()},i=function(t){if(!n)throw new Error("pascalprecht.translate.$translateSanitization: Error cannot find $sanitize service. Either include the ngSanitize module (https://docs.angularjs.org/api/ngSanitize) or use a sanitization strategy which does not depend on $sanitize, such as 'escape'.");return n(t)},s=function(t){if(!a)throw new Error("pascalprecht.translate.$translateSanitization: Error cannot find $sce service.");return a.trustAsHtml(t)},o=function(t,n,a){if(angular.isDate(t))return t;if(angular.isObject(t)){var r=angular.isArray(t)?[]:{};if(a){if(-1=0&&c.setCollectionLength(m,a)})):d.$watchCollection(function(){return p(d)},function(a){a&&c.setCollectionLength(m,a.length)}),o(d)}}function e(a,b){var c,d=!!a.match(/(\|\s*itemsPerPage\s*:[^|]*:[^|]*)/);return c=b===j||d?a:a.replace(/(\|\s*itemsPerPage\s*:[^|]*)/,"$1 : '"+b+"'")}function f(a,b,c){a[0].hasAttribute("dir-paginate-start")||a[0].hasAttribute("data-dir-paginate-start")?(b.$set("ngRepeatStart",c),a.eq(a.length-1).attr("ng-repeat-end",!0)):b.$set("ngRepeat",c)}function g(a){angular.forEach(a,function(a){1===a.nodeType&&angular.element(a).attr("dir-paginate-no-compile",!0)})}function h(a){angular.forEach(a,function(a){1===a.nodeType&&angular.element(a).removeAttr("dir-paginate-no-compile")}),a.eq(0).removeAttr("dir-paginate-start").removeAttr("dir-paginate").removeAttr("data-dir-paginate-start").removeAttr("data-dir-paginate"),a.eq(a.length-1).removeAttr("dir-paginate-end").removeAttr("data-dir-paginate-end")}function i(a,c,d){var e;if(c.currentPage)e=b(c.currentPage);else{var f=(d+"__currentPage").replace(/\W/g,"_");a[f]=1,e=b(f)}return e}return{terminal:!0,multiElement:!0,priority:100,compile:d}}function b(){return{priority:5e3,terminal:!0}}function c(a){a.put("angularUtils.directives.dirPagination.template",'

')}function d(a,b){function c(b,c,e){function g(c){a.isRegistered(m)&&k(c)&&(b.pages=d(c,a.getCollectionLength(m),a.getItemsPerPage(m),o),b.pagination.current=c,i(),b.onPageChange&&b.onPageChange({newPageNumber:c}))}function h(){if(a.isRegistered(m)){var c=parseInt(a.getCurrentPage(m))||1;b.pages=d(c,a.getCollectionLength(m),a.getItemsPerPage(m),o),b.pagination.current=c,b.pagination.last=b.pages[b.pages.length-1],b.pagination.last0&&a<=b.pagination.last}var l=e.paginationId||j,m=b.paginationId||e.paginationId||j;if(!a.isRegistered(m)&&!a.isRegistered(l)){var n=m!==j?" (id: "+m+") ":" ";console.warn("Pagination directive: the pagination controls"+n+"cannot be used without the corresponding pagination directive, which was not found at link time.")}b.maxSize||(b.maxSize=9),b.autoHide=void 0===b.autoHide?!0:b.autoHide,b.directionLinks=angular.isDefined(e.directionLinks)?b.$parent.$eval(e.directionLinks):!0,b.boundaryLinks=angular.isDefined(e.boundaryLinks)?b.$parent.$eval(e.boundaryLinks):!1;var o=Math.max(b.maxSize,5);b.pages=[],b.pagination={last:1,current:1},b.range={lower:1,upper:1,total:1},b.$watch(function(){return a.isRegistered(m)?(a.getCollectionLength(m)+1)*a.getItemsPerPage(m):void 0},function(a){a>0&&h()}),b.$watch(function(){return a.isRegistered(m)?a.getItemsPerPage(m):void 0},function(a,c){a!=c&&"undefined"!=typeof c&&g(b.pagination.current)}),b.$watch(function(){return a.isRegistered(m)?a.getCurrentPage(m):void 0},function(a,b){a!=b&&g(a)}),b.setCurrent=function(b){a.isRegistered(m)&&k(b)&&(b=parseInt(b,10),a.setCurrentPage(m,b))},b.tracker=function(a,b){return a+"_"+b}}function d(a,b,c,d){var f,g=[],h=Math.ceil(b/c),i=Math.ceil(d/2);f=i>=a?"start":a>h-i?"end":"middle";for(var j=h>d,k=1;h>=k&&d>=k;){var l=e(k,a,d,h),m=2===k&&("middle"===f||"end"===f),n=k===d-1&&("middle"===f||"start"===f);j&&(m||n)?g.push("..."):g.push(l),k++}return g}function e(a,b,c,d){var e=Math.ceil(c/2);return a===c?d:1===a?a:d>c?b>d-e?d-c+a:b>e?b-e+a:a:a}var f=/^\d+$/;return{restrict:"AE",templateUrl:function(a,c){return c.templateUrl||b.getPath()},scope:{maxSize:"=?",onPageChange:"&?",paginationId:"=?",autoHide:"=?"},link:c}}function e(a){return function(b,c,d){if("undefined"==typeof d&&(d=j),!a.isRegistered(d))throw"pagination directive: the itemsPerPage id argument (id: "+d+") does not match a registered pagination-id.";var e,g;if(angular.isObject(b)){if(c=parseInt(c)||9999999999,g=a.isAsyncMode(d)?0:(a.getCurrentPage(d)-1)*c,e=g+c,a.setItemsPerPage(d,c),b instanceof Array)return b.slice(g,e);var h={};return angular.forEach(f(b).slice(g,e),function(a){h[a]=b[a]}),h}return b}}function f(a){if(Object.keys)return Object.keys(a);var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b}function g(){var a,b={};this.registerInstance=function(c){"undefined"==typeof b[c]&&(b[c]={asyncMode:!1},a=c)},this.isRegistered=function(a){return"undefined"!=typeof b[a]},this.getLastInstanceId=function(){return a},this.setCurrentPageParser=function(a,c,d){b[a].currentPageParser=c,b[a].context=d},this.setCurrentPage=function(a,c){b[a].currentPageParser.assign(b[a].context,c)},this.getCurrentPage=function(a){var c=b[a].currentPageParser;return c?c(b[a].context):1},this.setItemsPerPage=function(a,c){b[a].itemsPerPage=c},this.getItemsPerPage=function(a){return b[a].itemsPerPage},this.setCollectionLength=function(a,c){b[a].collectionLength=c},this.getCollectionLength=function(a){return b[a].collectionLength},this.setAsyncModeTrue=function(a){b[a].asyncMode=!0},this.isAsyncMode=function(a){return b[a].asyncMode}}function h(){var a="angularUtils.directives.dirPagination.template";this.setPath=function(b){a=b},this.$get=function(){return{getPath:function(){return a}}}}var i="angularUtils.directives.dirPagination",j="__default";angular.module(i,[]).directive("dirPaginate",["$compile","$parse","paginationService",a]).directive("dirPaginateNoCompile",b).directive("dirPaginationControls",["paginationService","paginationTemplate",d]).filter("itemsPerPage",["paginationService",e]).service("paginationService",g).provider("paginationTemplate",h).run(["$templateCache",c])}(); \ No newline at end of file diff --git a/static/html/bower_components/angular-utils-pagination/dirPagination.tpl.html b/static/html/bower_components/angular-utils-pagination/dirPagination.tpl.html new file mode 100644 index 00000000..db98d4cb --- /dev/null +++ b/static/html/bower_components/angular-utils-pagination/dirPagination.tpl.html @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/static/html/bower_components/angular-webstorage/angular-webstorage.min.js b/static/html/bower_components/angular-webstorage/angular-webstorage.min.js new file mode 100644 index 00000000..2ae84bce --- /dev/null +++ b/static/html/bower_components/angular-webstorage/angular-webstorage.min.js @@ -0,0 +1,2 @@ +/*! mifosx-community-app 2022-07-11 */ +var webStorageModule=angular.module("webStorageModule",[]);webStorageModule.constant("defaultSettings",{prefix:"",order:["local","session","memory"],errorName:"webStorage.notification.error",testKey:"webStorage.test.key"}),webStorageModule.factory("webStorage",["$rootScope","defaultSettings",function(a,b){"use strict";function c(a,b){return console.warn(I),f(a,b)}function d(a,b){return console.warn(I),g(a,b)}function e(a,b){return console.warn(I),h(a,b)}function f(a,b){if(K){try{localStorage.setItem(P+a,JSON.stringify(b))}catch(c){return C(c)}return!0}return!1}function g(a,b){if(L){try{sessionStorage.setItem(P+a,JSON.stringify(b))}catch(c){return C(c)}return!0}return!1}function h(a,b){return Q[a]=b,!0}function i(a){if(K)try{var b=localStorage.getItem(P+a);return b&&JSON.parse(b)}catch(c){return C(c),null}return null}function j(a){if(L)try{var b=sessionStorage.getItem(P+a);return b&&JSON.parse(b)}catch(c){return C(c),null}return null}function k(a){return a in Q?Q[a]:null}function l(a){return null!==i(a)}function m(a){return null!==j(a)}function n(a){return null!==k(a)}function o(a){return K?localStorage.key(a):null}function p(a){return L?sessionStorage.key(a):null}function q(a){var b=0;for(var c in Q)if(Q.hasOwnProperty(c)){if(a===b)return c;if(b+=1,b>a)return null}return null}function r(){return K?localStorage.length:0}function s(){return L?sessionStorage.length:0}function t(){if(Object.keys)return Object.keys(Q).length;var a=0;for(var b in Q)Q.hasOwnProperty(b)&&(a+=1);return a}function u(a){if(K){try{localStorage.removeItem(P+a)}catch(b){return C(b)}return!0}return!1}function v(a){if(L){try{sessionStorage.removeItem(P+a)}catch(b){return C(b)}return!0}return!1}function w(a){return delete Q[a],!0}function x(){if(!K)return!1;if(P){var a=P.length;try{for(var b in localStorage)b.substr(0,a)===P&&localStorage.removeItem(b)}catch(c){return C(c)}return!0}try{localStorage.clear()}catch(c){return C(c)}return!0}function y(){if(!L)return!1;if(P){var a=P.length;try{for(var b in sessionStorage)b.substr(0,a)===P&&sessionStorage.removeItem(b)}catch(c){return C(c)}return!0}try{sessionStorage.clear()}catch(c){return C(c)}return!0}function z(){return Q={},!0}function A(){D();try{return localStorage.setItem(P+b.testKey,b.testKey),localStorage.removeItem(P+b.testKey),!0}catch(a){return!1}}function B(){E();try{return sessionStorage.setItem(P+b.testKey,b.testKey),sessionStorage.removeItem(P+b.testKey),!0}catch(a){return!1}}function C(b){return a.$broadcast(J,b.title+": "+b.message),!1}function D(){try{window.localStorage||(window.localStorage={getItem:function(a){return a&&this.hasOwnProperty(a)?unescape(document.cookie.replace(new RegExp("(?:^|.*;\\s*)"+escape(a).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*"),"$1")):null},key:function(a){return unescape(document.cookie.replace(/\s*\=(?:.(?!;))*$/,"").split(/\s*\=(?:[^;](?!;))*[^;]?;\s*/)[a])},setItem:function(a,b){a&&(document.cookie=escape(a)+"="+escape(b)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/",this.length=document.cookie.match(/\=/g).length)},length:0,removeItem:function(a){a&&this.hasOwnProperty(a)&&(document.cookie=escape(a)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/",this.length--)},hasOwnProperty:function(a){return new RegExp("(?:^|;\\s*)"+escape(a).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)}},window.localStorage.length=(document.cookie.match(/\=/g)||window.localStorage).length,M=!0)}catch(a){}}function E(){try{window.sessionStorage||(window.sessionStorage={getItem:function(a){return a&&this.hasOwnProperty(a)?unescape(document.cookie.replace(new RegExp("(?:^|.*;\\s*)"+escape(a).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*"),"$1")):null},key:function(a){return unescape(document.cookie.replace(/\s*\=(?:.(?!;))*$/,"").split(/\s*\=(?:[^;](?!;))*[^;]?;\s*/)[a])},setItem:function(a,b){a&&(document.cookie=escape(a)+"="+escape(b)+"; path=/",this.length=document.cookie.match(/\=/g).length)},length:0,removeItem:function(a){a&&this.hasOwnProperty(a)&&(document.cookie=escape(a)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/",this.length--)},hasOwnProperty:function(a){return new RegExp("(?:^|;\\s*)"+escape(a).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)}},window.sessionStorage.length=(document.cookie.match(/\=/g)||window.sessionStorage).length,N=!0)}catch(a){}}function F(a){var b=M;return a===!0&&M&&(window.localStorage=null,M=!1),b}function G(a){var b=N;return a===!0&&N&&(window.sessionStorage=null,M=!1),b}var H="undefined",I="angular-webstorage.js -- `add()` had been deprecated, use `set()` instead",J=b.errorName,K=A(),L=B(),M=!1,N=!1,O=b.order,P=b.prefix,Q={},R={isSupported:K||L,local:{isSupported:K,add:c,set:f,get:i,has:l,key:o,length:r,remove:u,clear:x,isPolyfilled:F},session:{isSupported:L,add:d,set:g,get:j,has:m,key:p,length:s,remove:v,clear:y,isPolyfilled:G},memory:{isSupported:!0,add:e,set:h,get:k,has:n,key:q,length:t,remove:w,clear:z,isPolyfilled:!1}};return R.add=function(a,b,c){return console.warn(I),R.set(a,b,c)},R.set=function(a,b,c){c=typeof c!==H?!!c:!1;for(var d=!1,e=O.length,f=0;e>f;++f){var g=R[O[f]];if(g.isSupported&&(d=g.set(a,b)||d,!c))return d}return d},R.get=function(a,b){b=typeof b!==H?!!b:!0;for(var c=O.length,d=0;c>d;++d){var e=R[O[d]];if(e.isSupported){var f=e.get(a);if(!b||null!==f)return f}}return null},R.has=function(a,b){return null!==R.get(a,b)},R.key=function(a,b){b=typeof b!==H?!!b:!0;for(var c=O.length,d=0;c>d;++d){var e=R[O[d]];if(e.isSupported){var f=e.key(a);if(!b||null!==f)return f}}return null},R.length=function(a){a=typeof a!==H?!!a:!0;for(var b=O.length,c=0;b>c;++c){var d=R[O[c]];if(d.isSupported){var e=d.length();if(!a||0!==e)return e}}return 0},R.remove=function(a,b){b=typeof b!==H?!!b:!0;for(var c=!1,d=O.length,e=0;d>e;++e){var f=R[O[e]];if(f.isSupported&&(c=f.remove(a)||c,!b))return c}return c},R.clear=function(a){a=typeof a!==H?!!a:!0;for(var b=!1,c=O.length,d=0;c>d;++d){var e=R[O[d]];if(e.isSupported&&(b=e.clear()||b,!a))return b}return b},R.errorName=function(a){var b=J;if(typeof a!==H){if("string"!=typeof a)return!1;J=a}return b},R.order=function(a){var b=angular.copy(O);if(typeof a!==H){O=[];for(var c in a)/^(local|session|memory)$/.test(a[c])&&O.push(a[c])}return b},R.prefix=function(a){var b=P;if(typeof a!==H){if("string"!=typeof a)return!1;P=a}return b},R}]); \ No newline at end of file diff --git a/static/html/bower_components/angular/angular.min.js b/static/html/bower_components/angular/angular.min.js new file mode 100644 index 00000000..f6bf3370 --- /dev/null +++ b/static/html/bower_components/angular/angular.min.js @@ -0,0 +1,350 @@ +/* + AngularJS v1.7.9 + (c) 2010-2018 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(C){'use strict';function re(a){if(D(a))w(a.objectMaxDepth)&&(Wb.objectMaxDepth=Xb(a.objectMaxDepth)?a.objectMaxDepth:NaN),w(a.urlErrorParamsEnabled)&&Ga(a.urlErrorParamsEnabled)&&(Wb.urlErrorParamsEnabled=a.urlErrorParamsEnabled);else return Wb}function Xb(a){return W(a)&&0c)return"...";var d=b.$$hashKey,f;if(H(a)){f=0;for(var g=a.length;f").append(a).html();try{return a[0].nodeType===Pa?K(b):b.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(a,b){return"<"+K(b)})}catch(d){return K(b)}}function Tc(a){try{return decodeURIComponent(a)}catch(b){}}function gc(a){var b={};r((a||"").split("&"), +function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=Tc(e),w(e)&&(f=w(f)?Tc(f):!0,ta.call(b,e)?H(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function ye(a){var b=[];r(a,function(a,c){H(a)?r(a,function(a){b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))}):b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))});return b.length?b.join("&"):""}function hc(a){return ba(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ba(a, +b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function ze(a,b){var d,c,e=Qa.length;for(c=0;c protocol indicates an extension, document.location.href does not match."))}function Uc(a,b,d){D(d)||(d={});d=S({strictDi:!1},d);var c=function(){a=x(a);if(a.injector()){var c=a[0]===C.document?"document":za(a);throw pa("btstrpd",c.replace(//,">"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider", +function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=fb(b,d.strictDi);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;C&&e.test(C.name)&&(d.debugInfoEnabled=!0,C.name=C.name.replace(e,""));if(C&&!f.test(C.name))return c();C.name=C.name.replace(f,"");ca.resumeBootstrap=function(a){r(a,function(a){b.push(a)});return c()};B(ca.resumeDeferredBootstrap)&& +ca.resumeDeferredBootstrap()}function Ce(){C.name="NG_ENABLE_DEBUG_INFO!"+C.name;C.location.reload()}function De(a){a=ca.element(a).injector();if(!a)throw pa("test");return a.get("$$testability")}function Vc(a,b){b=b||"_";return a.replace(Ee,function(a,c){return(c?b:"")+a.toLowerCase()})}function Fe(){var a;if(!Wc){var b=qb();(rb=z(b)?C.jQuery:b?C[b]:void 0)&&rb.fn.on?(x=rb,S(rb.fn,{scope:Wa.scope,isolateScope:Wa.isolateScope,controller:Wa.controller,injector:Wa.injector,inheritedData:Wa.inheritedData})): +x=Y;a=x.cleanData;x.cleanData=function(b){for(var c,e=0,f;null!=(f=b[e]);e++)(c=(x._data(f)||{}).events)&&c.$destroy&&x(f).triggerHandler("$destroy");a(b)};ca.element=x;Wc=!0}}function gb(a,b,d){if(!a)throw pa("areq",b||"?",d||"required");return a}function sb(a,b,d){d&&H(a)&&(a=a[a.length-1]);gb(B(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Ja(a,b){if("hasOwnProperty"===a)throw pa("badname",b);}function Ge(a,b,d){if(!b)return a;b=b.split("."); +for(var c,e=a,f=b.length,g=0;g")+c[2];for(c=c[0];c--;)d=d.lastChild;f=db(f,d.childNodes);d=e.firstChild;d.textContent=""}else f.push(b.createTextNode(a));e.textContent="";e.innerHTML="";r(f,function(a){e.appendChild(a)});return e}function Y(a){if(a instanceof Y)return a;var b;A(a)&&(a=U(a),b=!0);if(!(this instanceof Y)){if(b&&"<"!==a.charAt(0))throw nc("nosel");return new Y(a)}if(b){b= +C.document;var d;a=(d=og.exec(a))?[b.createElement(d[1])]:(d=ed(a,b))?d.childNodes:[];oc(this,a)}else B(a)?fd(a):oc(this,a)}function pc(a){return a.cloneNode(!0)}function yb(a,b){!b&&lc(a)&&x.cleanData([a]);a.querySelectorAll&&x.cleanData(a.querySelectorAll("*"))}function gd(a){for(var b in a)return!1;return!0}function hd(a){var b=a.ng339,d=b&&Ka[b],c=d&&d.events,d=d&&d.data;d&&!gd(d)||c&&!gd(c)||(delete Ka[b],a.ng339=void 0)}function id(a,b,d,c){if(w(c))throw nc("offargs");var e=(c=zb(a))&&c.events, +f=c&&c.handle;if(f){if(b){var g=function(b){var c=e[b];w(d)&&cb(c||[],d);w(d)&&c&&0l&&this.remove(n.key);return b}},get:function(a){if(l";b=Fa.firstChild.attributes;var d=b[0];b.removeNamedItem(d.name);d.value=c;a.attributes.setNamedItem(d)}function sa(a,b){try{a.addClass(b)}catch(c){}} +function da(a,b,c,d,e){a instanceof x||(a=x(a));var f=Xa(a,b,a,c,d,e);da.$$addScopeClass(a);var g=null;return function(b,c,d){if(!a)throw $("multilink");gb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var h=d.parentBoundTranscludeFn,k=d.transcludeControllers;d=d.futureParentElement;h&&h.$$boundTransclude&&(h=h.$$boundTransclude);g||(g=(d=d&&d[0])?"foreignobject"!==ua(d)&&la.call(d).match(/SVG/)?"svg":"html":"html");d="html"!==g?x(ja(g,x("
").append(a).html())):c?Wa.clone.call(a): +a;if(k)for(var l in k)d.data("$"+l+"Controller",k[l].instance);da.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,h);c||(a=f=null);return d}}function Xa(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,p,I,t;if(n)for(t=Array(c.length),m=0;mu.priority)break;if(O=u.scope)u.templateUrl||(D(O)?(ba("new/isolated scope",s||t,u,y),s=u):ba("new/isolated scope",s,u,y)),t=t||u;Q=u.name;if(!ma&&(u.replace&&(u.templateUrl||u.template)||u.transclude&&!u.$$tlb)){for(O=sa+1;ma=a[O++];)if(ma.transclude&&!ma.$$tlb||ma.replace&&(ma.templateUrl||ma.template)){Ib=!0;break}ma=!0}!u.templateUrl&&u.controller&&(J=J||T(),ba("'"+Q+"' controller", +J[Q],u,y),J[Q]=u);if(O=u.transclude)if(G=!0,u.$$tlb||(ba("transclusion",L,u,y),L=u),"element"===O)N=!0,n=u.priority,M=y,y=d.$$element=x(da.$$createComment(Q,d[Q])),b=y[0],pa(f,Ha.call(M,0),b),R=Z(Ib,M,e,n,g&&g.name,{nonTlbTranscludeDirective:L});else{var ka=T();if(D(O)){M=C.document.createDocumentFragment();var Xa=T(),F=T();r(O,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a;Xa[a]=b;ka[b]=null;F[b]=c});r(y.contents(),function(a){var b=Xa[wa(ua(a))];b?(F[b]=!0,ka[b]=ka[b]||C.document.createDocumentFragment(), +ka[b].appendChild(a)):M.appendChild(a)});r(F,function(a,b){if(!a)throw $("reqslot",b);});for(var K in ka)ka[K]&&(R=x(ka[K].childNodes),ka[K]=Z(Ib,R,e));M=x(M.childNodes)}else M=x(pc(b)).contents();y.empty();R=Z(Ib,M,e,void 0,void 0,{needsNewScope:u.$$isolateScope||u.$$newScope});R.$$slots=ka}if(u.template)if(P=!0,ba("template",v,u,y),v=u,O=B(u.template)?u.template(y,d):u.template,O=Na(O),u.replace){g=u;M=mc.test(O)?rd(ja(u.templateNamespace,U(O))):[];b=M[0];if(1!==M.length||1!==b.nodeType)throw $("tplrt", +Q,"");pa(f,y,b);A={$attr:{}};O=sc(b,[],A);var Dg=a.splice(sa+1,a.length-(sa+1));(s||t)&&fa(O,s,t);a=a.concat(O).concat(Dg);ga(d,A);A=a.length}else y.html(O);if(u.templateUrl)P=!0,ba("template",v,u,y),v=u,u.replace&&(g=u),p=ha(a.splice(sa,a.length-sa),y,d,f,G&&R,h,k,{controllerDirectives:J,newScopeDirective:t!==u&&t,newIsolateScopeDirective:s,templateDirective:v,nonTlbTranscludeDirective:L}),A=a.length;else if(u.compile)try{q=u.compile(y,d,R);var X=u.$$originalDirective||u;B(q)?m(null,Va(X,q),E,ib): +q&&m(Va(X,q.pre),Va(X,q.post),E,ib)}catch(ca){c(ca,za(y))}u.terminal&&(p.terminal=!0,n=Math.max(n,u.priority))}p.scope=t&&!0===t.scope;p.transcludeOnThisElement=G;p.templateOnThisElement=P;p.transclude=R;l.hasElementTranscludeDirective=N;return p}function W(a,b,c,d){var e;if(A(b)){var f=b.match(l);b=b.substring(f[0].length);var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;if(!e){var h="$"+b+"Controller";e="^^"===g&&c[0]&&9===c[0].nodeType?null:g?c.inheritedData(h):c.data(h)}if(!e&& +!f)throw $("ctreq",b,a);}else if(H(b))for(e=[],g=0,f=b.length;gc.priority)&&-1!==c.restrict.indexOf(e)){k&&(c=ac(c,{$$start:k,$$end:l}));if(!c.$$bindings){var I=m=c,t=c.name,u={isolateScope:null,bindToController:null};D(I.scope)&&(!0===I.bindToController?(u.bindToController=d(I.scope,t,!0),u.isolateScope={}):u.isolateScope=d(I.scope,t,!1));D(I.bindToController)&&(u.bindToController=d(I.bindToController, +t,!0));if(u.bindToController&&!I.controller)throw $("noctrl",t);m=m.$$bindings=u;D(m.isolateScope)&&(c.$$isolateBindings=m.isolateScope)}b.push(c);m=c}}return m}function ca(b){if(f.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,e=c.length;d"+b+"";return c.childNodes[0].childNodes;default:return b}}function oa(a,b){if("srcdoc"===b)return u.HTML;if("src"===b||"ngSrc"===b)return-1===["img","video","audio","source","track"].indexOf(a)?u.RESOURCE_URL:u.MEDIA_URL;if("xlinkHref"===b)return"image"===a?u.MEDIA_URL: +"a"===a?u.URL:u.RESOURCE_URL;if("form"===a&&"action"===b||"base"===a&&"href"===b||"link"===a&&"href"===b)return u.RESOURCE_URL;if("a"===a&&("href"===b||"ngHref"===b))return u.URL}function xa(a,b){var c=b.toLowerCase();return v[a+"|"+c]||v["*|"+c]}function ya(a){return ma(u.valueOf(a),"ng-prop-srcset")}function Ea(a,b,c,d){if(m.test(d))throw $("nodomevents");a=ua(a);var e=xa(a,d),f=Ta;"srcset"!==d||"img"!==a&&"source"!==a?e&&(f=u.getTrusted.bind(u,e)):f=ya;b.push({priority:100,compile:function(a,b){var e= +p(b[c]),g=p(b[c],function(a){return u.valueOf(a)});return{pre:function(a,b){function c(){var g=e(a);b[0][d]=f(g)}c();a.$watch(g,c)}}}})}function Ia(a,c,d,e,f){var g=ua(a),k=oa(g,e),l=h[e]||f,p=b(d,!f,k,l);if(p){if("multiple"===e&&"select"===g)throw $("selmulti",za(a));if(m.test(e))throw $("nodomevents");c.push({priority:100,compile:function(){return{pre:function(a,c,f){c=f.$$observers||(f.$$observers=T());var g=f[e];g!==d&&(p=g&&b(g,!0,k,l),d=g);p&&(f[e]=p(a),(c[e]||(c[e]=[])).$$inter=!0,(f.$$observers&& +f.$$observers[e].$$scope||a).$watch(p,function(a,b){"class"===e&&a!==b?f.$updateClass(a,b):f.$set(e,a)}))}}}})}}function pa(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g=b)return a;for(;b--;){var d=a[b];(8===d.nodeType||d.nodeType===Pa&&""===d.nodeValue.trim())&&Fg.call(a,b,1)}return a}function Bg(a,b){if(b&&A(b))return b;if(A(a)){var d=ud.exec(a);if(d)return d[3]}}function Ff(){var a={};this.has=function(b){return a.hasOwnProperty(b)};this.register=function(b,d){Ja(b, +"controller");D(b)?S(a,b):a[b]=d};this.$get=["$injector",function(b){function d(a,b,d,g){if(!a||!D(a.$scope))throw F("$controller")("noscp",g,b);a.$scope[b]=d}return function(c,e,f,g){var k,h,l;f=!0===f;g&&A(g)&&(l=g);if(A(c)){g=c.match(ud);if(!g)throw vd("ctrlfmt",c);h=g[1];l=l||g[3];c=a.hasOwnProperty(h)?a[h]:Ge(e.$scope,h,!0);if(!c)throw vd("ctrlreg",h);sb(c,h,!0)}if(f)return f=(H(c)?c[c.length-1]:c).prototype,k=Object.create(f||null),l&&d(e,l,k,h||c.name),S(function(){var a=b.invoke(c,k,e,h); +a!==k&&(D(a)||B(a))&&(k=a,l&&d(e,l,k,h||c.name));return k},{instance:k,identifier:l});k=b.instantiate(c,e,h);l&&d(e,l,k,h||c.name);return k}}]}function Gf(){this.$get=["$window",function(a){return x(a.document)}]}function Hf(){this.$get=["$document","$rootScope",function(a,b){function d(){e=c.hidden}var c=a[0],e=c&&c.hidden;a.on("visibilitychange",d);b.$on("$destroy",function(){a.off("visibilitychange",d)});return function(){return e}}]}function If(){this.$get=["$log",function(a){return function(b, +d){a.error.apply(a,arguments)}}]}function uc(a){return D(a)?ha(a)?a.toISOString():eb(a):a}function Of(){this.$get=function(){return function(a){if(!a)return"";var b=[];Oc(a,function(a,c){null===a||z(a)||B(a)||(H(a)?r(a,function(a){b.push(ba(c)+"="+ba(uc(a)))}):b.push(ba(c)+"="+ba(uc(a))))});return b.join("&")}}}function Pf(){this.$get=function(){return function(a){function b(a,e,f){H(a)?r(a,function(a,c){b(a,e+"["+(D(a)?c:"")+"]")}):D(a)&&!ha(a)?Oc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}): +(B(a)&&(a=a()),d.push(ba(e)+"="+(null==a?"":ba(uc(a)))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function vc(a,b){if(A(a)){var d=a.replace(Gg,"").trim();if(d){var c=b("Content-Type"),c=c&&0===c.indexOf(wd),e;(e=c)||(e=(e=d.match(Hg))&&Ig[e[0]].test(d));if(e)try{a=Rc(d)}catch(f){if(!c)return a;throw Kb("baddata",a,f);}}}return a}function xd(a){var b=T(),d;A(a)?r(a.split("\n"),function(a){d=a.indexOf(":");var e=K(U(a.substr(0,d)));a=U(a.substr(d+1));e&&(b[e]=b[e]?b[e]+", "+a:a)}):D(a)&& +r(a,function(a,d){var f=K(d),g=U(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function yd(a){var b;return function(d){b||(b=xd(a));return d?(d=b[K(d)],void 0===d&&(d=null),d):b}}function zd(a,b,d,c){if(B(c))return c(a,b,d);r(c,function(c){a=c(a,b,d)});return a}function Nf(){var a=this.defaults={transformResponse:[vc],transformRequest:[function(a){return D(a)&&"[object File]"!==la.call(a)&&"[object Blob]"!==la.call(a)&&"[object FormData]"!==la.call(a)?eb(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"}, +post:ja(wc),put:ja(wc),patch:ja(wc)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer",jsonpCallbackParam:"callback"},b=!1;this.useApplyAsync=function(a){return w(a)?(b=!!a,this):b};var d=this.interceptors=[],c=this.xsrfWhitelistedOrigins=[];this.$get=["$browser","$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector","$sce",function(e,f,g,k,h,l,m,p){function n(b){function c(a,b){for(var d=0,e=b.length;da?b:l.reject(b)}if(!D(b))throw F("$http")("badreq",b);if(!A(p.valueOf(b.url)))throw F("$http")("badreq",b.url);var g=S({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer,jsonpCallbackParam:a.jsonpCallbackParam}, +b);g.headers=function(b){var c=a.headers,e=S({},b.headers),f,g,h,c=S({},c.common,c[K(b.method)]);a:for(f in c){g=K(f);for(h in e)if(K(h)===g)continue a;e[f]=c[f]}return d(e,ja(b))}(b);g.method=ub(g.method);g.paramSerializer=A(g.paramSerializer)?m.get(g.paramSerializer):g.paramSerializer;e.$$incOutstandingRequestCount("$http");var h=[],k=[];b=l.resolve(g);r(v,function(a){(a.request||a.requestError)&&h.unshift(a.request,a.requestError);(a.response||a.responseError)&&k.push(a.response,a.responseError)}); +b=c(b,h);b=b.then(function(b){var c=b.headers,d=zd(b.data,yd(c),void 0,b.transformRequest);z(d)&&r(c,function(a,b){"content-type"===K(b)&&delete c[b]});z(b.withCredentials)&&!z(a.withCredentials)&&(b.withCredentials=a.withCredentials);return s(b,d).then(f,f)});b=c(b,k);return b=b.finally(function(){e.$$completeOutstandingRequest(E,"$http")})}function s(c,d){function e(a){if(a){var c={};r(a,function(a,d){c[d]=function(c){function d(){a(c)}b?h.$applyAsync(d):h.$$phase?d():h.$apply(d)}});return c}}function k(a, +c,d,e,f){function g(){m(c,a,d,e,f)}R&&(200<=a&&300>a?R.put(O,[a,c,xd(d),e,f]):R.remove(O));b?h.$applyAsync(g):(g(),h.$$phase||h.$apply())}function m(a,b,d,e,f){b=-1<=b?b:0;(200<=b&&300>b?L.resolve:L.reject)({data:a,status:b,headers:yd(d),config:c,statusText:e,xhrStatus:f})}function s(a){m(a.data,a.status,ja(a.headers()),a.statusText,a.xhrStatus)}function v(){var a=n.pendingRequests.indexOf(c);-1!==a&&n.pendingRequests.splice(a,1)}var L=l.defer(),u=L.promise,R,q,ma=c.headers,x="jsonp"===K(c.method), +O=c.url;x?O=p.getTrustedResourceUrl(O):A(O)||(O=p.valueOf(O));O=G(O,c.paramSerializer(c.params));x&&(O=t(O,c.jsonpCallbackParam));n.pendingRequests.push(c);u.then(v,v);!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(R=D(c.cache)?c.cache:D(a.cache)?a.cache:N);R&&(q=R.get(O),w(q)?q&&B(q.then)?q.then(s,s):H(q)?m(q[1],q[0],ja(q[2]),q[3],q[4]):m(q,200,{},"OK","complete"):R.put(O,u));z(q)&&((q=jc(c.url)?g()[c.xsrfCookieName||a.xsrfCookieName]:void 0)&&(ma[c.xsrfHeaderName||a.xsrfHeaderName]= +q),f(c.method,O,d,k,ma,c.timeout,c.withCredentials,c.responseType,e(c.eventHandlers),e(c.uploadEventHandlers)));return u}function G(a,b){0=h&&(t.resolve(s),f(r.$$intervalId));G||c.$apply()},k,t,G);return r}}}]}function Ad(a,b){var d=ga(a);b.$$protocol=d.protocol;b.$$host=d.hostname;b.$$port=fa(d.port)||Mg[d.protocol]||null}function Bd(a,b,d){if(Ng.test(a))throw jb("badpath",a);var c="/"!==a.charAt(0);c&&(a="/"+a);a=ga(a);for(var c=(c&&"/"===a.pathname.charAt(0)?a.pathname.substring(1):a.pathname).split("/"),e=c.length;e--;)c[e]=decodeURIComponent(c[e]),d&&(c[e]=c[e].replace(/\//g,"%2F"));d=c.join("/");b.$$path=d;b.$$search=gc(a.search); +b.$$hash=decodeURIComponent(a.hash);b.$$path&&"/"!==b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function xc(a,b){return a.slice(0,b.length)===b}function xa(a,b){if(xc(b,a))return b.substr(a.length)}function Da(a){var b=a.indexOf("#");return-1===b?a:a.substr(0,b)}function yc(a,b,d){this.$$html5=!0;d=d||"";Ad(a,this);this.$$parse=function(a){var d=xa(b,a);if(!A(d))throw jb("ipthprfx",a,b);Bd(d,this,!0);this.$$path||(this.$$path="/");this.$$compose()};this.$$normalizeUrl=function(a){return b+a.substr(1)}; +this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;w(f=xa(a,c))?(g=f,g=d&&w(f=xa(d,f))?b+(xa("/",f)||f):a+g):w(f=xa(b,c))?g=b+f:b===c+"/"&&(g=b);g&&this.$$parse(g);return!!g}}function zc(a,b,d){Ad(a,this);this.$$parse=function(c){var e=xa(a,c)||xa(b,c),f;z(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",z(e)&&(a=c,this.replace())):(f=xa(d,e),z(f)&&(f=e));Bd(f,this,!1);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;xc(f,e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))? +f[1]:c);this.$$path=c;this.$$compose()};this.$$normalizeUrl=function(b){return a+(b?d+b:"")};this.$$parseLinkUrl=function(b,d){return Da(a)===Da(b)?(this.$$parse(b),!0):!1}}function Cd(a,b,d){this.$$html5=!0;zc.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a===Da(c)?f=c:(g=xa(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$normalizeUrl=function(b){return a+d+b}}function Lb(a){return function(){return this[a]}}function Dd(a, +b){return function(d){if(z(d))return this[a];this[a]=b(d);this.$$compose();return this}}function Tf(){var a="!",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return w(b)?(a=b,this):a};this.html5Mode=function(a){if(Ga(a))return b.enabled=a,this;if(D(a)){Ga(a.enabled)&&(b.enabled=a.enabled);Ga(a.requireBase)&&(b.requireBase=a.requireBase);if(Ga(a.rewriteLinks)||A(a.rewriteLinks))b.rewriteLinks=a.rewriteLinks;return this}return b};this.$get=["$rootScope","$browser","$sniffer", +"$rootElement","$window",function(d,c,e,f,g){function k(a,b){return a===b||ga(a).href===ga(b).href}function h(a,b,d){var e=m.url(),f=m.$$state;try{c.url(a,b,d),m.$$state=c.state()}catch(g){throw m.url(e),m.$$state=f,g;}}function l(a,b){d.$broadcast("$locationChangeSuccess",m.absUrl(),a,m.$$state,b)}var m,p;p=c.baseHref();var n=c.url(),s;if(b.enabled){if(!p&&b.requireBase)throw jb("nobase");s=n.substring(0,n.indexOf("/",n.indexOf("//")+2))+(p||"/");p=e.history?yc:Cd}else s=Da(n),p=zc;var r=s.substr(0, +Da(s).lastIndexOf("/")+1);m=new p(s,r,"#"+a);m.$$parseLinkUrl(n,n);m.$$state=c.state();var t=/^\s*(javascript|mailto):/i;f.on("click",function(a){var e=b.rewriteLinks;if(e&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!==a.which&&2!==a.button){for(var g=x(a.target);"a"!==ua(g[0]);)if(g[0]===f[0]||!(g=g.parent())[0])return;if(!A(e)||!z(g.attr(e))){var e=g.prop("href"),h=g.attr("href")||g.attr("xlink:href");D(e)&&"[object SVGAnimatedString]"===e.toString()&&(e=ga(e.animVal).href);t.test(e)||!e||g.attr("target")|| +a.isDefaultPrevented()||!m.$$parseLinkUrl(e,h)||(a.preventDefault(),m.absUrl()!==c.url()&&d.$apply())}}});m.absUrl()!==n&&c.url(m.absUrl(),!0);var N=!0;c.onUrlChange(function(a,b){xc(a,r)?(d.$evalAsync(function(){var c=m.absUrl(),e=m.$$state,f;m.$$parse(a);m.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;m.absUrl()===a&&(f?(m.$$parse(c),m.$$state=e,h(c,!1,e)):(N=!1,l(c,e)))}),d.$$phase||d.$digest()):g.location.href=a});d.$watch(function(){if(N||m.$$urlUpdatedByLocation){m.$$urlUpdatedByLocation= +!1;var a=c.url(),b=m.absUrl(),f=c.state(),g=m.$$replace,n=!k(a,b)||m.$$html5&&e.history&&f!==m.$$state;if(N||n)N=!1,d.$evalAsync(function(){var b=m.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,m.$$state,f).defaultPrevented;m.absUrl()===b&&(c?(m.$$parse(a),m.$$state=f):(n&&h(b,g,f===m.$$state?null:m.$$state),l(a,f)))})}m.$$replace=!1});return m}]}function Uf(){var a=!0,b=this;this.debugEnabled=function(b){return w(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){cc(a)&&(a.stack&& +f?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||E;return function(){var a=[];r(arguments,function(b){a.push(c(b))});return Function.prototype.apply.call(e,b,a)}}var f=Ca||/\bEdge\//.test(d.navigator&&d.navigator.userAgent);return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b, +arguments)}}()}}]}function Og(a){return a+""}function Pg(a,b){return"undefined"!==typeof a?a:b}function Ed(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function Qg(a,b){switch(a.type){case q.MemberExpression:if(a.computed)return!1;break;case q.UnaryExpression:return 1;case q.BinaryExpression:return"+"!==a.operator?1:!1;case q.CallExpression:return!1}return void 0===b?Fd:b}function Z(a,b,d){var c,e,f=a.isPure=Qg(a,d);switch(a.type){case q.Program:c=!0;r(a.body,function(a){Z(a.expression, +b,f);c=c&&a.expression.constant});a.constant=c;break;case q.Literal:a.constant=!0;a.toWatch=[];break;case q.UnaryExpression:Z(a.argument,b,f);a.constant=a.argument.constant;a.toWatch=a.argument.toWatch;break;case q.BinaryExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case q.LogicalExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case q.ConditionalExpression:Z(a.test, +b,f);Z(a.alternate,b,f);Z(a.consequent,b,f);a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case q.Identifier:a.constant=!1;a.toWatch=[a];break;case q.MemberExpression:Z(a.object,b,f);a.computed&&Z(a.property,b,f);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=a.constant?[]:[a];break;case q.CallExpression:c=d=a.filter?!b(a.callee.name).$stateful:!1;e=[];r(a.arguments,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e, +a.toWatch)});a.constant=c;a.toWatch=d?e:[a];break;case q.AssignmentExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=[a];break;case q.ArrayExpression:c=!0;e=[];r(a.elements,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c;a.toWatch=e;break;case q.ObjectExpression:c=!0;e=[];r(a.properties,function(a){Z(a.value,b,f);c=c&&a.value.constant;e.push.apply(e,a.value.toWatch);a.computed&&(Z(a.key,b,!1),c=c&&a.key.constant,e.push.apply(e, +a.key.toWatch))});a.constant=c;a.toWatch=e;break;case q.ThisExpression:a.constant=!1;a.toWatch=[];break;case q.LocalsExpression:a.constant=!1,a.toWatch=[]}}function Gd(a){if(1===a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:void 0}}function Hd(a){return a.type===q.Identifier||a.type===q.MemberExpression}function Id(a){if(1===a.body.length&&Hd(a.body[0].expression))return{type:q.AssignmentExpression,left:a.body[0].expression,right:{type:q.NGValueParameter},operator:"="}} +function Jd(a){this.$filter=a}function Kd(a){this.$filter=a}function Mb(a,b,d){this.ast=new q(a,d);this.astCompiler=d.csp?new Kd(b):new Jd(b)}function Ac(a){return B(a.valueOf)?a.valueOf():Rg.call(a)}function Vf(){var a=T(),b={"true":!0,"false":!1,"null":null,undefined:void 0},d,c;this.addLiteral=function(a,c){b[a]=c};this.setIdentifierFns=function(a,b){d=a;c=b;return this};this.$get=["$filter",function(e){function f(b,c){var d,f;switch(typeof b){case "string":return f=b=b.trim(),d=a[f],d||(d=new Nb(G), +d=(new Mb(d,e,G)).parse(b),a[f]=p(d)),s(d,c);case "function":return s(b,c);default:return s(E,c)}}function g(a,b,c){return null==a||null==b?a===b:"object"!==typeof a||(a=Ac(a),"object"!==typeof a||c)?a===b||a!==a&&b!==b:!1}function k(a,b,c,d,e){var f=d.inputs,h;if(1===f.length){var k=g,f=f[0];return a.$watch(function(a){var b=f(a);g(b,k,f.isPure)||(h=d(a,void 0,void 0,[b]),k=b&&Ac(b));return h},b,c,e)}for(var l=[],m=[],n=0,p=f.length;n=c.$$state.status&&e&&e.length&&a(function(){for(var a,c,f=0,g=e.length;fa)for(b in l++,f)ta.call(e,b)||(t--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$$pure=g(a).literal;c.$stateful=!c.$$pure;var d=this,e,f,h,k=1r&&(z=4-r,N[z]|| +(N[z]=[]),N[z].push({msg:B(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:g,oldVal:h}));else if(a===c){s=!1;break a}}catch(E){f(E)}if(!(n=!q.$$suspended&&q.$$watchersCount&&q.$$childHead||q!==y&&q.$$nextSibling))for(;q!==y&&!(n=q.$$nextSibling);)q=q.$parent}while(q=n);if((s||w.length)&&!r--)throw v.$$phase=null,d("infdig",b,N);}while(s||w.length);for(v.$$phase=null;JCa)throw Ea("iequirks");var c=ja(V);c.isEnabled=function(){return a}; +c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=Ta);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;r(V,function(a,b){var d=K(b);c[("parse_as_"+d).replace(Cc,wb)]=function(b){return e(a,b)};c[("get_trusted_"+d).replace(Cc,wb)]=function(b){return f(a,b)};c[("trust_as_"+d).replace(Cc,wb)]=function(b){return g(a,b)}}); +return c}]}function ag(){this.$get=["$window","$document",function(a,b){var d={},c=!((!a.nw||!a.nw.process)&&a.chrome&&(a.chrome.app&&a.chrome.app.runtime||!a.chrome.app&&a.chrome.runtime&&a.chrome.runtime.id))&&a.history&&a.history.pushState,e=fa((/android (\d+)/.exec(K((a.navigator||{}).userAgent))||[])[1]),f=/Boxee/i.test((a.navigator||{}).userAgent),g=b[0]||{},k=g.body&&g.body.style,h=!1,l=!1;k&&(h=!!("transition"in k||"webkitTransition"in k),l=!!("animation"in k||"webkitAnimation"in k));return{history:!(!c|| +4>e||f),hasEvent:function(a){if("input"===a&&Ca)return!1;if(z(d[a])){var b=g.createElement("div");d[a]="on"+a in b}return d[a]},csp:Aa(),transitions:h,animations:l,android:e}}]}function bg(){this.$get=ia(function(a){return new Tg(a)})}function Tg(a){function b(){var a=e.pop();return a&&a.cb}function d(a){for(var b=e.length-1;0<=b;--b){var c=e[b];if(c.type===a)return e.splice(b,1),c.cb}}var c={},e=[],f=this.ALL_TASKS_TYPE="$$all$$",g=this.DEFAULT_TASK_TYPE="$$default$$";this.completeTask=function(e, +h){h=h||g;try{e()}finally{var l;l=h||g;c[l]&&(c[l]--,c[f]--);l=c[h];var m=c[f];if(!m||!l)for(l=m?d:b;m=l(h);)try{m()}catch(p){a.error(p)}}};this.incTaskCount=function(a){a=a||g;c[a]=(c[a]||0)+1;c[f]=(c[f]||0)+1};this.notifyWhenNoPendingTasks=function(a,b){b=b||f;c[b]?e.push({type:b,cb:a}):a()}}function dg(){var a;this.httpOptions=function(b){return b?(a=b,this):a};this.$get=["$exceptionHandler","$templateCache","$http","$q","$sce",function(b,d,c,e,f){function g(k,h){g.totalPendingRequests++;if(!A(k)|| +z(d.get(k)))k=f.getTrustedResourceUrl(k);var l=c.defaults&&c.defaults.transformResponse;H(l)?l=l.filter(function(a){return a!==vc}):l===vc&&(l=null);return c.get(k,S({cache:d,transformResponse:l},a)).finally(function(){g.totalPendingRequests--}).then(function(a){return d.put(k,a.data)},function(a){h||(a=Ug("tpload",k,a.status,a.statusText),b(a));return e.reject(a)})}g.totalPendingRequests=0;return g}]}function eg(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a, +b,d){a=a.getElementsByClassName("ng-binding");var g=[];r(a,function(a){var c=ca.element(a).data("$binding");c&&r(c,function(c){d?(new RegExp("(^|\\s)"+Md(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!==c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-","data-ng-","ng\\:"],k=0;kc&&(c=e),c+=+a.slice(e+1),a=a.substring(0,e)):0>c&&(c=a.length);for(e=0;a.charAt(e)===Ec;e++);if(e===(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)===Ec;)g--;c-=e;d=[];for(f=0;e<=g;e++,f++)d[f]=+a.charAt(e)}c>Wd&&(d=d.splice(0,Wd-1),b=c-1,c=1);return{d:d,e:b,i:c}}function dh(a,b,d,c){var e=a.d,f=e.length-a.i;b=z(b)?Math.min(Math.max(d,f),c):+b;d=b+a.i;c=e[d];if(0d-1){for(c=0;c>d;c--)e.unshift(0),a.i++;e.unshift(1);a.i++}else e[d-1]++;for(;fk;)h.unshift(0),k++;0=b.lgSize&&k.unshift(h.splice(-b.lgSize,h.length).join(""));h.length>b.gSize;)k.unshift(h.splice(-b.gSize,h.length).join(""));h.length&&k.unshift(h.join(""));h=k.join(d);f.length&&(h+=c+f.join(""));e&&(h+="e+"+e)}return 0>a&&!g?b.negPre+h+b.negSuf:b.posPre+h+b.posSuf}function Ob(a,b,d,c){var e="";if(0>a||c&&0>=a)c?a=-a+1:(a=-a,e="-");for(a=""+a;a.length-d)f+=d;0===f&&-12===d&&(f=12);return Ob(f,b,c,e)}}function kb(a,b,d){return function(c,e){var f=c["get"+a](),g=ub((d?"STANDALONE":"")+(b?"SHORT":"")+a);return e[g][f]}}function Xd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Yd(a){return function(b){var d=Xd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+d;b=1+Math.round(b/6048E5);return Ob(b,a)}}function Fc(a,b){return 0>= +a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function Rd(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,k=b[8]?a.setUTCFullYear:a.setFullYear,h=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=fa(b[9]+b[10]),g=fa(b[9]+b[11]));k.call(a,fa(b[1]),fa(b[2])-1,fa(b[3]));f=fa(b[4]||0)-f;g=fa(b[5]||0)-g;k=fa(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));h.call(a,f,g,k,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c, +d,f){var g="",k=[],h,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;A(c)&&(c=eh.test(c)?fa(c):b(c));W(c)&&(c=new Date(c));if(!ha(c)||!isFinite(c.getTime()))return c;for(;d;)(l=fh.exec(d))?(k=db(k,l,1),d=k.pop()):(k.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=ec(f,m),c=fc(c,f,!0));r(k,function(b){h=gh[b];g+=h?h(c,a.DATETIME_FORMATS,m):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Yg(){return function(a,b){z(b)&&(b=2);return eb(a,b)}}function Zg(){return function(a, +b,d){b=Infinity===Math.abs(Number(b))?Number(b):fa(b);if(X(b))return a;W(a)&&(a=a.toString());if(!ya(a))return a;d=!d||isNaN(d)?0:fa(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?Gc(a,d,d+b):0===d?Gc(a,b,a.length):Gc(a,Math.max(0,d+b),d)}}function Gc(a,b,d){return A(a)?a.slice(b,d):Ha.call(a,b,d)}function Td(a){function b(b){return b.map(function(b){var c=1,d=Ta;if(B(b))d=b;else if(A(b)){if("+"===b.charAt(0)||"-"===b.charAt(0))c="-"===b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(d=a(b),d.constant))var e= +d(),d=function(a){return a[e]}}return{get:d,descending:c}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}function c(a,b){var c=0,d=a.type,h=b.type;if(d===h){var h=a.value,l=b.value;"string"===d?(h=h.toLowerCase(),l=l.toLowerCase()):"object"===d&&(D(h)&&(h=a.index),D(l)&&(l=b.index));h!==l&&(c=hb||37<=b&&40>=b||m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut drop",m)}b.on("change",l);if(ce[g]&&c.$$hasNativeValidators&&g===d.type)b.on("keydown wheel mousedown",function(a){if(!h){var b=this.validity, +c=b.badInput,d=b.typeMismatch;h=f.defer(function(){h=null;b.badInput===c&&b.typeMismatch===d||l(a)})}});c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Qb(a,b){return function(d,c){var e,f;if(ha(d))return d;if(A(d)){'"'===d.charAt(0)&&'"'===d.charAt(d.length-1)&&(d=d.substring(1,d.length-1));if(hh.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(), +ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},r(e,function(a,c){cf.yyyy&&e.setFullYear(f.yyyy),e}return NaN}}function nb(a,b,d,c){return function(e,f,g,k,h,l,m,p){function n(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function s(a){return w(a)&&!ha(a)?r(a)||void 0:a}function r(a,b){var c=k.$options.getOption("timezone");v&&v!==c&&(b=Sc(b,ec(v)));var e=d(a, +b);!isNaN(e)&&c&&(e=fc(e,c));return e}Ic(e,f,g,k,a);Sa(e,f,g,k,h,l);var t="time"===a||"datetimelocal"===a,q,v;k.$parsers.push(function(c){if(k.$isEmpty(c))return null;if(b.test(c))return r(c,q);k.$$parserName=a});k.$formatters.push(function(a){if(a&&!ha(a))throw ob("datefmt",a);if(n(a)){q=a;var b=k.$options.getOption("timezone");b&&(v=b,q=fc(q,b,!0));var d=c;t&&A(k.$options.getOption("timeSecondsFormat"))&&(d=c.replace("ss.sss",k.$options.getOption("timeSecondsFormat")).replace(/:$/,""));a=m("date")(a, +d,b);t&&k.$options.getOption("timeStripZeroSeconds")&&(a=a.replace(/(?::00)?(?:\.000)?$/,""));return a}v=q=null;return""});if(w(g.min)||g.ngMin){var x=g.min||p(g.ngMin)(e),B=s(x);k.$validators.min=function(a){return!n(a)||z(B)||d(a)>=B};g.$observe("min",function(a){a!==x&&(B=s(a),x=a,k.$validate())})}if(w(g.max)||g.ngMax){var y=g.max||p(g.ngMax)(e),J=s(y);k.$validators.max=function(a){return!n(a)||z(J)||d(a)<=J};g.$observe("max",function(a){a!==y&&(J=s(a),y=a,k.$validate())})}}}function Ic(a,b,d, +c,e){(c.$$hasNativeValidators=D(b[0].validity))&&c.$parsers.push(function(a){var d=b.prop("validity")||{};if(d.badInput||d.typeMismatch)c.$$parserName=e;else return a})}function de(a){a.$parsers.push(function(b){if(a.$isEmpty(b))return null;if(ih.test(b))return parseFloat(b);a.$$parserName="number"});a.$formatters.push(function(b){if(!a.$isEmpty(b)){if(!W(b))throw ob("numfmt",b);b=b.toString()}return b})}function na(a){w(a)&&!W(a)&&(a=parseFloat(a));return X(a)?void 0:a}function Jc(a){var b=a.toString(), +d=b.indexOf(".");return-1===d?-1a&&(a=/e-(\d+)$/.exec(b))?Number(a[1]):0:b.length-d-1}function ee(a,b,d){a=Number(a);var c=(a|0)!==a,e=(b|0)!==b,f=(d|0)!==d;if(c||e||f){var g=c?Jc(a):0,k=e?Jc(b):0,h=f?Jc(d):0,g=Math.max(g,k,h),g=Math.pow(10,g);a*=g;b*=g;d*=g;c&&(a=Math.round(a));e&&(b=Math.round(b));f&&(d=Math.round(d))}return 0===(a-b)%d}function fe(a,b,d,c,e){if(w(c)){a=a(c);if(!a.constant)throw ob("constexpr",d,c);return a(b)}return e}function Kc(a,b){function d(a,b){if(!a||!a.length)return[]; +if(!b||!b.length)return a;var c=[],d=0;a:for(;d(?:<\/\1>|)$/,mc=/<|&#?\w+;/,mg=/<([\w:-]+)/,ng=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,oa={option:[1,'"],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"", +"
"],_default:[0,"",""]};oa.optgroup=oa.option;oa.tbody=oa.tfoot=oa.colgroup=oa.caption=oa.thead;oa.th=oa.td;var ug=C.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)},Wa=Y.prototype={ready:fd,toString:function(){var a=[];r(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return 0<=a?x(this[a]):x(this[this.length+a])},length:0,push:kh,sort:[].sort,splice:[].splice},Gb={};r("multiple selected checked disabled readOnly required open".split(" "), +function(a){Gb[K(a)]=a});var md={};r("input select option textarea button form details".split(" "),function(a){md[a]=!0});var td={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern",ngStep:"step"};r({data:rc,removeData:qc,hasData:function(a){for(var b in Ka[a.ng339])return!0;return!1},cleanData:function(a){for(var b=0,d=a.length;b/,xg=/^[^(]*\(\s*([^)]*)\)/m,nh=/,/,oh=/^\s*(_?)(\S+?)\1\s*$/,vg=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ba=F("$injector"); +fb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw A(d)&&d||(d=a.name||yg(a)),Ba("strictdi",d);b=od(a);r(b[1].split(nh),function(a){a.replace(oh,function(a,b,d){c.push(d)})})}a.$inject=c}}else H(a)?(b=a.length-1,sb(a[b],"fn"),c=a.slice(0,b)):sb(a,"fn",!0);return c};var je=F("$animate"),zf=function(){this.$get=E},Af=function(){var a=new Hb,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=A(b)?b.split(" "): +H(b)?b:[],r(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){r(b,function(b){var c=a.get(b);if(c){var d=zg(b.attr("class")),e="",f="";r(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});r(b,function(a){e&&Db(a,e);f&&Cb(a,f)});a.delete(b)}});b.length=0}return{enabled:E,on:E,off:E,pin:E,push:function(g,k,h,l){l&&l();h=h||{};h.from&&g.css(h.from);h.to&&g.css(h.to);if(h.addClass||h.removeClass)if(k=h.addClass,l=h.removeClass,h=a.get(g)||{},k=e(h,k,!0),l=e(h,l,!1), +k||l)a.set(g,h),b.push(g),1===b.length&&c.$$postDigest(f);g=new d;g.complete();return g}}}]},xf=["$provide",function(a){var b=this,d=null,c=null;this.$$registeredAnimations=Object.create(null);this.register=function(c,d){if(c&&"."!==c.charAt(0))throw je("notcsel",c);var g=c+"-animation";b.$$registeredAnimations[c.substr(1)]=g;a.factory(g,d)};this.customFilter=function(a){1===arguments.length&&(c=B(a)?a:null);return c};this.classNameFilter=function(a){if(1===arguments.length&&(d=a instanceof RegExp? +a:null)&&/[(\s|\/)]ng-animate[(\s|\/)]/.test(d.toString()))throw d=null,je("nongcls","ng-animate");return d};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var e;a:{for(e=0;e <= >= && || ! = |".split(" "),function(a){Ub[a]=!0});var rh={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Nb=function(a){this.options=a};Nb.prototype={constructor:Nb, +lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdentifierStart:function(a){return this.options.isIdentifierStart? +this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)},isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0): +(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var d=a.charCodeAt(0),c=b.charCodeAt(0);return 55296<=d&&56319>=d&&56320<=c&&57343>=c?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b=w(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw Ya("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index< +this.text.length;){var d=K(this.text.charAt(this.index));if("."===d||this.isNumber(d))a+=d;else{var c=this.peek();if("e"===d&&this.isExpOperator(c))a+=d;else if(this.isExpOperator(d)&&c&&this.isNumber(c)&&"e"===a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||c&&this.isNumber(c)||"e"!==a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:b,text:a,constant:!0,value:Number(a)})},readIdent:function(){var a=this.index;for(this.index+=this.peekMultichar().length;this.index< +this.text.length;){var b=this.peekMultichar();if(!this.isIdentifierContinue(b))break;this.index+=b.length}this.tokens.push({index:a,text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var b=this.index;this.index++;for(var d="",c=a,e=!1;this.index","<=",">=");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:q.BinaryExpression, +operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:q.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")? +a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=Ia(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:q.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:q.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")): +"["===b.text?(a={type:q.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:q.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:q.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.filterChain());while(this.expect(",")) +}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:q.Identifier,name:a.text}},constant:function(){return{type:q.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]");return{type:q.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break; +b={type:q.Property,kind:"init"};this.peek().constant?(b.key=this.constant(),b.computed=!1,this.consume(":"),b.value=this.expression()):this.peek().identifier?(b.key=this.identifier(),b.computed=!1,this.peek(":")?(this.consume(":"),b.value=this.expression()):b.value=b.key):this.peek("[")?(this.consume("["),b.key=this.expression(),this.consume("]"),b.computed=!0,this.consume(":"),b.value=this.expression()):this.throwError("invalid key",this.peek());a.push(b)}while(this.expect(","))}this.consume("}"); +return{type:q.ObjectExpression,properties:a}},throwError:function(a,b){throw Ya("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw Ya("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw Ya("ueoe",this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c, +e){if(this.tokens.length>a){a=this.tokens[a];var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},selfReferential:{"this":{type:q.ThisExpression},$locals:{type:q.LocalsExpression}}};var Fd=2;Jd.prototype={compile:function(a){var b=this;this.state={nextId:0,filters:{},fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};Z(a,b.$filter);var d="",c;this.stage="assign";if(c=Id(a))this.state.computing= +"assign",d=this.nextId(),this.recurse(c,d),this.return_(d),d="fn.assign="+this.generateFunction("assign","s,v,l");c=Gd(a.body);b.stage="inputs";r(c,function(a,c){var d="fn"+c;b.state[d]={vars:[],body:[],own:{}};b.state.computing=d;var k=b.nextId();b.recurse(a,k);b.return_(k);b.state.inputs.push({name:d,isPure:a.isPure});a.watchId=c});this.state.computing="fn";this.stage="main";this.recurse(a);a='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+ +d+this.watchFns()+"return fn;";a=(new Function("$filter","getStringValue","ifDefined","plus",a))(this.$filter,Og,Pg,Ed);this.state=this.stage=void 0;return a},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;r(b,function(b){a.push("var "+b.name+"="+d.generateFunction(b.name,"s"));b.isPure&&a.push(b.name,".isPure="+JSON.stringify(b.isPure)+";")});b.length&&a.push("fn.inputs=["+b.map(function(a){return a.name}).join(",")+"];");return a.join("")},generateFunction:function(a, +b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;r(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,d,c,e,f){var g,k,h=this,l,m,p;c=c||E;if(!f&&w(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b, +this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case q.Program:r(a.body,function(b,c){h.recurse(b.expression,void 0,void 0,function(a){k=a});c!==a.body.length-1?h.current().body.push(k,";"):h.return_(k)});break;case q.Literal:m=this.escape(a.value);this.assign(b,m);c(b||m);break;case q.UnaryExpression:this.recurse(a.argument,void 0,void 0,function(a){k=a});m=a.operator+"("+this.ifDefined(k,0)+")";this.assign(b,m);c(m);break;case q.BinaryExpression:this.recurse(a.left, +void 0,void 0,function(a){g=a});this.recurse(a.right,void 0,void 0,function(a){k=a});m="+"===a.operator?this.plus(g,k):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(k,0):"("+g+")"+a.operator+"("+k+")";this.assign(b,m);c(m);break;case q.LogicalExpression:b=b||this.nextId();h.recurse(a.left,b);h.if_("&&"===a.operator?b:h.not(b),h.lazyRecurse(a.right,b));c(b);break;case q.ConditionalExpression:b=b||this.nextId();h.recurse(a.test,b);h.if_(b,h.lazyRecurse(a.alternate,b),h.lazyRecurse(a.consequent, +b));c(b);break;case q.Identifier:b=b||this.nextId();d&&(d.context="inputs"===h.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);h.if_("inputs"===h.stage||h.not(h.getHasOwnProperty("l",a.name)),function(){h.if_("inputs"===h.stage||"s",function(){e&&1!==e&&h.if_(h.isNull(h.nonComputedMember("s",a.name)),h.lazyAssign(h.nonComputedMember("s",a.name),"{}"));h.assign(b,h.nonComputedMember("s",a.name))})},b&&h.lazyAssign(b,h.nonComputedMember("l", +a.name)));c(b);break;case q.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();h.recurse(a.object,g,void 0,function(){h.if_(h.notNull(g),function(){a.computed?(k=h.nextId(),h.recurse(a.property,k),h.getStringValue(k),e&&1!==e&&h.if_(h.not(h.computedMember(g,k)),h.lazyAssign(h.computedMember(g,k),"{}")),m=h.computedMember(g,k),h.assign(b,m),d&&(d.computed=!0,d.name=k)):(e&&1!==e&&h.if_(h.isNull(h.nonComputedMember(g,a.property.name)),h.lazyAssign(h.nonComputedMember(g, +a.property.name),"{}")),m=h.nonComputedMember(g,a.property.name),h.assign(b,m),d&&(d.computed=!1,d.name=a.property.name))},function(){h.assign(b,"undefined")});c(b)},!!e);break;case q.CallExpression:b=b||this.nextId();a.filter?(k=h.filter(a.callee.name),l=[],r(a.arguments,function(a){var b=h.nextId();h.recurse(a,b);l.push(b)}),m=k+"("+l.join(",")+")",h.assign(b,m),c(b)):(k=h.nextId(),g={},l=[],h.recurse(a.callee,k,g,function(){h.if_(h.notNull(k),function(){r(a.arguments,function(b){h.recurse(b,a.constant? +void 0:h.nextId(),void 0,function(a){l.push(a)})});m=g.name?h.member(g.context,g.name,g.computed)+"("+l.join(",")+")":k+"("+l.join(",")+")";h.assign(b,m)},function(){h.assign(b,"undefined")});c(b)}));break;case q.AssignmentExpression:k=this.nextId();g={};this.recurse(a.left,void 0,g,function(){h.if_(h.notNull(g.context),function(){h.recurse(a.right,k);m=h.member(g.context,g.name,g.computed)+a.operator+k;h.assign(b,m);c(b||m)})},1);break;case q.ArrayExpression:l=[];r(a.elements,function(b){h.recurse(b, +a.constant?void 0:h.nextId(),void 0,function(a){l.push(a)})});m="["+l.join(",")+"]";this.assign(b,m);c(b||m);break;case q.ObjectExpression:l=[];p=!1;r(a.properties,function(a){a.computed&&(p=!0)});p?(b=b||this.nextId(),this.assign(b,"{}"),r(a.properties,function(a){a.computed?(g=h.nextId(),h.recurse(a.key,g)):g=a.key.type===q.Identifier?a.key.name:""+a.key.value;k=h.nextId();h.recurse(a.value,k);h.assign(h.member(b,g,a.computed),k)})):(r(a.properties,function(b){h.recurse(b.value,a.constant?void 0: +h.nextId(),void 0,function(a){l.push(h.escape(b.key.type===q.Identifier?b.key.name:""+b.key.value)+":"+a)})}),m="{"+l.join(",")+"}",this.assign(b,m));c(b||m);break;case q.ThisExpression:this.assign(b,"s");c(b||"s");break;case q.LocalsExpression:this.assign(b,"l");c(b||"l");break;case q.NGValueParameter:this.assign(b,"v"),c(b||"v")}},getHasOwnProperty:function(a,b){var d=a+"."+b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")"));return c[d]},assign:function(a, +b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}}, +not:function(a){return"!("+a+")"},isNull:function(a){return a+"==null"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var d=/[^$_a-zA-Z0-9]/g;return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,b)},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},lazyRecurse:function(a,b,d,c,e,f){var g= +this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(A(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(W(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"===typeof a)return"undefined";throw Ya("esc");},nextId:function(a, +b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};Kd.prototype={compile:function(a){var b=this;Z(a,b.$filter);var d,c;if(d=Id(a))c=this.recurse(d);d=Gd(a.body);var e;d&&(e=[],r(d,function(a,c){var d=b.recurse(a);d.isPure=a.isPure;a.input=d;e.push(d);a.watchId=c}));var f=[];r(a.body,function(a){f.push(b.recurse(a.expression))});a=0===a.body.length?E:1===a.body.length?f[0]:function(a,b){var c;r(f,function(d){c= +d(a,b)});return c};c&&(a.assign=function(a,b,d){return c(a,d,b)});e&&(a.inputs=e);return a},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case q.Literal:return this.value(a.value,b);case q.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case q.BinaryExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right), +this["binary"+a.operator](c,e,b);case q.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case q.Identifier:return f.identifier(a.name,b,d);case q.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,e,b,d):this.nonComputedMember(c,e,b,d);case q.CallExpression:return g=[],r(a.arguments,function(a){g.push(f.recurse(a))}), +a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var p=[],n=0;n":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c= +a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k)?b(e,f,g,k):d(e,f,g,k);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,d){return function(c,e,f,g){c=e&&a in e?e:c;d&&1!==d&&c&&null==c[a]&&(c[a]={});e=c?c[a]:void 0;return b?{context:c,name:a,value:e}: +e}},computedMember:function(a,b,d,c){return function(e,f,g,k){var h=a(e,f,g,k),l,m;null!=h&&(l=b(e,f,g,k),l+="",c&&1!==c&&h&&!h[l]&&(h[l]={}),m=h[l]);return d?{context:h,name:l,value:m}:m}},nonComputedMember:function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k);c&&1!==c&&e&&null==e[b]&&(e[b]={});f=null!=e?e[b]:void 0;return d?{context:e,name:b,value:f}:f}},inputs:function(a,b){return function(d,c,e,f){return f?f[b]:a(d,c,e)}}};Mb.prototype={constructor:Mb,parse:function(a){a=this.getAst(a);var b= +this.astCompiler.compile(a.ast),d=a.ast;b.literal=0===d.body.length||1===d.body.length&&(d.body[0].expression.type===q.Literal||d.body[0].expression.type===q.ArrayExpression||d.body[0].expression.type===q.ObjectExpression);b.constant=a.ast.constant;b.oneTime=a.oneTime;return b},getAst:function(a){var b=!1;a=a.trim();":"===a.charAt(0)&&":"===a.charAt(1)&&(b=!0,a=a.substring(2));return{ast:this.ast.ast(a),oneTime:b}}};var Ea=F("$sce"),V={HTML:"html",CSS:"css",MEDIA_URL:"mediaUrl",URL:"url",RESOURCE_URL:"resourceUrl", +JS:"js"},Cc=/_([a-z])/g,Ug=F("$templateRequest"),Vg=F("$timeout"),aa=C.document.createElement("a"),Od=ga(C.location.href),Na;aa.href="http://[::1]";var Wg="[::1]"===aa.hostname;Pd.$inject=["$document"];dd.$inject=["$provide"];var Wd=22,Vd=".",Ec="0";Qd.$inject=["$locale"];Sd.$inject=["$locale"];var gh={yyyy:ea("FullYear",4,0,!1,!0),yy:ea("FullYear",2,0,!0,!0),y:ea("FullYear",1,0,!1,!0),MMMM:kb("Month"),MMM:kb("Month",!0),MM:ea("Month",2,1),M:ea("Month",1,1),LLLL:kb("Month",!1,!0),dd:ea("Date",2), +d:ea("Date",1),HH:ea("Hours",2),H:ea("Hours",1),hh:ea("Hours",2,-12),h:ea("Hours",1,-12),mm:ea("Minutes",2),m:ea("Minutes",1),ss:ea("Seconds",2),s:ea("Seconds",1),sss:ea("Milliseconds",3),EEEE:kb("Day"),EEE:kb("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Ob(Math[0=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}}, +fh=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/,eh=/^-?\d+$/;Rd.$inject=["$locale"];var $g=ia(K),ah=ia(ub);Td.$inject=["$parse"];var Me=ia({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===la.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),vb={};r(Gb,function(a,b){function d(a,d,e){a.$watch(e[c], +function(a){e.$set(b,!!a)})}if("multiple"!==a){var c=wa("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});vb[c]=function(){return{restrict:"A",priority:100,link:e}}}});r(td,function(a,b){vb[b]=function(){return{priority:100,link:function(a,c,e){if("ngPattern"===b&&"/"===e.ngPattern.charAt(0)&&(c=e.ngPattern.match(ie))){e.$set("ngPattern",new RegExp(c[1],c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});r(["src","srcset","href"],function(a){var b=wa("ng-"+a);vb[b]= +["$sce",function(d){return{priority:99,link:function(c,e,f){var g=a,k=a;"href"===a&&"[object SVGAnimatedString]"===la.call(e.prop("href"))&&(k="xlinkHref",f.$attr[k]="xlink:href",g=null);f.$set(b,d.getTrustedMediaUrl(f[b]));f.$observe(b,function(b){b?(f.$set(k,b),Ca&&g&&e.prop(g,f[k])):"href"===a&&f.$set(k,null)})}}}]});var lb={$addControl:E,$getControls:ia([]),$$renameControl:function(a,b){a.$name=b},$removeControl:E,$setValidity:E,$setDirty:E,$setPristine:E,$setSubmitted:E,$$setSubmitted:E};Pb.$inject= +["$element","$attrs","$scope","$animate","$interpolate"];Pb.prototype={$rollbackViewValue:function(){r(this.$$controls,function(a){a.$rollbackViewValue()})},$commitViewValue:function(){r(this.$$controls,function(a){a.$commitViewValue()})},$addControl:function(a){Ja(a.$name,"input");this.$$controls.push(a);a.$name&&(this[a.$name]=a);a.$$parentForm=this},$getControls:function(){return ja(this.$$controls)},$$renameControl:function(a,b){var d=a.$name;this[d]===a&&delete this[d];this[b]=a;a.$name=b},$removeControl:function(a){a.$name&& +this[a.$name]===a&&delete this[a.$name];r(this.$pending,function(b,d){this.$setValidity(d,null,a)},this);r(this.$error,function(b,d){this.$setValidity(d,null,a)},this);r(this.$$success,function(b,d){this.$setValidity(d,null,a)},this);cb(this.$$controls,a);a.$$parentForm=lb},$setDirty:function(){this.$$animate.removeClass(this.$$element,Za);this.$$animate.addClass(this.$$element,Vb);this.$dirty=!0;this.$pristine=!1;this.$$parentForm.$setDirty()},$setPristine:function(){this.$$animate.setClass(this.$$element, +Za,Vb+" ng-submitted");this.$dirty=!1;this.$pristine=!0;this.$submitted=!1;r(this.$$controls,function(a){a.$setPristine()})},$setUntouched:function(){r(this.$$controls,function(a){a.$setUntouched()})},$setSubmitted:function(){for(var a=this;a.$$parentForm&&a.$$parentForm!==lb;)a=a.$$parentForm;a.$$setSubmitted()},$$setSubmitted:function(){this.$$animate.addClass(this.$$element,"ng-submitted");this.$submitted=!0;r(this.$$controls,function(a){a.$$setSubmitted&&a.$$setSubmitted()})}};ae({clazz:Pb,set:function(a, +b,d){var c=a[b];c?-1===c.indexOf(d)&&c.push(d):a[b]=[d]},unset:function(a,b,d){var c=a[b];c&&(cb(c,d),0===c.length&&delete a[b])}});var ke=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||E}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Pb,compile:function(d,f){d.addClass(Za).addClass(mb);var g=f.name?"name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,e,f){var p=f[0];if(!("action"in e)){var n=function(b){a.$apply(function(){p.$commitViewValue(); +p.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",n);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",n)},0,!1)})}(f[1]||p.$$parentForm).$addControl(p);var s=g?c(p.$name):E;g&&(s(a,p),e.$observe(g,function(b){p.$name!==b&&(s(a,void 0),p.$$parentForm.$$renameControl(p,b),s=c(p.$name),s(a,p))}));d.on("$destroy",function(){p.$$parentForm.$removeControl(p);s(a,void 0);S(p,lb)})}}}}}]},Ne=ke(),Ze=ke(!0),hh=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/, +sh=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,th=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,ih=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,le=/^(\d{4,})-(\d{2})-(\d{2})$/,me=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Mc=/^(\d{4,})-W(\d\d)$/,ne=/^(\d{4,})-(\d\d)$/, +oe=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ce=T();r(["date","datetime-local","month","time","week"],function(a){ce[a]=!0});var pe={text:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Hc(c)},date:nb("date",le,Qb(le,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":nb("datetimelocal",me,Qb(me,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:nb("time",oe,Qb(oe,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:nb("week",Mc,function(a,b){if(ha(a))return a;if(A(a)){Mc.lastIndex=0;var d=Mc.exec(a); +if(d){var c=+d[1],e=+d[2],f=d=0,g=0,k=0,h=Xd(c),e=7*(e-1);b&&(d=b.getHours(),f=b.getMinutes(),g=b.getSeconds(),k=b.getMilliseconds());return new Date(c,0,h.getDate()+e,d,f,g,k)}}return NaN},"yyyy-Www"),month:nb("month",ne,Qb(ne,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f,g,k){Ic(a,b,d,c,"number");de(c);Sa(a,b,d,c,e,f);var h;if(w(d.min)||d.ngMin){var l=d.min||k(d.ngMin)(a);h=na(l);c.$validators.min=function(a,b){return c.$isEmpty(b)||z(h)||b>=h};d.$observe("min",function(a){a!==l&&(h=na(a), +l=a,c.$validate())})}if(w(d.max)||d.ngMax){var m=d.max||k(d.ngMax)(a),p=na(m);c.$validators.max=function(a,b){return c.$isEmpty(b)||z(p)||b<=p};d.$observe("max",function(a){a!==m&&(p=na(a),m=a,c.$validate())})}if(w(d.step)||d.ngStep){var n=d.step||k(d.ngStep)(a),s=na(n);c.$validators.step=function(a,b){return c.$isEmpty(b)||z(s)||ee(b,h||0,s)};d.$observe("step",function(a){a!==n&&(s=na(a),n=a,c.$validate())})}},url:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Hc(c);c.$validators.url=function(a,b){var d= +a||b;return c.$isEmpty(d)||sh.test(d)}},email:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Hc(c);c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||th.test(d)}},radio:function(a,b,d,c){var e=!d.ngTrim||"false"!==U(d.ngTrim);z(d.name)&&b.attr("name",++pb);b.on("change",function(a){var g;b[0].checked&&(g=d.value,e&&(g=U(g)),c.$setViewValue(g,a&&a.type))});c.$render=function(){var a=d.value;e&&(a=U(a));b[0].checked=a===c.$viewValue};d.$observe("value",c.$render)},range:function(a,b,d,c,e,f){function g(a, +c){b.attr(a,d[a]);var e=d[a];d.$observe(a,function(a){a!==e&&(e=a,c(a))})}function k(a){p=na(a);X(c.$modelValue)||(m?(a=b.val(),p>a&&(a=p,b.val(a)),c.$setViewValue(a)):c.$validate())}function h(a){n=na(a);X(c.$modelValue)||(m?(a=b.val(),n=p},g("min",k));e&&(n=na(d.max),c.$validators.max=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||z(n)||b<=n},g("max",h));f&&(s=na(d.step),c.$validators.step=m?function(){return!r.stepMismatch}: +function(a,b){return c.$isEmpty(b)||z(s)||ee(b,p||0,s)},g("step",l))},checkbox:function(a,b,d,c,e,f,g,k){var h=fe(k,a,"ngTrueValue",d.ngTrueValue,!0),l=fe(k,a,"ngFalseValue",d.ngFalseValue,!1);b.on("change",function(a){c.$setViewValue(b[0].checked,a&&a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty=function(a){return!1===a};c.$formatters.push(function(a){return va(a,h)});c.$parsers.push(function(a){return a?h:l})},hidden:E,button:E,submit:E,reset:E,file:E},Yc=["$browser","$sniffer", +"$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,k){k[0]&&(pe[K(g.type)]||pe.text)(e,f,g,k[0],b,a,d,c)}}}}],vf=function(){var a={configurable:!0,enumerable:!1,get:function(){return this.getAttribute("value")||""},set:function(a){this.setAttribute("value",a)}};return{restrict:"E",priority:200,compile:function(b,d){if("hidden"===K(d.type))return{pre:function(b,d,f,g){b=d[0];b.parentNode&&b.parentNode.insertBefore(b,b.nextSibling);Object.defineProperty&& +Object.defineProperty(b,"value",a)}}}}},uh=/^(true|false|\d+)$/,sf=function(){function a(a,d,c){var e=w(c)?c:9===Ca?"":null;a.prop("value",e);d.$set("value",c)}return{restrict:"A",priority:100,compile:function(b,d){return uh.test(d.ngValue)?function(b,d,f){b=b.$eval(f.ngValue);a(d,f,b)}:function(b,d,f){b.$watch(f.ngValue,function(b){a(d,f,b)})}}}},Re=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0]; +b.$watch(e.ngBind,function(a){c.textContent=ic(a)})}}}}],Te=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=z(a)?"":a})}}}}],Se=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});d.$$addBindingClass(c); +return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){var d=f(b);c.html(a.getTrustedHtml(d)||"")})}}}}],rf=ia({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Ue=Kc("",!0),We=Kc("Odd",0),Ve=Kc("Even",1),Xe=Ra({compile:function(a,b){b.$set("ngCloak",void 0);a.removeClass("ng-cloak")}}),Ye=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],cd={},vh={blur:!0,focus:!0};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "), +function(a){var b=wa("ng-"+a);cd[b]=["$parse","$rootScope","$exceptionHandler",function(d,c,e){return qd(d,c,e,b,a,vh[a])}]});var af=["$animate","$compile",function(a,b){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(d,c,e,f,g){var k,h,l;d.$watch(e.ngIf,function(d){d?h||g(function(d,f){h=f;d[d.length++]=b.$$createComment("end ngIf",e.ngIf);k={clone:d};a.enter(d,c.parent(),c)}):(l&&(l.remove(),l=null),h&&(h.$destroy(),h=null),k&&(l=tb(k.clone), +a.leave(l).done(function(a){!1!==a&&(l=null)}),k=null))})}}}],bf=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:ca.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",k=e.autoscroll;return function(c,e,m,p,n){var r=0,q,t,x,v=function(){t&&(t.remove(),t=null);q&&(q.$destroy(),q=null);x&&(d.leave(x).done(function(a){!1!==a&&(t=null)}),t=x,x=null)};c.$watch(f,function(f){var m=function(a){!1=== +a||!w(k)||k&&!c.$eval(k)||b()},t=++r;f?(a(f,!0).then(function(a){if(!c.$$destroyed&&t===r){var b=c.$new();p.template=a;a=n(b,function(a){v();d.enter(a,null,e).done(m)});q=b;x=a;q.$emit("$includeContentLoaded",f);c.$eval(g)}},function(){c.$$destroyed||t!==r||(v(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(v(),p.template=null)})}}}}],uf=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){la.call(d[0]).match(/SVG/)? +(d.empty(),a(ed(e.template,C.document).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],cf=Ra({priority:450,compile:function(){return{pre:function(a,b,d){a.$eval(d.ngInit)}}}}),qf=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=d.ngList||", ",f="false"!==d.ngTrim,g=f?U(e):e;c.$parsers.push(function(a){if(!z(a)){var b=[];a&&r(a.split(g),function(a){a&&b.push(f?U(a):a)});return b}});c.$formatters.push(function(a){if(H(a))return a.join(e)}); +c.$isEmpty=function(a){return!a||!a.length}}}},mb="ng-valid",$d="ng-invalid",Za="ng-pristine",Vb="ng-dirty",ob=F("ngModel");Rb.$inject="$scope $exceptionHandler $attrs $element $parse $animate $timeout $q $interpolate".split(" ");Rb.prototype={$$initGetterSetters:function(){if(this.$options.getOption("getterSetter")){var a=this.$$parse(this.$$attr.ngModel+"()"),b=this.$$parse(this.$$attr.ngModel+"($$$p)");this.$$ngModelGet=function(b){var c=this.$$parsedNgModel(b);B(c)&&(c=a(b));return c};this.$$ngModelSet= +function(a,c){B(this.$$parsedNgModel(a))?b(a,{$$$p:c}):this.$$parsedNgModelAssign(a,c)}}else if(!this.$$parsedNgModel.assign)throw ob("nonassign",this.$$attr.ngModel,za(this.$$element));},$render:E,$isEmpty:function(a){return z(a)||""===a||null===a||a!==a},$$updateEmptyClasses:function(a){this.$isEmpty(a)?(this.$$animate.removeClass(this.$$element,"ng-not-empty"),this.$$animate.addClass(this.$$element,"ng-empty")):(this.$$animate.removeClass(this.$$element,"ng-empty"),this.$$animate.addClass(this.$$element, +"ng-not-empty"))},$setPristine:function(){this.$dirty=!1;this.$pristine=!0;this.$$animate.removeClass(this.$$element,Vb);this.$$animate.addClass(this.$$element,Za)},$setDirty:function(){this.$dirty=!0;this.$pristine=!1;this.$$animate.removeClass(this.$$element,Za);this.$$animate.addClass(this.$$element,Vb);this.$$parentForm.$setDirty()},$setUntouched:function(){this.$touched=!1;this.$untouched=!0;this.$$animate.setClass(this.$$element,"ng-untouched","ng-touched")},$setTouched:function(){this.$touched= +!0;this.$untouched=!1;this.$$animate.setClass(this.$$element,"ng-touched","ng-untouched")},$rollbackViewValue:function(){this.$$timeout.cancel(this.$$pendingDebounce);this.$viewValue=this.$$lastCommittedViewValue;this.$render()},$validate:function(){if(!X(this.$modelValue)){var a=this.$$lastCommittedViewValue,b=this.$$rawModelValue,d=this.$valid,c=this.$modelValue,e=this.$options.getOption("allowInvalid"),f=this;this.$$runValidators(b,a,function(a){e||d===a||(f.$modelValue=a?b:void 0,f.$modelValue!== +c&&f.$$writeModelToScope())})}},$$runValidators:function(a,b,d){function c(){var c=!0;r(h.$validators,function(d,e){var g=Boolean(d(a,b));c=c&&g;f(e,g)});return c?!0:(r(h.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;r(h.$asyncValidators,function(e,g){var h=e(a,b);if(!h||!B(h.then))throw ob("nopromise",h);f(g,void 0);c.push(h.then(function(){f(g,!0)},function(){d=!1;f(g,!1)}))});c.length?h.$$q.all(c).then(function(){g(d)},E):g(!0)}function f(a,b){k===h.$$currentValidationRunId&& +h.$setValidity(a,b)}function g(a){k===h.$$currentValidationRunId&&d(a)}this.$$currentValidationRunId++;var k=this.$$currentValidationRunId,h=this;(function(){var a=h.$$parserName;if(z(h.$$parserValid))f(a,null);else return h.$$parserValid||(r(h.$validators,function(a,b){f(b,null)}),r(h.$asyncValidators,function(a,b){f(b,null)})),f(a,h.$$parserValid),h.$$parserValid;return!0})()?c()?e():g(!1):g(!1)},$commitViewValue:function(){var a=this.$viewValue;this.$$timeout.cancel(this.$$pendingDebounce);if(this.$$lastCommittedViewValue!== +a||""===a&&this.$$hasNativeValidators)this.$$updateEmptyClasses(a),this.$$lastCommittedViewValue=a,this.$pristine&&this.$setDirty(),this.$$parseAndValidate()},$$parseAndValidate:function(){var a=this.$$lastCommittedViewValue,b=this;this.$$parserValid=z(a)?void 0:!0;this.$setValidity(this.$$parserName,null);this.$$parserName="parse";if(this.$$parserValid)for(var d=0;dg||e.$isEmpty(b)||b.length<=g}}}}}],ad=["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.minlength||a(c.ngMinlength)(b),g=Tb(f)||-1;c.$observe("minlength",function(a){f!== +a&&(g=Tb(a)||-1,f=a,e.$validate())});e.$validators.minlength=function(a,b){return e.$isEmpty(b)||b.length>=g}}}}}];C.angular.bootstrap?C.console&&console.log("WARNING: Tried to load AngularJS more than once."):(Fe(),Je(ca),ca.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"], +ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "),WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a", +"short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-\u00a4",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,c){var e=a|0,f=c;void 0===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),x(function(){Ae(C.document, +Uc)}))})(window);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(''); +//# sourceMappingURL=angular.min.js.map diff --git a/static/html/bower_components/angularjs-file-upload/FileAPI.min.js b/static/html/bower_components/angularjs-file-upload/FileAPI.min.js new file mode 100644 index 00000000..e43849cd --- /dev/null +++ b/static/html/bower_components/angularjs-file-upload/FileAPI.min.js @@ -0,0 +1,6 @@ +/*! 12.0.1 */ +/*! FileAPI 2.0.7 - BSD | git://github.com/mailru/FileAPI.git + * FileAPI — a set of javascript tools for working with files. Multiupload, drag'n'drop and chunked file upload. Images: crop, resize and auto orientation by EXIF. + */ +!function(a){"use strict";var b=a.HTMLCanvasElement&&a.HTMLCanvasElement.prototype,c=a.Blob&&function(){try{return Boolean(new Blob)}catch(a){return!1}}(),d=c&&a.Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(a){return!1}}(),e=a.BlobBuilder||a.WebKitBlobBuilder||a.MozBlobBuilder||a.MSBlobBuilder,f=(c||e)&&a.atob&&a.ArrayBuffer&&a.Uint8Array&&function(a){var b,f,g,h,i,j;for(b=a.split(",")[0].indexOf("base64")>=0?atob(a.split(",")[1]):decodeURIComponent(a.split(",")[1]),f=new ArrayBuffer(b.length),g=new Uint8Array(f),h=0;hd;d++)d in a&&b.call(c,a[d],d,a);else for(var f in a)a.hasOwnProperty(f)&&b.call(c,a[f],f,a)},S=function(a){for(var b=arguments,c=1,d=function(b,c){a[c]=b};c=c&&!d&&f.end()},isFail:function(){return d},fail:function(){!d&&a(d=!0)},end:function(){e||(e=!0,a())}};return f},each:R,afor:function(a,b){var c=0,d=a.length;Q(a)&&d--?!function e(){b(d!=c&&e,a[c],c++)}():b(!1)},extend:S,isFile:function(a){return"[object File]"===H.call(a)},isBlob:function(a){return this.isFile(a)||"[object Blob]"===H.call(a)},isCanvas:function(a){return a&&D.test(a.nodeName)},getFilesFilter:function(a){return a="string"==typeof a?a:a.getAttribute&&a.getAttribute("accept")||"",a?new RegExp("("+a.replace(/\./g,"\\.").replace(/,/g,"|")+")$","i"):/./},readAsDataURL:function(a,b){Y.isCanvas(a)?c(a,b,"load",Y.toDataURL(a)):e(a,b,"DataURL")},readAsBinaryString:function(a,b){d("BinaryString")?e(a,b,"BinaryString"):e(a,function(a){if("load"==a.type)try{a.result=Y.toBinaryString(a.result)}catch(c){a.type="error",a.message=c.toString()}b(a)},"DataURL")},readAsArrayBuffer:function(a,b){e(a,b,"ArrayBuffer")},readAsText:function(a,b,c){c||(c=b,b="utf-8"),e(a,c,"Text",b)},toDataURL:function(a,b){return"string"==typeof a?a:a.toDataURL?a.toDataURL(b||"image/png"):void 0},toBinaryString:function(b){return a.atob(Y.toDataURL(b).replace(G,""))},readAsImage:function(a,d,e){if(Y.isFile(a))if(r){var f=r.createObjectURL(a);f===b?c(a,d,"error"):Y.readAsImage(f,d,e)}else Y.readAsDataURL(a,function(b){"load"==b.type?Y.readAsImage(b.result,d,e):(e||"error"==b.type)&&c(a,d,b,null,{loaded:b.loaded,total:b.total})});else if(Y.isCanvas(a))c(a,d,"load",a);else if(C.test(a.nodeName))if(a.complete)c(a,d,"load",a);else{var g="error abort load";V(a,g,function i(b){"load"==b.type&&r&&r.revokeObjectURL(a.src),U(a,g,i),c(a,d,b,a)})}else if(a.iframe)c(a,d,{type:"error"});else{var h=Y.newImage(a.dataURL||a);Y.readAsImage(h,d,e)}},checkFileObj:function(a){var b={},c=Y.accept;return"object"==typeof a?b=a:b.name=(a+"").split(/\\|\//g).pop(),null==b.type&&(b.type=b.name.split(".").pop()),R(c,function(a,c){a=new RegExp(a.replace(/\s/g,"|"),"i"),(a.test(b.type)||Y.ext2mime[b.type])&&(b.type=Y.ext2mime[b.type]||c.split("/")[0]+"/"+b.type)}),b},getDropFiles:function(a,b){var c=[],d=k(a),e=Q(d.items)&&d.items[0]&&g(d.items[0]),i=Y.queue(function(){b(c)});R((e?d.items:d.files)||[],function(a){i.inc();try{e?h(a,function(a,b){a?Y.log("[err] getDropFiles:",a):c.push.apply(c,b),i.next()}):f(a,function(b){b&&c.push(a),i.next()})}catch(b){i.next(),Y.log("[err] getDropFiles: ",b)}}),i.check()},getFiles:function(a,b,c){var d=[];return c?(Y.filterFiles(Y.getFiles(a),b,c),null):(a.jquery&&(a.each(function(){d=d.concat(Y.getFiles(this))}),a=d,d=[]),"string"==typeof b&&(b=Y.getFilesFilter(b)),a.originalEvent?a=W(a.originalEvent):a.srcElement&&(a=W(a)),a.dataTransfer?a=a.dataTransfer:a.target&&(a=a.target),a.files?(d=a.files,y||(d[0].blob=a,d[0].iframe=!0)):!y&&j(a)?Y.trim(a.value)&&(d=[Y.checkFileObj(a.value)],d[0].blob=a,d[0].iframe=!0):Q(a)&&(d=a),Y.filter(d,function(a){return!b||b.test(a.name)}))},getTotalSize:function(a){for(var b=0,c=a&&a.length;c--;)b+=a[c].size;return b},getInfo:function(a,b){var c={},d=L.concat();Y.isFile(a)?!function e(){var f=d.shift();f?f.test(a.type)?f(a,function(a,d){a?b(a):(S(c,d),e())}):e():b(!1,c)}():b("not_support_info",c)},addInfoReader:function(a,b){b.test=function(b){return a.test(b)},L.push(b)},filter:function(a,b){for(var c,d=[],e=0,f=a.length;f>e;e++)e in a&&(c=a[e],b.call(c,c,e,a)&&d.push(c));return d},filterFiles:function(a,b,c){if(a.length){var d,e=a.concat(),f=[],g=[];!function h(){e.length?(d=e.shift(),Y.getInfo(d,function(a,c){(b(d,a?!1:c)?f:g).push(d),h()})):c(f,g)}()}else c([],a)},upload:function(a){a=S({jsonp:"callback",prepare:Y.F,beforeupload:Y.F,upload:Y.F,fileupload:Y.F,fileprogress:Y.F,filecomplete:Y.F,progress:Y.F,complete:Y.F,pause:Y.F,imageOriginal:!0,chunkSize:Y.chunkSize,chunkUploadRetry:Y.chunkUploadRetry,uploadRetry:Y.uploadRetry},a),a.imageAutoOrientation&&!a.imageTransform&&(a.imageTransform={rotate:"auto"});var b,c=new Y.XHR(a),d=this._getFilesDataArray(a.files),e=this,f=0,g=0,h=!1;return R(d,function(a){f+=a.size}),c.files=[],R(d,function(a){c.files.push(a.file)}),c.total=f,c.loaded=0,c.filesLeft=d.length,a.beforeupload(c,a),b=function(){var j=d.shift(),k=j&&j.file,l=!1,m=i(a);if(c.filesLeft=d.length,k&&k.name===Y.expando&&(k=null,Y.log("[warn] FileAPI.upload() — called without files")),("abort"!=c.statusText||c.current)&&j){if(h=!1,c.currentFile=k,k&&a.prepare(k,m)===!1)return void b.call(e);m.file=k,e._getFormData(m,j,function(h){g||a.upload(c,a);var i=new Y.XHR(S({},m,{upload:k?function(){a.fileupload(k,i,m)}:n,progress:k?function(b){l||(l=b.loaded===b.total,a.fileprogress({type:"progress",total:j.total=b.total,loaded:j.loaded=b.loaded},k,i,m),a.progress({type:"progress",total:f,loaded:c.loaded=g+j.size*(b.loaded/b.total)|0},k,i,m))}:n,complete:function(d){R(N,function(a){c[a]=i[a]}),k&&(j.total=j.total||j.size,j.loaded=j.total,d||(this.progress(j),l=!0,g+=j.size,c.loaded=g),a.filecomplete(d,i,k,m)),setTimeout(function(){b.call(e)},0)}}));c.abort=function(a){a||(d.length=0),this.current=a,i.abort()},i.send(h)})}else{var o=200==c.status||201==c.status||204==c.status;a.complete(o?!1:c.statusText||"error",c,a),h=!0}},setTimeout(b,0),c.append=function(a,g){a=Y._getFilesDataArray([].concat(a)),R(a,function(a){f+=a.size,c.files.push(a.file),g?d.unshift(a):d.push(a)}),c.statusText="",h&&b.call(e)},c.remove=function(a){for(var b,c=d.length;c--;)d[c].file==a&&(b=d.splice(c,1),f-=b.size);return b},c},_getFilesDataArray:function(a){var b=[],c={};if(j(a)){var d=Y.getFiles(a);c[a.name||"file"]=null!==a.getAttribute("multiple")?d:d[0]}else Q(a)&&j(a[0])?R(a,function(a){c[a.name||"file"]=Y.getFiles(a)}):c=a;return R(c,function e(a,c){Q(a)?R(a,function(a){e(a,c)}):a&&(a.name||a.image)&&b.push({name:c,file:a,size:a.size,total:a.size,loaded:0})}),b.length||b.push({file:{name:Y.expando}}),b},_getFormData:function(a,b,c){var d=b.file,e=b.name,f=d.name,g=d.type,h=Y.support.transform&&a.imageTransform,i=new Y.Form,j=Y.queue(function(){c(i)}),k=h&&l(h),m=Y.postNameConcat;R(a.data,function n(a,b){"object"==typeof a?R(a,function(a,c){n(a,m(b,c))}):i.append(b,a)}),function o(b){b.image?(j.inc(),b.toData(function(a,b){f=f||(new Date).getTime()+".png",o(b),j.next()})):Y.Image&&h&&(/^image/.test(b.type)||E.test(b.nodeName))?(j.inc(),k&&(h=[h]),Y.Image.transform(b,h,a.imageAutoOrientation,function(c,d){if(k&&!c)B||Y.flashEngine||(i.multipart=!0),i.append(e,d[0],f,h[0].type||g);else{var l=0;c||R(d,function(a,b){B||Y.flashEngine||(i.multipart=!0),h[b].postName||(l=1),i.append(h[b].postName||m(e,b),a,f,h[b].type||g)}),(c||a.imageOriginal)&&i.append(m(e,l?"original":null),b,f,g)}j.next()})):f!==Y.expando&&i.append(e,b,f)}(d),j.check()},reset:function(a,b){var c,d;return x?(d=x(a).clone(!0).insertBefore(a).val("")[0],b||x(a).remove()):(c=a.parentNode,d=c.insertBefore(a.cloneNode(!0),a),d.value="",b||c.removeChild(a),R(K[Y.uid(a)],function(b,c){R(b,function(b){U(a,c,b),T(d,c,b)})})),d},load:function(a,b){var c=Y.getXHR();return c?(c.open("GET",a,!0),c.overrideMimeType&&c.overrideMimeType("text/plain; charset=x-user-defined"),T(c,"progress",function(a){a.lengthComputable&&b({type:a.type,loaded:a.loaded,total:a.total},c)}),c.onreadystatechange=function(){if(4==c.readyState)if(c.onreadystatechange=null,200==c.status){a=a.split("/");var d={name:a[a.length-1],size:c.getResponseHeader("Content-Length"),type:c.getResponseHeader("Content-Type")};d.dataURL="data:"+d.type+";base64,"+Y.encode64(c.responseBody||c.responseText),b({type:"load",result:d},c)}else b({type:"error"},c)},c.send(null)):b({type:"error"}),c},encode64:function(a){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c="",d=0;for("string"!=typeof a&&(a=String(a));d>2,k=(3&g)<<4|h>>4;isNaN(h)?e=f=64:(e=(15&h)<<2|i>>6,f=isNaN(i)?64:63&i),c+=b.charAt(j)+b.charAt(k)+b.charAt(e)+b.charAt(f)}return c}};Y.addInfoReader(/^image/,function(a,b){if(!a.__dimensions){var c=a.__dimensions=Y.defer();Y.readAsImage(a,function(a){var b=a.target;c.resolve("load"==a.type?!1:"error",{width:b.width,height:b.height}),b.src=Y.EMPTY_PNG,b=null})}a.__dimensions.then(b)}),Y.event.dnd=function(a,b,c){var d,e;c||(c=b,b=Y.F),u?(T(a,"dragenter dragleave dragover",b.ff=b.ff||function(a){for(var c=k(a).types,f=c&&c.length,g=!1;f--;)if(~c[f].indexOf("File")){a[P](),e!==a.type&&(e=a.type,"dragleave"!=e&&b.call(a[O],!0,a),g=!0);break}g&&(clearTimeout(d),d=setTimeout(function(){b.call(a[O],"dragleave"!=e,a)},50))}),T(a,"drop",c.ff=c.ff||function(a){a[P](),e=0,b.call(a[O],!1,a),Y.getDropFiles(a,function(b){c.call(a[O],b,a)})})):Y.log("Drag'n'Drop -- not supported")},Y.event.dnd.off=function(a,b,c){U(a,"dragenter dragleave dragover",b.ff),U(a,"drop",c.ff)},x&&!x.fn.dnd&&(x.fn.dnd=function(a,b){return this.each(function(){Y.event.dnd(this,a,b)})},x.fn.offdnd=function(a,b){return this.each(function(){Y.event.dnd.off(this,a,b)})}),a.FileAPI=S(Y,a.FileAPI),Y.log("FileAPI: "+Y.version),Y.log("protocol: "+a.location.protocol),Y.log("doctype: ["+p.name+"] "+p.publicId+" "+p.systemId),R(o.getElementsByTagName("meta"),function(a){/x-ua-compatible/i.test(a.getAttribute("http-equiv"))&&Y.log("meta.http-equiv: "+a.getAttribute("content"))});try{Y._supportConsoleLog=!!console.log,Y._supportConsoleLogApply=!!console.log.apply}catch(Z){}Y.flashUrl||(Y.flashUrl=Y.staticPath+"FileAPI.flash.swf"),Y.flashImageUrl||(Y.flashImageUrl=Y.staticPath+"FileAPI.flash.image.swf"),Y.flashWebcamUrl||(Y.flashWebcamUrl=Y.staticPath+"FileAPI.flash.camera.swf")}(window,void 0),function(a,b,c){"use strict";function d(b){if(b instanceof d){var c=new d(b.file);return a.extend(c.matrix,b.matrix),c}return this instanceof d?(this.file=b,this.size=b.size||100,void(this.matrix={sx:0,sy:0,sw:0,sh:0,dx:0,dy:0,dw:0,dh:0,resize:0,deg:0,quality:1,filter:0})):new d(b)}var e=Math.min,f=Math.round,g=function(){return b.createElement("canvas")},h=!1,i={8:270,3:180,6:90,7:270,4:180,5:90};try{h=g().toDataURL("image/png").indexOf("data:image/png")>-1}catch(j){}d.prototype={image:!0,constructor:d,set:function(b){return a.extend(this.matrix,b),this},crop:function(a,b,d,e){return d===c&&(d=a,e=b,a=b=0),this.set({sx:a,sy:b,sw:d,sh:e||d})},resize:function(a,b,c){return/min|max/.test(b)&&(c=b,b=a),this.set({dw:a,dh:b||a,resize:c})},preview:function(a,b){return this.resize(a,b||a,"preview")},rotate:function(a){return this.set({deg:a})},filter:function(a){return this.set({filter:a})},overlay:function(a){return this.set({overlay:a})},clone:function(){return new d(this)},_load:function(b,c){var d=this;/img|video/i.test(b.nodeName)?c.call(d,null,b):a.readAsImage(b,function(a){c.call(d,"load"!=a.type,a.result)})},_apply:function(b,c){var f,h=g(),i=this.getMatrix(b),j=h.getContext("2d"),k=b.videoWidth||b.width,l=b.videoHeight||b.height,m=i.deg,n=i.dw,o=i.dh,p=k,q=l,r=i.filter,s=b,t=i.overlay,u=a.queue(function(){b.src=a.EMPTY_PNG,c(!1,h)}),v=a.renderImageToCanvas;for(m-=360*Math.floor(m/360),b._type=this.file.type;i.multipass&&e(p/n,q/o)>2;)p=p/2+.5|0,q=q/2+.5|0,f=g(),f.width=p,f.height=q,s!==b?(v(f,s,0,0,s.width,s.height,0,0,p,q),s=f):(s=f,v(s,b,i.sx,i.sy,i.sw,i.sh,0,0,p,q),i.sx=i.sy=i.sw=i.sh=0);h.width=m%180?o:n,h.height=m%180?n:o,h.type=i.type,h.quality=i.quality,j.rotate(m*Math.PI/180),v(j.canvas,s,i.sx,i.sy,i.sw||s.width,i.sh||s.height,180==m||270==m?-n:0,90==m||180==m?-o:0,n,o),n=h.width,o=h.height,t&&a.each([].concat(t),function(b){u.inc();var c=new window.Image,d=function(){var e=0|b.x,f=0|b.y,g=b.w||c.width,h=b.h||c.height,i=b.rel;e=1==i||4==i||7==i?(n-g+e)/2:2==i||5==i||8==i?n-(g+e):e,f=3==i||4==i||5==i?(o-h+f)/2:i>=6?o-(h+f):f,a.event.off(c,"error load abort",d);try{j.globalAlpha=b.opacity||1,j.drawImage(c,e,f,g,h)}catch(k){}u.next()};a.event.on(c,"error load abort",d),c.src=b.src,c.complete&&d()}),r&&(u.inc(),d.applyFilter(h,r,u.next)),u.check()},getMatrix:function(b){var c=a.extend({},this.matrix),d=c.sw=c.sw||b.videoWidth||b.naturalWidth||b.width,g=c.sh=c.sh||b.videoHeight||b.naturalHeight||b.height,h=c.dw=c.dw||d,i=c.dh=c.dh||g,j=d/g,k=h/i,l=c.resize;if("preview"==l){if(h!=d||i!=g){var m,n;k>=j?(m=d,n=m/k):(n=g,m=n*k),(m!=d||n!=g)&&(c.sx=~~((d-m)/2),c.sy=~~((g-n)/2),d=m,g=n)}}else l&&(d>h||g>i?"min"==l?(h=f(k>j?e(d,h):i*j),i=f(k>j?h/j:e(g,i))):(h=f(j>=k?e(d,h):i*j),i=f(j>=k?h/j:e(g,i))):(h=d,i=g));return c.sw=d,c.sh=g,c.dw=h,c.dh=i,c.multipass=a.multiPassResize,c},_trans:function(b){this._load(this.file,function(c,d){if(c)b(c);else try{this._apply(d,b)}catch(c){a.log("[err] FileAPI.Image.fn._apply:",c),b(c)}})},get:function(b){if(a.support.transform){var c=this,d=c.matrix;"auto"==d.deg?a.getInfo(c.file,function(a,e){d.deg=i[e&&e.exif&&e.exif.Orientation]||0,c._trans(b)}):c._trans(b)}else b("not_support_transform");return this},toData:function(a){return this.get(a)}},d.exifOrientation=i,d.transform=function(b,e,f,g){function h(h,i){var j={},k=a.queue(function(a){g(a,j)});h?k.fail():a.each(e,function(a,e){if(!k.isFail()){var g=new d(i.nodeType?i:b),h="function"==typeof a;if(h?a(i,g):a.width?g[a.preview?"preview":"resize"](a.width,a.height,a.strategy):a.maxWidth&&(i.width>a.maxWidth||i.height>a.maxHeight)&&g.resize(a.maxWidth,a.maxHeight,"max"),a.crop){var l=a.crop;g.crop(0|l.x,0|l.y,l.w||l.width,l.h||l.height)}a.rotate===c&&f&&(a.rotate="auto"),g.set({type:g.matrix.type||a.type||b.type||"image/png"}),h||g.set({deg:a.rotate,overlay:a.overlay,filter:a.filter,quality:a.quality||1}),k.inc(),g.toData(function(a,b){a?k.fail():(j[e]=b,k.next())})}})}b.width?h(!1,b):a.getInfo(b,h)},a.each(["TOP","CENTER","BOTTOM"],function(b,c){a.each(["LEFT","CENTER","RIGHT"],function(a,e){d[b+"_"+a]=3*c+e,d[a+"_"+b]=3*c+e})}),d.toCanvas=function(a){var c=b.createElement("canvas");return c.width=a.videoWidth||a.width,c.height=a.videoHeight||a.height,c.getContext("2d").drawImage(a,0,0),c},d.fromDataURL=function(b,c,d){var e=a.newImage(b);a.extend(e,c),d(e)},d.applyFilter=function(b,c,e){"function"==typeof c?c(b,e):window.Caman&&window.Caman("IMG"==b.tagName?d.toCanvas(b):b,function(){"string"==typeof c?this[c]():a.each(c,function(a,b){this[b](a)},this),this.render(e)})},a.renderImageToCanvas=function(b,c,d,e,f,g,h,i,j,k){try{return b.getContext("2d").drawImage(c,d,e,f,g,h,i,j,k)}catch(l){throw a.log("renderImageToCanvas failed"),l}},a.support.canvas=a.support.transform=h,a.Image=d}(FileAPI,document),function(a){"use strict";a(FileAPI)}(function(a){"use strict";if(window.navigator&&window.navigator.platform&&/iP(hone|od|ad)/.test(window.navigator.platform)){var b=a.renderImageToCanvas;a.detectSubsampling=function(a){var b,c;return a.width*a.height>1048576?(b=document.createElement("canvas"),b.width=b.height=1,c=b.getContext("2d"),c.drawImage(a,-a.width+1,0),0===c.getImageData(0,0,1,1).data[3]):!1},a.detectVerticalSquash=function(a,b){var c,d,e,f,g,h=a.naturalHeight||a.height,i=document.createElement("canvas"),j=i.getContext("2d");for(b&&(h/=2),i.width=1,i.height=h,j.drawImage(a,0,0),c=j.getImageData(0,0,1,h).data,d=0,e=h,f=h;f>d;)g=c[4*(f-1)+3],0===g?e=f:d=f,f=e+d>>1;return f/h||1},a.renderImageToCanvas=function(c,d,e,f,g,h,i,j,k,l){if("image/jpeg"===d._type){var m,n,o,p,q=c.getContext("2d"),r=document.createElement("canvas"),s=1024,t=r.getContext("2d");if(r.width=s,r.height=s,q.save(),m=a.detectSubsampling(d),m&&(e/=2,f/=2,g/=2,h/=2),n=a.detectVerticalSquash(d,m),m||1!==n){for(f*=n,k=Math.ceil(s*k/g),l=Math.ceil(s*l/h/n),j=0,p=0;h>p;){for(i=0,o=0;g>o;)t.clearRect(0,0,s,s),t.drawImage(d,e,f,g,h,-o,-p,g,h),q.drawImage(r,0,0,s,s,i,j,k,l),o+=s,i+=k;p+=s,j+=l}return q.restore(),c}}return b(c,d,e,f,g,h,i,j,k,l)}}}),function(a,b){"use strict";function c(b,c,d){var e=b.blob,f=b.file;if(f){if(!e.toDataURL)return void a.readAsBinaryString(e,function(a){"load"==a.type&&c(b,a.result)});var g={"image/jpeg":".jpe?g","image/png":".png"},h=g[b.type]?b.type:"image/png",i=g[h]||".png",j=e.quality||1;f.match(new RegExp(i+"$","i"))||(f+=i.replace("?","")),b.file=f,b.type=h,!d&&e.toBlob?e.toBlob(function(a){c(b,a)},h,j):c(b,a.toBinaryString(e.toDataURL(h,j)))}else c(b,e)}var d=b.document,e=b.FormData,f=function(){this.items=[]},g=b.encodeURIComponent;f.prototype={append:function(a,b,c,d){this.items.push({name:a,blob:b&&b.blob||(void 0==b?"":b),file:b&&(c||b.name),type:b&&(d||b.type)})},each:function(a){for(var b=0,c=this.items.length;c>b;b++)a.call(this,this.items[b])},toData:function(b,c){c._chunked=a.support.chunked&&c.chunkSize>0&&1==a.filter(this.items,function(a){return a.file}).length,a.support.html5?a.formData&&!this.multipart&&e?c._chunked?(a.log("FileAPI.Form.toPlainData"),this.toPlainData(b)):(a.log("FileAPI.Form.toFormData"),this.toFormData(b)):(a.log("FileAPI.Form.toMultipartData"),this.toMultipartData(b)):(a.log("FileAPI.Form.toHtmlData"),this.toHtmlData(b))},_to:function(b,c,d,e){var f=a.queue(function(){c(b)});this.each(function(a){d(a,b,f,e)}),f.check()},toHtmlData:function(b){this._to(d.createDocumentFragment(),b,function(b,c){var e,f=b.blob;b.file?(a.reset(f,!0),f.name=b.name,f.disabled=!1,c.appendChild(f)):(e=d.createElement("input"),e.name=b.name,e.type="hidden",e.value=f,c.appendChild(e))})},toPlainData:function(a){this._to({},a,function(a,b,d){a.file&&(b.type=a.file),a.blob.toBlob?(d.inc(),c(a,function(a,c){b.name=a.name,b.file=c,b.size=c.length,b.type=a.type,d.next()})):a.file?(b.name=a.blob.name,b.file=a.blob,b.size=a.blob.size,b.type=a.type):(b.params||(b.params=[]),b.params.push(g(a.name)+"="+g(a.blob))),b.start=-1,b.end=b.file&&b.file.FileAPIReadPosition||-1,b.retry=0})},toFormData:function(a){this._to(new e,a,function(a,b,d){a.blob&&a.blob.toBlob?(d.inc(),c(a,function(a,c){b.append(a.name,c,a.file),d.next()})):a.file?b.append(a.name,a.blob,a.file):b.append(a.name,a.blob),a.file&&b.append("_"+a.name,a.file)})},toMultipartData:function(b){this._to([],b,function(a,b,d,e){d.inc(),c(a,function(a,c){b.push("--_"+e+('\r\nContent-Disposition: form-data; name="'+a.name+'"'+(a.file?'; filename="'+g(a.file)+'"':"")+(a.file?"\r\nContent-Type: "+(a.type||"application/octet-stream"):"")+"\r\n\r\n"+(a.file?c:g(c))+"\r\n")),d.next()},!0)},a.expando)}},a.Form=f}(FileAPI,window),function(a,b){"use strict";var c=function(){},d=a.document,e=function(a){this.uid=b.uid(),this.xhr={abort:c,getResponseHeader:c,getAllResponseHeaders:c},this.options=a},f={"":1,XML:1,Text:1,Body:1};e.prototype={status:0,statusText:"",constructor:e,getResponseHeader:function(a){return this.xhr.getResponseHeader(a)},getAllResponseHeaders:function(){return this.xhr.getAllResponseHeaders()||{}},end:function(d,e){var f=this,g=f.options;f.end=f.abort=c,f.status=d,e&&(f.statusText=e),b.log("xhr.end:",d,e),g.complete(200==d||201==d?!1:f.statusText||"unknown",f),f.xhr&&f.xhr.node&&setTimeout(function(){var b=f.xhr.node;try{b.parentNode.removeChild(b)}catch(c){}try{delete a[f.uid]}catch(c){}a[f.uid]=f.xhr.node=null},9)},abort:function(){this.end(0,"abort"),this.xhr&&(this.xhr.aborted=!0,this.xhr.abort())},send:function(a){var b=this,c=this.options;a.toData(function(a){c.upload(c,b),b._send.call(b,c,a)},c)},_send:function(c,e){var g,h=this,i=h.uid,j=h.uid+"Load",k=c.url;if(b.log("XHR._send:",e),c.cache||(k+=(~k.indexOf("?")?"&":"?")+b.uid()),e.nodeName){var l=c.jsonp;k=k.replace(/([a-z]+)=(\?)/i,"$1="+i),c.upload(c,h);var m=function(a){if(~k.indexOf(a.origin))try{var c=b.parseJSON(a.data);c.id==i&&n(c.status,c.statusText,c.response)}catch(d){n(0,d.message)}},n=a[i]=function(c,d,e){h.readyState=4,h.responseText=e,h.end(c,d),b.event.off(a,"message",m),a[i]=g=p=a[j]=null};h.xhr.abort=function(){try{p.stop?p.stop():p.contentWindow.stop?p.contentWindow.stop():p.contentWindow.document.execCommand("Stop")}catch(a){}n(0,"abort")},b.event.on(a,"message",m),a[j]=function(){try{var a=p.contentWindow,c=a.document,d=a.result||b.parseJSON(c.body.innerHTML);n(d.status,d.statusText,d.response)}catch(e){b.log("[transport.onload]",e)}},g=d.createElement("div"),g.innerHTML='
'+(l&&c.url.indexOf("=?")<0?'':"")+"
";var o=g.getElementsByTagName("form")[0],p=g.getElementsByTagName("iframe")[0];o.appendChild(e),b.log(o.parentNode.innerHTML),d.body.appendChild(g),h.xhr.node=g,h.readyState=2,o.submit(),o=null}else{if(k=k.replace(/([a-z]+)=(\?)&?/i,""),this.xhr&&this.xhr.aborted)return void b.log("Error: already aborted");if(g=h.xhr=b.getXHR(),e.params&&(k+=(k.indexOf("?")<0?"?":"&")+e.params.join("&")),g.open("POST",k,!0),b.withCredentials&&(g.withCredentials="true"),c.headers&&c.headers["X-Requested-With"]||g.setRequestHeader("X-Requested-With","XMLHttpRequest"),b.each(c.headers,function(a,b){g.setRequestHeader(b,a)}),c._chunked){g.upload&&g.upload.addEventListener("progress",b.throttle(function(a){e.retry||c.progress({type:a.type,total:e.size,loaded:e.start+a.loaded,totalSize:e.size},h,c)},100),!1),g.onreadystatechange=function(){var a=parseInt(g.getResponseHeader("X-Last-Known-Byte"),10);if(h.status=g.status,h.statusText=g.statusText,h.readyState=g.readyState,4==g.readyState){try{for(var d in f)h["response"+d]=g["response"+d]}catch(i){}if(g.onreadystatechange=null,!g.status||g.status-201>0)if(b.log("Error: "+g.status),(!g.status&&!g.aborted||500==g.status||416==g.status)&&++e.retry<=c.chunkUploadRetry){var j=g.status?0:b.chunkNetworkDownRetryTimeout;c.pause(e.file,c),b.log("X-Last-Known-Byte: "+a),a?e.end=a:(e.end=e.start-1,416==g.status&&(e.end=e.end-c.chunkSize)),setTimeout(function(){h._send(c,e)},j)}else h.end(g.status);else e.retry=0,e.end==e.size-1?h.end(g.status):(b.log("X-Last-Known-Byte: "+a),a&&(e.end=a),e.file.FileAPIReadPosition=e.end,setTimeout(function(){h._send(c,e)},0));g=null}},e.start=e.end+1,e.end=Math.max(Math.min(e.start+c.chunkSize,e.size)-1,e.start);var q=e.file,r=(q.slice||q.mozSlice||q.webkitSlice).call(q,e.start,e.end+1);e.size&&!r.size?setTimeout(function(){h.end(-1)}):(g.setRequestHeader("Content-Range","bytes "+e.start+"-"+e.end+"/"+e.size),g.setRequestHeader("Content-Disposition","attachment; filename="+encodeURIComponent(e.name)),g.setRequestHeader("Content-Type",e.type||"application/octet-stream"),g.send(r)),q=r=null}else if(g.upload&&g.upload.addEventListener("progress",b.throttle(function(a){c.progress(a,h,c)},100),!1),g.onreadystatechange=function(){if(h.status=g.status,h.statusText=g.statusText,h.readyState=g.readyState,4==g.readyState){for(var a in f)h["response"+a]=g["response"+a];if(g.onreadystatechange=null,!g.status||g.status>201)if(b.log("Error: "+g.status),(!g.status&&!g.aborted||500==g.status)&&(c.retry||0)=0?a+"px":a}function d(a){var b,c=f.createElement("canvas"),d=!1;try{b=c.getContext("2d"),b.drawImage(a,0,0,1,1),d=255!=b.getImageData(0,0,1,1).data[4]}catch(e){}return d}var e=a.URL||a.webkitURL,f=a.document,g=a.navigator,h=g.getUserMedia||g.webkitGetUserMedia||g.mozGetUserMedia||g.msGetUserMedia,i=!!h;b.support.media=i;var j=function(a){this.video=a};j.prototype={isActive:function(){return!!this._active},start:function(a){var b,c,f=this,i=f.video,j=function(d){f._active=!d,clearTimeout(c),clearTimeout(b),a&&a(d,f)};h.call(g,{video:!0},function(a){f.stream=a,i.src=e.createObjectURL(a),b=setInterval(function(){d(i)&&j(null)},1e3),c=setTimeout(function(){j("timeout")},5e3),i.play()},j)},stop:function(){try{this._active=!1,this.video.pause(),this.stream.stop()}catch(a){}},shot:function(){return new k(this.video)}},j.get=function(a){return new j(a.firstChild)},j.publish=function(d,e,g){"function"==typeof e&&(g=e,e={}),e=b.extend({},{width:"100%",height:"100%",start:!0},e),d.jquery&&(d=d[0]);var h=function(a){if(a)g(a);else{var b=j.get(d);e.start?b.start(g):g(null,b)}};if(d.style.width=c(e.width),d.style.height=c(e.height),b.html5&&i){var k=f.createElement("video");k.style.width=c(e.width),k.style.height=c(e.height),a.jQuery?jQuery(d).empty():d.innerHTML="",d.appendChild(k),h()}else j.fallback(d,e,h)},j.fallback=function(a,b,c){c("not_support_camera")};var k=function(a){var c=a.nodeName?b.Image.toCanvas(a):a,d=b.Image(c);return d.type="image/png",d.width=c.width,d.height=c.height,d.size=c.width*c.height*4,d};j.Shot=k,b.Camera=j}(window,FileAPI),function(a,b,c){"use strict";var d=a.document,e=a.location,f=a.navigator,g=c.each;c.support.flash=function(){var b=f.mimeTypes,d=!1;if(f.plugins&&"object"==typeof f.plugins["Shockwave Flash"])d=f.plugins["Shockwave Flash"].description&&!(b&&b["application/x-shockwave-flash"]&&!b["application/x-shockwave-flash"].enabledPlugin); +else try{d=!(!a.ActiveXObject||!new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))}catch(g){c.log("Flash -- does not supported.")}return d&&/^file:/i.test(e)&&c.log("[warn] Flash does not work on `file:` protocol."),d}(),c.support.flash&&(0||!c.html5||!c.support.html5||c.cors&&!c.support.cors||c.media&&!c.support.media)&&function(){function h(a){return('').replace(/#(\w+)#/gi,function(b,c){return a[c]})}function i(a,b){if(a&&a.style){var c,d;for(c in b){d=b[c],"number"==typeof d&&(d+="px");try{a.style[c]=d}catch(e){}}}}function j(a,b){g(b,function(b,c){var d=a[c];a[c]=function(){return this.parent=d,b.apply(this,arguments)}})}function k(a){return a&&!a.flashId}function l(a){var b=a.wid=c.uid();return v._fn[b]=a,"FileAPI.Flash._fn."+b}function m(a){try{v._fn[a.wid]=null,delete v._fn[a.wid]}catch(b){}}function n(a,b){if(!u.test(a)){if(/^\.\//.test(a)||"/"!=a.charAt(0)){var c=e.pathname;c=c.substr(0,c.lastIndexOf("/")),a=(c+"/"+a).replace("/./","/")}"//"!=a.substr(0,2)&&(a="//"+e.host+a),u.test(a)||(a=e.protocol+a)}return b&&(a+=(/\?/.test(a)?"&":"?")+b),a}function o(a,b,e){function f(){try{var a=v.get(j);a.setImage(b)}catch(d){c.log('[err] FlashAPI.Preview.setImage -- can not set "base64":',d)}}var g,j=c.uid(),k=d.createElement("div"),o=10;for(g in a)k.setAttribute(g,a[g]),k[g]=a[g];i(k,a),a.width="100%",a.height="100%",k.innerHTML=h(c.extend({id:j,src:n(c.flashImageUrl,"r="+c.uid()),wmode:"opaque",flashvars:"scale="+a.scale+"&callback="+l(function p(){return m(p),--o>0&&f(),!0})},a)),e(!1,k),k=null}function p(a){return{id:a.id,name:a.name,matrix:a.matrix,flashId:a.flashId}}function q(a){function b(a){var b,c;if(b=c=0,a.offsetParent)do b+=a.offsetLeft,c+=a.offsetTop;while(a=a.offsetParent);return{left:b,top:c}}a.getBoundingClientRect(),d.body,(a&&a.ownerDocument).documentElement;return{top:b(a).top,left:b(a).left,width:a.offsetWidth,height:a.offsetHeight}}var r=c.uid(),s=0,t={},u=/^https?:/i,v={_fn:{},publish:function(a,b,d){d=d||{},a.innerHTML=h({id:b,src:n(c.flashUrl,"r="+c.version),wmode:d.camera?"":"transparent",flashvars:"callback="+(d.onEvent||"FileAPI.Flash.onEvent")+"&flashId="+b+"&storeKey="+f.userAgent.match(/\d/gi).join("")+"_"+c.version+(v.isReady||(c.pingUrl?"&ping="+c.pingUrl:""))+"&timeout="+c.flashAbortTimeout+(d.camera?"&useCamera="+n(c.flashWebcamUrl):"")+"&debug="+(c.debug?"1":"")},d)},init:function(){var a=d.body&&d.body.firstChild;if(a)do if(1==a.nodeType){c.log("FlashAPI.state: awaiting");var b=d.createElement("div");return b.id="_"+r,i(b,{top:1,right:1,width:5,height:5,position:"absolute",zIndex:1e6+""}),a.parentNode.insertBefore(b,a),void v.publish(b,r)}while(a=a.nextSibling);10>s&&setTimeout(v.init,50*++s)},ready:function(){c.log("FlashAPI.state: ready"),v.ready=c.F,v.isReady=!0,v.patch(),v.patchCamera&&v.patchCamera(),c.event.on(d,"mouseover",v.mouseover),c.event.on(d,"click",function(a){v.mouseover(a)&&(a.preventDefault?a.preventDefault():a.returnValue=!0)})},getEl:function(){return d.getElementById("_"+r)},getWrapper:function(a){do if(/js-fileapi-wrapper/.test(a.className))return a;while((a=a.parentNode)&&a!==d.body)},disableMouseover:!1,mouseover:function(a){if(!v.disableMouseover){var b=c.event.fix(a).target;if(/input/i.test(b.nodeName)&&"file"==b.type&&!b.disabled){var e=b.getAttribute(r),f=v.getWrapper(b);if(c.multiFlash){if("i"==e||"r"==e)return!1;if("p"!=e){b.setAttribute(r,"i");var g=d.createElement("div");if(!f)return void c.log("[err] FlashAPI.mouseover: js-fileapi-wrapper not found");i(g,{top:0,left:0,width:b.offsetWidth,height:b.offsetHeight,zIndex:1e6+"",position:"absolute"}),f.appendChild(g),v.publish(g,c.uid()),b.setAttribute(r,"p")}return!0}if(f){var h=q(f);i(v.getEl(),h),v.curInp=b}}else/object|embed/i.test(b.nodeName)||i(v.getEl(),{top:1,left:1,width:5,height:5})}},onEvent:function(a){var b=a.type;if("ready"==b){try{v.getInput(a.flashId).setAttribute(r,"r")}catch(d){}return v.ready(),setTimeout(function(){v.mouseenter(a)},50),!0}"ping"===b?c.log("(flash -> js).ping:",[a.status,a.savedStatus],a.error):"log"===b?c.log("(flash -> js).log:",a.target):b in v&&setTimeout(function(){c.log("FlashAPI.event."+a.type+":",a),v[b](a)},1)},mouseDown:function(){v.disableMouseover=!0},cancel:function(){v.disableMouseover=!1},mouseenter:function(a){var b=v.getInput(a.flashId);if(b){v.cmd(a,"multiple",null!=b.getAttribute("multiple"));var d=[],e={};g((b.getAttribute("accept")||"").split(/,\s*/),function(a){c.accept[a]&&g(c.accept[a].split(" "),function(a){e[a]=1})}),g(e,function(a,b){d.push(b)}),v.cmd(a,"accept",d.length?d.join(",")+","+d.join(",").toUpperCase():"*")}},get:function(b){return d[b]||a[b]||d.embeds[b]},getInput:function(a){if(!c.multiFlash)return v.curInp;try{var b=v.getWrapper(v.get(a));if(b)return b.getElementsByTagName("input")[0]}catch(d){c.log('[err] Can not find "input" by flashId:',a,d)}},select:function(a){try{var e,f=v.getInput(a.flashId),h=c.uid(f),i=a.target.files;g(i,function(a){c.checkFileObj(a)}),t[h]=i,d.createEvent?(e=d.createEvent("Event"),e.files=i,e.initEvent("change",!0,!0),f.dispatchEvent(e)):b?b(f).trigger({type:"change",files:i}):(e=d.createEventObject(),e.files=i,f.fireEvent("onchange",e))}finally{v.disableMouseover=!1}},interval:null,cmd:function(a,b,c,d){v.uploadInProgress&&v.readInProgress?setTimeout(function(){v.cmd(a,b,c,d)},100):this.cmdFn(a,b,c,d)},cmdFn:function(a,b,d,e){try{return c.log("(js -> flash)."+b+":",d),v.get(a.flashId||a).cmd(b,d)}catch(f){c.log("(js -> flash).onError:",f),e||setTimeout(function(){v.cmd(a,b,d,!0)},50)}},patch:function(){c.flashEngine=!0,j(c,{readAsDataURL:function(a,b){k(a)?this.parent.apply(this,arguments):(c.log("FlashAPI.readAsBase64"),v.readInProgress=!0,v.cmd(a,"readAsBase64",{id:a.id,callback:l(function d(e,f){v.readInProgress=!1,m(d),c.log("FlashAPI.readAsBase64:",e),b({type:e?"error":"load",error:e,result:"data:"+a.type+";base64,"+f})})}))},readAsText:function(b,d,e){e?c.log("[warn] FlashAPI.readAsText not supported `encoding` param"):e=d,c.readAsDataURL(b,function(b){if("load"==b.type)try{b.result=a.atob(b.result.split(";base64,")[1])}catch(c){b.type="error",b.error=c.toString()}e(b)})},getFiles:function(a,b,d){if(d)return c.filterFiles(c.getFiles(a),b,d),null;var e=c.isArray(a)?a:t[c.uid(a.target||a.srcElement||a)];return e?(b&&(b=c.getFilesFilter(b),e=c.filter(e,function(a){return b.test(a.name)})),e):this.parent.apply(this,arguments)},getInfo:function(a,b){if(k(a))this.parent.apply(this,arguments);else if(a.isShot)b(null,a.info={width:a.width,height:a.height});else{if(!a.__info){var d=a.__info=c.defer();d.resolve(null,a.info=null)}a.__info.then(b)}}}),c.support.transform=!0,c.Image&&j(c.Image.prototype,{get:function(a,b){return this.set({scaleMode:b||"noScale"}),this.parent(a)},_load:function(a,b){if(c.log("FlashAPI.Image._load:",a),k(a))this.parent.apply(this,arguments);else{var d=this;c.getInfo(a,function(c){b.call(d,c,a)})}},_apply:function(a,b){if(c.log("FlashAPI.Image._apply:",a),k(a))this.parent.apply(this,arguments);else{var d=this.getMatrix(a.info),e=b;v.cmd(a,"imageTransform",{id:a.id,matrix:d,callback:l(function f(g,h){c.log("FlashAPI.Image._apply.callback:",g),m(f),g?e(g):c.support.html5||c.support.dataURI&&!(h.length>3e4)?(d.filter&&(e=function(a,e){a?b(a):c.Image.applyFilter(e,d.filter,function(){b(a,this.canvas)})}),c.newImage("data:"+a.type+";base64,"+h,e)):o({width:d.deg%180?d.dh:d.dw,height:d.deg%180?d.dw:d.dh,scale:d.scaleMode},h,e)})})}},toData:function(a){var b=this.file,d=b.info,e=this.getMatrix(d);c.log("FlashAPI.Image.toData"),k(b)?this.parent.apply(this,arguments):("auto"==e.deg&&(e.deg=c.Image.exifOrientation[d&&d.exif&&d.exif.Orientation]||0),a.call(this,!b.info,{id:b.id,flashId:b.flashId,name:b.name,type:b.type,matrix:e}))}}),c.Image&&j(c.Image,{fromDataURL:function(a,b,d){!c.support.dataURI||a.length>3e4?o(c.extend({scale:"exactFit"},b),a.replace(/^data:[^,]+,/,""),function(a,b){d(b)}):this.parent(a,b,d)}}),j(c.Form.prototype,{toData:function(a){for(var b=this.items,d=b.length;d--;)if(b[d].file&&k(b[d].blob))return this.parent.apply(this,arguments);c.log("FlashAPI.Form.toData"),a(b)}}),j(c.XHR.prototype,{_send:function(a,b){if(b.nodeName||b.append&&c.support.html5||c.isArray(b)&&"string"==typeof b[0])return this.parent.apply(this,arguments);var d,e,f={},h={},i=this;if(g(b,function(a){a.file?(h[a.name]=a=p(a.blob),e=a.id,d=a.flashId):f[a.name]=a.blob}),e||(d=r),!d)return c.log("[err] FlashAPI._send: flashId -- undefined"),this.parent.apply(this,arguments);c.log("FlashAPI.XHR._send: "+d+" -> "+e),i.xhr={headers:{},abort:function(){v.uploadInProgress=!1,v.cmd(d,"abort",{id:e})},getResponseHeader:function(a){return this.headers[a]},getAllResponseHeaders:function(){return this.headers}};var j=c.queue(function(){v.uploadInProgress=!0,v.cmd(d,"upload",{url:n(a.url.replace(/([a-z]+)=(\?)&?/i,"")),data:f,files:e?h:null,headers:a.headers||{},callback:l(function b(d){var e=d.type,f=d.result;c.log("FlashAPI.upload."+e),"progress"==e?(d.loaded=Math.min(d.loaded,d.total),d.lengthComputable=!0,a.progress(d)):"complete"==e?(v.uploadInProgress=!1,m(b),"string"==typeof f&&(i.responseText=f.replace(/%22/g,'"').replace(/%5c/g,"\\").replace(/%26/g,"&").replace(/%25/g,"%")),i.end(d.status||200)):("abort"==e||"error"==e)&&(v.uploadInProgress=!1,i.end(d.status||0,d.message),m(b))})})});g(h,function(a){j.inc(),c.getInfo(a,j.next)}),j.check()}})}};c.Flash=v,c.newImage("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",function(a,b){c.support.dataURI=!(1!=b.width||1!=b.height),v.init()})}()}(window,window.jQuery,FileAPI),function(a,b,c){"use strict";var d=c.each,e=[];c.support.flash&&c.media&&!c.support.media&&!function(){function a(a){var b=a.wid=c.uid();return c.Flash._fn[b]=a,"FileAPI.Flash._fn."+b}function b(a){try{c.Flash._fn[a.wid]=null,delete c.Flash._fn[a.wid]}catch(b){}}var f=c.Flash;c.extend(c.Flash,{patchCamera:function(){c.Camera.fallback=function(d,e,g){var h=c.uid();c.log("FlashAPI.Camera.publish: "+h),f.publish(d,h,c.extend(e,{camera:!0,onEvent:a(function i(a){"camera"===a.type&&(b(i),a.error?(c.log("FlashAPI.Camera.publish.error: "+a.error),g(a.error)):(c.log("FlashAPI.Camera.publish.success: "+h),g(null)))})}))},d(e,function(a){c.Camera.fallback.apply(c.Camera,a)}),e=[],c.extend(c.Camera.prototype,{_id:function(){return this.video.id},start:function(d){var e=this;f.cmd(this._id(),"camera.on",{callback:a(function g(a){b(g),a.error?(c.log("FlashAPI.camera.on.error: "+a.error),d(a.error,e)):(c.log("FlashAPI.camera.on.success: "+e._id()),e._active=!0,d(null,e))})})},stop:function(){this._active=!1,f.cmd(this._id(),"camera.off")},shot:function(){c.log("FlashAPI.Camera.shot:",this._id());var a=c.Flash.cmd(this._id(),"shot",{});return a.type="image/png",a.flashId=this._id(),a.isShot=!0,new c.Camera.Shot(a)}})}}),c.Camera.fallback=function(){e.push(arguments)}}()}(window,window.jQuery,FileAPI),"function"==typeof define&&define.amd&&define("FileAPI",[],function(){return FileAPI}); \ No newline at end of file diff --git a/static/html/bower_components/angularjs-file-upload/ng-file-upload-all.min.js b/static/html/bower_components/angularjs-file-upload/ng-file-upload-all.min.js new file mode 100644 index 00000000..8647d6e4 --- /dev/null +++ b/static/html/bower_components/angularjs-file-upload/ng-file-upload-all.min.js @@ -0,0 +1,4 @@ +/*! 12.0.1 */ +!function(){function a(a,b){window.XMLHttpRequest.prototype[a]=b(window.XMLHttpRequest.prototype[a])}function b(a,b,c){try{Object.defineProperty(a,b,{get:c})}catch(d){}}if(window.FileAPI||(window.FileAPI={}),!window.XMLHttpRequest)throw"AJAX is not supported. XMLHttpRequest is not defined.";if(FileAPI.shouldLoad=!window.FormData||FileAPI.forceLoad,FileAPI.shouldLoad){var c=function(a){if(!a.__listeners){a.upload||(a.upload={}),a.__listeners=[];var b=a.upload.addEventListener;a.upload.addEventListener=function(c,d){a.__listeners[c]=d,b&&b.apply(this,arguments)}}};a("open",function(a){return function(b,d,e){c(this),this.__url=d;try{a.apply(this,[b,d,e])}catch(f){f.message.indexOf("Access is denied")>-1&&(this.__origError=f,a.apply(this,[b,"_fix_for_ie_crossdomain__",e]))}}}),a("getResponseHeader",function(a){return function(b){return this.__fileApiXHR&&this.__fileApiXHR.getResponseHeader?this.__fileApiXHR.getResponseHeader(b):null==a?null:a.apply(this,[b])}}),a("getAllResponseHeaders",function(a){return function(){return this.__fileApiXHR&&this.__fileApiXHR.getAllResponseHeaders?this.__fileApiXHR.getAllResponseHeaders():null==a?null:a.apply(this)}}),a("abort",function(a){return function(){return this.__fileApiXHR&&this.__fileApiXHR.abort?this.__fileApiXHR.abort():null==a?null:a.apply(this)}}),a("setRequestHeader",function(a){return function(b,d){if("__setXHR_"===b){c(this);var e=d(this);e instanceof Function&&e(this)}else this.__requestHeaders=this.__requestHeaders||{},this.__requestHeaders[b]=d,a.apply(this,arguments)}}),a("send",function(a){return function(){var c=this;if(arguments[0]&&arguments[0].__isFileAPIShim){var d=arguments[0],e={url:c.__url,jsonp:!1,cache:!0,complete:function(a,d){a&&angular.isString(a)&&-1!==a.indexOf("#2174")&&(a=null),c.__completed=!0,!a&&c.__listeners.load&&c.__listeners.load({type:"load",loaded:c.__loaded,total:c.__total,target:c,lengthComputable:!0}),!a&&c.__listeners.loadend&&c.__listeners.loadend({type:"loadend",loaded:c.__loaded,total:c.__total,target:c,lengthComputable:!0}),"abort"===a&&c.__listeners.abort&&c.__listeners.abort({type:"abort",loaded:c.__loaded,total:c.__total,target:c,lengthComputable:!0}),void 0!==d.status&&b(c,"status",function(){return 0===d.status&&a&&"abort"!==a?500:d.status}),void 0!==d.statusText&&b(c,"statusText",function(){return d.statusText}),b(c,"readyState",function(){return 4}),void 0!==d.response&&b(c,"response",function(){return d.response});var e=d.responseText||(a&&0===d.status&&"abort"!==a?a:void 0);b(c,"responseText",function(){return e}),b(c,"response",function(){return e}),a&&b(c,"err",function(){return a}),c.__fileApiXHR=d,c.onreadystatechange&&c.onreadystatechange(),c.onload&&c.onload()},progress:function(a){if(a.target=c,c.__listeners.progress&&c.__listeners.progress(a),c.__total=a.total,c.__loaded=a.loaded,a.total===a.loaded){var b=this;setTimeout(function(){c.__completed||(c.getAllResponseHeaders=function(){},b.complete(null,{status:204,statusText:"No Content"}))},FileAPI.noContentTimeout||1e4)}},headers:c.__requestHeaders};e.data={},e.files={};for(var f=0;f-1){e=h.substring(0,g+1);break}null==FileAPI.staticPath&&(FileAPI.staticPath=e),i.setAttribute("src",d||e+"FileAPI.min.js"),document.getElementsByTagName("head")[0].appendChild(i)}FileAPI.ngfFixIE=function(d,e,f){if(!b())throw'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';var g=function(){var b=e.parent();d.attr("disabled")?b&&b.removeClass("js-fileapi-wrapper"):(e.attr("__ngf_flash_")||(e.unbind("change"),e.unbind("click"),e.bind("change",function(a){h.apply(this,[a]),f.apply(this,[a])}),e.attr("__ngf_flash_","true")),b.addClass("js-fileapi-wrapper"),a(d)||(b.css("position","absolute").css("top",c(d[0]).top+"px").css("left",c(d[0]).left+"px").css("width",d[0].offsetWidth+"px").css("height",d[0].offsetHeight+"px").css("filter","alpha(opacity=0)").css("display",d.css("display")).css("overflow","hidden").css("z-index","900000").css("visibility","visible"),e.css("width",d[0].offsetWidth+"px").css("height",d[0].offsetHeight+"px").css("position","absolute").css("top","0px").css("left","0px")))};d.bind("mouseenter",g);var h=function(a){for(var b=FileAPI.getFiles(a),c=0;c0},this.rename=function(a,b){return a.ngfName=b,a},this.jsonBlob=function(a){null==a||angular.isString(a)||(a=JSON.stringify(a));var b=new window.Blob([a],{type:"application/json"});return b._ngfBlob=!0,b},this.json=function(a){return angular.toJson(a)},this.isFile=function(a){return null!=a&&(a instanceof window.Blob||a.flashId&&a.name&&a.size)},this.upload=function(a,b){function c(b,c){if(b._ngfBlob)return b;if(a._file=a._file||b,null!=a._start&&g){a._end&&a._end>=b.size&&(a._finished=!0,a._end=b.size);var d=b.slice(a._start,a._end||b.size);return d.name=b.name,d.ngfName=b.ngfName,a._chunkSize&&(c.append("_chunkSize",a._chunkSize),c.append("_currentChunkSize",a._end-a._start),c.append("_chunkNumber",Math.floor(a._start/a._chunkSize)),c.append("_totalSize",a._file.size)),d}return b}function h(b,d,e){if(void 0!==d)if(angular.isDate(d)&&(d=d.toISOString()),angular.isString(d))b.append(e,d);else if(f.isFile(d)){var g=c(d,b),i=e.split(",");i[1]&&(g.ngfName=i[1].replace(/^\s+|\s+$/g,""),e=i[0]),a._fileKey=a._fileKey||e,b.append(e,g,g.ngfName||g.name)}else if(angular.isObject(d)){if(d.$$ngfCircularDetection)throw"ngFileUpload: Circular reference in config.data. Make sure specified data for Upload.upload() has no circular reference: "+e;d.$$ngfCircularDetection=!0;try{for(var j in d)if(d.hasOwnProperty(j)&&"$$ngfCircularDetection"!==j){var k=null==a.objectKey?"[i]":a.objectKey;d.length&&parseInt(j)>-1&&(k=null==a.arrayKey?k:a.arrayKey),h(b,d[j],e+k.replace(/[ik]/g,j))}}finally{delete d.$$ngfCircularDetection}}else b.append(e,d)}function i(){a._chunkSize=f.translateScalars(a.resumeChunkSize),a._chunkSize=a._chunkSize?parseInt(a._chunkSize.toString()):null,a.headers=a.headers||{},a.headers["Content-Type"]=void 0,a.transformRequest=a.transformRequest?angular.isArray(a.transformRequest)?a.transformRequest:[a.transformRequest]:[],a.transformRequest.push(function(b){var c,d=new window.FormData;b=b||a.fields||{},a.file&&(b.file=a.file);for(c in b)if(b.hasOwnProperty(c)){var e=b[c];a.formDataAppender?a.formDataAppender(d,c,e):h(d,e,c)}return d})}return b||(a=e(a)),a._isDigested||(a._isDigested=!0,i()),d(a)},this.http=function(b){return b=e(b),b.transformRequest=b.transformRequest||function(b){return window.ArrayBuffer&&b instanceof window.ArrayBuffer||b instanceof window.Blob?b:a.defaults.transformRequest[0].apply(this,arguments)},b._chunkSize=f.translateScalars(b.resumeChunkSize),b._chunkSize=b._chunkSize?parseInt(b._chunkSize.toString()):null,d(b)},this.translateScalars=function(a){if(angular.isString(a)){if(a.search(/kb/i)===a.length-2)return parseFloat(1024*a.substring(0,a.length-2));if(a.search(/mb/i)===a.length-2)return parseFloat(1048576*a.substring(0,a.length-2));if(a.search(/gb/i)===a.length-2)return parseFloat(1073741824*a.substring(0,a.length-2));if(a.search(/b/i)===a.length-1)return parseFloat(a.substring(0,a.length-1));if(a.search(/s/i)===a.length-1)return parseFloat(a.substring(0,a.length-1));if(a.search(/m/i)===a.length-1)return parseFloat(60*a.substring(0,a.length-1));if(a.search(/h/i)===a.length-1)return parseFloat(3600*a.substring(0,a.length-1))}return a},this.urlToBlob=function(c){var d=b.defer();return a({url:c,method:"get",responseType:"arraybuffer"}).then(function(a){var b=new Uint8Array(a.data),c=a.headers("content-type")||"image/WebP",e=new window.Blob([b],{type:c});d.resolve(e)},function(a){d.reject(a)}),d.promise},this.setDefaults=function(a){this.defaults=a||{}},this.defaults={},this.version=ngFileUpload.version}]),ngFileUpload.service("Upload",["$parse","$timeout","$compile","$q","UploadExif",function(a,b,c,d,e){function f(a,b,c){var e=[h.emptyPromise()];return angular.forEach(a,function(d,f){0===d.type.indexOf("image/jpeg")&&h.attrGetter("ngfFixOrientation",b,c,{$file:d})&&e.push(h.happyPromise(h.applyExifRotation(d),d).then(function(b){a.splice(f,1,b)}))}),d.all(e)}function g(a,b,c){function e(d,e){if(0===d.type.indexOf("image")){if(f.pattern&&!h.validatePattern(d,f.pattern))return;var i=h.resize(d,f.width,f.height,f.quality,f.type,f.ratio,f.centerCrop,function(a,e){return h.attrGetter("ngfResizeIf",b,c,{$width:a,$height:e,$file:d})},f.restoreExif!==!1);g.push(i),i.then(function(b){a.splice(e,1,b)},function(a){d.$error="resize",d.$errorParam=(a?(a.message?a.message:a)+": ":"")+(d&&d.name)})}}var f=h.attrGetter("ngfResize",b,c);if(!(f&&angular.isObject(f)&&h.isResizeSupported()&&a.length))return h.emptyPromise();for(var g=[h.emptyPromise()],i=0;i-1:!0},h.emptyPromise=function(){var a=d.defer(),c=arguments;return b(function(){a.resolve.apply(a,c)}),a.promise},h.rejectPromise=function(){var a=d.defer(),c=arguments;return b(function(){a.reject.apply(a,c)}),a.promise},h.happyPromise=function(a,c){var e=d.defer();return a.then(function(a){e.resolve(a)},function(a){b(function(){throw a}),e.resolve(c)}),e.promise},h.updateModel=function(c,d,e,i,j,k,l){function m(f,g,j,l,m){d.$$ngfPrevValidFiles=f,d.$$ngfPrevInvalidFiles=g;var n=f&&f.length?f[0]:null,o=g&&g.length?g[0]:null;c&&(h.applyModelValidation(c,f),c.$setViewValue(m?n:f)),i&&a(i)(e,{$files:f,$file:n,$newFiles:j,$duplicateFiles:l,$invalidFiles:g,$invalidFile:o,$event:k});var p=h.attrGetter("ngfModelInvalid",d);p&&b(function(){a(p).assign(e,m?o:g)}),b(function(){})}function n(){function a(a,b){return a.name===b.name&&(a.$ngfOrigSize||a.size)===(b.$ngfOrigSize||b.size)&&a.type===b.type}function b(b){var c;for(c=0;c2){var c=d.defaults.androidFixMinorVersion||4;return parseInt(b[1])<4||parseInt(b[1])===c&&parseInt(b[2])');n(a);var c=angular.element("");return c.css("visibility","hidden").css("position","absolute").css("overflow","hidden").css("width","0px").css("height","0px").css("border","none").css("margin","0px").css("padding","0px").attr("tabindex","-1"),g.push({el:b,ref:c}),document.body.appendChild(c.append(a)[0]),a}function p(c){if(b.attr("disabled"))return!1;if(!t("ngfSelectDisabled",a)){var d=q(c);if(null!=d)return d;r(c);try{k()||document.body.contains(w[0])||(g.push({el:b,ref:w.parent()}),document.body.appendChild(w.parent()[0]),w.bind("change",m))}catch(f){}return e(navigator.userAgent)?setTimeout(function(){w[0].click()},0):w[0].click(),!1}}function q(a){var b=a.changedTouches||a.originalEvent&&a.originalEvent.changedTouches;if("touchstart"===a.type)return v=b?b[0].clientY:0,!0;if(a.stopPropagation(),a.preventDefault(),"touchend"===a.type){var c=b?b[0].clientY:0;if(Math.abs(c-v)>20)return!1}}function r(b){j.shouldUpdateOn("click",c,a)&&w.val()&&(w.val(null),j.updateModel(d,c,a,l(),null,b,!0))}function s(a){if(w&&!w.attr("__ngf_ie10_Fix_")){if(!w[0].parentNode)return void(w=null);a.preventDefault(),a.stopPropagation(),w.unbind("click");var b=w.clone();return w.replaceWith(b),w=b,w.attr("__ngf_ie10_Fix_","true"),w.bind("change",m),w.bind("click",s),w[0].click(),!1}w.removeAttr("__ngf_ie10_Fix_")}var t=function(a,b){return j.attrGetter(a,c,b)};j.registerModelChangeValidator(d,c,a);var u=[];u.push(a.$watch(t("ngfMultiple"),function(){w.attr("multiple",t("ngfMultiple",a))})),u.push(a.$watch(t("ngfCapture"),function(){w.attr("capture",t("ngfCapture",a))})),u.push(a.$watch(t("ngfAccept"),function(){w.attr("accept",t("ngfAccept",a))})),c.$observe("accept",function(){w.attr("accept",t("accept"))}),u.push(function(){c.$$observers&&delete c.$$observers.accept});var v=0,w=b;k()||(w=o()),w.bind("change",m),k()?b.bind("click",r):b.bind("click touchstart touchend",p),-1!==navigator.appVersion.indexOf("MSIE 10")&&w.bind("click",s),d&&d.$formatters.push(function(a){return(null==a||0===a.length)&&w.val()&&w.val(null),a}),a.$on("$destroy",function(){k()||w.parent().remove(),angular.forEach(u,function(a){a()})}),h(function(){for(var a=0;ab||d.blobUrls.length>e)&&d.blobUrls.length>1;){var h=d.blobUrls.splice(0,1)[0];c.revokeObjectURL(h.url),d.blobUrlsTotalSize-=h.size}}})}else{var i=new FileReader;i.onload=function(c){b(function(){a.$ngfDataUrl=c.target.result,g.resolve(c.target.result,a),b(function(){delete a.$ngfDataUrl},1e3)})},i.onerror=function(){b(function(){a.$ngfDataUrl="",g.reject()})},i.readAsDataURL(a)}}else b(function(){a[e?"$ngfDataUrl":"$ngfBlobUrl"]="",g.reject()})}),f=e?a.$$ngfDataUrlPromise=g.promise:a.$$ngfBlobUrlPromise=g.promise,f["finally"](function(){delete a[e?"$$ngfDataUrlPromise":"$$ngfBlobUrlPromise"]}),f},d}]),ngFileUpload.directive("ngfSrc",["Upload","$timeout",function(a,c){return{restrict:"AE",link:function(d,e,f){b(a,c,d,e,f,"ngfSrc",a.attrGetter("ngfResize",f,d),!1)}}}]),ngFileUpload.directive("ngfBackground",["Upload","$timeout",function(a,c){return{restrict:"AE",link:function(d,e,f){b(a,c,d,e,f,"ngfBackground",a.attrGetter("ngfResize",f,d),!0)}}}]),ngFileUpload.directive("ngfThumbnail",["Upload","$timeout",function(a,c){return{restrict:"AE",link:function(d,e,f){var g=a.attrGetter("ngfSize",f,d);b(a,c,d,e,f,"ngfThumbnail",g,a.attrGetter("ngfAsBackground",f,d))}}}]),ngFileUpload.config(["$compileProvider",function(a){a.imgSrcSanitizationWhitelist&&a.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|local|file|data|blob):/),a.aHrefSanitizationWhitelist&&a.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|local|file|data|blob):/)}]),ngFileUpload.filter("ngfDataUrl",["UploadDataUrl","$sce",function(a,b){return function(c,d,e){if(angular.isString(c))return b.trustAsResourceUrl(c);var f=c&&((d?c.$ngfDataUrl:c.$ngfBlobUrl)||c.$ngfDataUrl);return c&&!f?(!c.$ngfDataUrlFilterInProgress&&angular.isObject(c)&&(c.$ngfDataUrlFilterInProgress=!0,a.dataUrl(c,d)),""):(c&&delete c.$ngfDataUrlFilterInProgress,(c&&f?e?b.trustAsResourceUrl(f):f:c)||"")}}])}(),ngFileUpload.service("UploadValidate",["UploadDataUrl","$q","$timeout",function(a,b,c){function d(a){var b="",c=[];if(a.length>2&&"/"===a[0]&&"/"===a[a.length-1])b=a.substring(1,a.length-1);else{var e=a.split(",");if(e.length>1)for(var f=0;f|:\\-]","g"),"\\$&")+"$",b=b.replace(/\\\*/g,".*").replace(/\\\?/g,"."))}return{regexp:b,excludes:c}}function e(a,b){null==b||a.$dirty||(a.$setDirty?a.$setDirty():a.$dirty=!0)}var f=a;return f.validatePattern=function(a,b){if(!b)return!0;var c=d(b),e=!0;if(c.regexp&&c.regexp.length){var f=new RegExp(c.regexp,"i");e=null!=a.type&&f.test(a.type)||null!=a.name&&f.test(a.name)}for(var g=c.excludes.length;g--;){var h=new RegExp(c.excludes[g],"i");e=e&&(null==a.type||h.test(a.type))&&(null==a.name||h.test(a.name))}return e},f.ratioToFloat=function(a){var b=a.toString(),c=b.search(/[x:]/i);return b=c>-1?parseFloat(b.substring(0,c))/parseFloat(b.substring(c+1)):parseFloat(b)},f.registerModelChangeValidator=function(a,b,c){a&&a.$formatters.push(function(d){a.$dirty&&(d&&!angular.isArray(d)&&(d=[d]),f.validate(d,d?d.length:0,a,b,c).then(function(){f.applyModelValidation(a,d)}))})},f.applyModelValidation=function(a,b){e(a,b),angular.forEach(a.$ngfValidations,function(b){a.$setValidity(b.name,b.valid)})},f.getValidationAttr=function(a,b,c,d,e){var g="ngf"+c[0].toUpperCase()+c.substr(1),h=f.attrGetter(g,a,b,{$file:e});if(null==h&&(h=f.attrGetter("ngfValidate",a,b,{$file:e}))){var i=(d||c).split(".");h=h[i[0]],i.length>1&&(h=h&&h[i[1]])}return h},f.validate=function(a,c,d,e,g){function h(b,c,h){if(a){for(var i=a.length,j=null;i--;){var k=a[i];if(k){var l=f.getValidationAttr(e,g,b,c,k);null!=l&&(h(k,l)||(k.$error=b,(k.$errorMessages=k.$errorMessages||{}).name=!0,k.$errorParam=l,a.splice(i,1),j=!1))}}null!==j&&d.$ngfValidations.push({name:b,valid:j})}}function i(c,h,i,k,l){function m(a,b,d){null!=d?k(b,d).then(function(e){l(e,d)?a.resolve():(b.$error=c,(b.$errorMessages=b.$errorMessages||{}).name=!0,b.$errorParam=d,a.reject())},function(){j("ngfValidateForce",{$file:b})?(b.$error=c,(b.$errorMessages=b.$errorMessages||{}).name=!0,b.$errorParam=d,a.reject()):a.resolve()}):a.resolve()}var n=[f.emptyPromise()];return a?(a=void 0===a.length?[a]:a,angular.forEach(a,function(a){var d=b.defer();return n.push(d.promise),!i||null!=a.type&&0===a.type.search(i)?void("dimensions"===c&&null!=f.attrGetter("ngfDimensions",e)?f.imageDimensions(a).then(function(b){m(d,a,j("ngfDimensions",{$file:a,$width:b.width,$height:b.height}))},function(){d.reject()}):"duration"===c&&null!=f.attrGetter("ngfDuration",e)?f.mediaDuration(a).then(function(b){m(d,a,j("ngfDuration",{$file:a,$duration:b}))},function(){d.reject()}):m(d,a,f.getValidationAttr(e,g,c,h,a))):void d.resolve()}),b.all(n).then(function(){d.$ngfValidations.push({name:c,valid:!0})},function(){d.$ngfValidations.push({name:c,valid:!1})})):void 0}d=d||{},d.$ngfValidations=d.$ngfValidations||[],angular.forEach(d.$ngfValidations,function(a){a.valid=!0});var j=function(a,b){return f.attrGetter(a,e,g,b)};if(null==a||0===a.length)return f.emptyPromise(d);a=void 0===a.length?[a]:a.slice(0),h("maxFiles",null,function(a,b){return b>=c}),h("pattern",null,f.validatePattern),h("minSize","size.min",function(a,b){return a.size+.1>=f.translateScalars(b)}),h("maxSize","size.max",function(a,b){return a.size-.1<=f.translateScalars(b)});var k=0;if(h("maxTotalSize",null,function(b,c){return k+=b.size,k>f.translateScalars(c)?(a.splice(0,a.length),!1):!0}),h("validateFn",null,function(a,b){return b===!0||null===b||""===b}),!a.length)return f.emptyPromise(d,d.$ngfValidations);var l=b.defer(),m=[];return m.push(f.happyPromise(i("maxHeight","height.max",/image/,this.imageDimensions,function(a,b){return a.height<=b}))),m.push(f.happyPromise(i("minHeight","height.min",/image/,this.imageDimensions,function(a,b){return a.height>=b}))),m.push(f.happyPromise(i("maxWidth","width.max",/image/,this.imageDimensions,function(a,b){return a.width<=b}))),m.push(f.happyPromise(i("minWidth","width.min",/image/,this.imageDimensions,function(a,b){return a.width>=b}))),m.push(f.happyPromise(i("dimensions",null,/image/,function(a,b){return f.emptyPromise(b)},function(a){return a}))),m.push(f.happyPromise(i("ratio",null,/image/,this.imageDimensions,function(a,b){for(var c=b.toString().split(","),d=!1,e=0;e-1e-4}))),m.push(f.happyPromise(i("maxDuration","duration.max",/audio|video/,this.mediaDuration,function(a,b){return a<=f.translateScalars(b)}))),m.push(f.happyPromise(i("minDuration","duration.min",/audio|video/,this.mediaDuration,function(a,b){return a>=f.translateScalars(b)}))),m.push(f.happyPromise(i("duration",null,/audio|video/,function(a,b){return f.emptyPromise(b)},function(a){return a}))),m.push(f.happyPromise(i("validateAsyncFn",null,null,function(a,b){return b},function(a){return a===!0||null===a||""===a}))),b.all(m).then(function(){l.resolve(d,d.$ngfValidations)})},f.imageDimensions=function(a){if(a.$ngfWidth&&a.$ngfHeight){var d=b.defer();return c(function(){d.resolve({width:a.$ngfWidth,height:a.$ngfHeight})}),d.promise}if(a.$ngfDimensionPromise)return a.$ngfDimensionPromise;var e=b.defer();return c(function(){return 0!==a.type.indexOf("image")?void e.reject("not image"):void f.dataUrl(a).then(function(b){function d(){var b=h[0].clientWidth,c=h[0].clientHeight;h.remove(),a.$ngfWidth=b,a.$ngfHeight=c,e.resolve({width:b,height:c})}function f(){h.remove(),e.reject("load error")}function g(){c(function(){h[0].parentNode&&(h[0].clientWidth?d():i>10?f():g())},1e3)}var h=angular.element("").attr("src",b).css("visibility","hidden").css("position","fixed");h.on("load",d),h.on("error",f);var i=0;g(),angular.element(document.getElementsByTagName("body")[0]).append(h)},function(){e.reject("load error")})}),a.$ngfDimensionPromise=e.promise,a.$ngfDimensionPromise["finally"](function(){delete a.$ngfDimensionPromise}),a.$ngfDimensionPromise},f.mediaDuration=function(a){if(a.$ngfDuration){var d=b.defer();return c(function(){d.resolve(a.$ngfDuration)}),d.promise}if(a.$ngfDurationPromise)return a.$ngfDurationPromise;var e=b.defer();return c(function(){return 0!==a.type.indexOf("audio")&&0!==a.type.indexOf("video")?void e.reject("not media"):void f.dataUrl(a).then(function(b){function d(){var b=h[0].duration;a.$ngfDuration=b,h.remove(),e.resolve(b)}function f(){h.remove(),e.reject("load error")}function g(){c(function(){h[0].parentNode&&(h[0].duration?d():i>10?f():g())},1e3)}var h=angular.element(0===a.type.indexOf("audio")?"