improved duration and minute selector (#2264)

* do not close modal if form is dirty
* deprecated TimesheetConfiguration
* inject timezone in form types
* cleanup usage of UserDateTimeFactory
* allow to configure increment steps for minutes
* use 15 minutes step for datetimepicker in project edit form
* use rounding rules for increments in minute select for begin and end
* allow duration in multi user and admin timesheet forms
* make dropdown values configurable
This commit is contained in:
Kevin Papst
2021-01-17 14:04:13 +01:00
committed by GitHub
parent e2324b7d51
commit 8d72d114c7
95 changed files with 1381 additions and 510 deletions

View File

@@ -89,7 +89,7 @@ class SystemConfigurationControllerTest extends ControllerBaseTest
$configService = static::$kernel->getContainer()->get(SystemConfiguration::class);
$this->assertEquals('default', $configService->find('timesheet.mode'));
$this->assertEquals(true, $configService->find('timesheet.rules.allow_future_times'));
$this->assertTrue($configService->find('timesheet.rules.allow_future_times'));
$this->assertEquals(1, $configService->find('timesheet.active_entries.hard_limit'));
$this->assertEquals(1, $configService->find('timesheet.active_entries.soft_limit'));
@@ -117,8 +117,8 @@ class SystemConfigurationControllerTest extends ControllerBaseTest
$configService = static::$kernel->getContainer()->get(SystemConfiguration::class);
$this->assertEquals('duration_only', $configService->find('timesheet.mode'));
$this->assertEquals(false, $configService->find('timesheet.rules.allow_future_times'));
$this->assertEquals(false, $configService->find('timesheet.rules.allow_overlapping_records'));
$this->assertFalse($configService->find('timesheet.rules.allow_future_times'));
$this->assertFalse($configService->find('timesheet.rules.allow_overlapping_records'));
$this->assertEquals(99, $configService->find('timesheet.active_entries.hard_limit'));
$this->assertEquals(77, $configService->find('timesheet.active_entries.soft_limit'));
}
@@ -247,7 +247,7 @@ class SystemConfigurationControllerTest extends ControllerBaseTest
$this->assertAccessIsGranted($client, '/admin/system-config/');
$configService = static::$kernel->getContainer()->get(SystemConfiguration::class);
$this->assertEquals(false, $configService->find('timesheet.markdown_content'));
$this->assertFalse($configService->find('timesheet.markdown_content'));
$this->assertEquals('selectpicker', $configService->find('theme.select_type'));
$form = $client->getCrawler()->filter('form[name=system_configuration_form_theme]')->form();
@@ -267,7 +267,7 @@ class SystemConfigurationControllerTest extends ControllerBaseTest
$configService = static::$kernel->getContainer()->get(SystemConfiguration::class);
$this->assertEquals('selectpicker', $configService->find('theme.select_type'));
$this->assertEquals(true, $configService->find('timesheet.markdown_content'));
$this->assertTrue($configService->find('timesheet.markdown_content'));
}
public function testUpdateThemeConfigValidation()