@extends('layouts.app') @section('content') @php $activeTab = request('tab') === 'security' ? 'security' : 'profile'; $securityAbilities = [ 'partner_managers.reset_2fa', 'partner_managers.revoke_trusted_devices', 'partner_managers.revoke_sessions', 'partner_managers.unlock_account', ]; $hasSecurityTab = isset($manager) && auth()->user()?->canany($securityAbilities, $manager); @endphp
@if($hasSecurityTab)
@endif
@if($hasSecurityTab)
@endif
{{ isset($manager) ? 'Modifier un manager' : 'Créer un manager' }}
@if(!isset($manager) )
Créer un nouveau manager pour la marque blanche. Un mot de passe aléatoire sera envoyé par mail qui devra être changé dès la première connexion.
@endif @include('components.alert_success') @include('components.alert_error')
{{ csrf_field() }} {{ isset($manager) ? method_field('PUT') : '' }}
@if ($errors->has('email'))
{{ $errors->first('email') }}
@endif
@if ($errors->has('firstname'))
{{ $errors->first('firstname') }}
@endif
@if ($errors->has('lastname'))
{{ $errors->first('lastname') }}
@endif
@if ($errors->has('phone'))
{{ $errors->first('phone') }}
@endif
@if ($errors->has('company'))
{{ $errors->first('company') }}
@endif
@if($hasSecurityTab)
{{-- /tab-pane profile-content --}}
@include('pages.partner._security_card', [ 'partner' => $partner, 'subject' => $manager, 'subjectKey' => 'manager', 'abilityPrefix' => 'partner_managers', 'modalsPartial' => 'pages.partner.manager._security_modals', 'activeTrustedDevicesCount' => $activeTrustedDevicesCount, 'activeSessionsCount' => $activeSessionsCount, 'sessionDriver' => $sessionDriver, 'wrapInCard' => false, ])
{{-- /tab-pane security-content --}}
{{-- /tab-content --}} @endif
{{-- /card-body --}}
{{-- /card --}}
{{-- /col-lg-7 --}}
{{-- /row py-5 --}} @endsection