diff --git a/public/assets/images/Group 15978804fdasf68.svg b/public/assets/images/Group 15978804fdasf68.svg new file mode 100644 index 0000000..eb305d0 --- /dev/null +++ b/public/assets/images/Group 15978804fdasf68.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/app/[lang]/request-sent/page.tsx b/src/app/[lang]/request-sent/page.tsx new file mode 100644 index 0000000..8fa6b9b --- /dev/null +++ b/src/app/[lang]/request-sent/page.tsx @@ -0,0 +1 @@ +export { default } from "@/app/request-sent/page"; diff --git a/src/app/finding-match/page.tsx b/src/app/finding-match/page.tsx index d3c2f75..59d3573 100644 --- a/src/app/finding-match/page.tsx +++ b/src/app/finding-match/page.tsx @@ -31,7 +31,7 @@ export default function FindingMatchPage() {
-
+ +
+
+ + + + Profile locked + + +
+
); diff --git a/src/app/new-match/profile/page.tsx b/src/app/new-match/profile/page.tsx index c41cad5..e83e737 100644 --- a/src/app/new-match/profile/page.tsx +++ b/src/app/new-match/profile/page.tsx @@ -9,7 +9,11 @@ import InformationSheet from "@/components/ui/information-sheet"; import NavigationButton from "@/components/ui/navigation-button"; import StickyHeader from "@/components/ui/sticky-header"; import { PageBackground } from "@/components/utils/page-background"; -import type { MarriageField, MarriageFieldValue } from "@/hooks/marriage/types"; +import { + type MarriageField, + type MarriageFieldValue, +} from "@/hooks/marriage/types"; +import { useRespondToMarriageCaseMutation } from "@/hooks/marriage/use-case-respond"; import { useMarriageProfileQuery } from "@/hooks/marriage/use-profile-main"; import { localizePath } from "@/i18n/config"; import { useI18n } from "@/i18n/provider"; @@ -66,6 +70,20 @@ export default function NewMatchProfilePage() { const [isDismissReasonSheetOpen, setIsDismissReasonSheetOpen] = useState(false); const { data: profile } = useMarriageProfileQuery(); + const caseId = profile?.active_case?.case_id; + const isMaleAccepted = profile?.active_case?.status === "male_accepted"; + const respondMutation = useRespondToMarriageCaseMutation(caseId ?? "", { + onSuccess: async (_, variables) => { + if (variables.action === "accept") { + router.push(localizePath("/request-sent", locale)); + return; + } + + router.push(localizePath("/candidate-contact", locale)); + }, + }); + + const isSubmitting = respondMutation.isPending; return ( <> @@ -82,9 +100,18 @@ export default function NewMatchProfilePage() { +
+ View Contact +
+ - -
-
- {t.requestAccepted.penalty} +
+

+ Please note: if you do not make contact within 2 days, a penalty + may apply +

+ +
-
+
lock

- {t.requestAccepted.profileLocked} + Profile is locked

- -

- {t.requestAccepted.lockedDescription} -

diff --git a/src/app/request-sent/page.tsx b/src/app/request-sent/page.tsx new file mode 100644 index 0000000..ec6e7a3 --- /dev/null +++ b/src/app/request-sent/page.tsx @@ -0,0 +1,76 @@ +"use client"; + +import Image from "next/image"; +import { useRouter } from "next/navigation"; +import Button from "@/components/ui/button"; +import NavigationButton from "@/components/ui/navigation-button"; +import { PageBackground } from "@/components/utils/page-background"; +import { localizePath } from "@/i18n/config"; +import { useI18n } from "@/i18n/provider"; +import Link from "next/link"; + +export default function RequestSentPage() { + const { locale } = useI18n(); + const router = useRouter(); + + return ( + <> + + +
+
+ +

Habib Marriage

+ +
+ +
+
+
+ Request sent +
+ +

+ Request Sent +

+ +

+ We will propose marriage on your behalf. If they accept, their contact details will be shared with you. +

+ + +
+ Match Profile +
+ +
+ +
+ +
+
+ lock + +

+ Profile is locked +

+
+
+
+
+
+ + ); +} diff --git a/src/components/ui/call-result-sheet.tsx b/src/components/ui/call-result-sheet.tsx index a49f840..e88c3ec 100644 --- a/src/components/ui/call-result-sheet.tsx +++ b/src/components/ui/call-result-sheet.tsx @@ -9,7 +9,7 @@ const EXIT_ANIMATION_MS = 220; export type CallResultSheetProps = Omit< HTMLAttributes, - "title" + "title" | "onSubmit" > & { closeOnOutside?: boolean; onClose?: () => void; diff --git a/src/components/ui/dismiss-reason-sheet.tsx b/src/components/ui/dismiss-reason-sheet.tsx index 90bf4d7..51404c3 100644 --- a/src/components/ui/dismiss-reason-sheet.tsx +++ b/src/components/ui/dismiss-reason-sheet.tsx @@ -9,7 +9,7 @@ const EXIT_ANIMATION_MS = 220; export type DismissReasonSheetProps = Omit< HTMLAttributes, - "title" + "title" | "onSubmit" > & { closeOnOutside?: boolean; onClose?: () => void; @@ -29,7 +29,7 @@ export function DismissReasonSheet({ const [isVisible, setIsVisible] = useState(true); const [isEntering, setIsEntering] = useState(true); const [isClosing, setIsClosing] = useState(false); - const [selectedReason, setSelectedReason] = useState(options[0]); + const [selectedReason, setSelectedReason] = useState(options[0]); const [reasonText, setReasonText] = useState(""); const closeSheet = () => { @@ -146,49 +146,55 @@ export function DismissReasonSheet({ const showTextArea = option === options[options.length - 1]; return ( -