course details changes done

This commit is contained in:
gandhimathi 2018-01-23 18:20:53 +05:30
parent e89a663f9e
commit 3b7222fea8

View File

@ -6,6 +6,7 @@
app.controller('callTrackingCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", function ($scope,$rootScope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state) {
localStorage.setItem('searchName','');
localStorage.setItem('searchMobile','');
$scope.myModel = {
"studentName": "",
"mobileNumber": "",
@ -33,8 +34,27 @@ app.controller('callTrackingCtrl', ["$scope","$rootScope","toaster", "$filter",
$scope.modifyDate.add(30, 'days');
$scope.futureDate = $filter('date')($scope.modifyDate, 'dd-MM-yyyy');
$scope.myModel.date=$scope.currentDate;
$scope.myModel.search=$filter('date')(new Date(), 'yyyy-MM-dd');
$scope.myModel.searchDate=$scope.currentDate;
if(localStorage.getItem('searchObj') !='' && localStorage.getItem('searchObj') !=null && localStorage.getItem('searchObj') !=undefined){
$scope.myModel.search=JSON.parse(localStorage.getItem('searchObj')).fromDate;
$scope.myModel.searchDate=JSON.parse(localStorage.getItem('searchObj')).fromDate;
$scope.myModel.dateTo = JSON.parse(localStorage.getItem('searchObj')).toDate;
$scope.search2 = JSON.parse(localStorage.getItem('searchObj')).searchName;
$scope.search3 = {
"ActivityName" :JSON.parse(localStorage.getItem('searchObj')).serachActivity
};
$scope.search4 = { "Firstname": JSON.parse(localStorage.getItem('searchObj')).searchAssignTo
};
$scope.search5 = { "statusName" : JSON.parse(localStorage.getItem('searchObj')).searchStatus
};
localStorage.setItem('searchObj','');
}
else{
$scope.myModel.search=$filter('date')(new Date(), 'yyyy-MM-dd');
$scope.myModel.searchDate=$scope.currentDate;
}
$scope.toMinDate = $filter('date')($scope.modifyMinDate, 'MM-dd-yyyy');
@ -43,7 +63,7 @@ app.controller('callTrackingCtrl', ["$scope","$rootScope","toaster", "$filter",
$scope.myModel.search='';
$scope.toMinDate = '';
$scope.myModel.dateTo='';
$scope.myModel.dateTo='';
}
else{
if(type=='2'){
@ -153,7 +173,6 @@ app.controller('callTrackingCtrl', ["$scope","$rootScope","toaster", "$filter",
});
}
/*
* check to date while marking
@ -178,14 +197,16 @@ app.controller('callTrackingCtrl', ["$scope","$rootScope","toaster", "$filter",
* edit track details
* created by kms
* */
$scope.setEditId = function (p,search1,search2,search3,search4,search5) {
$scope.setEditId = function (p,search1,search2,search3,search4,search5,fromDate,toDate) {
$scope.searchData = {
"searchDate": search1,
"searchName": search2,
'serachActivity': search3,
'searchAssignTo': search4,
'searchStatus': search5,
'callFrom':"details"
'callFrom':"details",
"fromDate": fromDate,
"toDate": toDate,
}
localStorage.setItem('searchObj', JSON.stringify($scope.searchData));