Skip to content

Commit

Permalink
Merge pull request #1124 from NASA-IMPACT/2895-trigger-frontend-refre…
Browse files Browse the repository at this point in the history
…sh-on-curatedurls-and-deltaurls-merge

Refresh page on workflow status change
  • Loading branch information
CarsonDavis authored Dec 5, 2024
2 parents 903b219 + b5beeb3 commit 219cd1c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions sde_indexing_helper/static/js/delta_url_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -2071,8 +2071,26 @@ function postWorkflowStatus(collection_id, workflow_status) {
"X-CSRFToken": csrftoken,
},
success: function (data) {
$('#workflowStatusChangeModal button').blur();
$("#workflowStatusChangeModal")
.removeClass('show')
.removeAttr('aria-hidden')
.modal('hide');
$('.modal-backdrop').remove();
$('body').removeClass('modal-open');
toastr.success("Workflow Status Updated!");

// Refresh page after modal closes and success message shows
setTimeout(function() {
window.location = window.location.href;
}, 1500);
},
error: function(xhr, status, error) {
$('#workflowStatusChangeModal button').blur();
$("#workflowStatusChangeModal").modal('hide');
$('.modal-backdrop').remove();
toastr.error("Error updating workflow status: " + error);
}
});
}

Expand Down

0 comments on commit 219cd1c

Please sign in to comment.