course details changes done
This commit is contained in:
parent
77c5a61f45
commit
9ce39326d4
@ -47,7 +47,7 @@ app.controller('callTrackingCtrl', ["$scope","$rootScope","toaster", "$filter",
|
||||
|
||||
}
|
||||
/*
|
||||
* edit branch details
|
||||
* edit track details
|
||||
* created by kms
|
||||
* */
|
||||
$scope.setEditId = function (p,search1,search2,search3,search4,search5) {
|
||||
@ -56,7 +56,8 @@ app.controller('callTrackingCtrl', ["$scope","$rootScope","toaster", "$filter",
|
||||
"searchName": search2,
|
||||
'serachActivity': search3,
|
||||
'searchAssignTo': search4,
|
||||
'searchStatus': search5
|
||||
'searchStatus': search5,
|
||||
'callFrom':"details"
|
||||
}
|
||||
|
||||
localStorage.setItem('searchObj', JSON.stringify($scope.searchData));
|
||||
@ -69,11 +70,11 @@ app.controller('callTrackingCtrl', ["$scope","$rootScope","toaster", "$filter",
|
||||
$rootScope.myModel1.date=$rootScope.followupDetails.followupDetails[0].FollowupOn;*/
|
||||
|
||||
/* $scope.editId = pid;*/
|
||||
$state.go('app.trackingFollowup');
|
||||
$state.go('app.call.trackingFollowup');
|
||||
};
|
||||
|
||||
/*
|
||||
* Submit,update and reset branch details
|
||||
* Submit,update and reset track details
|
||||
* @params myModel
|
||||
* created by kms
|
||||
* */
|
||||
@ -300,6 +301,385 @@ app.controller('callTrackingCtrl', ["$scope","$rootScope","toaster", "$filter",
|
||||
|
||||
|
||||
|
||||
}]);
|
||||
|
||||
/*
|
||||
* lead controller
|
||||
* */
|
||||
app.controller('callTrackingLeadCtrl', ["$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 = {
|
||||
"leadDate": new Date(),
|
||||
};
|
||||
|
||||
|
||||
//get current date
|
||||
$scope.currentDate=$filter('date')(new Date(), 'dd-MM-yyyy');
|
||||
$scope.maxDate=moment();
|
||||
// get 30 plus date for follwup details
|
||||
$scope.modifyDate = moment();
|
||||
$scope.modifyDate.add(30, 'days');
|
||||
$scope.futureDate = $filter('date')($scope.modifyDate, 'dd-MM-yyyy');
|
||||
|
||||
$scope.myModel.leadDate=$scope.currentDate;
|
||||
|
||||
/*
|
||||
* edit track details
|
||||
* created by kms
|
||||
* */
|
||||
$scope.setEditId = function (p,search1,search2,search3,search4,search5) {
|
||||
$scope.searchData = {
|
||||
"searchDate": search1,
|
||||
"searchName": search2,
|
||||
'serachActivity': search3,
|
||||
'searchAssignTo': search4,
|
||||
'searchStatus': search5,
|
||||
'callFrom': "lead"
|
||||
}
|
||||
|
||||
|
||||
localStorage.setItem('searchObj', JSON.stringify($scope.searchData));
|
||||
localStorage.setItem('trackID', p.TrackingID);
|
||||
localStorage.setItem('count', 0);
|
||||
$rootScope.followupDetails=p;
|
||||
/* $rootScope.myModel1.status=$rootScope.followupDetails.StatusCode;
|
||||
$rootScope.currentDate1=new Date().getFullYear() + '-' + ('0' + (new Date().getMonth() + 1)).slice(-2) + '-' + ('0' + new Date().getDate()).slice(-2);
|
||||
|
||||
$rootScope.myModel1.date=$rootScope.followupDetails.followupDetails[0].FollowupOn;*/
|
||||
|
||||
/* $scope.editId = pid;*/
|
||||
$state.go('app.call.trackingFollowup');
|
||||
};
|
||||
|
||||
// sorting function for table params
|
||||
$scope.sort = function(keyname){
|
||||
$scope.sortKey = keyname; //set the sortKey to the param passed
|
||||
$scope.reverse = !$scope.reverse; //if true make it false and vice versa
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*get tracking list
|
||||
* created by kms
|
||||
* */
|
||||
$scope.init = function (form,myModel) {
|
||||
|
||||
if(isNaN(myModel.leadDate)){
|
||||
$scope.loadDate= $filter('date')(new Date(), 'yyyy-MM-dd');
|
||||
|
||||
}
|
||||
else if(myModel.leadDate==null || myModel.leadDate==''){
|
||||
$scope.loadDate="";
|
||||
}
|
||||
else{
|
||||
$scope.getdate=new Date(myModel.leadDate).toDateString();
|
||||
|
||||
$scope.loadDate = $filter('date')(new Date($scope.getdate), 'yyyy-MM-dd');
|
||||
}
|
||||
$scope.loader = true;
|
||||
|
||||
var getRecentlead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getRecentLeadDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
loadDate:$scope.loadDate,
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
requestedDept: JSON.parse(localStorage.getItem('localObj')).localType
|
||||
}
|
||||
};
|
||||
$http(getRecentlead).then(function (response) {
|
||||
|
||||
if (response.data.status == 200 && response.data.trackingStatus == true) {
|
||||
$scope.loader = false;
|
||||
|
||||
$rootScope.trackingStatus = response.data.statusDetails;
|
||||
|
||||
$scope.data = response.data.trackingDetails;
|
||||
|
||||
localStorage.setItem('trackingList', JSON.stringify($scope.data));
|
||||
|
||||
// this for search box
|
||||
/* $scope.search = {searchDate: ''};
|
||||
$scope.tableParams = new ngTableParams({
|
||||
page: 1,
|
||||
count: 10,
|
||||
filter: $scope.search
|
||||
}, {
|
||||
total: data.length,
|
||||
getData: function ($defer, params) {
|
||||
var orderedData = params.sorting() ? $filter('orderBy')(data, params.orderBy()) : data;
|
||||
orderedData = params.filter() ? $filter('filter')(orderedData, params.filter().followupDate) : orderedData;
|
||||
$defer.resolve(orderedData.slice((params.page() - 1) * params.count(), params.page() * params.count()));
|
||||
}
|
||||
});*/
|
||||
|
||||
|
||||
} else {
|
||||
$scope.loader = false;
|
||||
$scope.data='';
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}]);
|
||||
/*
|
||||
* close tracking controller
|
||||
* */
|
||||
app.controller('callTrackingCloseCtrl', ["$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 = {
|
||||
"closeDate": new Date(),
|
||||
};
|
||||
|
||||
|
||||
//get current date
|
||||
$scope.currentDate=$filter('date')(new Date(), 'dd-MM-yyyy');
|
||||
$scope.maxDate=moment();
|
||||
// get 30 plus date for follwup details
|
||||
$scope.modifyDate = moment();
|
||||
$scope.modifyDate.add(30, 'days');
|
||||
$scope.futureDate = $filter('date')($scope.modifyDate, 'dd-MM-yyyy');
|
||||
|
||||
$scope.myModel.closeDate=$scope.currentDate;
|
||||
|
||||
/*
|
||||
* edit track details
|
||||
* created by kms
|
||||
* */
|
||||
$scope.setEditId = function (p,search1,search2,search3,search4,search5) {
|
||||
$scope.searchData = {
|
||||
"searchDate": search1,
|
||||
"searchName": search2,
|
||||
'serachActivity': search3,
|
||||
'searchAssignTo': search4,
|
||||
'searchStatus': search5,
|
||||
'callFrom': "close"
|
||||
}
|
||||
|
||||
|
||||
localStorage.setItem('searchObj', JSON.stringify($scope.searchData));
|
||||
localStorage.setItem('trackID', p.TrackingID);
|
||||
localStorage.setItem('count', 0);
|
||||
$rootScope.followupDetails=p;
|
||||
/* $rootScope.myModel1.status=$rootScope.followupDetails.StatusCode;
|
||||
$rootScope.currentDate1=new Date().getFullYear() + '-' + ('0' + (new Date().getMonth() + 1)).slice(-2) + '-' + ('0' + new Date().getDate()).slice(-2);
|
||||
|
||||
$rootScope.myModel1.date=$rootScope.followupDetails.followupDetails[0].FollowupOn;*/
|
||||
|
||||
/* $scope.editId = pid;*/
|
||||
$state.go('app.call.trackingFollowup');
|
||||
};
|
||||
|
||||
// sorting function for table params
|
||||
$scope.sort = function(keyname){
|
||||
$scope.sortKey = keyname; //set the sortKey to the param passed
|
||||
$scope.reverse = !$scope.reverse; //if true make it false and vice versa
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*get tracking list
|
||||
* created by kms
|
||||
* */
|
||||
$scope.init = function (form,myModel) {
|
||||
|
||||
if(isNaN(myModel.closeDate)){
|
||||
$scope.loadDate= $filter('date')(new Date(), 'yyyy-MM-dd');
|
||||
|
||||
}
|
||||
else if(myModel.closeDate==null || myModel.closeDate==''){
|
||||
$scope.loadDate="";
|
||||
}
|
||||
else{
|
||||
$scope.getdate=new Date(myModel.closeDate).toDateString();
|
||||
|
||||
$scope.loadDate = $filter('date')(new Date($scope.getdate), 'yyyy-MM-dd');
|
||||
}
|
||||
$scope.loader = true;
|
||||
|
||||
var getRecentclose = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getRecentCloseDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
loadDate:$scope.loadDate,
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
requestedDept: JSON.parse(localStorage.getItem('localObj')).localType
|
||||
}
|
||||
};
|
||||
$http(getRecentclose).then(function (response) {
|
||||
|
||||
if (response.data.status == 200 && response.data.trackingStatus == true) {
|
||||
$scope.loader = false;
|
||||
|
||||
$rootScope.trackingStatus = response.data.statusDetails;
|
||||
|
||||
$scope.data = response.data.trackingDetails;
|
||||
|
||||
localStorage.setItem('trackingList', JSON.stringify($scope.data));
|
||||
|
||||
// this for search box
|
||||
/* $scope.search = {searchDate: ''};
|
||||
$scope.tableParams = new ngTableParams({
|
||||
page: 1,
|
||||
count: 10,
|
||||
filter: $scope.search
|
||||
}, {
|
||||
total: data.length,
|
||||
getData: function ($defer, params) {
|
||||
var orderedData = params.sorting() ? $filter('orderBy')(data, params.orderBy()) : data;
|
||||
orderedData = params.filter() ? $filter('filter')(orderedData, params.filter().followupDate) : orderedData;
|
||||
$defer.resolve(orderedData.slice((params.page() - 1) * params.count(), params.page() * params.count()));
|
||||
}
|
||||
});*/
|
||||
|
||||
|
||||
} else {
|
||||
$scope.loader = false;
|
||||
$scope.data='';
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}]);
|
||||
/*
|
||||
* pending tracking controller
|
||||
* */
|
||||
app.controller('callTrackingPendingCtrl', ["$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 = {
|
||||
"pendingDate": new Date(),
|
||||
};
|
||||
|
||||
|
||||
//get current date
|
||||
$scope.currentDate=$filter('date')(new Date(), 'dd-MM-yyyy');
|
||||
$scope.maxDate=moment();
|
||||
// get 30 plus date for follwup details
|
||||
$scope.modifyDate = moment();
|
||||
$scope.modifyDate.add(30, 'days');
|
||||
$scope.futureDate = $filter('date')($scope.modifyDate, 'dd-MM-yyyy');
|
||||
|
||||
$scope.myModel.pendingDate=$scope.currentDate;
|
||||
|
||||
/*
|
||||
* edit track details
|
||||
* created by kms
|
||||
* */
|
||||
$scope.setEditId = function (p,search1,search2,search3,search4,search5) {
|
||||
$scope.searchData = {
|
||||
"searchDate": search1,
|
||||
"searchName": search2,
|
||||
'serachActivity': search3,
|
||||
'searchAssignTo': search4,
|
||||
'searchStatus': search5,
|
||||
'callFrom': "close"
|
||||
}
|
||||
|
||||
|
||||
localStorage.setItem('searchObj', JSON.stringify($scope.searchData));
|
||||
localStorage.setItem('trackID', p.TrackingID);
|
||||
localStorage.setItem('count', 0);
|
||||
$rootScope.followupDetails=p;
|
||||
/* $rootScope.myModel1.status=$rootScope.followupDetails.StatusCode;
|
||||
$rootScope.currentDate1=new Date().getFullYear() + '-' + ('0' + (new Date().getMonth() + 1)).slice(-2) + '-' + ('0' + new Date().getDate()).slice(-2);
|
||||
|
||||
$rootScope.myModel1.date=$rootScope.followupDetails.followupDetails[0].FollowupOn;*/
|
||||
|
||||
/* $scope.editId = pid;*/
|
||||
$state.go('app.call.trackingFollowup');
|
||||
};
|
||||
|
||||
// sorting function for table params
|
||||
$scope.sort = function(keyname){
|
||||
$scope.sortKey = keyname; //set the sortKey to the param passed
|
||||
$scope.reverse = !$scope.reverse; //if true make it false and vice versa
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*get tracking list
|
||||
* created by kms
|
||||
* */
|
||||
$scope.init = function (form,myModel) {
|
||||
|
||||
if(isNaN(myModel.closeDate)){
|
||||
$scope.loadDate= $filter('date')(new Date(), 'yyyy-MM-dd');
|
||||
|
||||
}
|
||||
else if(myModel.pendingDate==null || myModel.pendingDate==''){
|
||||
$scope.loadDate="";
|
||||
}
|
||||
else{
|
||||
$scope.getdate=new Date(myModel.pendingDate).toDateString();
|
||||
|
||||
$scope.loadDate = $filter('date')(new Date($scope.getdate), 'yyyy-MM-dd');
|
||||
}
|
||||
$scope.loader = true;
|
||||
|
||||
var getRecentclose = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getRecentPendingDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
loadDate:$scope.loadDate,
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
requestedDept: JSON.parse(localStorage.getItem('localObj')).localType
|
||||
}
|
||||
};
|
||||
$http(getRecentclose).then(function (response) {
|
||||
|
||||
if (response.data.status == 200 && response.data.trackingStatus == true) {
|
||||
$scope.loader = false;
|
||||
|
||||
$rootScope.trackingStatus = response.data.statusDetails;
|
||||
|
||||
$scope.data = response.data.trackingDetails;
|
||||
|
||||
localStorage.setItem('trackingList', JSON.stringify($scope.data));
|
||||
|
||||
// this for search box
|
||||
/* $scope.search = {searchDate: ''};
|
||||
$scope.tableParams = new ngTableParams({
|
||||
page: 1,
|
||||
count: 10,
|
||||
filter: $scope.search
|
||||
}, {
|
||||
total: data.length,
|
||||
getData: function ($defer, params) {
|
||||
var orderedData = params.sorting() ? $filter('orderBy')(data, params.orderBy()) : data;
|
||||
orderedData = params.filter() ? $filter('filter')(orderedData, params.filter().followupDate) : orderedData;
|
||||
$defer.resolve(orderedData.slice((params.page() - 1) * params.count(), params.page() * params.count()));
|
||||
}
|
||||
});*/
|
||||
|
||||
|
||||
} else {
|
||||
$scope.loader = false;
|
||||
$scope.data='';
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}]);
|
||||
|
||||
app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", function ($scope,$rootScope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state) {
|
||||
@ -737,8 +1117,22 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
|
||||
* created by kms
|
||||
* */
|
||||
$scope.cancel = function () {
|
||||
if(JSON.parse(localStorage.getItem('searchObj')).callFrom=='details'){
|
||||
$state.go('app.call.tracking');
|
||||
}
|
||||
else if(JSON.parse(localStorage.getItem('searchObj')).callFrom=='lead'){
|
||||
$state.go('app.call.lead');
|
||||
}
|
||||
else if(JSON.parse(localStorage.getItem('searchObj')).callFrom=='close'){
|
||||
$state.go('app.call.close');
|
||||
}
|
||||
else if(JSON.parse(localStorage.getItem('searchObj')).callFrom=='pending'){
|
||||
$state.go('app.call.pending');
|
||||
}
|
||||
else{
|
||||
$state.go('app.call.tracking');
|
||||
}
|
||||
|
||||
$state.go('app.tracking');
|
||||
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user