Prevent bookings with same start / stop time (#3304)

This commit is contained in:
Lukas Steinmann
2022-05-17 11:12:08 +02:00
committed by GitHub
parent f409ce5364
commit 27c60d9fc4
15 changed files with 266 additions and 1 deletions

View File

@@ -93,6 +93,7 @@ class SystemConfigurationControllerTest extends ControllerBaseTest
$configService = static::$kernel->getContainer()->get(SystemConfiguration::class);
$this->assertEquals('default', $configService->find('timesheet.mode'));
$this->assertTrue($configService->find('timesheet.rules.allow_future_times'));
$this->assertTrue($configService->find('timesheet.rules.allow_zero_duration'));
$this->assertEquals(1, $configService->find('timesheet.active_entries.hard_limit'));
$form = $client->getCrawler()->filter('form[name=system_configuration_form_timesheet]')->form();
@@ -102,6 +103,7 @@ class SystemConfigurationControllerTest extends ControllerBaseTest
['name' => 'timesheet.mode', 'value' => 'duration_only'],
['name' => 'timesheet.active_entries.default_begin', 'value' => '23:59'],
['name' => 'timesheet.rules.allow_future_times', 'value' => false],
['name' => 'timesheet.rules.allow_zero_duration', 'value' => true],
['name' => 'timesheet.rules.allow_overlapping_records', 'value' => false],
['name' => 'timesheet.rules.allow_overbooking_budget', 'value' => false],
['name' => 'timesheet.active_entries.hard_limit', 'value' => 99],
@@ -168,6 +170,7 @@ class SystemConfigurationControllerTest extends ControllerBaseTest
['name' => 'timesheet.mode', 'value' => 'foo'],
['name' => 'timesheet.active_entries.default_begin', 'value' => '23:59'],
['name' => 'timesheet.rules.allow_future_times', 'value' => 1],
['name' => 'timesheet.rules.allow_zero_duration', 'value' => 1],
['name' => 'timesheet.rules.allow_overlapping_records', 'value' => 1],
['name' => 'timesheet.rules.allow_overbooking_budget', 'value' => 1],
['name' => 'timesheet.active_entries.hard_limit', 'value' => -1],
@@ -176,7 +179,7 @@ class SystemConfigurationControllerTest extends ControllerBaseTest
],
[
'#system_configuration_form_timesheet_configuration_0_value', // mode
'#system_configuration_form_timesheet_configuration_5_value', // hard_limit
'#system_configuration_form_timesheet_configuration_6_value', // hard_limit
],
true
);