feat: group resources into rooms on the floor plan

This commit is contained in:
fromme committed 2026-09-14 08:25:05 +02:00
1 parent faef4d70a8
commit 8caf618950
14 files changed
+653 -34

No files matched your search

+12 -5
View File
@@ -16,10 +16,17 @@
{# The lane between the two rows. #}
<line x1="265" y1="36" x2="265" y2="310" class="stroke-gray-200" stroke-width="2" stroke-dasharray="6 6"></line>
{% for resource in resources %}
{% if resource.svgElementId and geometry[resource.svgElementId] is defined %}
{{ plan.spot(spots[resource.id], geometry[resource.svgElementId], 200, 78,
selected_date, is_past, time_params) }}
{% endif %}
{#
The car park is one area, so nothing here is grouped and every spot arrives in the single
null-group entry -- which is why this plan keeps drawing its own frame above instead of
letting room() do it. See board/plan/_desk.html.twig for the grouped case.
#}
{% for spot_group in spot_groups %}
{% for spot in spot_group.spots %}
{% if spot.resource.svgElementId and geometry[spot.resource.svgElementId] is defined %}
{{ plan.spot(spot, geometry[spot.resource.svgElementId], 200, 78,
selected_date, is_past, time_params) }}
{% endif %}
{% endfor %}
{% endfor %}
</svg>