Release 2.31 (#5372)

* simplify translation
* bump version
* deprecate translations
* pass date-range as argument to export and timesheet filter URL from monthly overview report
* added class for use in responsive screens
* show technical role name
* simplify multi-update title
* more statistic models
* bump composer packages
This commit is contained in:
Kevin Papst
2025-02-27 17:41:25 +01:00
committed by GitHub
parent 674bf3a6b5
commit 14cdcd3f63
20 changed files with 364 additions and 251 deletions

View File

@@ -11,6 +11,7 @@ namespace App\Twig;
use App\Constants;
use App\Entity\EntityWithMetaFields;
use App\Form\Type\DateRangeType;
use App\Utils\Color;
use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;
@@ -37,6 +38,7 @@ final class Extensions extends AbstractExtension
public function getFunctions(): array
{
return [
new TwigFunction('date_range', [$this, 'buildDateRange']),
new TwigFunction('report_date', [$this, 'buildReportDate']),
new TwigFunction('class_name', [$this, 'getClassName']),
new TwigFunction('iso_day_by_name', [$this, 'getIsoDayByName']),
@@ -90,6 +92,11 @@ final class Extensions extends AbstractExtension
return $dateTime->format(self::REPORT_DATE);
}
public function buildDateRange(\DateTimeInterface $begin, \DateTimeInterface $end): string
{
return $begin->format(self::REPORT_DATE) . DateRangeType::DATE_SPACER . $end->format(self::REPORT_DATE);
}
public function getIsoDayByName(string $weekDay): int
{
$key = array_search(