Files
sprawozdania/project/templates/schedule/index.html.twig
T
2024-07-25 10:54:27 +02:00

46 lines
2.6 KiB
Twig

{% extends 'base.html.twig' %}
{% import 'navigation/switch_months.html.twig' as navigation %}
{% block title %}Harmonogramy{% endblock %}
{% block body %}
{# {{ navigation.month_menu('app_schedule',months,currentMonth) }}#}
<div class="row row-cols-2 reports-months-all">
<div class="col">
<a href="{{ path('app_schedule', {typeId:2}) }}" class="card text-center text-white {% if typeId == 2 %}bg-primary{% else %}bg-secondary{% endif %}">
<div class="card-title"><h2>Zaległe</h2></div>
</a>
{# <a href="{{ path('app_schedule', {monthId:-1}) }}" class="btn {% if currentMonth is null %}btn-success{% else %}btn-secondary{% endif %}">Zaległe</a>#}
</div>
<div class="col">
<a href="{{ path('app_schedule', {typeId:1}) }}" class="card text-center text-white {% if typeId == 1 %}bg-primary{% else %}bg-secondary{% endif %}">
<div class="card-title"><h2>Aktualne</h2></div>
</a>
{# <a href="{{ path('app_schedule', {monthId:-1}) }}" class="btn {% if currentMonth is null %}btn-success{% else %}btn-secondary{% endif %}">Zaległe</a>#}
</div>
{# <div class="col">#}
{# <a href="{{ path('app_schedule', {monthId:1}) }}" class="btn {% if currentMonth is null %}btn-success{% else %}btn-secondary{% endif %}">Aktualne</a>#}
{# </div>#}
</div>
<div class="row row-cols-auto reports-all">
{% for schedule in schedules %}
<div class="col">
<div class="card text-white bg-{{ schedule.getStatus.backgroundColor }}">
<div class="card-body">
<h5 class="card-title">
<a href="{{ path('app_client',{id: schedule.client.id}) }}" class="link-dark">{{ schedule.client.strName }}</a>
</h5>
<h6 class="card-subtitle text-muted">Pozostały czas: {{ schedule.getTimeLeft }} dni</h6>
</div>
<div class="card-footer">
<form action="{{ path('app_schedule_status') }}" method="post">
<input type="hidden" name="token" value="{{ csrf_token('schedule-status') }}">
<input type="hidden" name="scheduleId" value="{{ schedule.id }}">
<button type="submit" class="btn btn-success">Wysłano</button>
</form>
</div>
</div>
</div>
{% endfor %}
</div>
{% endblock %}