From 644d5cedc6d2039aa30d1cd53378f46ce3685a80 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 26 May 2018 14:21:42 +0530 Subject: [PATCH] batch list in decs order changes --- Apollo/assets/js/controllers/certificationStatusCtrl.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Apollo/assets/js/controllers/certificationStatusCtrl.js b/Apollo/assets/js/controllers/certificationStatusCtrl.js index 51dc8e99..3f3871aa 100755 --- a/Apollo/assets/js/controllers/certificationStatusCtrl.js +++ b/Apollo/assets/js/controllers/certificationStatusCtrl.js @@ -1,6 +1,6 @@ 'use strict'; /*** controller for Wizard Form example***/ -app.controller('certificationStatusCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', function ($scope, toaster, $filter, ngTableParams, apiPoint, $http, SweetAlert, $state, md5, ipCookie) { +app.controller('certificationStatusCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', 'dateListDescService', function ($scope, toaster, $filter, ngTableParams, apiPoint, $http, SweetAlert, $state, md5, ipCookie, dateListDescService) { /** * Certification status update search / Mark card status update @@ -131,6 +131,13 @@ app.controller('certificationStatusCtrl', ["$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(); };