From eaed01de700ed05df47eb6e134ba8b3245dd7b19 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Tue, 21 Aug 2018 20:22:40 +0530 Subject: [PATCH] report changes --- .../js/controllers/report_certificateCtrl.js | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) 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);