Proje: Okul Platform · Hub: Okul Platform — Domain
B2B Portalda Lead Güncelleme Kısıtları
1. Lead Access Kontrolü
if (!$this->customerUserService->checkLeadAccess($lead->school_id)) {
throw LeadException::noAccessToLead();
}CustomerUserSchool::has_lead_access = true olan kullanıcılar lead güncelleyebilir.
2. Ücretli Okul Kontrolü
if (!$this->customerUserService->hasPaidSchool()) {
if ($lead->created_at->lte(now()->subDays(config('app_settings.lead.limited_access_days')))) {
throw LeadException::limitedPanelAccess();
}
}Ücretsiz okul: app_settings.lead.limited_access_days günden eski lead’lere erişemez.
Ücretli okul: Tüm tarihlere erişebilir.
Mesaj: "Kısıtlı panel kullandığınız için :days günden önceki bilgi taleplerine erişim sağlayamazsınız."
3. Güncelleme Yapılınca
$data['deal_status_change_customer_user_id'] = customerUser()->id;Kim güncelledi izlenebilir.
Erişim Tipleri
| Ücretli Okul | Ücretsiz Okul | |
|---|---|---|
| Son X gün | ✓ | ✓ |
| X günden eski | ✓ | ✗ |
limited_access_days Config
config('app_settings.lead.limited_access_days') — Kaç günlük erişim.
Related
- api-customer-user-service — checkLeadAccess, hasPaidSchool metodları
- api-lead-model-detail — B2B lead görünümü (masked data)