IT882
This commit is contained in:
@@ -219,3 +219,23 @@ function get_session_idle_timeout(): int {
|
||||
return in_array($timeout, $validTimeouts, true) ? $timeout : 1800;
|
||||
}
|
||||
|
||||
/**
|
||||
* Haalt de beheerbare dagblokkade-redenen op (bijv. Vakantie, Verlof, Ziek, Focusdag, ADV).
|
||||
* Standaard voorzien van een duidelijke titel, emoji-icoon en actief-status.
|
||||
*/
|
||||
function get_calendar_block_reasons(): array {
|
||||
$defaultReasons = [
|
||||
['code' => 'VACATION', 'title' => 'Vakantie', 'icon' => '🏖️', 'is_active' => 1],
|
||||
['code' => 'LEAVE', 'title' => 'Verlof / Vrij', 'icon' => '✈️', 'is_active' => 1],
|
||||
['code' => 'SICK', 'title' => 'Ziek / Afwezig', 'icon' => '🤒', 'is_active' => 1],
|
||||
['code' => 'FOCUS', 'title' => 'Focusdag', 'icon' => '🎯', 'is_active' => 1],
|
||||
['code' => 'ADV', 'title' => 'ADV Dag', 'icon' => '📋', 'is_active' => 1],
|
||||
];
|
||||
|
||||
$saved = get_system_setting('calendar_block_reasons', null);
|
||||
if (is_array($saved) && !empty($saved)) {
|
||||
return $saved;
|
||||
}
|
||||
return $defaultReasons;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user