Skip to content

Commit b5beeb3

Browse files
committed
Refresh page on workflow status change
1 parent e54f94b commit b5beeb3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

sde_indexing_helper/static/js/delta_url_list.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2071,8 +2071,26 @@ function postWorkflowStatus(collection_id, workflow_status) {
20712071
"X-CSRFToken": csrftoken,
20722072
},
20732073
success: function (data) {
2074+
$('#workflowStatusChangeModal button').blur();
2075+
$("#workflowStatusChangeModal")
2076+
.removeClass('show')
2077+
.removeAttr('aria-hidden')
2078+
.modal('hide');
2079+
$('.modal-backdrop').remove();
2080+
$('body').removeClass('modal-open');
20742081
toastr.success("Workflow Status Updated!");
2082+
2083+
// Refresh page after modal closes and success message shows
2084+
setTimeout(function() {
2085+
window.location = window.location.href;
2086+
}, 1500);
20752087
},
2088+
error: function(xhr, status, error) {
2089+
$('#workflowStatusChangeModal button').blur();
2090+
$("#workflowStatusChangeModal").modal('hide');
2091+
$('.modal-backdrop').remove();
2092+
toastr.error("Error updating workflow status: " + error);
2093+
}
20762094
});
20772095
}
20782096

0 commit comments

Comments
 (0)