Commit a7c0febd by François

Change in late people rendering in shift list

parent 0825e1e6
Pipeline #1493 passed with stage
in 1 minute 30 seconds
......@@ -1175,7 +1175,7 @@ class CagetteServices(models.Model):
).total_seconds() / 60 > default_acceptable_minutes_after_shift_begins
if with_members is True:
cond = [['id', 'in', s['registration_ids']], ['state', '!=', 'cancel']]
fields = ['partner_id', 'shift_type', 'state']
fields = ['partner_id', 'shift_type', 'state', 'is_late']
members = api.search_read('shift.registration', cond, fields)
s['members'] = sorted(members, key=lambda x: x['partner_id'][0])
if len(s['members']) > 0:
......
......@@ -43,8 +43,9 @@ h1 .member_name {font-weight: bold;}
{border:1px solid #000; border-radius: 5px; padding:5px; margin-bottom:15px;background:#FFF;}
.members_list {list-style: none;}
.members_list li {display:block;margin-bottom:5px;}
.members_list.late li {background-color: #de9b00; color: white}
.members_list li.btn--inverse {background: #449d44 !important; cursor:not-allowed; color: #FFF; }
.members_list li.btn--inverse {background: #449d44; cursor:not-allowed; color: #FFF; }
.members_list li.btn--inverse.late {background-color: #de9b00; color: white}
#service_entry_success {font-size: x-large;}
#service_entry_success .explanations {margin: 25px 0; font-size: 18px;}
......
......@@ -263,15 +263,18 @@ function fill_service_entry(s) {
if (s.members) {
m_list = '<ul class="members_list">';
if (typeof s.late != "undefined" && s.late == true) {
m_list = '<ul class="members_list late">';
}
// if (typeof s.late != "undefined" && s.late == true) {
// m_list = '<ul class="members_list late">';
// }
$.each(s.members, function(i, e) {
var li_class = "btn";
var li_data = "";
if (e.state == "done") {
li_class += "--inverse";
if (e.is_late == true) {
li_class += " late";
}
} else {
li_data = ' data-rid="'+e.id+'" data-mid="'+e.partner_id[0]+'"';
}
......
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