Only one running timesheet: automatically stop others (#386)
This commit is contained in:
@@ -85,7 +85,6 @@ class Configuration implements ConfigurationInterface
|
||||
->end()
|
||||
->defaultValue([])
|
||||
->end()
|
||||
|
||||
->arrayNode('rates')
|
||||
->requiresAtLeastOneElement()
|
||||
->useAttributeAsKey('key')
|
||||
@@ -112,6 +111,30 @@ class Configuration implements ConfigurationInterface
|
||||
->end()
|
||||
->defaultValue([])
|
||||
->end()
|
||||
->arrayNode('active_entries')
|
||||
->addDefaultsIfNotSet()
|
||||
->children()
|
||||
->integerNode('soft_limit')
|
||||
->defaultValue(1)
|
||||
->validate()
|
||||
->ifTrue(function ($value) {
|
||||
return $value <= 0;
|
||||
})
|
||||
->thenInvalid('The soft_limit must be at least 1')
|
||||
->end()
|
||||
->end()
|
||||
->integerNode('hard_limit')
|
||||
->defaultValue(1)
|
||||
->validate()
|
||||
->ifTrue(function ($value) {
|
||||
return $value <= 0;
|
||||
})
|
||||
->thenInvalid('The hard_limit must be at least 1')
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
;
|
||||
|
||||
@@ -212,6 +235,7 @@ class Configuration implements ConfigurationInterface
|
||||
->children()
|
||||
->integerNode('active_warning')
|
||||
->defaultValue(3)
|
||||
->setDeprecated('The node "%node%" at path "%path%" is deprecated, please use "kimai.timesheet.active_entries.soft_limit" instead.')
|
||||
->end()
|
||||
->scalarNode('box_color')
|
||||
->defaultValue('green')
|
||||
|
||||
Reference in New Issue
Block a user