feat: update tutorial steps and enhance contract signing flow with tutorial parameter handling
This commit is contained in:
parent
5174b3dc78
commit
d764532d24
@ -308,31 +308,31 @@ export const createTutorialSteps = (
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 5,
|
id: 5,
|
||||||
title: "Our team is preparing your contract ⏳",
|
title: "Ready to sign 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.",
|
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: [
|
details: [
|
||||||
"Our admin team is currently reviewing your submitted documents",
|
"Review the terms and conditions carefully",
|
||||||
"We're preparing a personalized contract just for you",
|
"Your contract has been prepared based on your information",
|
||||||
"This process typically takes 1-2 business days",
|
"Digital signature makes the process quick and secure",
|
||||||
"You'll receive an email notification once your contract is ready to sign"
|
"This is the final step to activate your account"
|
||||||
],
|
],
|
||||||
icon: ClockIcon,
|
icon: DocumentTextIcon,
|
||||||
buttonText: contractSigned ? "Contract signed! ✅" : "Waiting for admin review",
|
buttonText: contractSigned ? "Contract signed! ✅" : "Review & sign contract",
|
||||||
buttonAction: onSignContract,
|
buttonAction: contractSigned ? onNext : onSignContract,
|
||||||
canProceed: emailVerified && idUploaded && additionalInfo
|
canProceed: emailVerified && idUploaded && additionalInfo
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 6,
|
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!",
|
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: [
|
details: [
|
||||||
"Our team will carefully review everything you've submitted",
|
"Our team will carefully review everything you've submitted",
|
||||||
"This usually takes just 1-2 business days",
|
"This usually takes just 1-2 business days",
|
||||||
"We'll send you a celebratory email once you're approved",
|
"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,
|
icon: HeartIcon,
|
||||||
buttonText: "I understand!",
|
buttonText: "Perfect! I understand 💫",
|
||||||
buttonAction: onCloseTutorial,
|
buttonAction: onCloseTutorial,
|
||||||
canProceed: true
|
canProceed: true
|
||||||
}
|
}
|
||||||
|
|||||||
@ -126,7 +126,7 @@ export default function QuickActionDashboardPage() {
|
|||||||
|
|
||||||
const handleSignContract = useCallback(() => {
|
const handleSignContract = useCallback(() => {
|
||||||
const userType = user?.userType || 'personal'
|
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])
|
}, [router, user])
|
||||||
|
|
||||||
// Tutorial handlers
|
// Tutorial handlers
|
||||||
|
|||||||
@ -110,7 +110,15 @@ export default function CompanySignContractPage() {
|
|||||||
|
|
||||||
// Redirect to main dashboard after short delay
|
// Redirect to main dashboard after short delay
|
||||||
setTimeout(() => {
|
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)
|
}, 2000)
|
||||||
|
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
|
|||||||
@ -102,7 +102,15 @@ export default function PersonalSignContractPage() {
|
|||||||
|
|
||||||
// Redirect to main dashboard after short delay
|
// Redirect to main dashboard after short delay
|
||||||
setTimeout(() => {
|
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)
|
}, 2000)
|
||||||
|
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user