Commit 40eaa1cd by Damien Moulard

admin makups, display shift type in column

parent 4def3c86
Pipeline #3067 failed with stage
in 1 minute 7 seconds
...@@ -321,9 +321,11 @@ def admin(request): ...@@ -321,9 +321,11 @@ def admin(request):
def manage_makeups(request): def manage_makeups(request):
""" Administration des membres """ """ Administration des membres """
template = loader.get_template('members/admin/manage_makeups.html') template = loader.get_template('members/admin/manage_makeups.html')
committees_shift_id = CagetteServices.get_committees_shift_id()
m = CagetteMembersSpace() m = CagetteMembersSpace()
context = {'title': 'BDM - Rattrapages', context = {'title': 'BDM - Rattrapages',
'module': 'Membres', 'module': 'Membres',
'has_committe_shift': committees_shift_id is not None,
'extension_duration': m.get_extension_duration() 'extension_duration': m.get_extension_duration()
} }
return HttpResponse(template.render(context, request)) return HttpResponse(template.render(context, request))
......
...@@ -89,6 +89,19 @@ function display_makeups_members() { ...@@ -89,6 +89,19 @@ function display_makeups_members() {
}, },
{ {
data: "shift_type", data: "shift_type",
title: "<div class='title_center'>Type de créneau</div>",
className: "dt-body-center",
width: "5%",
render: function (data) {
if (data == 'ftop') {
return (has_committe_shift === "True") ? "Comités" : "Volant";
} else {
return 'ABCD';
}
}
},
{
data: "shift_type",
title: "<div class='title_center'>Nb de points</div>", title: "<div class='title_center'>Nb de points</div>",
className: "dt-body-center", className: "dt-body-center",
width: "5%", width: "5%",
......
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
<script src='{% static "js/all_common.js" %}?v=1651853225'></script> <script src='{% static "js/all_common.js" %}?v=1651853225'></script>
<script src='{% static "js/admin/manage_makeups.js" %}?v=1651853225'></script> <script src='{% static "js/admin/manage_makeups.js" %}?v=1651853225'></script>
<script> <script>
var has_committe_shift = '{{has_committe_shift}}'
const extension_duration = {{extension_duration}}; const extension_duration = {{extension_duration}};
</script> </script>
{% endblock %} {% endblock %}
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