Only one running timesheet: automatically stop others (#386)

This commit is contained in:
Lukas
2019-01-21 12:49:22 +01:00
committed by Kevin Papst
parent 5539f68a54
commit 47ac50b4d0
18 changed files with 215 additions and 77 deletions

View File

@@ -134,6 +134,26 @@ admin_lte:
## Timesheets (kimai.yaml)
### Limit active entries
To limit the amount of active entries each user can have, the configuration `active_entries` can be changed:
```yaml
kimai:
timesheet:
active_entries:
soft_limit: 1
hard_limit: 3
```
The `soft_limit` is used as theme setting (formerly "kimai.theme.active_warning") to display a warning if the user has at least X active recordings.
The `hard_limit` is used to detect how many active records are allowed per user (by default 3 active time-records are allowed).
If `hard_limit` is 1, the active record is automatically stopped when a new one is started.
When `hard_limit` is greater than 1 and as soon as the limit is reached, the user has to manually stop at least one active
entry (an error message is shown, indicating why it is not possible to start another one).
### Descriptions with Markdown
The description for every timesheet entry can be formatted in two different ways, configured with the `markdown_content` setting.

View File

@@ -29,15 +29,9 @@ Therefor your feedback is highly welcome, please post your opinion at GitHub.
## Active entries warning
A small colored warning sign will be shown, if a user has more than 3 active timesheet entries.
A small colored warning sign will be shown, if a user has more than X active timesheet entries.
You can change this soft limit by setting the config key `kimai.theme.active_warning` in your `local.yaml`:
```yaml
kimai:
theme:
active_warning: 2
```
The amount `X` is configured in your `local.yaml` with the setting `timesheet.active_entries.soft_limit` (see [configurations.md](configurations.md)).
## Colors
@@ -56,7 +50,7 @@ Possible values are:
### Fallback color
Whenever a color is required but none is configured, Kimai uses a fallback language from the config key `kimai.theme.box_color`.
Whenever a color is required but none is configured, Kimai uses a fallback color from the config key `kimai.theme.box_color`.
You can change the default color `green` to any one from the above in your `local.yaml`: