From 4dbd62196e0ab643d39defd069759d60aacc74b6 Mon Sep 17 00:00:00 2001 From: Andriamanampisoa Date: Wed, 15 Jul 2026 19:11:09 +0200 Subject: [PATCH 1/2] task: add privacy consent buton to process user's profile analysis --- web/src/routes/cv-analysis.tsx | 37 ++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/web/src/routes/cv-analysis.tsx b/web/src/routes/cv-analysis.tsx index c70dba06..634c30f2 100644 --- a/web/src/routes/cv-analysis.tsx +++ b/web/src/routes/cv-analysis.tsx @@ -4,6 +4,7 @@ import { uploadMyCV } from '@/services/users/http'; import { createAuthGuard } from '@/utils/auth.guards'; import { extractErrorMessage } from '@/utils/error'; import { isAllowedJobUrl } from '@/utils/validators'; +import { CheckboxInput } from '@/components/atoms/checkbox-input'; import { createFileRoute } from '@tanstack/react-router'; import axios from 'axios'; import { useState } from 'react'; @@ -43,6 +44,7 @@ function CVAnalysisPage() { const [cvFile, setCvFile] = useState(null); const [jobUrl, setJobUrl] = useState(''); const [deadline, setDeadline] = useState(null); + const [dataConsentAccepted, setDataConsentAccepted] = useState(false); const [analysisStep, setAnalysisStep] = useState<'idle' | 'cv' | 'offer'>( 'idle', ); @@ -50,7 +52,8 @@ function CVAnalysisPage() { useState(null); const createApplicationMutation = useCreateApplication(); - const canStart = Boolean(cvFile) && isAllowedJobUrl(jobUrl); + const canStart = + Boolean(cvFile) && isAllowedJobUrl(jobUrl) && dataConsentAccepted; const isAnalyzing = analysisStep !== 'idle'; const isFinished = createdApplication !== null; @@ -110,6 +113,7 @@ function CVAnalysisPage() { setCvFile(null); setJobUrl(''); setDeadline(null); + setDataConsentAccepted(false); }; /** @@ -219,7 +223,36 @@ function CVAnalysisPage() { {/* Action Footer */} -