Commit 786e04ab by Yvon

[5349] Blocage de l'ajout de nouveaux rattrapages aux volants.

parent 9f76a924
Pipeline #3146 failed with stage
in 1 minute 5 seconds
...@@ -845,6 +845,7 @@ class CagetteMember(models.Model): ...@@ -845,6 +845,7 @@ class CagetteMember(models.Model):
elif search_type == "makeups_data": elif search_type == "makeups_data":
fields = CagetteMember.m_short_default_fields fields = CagetteMember.m_short_default_fields
fields = fields + ['shift_type', 'makeups_to_do', 'display_ftop_points', 'display_std_points', 'shift_type'] fields = fields + ['shift_type', 'makeups_to_do', 'display_ftop_points', 'display_std_points', 'shift_type']
cond.append(['shift_type', '=', 'standard'])
res = api.search_read('res.partner', cond, fields) res = api.search_read('res.partner', cond, fields)
CagetteMembers.add_makeups_to_come_to_member_data(res) CagetteMembers.add_makeups_to_come_to_member_data(res)
return res return res
......
...@@ -115,13 +115,17 @@ function display_makeups_members() { ...@@ -115,13 +115,17 @@ function display_makeups_members() {
className: "dt-body-center", className: "dt-body-center",
width: "10%", width: "10%",
render: function (data, type, full) { render: function (data, type, full) {
return `<b>${data}</b> var html = `<b>${data}</b>
<button class="decrement_makeup btn--primary" id="decrement_member_${full.id}"> <button class="decrement_makeup btn--primary" id="decrement_member_${full.id}">
<i class="fas fa-minus"></i> <i class="fas fa-minus"></i>
</button> </button>`;
if(full.shift_type == 'standard') {
html += `
<button class="increment_makeup btn--primary" id="increment_member_${full.id}"> <button class="increment_makeup btn--primary" id="increment_member_${full.id}">
<i class="fas fa-plus"></i> <i class="fas fa-plus"></i>
</button>`; </button>`;
}
return html;
} }
}, },
{ {
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</div> </div>
<div id="add_members_area"> <div id="add_members_area">
<div id="add_members_form_area"> <div id="add_members_form_area">
<h4>Ou, ajouter un rattrapage à un.e membre</h4> <h4>Ou, ajouter un rattrapage à un.e membre standard</h4>
<form id="search_member_form" action="javascript:;" method="post"> <form id="search_member_form" action="javascript:;" method="post">
<input type="text" id="search_member_input" value="" placeholder="Nom ou numéro du coop..." required> <input type="text" id="search_member_input" value="" placeholder="Nom ou numéro du coop..." required>
<button type="submit" class="btn--primary" id="search_member_button">Recherche</button> <button type="submit" class="btn--primary" id="search_member_button">Recherche</button>
......
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