diff --git a/Apollo/assets/js/controllers/studyMaterialStatusCtrl.js b/Apollo/assets/js/controllers/studyMaterialStatusCtrl.js index f24a2233..1fe1295d 100755 --- a/Apollo/assets/js/controllers/studyMaterialStatusCtrl.js +++ b/Apollo/assets/js/controllers/studyMaterialStatusCtrl.js @@ -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(); };