@if($tickets !== null && count($tickets) == 0)
{!! file_get_contents(ROOT . "/dist/images/svg/undraw_a_moment_to_relax_bbpa.svg") !!}
{{ __("headlines.no_todos_this_week") }}
{{ __("text.take_the_day_off") }}
{{ __("links.goto_backlog") }}
@endif
@foreach ($tickets as $ticketGroup)
@php
//Get first duedate if exist
$ticketCreationDueDate = '';
if (isset($ticketGroup['tickets'][0]) && $ticketGroup['tickets'][0]['dateToFinish'] != "0000-00-00 00:00:00" && $ticketGroup['tickets'][0]['dateToFinish'] != "1969-12-31 00:00:00") {
//Use the first due date as the new due date
$ticketCreationDueDate = $ticketGroup['tickets'][0]['dateToFinish'];
}
$groupProjectId = $_SESSION['currentProject'];
if ($groupBy == 'project' && isset($ticketGroup['tickets'][0])) {
$groupProjectId = $ticketGroup['tickets'][0]['projectId'];
}
@endphp