course details changes done
This commit is contained in:
parent
8397cc45b0
commit
268914c651
@ -4,7 +4,7 @@
|
|||||||
* Simple table with sorting and filtering on AngularJS
|
* Simple table with sorting and filtering on AngularJS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
app.controller('dashboardCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", function ($scope, toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state) {
|
app.controller('dashboardCtrl', ["$scope","$rootScope", "toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", function ($scope,$rootScope, toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state) {
|
||||||
/*
|
/*
|
||||||
* used to get dash board call track details
|
* used to get dash board call track details
|
||||||
* this method called from view ng-init directive
|
* this method called from view ng-init directive
|
||||||
@ -12,54 +12,63 @@ app.controller('dashboardCtrl', ["$scope", "toaster", "$filter", "ngTableParams"
|
|||||||
* */
|
* */
|
||||||
|
|
||||||
$scope.initCallTracking = function () {
|
$scope.initCallTracking = function () {
|
||||||
var getCallTrack = {
|
$rootScope.pendingFolloupDetails = [];
|
||||||
method: 'POST',
|
if(JSON.parse(localStorage.getItem('localObj')).localUserID!=null){
|
||||||
url: apiPoint.url + 'getDashboardCallTrack/',
|
var getCallTrack = {
|
||||||
headers: {
|
method: 'POST',
|
||||||
'Content-Type': 'application/json'
|
url: apiPoint.url + 'getDashboardCallTrack/',
|
||||||
},
|
headers: {
|
||||||
data: {
|
'Content-Type': 'application/json'
|
||||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
},
|
||||||
}
|
data: {
|
||||||
};
|
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
||||||
$http(getCallTrack).then(function (response) {
|
}
|
||||||
if (response.data.status == 200) {
|
};
|
||||||
if (response.data.todayStatus) {
|
$http(getCallTrack).then(function (response) {
|
||||||
|
if (response.data.status == 200) {
|
||||||
|
if (response.data.todayStatus) {
|
||||||
|
|
||||||
$scope.todayFolloupDetails = response.data.todayFolloupDetails.trackingDetails;
|
$scope.todayFolloupDetails = response.data.todayFolloupDetails.trackingDetails;
|
||||||
$scope.emptyDataToday = false;
|
$scope.emptyDataToday = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$scope.todayFolloupDetails = "";
|
$scope.todayFolloupDetails = "";
|
||||||
$scope.emptyDataToday = true;
|
$scope.emptyDataToday = true;
|
||||||
}
|
}
|
||||||
if (response.data.todayPendingStatus) {
|
if (response.data.todayPendingStatus) {
|
||||||
$scope.pendingFolloupDetails = response.data.PendingFolloupDetails.trackingDetails;
|
$scope.currentDate = new Date().getFullYear() + '-' + ('0' + (new Date().getMonth() + 1)).slice(-2) + '-' + ('0' + new Date().getDate()).slice(-2);
|
||||||
$scope.emptyDataPending = false;
|
|
||||||
}
|
$scope.fetchFolloupDetails = response.data.PendingFolloupDetails.trackingDetails;
|
||||||
else {
|
angular.forEach($scope.fetchFolloupDetails, function (value, key) {
|
||||||
$scope.pendingFolloupDetails = "";
|
if (($scope.currentDate) < (value.FollowupOn)) {
|
||||||
$scope.emptyDataPending = true;
|
$rootScope.pendingFolloupDetails.push(value);
|
||||||
}
|
|
||||||
if (response.data.todayLeadStatus) {
|
|
||||||
$scope.leadDetails = response.data.todayLeadDetails.trackingDetails;
|
|
||||||
$scope.emptyDataLead = false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$scope.leadDetails = "";
|
|
||||||
$scope.emptyDataLead = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
$scope.emptyDataPending = false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$scope.pendingFolloupDetails = "";
|
||||||
|
$scope.emptyDataPending = true;
|
||||||
|
}
|
||||||
|
if (response.data.todayLeadStatus) {
|
||||||
|
$scope.leadDetails = response.data.todayLeadDetails.trackingDetails;
|
||||||
|
$scope.emptyDataLead = false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$scope.leadDetails = "";
|
||||||
|
$scope.emptyDataLead = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
} else {
|
$scope.emptyDataToday = true;
|
||||||
|
$scope.emptyDataPending = true;
|
||||||
|
|
||||||
$scope.emptyDataToday = true;
|
}
|
||||||
$scope.emptyDataPending = true;
|
});
|
||||||
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}]);
|
}]);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user