<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=2740041&amp;fmt=gif">
Skip to content
English
  • There are no suggestions because the search field is empty.

Configuration of Absence and Vacation Functions in config.js

Configuration Server Setup

The config.json contains global, customer-specific settings for the respective Can Do instance.

The parameters described below cover the following areas:

  • Vacation and absences
  • Public holidays
  • Vacation Year Planning
  • Approvals
  • Documents and SharePoint
  • Skills

The settings generally apply to the entire customer instance.

Working Contract parameters are not part of this documentation. They are documented separately and may contain additional employee-specific rules for vacation, absences and working time.

SetUp Working Contracts

After changing the config.json, the application must be reloaded. Depending on the browser cache, a hard refresh may be required.


Default Working Hours per Day

Parameter: general.defaultWorkingHoursPerDay
Type: Number
Default Value: 8

Defines the standard length of a working day in hours.

The value is used if no corresponding working time is available for an employee through the Working Contract.

It is used, among other things, for:

  • converting absence days into hours,
  • determining expected working hours in Time Tracking,
  • the Work Time Model.

Example:
Value 8 → One standard working day corresponds to 8 hours.


Available Countries for Public Holidays

Parameter: general.loadOnlyAvailableCountries
Type: Boolean
Default Value: true

Controls which countries are available for selection under Admin → Holidays.

true
Only countries for which public holiday data is available are displayed.

false
All countries are available for selection.


Refresh Interval for Pending Approvals

Parameter: general.pendingApprovalsCheckIntervalSeconds
Type: Number
Default Value: 600

Defines how often the application checks for new pending approval requests.

The value is specified in seconds.

Example:
Value 600 → The check is performed every 10 minutes.

After a request has been approved or rejected, the display is also refreshed immediately.


Public Holidays – Range of Years to Load

Parameter: holidays.rangeOfYearsToFetch
Type: Number
Default Value: 5

Defines how many years before and after the current year are loaded in the Holidays administration.

Example:
Value 5 → Public holidays are loaded for the current year, five previous years and five future years.

A larger range provides more historical and future public holiday data but may increase loading time.


Absences – Basic Settings: Sick Leave Type

Parameter: absences.sickLeaveTypeID
Type: ID
Default Value: 3

Defines which absence type is treated as Sick Leave by the application.

This type receives the specific Sick Leave logic, for example for reasons and documents.

The ID must match the corresponding absence type configured in the backend.


Special Leave Type

Parameter: absences.specialLeaveTypeID
Type: ID
Default Value: 4

Defines which absence type is treated as Special Leave.

The specific Special Leave rules, for example for reasons, documents and approvals, are applied to this type.

The ID must match the corresponding absence type configured in the backend.


Available Years in the Absence Overview

Parameter: absences.yearsDropdownRangeFromCurrent
Type: Number
Default Value: 5

Defines how many years before and after the current year can be selected in the Absence overview.

Example:
Value 5 → The current year, five previous years and five future years are available for selection.

If the value is 0 or the parameter is not present, only the current year is available.


Part of Day for Half-Day Absences

Parameter: absences.halfDayTimeMandatory
Type: Boolean
Default Value: true

Controls whether a part of the day must additionally be selected for a half-day absence.

true
The user must select Morning or Afternoon. Morning is selected by default. The selected part of the day is also displayed in the approval.

false
The absence is recorded as a half day without specifying a part of the day.


Absence Module in Read-Only Mode

Parameter: absences.interfaceMode
Type: Boolean
Default Value: false

Controls whether absences can be applied for and cancelled in the Absence module.

false
The module can be fully used according to the user's permissions.

true
The module is in read-only mode. Absences can still be viewed, but the functions for applying for and cancelling absences are disabled.


Access to Other Employees' Absences – Selecting Other Employees

Parameter: absences.allowSpecialGroupsToSeeAllAbsences
Type: Boolean
Default Value: true

Controls which users can select other employees in the Absence overview.

true
Members of the HR group as well as department leaders and deputies can select other employees for the different absence types. This selection is not available to other users.

false
The selection of other employees is only available in the Sick Leave view.

This parameter controls the visibility and selection of other employees. The permission to actually create or cancel an absence on behalf of another employee is controlled separately.


Special HR Permissions

Parameter: absences.HRGroupSpecialPermissions
Type: Boolean
Default Value: true

Controls special permissions for members of the HR group.

true
Only members of the HR group may enter or cancel absences on behalf of other employees.

Department leaders and deputies lose this permission even if the employee's Working Contract would normally allow them to perform these actions.

In addition, members of the HR group are exempt from the restriction on absences in the past.

false
No special HR permissions apply.

The regular permission rules, including the rules defined in the respective Working Contract, are applied.


Restriction for Past Absences

Parameter: absences.limitDepartmentLeadersToFutureOnly
Type: Boolean
Default Value: true

Controls whether absences can be applied for or cancelled for dates in the past.

true
Absences can only be applied for or cancelled for the current day or future dates.

If a date in the past is selected, a corresponding message is displayed and the absence cannot be submitted.

false
The restriction is disabled.

Note:
Despite the parameter name, the restriction currently applies to all users and not only to department leaders.

If HRGroupSpecialPermissions = true, members of the HR group are exempt from this restriction.


Vacation and Special Leave Overbooking

The Config does not determine whether overbooking is generally permitted. This rule is defined in the respective Working Contract.

The following parameters only control whether the user must provide an additional confirmation when an otherwise permitted overbooking occurs.

Vacation Overbooking Confirmation

Parameter: absences.vacationOverbookingConfirmationMandatory
Type: Boolean
Default Value: true

Controls whether an overbooking of the vacation entitlement must be explicitly confirmed by the user.

true
If the request exceeds the remaining vacation entitlement and overbooking is permitted according to the Working Contract, a confirmation dialog is displayed before the request is submitted.

false
The request can be submitted without an additional confirmation.


Special Leave Overbooking Confirmation

Parameter: absences.specialLeaveOverbookingConfirmationMandatory
Type: Boolean
Default Value: false

Provides the corresponding confirmation logic for Special Leave.

true
A permitted overbooking must additionally be confirmed.

false
No additional confirmation is required.


Special Vacation Phases

These settings are relevant for vacation models that use multiple vacation entitlements or special phases.

Automatic Optimization of Special Phases

Parameter: absences.optimizeSpecialPhasesAutomatically
Type: Boolean
Default Value: false

Controls whether the allocation of vacation to the available special vacation phases is automatically optimized.

true
After an absence has been approved or automatically approved, the allocation across the available phases for the respective year is automatically re-optimized.

The optimization is performed in the background.

false
No automatic optimization is performed.


Vacation Year Planning – Available Years

Parameter: vacation-year-planning.yearsDropdownRangeFromCurrent
Type: Number
Default Value: 5

Defines which years can be selected in Vacation Year Planning.

Example:
Value 5 → Five previous years, the current year and five future years are available.


Manual Optimization of Special Vacation Phases

Parameter: vacation-year-planning.showSpecialPhasesOptimizeButton
Type: Boolean
Default Value: false

Controls whether the Optimize button is displayed in Vacation Year Planning.

true
The Optimize button is displayed. It can be used to manually re-optimize the allocation of vacation to the available special vacation phases.

The button is available for employees with more than one phase.

false
The Optimize button is not displayed.


Documents for Absences – Use SharePoint Upload

Parameter: absences.useSharePointUpload
Type: Boolean
Default Value: true

Defines how documents for absences are generally provided.

true
Documents are uploaded using the SharePoint upload functionality.

false
Instead of uploading a document, a link to the document is entered.

For customers without a configured SharePoint integration, this parameter must be disabled accordingly.


SharePoint Upload for Sick Leave

Parameter: absences.useSharePointUploadForSickLeave
Type: Boolean
Default Value: true

Controls the use of SharePoint specifically for Sick Leave.

The parameter is only taken into account if:

absences.useSharePointUpload = true

true → SharePoint upload is used.
false → The link-based input is used for Sick Leave.


SharePoint Upload for Special Leave

Parameter: absences.useSharePointUploadForSpecialLeave
Type: Boolean
Default Value: true

Controls the use of SharePoint specifically for Special Leave.

The parameter is only taken into account if:

absences.useSharePointUpload = true

true → SharePoint upload is used.
false → The link-based input is used for Special Leave.


Document Category Mapping

The documentCategoryMapping defines which SharePoint document category uploaded documents are assigned to.

Sick Leave

Parameter: documentCategoryMapping.absence["3"]
Default Value: 2

Documents for absence type 3 are assigned to the Absences document category.

The ID used must match absences.sickLeaveTypeID.


Special Leave

Parameter: documentCategoryMapping.absence["4"]
Default Value: 2

Documents for absence type 4 are also assigned to the Absences document category.

The ID used must match absences.specialLeaveTypeID.


Skill Documents

Parameter: documentCategoryMapping.skill.default
Default Value: 1

Defines the default document category for documents uploaded in connection with Skills.

By default, these documents are assigned to the Skills category.


SharePoint Configuration – Allowed File Types

Parameter: sharepoint-config.allowedFileExtensions

Defines which file types an administrator can allow when configuring a document category.

The following file types are available by default:

pdf, jpg, jpeg, png, docx

File extensions that are not included here cannot be selected for a document category.


Can Do Document Categories

Parameter: sharepoint-config.candoCategoryTypes

Defines the document categories available in the SharePoint configuration.

By default:

  • 0 – Other
  • 1 – Skills
  • 2 – Absences

The categories are used, among other things, by the documentCategoryMapping.


Maximum File Size

Parameter: sharepoint-config.maxFileSizeMbDefault
Type: Number
Default Value: 25

Defines the default maximum file size when creating a new document category.

The value also represents the highest file size that can be configured for a document category.

The value is specified in MB.


Approval View – Absences

The following parameters determine which additional information is displayed in the approval view for absences.

They do not change the approval logic and only control the information displayed.

Parameter Function Default
approve-requests.absences.showConflict Display conflict/risk information true
approve-requests.absences.showDaysApplied Display originally requested days true
approve-requests.absences.showDaysEffective Display effectively calculated absence days true
approve-requests.absences.showDocuments Display documents or document links true
approve-requests.absences.showReason Display absence reason true
approve-requests.absences.showRemainingDaysForSickLeave Display remaining Sick Leave entitlement true
approve-requests.absences.showRemainingDaysForSpecialLeave Display remaining Special Leave entitlement false

Approval View – Skills

The following parameters control which information is displayed for Skill approval requests.

Parameter Function Default
approve-requests.skills.showCertificate Display attached certificate true
approve-requests.skills.showDisapprovalReason Display the disapproval reason field/information true
approve-requests.skills.showDocuments Display attached documents true
approve-requests.skills.showFavourite Display the Favourite Skill indicator true
approve-requests.skills.showLevel Display the numeric Skill Level true
approve-requests.skills.showLevelName Display the Skill Level name true
approve-requests.skills.showPath Display the path in which the Skill is stored true
approve-requests.skills.showCategoryName Display the parent category true

These settings only affect the information displayed for Skill requests in the approval view.


Important Dependencies

Sick Leave Type and Document Category

absences.sickLeaveTypeID

and the corresponding key under

documentCategoryMapping.absence

must use the same absence type ID.

In the standard configuration, this is ID 3.


Special Leave Type and Document Category

absences.specialLeaveTypeID

and the corresponding key under

documentCategoryMapping.absence

must also match.

In the standard configuration, this is ID 4.


SharePoint

The three parameters

absences.useSharePointUpload

absences.useSharePointUploadForSickLeave

absences.useSharePointUploadForSpecialLeave

must be configured according to the available SharePoint integration.

The two absence-type-specific parameters only apply when the general SharePoint upload is enabled.


Overbooking

The Config parameters

vacationOverbookingConfirmationMandatory

and

specialLeaveOverbookingConfirmationMandatory

only determine whether an otherwise permitted overbooking must additionally be confirmed.

Whether overbooking is generally permitted is not defined by these Config parameters but by the Working Contract.


Special Vacation Phases

absences.optimizeSpecialPhasesAutomatically

controls automatic optimization.

vacation-year-planning.showSpecialPhasesOptimizeButton

additionally provides manual optimization in Vacation Year Planning.

Both settings are particularly relevant for vacation models with multiple vacation entitlements or special phases that are valid at the same time.