forked from Yara724/api
Fixed flow steps of v5
This commit is contained in:
@@ -64,26 +64,19 @@ export class FileMakerClaimApprovalV5Controller {
|
||||
@ApiOperation({
|
||||
summary: "Approve the completed claim (FileMaker V5)",
|
||||
description:
|
||||
"Approves a claim that is in WAITING_FOR_FILE_MAKER_APPROVAL status. " +
|
||||
"Marks the claim COMPLETED and triggers fanavaran submission.",
|
||||
"Approves a claim that is in `WAITING_FOR_FILE_MAKER_APPROVAL` status. " +
|
||||
"Moves the claim to `INSURER_REVIEW_AWAITING_OWNER_SIGN` and sends the owner an SMS " +
|
||||
"with a signature link. Fanavaran submission is triggered automatically after the " +
|
||||
"owner signs.",
|
||||
})
|
||||
async approve(
|
||||
@Param("claimRequestId") claimRequestId: string,
|
||||
@CurrentUser() fileMaker: any,
|
||||
) {
|
||||
const result = await this.requestManagementService.fileMakerApproveV5(
|
||||
return this.requestManagementService.fileMakerApproveV5(
|
||||
fileMaker,
|
||||
claimRequestId,
|
||||
);
|
||||
|
||||
// Trigger fanavaran auto-submit now that the claim is COMPLETED and the gate
|
||||
// (requiresFileMakerApproval) has been cleared.
|
||||
const fanavaran =
|
||||
await this.claimRequestManagementService.autoSubmitToFanavaranV2OnClaimCompleted(
|
||||
claimRequestId,
|
||||
);
|
||||
|
||||
return { ...result, fanavaran };
|
||||
}
|
||||
|
||||
@Post("reject/:claimRequestId")
|
||||
|
||||
Reference in New Issue
Block a user