major fixes
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{% import 'navigation/switch_months.html.twig' as navigation %}
|
||||
{% import 'reports/listInclude.html.twig' as sets %}
|
||||
{% block body %}
|
||||
{{ navigation.month_menu('app_base',months,currentMonth,countOverdueLeft) }}
|
||||
{{ navigation.month_menu('app_base',months,currentMonth,countOverdueLeft,clientId,client) }}
|
||||
<div class="
|
||||
row
|
||||
d-flex
|
||||
@@ -17,41 +17,7 @@
|
||||
<h3 class="card-header">{{ reports.status.takeLang }}</h3>
|
||||
<div class="card-body">
|
||||
{% for report in reports.reports %}
|
||||
<div class="card text-{{ reports.status.textColor }} report-one {{ reports.status.name | lower }}">
|
||||
<div class="report-number">
|
||||
<div class="badge bg-{{ reports.status.takeBadgeBg }} text-dark" data-toggle="tooltip" data-placement="bottom" title="Numer sprawozdania">{{ report.number }}</div>
|
||||
</div>
|
||||
{% if enum(reports.status, 'COMPLETE') and false %}
|
||||
<div class="report-mark-uncompleted">
|
||||
|
||||
<form action="{{ path('app_set_status_todo',{id:report.id}) }}" method="post">
|
||||
<input type="hidden" name="token" value="{{ csrf_token('report-status') }}">
|
||||
<input type="hidden" name="unDone" value="1">
|
||||
<button type="submit" class="badge bg-danger" data-toggle="tooltip" data-placement="bottom" title="Oznacz jako nie zakończone"><i class="fa fa-solid fa-remove"></i></button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="card-header">
|
||||
<h5 class="card-title">
|
||||
{% if is_granted('clientView') %}
|
||||
<a href="{{ path('app_client',{id: report.client.id}) }}" >{{ report.client.strName }}</a>
|
||||
{% else %}
|
||||
{{ report.client.strName }}
|
||||
{% endif %}
|
||||
</h5>
|
||||
</div>
|
||||
{# {% if not enum(reports.status, 'COMPLETE') %}#}
|
||||
<div class="card-body">
|
||||
<p class="card-text">{{ sets.statusForm(report, reportToDoList, reports.status) }}</p>
|
||||
</div>
|
||||
{# {% endif %}#}
|
||||
{% if enum(reports.status, 'WORKING') %}
|
||||
<div class="card-footer bg-transparent">
|
||||
{{ sets.progress(report, reportToDoList|length) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ sets.cardView(report, reports.status, reportToDoList) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,19 +4,6 @@
|
||||
<div class="btn-group" role="group" aria-label="Todos">
|
||||
{% for todo in reportToDoList %}
|
||||
<button type="submit" class="btn-check" name="{{ todo.value }}" value='1' id="checkboxToDo{{ todo.value }}Id{{ report.id }}"></button>
|
||||
{# <input onchange="this.form.submit()"#}
|
||||
{# name="{{ todo.value }}"#}
|
||||
{# type="checkbox"#}
|
||||
{# class="btn-check"#}
|
||||
{# id="checkboxToDo{{ todo.value }}Id{{ report.id }}"#}
|
||||
{# {% if report.isReportsTodo(todo) %}#}
|
||||
{# checked="checked"#}
|
||||
{# {% endif %}#}
|
||||
{# {% if not is_granted('reportEdit') %}#}
|
||||
{# disabled#}
|
||||
{# {% endif %}#}
|
||||
{# autocomplete="off"#}
|
||||
{# >#}
|
||||
<label class="btn
|
||||
{% if report.isReportsTodo(todo) %}
|
||||
btn-{{ reportEnum.checkboxColor }}
|
||||
@@ -46,4 +33,40 @@
|
||||
<strong>{{ percentageProgress }}%</strong>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro cardView(report, groupStatus, reportToDoList) %}
|
||||
<div class="card text-{{ groupStatus.textColor }} report-one {{ groupStatus.name | lower }}" data-report_id="{{ report.id }}">
|
||||
<div class="report-number">
|
||||
<div class="badge bg-{{ groupStatus.takeBadgeBg }} text-dark" data-toggle="tooltip" data-placement="bottom" title="Numer sprawozdania">{{ report.number }}</div>
|
||||
</div>
|
||||
{% if enum(groupStatus, 'COMPLETE') and false %}
|
||||
<div class="report-mark-uncompleted">
|
||||
<form action="{{ path('app_set_status_todo',{id:report.id}) }}" method="post">
|
||||
<input type="hidden" name="token" value="{{ csrf_token('report-status') }}">
|
||||
<input type="hidden" name="unDone" value="1">
|
||||
<button type="submit" class="badge bg-danger" data-toggle="tooltip" data-placement="bottom" title="Oznacz jako nie zakończone"><i class="fa fa-solid fa-remove"></i></button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="card-header">
|
||||
<h5 class="card-title">
|
||||
{% if is_granted('clientView') %}
|
||||
<a href="{{ path('app_client',{id: report.client.id}) }}" >{{ report.client.strName }}</a>
|
||||
{% else %}
|
||||
{{ report.client.strName }}
|
||||
{% endif %}
|
||||
</h5>
|
||||
</div>
|
||||
{# {% if not enum(groupStatus, 'COMPLETE') %}#}
|
||||
<div class="card-body">
|
||||
<p class="card-text">{{ _self.statusForm(report, reportToDoList, groupStatus) }}</p>
|
||||
</div>
|
||||
{# {% endif %}#}
|
||||
{% if enum(groupStatus, 'WORKING') %}
|
||||
<div class="card-footer bg-transparent">
|
||||
{{ _self.progress(report, reportToDoList|length) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
Reference in New Issue
Block a user