Commit c7b3bf64 by Félicie

Merge branch '2500-delete-extra-shift-display-date-bug' into 'dev_cooperatic'

2500 delete extra shift display date bug

See merge request !147
parents fe8b6ea3 a3ec6bff
Pipeline #1939 passed with stage
in 1 minute 29 seconds
...@@ -725,7 +725,8 @@ function init_delete_registration_buttons() { ...@@ -725,7 +725,8 @@ function init_delete_registration_buttons() {
$(".delete_registration_button").off(); $(".delete_registration_button").off();
$(".delete_registration_button").on("click", function() { $(".delete_registration_button").on("click", function() {
let shift_name = $(this).closest("div") let shift_name = $(this).closest("div")
.siblings(".selectable_shift_line") .parent().parent()
.find(".shift_line_date")
.text() .text()
.trim(); .trim();
let shift_id = $(this).closest(".shift_line_container") let shift_id = $(this).closest(".shift_line_container")
...@@ -733,7 +734,7 @@ function init_delete_registration_buttons() { ...@@ -733,7 +734,7 @@ function init_delete_registration_buttons() {
.split('_')[2]; .split('_')[2];
openModal( openModal(
`<p>Je m'apprête supprimer ma présence au service du <b>${shift_name}</b></p>`, `<p>Je m'apprête à supprimer ma présence au service du <b>${shift_name}</b></p>`,
() => { () => {
delete_shift_registration(shift_id); delete_shift_registration(shift_id);
}, },
......
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