fix: keep unconfirmed candidates in rectification

This commit is contained in:
732642856
2026-07-21 16:06:30 +08:00
parent d82218e70a
commit 9154ec5ef1
6 changed files with 8 additions and 65 deletions
+1 -17
View File
@@ -747,7 +747,6 @@ export default function Home() {
preview: process.env.NODE_ENV === "development" && uiPreview.current,
onJourney: setBirthTimeJourney,
onReady: completeGuidedBirthTime,
onCandidateComplete: completeCandidateBirthTime,
onEditBirthTimeDetails: editDeclaredBirthTimeDetails,
});
@@ -1019,7 +1018,7 @@ export default function Home() {
setSessions(nextSessions);
setActiveSessionId(nextSessions[0].id);
if ((nextProfile.birthTimeStatus === "rectifying"
|| (nextProfile.birthTimeStatus === "candidate" && !nextProfile.time))
|| nextProfile.birthTimeStatus === "candidate")
&& nextProfile.rectificationCaseId) {
try {
const resumed = await resumeBirthTimeJourney(nextProfile.rectificationCaseId);
@@ -1657,21 +1656,6 @@ export default function Home() {
setOnboardingJustCompleted(true);
}
function completeCandidateBirthTime(result: JourneyClientResponse, time: string) {
const candidateProfile: Profile = {
...profileDraft,
time,
birthTimeStatus: "candidate",
rectificationCaseId: result.caseId,
};
setProfile(candidateProfile);
setProfileDraft(candidateProfile);
setBirthTimeJourney(null);
setPresetMessageLength(0);
setStartGreeting(createStartGreeting(candidateProfile.name));
setOnboardingJustCompleted(true);
}
async function retryBirthTimeAssessment() {
if (!account || profileSaving) return;
setProfileSaving(true);