implemented step 08 by Gemini
addes 2. step of wizard
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user