feat: assign tags to exercises and show muscle distribution of workout

This commit is contained in:
Peter Stockings
2026-01-30 23:53:04 +11:00
parent 78f4a53c49
commit d03581bff4
10 changed files with 278 additions and 60 deletions

View File

@@ -1,5 +1,5 @@
<tr>
<td class="p-4 whitespace-nowrap text-sm font-semibold text-gray-900">
<td class="p-4 whitespace-nowrap text-sm font-semibold text-gray-900 w-1/5">
{% if is_edit|default(false, true) == false %}
{{ name }}
{% else %}
@@ -8,7 +8,35 @@
type="text" name="name" value="{{ name }}">
{% endif %}
</td>
<td class="p-4 whitespace-nowrap text-sm font-semibold text-gray-900 float-right">
<td class="p-4 text-sm text-gray-900 w-3/5">
{% if is_edit|default(false, true) == false %}
<div class="flex flex-wrap gap-2">
{% for attr in attributes %}
<span
class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800"
title="{{ attr.category_name }}">
{{ attr.attribute_name }}
</span>
{% endfor %}
</div>
{% else %}
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
{% for cat_name, options in all_attributes.items() %}
<div>
<label class="block text-xs font-semibold text-gray-500 uppercase mb-1">{{ cat_name }}</label>
{{ render_partial('partials/custom_select.html',
name='attribute_ids',
options=options,
multiple=true,
search=true,
placeholder='Select ' ~ cat_name
)}}
</div>
{% endfor %}
</div>
{% endif %}
</td>
<td class="p-4 whitespace-nowrap text-sm font-semibold text-gray-900 w-1/5 float-right">
{% if is_edit|default(false, true) == false %}
<button
class="inline-flex justify-center p-2 text-blue-600 rounded-full cursor-pointer hover:bg-blue-100 dark:text-blue-500 dark:hover:bg-gray-600"