rebateAgreementsDetailOpen: "rebateAgreementsDetailOpen" = 'rebateAgreementsDetailOpen'

Method name for PRE rebateAgreementsDetailOpenPre and POST rebateAgreementsDetailOpen

Triggered when user opens rebate agreement detail page /#/rm/rebate-agreements/<rebateAgreementId>.

Example: (Basic)

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

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

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

Generated using TypeDoc