From 2a794b68ac8edde9267dc4a56871f8a9a792d1a2 Mon Sep 17 00:00:00 2001 From: Anton Date: Tue, 7 Mar 2023 14:31:15 +0100 Subject: [PATCH] Fix protocol duplication table reload [SCI-8074] --- app/assets/javascripts/protocols/index.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/protocols/index.js b/app/assets/javascripts/protocols/index.js index c018524d9..540193f1d 100644 --- a/app/assets/javascripts/protocols/index.js +++ b/app/assets/javascripts/protocols/index.js @@ -516,13 +516,12 @@ var ProtocolsIndex = (function() { url: $el.data('url'), data: JSON.stringify({ ids: rowsSelected }), contentType: 'application/json' - }, - (data) => { - animateSpinner(null, false); - HelperModule.flashAlertMsg(data.message, 'success'); - reloadTable(); } - ).error((data) => { + ).success((data) => { + animateSpinner(null, false); + HelperModule.flashAlertMsg(data.message, 'success'); + reloadTable(); + }).error((data) => { animateSpinner(null, false); HelperModule.flashAlertMsg(data.responseJSON.message, 'danger'); });