* added unit tests and documentation #112 * fixed DashboardController * added CONTRIBUTION guidelines * fixed license year
This commit is contained in:
@@ -1,6 +1,24 @@
|
||||
kimai:
|
||||
timesheet:
|
||||
rounding: 15
|
||||
|
||||
# Rounding rules are used to round the begin & end dates and the duration for timesheet records.
|
||||
# The "default" rule will round "begin" down and "end" up to the full minute, the "duration" will not be rounded.
|
||||
# Please read var/docs/configurations.md to find out more about rounding rules
|
||||
rounding:
|
||||
default:
|
||||
days: ['monday','tuesday','wednesday','thursday','friday','saturday','sunday']
|
||||
begin: 1
|
||||
end: 1
|
||||
duration: 0
|
||||
|
||||
# If you want to apply different hourly rates for specific weekdays, you can uncomment the "rates" configuration.
|
||||
# The "weekend" rule will add 50% to each timesheet entry that will be recorded on "saturdays" or "sundays".
|
||||
# Please read var/docs/configurations.md to find out more about rates rules
|
||||
# rates:
|
||||
# weekend:
|
||||
# days: ['saturday','sunday']
|
||||
# factor: 1.5
|
||||
|
||||
invoice:
|
||||
renderer:
|
||||
default: 'App\Controller\InvoiceController::invoiceAction'
|
||||
|
||||
@@ -33,7 +33,7 @@ services:
|
||||
|
||||
App\Invoice\ServiceInvoice:
|
||||
class: App\Invoice\ServiceInvoice
|
||||
arguments: ['%kimai.invoice%', '@service_container']
|
||||
arguments: ['%kimai.invoice%']
|
||||
|
||||
# a route listener, that injects the locale through a URL directory
|
||||
App\EventSubscriber\RedirectToLocaleSubscriber:
|
||||
@@ -53,20 +53,14 @@ services:
|
||||
tags:
|
||||
- { name: doctrine.event_subscriber }
|
||||
|
||||
# updates timesheet records, to make sure they are calculated and can't be manipulated by the users
|
||||
# updates timesheet records and apply configured rate & rounding rules
|
||||
App\Doctrine\TimesheetSubscriber:
|
||||
class: App\Doctrine\TimesheetSubscriber
|
||||
arguments: [!tagged timesheet.calculator]
|
||||
tags:
|
||||
- { name: doctrine.event_listener, event: prePersist, lazy: true }
|
||||
- { name: doctrine.event_listener, event: preUpdate, lazy: true }
|
||||
|
||||
# Uncomment the following lines to define a service for the Timesheet Doctrine repository
|
||||
#
|
||||
# app.timesheet_repository:
|
||||
# class: Doctrine\ORM\EntityRepository
|
||||
# factory: ['@doctrine.orm.entity_manager', getRepository]
|
||||
# arguments: [App\Entity\Timesheet]
|
||||
|
||||
# ================================================================================
|
||||
# FORMS
|
||||
# ================================================================================
|
||||
@@ -85,17 +79,12 @@ services:
|
||||
App\Twig\Extensions:
|
||||
arguments: ['%app_locales%']
|
||||
|
||||
# avanzu_admin_theme.navbar_task_listener:
|
||||
# class: "%avanzu_admin_theme.navbar_task_listener.class%"
|
||||
# tags:
|
||||
# - { name: kernel.event_listener, event: theme.tasks, method: onListTasks }
|
||||
#
|
||||
# avanzu_admin_theme.navbar_notify_listener:
|
||||
# class: "%avanzu_admin_theme.navbar_notify_listener.class%"
|
||||
# tags:
|
||||
# - { name: kernel.event_listener, event: theme.notifications, method: onListNotifications }
|
||||
#
|
||||
# avanzu_admin_theme.navbar_msg_listener:
|
||||
# class: "%avanzu_admin_theme.navbar_msg_listener.class%"
|
||||
# tags:
|
||||
# - { name: kernel.event_listener, event: theme.messages, method: onListMessages }
|
||||
# ================================================================================
|
||||
# TIMESHEET RECORD CALCULATOR
|
||||
# ================================================================================
|
||||
|
||||
App\Timesheet\Calculator\DurationCalculator:
|
||||
arguments: ["%kimai.timesheet.rounding%"]
|
||||
|
||||
App\Timesheet\Calculator\RateCalculator:
|
||||
arguments: ["%kimai.timesheet.rates%"]
|
||||
|
||||
Reference in New Issue
Block a user