mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-06 21:24:23 +08:00
Fix user leaving the workspace [SCI-12211]
This commit is contained in:
parent
cc0f950077
commit
d35da236cd
2 changed files with 8 additions and 2 deletions
|
@ -150,7 +150,11 @@
|
|||
if (data.status === 'done') {
|
||||
// Reload the whole table
|
||||
HelperModule.flashAlertMsg(jobData.success_message, 'success');
|
||||
usersDatatable.ajax.reload();
|
||||
if(jobData.redirect_url) {
|
||||
window.location.href = jobData.redirect_url;
|
||||
} else {
|
||||
usersDatatable.ajax.reload();
|
||||
}
|
||||
animateSpinner(null, false);
|
||||
$('#destroy-user-team-modal').modal('hide');
|
||||
clearInterval(jobStatusInterval);
|
||||
|
|
|
@ -109,11 +109,13 @@ module Users
|
|||
)
|
||||
end
|
||||
|
||||
redirect_url = teams_path if params[:leave]
|
||||
|
||||
generate_notification(current_user,
|
||||
@user_assignment.user,
|
||||
@user_assignment.assignable,
|
||||
false)
|
||||
render json: { status: :ok, job_id: job_id, success_message: success_message }
|
||||
render json: { status: :ok, job_id: job_id, success_message: success_message, redirect_url: redirect_url }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue