1620: Admission 3

This commit is contained in:
sriramv 2019-01-23 11:17:50 +05:30
parent c2c41ba1a2
commit e287bbc937

View File

@ -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
});
}
////