Added timesheet-calendar view (#236)

This commit is contained in:
Kevin Papst
2018-07-27 20:19:56 +02:00
committed by GitHub
parent 5ccc1c991b
commit e6f8bc8ae2
40 changed files with 1286 additions and 49 deletions

View File

@@ -159,3 +159,47 @@ kimai:
days: ['saturday','sunday']
factor: 1.5
```
### Timesheet - Calendar view (kimai.yaml)
The calendar view look and feel can be be configured with the config keys below `kimai.calendar`:
```yaml
kimai:
calendar:
week_numbers: true
day_limit: 4
businessHours:
days: [1, 2, 3, 4, 5]
begin: '08:00'
end: '20:00'
```
- `week_numbers` - whether week numbers should be displayed in the monthly view (default: true)
- `day_limit` defined the max amount of items to be displayed for one day in the monthly view (default: 4)
- `businessHours.days` defines your working days, which will be highlighted in the weekly and daily view. counting starts with sunday and the index 0, so 1 = monday, ..., 6 = saturday. (default: 1-5 / monday to friday)
- `businessHours.begin` the start time of your working day, which will be highlighted in the weekly and daily view (default: 08:00 / 8am)
- `businessHours.end` the end time of your working day, which will be highlighted in the weekly and daily view (default: 20:00 / 8pm)
#### Integrating google calender
If you want to embed Google calendar events e.g. to display regional holidays or company partys you can import (multiple) Google calendars.
- read how to obtain your [Google API key and find the Calender ID](https://fullcalendar.io/docs/google-calendar)
- add the optional `kimai.calendar.google` configuration
- you can add any number of sources under the `kimai.calendar.google.sources` node, each must have its own name (like `holidays` and `company` in this example)
```yaml
kimai:
calendar:
google:
api_key: 'your-restricted-google-api-key'
sources:
holidays:
id: 'de.german#holiday@group.v.calendar.google.com'
color: '#ccc'
company:
id: 'de.german#holiday@group.v.calendar.google.com'
color: '#cc0000'
```

View File

@@ -16,4 +16,12 @@ The `duration` field supports entering data in the following formats:
| Natural | {hours}h{minutes}m[{seconds}s] | Seconds are optional, overflow is supported for every field | `2h27m` = 2 Hours, 27 Minutes / `3h143m13s` = 5 Hours, 23 Minutes, 13 Seconds |
| Seconds | {seconds} | | `3600` = 1 Hour / `8820` = 2 Hours, 27 Minutes |
Please note: if time rounding is activated (which is the default behaviour), then your entered seconds might be removed after submitting the form.
Please note: if time rounding is activated (which is the default behaviour), then your entered seconds might be removed after submitting the form.
## Calendar view
Kimai 2 provides a calendar view, which displays your timesheet entries in a easy readable format.
You can choose between a monthly, weekly and daily view.
It's also possible to include further [Google calendar sources](configurations.md) from Google, e.g. if you want to display regional holidays.

View File

@@ -54,5 +54,5 @@ If you want to deactivate this feature you have to change the following configs:
If you want to configure the behaviour (like the allowed time between multiple retries) then configure the settings:
- in `config/packages/fos_user.yaml` the key below `fos_user.registration.resetting` (see [documentation](http://symfony.com/doc/current/bundles/FOSUserBundle/configuration_reference.html))
- in `config/packages/fos_user.yaml` the key below `fos_user.registration.resetting` (see [documentation](https://symfony.com/doc/current/bundles/FOSUserBundle/configuration_reference.html))
- the values `retry_ttl` and `token_ttl` are configured in seconds (7220 = 2 hours)