Afficher la durée des horaires types
Some checks are pending
CI - Tests et Syntax / lint-and-test (push) Waiting to run
Some checks are pending
CI - Tests et Syntax / lint-and-test (push) Waiting to run
This commit is contained in:
parent
b1c3c95d5c
commit
e815f031f1
1 changed files with 1 additions and 1 deletions
|
|
@ -26,7 +26,7 @@
|
|||
</div></div>
|
||||
|
||||
<div class="card mb-3"><div class="card-header d-flex justify-content-between"><strong>Horaires types (maximum 6)</strong><span class="badge bg-primary">{{ templates|length }}/6</span></div><div class="card-body">
|
||||
{% for template in templates %}<div class="border-bottom py-2"><div class="d-flex justify-content-between"><span><strong>{{ template.name }}</strong><br><small>{{ template.start_time.strftime('%H:%M') }}–{{ template.end_time.strftime('%H:%M') }}{% if template.lunch_start %} · pause {{ template.lunch_start.strftime('%H:%M') }}–{{ template.lunch_end.strftime('%H:%M') }}{% endif %}</small></span><form method="post" action="{{ url_for('planning.delete_time_template', id=template.id) }}"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><button class="btn btn-sm btn-outline-danger"><i class="bi bi-trash"></i></button></form></div><form method="post" action="{{ url_for('planning.edit_time_template', id=template.id) }}" class="row g-1 mt-1"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><div class="col-4"><input class="form-control form-control-sm" name="name" value="{{ template.name }}"></div><div class="col-2"><input class="form-control form-control-sm" type="time" name="start_time" value="{{ template.start_time.strftime('%H:%M') }}"></div><div class="col-2"><input class="form-control form-control-sm" type="time" name="end_time" value="{{ template.end_time.strftime('%H:%M') }}"></div><div class="col-2"><input class="form-control form-control-sm" type="time" name="lunch_start" value="{{ template.lunch_start.strftime('%H:%M') if template.lunch_start else '' }}"></div><div class="col-2"><button class="btn btn-sm btn-outline-primary w-100">Modifier</button></div></form></div>{% else %}<p class="text-muted">Aucun profil défini.</p>{% endfor %}
|
||||
{% for template in templates %}<div class="border-bottom py-2"><div class="d-flex justify-content-between"><span><strong>{{ template.name }}</strong><br><small>{{ template.start_time.strftime('%H:%M') }}–{{ template.end_time.strftime('%H:%M') }}{% if template.lunch_start %} · pause {{ template.lunch_start.strftime('%H:%M') }}–{{ template.lunch_end.strftime('%H:%M') }}{% endif %} · <strong>durée : {{ template.duration_minutes // 60 }} h {{ '%02d'|format(template.duration_minutes % 60) }}</strong></small></span><form method="post" action="{{ url_for('planning.delete_time_template', id=template.id) }}"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><button class="btn btn-sm btn-outline-danger"><i class="bi bi-trash"></i></button></form></div><form method="post" action="{{ url_for('planning.edit_time_template', id=template.id) }}" class="row g-1 mt-1"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><div class="col-4"><input class="form-control form-control-sm" name="name" value="{{ template.name }}"></div><div class="col-2"><input class="form-control form-control-sm" type="time" name="start_time" value="{{ template.start_time.strftime('%H:%M') }}"></div><div class="col-2"><input class="form-control form-control-sm" type="time" name="end_time" value="{{ template.end_time.strftime('%H:%M') }}"></div><div class="col-2"><input class="form-control form-control-sm" type="time" name="lunch_start" value="{{ template.lunch_start.strftime('%H:%M') if template.lunch_start else '' }}"></div><div class="col-2"><button class="btn btn-sm btn-outline-primary w-100">Modifier</button></div></form></div>{% else %}<p class="text-muted">Aucun profil défini.</p>{% endfor %}
|
||||
{% if templates|length < 6 %}<form method="post" action="{{ url_for('planning.save_time_template') }}" class="mt-3"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><input class="form-control mb-2" name="name" placeholder="Nom : journée normale, été…" required><div class="row g-2"><div class="col-6"><input class="form-control" type="time" name="start_time" required></div><div class="col-6"><input class="form-control" type="time" name="end_time" required></div><div class="col-6"><input class="form-control" type="time" name="lunch_start" placeholder="Début pause"></div><div class="col-6"><input class="form-control" type="time" name="lunch_end" placeholder="Fin pause"></div></div><button class="btn btn-outline-primary btn-sm mt-2">Ajouter l’horaire type</button></form>{% endif %}
|
||||
</div></div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue