Closed brijesh-amin closed 3 weeks ago
Original plan status is not updated. However, extension status is updated to PLAN_EXTENSION_STATUS.REPLACEMENT_PLAN_CREATED
if (
result.extension_status === PLAN_EXTENSION_STATUS.REPLACEMENT_PLAN_CREATED
) {
try {
console.log(
`Replacing planId: ${result.id} with the replacement plan ${result.replacement_plan_id}`,
);
await Plan.update(
trx,
{ id: result.id },
{
extension_status:
PLAN_EXTENSION_STATUS.REPLACED_WITH_REPLACEMENT_PLAN,
},
);
await Plan.update(
trx,
{ id: result.replacement_plan_id },
{
extension_status: PLAN_EXTENSION_STATUS.ACTIVE_REPLACEMENT_PLAN,
},
);
continue;
} catch (error) {
console.log(error.stack);
}
}
More changes will be done to this when expired plan status changes are done.
What happens to the original plan after replacement? What status will it be?