[TASK] improve functionality cox_needed filter
This commit is contained in:
		| @@ -29,7 +29,15 @@ | |||||||
|  |  | ||||||
|   {% for day in days %} |   {% for day in days %} | ||||||
|   {% set amount_trips = day.planned_events | length + day.trips | length %} |   {% set amount_trips = day.planned_events | length + day.trips | length %} | ||||||
|   <div class="bg-white p-3 rounded-md flex justify-between flex-col shadow" style="min-height: 10rem;" data-trips="{{ amount_trips }}" data-month="{{ day.day| date(format='%m') }}"> |   {% set_global day_cox_needed = false %} | ||||||
|  |   {% if day.planned_events | length > 0 %}  | ||||||
|  |    {% for planned_event in day.planned_events %} | ||||||
|  |       {% if planned_event.cox_needed %} | ||||||
|  |         {% set_global day_cox_needed = true %} | ||||||
|  |       {% endif %} | ||||||
|  |    {% endfor %} | ||||||
|  |   {% endif %} | ||||||
|  |   <div class="bg-white p-3 rounded-md flex justify-between flex-col shadow" style="min-height: 10rem;" data-trips="{{ amount_trips }}" data-month="{{ day.day| date(format='%m') }}" data-coxneeded="{{ day_cox_needed }}"> | ||||||
|     <div> |     <div> | ||||||
|       <h2 class="font-bold uppercase tracking-wide text-center text-primary-950 text-lg">{{ day.day| date(format="%d.%m.%Y") }} |       <h2 class="font-bold uppercase tracking-wide text-center text-primary-950 text-lg">{{ day.day| date(format="%d.%m.%Y") }} | ||||||
|         <small class="inline-block ml-1 text-xs text-gray-400">{{ day.day | date(format="%A", locale="de_AT") }}</small>   |         <small class="inline-block ml-1 text-xs text-gray-400">{{ day.day | date(format="%A", locale="de_AT") }}</small>   | ||||||
| @@ -39,7 +47,7 @@ | |||||||
|       {% if day.planned_events | length > 0 %} |       {% if day.planned_events | length > 0 %} | ||||||
|       <div class="grid grid-cols-1 gap-3 divide-y mb-3"> |       <div class="grid grid-cols-1 gap-3 divide-y mb-3"> | ||||||
|         {% for planned_event in day.planned_events %} |         {% for planned_event in day.planned_events %} | ||||||
|         <div class="pt-2" data-coxneeded="{{ planned_event.cox_needed }}"> |         <div class="pt-2"> | ||||||
|           <div class="flex justify-between items-center"> |           <div class="flex justify-between items-center"> | ||||||
|             <div> |             <div> | ||||||
|               <strong class="text-primary-900">{{ planned_event.planned_starting_time }} Uhr</strong> <small |               <strong class="text-primary-900">{{ planned_event.planned_starting_time }} Uhr</strong> <small | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Marie Birner
					Marie Birner