From d764532d246ad7607b84c2cbceb0429a0a869fad Mon Sep 17 00:00:00 2001 From: seaznCode Date: Wed, 22 Oct 2025 21:55:22 +0200 Subject: [PATCH] feat: update tutorial steps and enhance contract signing flow with tutorial parameter handling --- src/app/components/TutorialModal.tsx | 24 +++++++++---------- src/app/quickaction-dashboard/page.tsx | 2 +- .../register-sign-contract/company/page.tsx | 10 +++++++- .../register-sign-contract/personal/page.tsx | 10 +++++++- 4 files changed, 31 insertions(+), 15 deletions(-) diff --git a/src/app/components/TutorialModal.tsx b/src/app/components/TutorialModal.tsx index 2b35425..a72dd2b 100644 --- a/src/app/components/TutorialModal.tsx +++ b/src/app/components/TutorialModal.tsx @@ -308,31 +308,31 @@ export const createTutorialSteps = ( }, { id: 5, - title: "Our team is preparing your contract ⏳", - description: "Excellent! Now our team needs to manually review your information and prepare your personalized contract. This ensures everything is perfectly tailored to your needs.", + title: "Ready to sign your contract! 📝", + description: "Perfect! You've completed all the preparation steps. Now it's time to review and sign your personalized contract to finalize your account setup.", details: [ - "Our admin team is currently reviewing your submitted documents", - "We're preparing a personalized contract just for you", - "This process typically takes 1-2 business days", - "You'll receive an email notification once your contract is ready to sign" + "Review the terms and conditions carefully", + "Your contract has been prepared based on your information", + "Digital signature makes the process quick and secure", + "This is the final step to activate your account" ], - icon: ClockIcon, - buttonText: contractSigned ? "Contract signed! ✅" : "Waiting for admin review", - buttonAction: onSignContract, + icon: DocumentTextIcon, + buttonText: contractSigned ? "Contract signed! ✅" : "Review & sign contract", + buttonAction: contractSigned ? onNext : onSignContract, canProceed: emailVerified && idUploaded && additionalInfo }, { id: 6, - title: "You're all set! 🎉 Welcome to the community", + title: "You're all set! 🎉 Welcome to the family", description: "Congratulations! You've completed all the steps perfectly. Our friendly team will now review your information - we'll have you approved and ready to go very soon!", details: [ "Our team will carefully review everything you've submitted", "This usually takes just 1-2 business days", "We'll send you a celebratory email once you're approved", - "In the meantime, feel free to explore" + "In the meantime, feel free to explore your dashboard" ], icon: HeartIcon, - buttonText: "I understand!", + buttonText: "Perfect! I understand 💫", buttonAction: onCloseTutorial, canProceed: true } diff --git a/src/app/quickaction-dashboard/page.tsx b/src/app/quickaction-dashboard/page.tsx index 3f442e3..6475caf 100644 --- a/src/app/quickaction-dashboard/page.tsx +++ b/src/app/quickaction-dashboard/page.tsx @@ -126,7 +126,7 @@ export default function QuickActionDashboardPage() { const handleSignContract = useCallback(() => { const userType = user?.userType || 'personal' - router.push(`/quickaction-dashboard/register-sign-contract/${userType}`) + router.push(`/quickaction-dashboard/register-sign-contract/${userType}?tutorial=true`) }, [router, user]) // Tutorial handlers diff --git a/src/app/quickaction-dashboard/register-sign-contract/company/page.tsx b/src/app/quickaction-dashboard/register-sign-contract/company/page.tsx index 2af6be0..56c8799 100644 --- a/src/app/quickaction-dashboard/register-sign-contract/company/page.tsx +++ b/src/app/quickaction-dashboard/register-sign-contract/company/page.tsx @@ -110,7 +110,15 @@ export default function CompanySignContractPage() { // Redirect to main dashboard after short delay setTimeout(() => { - router.push('/quickaction-dashboard') + // Check if we came from tutorial + const urlParams = new URLSearchParams(window.location.search) + const fromTutorial = urlParams.get('tutorial') === 'true' + + if (fromTutorial) { + router.push('/quickaction-dashboard?tutorial=true') + } else { + router.push('/quickaction-dashboard') + } }, 2000) } catch (error: any) { diff --git a/src/app/quickaction-dashboard/register-sign-contract/personal/page.tsx b/src/app/quickaction-dashboard/register-sign-contract/personal/page.tsx index 40200ce..6d26416 100644 --- a/src/app/quickaction-dashboard/register-sign-contract/personal/page.tsx +++ b/src/app/quickaction-dashboard/register-sign-contract/personal/page.tsx @@ -102,7 +102,15 @@ export default function PersonalSignContractPage() { // Redirect to main dashboard after short delay setTimeout(() => { - router.push('/quickaction-dashboard') + // Check if we came from tutorial + const urlParams = new URLSearchParams(window.location.search) + const fromTutorial = urlParams.get('tutorial') === 'true' + + if (fromTutorial) { + router.push('/quickaction-dashboard?tutorial=true') + } else { + router.push('/quickaction-dashboard') + } }, 2000) } catch (error: any) {