From a63a2cfe07b035f1b51de038646f575456b7d196 Mon Sep 17 00:00:00 2001 From: Steven Mirabito Date: Sun, 2 Sep 2018 20:31:12 -0400 Subject: [PATCH] Fix packet signing race condition (#33) --- packet/static/js/signing.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packet/static/js/signing.js b/packet/static/js/signing.js index 2f825259..38964193 100644 --- a/packet/static/js/signing.js +++ b/packet/static/js/signing.js @@ -3,7 +3,6 @@ $(document).ready(function () { $('.sign-button').click(function () { var packetData = $(this).get(0).dataset; var userData = $("#userInfo").val(); - console.log(userData); swal({ title: "Are you sure?", text: "Once a packet is signed it can only be unsigned from request to the Evals Director", @@ -19,10 +18,12 @@ $(document).ready(function () { success: function (data) { swal("Congratulations or I'm Sorry\nYou've signed " + packetData.freshman_name + "'s packet", { icon: "success", - }); + }) + .then(() => { + location.reload(); + }); } }); - location.reload(); } }); });