fix(interventions): handle missing location in lists
This commit is contained in:
parent
118b763d0d
commit
8c54f46ef5
4 changed files with 23 additions and 9 deletions
|
|
@ -131,7 +131,14 @@
|
|||
</div>
|
||||
<div class="fw-bold text-dark">#{{ interv.id }} — {{ interv.title[:80] }}{% if interv.title|length > 80 %}…{% endif %}</div>
|
||||
<div class="text-muted" style="font-size:0.8rem;">
|
||||
<i class="bi bi-hdd"></i> {% if interv.equipment %}{{ interv.equipment.name[:40] }}{% if interv.equipment.name|length > 40 %}…{% endif %}{% elif interv.room %}{{ interv.room.name }}{% else %}Localisation générale{% endif %}
|
||||
<i class="bi bi-hdd"></i>
|
||||
{% if interv.equipment %}
|
||||
{{ interv.equipment.name[:40] }}{% if interv.equipment.name|length > 40 %}…{% endif %}
|
||||
{% elif interv.room %}
|
||||
{{ interv.room.name }}
|
||||
{% else %}
|
||||
Localisation non renseignée
|
||||
{% endif %}
|
||||
{% if interv.assigned_to %}
|
||||
· <i class="bi bi-person-badge"></i> {{ interv.assigned_to.full_name }}
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
<tr>
|
||||
<td>{{ intervention.scheduled_date if intervention.scheduled_date else '-' }}</td>
|
||||
<td><a href="{{ url_for('interventions.detail', id=intervention.id) }}">{{ intervention.title }}</a></td>
|
||||
<td>{{ intervention.equipment.name if intervention.equipment else '-' }}</td>
|
||||
<td>{{ intervention.equipment.name if intervention.equipment else ('Salle : ' ~ intervention.room.name if intervention.room else 'Localisation non renseignée') }}</td>
|
||||
<td><span class="badge bg-{{ 'danger' if intervention.priority == 'haute' else 'warning' if intervention.priority == 'normale' else 'secondary' }}">{{ intervention.priority }}</span></td>
|
||||
<td><span class="badge bg-info">{{ intervention.status }}</span></td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -129,7 +129,14 @@
|
|||
</div>
|
||||
<div class="fw-bold text-dark">#{{ interv.id }} — {{ interv.title[:80] }}{% if interv.title|length > 80 %}…{% endif %}</div>
|
||||
<div class="text-muted" style="font-size:0.8rem;">
|
||||
<i class="bi bi-hdd"></i> {{ interv.equipment.name[:40] }}{% if interv.equipment.name|length > 40 %}…{% endif %}
|
||||
<i class="bi bi-hdd"></i>
|
||||
{% if interv.equipment %}
|
||||
{{ interv.equipment.name[:40] }}{% if interv.equipment.name|length > 40 %}…{% endif %}
|
||||
{% elif interv.room %}
|
||||
{{ interv.room.name }}
|
||||
{% else %}
|
||||
Localisation non renseignée
|
||||
{% endif %}
|
||||
{% if interv.assigned_to %}
|
||||
· <i class="bi bi-person-badge"></i> {{ interv.assigned_to.full_name }}
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
<div style="min-width:0;">
|
||||
<strong class="text-truncate d-block">#{{ interv.id }} — {{ interv.title[:60] }}{% if interv.title|length > 60 %}…{% endif %}</strong>
|
||||
<small class="text-muted">
|
||||
<i class="bi bi-hdd"></i> {{ interv.equipment.name[:30] }}
|
||||
<i class="bi bi-hdd"></i> {{ interv.equipment.name[:30] if interv.equipment else ('Salle : ' ~ interv.room.name if interv.room else 'Localisation non renseignée') }}
|
||||
{% if interv.frequency_days %}
|
||||
· <i class="bi bi-arrow-repeat"></i> {{ frequency_labels.get(interv.frequency_days, interv.frequency_days ~ "j") }}
|
||||
{% endif %}
|
||||
|
|
@ -98,7 +98,7 @@
|
|||
<div style="min-width:0;">
|
||||
<strong class="text-truncate d-block">#{{ interv.id }} — {{ interv.title[:60] }}{% if interv.title|length > 60 %}…{% endif %}</strong>
|
||||
<small class="text-muted">
|
||||
<i class="bi bi-hdd"></i> {{ interv.equipment.name[:30] }}
|
||||
<i class="bi bi-hdd"></i> {{ interv.equipment.name[:30] if interv.equipment else ('Salle : ' ~ interv.room.name if interv.room else 'Localisation non renseignée') }}
|
||||
{% if interv.frequency_days %}
|
||||
· <i class="bi bi-arrow-repeat"></i> {{ frequency_labels.get(interv.frequency_days, interv.frequency_days ~ "j") }}
|
||||
{% endif %}
|
||||
|
|
@ -126,7 +126,7 @@
|
|||
<div style="min-width:0;">
|
||||
<strong class="text-truncate d-block">#{{ interv.id }} — {{ interv.title[:60] }}{% if interv.title|length > 60 %}…{% endif %}</strong>
|
||||
<small class="text-muted">
|
||||
<i class="bi bi-hdd"></i> {{ interv.equipment.name[:30] }}
|
||||
<i class="bi bi-hdd"></i> {{ interv.equipment.name[:30] if interv.equipment else ('Salle : ' ~ interv.room.name if interv.room else 'Localisation non renseignée') }}
|
||||
{% if interv.frequency_days %}
|
||||
· <i class="bi bi-arrow-repeat"></i> {{ frequency_labels.get(interv.frequency_days, interv.frequency_days ~ "j") }}
|
||||
{% endif %}
|
||||
|
|
@ -154,7 +154,7 @@
|
|||
<div style="min-width:0;">
|
||||
<strong class="text-truncate d-block">#{{ interv.id }} — {{ interv.title[:60] }}{% if interv.title|length > 60 %}…{% endif %}</strong>
|
||||
<small class="text-muted">
|
||||
<i class="bi bi-hdd"></i> {{ interv.equipment.name[:30] }}
|
||||
<i class="bi bi-hdd"></i> {{ interv.equipment.name[:30] if interv.equipment else ('Salle : ' ~ interv.room.name if interv.room else 'Localisation non renseignée') }}
|
||||
{% if interv.frequency_days %}
|
||||
· <i class="bi bi-arrow-repeat"></i> {{ frequency_labels.get(interv.frequency_days, interv.frequency_days ~ "j") }}
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue