Fix the 'more' button to view certificates associated with a notification

This commit is contained in:
Jasmine Schladen 2020-10-29 14:28:54 -07:00
parent cca4670745
commit 1c59fb575c
2 changed files with 7 additions and 1 deletions

View File

@ -49,6 +49,7 @@ angular.module('lemur')
});
});
NotificationService.getCertificates(notification);
$scope.page = 1;
});
PluginService.getByType('notification').then(function (plugins) {
@ -86,5 +87,10 @@ angular.module('lemur')
$uibModalInstance.dismiss('cancel');
};
$scope.loadMoreCertificates = function () {
$scope.page++;
NotificationService.loadMoreCertificates($scope.notification, $scope.page);
};
$scope.certificateService = CertificateService;
});

View File

@ -42,7 +42,7 @@ angular.module('lemur')
NotificationService.loadMoreCertificates = function (notification, page) {
notification.getList('certificates', {page: page}).then(function (certificates) {
_.each(certificates, function (certificate) {
notification.roles.push(certificate);
notification.certificates.push(certificate);
});
});
};