From a7ed14b6ef8602a7ba25efcbf030fa3b1a7cf803 Mon Sep 17 00:00:00 2001 From: Besher Kitaz Date: Thu, 27 Nov 2025 08:42:29 +0000 Subject: [PATCH 1/2] Changed the AJAX request and the method to show the modal order to have them in as a fuction call-back. --- app/static/js/allPendingForms.js | 11 ++++++----- app/templates/admin/allPendingForms.html | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/static/js/allPendingForms.js b/app/static/js/allPendingForms.js index fda836f08..18b1b3516 100644 --- a/app/static/js/allPendingForms.js +++ b/app/static/js/allPendingForms.js @@ -354,20 +354,21 @@ function clearTextArea() { //makes sure that it empties text areas and p tags wh function loadOverloadModal(formHistoryID, laborStatusFormID) { + // Error is potentially here if multiple modals are opened at once + /* This method sends an AJAX call to recieve data used to populate the overload modal. */ - $("#overloadModal").modal("show"); - $("#overloadModal").find('.modal-content').load('/admin/overloadModal/' + formHistoryID); + + $("#overloadModal").find('.modal-content').load('/admin/overloadModal/' + formHistoryID, function() { + $("#overloadModal").modal("show"); + }); } function loadReleaseModal(formHistoryID, laborStatusFormID) { $("#modalRelease").modal("show"); - $("#modalRelease").find('.modal-content').load('/admin/releaseModal/' + formHistoryID); - - } diff --git a/app/templates/admin/allPendingForms.html b/app/templates/admin/allPendingForms.html index 5041dadab..6c9ad2dde 100644 --- a/app/templates/admin/allPendingForms.html +++ b/app/templates/admin/allPendingForms.html @@ -215,7 +215,8 @@

{{title}}

Manage {% else %} - Manage + + Manage {% endif %} From a18775e870e8a935dadb200017517052ba0f34ad Mon Sep 17 00:00:00 2001 From: Besher Kitaz Date: Fri, 28 Nov 2025 02:14:37 +0000 Subject: [PATCH 2/2] Issue Fixed and I also fixed the view Notes one --- app/static/js/allPendingForms.js | 10 ++- app/templates/admin/allPendingForms.html | 97 ++++++++++++++++-------- 2 files changed, 73 insertions(+), 34 deletions(-) diff --git a/app/static/js/allPendingForms.js b/app/static/js/allPendingForms.js index 18b1b3516..b524ccaff 100644 --- a/app/static/js/allPendingForms.js +++ b/app/static/js/allPendingForms.js @@ -353,16 +353,18 @@ function clearTextArea() { //makes sure that it empties text areas and p tags wh -function loadOverloadModal(formHistoryID, laborStatusFormID) { - // Error is potentially here if multiple modals are opened at once - +function loadOverloadModal(formHistoryID, laborStatusFormID) { /* This method sends an AJAX call to recieve data used to populate the overload modal. */ - + actionsButton = $("#menu" + formHistoryID); + actionsButton.prop('disabled', true); + actionsButton.html("Loading..."); $("#overloadModal").find('.modal-content').load('/admin/overloadModal/' + formHistoryID, function() { $("#overloadModal").modal("show"); + actionsButton.prop('disabled', false); + actionsButton.html("Actions "); }); } diff --git a/app/templates/admin/allPendingForms.html b/app/templates/admin/allPendingForms.html index 6c9ad2dde..3c0b181fe 100644 --- a/app/templates/admin/allPendingForms.html +++ b/app/templates/admin/allPendingForms.html @@ -202,11 +202,17 @@

{{title}}