allow to configure the amount of recent activity rows in an empty week (#3026)

This commit is contained in:
Kevin Papst
2021-12-16 16:58:10 +01:00
committed by GitHub
parent 3621b8c27c
commit 04fc954769
74 changed files with 270 additions and 656 deletions

View File

@@ -266,8 +266,7 @@ final class SystemConfigurationController extends AbstractController
}
}
$authentication = (new SystemConfigurationModel())
->setSection(SystemConfigurationModel::SECTION_AUTHENTICATION)
$authentication = (new SystemConfigurationModel('authentication'))
->setConfiguration([
(new Configuration())
->setName('user.login')
@@ -319,9 +318,8 @@ final class SystemConfigurationController extends AbstractController
$authentication->getConfigurationByName('user.password_reset_token_ttl')->setEnabled(false);
}
$configurationModels = [
(new SystemConfigurationModel())
->setSection(SystemConfigurationModel::SECTION_TIMESHEET)
return [
(new SystemConfigurationModel('timesheet'))
->setConfiguration([
(new Configuration())
->setName('timesheet.mode')
@@ -387,8 +385,20 @@ final class SystemConfigurationController extends AbstractController
->setType(YesNoType::class)
->setOptions(['help' => 'default_value_new', 'label' => 'label.billable']),
]),
(new SystemConfigurationModel())
->setSection(SystemConfigurationModel::SECTION_LOCKDOWN)
(new SystemConfigurationModel('quick_entry'))
->setTranslation('quick_entry.title')
->setTranslationDomain('messages')
->setConfiguration([
(new Configuration())
->setName('quick_entry.recent_activities')
->setType(IntegerType::class)
->setTranslationDomain('system-configuration')
->setRequired(false)
->setConstraints([
new Range(['min' => 0, 'max' => 20]),
]),
]),
(new SystemConfigurationModel('lockdown_period'))
->setConfiguration([
(new Configuration())
->setName('timesheet.rules.lockdown_period_start')
@@ -417,8 +427,7 @@ final class SystemConfigurationController extends AbstractController
->setConstraints([new DateTimeFormat()])
->setTranslationDomain('system-configuration'),
]),
(new SystemConfigurationModel())
->setSection(SystemConfigurationModel::SECTION_ROUNDING)
(new SystemConfigurationModel('rounding'))
->setConfiguration([
(new Configuration())
->setName('timesheet.rounding.default.mode')
@@ -450,8 +459,9 @@ final class SystemConfigurationController extends AbstractController
->setType(WeekDaysType::class)
->setTranslationDomain('system-configuration'),
]),
(new SystemConfigurationModel())
->setSection(SystemConfigurationModel::SECTION_FORM_INVOICE)
(new SystemConfigurationModel('invoice'))
->setTranslation('invoices')
->setTranslationDomain('messages')
->setConfiguration([
// TODO that should be a custom type with validation
(new Configuration())
@@ -468,8 +478,7 @@ final class SystemConfigurationController extends AbstractController
->setTranslationDomain('system-configuration'),
]),
$authentication,
(new SystemConfigurationModel())
->setSection(SystemConfigurationModel::SECTION_FORM_CUSTOMER)
(new SystemConfigurationModel('customer'))
->setConfiguration([
(new Configuration())
->setName('defaults.customer.timezone')
@@ -488,8 +497,7 @@ final class SystemConfigurationController extends AbstractController
->setType(CurrencyType::class)
->setOptions(['help' => 'default_value_new']),
]),
(new SystemConfigurationModel())
->setSection(SystemConfigurationModel::SECTION_FORM_USER)
(new SystemConfigurationModel('user'))
->setConfiguration([
(new Configuration())
->setName('defaults.user.timezone')
@@ -518,8 +526,7 @@ final class SystemConfigurationController extends AbstractController
->setType(CheckboxType::class)
->setTranslationDomain('system-configuration'),
]),
(new SystemConfigurationModel())
->setSection(SystemConfigurationModel::SECTION_THEME)
(new SystemConfigurationModel('theme'))
->setConfiguration([
(new Configuration())
->setName('theme.autocomplete_chars')
@@ -557,8 +564,9 @@ final class SystemConfigurationController extends AbstractController
->setType(CheckboxType::class)
->setTranslationDomain('system-configuration'),
]),
(new SystemConfigurationModel())
->setSection(SystemConfigurationModel::SECTION_CALENDAR)
(new SystemConfigurationModel('calendar'))
->setTranslation('calendar')
->setTranslationDomain('messages')
->setConfiguration([
(new Configuration())
->setName('calendar.week_numbers')
@@ -599,8 +607,7 @@ final class SystemConfigurationController extends AbstractController
->setType(IntegerType::class)
->setConstraints([new Range(['min' => 0, 'max' => 20]), new NotNull()]),
]),
(new SystemConfigurationModel())
->setSection(SystemConfigurationModel::SECTION_BRANDING)
(new SystemConfigurationModel('branding'))
->setConfiguration([
(new Configuration())
->setName('theme.branding.logo')
@@ -632,7 +639,5 @@ final class SystemConfigurationController extends AbstractController
->setOptions(['input' => 'string']),
]),
];
return $configurationModels;
}
}