Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion app/controller/console/consoleCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2873,7 +2873,12 @@ agentApp.controller('consoleCtrl', function ($window, $filter, $rootScope, $scop
return integrationAPIService.GetIntegrationProfileSearch( postData).then(function (response) {

if (response && response.IsSuccess) {
return response.Result.map(function (item) {

if(response.Result.failedRequests && response.Result.failedRequests.length > 0){
$scope.showAlert("Profile Search", "error", response.Result.failedRequests.length + " Profile Search Integration(s) Failed!");
}

return response.Result.data.map(function (item) {
return {
obj: item,
type: "profile",
Expand Down
50 changes: 37 additions & 13 deletions app/directive/engagementTabDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -2038,11 +2038,21 @@ agentApp.directive("engagementTab", function ($filter, $rootScope, $uibModal, $q
}
};
integrationAPIService.GetIntegrationDetails("PROFILE_ADDITIONAL_DATA", postData).then(function (response) {
angular.forEach(response, function (item) {
if (item) {
angular.extend(scope.profileDetail, item);

if(response && response.data){
angular.forEach(response.data, function (item) {
if (item) {
angular.extend(scope.profileDetail, item);
}
});

if(response.failedRequests && response.failedRequests.length > 0){
scope.showAlert("User Profile", "error", response.failedRequests.length + " Profile Additional Data Integration(s) Failed!");
console.log(response.failedRequests);
}
});
};



}, function (err) {
scope.showAlert("User Profile", "error", "Fail To Get Additional Profile Details.")
Expand All @@ -2060,11 +2070,18 @@ agentApp.directive("engagementTab", function ($filter, $rootScope, $uibModal, $q
integrationAPIService.GetIntegrationDetails("PROFILE_IMPORTANT_DATA", postData).then(function (response) {
scope.profileImportantData = {};

angular.forEach(response, function (item) {
if (item && Object.keys(scope.profileImportantData).length < 10) {
angular.extend(scope.profileImportantData, item);
if(response && response.data){
angular.forEach(response.data, function (item) {
if (item && Object.keys(scope.profileImportantData).length < 10) {
angular.extend(scope.profileImportantData, item);
}
});

if(response.failedRequests && response.failedRequests.length > 0){
scope.showAlert("User Profile", "error", response.failedRequests.length + " Profile Important Data Integration(s) Failed!");
console.log(response.failedRequests);
}
});
};

}, function (err) {
scope.showAlert("User Profile", "error", "Fail To Get Profile Important Details.")
Expand All @@ -2081,12 +2098,19 @@ agentApp.directive("engagementTab", function ($filter, $rootScope, $uibModal, $q

integrationAPIService.GetIntegrationDetails("PROFILE_OTHER_DATA", postBody).then(function (response) {
scope.profileOtherDataObj = {};
angular.forEach(response, function (item) {
if (item) {
angular.extend(scope.profileOtherDataObj, item);
}
});

if(response && response.data){
angular.forEach(response.data, function (item) {
if (item) {
angular.extend(scope.profileOtherDataObj, item);
}
});

if(response.failedRequests && response.failedRequests.length > 0){
scope.showAlert("User Profile", "error", response.failedRequests.length + " Profile Other Data Integration(s) Failed!");
console.log(response.failedRequests);
}
};
}, function (err) {
scope.showAlert("User Profile", "error", "Fail To Get Profile Important Details.")
});
Expand Down