2025-08-12 13:33:25 +03:00

40 lines
1.6 KiB
HTML

{% if rooms %}
{% for room in rooms %}
<div class="d-flex justify-content-between align-items-center py-2 border-bottom">
<div>
<strong>{{ room.room_number }}</strong>
{% if room.current_case %}
<br><small class="text-muted">{{ room.current_case.patient.get_full_name }}</small>
{% else %}
<br><small class="text-muted">{{ room.get_room_type_display }}</small>
{% endif %}
</div>
<div class="text-end">
{% if room.status == 'AVAILABLE' %}
<span class="badge bg-success">Available</span>
{% elif room.status == 'OCCUPIED' %}
<span class="badge bg-danger">Occupied</span>
{% elif room.status == 'CLEANING' %}
<span class="badge bg-warning">Cleaning</span>
{% elif room.status == 'MAINTENANCE' %}
<span class="badge bg-info">Maintenance</span>
{% elif room.status == 'OUT_OF_SERVICE' %}
<span class="badge bg-secondary">Out of Service</span>
{% endif %}
</div>
</div>
{% endfor %}
<div class="text-center mt-3">
<a href="{% url 'operating_theatre:room_list' %}" class="btn btn-outline-secondary btn-sm">
Manage Rooms
</a>
</div>
{% else %}
<div class="text-center py-3">
<i class="fas fa-door-open fa-2x text-muted mb-2"></i>
<p class="text-muted mb-0">No operating rooms configured</p>
<small class="text-muted">Add operating rooms to get started</small>
</div>
{% endif %}