Skip to content

Commit

Permalink
Corrected coding standard issue (#998)
Browse files Browse the repository at this point in the history
  • Loading branch information
jarellb authored Aug 21, 2024
1 parent 34f1007 commit 2e4742f
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
$scope.selectedOwnedGroupingsNames = [];
$scope.allGroupingsLoading = false;
$scope.userGroupingInformationLoading = false;
$scope.loadingOwners = false;

let PAGE_SIZE = 20;

Expand Down Expand Up @@ -427,6 +428,7 @@
*/
$scope.handleGroupingOwnersOnSuccess = (res) => {
$scope.loading = false;
$scope.loadingOwners = false;
$scope.owners = [];

res.members.forEach((member) => {
Expand All @@ -445,6 +447,7 @@
*/
$scope.handleGroupingOwnersOnError = () => {
$scope.loading = false;
$scope.loadingOwners = false;
$scope.displayDynamicModal(Message.Title.DISPLAY_OWNERS_ERROR, Message.Body.DISPLAY_OWNERS_ERROR);
};

Expand All @@ -469,6 +472,11 @@
* @param groupingPath - The path of the grouping to display owners
*/
$scope.getGroupingOwnersOnClick = (groupingPath) => {
// Prevent multiple triggers while loading modal
if ($scope.loadingOwners === true) {
return;
}
$scope.loadingOwners = true;
$scope.ownersModalGroupingPath = groupingPath;
groupingsService.groupingOwners($scope.ownersModalGroupingPath, $scope.handleGroupingOwnersOnSuccess, $scope.handleGroupingOwnersOnError);
};
Expand Down

0 comments on commit 2e4742f

Please sign in to comment.