Report-Dropdown batch_code fixes
This commit is contained in:
parent
2f6f169c52
commit
5d5f1f84ca
@ -64,12 +64,12 @@ left join (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,Enrollmen
|
|||||||
|
|
||||||
}
|
}
|
||||||
public function filters($br){
|
public function filters($br){
|
||||||
$sql = "SELECT distinct BatchCode as batchcode,BatchName as batch FROM T_BatchMaster
|
$sql = "SELECT distinct BatchCode as batchcode,BatchName as batch,BatchDate FROM T_BatchMaster
|
||||||
where BranchCode = '".$br."'";
|
where BranchCode = '".$br."'";
|
||||||
$b=$this->db->query($sql);
|
$b=$this->db->query($sql);
|
||||||
$batch = $b->result();
|
$batch = $b->result();
|
||||||
if (count($batch) > 0) {
|
if (count($batch) > 0) {
|
||||||
$results['batchlist'] = true;
|
$results['batchlist'] = true;
|
||||||
$results['batch'] = $batch;
|
$results['batch'] = $batch;
|
||||||
} else {
|
} else {
|
||||||
$results['batchlist'] = false;
|
$results['batchlist'] = false;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
/**
|
/**
|
||||||
* controllers for ng-table
|
* controllers for ng-table
|
||||||
* Simple table with sorting and filtering on AngularJS
|
* Simple table with sorting and filtering on AngularJS
|
||||||
*/
|
*/
|
||||||
app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", "installmentService", "SweetAlert", "dateListDescService", function ($scope,$rootScope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state,installmentService,SweetAlert,dateListDescService) {
|
app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", "installmentService", "SweetAlert", "dateListDescService", function ($scope,$rootScope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state,installmentService,SweetAlert,dateListDescService) {
|
||||||
$scope.myModel = {
|
$scope.myModel = {
|
||||||
@ -830,7 +830,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
|||||||
$scope.setModel = {
|
$scope.setModel = {
|
||||||
"feesType": $scope.feesStructureInfo[0],
|
"feesType": $scope.feesStructureInfo[0],
|
||||||
};
|
};
|
||||||
angular.forEach($scope.feesStructureInfo[0].batchDetails,function (values,key) {
|
angular.forEach($scope.feesStructureInfo[0].batchDetails,function (values,key) {
|
||||||
var parts = values.BatchDate.split("-");
|
var parts = values.BatchDate.split("-");
|
||||||
$scope.BatchDetails.push({
|
$scope.BatchDetails.push({
|
||||||
"BatchCode":values.BatchCode,
|
"BatchCode":values.BatchCode,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
/*** controller***/
|
/*** controller***/
|
||||||
app.controller('report_ans_bookletCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',
|
app.controller('report_ans_bookletCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
|
||||||
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) {
|
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
|
||||||
|
|
||||||
// DataTables configurable options
|
// DataTables configurable options
|
||||||
|
|
||||||
@ -29,9 +29,21 @@ app.controller('report_ans_bookletCtrl', ["$scope", "API_POINTS", "$http", "Swee
|
|||||||
};
|
};
|
||||||
$http(filterlist).then(function (response) {
|
$http(filterlist).then(function (response) {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
$scope.batch = response.data.batch;
|
$scope.batch=[];
|
||||||
$scope.branch = response.data.branch;
|
$scope.batchlist = response.data.batch;
|
||||||
$scope.university = response.data.university;
|
$scope.university = response.data.university;
|
||||||
|
//Desc order Batchlist
|
||||||
|
angular.forEach($scope.batchlist,function (values,key) {
|
||||||
|
var parts = values.BatchDate.split("-");
|
||||||
|
$scope.batch.push({
|
||||||
|
"batchcode":values.batchcode,
|
||||||
|
"batch":values.batch + '('+ values.batchcode + ')',
|
||||||
|
"BatchDate":values.BatchDate,
|
||||||
|
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
|
||||||
|
})
|
||||||
|
});
|
||||||
|
// call service for make a list in desc order based on date
|
||||||
|
$scope.batch=dateListDescService.getOrderByList($scope.batch);
|
||||||
//console.log($scope.branch);
|
//console.log($scope.branch);
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
/*** controller***/
|
/*** controller***/
|
||||||
app.controller('report_app_pendingCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',
|
app.controller('report_app_pendingCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
|
||||||
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) {
|
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
|
||||||
|
|
||||||
// DataTables configurable options
|
// DataTables configurable options
|
||||||
|
|
||||||
@ -29,9 +29,21 @@ app.controller('report_app_pendingCtrl', ["$scope", "API_POINTS", "$http", "Swee
|
|||||||
};
|
};
|
||||||
$http(filterlist).then(function (response) {
|
$http(filterlist).then(function (response) {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
$scope.batch = response.data.batch;
|
$scope.batch=[];
|
||||||
$scope.branch = response.data.branch;
|
$scope.batchlist = response.data.batch;
|
||||||
$scope.university = response.data.university;
|
$scope.university = response.data.university;
|
||||||
|
//Desc order Batchlist
|
||||||
|
angular.forEach($scope.batchlist,function (values,key) {
|
||||||
|
var parts = values.BatchDate.split("-");
|
||||||
|
$scope.batch.push({
|
||||||
|
"batchcode":values.batchcode,
|
||||||
|
"batch":values.batch + '('+ values.batchcode + ')',
|
||||||
|
"BatchDate":values.BatchDate,
|
||||||
|
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
|
||||||
|
})
|
||||||
|
});
|
||||||
|
// call service for make a list in desc order based on date
|
||||||
|
$scope.batch=dateListDescService.getOrderByList($scope.batch);
|
||||||
//console.log($scope.branch);
|
//console.log($scope.branch);
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
/*** controller***/
|
/*** controller***/
|
||||||
app.controller('report_balfeeCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',
|
app.controller('report_balfeeCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
|
||||||
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) {
|
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
|
||||||
|
|
||||||
// to generate serial number
|
// to generate serial number
|
||||||
$scope.currentPage=1;
|
$scope.currentPage=1;
|
||||||
@ -37,9 +37,21 @@ app.controller('report_balfeeCtrl', ["$scope", "API_POINTS", "$http", "SweetAler
|
|||||||
};
|
};
|
||||||
$http(filterlist).then(function (response) {
|
$http(filterlist).then(function (response) {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
$scope.batch = response.data.batch;
|
$scope.batch=[];
|
||||||
$scope.branch = response.data.branch;
|
$scope.batchlist = response.data.batch;
|
||||||
$scope.university = response.data.university;
|
$scope.university = response.data.university;
|
||||||
|
//Desc order Batchlist
|
||||||
|
angular.forEach($scope.batchlist,function (values,key) {
|
||||||
|
var parts = values.BatchDate.split("-");
|
||||||
|
$scope.batch.push({
|
||||||
|
"batchcode":values.batchcode,
|
||||||
|
"batch":values.batch + '('+ values.batchcode + ')',
|
||||||
|
"BatchDate":values.BatchDate,
|
||||||
|
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
|
||||||
|
})
|
||||||
|
});
|
||||||
|
// call service for make a list in desc order based on date
|
||||||
|
$scope.batch=dateListDescService.getOrderByList($scope.batch);
|
||||||
//console.log($scope.branch);
|
//console.log($scope.branch);
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
/*** controller***/
|
/*** controller***/
|
||||||
app.controller('report_certificateCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',
|
app.controller('report_certificateCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
|
||||||
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) {
|
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
|
||||||
|
|
||||||
// DataTables configurable options
|
// DataTables configurable options
|
||||||
|
|
||||||
@ -28,9 +28,21 @@ app.controller('report_certificateCtrl', ["$scope", "API_POINTS", "$http", "Swee
|
|||||||
};
|
};
|
||||||
$http(filterlist).then(function (response) {
|
$http(filterlist).then(function (response) {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
$scope.batch = response.data.batch;
|
$scope.batch=[];
|
||||||
$scope.branch = response.data.branch;
|
$scope.batchlist = response.data.batch;
|
||||||
$scope.university = response.data.university;
|
$scope.university = response.data.university;
|
||||||
|
//Desc order Batchlist
|
||||||
|
angular.forEach($scope.batchlist,function (values,key) {
|
||||||
|
var parts = values.BatchDate.split("-");
|
||||||
|
$scope.batch.push({
|
||||||
|
"batchcode":values.batchcode,
|
||||||
|
"batch":values.batch + '('+ values.batchcode + ')',
|
||||||
|
"BatchDate":values.BatchDate,
|
||||||
|
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
|
||||||
|
})
|
||||||
|
});
|
||||||
|
// call service for make a list in desc order based on date
|
||||||
|
$scope.batch=dateListDescService.getOrderByList($scope.batch);
|
||||||
//console.log($scope.branch);
|
//console.log($scope.branch);
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
/*** controller***/
|
/*** controller***/
|
||||||
app.controller('report_doc_pendingCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',
|
app.controller('report_doc_pendingCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
|
||||||
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) {
|
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
|
||||||
|
|
||||||
// DataTables configurable options
|
// DataTables configurable options
|
||||||
|
|
||||||
@ -29,9 +29,21 @@ app.controller('report_doc_pendingCtrl', ["$scope", "API_POINTS", "$http", "Swee
|
|||||||
};
|
};
|
||||||
$http(filterlist).then(function (response) {
|
$http(filterlist).then(function (response) {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
$scope.batch = response.data.batch;
|
$scope.batch=[];
|
||||||
$scope.branch = response.data.branch;
|
$scope.batchlist = response.data.batch;
|
||||||
$scope.university = response.data.university;
|
$scope.university = response.data.university;
|
||||||
|
//Desc order Batchlist
|
||||||
|
angular.forEach($scope.batchlist,function (values,key) {
|
||||||
|
var parts = values.BatchDate.split("-");
|
||||||
|
$scope.batch.push({
|
||||||
|
"batchcode":values.batchcode,
|
||||||
|
"batch":values.batch + '('+ values.batchcode + ')',
|
||||||
|
"BatchDate":values.BatchDate,
|
||||||
|
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
|
||||||
|
})
|
||||||
|
});
|
||||||
|
// call service for make a list in desc order based on date
|
||||||
|
$scope.batch=dateListDescService.getOrderByList($scope.batch);
|
||||||
//console.log($scope.branch);
|
//console.log($scope.branch);
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
/*** controller***/
|
/*** controller***/
|
||||||
app.controller('report_examfeeCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',
|
app.controller('report_examfeeCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
|
||||||
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) {
|
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
|
||||||
|
|
||||||
// DataTables configurable options
|
// DataTables configurable options
|
||||||
|
|
||||||
@ -29,9 +29,21 @@ app.controller('report_examfeeCtrl', ["$scope", "API_POINTS", "$http", "SweetAle
|
|||||||
};
|
};
|
||||||
$http(filterlist).then(function (response) {
|
$http(filterlist).then(function (response) {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
$scope.batch = response.data.batch;
|
$scope.batch=[];
|
||||||
$scope.branch = response.data.branch;
|
$scope.batchlist = response.data.batch;
|
||||||
$scope.university = response.data.university;
|
$scope.university = response.data.university;
|
||||||
|
//Desc order Batchlist
|
||||||
|
angular.forEach($scope.batchlist,function (values,key) {
|
||||||
|
var parts = values.BatchDate.split("-");
|
||||||
|
$scope.batch.push({
|
||||||
|
"batchcode":values.batchcode,
|
||||||
|
"batch":values.batch + '('+ values.batchcode + ')',
|
||||||
|
"BatchDate":values.BatchDate,
|
||||||
|
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
|
||||||
|
})
|
||||||
|
});
|
||||||
|
// call service for make a list in desc order based on date
|
||||||
|
$scope.batch=dateListDescService.getOrderByList($scope.batch);
|
||||||
//console.log($scope.branch);
|
//console.log($scope.branch);
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
/*** controller***/
|
/*** controller***/
|
||||||
app.controller('report_expenseCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',
|
app.controller('report_expenseCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
|
||||||
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) {
|
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
|
||||||
|
|
||||||
// DataTables configurable options
|
// DataTables configurable options
|
||||||
|
|
||||||
@ -28,9 +28,21 @@ app.controller('report_expenseCtrl', ["$scope", "API_POINTS", "$http", "SweetAle
|
|||||||
};
|
};
|
||||||
$http(filterlist).then(function (response) {
|
$http(filterlist).then(function (response) {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
$scope.batch = response.data.batch;
|
$scope.batch=[];
|
||||||
$scope.branch = response.data.branch;
|
$scope.batchlist = response.data.batch;
|
||||||
$scope.university = response.data.university;
|
$scope.university = response.data.university;
|
||||||
|
//Desc order Batchlist
|
||||||
|
angular.forEach($scope.batchlist,function (values,key) {
|
||||||
|
var parts = values.BatchDate.split("-");
|
||||||
|
$scope.batch.push({
|
||||||
|
"batchcode":values.batchcode,
|
||||||
|
"batch":values.batch + '('+ values.batchcode + ')',
|
||||||
|
"BatchDate":values.BatchDate,
|
||||||
|
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
|
||||||
|
})
|
||||||
|
});
|
||||||
|
// call service for make a list in desc order based on date
|
||||||
|
$scope.batch=dateListDescService.getOrderByList($scope.batch);
|
||||||
//console.log($scope.branch);
|
//console.log($scope.branch);
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
/*** controller***/
|
/*** controller***/
|
||||||
app.controller('report_markcard_certificateCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',
|
app.controller('report_markcard_certificateCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
|
||||||
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) {
|
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
|
||||||
|
|
||||||
// DataTables configurable options
|
// DataTables configurable options
|
||||||
|
|
||||||
@ -30,9 +30,21 @@ app.controller('report_markcard_certificateCtrl', ["$scope", "API_POINTS", "$htt
|
|||||||
};
|
};
|
||||||
$http(filterlist).then(function (response) {
|
$http(filterlist).then(function (response) {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
$scope.batch = response.data.batch;
|
$scope.batch=[];
|
||||||
$scope.branch = response.data.branch;
|
$scope.batchlist = response.data.batch;
|
||||||
$scope.university = response.data.university;
|
$scope.university = response.data.university;
|
||||||
|
//Desc order Batchlist
|
||||||
|
angular.forEach($scope.batchlist,function (values,key) {
|
||||||
|
var parts = values.BatchDate.split("-");
|
||||||
|
$scope.batch.push({
|
||||||
|
"batchcode":values.batchcode,
|
||||||
|
"batch":values.batch + '('+ values.batchcode + ')',
|
||||||
|
"BatchDate":values.BatchDate,
|
||||||
|
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
|
||||||
|
})
|
||||||
|
});
|
||||||
|
// call service for make a list in desc order based on date
|
||||||
|
$scope.batch=dateListDescService.getOrderByList($scope.batch);
|
||||||
//console.log($scope.branch);
|
//console.log($scope.branch);
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
/*** controller***/
|
/*** controller***/
|
||||||
app.controller('report_markcard_statusCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',
|
app.controller('report_markcard_statusCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
|
||||||
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) {
|
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
|
||||||
|
|
||||||
// DataTables configurable options
|
// DataTables configurable options
|
||||||
|
|
||||||
@ -28,10 +28,23 @@ app.controller('report_markcard_statusCtrl', ["$scope", "API_POINTS", "$http", "
|
|||||||
};
|
};
|
||||||
$http(filterlist).then(function (response) {
|
$http(filterlist).then(function (response) {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
$scope.batch = response.data.batch;
|
$scope.batch=[];
|
||||||
$scope.branch = response.data.branch;
|
$scope.batchlist = response.data.batch;
|
||||||
$scope.university = response.data.university;
|
$scope.university = response.data.university;
|
||||||
//console.log($scope.branch);
|
//Desc order Batchlist
|
||||||
|
angular.forEach($scope.batchlist,function (values,key) {
|
||||||
|
var parts = values.BatchDate.split("-");
|
||||||
|
$scope.batch.push({
|
||||||
|
"batchcode":values.batchcode,
|
||||||
|
"batch":values.batch + '('+ values.batchcode + ')',
|
||||||
|
"BatchDate":values.BatchDate,
|
||||||
|
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
|
||||||
|
})
|
||||||
|
});
|
||||||
|
// call service for make a list in desc order based on date
|
||||||
|
$scope.batch=dateListDescService.getOrderByList($scope.batch);
|
||||||
|
console.log(response.data.batch);
|
||||||
|
console.log($scope.batch);
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
/*** controller***/
|
/*** controller***/
|
||||||
app.controller('report_study_material_statusCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',
|
app.controller('report_study_material_statusCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
|
||||||
function ($scope,apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, DTOptionsBuilder, DTColumnBuilder) {
|
function ($scope,apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
|
||||||
|
|
||||||
// DataTables configurable options
|
// DataTables configurable options
|
||||||
|
|
||||||
|
|
||||||
$scope.filters = {
|
$scope.filters = {
|
||||||
"branch": "",
|
"branch": "",
|
||||||
"university": "",
|
"university": "",
|
||||||
@ -13,7 +13,7 @@ app.controller('report_study_material_statusCtrl', ["$scope", "API_POINTS", "$ht
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.filters = function () {
|
$scope.filters = function () {
|
||||||
var filterlist = {
|
var filterlist = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: apiPoint.url + 'report_filters/',
|
url: apiPoint.url + 'report_filters/',
|
||||||
@ -26,12 +26,25 @@ app.controller('report_study_material_statusCtrl', ["$scope", "API_POINTS", "$ht
|
|||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
$http(filterlist).then(function (response) {
|
$http(filterlist).then(function (response) {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
$scope.batch = response.data.batch;
|
$scope.batch=[];
|
||||||
$scope.branch = response.data.branch;
|
$scope.batchlist = response.data.batch;
|
||||||
$scope.university = response.data.university;
|
$scope.university = response.data.university;
|
||||||
//console.log($scope.branch);
|
//Desc order Batchlist
|
||||||
|
angular.forEach($scope.batchlist,function (values,key) {
|
||||||
|
var parts = values.BatchDate.split("-");
|
||||||
|
$scope.batch.push({
|
||||||
|
"batchcode":values.batchcode,
|
||||||
|
"batch":values.batch + '('+ values.batchcode + ')',
|
||||||
|
"BatchDate":values.BatchDate,
|
||||||
|
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
|
||||||
|
})
|
||||||
|
});
|
||||||
|
// call service for make a list in desc order based on date
|
||||||
|
$scope.batch=dateListDescService.getOrderByList($scope.batch);
|
||||||
|
// console.log(response.data.batch);
|
||||||
|
// console.log($scope.batch);
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
/*** controller***/
|
/*** controller***/
|
||||||
app.controller('report_waiver_referalCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',
|
app.controller('report_waiver_referalCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
|
||||||
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) {
|
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
|
||||||
|
|
||||||
// DataTables configurable options
|
// DataTables configurable options
|
||||||
|
|
||||||
@ -29,9 +29,21 @@ app.controller('report_waiver_referalCtrl', ["$scope", "API_POINTS", "$http", "S
|
|||||||
};
|
};
|
||||||
$http(filterlist).then(function (response) {
|
$http(filterlist).then(function (response) {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
$scope.batch = response.data.batch;
|
$scope.batch=[];
|
||||||
$scope.branch = response.data.branch;
|
$scope.batchlist = response.data.batch;
|
||||||
$scope.university = response.data.university;
|
$scope.university = response.data.university;
|
||||||
|
//Desc order Batchlist
|
||||||
|
angular.forEach($scope.batchlist,function (values,key) {
|
||||||
|
var parts = values.BatchDate.split("-");
|
||||||
|
$scope.batch.push({
|
||||||
|
"batchcode":values.batchcode,
|
||||||
|
"batch":values.batch + '('+ values.batchcode + ')',
|
||||||
|
"BatchDate":values.BatchDate,
|
||||||
|
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
|
||||||
|
})
|
||||||
|
});
|
||||||
|
// call service for make a list in desc order based on date
|
||||||
|
$scope.batch=dateListDescService.getOrderByList($scope.batch);
|
||||||
//console.log($scope.branch);
|
//console.log($scope.branch);
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
<select ui-select2 class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="filters" ng-model="filters.batch">
|
<select ui-select2 class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="filters" ng-model="filters.batch">
|
||||||
<option value="" selected>Select Batch</option>
|
<option value="" selected>Select Batch</option>
|
||||||
<option ng-repeat="b in batch" value="{{b.batchcode}}">{{b.batch}} </option>
|
<option ng-repeat="b in batch" value="{{b.batchcode}}">{{b.batch}} </option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="col-md-3">
|
<!-- <div class="col-md-3">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user