added drag and drop for new records via calendar (#1962)

This commit is contained in:
Kevin Papst
2020-09-17 01:13:48 +02:00
committed by GitHub
parent 14b3de4300
commit 9ef32e75c5
82 changed files with 2808 additions and 385 deletions

View File

@@ -52,6 +52,34 @@ class SystemConfigurationTest extends TestCase
'country' => 'FR',
],
],
'calendar' => [
'businessHours' => [
'days' => [2, 4, 6],
'begin' => '07:49',
'end' => '19:27'
],
'day_limit' => 20,
'slot_duration' => '01:11:00',
'week_numbers' => false,
'visibleHours' => [
'begin' => '06:00:00',
'end' => '21:00:43',
],
'google' => [
'api_key' => 'wertwertwegsdfbdf243w567fg8ihuon',
'sources' => [
'holidays' => [
'id' => 'de.german#holiday@group.v.calendar.google.com',
'color' => '#ccc',
],
'holidays_en' => [
'id' => 'en.german#holiday@group.v.calendar.google.com',
'color' => '#fff',
],
]
],
'weekends' => true,
]
];
}
@@ -65,6 +93,7 @@ class SystemConfigurationTest extends TestCase
(new Configuration())->setName('timesheet.markdown_content')->setValue('1'),
(new Configuration())->setName('timesheet.active_entries.hard_limit')->setValue('7'),
(new Configuration())->setName('timesheet.active_entries.soft_limit')->setValue('3'),
(new Configuration())->setName('calendar.slot_duration')->setValue('00:30:00'),
];
}
@@ -110,4 +139,30 @@ class SystemConfigurationTest extends TestCase
]);
$this->assertEquals('hello', $sut->find('foo'));
}
public function testCalendarWithoutLoader()
{
$sut = $this->getSut($this->getDefaultSettings(), []);
$this->assertEquals([2, 4, 6], $sut->getCalendarBusinessDays());
$this->assertEquals('07:49', $sut->getCalendarBusinessTimeBegin());
$this->assertEquals('19:27', $sut->getCalendarBusinessTimeEnd());
$this->assertEquals('06:00:00', $sut->getCalendarTimeframeBegin());
$this->assertEquals('21:00:43', $sut->getCalendarTimeframeEnd());
$this->assertEquals('01:11:00', $sut->getCalendarSlotDuration());
$this->assertEquals(20, $sut->getCalendarDayLimit());
$this->assertFalse($sut->isCalendarShowWeekNumbers());
$this->assertTrue($sut->isCalendarShowWeekends());
$this->assertEquals('wertwertwegsdfbdf243w567fg8ihuon', $sut->getCalendarGoogleApiKey());
$sources = $sut->getCalendarGoogleSources();
$this->assertEquals(2, \count($sources));
}
public function testCalendarWithLoader()
{
$sut = $this->getSut($this->getDefaultSettings(), $this->getDefaultLoaderSettings());
$this->assertEquals('00:30:00', $sut->getCalendarSlotDuration());
$sources = $sut->getCalendarGoogleSources();
$this->assertEquals(2, \count($sources));
}
}