fix(claims): defer flow 1 fanavaran submission at creation

Skip creation-time submission for Flow 1 while preserving branch validation, later staged submission, and other flows.
This commit is contained in:
2026-11-21 10:33:11 +03:30
parent 68e26920e2
commit cda424a536
3 changed files with 55 additions and 4 deletions
@@ -8213,9 +8213,18 @@ export class ClaimRequestManagementService {
`Claim created: ${newClaim._id} from blame: ${blameRequestId}`,
);
const fanavaran = await this.autoSubmitToFanavaranV2OnClaimCreated(
String(newClaim._id),
);
// Flow 1 defers Fanavaran submission to the later staged hooks.
// Flow 6 and expert/registrar-created cases retain early submission.
const deferFanavaran =
usesUserClaimBranch(blameRequest) && !blameRequest.callCenterInitiated;
const fanavaran: FanavaranAutoSubmitResult = deferFanavaran
? {
attempted: false,
submitted: false,
skipped: true,
skipReason: 'Flow 1 defers Fanavaran submission until a later stage',
}
: await this.autoSubmitToFanavaranV2OnClaimCreated(String(newClaim._id));
const message = this.withFanavaranAutoSubmitMessage(
'Claim request created successfully',
fanavaran,