@php $canCreateLead = bouncer()->hasPermission('leads.create.quick-create'); $canCreateMail = bouncer()->hasPermission('mail.compose.quick-create'); $canCreatePerson = bouncer()->hasPermission('contacts.persons.create.quick-create'); $canCreateOrganization = bouncer()->hasPermission('contacts.organizations.create.quick-create'); $canCreateProduct = bouncer()->hasPermission('products.create.quick-create'); $hasAnyQuickAddPermission = $canCreateLead || $canCreateMail || $canCreatePerson || $canCreateOrganization || $canCreateProduct; $defaultQuickAddTab = match (true) { $canCreateLead => 'lead', $canCreatePerson => 'person', $canCreateOrganization => 'organization', $canCreateProduct => 'product', $canCreateMail => 'mail', default => '', }; @endphp
@if ($hasAnyQuickAddPermission) @endif @pushOnce('scripts') @endPushOnce