Commit dfe92735 by François C.

Add UX functionnalities after submitting absence process

parent 44cf5dab
Pipeline #2342 passed with stage
in 1 minute 27 seconds
...@@ -335,15 +335,20 @@ function fill_service_entry(s) { ...@@ -335,15 +335,20 @@ function fill_service_entry(s) {
current_shift_process_data_actions.on('click', '#record_shift_absences', function(){ current_shift_process_data_actions.on('click', '#record_shift_absences', function(){
msg = "<p>Lancer le traitement des présences et absences de ce service</p>"; msg = "<p>Lancer le traitement des présences et absences de ce service</p>";
openModal(msg, function() { openModal(msg, function() {
btn.attr('disabled', 'true')
try { try {
$.ajax({ $.ajax({
url: '/members/record_shift_absences/' + s.id, url: '/members/record_shift_absences/' + s.id,
dataType : 'json' dataType : 'json'
}) })
.done(function(rData) { .done(function(rData) {
if (typeof rData.update !== "undefined" && rData.update == true) { if (typeof rData.res.update !== "undefined" && rData.res.update == true) {
enqueue_message_for_next_loading("Données de présences traitées."); enqueue_message_for_next_loading("Données de présences traitées.");
location.reload(); location.reload();
} else {
closeModal();
btn.removeAttr('disabled');
alert(JSON.stringify(rData.res));
} }
}); });
} catch (e) { } catch (e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment