Commit e848788f by François C.

Modifications pour création binome avec membre existant sans créneau attente

parent 86acf5b1
Pipeline #4176 failed with stage
in 0 seconds
......@@ -194,7 +194,7 @@ function _really_save_new_coop(email, fname, lname, cap, pm, cn, bc, msex, mjob)
coop.is_associated_people = true;
coop.parent_id=selected_associate.id;
coop.parent_name=selected_associate.barcode_base + ' - '+ selected_associate.name;
coop.shift_template = shift_templates[ASSOCIATE_MEMBER_SHIFT];
coop.shift_template = {data: {id: ''}}
}
} else if (associated_old_choice == 'new_member_choice' && $('#new_member_input').val()!='') {
coop.is_associated_people = true;
......@@ -226,7 +226,7 @@ function _really_save_new_coop(email, fname, lname, cap, pm, cn, bc, msex, mjob)
'Voulez-vous modifier le créneau choisi ?', swipe_to_shift_choice, 'oui',
false, true, show_coop_list
);
} else if (coop.is_associated_people && typeof coop.shift_template != "undefined" && coop.shift_template.data.id == ASSOCIATE_MEMBER_SHIFT) {
} else if (coop.is_associated_people && (ASSOCIATE_MEMBER_SHIFT.length == 0 || (typeof coop.shift_template != "undefined" && coop.shift_template.data.id == ASSOCIATE_MEMBER_SHIFT))) {
ncoop_view.hide();
new_coop_validation();
} else {
......
......@@ -44,6 +44,10 @@ function get_shift_name(s_data) {
shift_name += s_data.day + ' - ' + s_data.begin;
shift_name += ' - ' + s_data.place;
}
} else {
if(s_data.id == ASSOCIATE_MEMBER_SHIFT) {
shift_name = 'Binôme';
}
}
return shift_name;
}
......
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