# ---------------------------------------------------------------------------------------------
# DO NOT EDIT THIS FILE, INSTEAD CREATE THE FILE "local.yaml" AND ADD YOUR SETTINGS IN THERE.
# See https://www.kimai.org/documentation/configurations.html
#
# Be aware that this file is YAML format and the indentation is important.
# Each config level needs to be indented with 4 additional spaces.
# ---------------------------------------------------------------------------------------------
kimai:

# --------------------------------------------------------------------------------
# AUTHENTICATION
# You can disable some user management functions in the authentication screens.
# Both settings default to "true", see https://www.kimai.org/documentation/users.html
# --------------------------------------------------------------------------------
#    user:
#        registration: false
#        password_reset: false
# --------------------------------------------------------------------------------


# --------------------------------------------------------------------------------
# TIME-TRACKING
# All configs related to time-tracking, timesheets and record management
# --------------------------------------------------------------------------------
    timesheet:

        # renders timesheet descriptions with markdown
        markdown_content: false

        # The time-tracking mode that should be used.
        # See https://www.kimai.org/documentation/timesheet.html#tracking-modes
        # mode: default

        # The default time to pre-fill the "create timesheet" form (in some cases).
        # This setting is only respected by some timetracking modes and not in all situations.
        #
        # Accepted formats, see
        # - https://www.php.net/manual/en/datetime.formats.php
        # - https://www.php.net/manual/en/datetime.formats.time.php
        # default_begin: now

        # 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.
        # Find out more about rounding rules at https://www.kimai.org/documentation/timesheet.html
        rounding:
            default:
                days: ['monday','tuesday','wednesday','thursday','friday','saturday','sunday']
                begin: 1
                end: 1
                duration: 0
                mode: default

#       # 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".
#       # See documentation at: https://www.kimai.org/documentation/timesheet.html#rate-calculation
#        rates:
#            weekend:
#                days: ['saturday','sunday']
#                factor: 1.5
#
#        # If you want to limit the max. active entries per user, you can do it here.
#        # The soft_limit is used as theme setting and displays a warning color if the user has reached X active recordings
#        # The hard_limit is used to detect how many active records are allowed per user:
#        # - by default a user can only have one active time-record: it is automatically stopped when a new one is started
#        # - when hard_limit is > 1 and the user is trying to start a new entry after reaching the limit, a warning is shown
#        #   and the user has to stop an active entry first
#        active_entries:
#            soft_limit: 1
#            hard_limit: 3
#
#        # Rules that define timesheet validation and behaviour
#        rules:
#            # whether records in the future can be created
#            allow_future_times: true
# --------------------------------------------------------------------------------


# --------------------------------------------------------------------------------
# PERMISSIONS
# Find out more about the configurable permission system at:
# https://www.kimai.org/documentation/permissions.html
# --------------------------------------------------------------------------------
    permissions:
        # mapping complex rule sets of single permissions to named "sets" ("set name" = [array of "permissions and sets"])
        sets:
            ACTIVITIES: ['view_activity','create_activity','edit_activity','budget_activity','delete_activity']
            PROJECTS: ['view_project','create_project','edit_project','budget_project','delete_project']
            CUSTOMERS: ['view_customer','create_customer','edit_customer','budget_customer','delete_customer']
            INVOICE: ['view_invoice','create_invoice']
            INVOICE_TEMPLATE: ['view_invoice_template','create_invoice_template','edit_invoice_template','delete_invoice_template']
            TIMESHEET: ['view_own_timesheet','start_own_timesheet','stop_own_timesheet','create_own_timesheet','edit_own_timesheet','export_own_timesheet','delete_own_timesheet']
            TIMESHEET_OTHER: ['view_other_timesheet','start_other_timesheet','stop_other_timesheet','create_other_timesheet','edit_other_timesheet','export_other_timesheet','delete_other_timesheet']
            PROFILE: ['view_own_profile','edit_own_profile','password_own_profile','preferences_own_profile','api-token_own_profile']
            PROFILE_OTHER: ['view_other_profile','edit_other_profile','delete_other_profile','password_other_profile','roles_other_profile','preferences_other_profile','api-token_other_profile']
            TAGS: ['view_tag','delete_tag']
            USER: ['view_user','create_user','delete_user','role_permissions']
            RATE: ['view_rate_own_timesheet','edit_rate_own_timesheet']
            RATE_OTHER: ['view_rate_other_timesheet','edit_rate_other_timesheet']
            EXPORT: ['view_export','create_export','edit_export_own_timesheet','edit_export_other_timesheet']
            ROLE_USER: ['@TIMESHEET','@PROFILE']
            ROLE_TEAMLEAD: ['@INVOICE','@TIMESHEET','@TIMESHEET_OTHER','@PROFILE','@EXPORT','@TAGS','@INVOICE_TEMPLATE','!delete_invoice_template','view_rate_own_timesheet','view_rate_other_timesheet','hourly-rate_own_profile']
            ROLE_ADMIN: ['@ACTIVITIES','@PROJECTS','@CUSTOMERS','@INVOICE','@INVOICE_TEMPLATE','@TIMESHEET','@TIMESHEET_OTHER','@PROFILE','@RATE','@RATE_OTHER','@EXPORT','@TAGS','hourly-rate_own_profile','edit_exported_timesheet']
            ROLE_SUPER_ADMIN: ['@ACTIVITIES','@PROJECTS','@CUSTOMERS','@INVOICE','@INVOICE_TEMPLATE','@TIMESHEET','@TIMESHEET_OTHER','@PROFILE','@PROFILE_OTHER','@USER','@RATE','@RATE_OTHER','@EXPORT','@TAGS','hourly-rate_own_profile','hourly-rate_other_profile','delete_own_profile','roles_own_profile','system_information','system_configuration','plugins','edit_exported_timesheet']
        # mapping "sets" or permissions to user roles ("role name" = [array of "set names"])
        maps:
            ROLE_USER: ['ROLE_USER']
            ROLE_TEAMLEAD: ['ROLE_TEAMLEAD']
            ROLE_ADMIN: ['ROLE_ADMIN']
            ROLE_SUPER_ADMIN: ['ROLE_SUPER_ADMIN']
        # add or remove single permissions
        roles:
            ROLE_USER: []
            ROLE_TEAMLEAD: []
            ROLE_ADMIN: []
            ROLE_SUPER_ADMIN: []
# --------------------------------------------------------------------------------


# --------------------------------------------------------------------------------
# CALENDAR Configuration
# See documentation at https://www.kimai.org/documentation/calendar.html
# --------------------------------------------------------------------------------
#    calendar:
#        week_numbers: true
#        weekends: true
#        day_limit: 4
#        businessHours:
#            days: [1, 2, 3, 4, 5]
#            begin: '08:00'
#            end: '18:00'
#        visibleHours:
#            begin: '00:00'
#            end: '24:00'
#
#        # You can configure unlimited google calendars to display events for your company (e.g. holidays)
#        google:
#            api_key: 'your-restricted-google-api-key'
#            sources:
#                holidays:
#                    id: 'de.german#holiday@group.v.calendar.google.com'
#                    color: '#ccc'
# --------------------------------------------------------------------------------


# --------------------------------------------------------------------------------
# INVOICES
# --------------------------------------------------------------------------------
#    invoice:
#        # all files in these directories will be used as invoice documents (if supported by a renderer)
#        documents:
#            - 'var/invoices/'
#            - 'templates/invoice/renderer/'
# --------------------------------------------------------------------------------


# --------------------------------------------------------------------------------
# THEME Settings
# will be available as twig globals at "kimai_context.*".
# See documentation at https://www.kimai.org/documentation/theme.html
# --------------------------------------------------------------------------------
#    theme:
#        # BETA test: If you set this to 'selectpicker' the customer/project/activity select boxes will be transformed
#        # into a searchable and javascript enhanced input type
#        select_type: ~
# --------------------------------------------------------------------------------


# --------------------------------------------------------------------------------
# DASHBOARD
# Using the configurable widget sections.
# See documentation at https://www.kimai.org/documentation/dashboard.html
# --------------------------------------------------------------------------------
    dashboard:
        user_duration:
            title: dashboard.you
            order: 10
            permission: ROLE_USER
            type: 'compoundChart'
            widgets: [DailyWorkingTimeChart, userDurationToday, userDurationWeek, userDurationMonth, userDurationYear]
        user_rates:
            title: ~
            order: 20
            permission: view_rate_own_timesheet
            widgets: [userAmountToday, userAmountWeek, userAmountMonth, userAmountYear]
        duration:
            title: dashboard.all
            order: 30
            permission: ROLE_TEAMLEAD
            widgets: [durationToday, durationWeek, durationMonth, durationYear]
        active_users:
            title: ~
            order: 40
            permission: ROLE_TEAMLEAD
            widgets: [activeUsersToday, activeUsersWeek, activeUsersMonth, activeUsersYear]
        rates:
            title: ~
            order: 50
            permission: view_rate_other_timesheet
            widgets: [amountToday, amountWeek, amountMonth, amountYear]
# --------------------------------------------------------------------------------


# --------------------------------------------------------------------------------
# LANGUAGES
# Locale specific settings, like date formats
# --------------------------------------------------------------------------------
    languages:
        de:
            date_time_type: 'dd.MM.yyyy HH:mm'
            date_type: 'dd.MM.yyyy'
            date: 'd.m.Y'
            date_time: 'd.m. H:i'
            duration: '%%h:%%m h'
        en:
            date_time_type: 'yyyy-MM-dd HH:mm'
            date_type: 'yyyy-MM-dd'
            date: 'Y-m-d'
            date_time: 'm-d H:i'
            duration: '%%h:%%m h'
        pt_BR:
            date_time_type: 'dd-MM-yyyy HH:mm'
            date_type: 'dd-MM-yyyy'
            date: 'd-m-Y'
            date_time: 'd-m H:i'
            duration: '%%h:%%m h'
        it:
            date_time_type: 'dd.MM.yyyy HH:mm'
            date_type: 'dd.MM.yyyy'
            date: 'd.m.Y'
            date_time: 'd.m. H:i'
            duration: '%%h:%%m h'
        fr:
            date_time_type: 'dd/MM/yyyy HH:mm'
            date_type: 'dd/MM/yyyy'
            date: 'd/m/Y'
            date_time: 'd/m H:i'
            duration: '%%h h %%m'
        es:
            date_time_type: 'dd.MM.yyyy HH:mm'
            date_type: 'dd.MM.yyyy'
            date: 'd.m.Y'
            date_time: 'd.m. H:i'
            duration: '%%h:%%m h'
        ru:
            date_time_type: 'dd.MM.yyyy HH:mm'
            date_type: 'dd.MM.yyyy'
            date: 'd.m.Y'
            date_time: 'd.m. H:i'
            duration: '%%h:%%m h'
        ar:
            date_time_type: 'yyyy-MM-dd HH:mm'
            date_type: 'yyyy-MM-dd'
            date: 'Y-m-d'
            date_time: 'm-d H:i'
            duration: '%%h:%%m h'
        hu:
            date_time_type: 'yyyy.MM.dd. HH:mm'
            date_type: 'yyyy.MM.dd.'
            date: 'Y.m.d.'
            date_time: 'm.d. H:i'
            duration: '%%h:%%m h'
        sv:
            date_time_type: 'yyyy-MM-dd HH:mm'
            date_type: 'yyyy-MM-dd'
            date: 'Y-m-d'
            date_time: 'm-d H:i'
            duration: '%%h:%%m tim'
        ja:
            date_time_type: 'yyyy-MM-dd HH:mm'
            date_type: 'yyyy-MM-dd'
            date: 'Y-m-d'
            date_time: 'm-d H:i'
            duration: '%%h:%%m tim'
        sk:
            date_time_type: 'dd. MM. yyyy HH:mm'
            date_type: 'dd. MM. yyyy'
            date: 'd. m. Y'
            date_time: 'd. m.  H:i'
            duration: '%%h:%%m h'

# --------------------------------------------------------------------------------


# --------------------------------------------------------------------------------
# FORMS
# Default settings used to populate forms
# --------------------------------------------------------------------------------
#    defaults:
#        customer:
#            timezone: Europe/Berlin
#            country: DE
#            currency: EUR
#        user:
#            timezone: Europe/Berlin
#            language: de
#            theme: blue-light
# --------------------------------------------------------------------------------


# --------------------------------------------------------------------------------
# STORAGE
# If you want to use directories outside the Kimai directory, change these
# --------------------------------------------------------------------------------
    data_dir: '%kernel.project_dir%/var/data'
    plugin_dir: '%kernel.project_dir%/var/plugins'
# --------------------------------------------------------------------------------
