rebateAgreementsDetailOpen: "rebateAgreementsDetailOpen" = 'rebateAgreementsDetailOpen'

Method name for PRE rebateAgreementsDetailOpenPre and POST rebateAgreementsDetailOpen

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

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