implemented step 08 by Gemini

addes 2. step of wizard
This commit is contained in:
2026-06-14 04:47:56 +02:00
parent 0e0670574d
commit aeeaddd3bc
4 changed files with 224 additions and 14 deletions

View File

@ -137,6 +137,25 @@ class ProjectActions
$projectData['wizard_data']['business_category'] = $data['business_category'];
break;
case 2:
// Verify GDPR consent
$consentService = new \App\Services\ConsentService();
if (!$consentService->hasConsent($projectId)) {
throw new Exception("GDPR consent is required before saving identity and contact data.", 403);
}
if (empty($data['identity']['business_name'])) {
throw new Exception("Business name is required.", 400);
}
if (empty($data['contact']['email']) && empty($data['contact']['phone'])) {
throw new Exception("Either email or phone is required.", 400);
}
$projectData['wizard_data']['identity'] = $data['identity'];
$projectData['wizard_data']['contact'] = $data['contact'];
break;
// More steps will be added later
}