study material status update batch date desc order list changes
This commit is contained in:
parent
5a1c2ffc53
commit
67f5c02f0b
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
/*** controller for Wizard Form example***/
|
||||
app.controller('studyMaterialStatusCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',
|
||||
function ($scope, toaster, $filter, ngTableParams, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) {
|
||||
app.controller('studyMaterialStatusCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window', "dateListDescService",
|
||||
function ($scope, toaster, $filter, ngTableParams, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
|
||||
|
||||
/**
|
||||
* Study material status update search
|
||||
@ -106,6 +106,13 @@ app.controller('studyMaterialStatusCtrl', ["$scope", "toaster", "$filter", "ngTa
|
||||
$scope.searchData.Batch = '';
|
||||
$scope.courseData = name.Course;
|
||||
$scope.batchData = name.Batch;
|
||||
//call service for array list in desc order based on date
|
||||
angular.forEach($scope.batchData,function (values,key) {
|
||||
var parts = values.BatchDate.split("-");
|
||||
values.givenDateObject=new Date(parts[2], parts[1] - 1, parts[0]);
|
||||
});
|
||||
$scope.batchData=dateListDescService.getOrderByList($scope.batchData);
|
||||
// end
|
||||
$scope.OpenWindowStatus = false;
|
||||
$scope.getSearch();
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user