Merge pull request #3427 from jtschladen/fix-more-button-notification

Fix "more" button on notification edit dialog
This commit is contained in:
Jasmine Schladen 2021-02-18 14:22:00 -08:00 committed by GitHub
commit a153781335
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -49,6 +49,7 @@ angular.module('lemur')
}); });
}); });
NotificationService.getCertificates(notification); NotificationService.getCertificates(notification);
$scope.page = 1;
}); });
$scope.save = function (notification) { $scope.save = function (notification) {
@ -76,5 +77,10 @@ angular.module('lemur')
$uibModalInstance.dismiss('cancel'); $uibModalInstance.dismiss('cancel');
}; };
$scope.loadMoreCertificates = function () {
$scope.page++;
NotificationService.loadMoreCertificates($scope.notification, $scope.page);
};
$scope.certificateService = CertificateService; $scope.certificateService = CertificateService;
}); });

View File

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