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

@@ -43,7 +43,7 @@ abstract class AbstractUserPeriodControllerTestCase extends AbstractControllerBa
public static function getTestData(): array
{
return [
[4, 'duration', 'Working hours total'],
[4, 'duration', 'Total'],
[4, 'rate', 'Total revenue'],
[4, 'internalRate', 'Internal price'],
];
@@ -98,6 +98,6 @@ abstract class AbstractUserPeriodControllerTestCase extends AbstractControllerBa
$select = $client->getCrawler()->filterXPath("//select[@id='user']");
self::assertEquals(0, $select->count());
$cell = $client->getCrawler()->filterXPath("//th[contains(@class, 'reportDataTypeTitle')]");
self::assertEquals('Working hours total', $cell->text());
self::assertEquals('Total', $cell->text());
}
}

View File

@@ -43,7 +43,7 @@ abstract class AbstractUsersPeriodControllerTestCase extends AbstractControllerB
public static function getTestData(): array
{
return [
['duration', 'Working hours total'],
['duration', 'Total'],
['rate', 'Total revenue'],
['internalRate', 'Internal price'],
];

View File

@@ -64,7 +64,7 @@ class ExtensionsTest extends TestCase
public function testGetFunctions(): void
{
$functions = ['report_date', 'class_name', 'iso_day_by_name', 'random_color'];
$functions = ['date_range', 'report_date', 'class_name', 'iso_day_by_name', 'random_color'];
$sut = $this->getSut();
$twigFunctions = $sut->getFunctions();
self::assertCount(\count($functions), $twigFunctions);
@@ -221,6 +221,25 @@ sdfsdf' . PHP_EOL . "\n" .
self::assertEquals($expected, $sut->replaceNewline($input, $replacer));
}
public function testReportDate(): void
{
$sut = $this->getSut();
$begin = new \DateTimeImmutable('2025-02-01 17:13:45');
$end = new \DateTimeImmutable('2025-02-25 06:10:00');
self::assertEquals('2025-02-01 - 2025-02-25', $sut->buildDateRange($begin, $end));
}
public function testFormatReportDate(): void
{
$sut = $this->getSut();
$date = new \DateTimeImmutable('2024-07-23 17:13:45');
self::assertEquals('2024-07-23', $sut->formatReportDate($date));
}
public function testGetRandomColor(): void
{
$sut = $this->getSut();