From e287bbc937e8bf50396e9bed18d6207429b028a7 Mon Sep 17 00:00:00 2001 From: sriramv Date: Wed, 23 Jan 2019 11:17:50 +0530 Subject: [PATCH] 1620: Admission 3 --- Apollo/assets/js/controllers/dashboardCtrl.js | 145 +++++++++--------- 1 file changed, 72 insertions(+), 73 deletions(-) diff --git a/Apollo/assets/js/controllers/dashboardCtrl.js b/Apollo/assets/js/controllers/dashboardCtrl.js index bb1f3e86..c125583e 100755 --- a/Apollo/assets/js/controllers/dashboardCtrl.js +++ b/Apollo/assets/js/controllers/dashboardCtrl.js @@ -897,75 +897,75 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", " columns: ['TrackingId', 'name', 'mobileNo', 'course', 'university', 'activity', 'AssignTo', 'FollowUpDate', 'status'] }; //Admissions batch - // var AdmissionsBatch = { - // method: 'POST', - // url: apiPoint.url + 'admissionBatch/', - // headers: { - // 'Content-Type': 'application/json' - // }, - // data: { - // requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID, - // branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID, - // univ: $scope.filters.univ + var AdmissionsBatch = { + method: 'POST', + url: apiPoint.url + 'admissionBatch/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID, + branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID, + univ: $scope.filters.univ - // } - // }; - //var gridData = 0; - // $http(AdmissionsBatch).then(function (response) { - // console.log(response); - // if (response.data.lList == true) { - // $scope.fbselect = false; - // $scope.adBatch = response.data.l_data; - // for (var i = 0; i < $scope.adBatch.length; i++) - // $scope.adBatch[i].Sl_No = i + 1; - // // var gridData = $scope.adBatch; - // $scope.adb = false; - // //console.log($scope.adBatch); - // $scope.adBatchgrid = { + } + }; + var gridData = 0; + $http(AdmissionsBatch).then(function (response) { + console.log(response); + if (response.data.lList == true) { + $scope.fbselect = false; + $scope.adBatch = response.data.l_data; + for (var i = 0; i < $scope.adBatch.length; i++) + $scope.adBatch[i].Sl_No = i + 1; + var gridData = $scope.adBatch; + $scope.adb = false; + //console.log($scope.adBatch); + $scope.adBatchgrid = { - // allowSortingBySummary: true, - // allowSorting: true, - // allowFiltering: true, - // height: 440, - // showBorders: true, - // fieldChooser: { - // enabled: false + allowSortingBySummary: true, + allowSorting: true, + allowFiltering: true, + height: 440, + showBorders: true, + fieldChooser: { + enabled: false + }, + // scrolling: { + // mode: "virtual" // }, - // // scrolling: { - // // mode: "virtual" - // // }, - // "export": { - // enabled: true, - // fileName: "AdmissionsBatch" + "export": { + enabled: true, + fileName: "AdmissionsBatch" - // }, - // dataSource: { - // fields: [{ - // caption: "BatchName", - // width: 100, - // dataField: "BatchName", - // area: "row" - // }, - // { - // caption: "AdmittedBy", - // dataField: "AdmittedBy", - // area: "column" - // }, { - // caption: "count", - // dataField: "count", - // dataType: "number", - // //summaryType: "sum", - // width: 100, - // area: "data" - // }], - // store: $scope.adBatch - // } - // }; - // } else { - // $scope.adb = true; - // $scope.message = response.data.message; - // } - // }); + }, + dataSource: { + fields: [{ + caption: "BatchName", + width: 100, + dataField: "BatchName", + area: "row" + }, + { + caption: "AdmittedBy", + dataField: "AdmittedBy", + area: "column" + }, { + caption: "count", + dataField: "count", + dataType: "number", + //summaryType: "sum", + width: 100, + area: "data" + }], + store: $scope.adBatch + } + }; + } else { + $scope.adb = true; + $scope.message = response.data.message; + } + }); @@ -975,7 +975,7 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", " $scope.batchFilter = function () { - console.log('hi'); + //console.log('hi'); $scope.adBatchgrid1 = ''; //Admissions batch @@ -1005,7 +1005,7 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", " $scope.adBatchfilter = response.data.l_data; for (var i = 0; i < $scope.adBatchfilter.length; i++) $scope.adBatchfilter[i].Sl_No = i + 1; - // var gridData = $scope.adBatch; + var gridData = $scope.adBatch; $scope.adb = false; @@ -1056,7 +1056,7 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", " }; - // $scope.batchFilterClick(); + $scope.batchFilterClick(); } else { $scope.fbselect = false; @@ -1075,18 +1075,17 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", " }, { caption: "AdmittedBy", dataField: "AdmittedBy", - // dataType: "string", - // width: 200, - area: "column" + dataType: "string", + area: "column" }, { caption: "AdmittedBy", dataField: "AdmittedBy", dataType: "number", - summaryType: "sum", + //summaryType: "sum", // width: 100, area: "data" }], - // store: $scope.adBatchfilter + store: $scope.adBatchfilter }); } ////