|
|
@ -12,6 +12,7 @@ import SubscriptionRequiredSheet from "@/components/ui/subscription-required-she |
|
|
import { PageBackground } from "@/components/utils/page-background"; |
|
|
import { PageBackground } from "@/components/utils/page-background"; |
|
|
import type { MarriageField, MarriagePhoneFieldValue } from "@/hooks/marriage/types"; |
|
|
import type { MarriageField, MarriagePhoneFieldValue } from "@/hooks/marriage/types"; |
|
|
import { useMarriageContactInfoQuery } from "@/hooks/marriage/use-contact-info"; |
|
|
import { useMarriageContactInfoQuery } from "@/hooks/marriage/use-contact-info"; |
|
|
|
|
|
import { useSubmitMarriageContactStatusMutation } from "@/hooks/marriage/use-contact-status"; |
|
|
import { |
|
|
import { |
|
|
extractHabcoinPaymentUrl, |
|
|
extractHabcoinPaymentUrl, |
|
|
useHabcoinPaymentMutation, |
|
|
useHabcoinPaymentMutation, |
|
|
@ -158,6 +159,11 @@ export default function RequestAcceptedPage() { |
|
|
const caseStatus = profile?.active_case?.status; |
|
|
const caseStatus = profile?.active_case?.status; |
|
|
const recommendedPlanId = profile?.recommended_plan?.id; |
|
|
const recommendedPlanId = profile?.recommended_plan?.id; |
|
|
const paymentMutation = useHabcoinPaymentMutation(); |
|
|
const paymentMutation = useHabcoinPaymentMutation(); |
|
|
|
|
|
const contactStatusMutation = useSubmitMarriageContactStatusMutation(caseId ?? "", { |
|
|
|
|
|
onSuccess: () => { |
|
|
|
|
|
router.push(localizePath("/finding-match", locale)); |
|
|
|
|
|
}, |
|
|
|
|
|
}); |
|
|
const contactInfoQuery = useMarriageContactInfoQuery(caseId, { |
|
|
const contactInfoQuery = useMarriageContactInfoQuery(caseId, { |
|
|
enabled: false, |
|
|
enabled: false, |
|
|
}); |
|
|
}); |
|
|
@ -217,12 +223,30 @@ export default function RequestAcceptedPage() { |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const handleNoContactReport = async () => { |
|
|
|
|
|
if (!caseId || contactStatusMutation.isPending) return; |
|
|
|
|
|
await contactStatusMutation.mutateAsync({ |
|
|
|
|
|
action: "no_contact", |
|
|
|
|
|
custom_note: "No contact reported by female candidate after decision window", |
|
|
|
|
|
}); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<> |
|
|
<> |
|
|
<PageBackground /> |
|
|
<PageBackground /> |
|
|
|
|
|
|
|
|
{isCallResultSheetOpen ? ( |
|
|
{isCallResultSheetOpen ? ( |
|
|
<CallResultSheet onClose={() => setIsCallResultSheetOpen(false)} /> |
|
|
|
|
|
|
|
|
<CallResultSheet |
|
|
|
|
|
onClose={() => setIsCallResultSheetOpen(false)} |
|
|
|
|
|
onSubmit={async (value) => { |
|
|
|
|
|
if (caseId) { |
|
|
|
|
|
await contactStatusMutation.mutateAsync({ |
|
|
|
|
|
action: "contacted", |
|
|
|
|
|
custom_note: value, |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}} |
|
|
|
|
|
/> |
|
|
) : null} |
|
|
) : null} |
|
|
|
|
|
|
|
|
{isContactInfoSheetOpen ? ( |
|
|
{isContactInfoSheetOpen ? ( |
|
|
@ -287,11 +311,24 @@ export default function RequestAcceptedPage() { |
|
|
</p> |
|
|
</p> |
|
|
|
|
|
|
|
|
<div className="flex mt-9 w-full justify-center gap-4"> |
|
|
<div className="flex mt-9 w-full justify-center gap-4"> |
|
|
|
|
|
{isFemaleProfile ? ( |
|
|
|
|
|
<button |
|
|
|
|
|
type="button" |
|
|
|
|
|
onClick={handleNoContactReport} |
|
|
|
|
|
disabled={contactStatusMutation.isPending} |
|
|
|
|
|
className="max-w-[212px] cursor-pointer appearance-none border-0 bg-transparent p-0 text-left" |
|
|
|
|
|
> |
|
|
|
|
|
<div className="bg-[#F5F5F5] px-4 py-2 rounded-[15px] shadow group-14 text-center font-semibold text-[#36363C] hover:bg-[#EBEBEB] transition-colors"> |
|
|
|
|
|
{primaryActionText} |
|
|
|
|
|
</div> |
|
|
|
|
|
</button> |
|
|
|
|
|
) : ( |
|
|
<Link href={profileHref} className="max-w-[212px]"> |
|
|
<Link href={profileHref} className="max-w-[212px]"> |
|
|
<div className="bg-[#F5F5F5] px-4 py-2 rounded-[15px] shadow group-14 text-center font-semibold text-[#36363C]"> |
|
|
<div className="bg-[#F5F5F5] px-4 py-2 rounded-[15px] shadow group-14 text-center font-semibold text-[#36363C]"> |
|
|
{primaryActionText} |
|
|
{primaryActionText} |
|
|
</div> |
|
|
</div> |
|
|
</Link> |
|
|
</Link> |
|
|
|
|
|
)} |
|
|
|
|
|
|
|
|
<button |
|
|
<button |
|
|
type="button" |
|
|
type="button" |
|
|
|