diff --git a/Gruntfile.js b/Gruntfile.js index 9d7fe8c5c5..5f16949fc3 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -349,24 +349,19 @@ 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 +420,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/app/scripts/controllers/client/ViewClientController.js b/app/scripts/controllers/client/ViewClientController.js index ec4ec9c150..0635d2b161 100644 --- a/app/scripts/controllers/client/ViewClientController.js +++ b/app/scripts/controllers/client/ViewClientController.js @@ -282,7 +282,7 @@ scope.entitySubTypeFilter = function (datatable) { - if (datatable.entitySubType === scope.entitySubType) { + if (datatable.entitySubType.toLowerCase() === scope.entitySubType.toLowerCase()) { return true; } } diff --git a/app/scripts/controllers/product/CreateLoanProductController.js b/app/scripts/controllers/product/CreateLoanProductController.js index 2171dd9af2..fe0bdb95b5 100755 --- a/app/scripts/controllers/product/CreateLoanProductController.js +++ b/app/scripts/controllers/product/CreateLoanProductController.js @@ -64,7 +64,7 @@ scope.formData.amortizationType = scope.product.amortizationType.id; scope.formData.interestType = scope.product.interestType.id; scope.formData.interestCalculationPeriodType = scope.product.interestCalculationPeriodType.id; - scope.formData.transactionProcessingStrategyId = scope.product.transactionProcessingStrategyOptions[0].id; + scope.formData.transactionProcessingStrategyCode = scope.product.transactionProcessingStrategyOptions[0].code; scope.formData.principalVariationsForBorrowerCycle = scope.product.principalVariationsForBorrowerCycle; scope.formData.interestRateVariationsForBorrowerCycle = scope.product.interestRateVariationsForBorrowerCycle; scope.formData.numberOfRepaymentVariationsForBorrowerCycle = scope.product.numberOfRepaymentVariationsForBorrowerCycle; @@ -360,7 +360,7 @@ scope.selectedConfigurableAttributes = {amortizationType:scope.amortization, interestType:scope.interestMethod, - transactionProcessingStrategyId:scope.transactionProcessingStrategy, + transactionProcessingStrategyCode:scope.transactionProcessingStrategy, interestCalculationPeriodType:scope.interestCalcPeriod, inArrearsTolerance:scope.arrearsTolerance, repaymentEvery:scope.repaymentFrequency, @@ -377,6 +377,7 @@ this.formData.startDate = reqFirstDate; this.formData.closeDate = reqSecondDate; this.formData.rates = scope.rates; + this.formData.transactionProcessingStrategyCode = scope.formData.transactionProcessingStrategyCode; //Interest recalculation data if (this.formData.isInterestRecalculationEnabled) { diff --git a/app/scripts/controllers/product/EditLoanProductController.js b/app/scripts/controllers/product/EditLoanProductController.js index 6d8e7a283c..b9c54d5017 100755 --- a/app/scripts/controllers/product/EditLoanProductController.js +++ b/app/scripts/controllers/product/EditLoanProductController.js @@ -77,7 +77,7 @@ interestCalculationPeriodType: scope.product.interestCalculationPeriodType.id, allowPartialPeriodInterestCalcualtion:scope.product.allowPartialPeriodInterestCalcualtion, inArrearsTolerance: scope.product.inArrearsTolerance, - transactionProcessingStrategyId: scope.product.transactionProcessingStrategyId, + transactionProcessingStrategyCode: scope.product.transactionProcessingStrategyCode, graceOnPrincipalPayment: scope.product.graceOnPrincipalPayment, graceOnInterestPayment: scope.product.graceOnInterestPayment, graceOnInterestCharged: scope.product.graceOnInterestCharged, @@ -143,7 +143,7 @@ scope.interestMethod = scope.product.allowAttributeOverrides.interestType; scope.graceOnPrincipalAndInterest = scope.product.allowAttributeOverrides.graceOnPrincipalAndInterestPayment; scope.repaymentFrequency = scope.product.allowAttributeOverrides.repaymentEvery; - scope.transactionProcessingStrategy = scope.product.allowAttributeOverrides.transactionProcessingStrategyId; + scope.transactionProcessingStrategy = scope.product.allowAttributeOverrides.transactionProcessingStrategyCode; } if(scope.amortization || scope.arrearsTolerance || scope.graceOnArrearsAgeing || scope.interestCalcPeriod || scope.interestMethod || scope.graceOnPrincipalAndInterest || @@ -512,7 +512,7 @@ scope.selectedConfigurableAttributes = {amortizationType:scope.amortization, interestType:scope.interestMethod, - transactionProcessingStrategyId:scope.transactionProcessingStrategy, + transactionProcessingStrategyCode:scope.transactionProcessingStrategy, interestCalculationPeriodType:scope.interestCalcPeriod, inArrearsTolerance:scope.arrearsTolerance, repaymentEvery:scope.repaymentFrequency, diff --git a/app/views/products/createloanproduct.html b/app/views/products/createloanproduct.html index 0c86d612b2..8151aa3b24 100755 --- a/app/views/products/createloanproduct.html +++ b/app/views/products/createloanproduct.html @@ -698,11 +698,11 @@
- + ng-options="transactionProcessingStrategy.code as transactionProcessingStrategy.name for transactionProcessingStrategy in product.transactionProcessingStrategyOptions" + ng-change = "loanproduct.transactionProcessingStrategy.name = formValue(product.transactionProcessingStrategyOptions,formData.transactionProcessingStrategyCode,'code','name')" + value="{{transactionProcessingStrategy.code}}">
diff --git a/app/views/products/editloanproduct.html b/app/views/products/editloanproduct.html index c100540af7..3f792f9671 100755 --- a/app/views/products/editloanproduct.html +++ b/app/views/products/editloanproduct.html @@ -549,10 +549,10 @@

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

class="required">*
-