@extends('adminlte::page') @section('title', config('app.name') . ' | ' . __('Invitation management')) @section('content_header')

{{__('Administration')}} / {{__('Invitation management')}}

@stop @section('js') @stop @section('content') @if(\App\Facades\Options::getOption('enable_registrations'))

{!! __('The invitation system is currently disabled because sign ups are open to everyone. If you\'d like to change this, head over to App Settings > Global Settings and disable registrations.', ['globalSettingsLink' => route('showSettings')]) !!}

@endif
@if(\App\Facades\Options::getOption('enable_registrations'))
@else
@endif
@if(!empty($invites) && count($invites) > 0) @foreach($invites as $invite) @endforeach
{{ __('Email') }} {{ __('IP Address') }} {{ __('Status') }} {{ __('Notified?') }} {{ __('Received at') }} {{ __('Expiration') }} {{ __('Actions') }}
{{ $invite->requestor_email }} {{ $invite->requestor_ip_address }} @php $statusColors = [ 'approved' => 'success', 'denied' => 'danger', 'pending' => 'warning', 'completed' => 'primary' ]; $status = strtolower($invite->status); $color = $statusColors[$status] ?? 'secondary'; @endphp {{ __(ucfirst($status)) }} @if($invite->notified) {{ __('Yes') }} @else {{ __('No') }} @endif {{ $invite->created_at->format('Y-m-d H:i') }} @php $now = \Carbon\Carbon::now(); $expiration = $invite->expiration; $isExpired = $expiration < $now; $expirationDate = $expiration->format('Y-m-d H:i'); $relative = $isExpired ? __('EXPIRED') : $expiration->diffForHumans($now, ['parts' => 2, 'short' => true, 'syntax' => \Carbon\CarbonInterface::DIFF_RELATIVE_TO_NOW]); $color = $isExpired ? 'danger' : 'info'; @endphp {{ $relative }} @if(strtolower($invite->status) === 'pending')
@csrf @method('PATCH')
@csrf @method('PATCH')
@endif
@else {{ __('There are currently no outgoing invites or any user requests. Feel free to send out any invites if necessary.') }} @endif

{{ __('Here, you can manage the invitation system, and approve any invite requests that might have come through. You can also send invites from here if necessary.') }}

{!! __('Remember: invitations are unique on an email/IP address basis. The same user won\'t be able to request an invite twice. This restriction also applies to you. Check if there\'s already an invite before sending one out.') !!}

{!! __('Invite lifecycle: Completed invites are wiped from the system every 12 hours. Expired invites are wiped 1 day after expiration. Denied invites are never wiped ') !!}

@if(!\App\Facades\Options::getOption('enable_registrations'))
@csrf

{{ __('Sending an invite here will immediately create an approved invite request which will in turn send this user an email message with a link. Be aware that this will allow them to register for a new account.') }}

@endif @stop @section('footer') @include('breadcrumbs.dashboard.footer') @stop