From 2e4742fb2b478aceacf11bee199ed999434538e2 Mon Sep 17 00:00:00 2001 From: jarellb <77024293+jarellb@users.noreply.github.com> Date: Tue, 20 Aug 2024 21:23:47 -1000 Subject: [PATCH] Corrected coding standard issue (#998) --- .../static/javascript/mainApp/admin.controller.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/resources/static/javascript/mainApp/admin.controller.js b/src/main/resources/static/javascript/mainApp/admin.controller.js index d7288588f..67c36f3dc 100755 --- a/src/main/resources/static/javascript/mainApp/admin.controller.js +++ b/src/main/resources/static/javascript/mainApp/admin.controller.js @@ -28,6 +28,7 @@ $scope.selectedOwnedGroupingsNames = []; $scope.allGroupingsLoading = false; $scope.userGroupingInformationLoading = false; + $scope.loadingOwners = false; let PAGE_SIZE = 20; @@ -427,6 +428,7 @@ */ $scope.handleGroupingOwnersOnSuccess = (res) => { $scope.loading = false; + $scope.loadingOwners = false; $scope.owners = []; res.members.forEach((member) => { @@ -445,6 +447,7 @@ */ $scope.handleGroupingOwnersOnError = () => { $scope.loading = false; + $scope.loadingOwners = false; $scope.displayDynamicModal(Message.Title.DISPLAY_OWNERS_ERROR, Message.Body.DISPLAY_OWNERS_ERROR); }; @@ -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); };