fix not shown timer preferences

This commit is contained in:
ralf 2022-10-21 12:49:18 +02:00
parent 1ecc7b729a
commit 03580169c1

View File

@ -161,11 +161,8 @@ class timesheet_hooks
*/ */
static function settings() static function settings()
{ {
$settings = array(); $settings = [
if (is_null(self::$timesheet_bo)) self::$timesheet_bo = new timesheet_bo(); 'workingtime_session' => [
if (self::$timesheet_bo->status_labels)
{
$settings['workingtime_session'] = array(
'type' => 'select', 'type' => 'select',
'label' => 'Ask to start and stop working time with session', 'label' => 'Ask to start and stop working time with session',
'name' => 'workingtime_session', 'name' => 'workingtime_session',
@ -176,7 +173,11 @@ class timesheet_hooks
'help' => 'Would you like to be asked, to start and stop working time, when login in or off', 'help' => 'Would you like to be asked, to start and stop working time, when login in or off',
'xmlrpc' => True, 'xmlrpc' => True,
'admin' => False, 'admin' => False,
); ],
];
if (is_null(self::$timesheet_bo)) self::$timesheet_bo = new timesheet_bo();
if (self::$timesheet_bo->status_labels)
{
$settings['predefined_status'] = array( $settings['predefined_status'] = array(
'type' => 'select', 'type' => 'select',
'label' => 'Status of created timesheets', 'label' => 'Status of created timesheets',