compensationsDetailOpen: "compensationsDetailOpen" = 'compensationsDetailOpen'

Method name for PRE compensationsDetailOpenPre and POST compensationsDetailOpen

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

Example: (Basic)

export const compensationsDetailOpen = async ({ api, compensationPlanAPI }) => {
// TODO: Add your code
return;
}

Example: (Recalculate only with status DRAFT, DENIED and WITHDRAWN)

export const compensationsDetailOpenPre = async ({ compensationPlanAPI }) => {
const compensationPlanWFStatus = await compensationPlanAPI.getHeaderValue('workflowStatus');
if (['DRAFT', 'DENIED', 'WITHDRAWN'].includes(compensationPlanWFStatus)) {
await compensationPlanAPI.recalculate();
}
};

Generated using TypeDoc