diff --git a/Apollo/assets/js/controllers/report_certificateCtrl.js b/Apollo/assets/js/controllers/report_certificateCtrl.js index e3ca57f2..ab4cd9c0 100755 --- a/Apollo/assets/js/controllers/report_certificateCtrl.js +++ b/Apollo/assets/js/controllers/report_certificateCtrl.js @@ -2,7 +2,6 @@ /*** controller***/ app.controller('report_certificateCtrl', ["$scope", "$filter","$rootScope","$modal", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService", function ($scope, $filter,$rootScope,$modal, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) { - /* * auto call tracking */ @@ -83,6 +82,32 @@ app.controller('report_certificateCtrl', ["$scope", "$filter","$rootScope","$mod } }); } + /* 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_markcard_statusCtrl.js b/Apollo/assets/js/controllers/report_markcard_statusCtrl.js index 7792ce41..93bf760d 100755 --- a/Apollo/assets/js/controllers/report_markcard_statusCtrl.js +++ b/Apollo/assets/js/controllers/report_markcard_statusCtrl.js @@ -2,7 +2,6 @@ /*** controller***/ app.controller('report_markcard_statusCtrl', ["$scope", "$filter","$rootScope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService","$modal", function ($scope, $filter,$rootScope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService,$modal,$log) { - /** * auto call tracking */ @@ -47,7 +46,7 @@ app.controller('report_markcard_statusCtrl', ["$scope", "$filter","$rootScope", }; $scope.filters = function () { - var filterlist = { + var filterlist = { method: 'POST', url: apiPoint.url + 'report_filters/', headers: { @@ -82,6 +81,19 @@ app.controller('report_markcard_statusCtrl', ["$scope", "$filter","$rootScope", } }); } + /* watch university model for bind batch objects*/ + + $scope.$watch('univModel.university', function (newValue,oldValue) { + if(newValue==undefined || newValue==''){ + $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_study_material_statusCtrl.js b/Apollo/assets/js/controllers/report_study_material_statusCtrl.js index 3172f0e0..ff76c9af 100755 --- a/Apollo/assets/js/controllers/report_study_material_statusCtrl.js +++ b/Apollo/assets/js/controllers/report_study_material_statusCtrl.js @@ -71,7 +71,20 @@ app.controller('report_study_material_statusCtrl', ["$scope", "$filter","$rootSc } else { } }); - } + } + /* watch university model for bind batch objects*/ + + $scope.$watch('univModel.university', function (newValue,oldValue) { + if(newValue==undefined || newValue==''){ + $scope.filterBatchDetails=""; + } + else{ + if(angular.isString(newValue)){ + $scope.filterBatchDetails=angular.fromJson(newValue); + } + } + + }); $scope.show = false; diff --git a/Apollo/assets/views/report_certificate_status.html b/Apollo/assets/views/report_certificate_status.html index 14a8818b..0a235be4 100755 --- a/Apollo/assets/views/report_certificate_status.html +++ b/Apollo/assets/views/report_certificate_status.html @@ -35,24 +35,32 @@ td,th {