From 9067637d4d6dfb54959ebfa906fb3cf1fdcc9946 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Wed, 22 Aug 2018 10:53:56 +0530 Subject: [PATCH] drop down issues in report --- .../js/controllers/report_ans_bookletCtrl.js | 13 ++++++++++ .../js/controllers/report_app_pendingCtrl.js | 14 ++++++++++ .../js/controllers/report_balfeeCtrl.js | 13 ++++++++++ .../js/controllers/report_doc_pendingCtrl.js | 14 ++++++++++ .../js/controllers/report_examfeeCtrl.js | 13 ++++++++++ .../report_markcard_certificateCtrl.js | 26 ------------------- .../controllers/report_waiver_referalCtrl.js | 12 +++++++++ 7 files changed, 79 insertions(+), 26 deletions(-) diff --git a/Apollo/assets/js/controllers/report_ans_bookletCtrl.js b/Apollo/assets/js/controllers/report_ans_bookletCtrl.js index 1f0e9b59..21ed7cad 100755 --- a/Apollo/assets/js/controllers/report_ans_bookletCtrl.js +++ b/Apollo/assets/js/controllers/report_ans_bookletCtrl.js @@ -82,6 +82,19 @@ app.controller('report_ans_bookletCtrl', ["$scope", "$filter","$rootScope","$mod } }); } + //For batch dropdown + $scope.$watch('univModel.university', function (newValue,oldValue) { + if(newValue==undefined || newValue==''){ + $scope.filterBatchDetails=""; + console.log($scope.filterBatchDetails); + } + else{ + if(angular.isString(newValue)){ + $scope.filterBatchDetails=angular.fromJson(newValue); + } + } + + }); $scope.show = false; $scope.onSubmit = function (form) { var firstError = null; diff --git a/Apollo/assets/js/controllers/report_app_pendingCtrl.js b/Apollo/assets/js/controllers/report_app_pendingCtrl.js index 4a860046..8d68f3e1 100755 --- a/Apollo/assets/js/controllers/report_app_pendingCtrl.js +++ b/Apollo/assets/js/controllers/report_app_pendingCtrl.js @@ -82,6 +82,20 @@ app.controller('report_app_pendingCtrl', ["$scope", "$filter","$rootScope","$mod } }); } + //For batch dropdown + $scope.$watch('univModel.university', function (newValue,oldValue) { + if(newValue==undefined || newValue==''){ + $scope.filterBatchDetails=""; + console.log($scope.filterBatchDetails); + } + else{ + if(angular.isString(newValue)){ + $scope.filterBatchDetails=angular.fromJson(newValue); + } + } + + }); + //Response data $scope.show = false; $scope.onSubmit = function (form) { var firstError = null; diff --git a/Apollo/assets/js/controllers/report_balfeeCtrl.js b/Apollo/assets/js/controllers/report_balfeeCtrl.js index 01ed7ef8..f8a92377 100755 --- a/Apollo/assets/js/controllers/report_balfeeCtrl.js +++ b/Apollo/assets/js/controllers/report_balfeeCtrl.js @@ -90,6 +90,19 @@ app.controller('report_balfeeCtrl', ["$scope", "$filter","$rootScope","$modal", } }); } + //For batch dropdown + $scope.$watch('univModel.university', function (newValue,oldValue) { + if(newValue==undefined || newValue==''){ + $scope.filterBatchDetails=""; + console.log($scope.filterBatchDetails); + } + else{ + if(angular.isString(newValue)){ + $scope.filterBatchDetails=angular.fromJson(newValue); + } + } + + }); // response data $scope.show = false; $scope.returnResultData = []; diff --git a/Apollo/assets/js/controllers/report_doc_pendingCtrl.js b/Apollo/assets/js/controllers/report_doc_pendingCtrl.js index 13e268ad..b1b0906e 100755 --- a/Apollo/assets/js/controllers/report_doc_pendingCtrl.js +++ b/Apollo/assets/js/controllers/report_doc_pendingCtrl.js @@ -82,6 +82,20 @@ app.controller('report_doc_pendingCtrl', ["$scope", "$filter","$rootScope","$mod } }); } + //For batch dropdown + $scope.$watch('univModel.university', function (newValue,oldValue) { + if(newValue==undefined || newValue==''){ + $scope.filterBatchDetails=""; + console.log($scope.filterBatchDetails); + } + else{ + if(angular.isString(newValue)){ + $scope.filterBatchDetails=angular.fromJson(newValue); + } + } + + }); + //Response data $scope.show = false; $scope.onSubmit = function (form) { diff --git a/Apollo/assets/js/controllers/report_examfeeCtrl.js b/Apollo/assets/js/controllers/report_examfeeCtrl.js index 66bca916..a66e6e88 100755 --- a/Apollo/assets/js/controllers/report_examfeeCtrl.js +++ b/Apollo/assets/js/controllers/report_examfeeCtrl.js @@ -82,6 +82,19 @@ app.controller('report_examfeeCtrl', ["$scope", "$filter","$rootScope","$modal", } }); } + //For batch dropdown + $scope.$watch('univModel.university', function (newValue,oldValue) { + if(newValue==undefined || newValue==''){ + $scope.filterBatchDetails=""; + console.log($scope.filterBatchDetails); + } + else{ + if(angular.isString(newValue)){ + $scope.filterBatchDetails=angular.fromJson(newValue); + } + } + + }); $scope.show = false; $scope.onSubmit = function (form) { diff --git a/Apollo/assets/js/controllers/report_markcard_certificateCtrl.js b/Apollo/assets/js/controllers/report_markcard_certificateCtrl.js index cd1bc23e..af4fe036 100755 --- a/Apollo/assets/js/controllers/report_markcard_certificateCtrl.js +++ b/Apollo/assets/js/controllers/report_markcard_certificateCtrl.js @@ -83,32 +83,6 @@ app.controller('report_markcard_certificateCtrl', ["$scope", "$filter","$rootSco } }); } - /* watch university model for bind batch objects*/ - - $scope.$watchCollection('univModel.university', function (newValue,oldValue) { - if(newValue==undefined || newValue==''){ - $scope.filterBatchDetails=""; - $scope.disableSubmit=true; - } - else{ - if(angular.isString(newValue)){ - $scope.filterBatchDetails=angular.fromJson(newValue); - $scope.disableSubmit=false; - } - } - - }); - // disable submit - $scope.$watchCollection('filters.from_date', function (newValue,oldValue) { - if(newValue==undefined || newValue=='' || newValue==null){ - $scope.disableSubmit=true; - } - else{ - $scope.disableSubmit=false; - - } - - }); $scope.onSubmit = function () { //alert($scope.batch.name); diff --git a/Apollo/assets/js/controllers/report_waiver_referalCtrl.js b/Apollo/assets/js/controllers/report_waiver_referalCtrl.js index d668ee2e..8d1ff908 100755 --- a/Apollo/assets/js/controllers/report_waiver_referalCtrl.js +++ b/Apollo/assets/js/controllers/report_waiver_referalCtrl.js @@ -49,7 +49,19 @@ app.controller('report_waiver_referalCtrl', ["$scope", "API_POINTS", "$http", "S } }); } + //For batch dropdown + $scope.$watch('univModel.university', function (newValue,oldValue) { + if(newValue==undefined || newValue==''){ + $scope.filterBatchDetails=""; + console.log($scope.filterBatchDetails); + } + else{ + if(angular.isString(newValue)){ + $scope.filterBatchDetails=angular.fromJson(newValue); + } + } + }); $scope.show = false; $scope.onSubmit = function (form) { var firstError = null;