compensationsDetailOpen: "compensationsDetailOpen" = 'compensationsDetailOpen'

Method name for PRE compensationsDetailOpenPre and POST compensationsDetailOpen

Triggered when user opens compensation plan detail page /#/sc/compensation-plans/<compensationPlanId>.

export const compensationsDetailOpen = async ({ api, compensationPlanAPI }) => {
// TODO: Add your code
return;
}
export const compensationsDetailOpenPre = async ({ compensationPlanAPI }) => {
const compensationPlanWFStatus = await compensationPlanAPI.getHeaderValue('workflowStatus');
if (['DRAFT', 'DENIED', 'WITHDRAWN'].includes(compensationPlanWFStatus)) {
await compensationPlanAPI.recalculate();
}
};