|
|
@ -9,6 +9,7 @@ import AdvisorActionsCard from "@/components/Componentes/advisor-actions-card"; |
|
|
import MarriageAdvisorsOverlay, { |
|
|
import MarriageAdvisorsOverlay, { |
|
|
useMarriageAdvisorsOverlay, |
|
|
useMarriageAdvisorsOverlay, |
|
|
} from "@/components/Componentes/marriage-advisors-overlay"; |
|
|
} from "@/components/Componentes/marriage-advisors-overlay"; |
|
|
|
|
|
import ErrorToast from "@/components/Componentes/error-toast"; |
|
|
import MatchProfileOverlay, { |
|
|
import MatchProfileOverlay, { |
|
|
useMatchProfileOverlay, |
|
|
useMatchProfileOverlay, |
|
|
} from "@/components/Componentes/match-profile-overlay"; |
|
|
} from "@/components/Componentes/match-profile-overlay"; |
|
|
@ -199,6 +200,7 @@ export default function RequestAcceptedClient() { |
|
|
useState(false); |
|
|
useState(false); |
|
|
const [hasConfirmedFemaleContact, setHasConfirmedFemaleContact] = |
|
|
const [hasConfirmedFemaleContact, setHasConfirmedFemaleContact] = |
|
|
useState(false); |
|
|
useState(false); |
|
|
|
|
|
const [showPaymentSuccessToast, setShowPaymentSuccessToast] = useState(false); |
|
|
const profileHref = localizePath("/new-match/profile", locale); |
|
|
const profileHref = localizePath("/new-match/profile", locale); |
|
|
const { data: profile, isLoading } = useMarriageProfileQuery({ |
|
|
const { data: profile, isLoading } = useMarriageProfileQuery({ |
|
|
refetchInterval: 3000, |
|
|
refetchInterval: 3000, |
|
|
@ -260,6 +262,7 @@ export default function RequestAcceptedClient() { |
|
|
: caseStatus === "payment_done" || caseStatus === "contacted" |
|
|
: caseStatus === "payment_done" || caseStatus === "contacted" |
|
|
? t["Contact info released"] |
|
|
? t["Contact info released"] |
|
|
: t["Request approved!"]; |
|
|
: t["Request approved!"]; |
|
|
|
|
|
|
|
|
const primaryActionText = isFemaleProfile |
|
|
const primaryActionText = isFemaleProfile |
|
|
? t["No Contact"] || t["No Contact Received"] || "No Contact" |
|
|
? t["No Contact"] || t["No Contact Received"] || "No Contact" |
|
|
: t["View profile"]; |
|
|
: t["View profile"]; |
|
|
@ -272,6 +275,14 @@ export default function RequestAcceptedClient() { |
|
|
contactInfoQuery.data?.contact_info, |
|
|
contactInfoQuery.data?.contact_info, |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const handlePrimaryAction = () => { |
|
|
|
|
|
if (isFemaleProfile) { |
|
|
|
|
|
setIsDismissReasonSheetOpen(true); |
|
|
|
|
|
} else { |
|
|
|
|
|
openProfile(); |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
const handleSecondaryAction = async () => { |
|
|
const handleSecondaryAction = async () => { |
|
|
if (isFemaleProfile) { |
|
|
if (isFemaleProfile) { |
|
|
setIsContactReceivedConfirmOpen(true); |
|
|
setIsContactReceivedConfirmOpen(true); |
|
|
@ -314,6 +325,7 @@ export default function RequestAcceptedClient() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
setIsSubscriptionSheetOpen(false); |
|
|
setIsSubscriptionSheetOpen(false); |
|
|
|
|
|
setShowPaymentSuccessToast(true); |
|
|
|
|
|
|
|
|
if (caseId) { |
|
|
if (caseId) { |
|
|
await contactInfoQuery.refetch(); |
|
|
await contactInfoQuery.refetch(); |
|
|
@ -773,6 +785,14 @@ export default function RequestAcceptedClient() { |
|
|
open={isProfileOpen} |
|
|
open={isProfileOpen} |
|
|
onClose={closeProfile} |
|
|
onClose={closeProfile} |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
{showPaymentSuccessToast && ( |
|
|
|
|
|
<ErrorToast |
|
|
|
|
|
variant="success" |
|
|
|
|
|
message={t["Payment successful"] || "Payment successful"} |
|
|
|
|
|
onClose={() => setShowPaymentSuccessToast(false)} |
|
|
|
|
|
/> |
|
|
|
|
|
)} |
|
|
</> |
|
|
</> |
|
|
); |
|
|
); |
|
|
} |
|
|
} |