Posting Details Salary Indication Now Optional
Please note that there has been further changes in version 2.3 for salary indication and this document is now outdated. Please refer to Posting Details Salary Indication Further Changes 2.3 Changelog for the latest updates. The new changes are marked in green text.
During ordering of a campaign, user had to enter the following values into the campaignForm
for Salary Indication:
postingDetails.salaryIndication.range.from
(optional)postingDetails.salaryIndication.range.to
(previously required)postingDetails.salaryIndication.range.currency
(optional)postingDetails.salaryIndication.period
(previously required)
HAPI Backend made changes to allow passing of the below during campaign order request:
Example
postingDetails: {
salaryIndication: null
}
// OR
postingDetails: {
salaryIndication: {
range: {
from: null,
to: null,
currency: null
},
period: null
}
}
This change is backwards compatible, meaning, any ATS that is prefilling salaryIndication
as part of the campaignForm
will not be affected.
For ATSs that integrate with HAPI Elements, who wants to make salary indication optional, will need to remove their prefill (or pass data like on the example, which is automatically done by Elements on initial load thus if you don't prefill it, you can ignore this)
As part of this change, the validators for salaryIndication
are no longer static, meaning that, the validations depend on whether user entered a value into from
or to
values. To allow for dynamic validations, a new computed variable has been added to orderJourney
state module as postingDetailsStepValidators
.
When salaryIndication
matches the validations in the example, this variable will output only the validators for non-salaryIndication
fields. When salaryIndication
is not matching the validations in the example, then it will also contain the validators for salaryIndication
.
The validators are not actual functions but names of the functions ran to validate. For example, for window.hapi.orderJourney.state.postingDetailsStepValidators.value
, it outputs:
Loading...
The actual validator functions can be found in the Validation submodule's common
property as described here.
As part of the changes for making salary indication optional, the following has been added:
Translations
Key | "en" value | "de" value | "nl" value |
---|---|---|---|
common.input-number-please-enter-non-default-value | Leave it blank for the default of ({defaultValue}) | Lassen Sie das Feld leer für den Standardwert von ({defaultValue}) | Laat het leeg voor de standaardwaarde van ({defaultValue}) |