diff --git a/src/admin/gym/application/index.php b/src/admin/gym/application/index.php
index 7017ef39843af646df7ee458ea32a86a8b8171f9..c95142558b8001157bcdb5ce3aa0c0a196c719e5 100644
--- a/src/admin/gym/application/index.php
+++ b/src/admin/gym/application/index.php
@@ -35,7 +35,7 @@ AuthMiddleware::getInstance()->secureRoute(true);
         </div>
         <div class="space"></div>
         
-        <div class="first-line-button">
+        <div class="first-line-button" id="button-acc-rej-trainer">
             <button class="button-filter" id="accept-trainer" onclick="showPopupAcc();">
                 Accept Trainer
             </button>
diff --git a/src/public/javascript/gym/application.js b/src/public/javascript/gym/application.js
index c930a01612bfc85c98ed5172e2e5968c0cd98ec7..ea496dc008b2724a4653ebe44a11d7f287632937 100644
--- a/src/public/javascript/gym/application.js
+++ b/src/public/javascript/gym/application.js
@@ -83,14 +83,22 @@ function getApplication(username, gymId) {
 
 function acceptApplication(gymId, username) {
   hidePopupAcc()
+  const button = document.getElementById("button-acc-rej-trainer");
+  // hide button
+  button.style.display = "none";
   const xhr = new XMLHttpRequest();
   xhr.onreadystatechange = function () {
       if (this.readyState === 4) {
           if (this.status === 200) {
               alert("accept with username: " + username + " and gym id: " + gymId + "\n" + "Email has been sent to the trainer");
+              // redirect to gym page /admin/gym/?gym_id=${gymId}
+              window.location.href = `/admin/gym/?gym_id=${gymId}`;
           } else {
               const xml = this.responseXML;
               console.log("error status : " + this.status + " error text : " + xml);
+              alert("error status : " + this.status + " error text : " + xml);
+              // show button
+              button.style.display = "flex";
           }
       }
   };
@@ -112,14 +120,22 @@ function acceptApplication(gymId, username) {
 
 function rejectApplication(gymId, username) {
   hidePopupRej()
+  const button = document.getElementById("button-acc-rej-trainer");
+  // hide button
+  button.style.display = "none";
   const xhr = new XMLHttpRequest();
   xhr.onreadystatechange = function () {
       if (this.readyState === 4) {
           if (this.status === 200) {
               alert("reject with username: " + username + " and gym id: " + gymId + "\n" + "Email has been sent to the trainer");
+              // redirect to gym page /admin/gym/?gym_id=${gymId}
+              window.location.href = `/admin/gym/?gym_id=${gymId}`;
           } else {
               const xml = this.responseXML;
               console.log("error status : " + this.status + " error text : " + xml);
+              alert("error status : " + this.status + " error text : " + xml);
+              // show button
+              button.style.display = "flex";
           }
       }
   };