Const
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();
}
};
Method name for PRE
compensationsDetailOpenPre
and POSTcompensationsDetailOpen
Triggered when user opens compensation plan detail page
/#/sc/compensation-plans/<compensationPlanId>
.