@if(!empty($user['id']))
Leave blank to keep the current password
@endif
@if(!is_array($user) && !empty($user->pending_roles_id))
@php
$pendingRole = \Spatie\Permission\Models\Role::find($user->pending_roles_id);
@endphp
Note: This user has a pending role change to {{ $pendingRole->name ?? 'Unknown' }}
@endif
@if(!empty($user->rolechangedate ?? ''))
@php
$expiryDate = \Carbon\Carbon::parse($user->rolechangedate);
$isExpired = $expiryDate->isPast();
$daysUntilExpiry = abs($expiryDate->diffInDays(now()));
$totalHours = abs($expiryDate->diffInHours(now()));
$hoursUntilExpiry = abs($totalHours % 24);
@endphp
@if($isExpired)
Expired
@elseif($daysUntilExpiry <= 7)
Expiring Soon
@elseif($daysUntilExpiry <= 30)
Active
@else
Active
@endif
@else
No Expiry
@endif
@if(!empty($user->rolechangedate ?? ''))
@if($isExpired)
Role expired {{ $expiryDate->diffForHumans() }}
@else
Role expires {{ $expiryDate->diffForHumans() }}
@endif
{{ $expiryDate->format('F j, Y') }}
•
{{ $expiryDate->format('g:i A') }}
@if($daysUntilExpiry <= 7 && !$isExpired)
{{ $daysUntilExpiry }} day{{ $daysUntilExpiry != 1 ? 's' : '' }} and {{ $hoursUntilExpiry }} hour{{ $hoursUntilExpiry != 1 ? 's' : '' }} remaining
@endif
@else
Leave empty for permanent role assignment, or use quick actions above to set an expiry date and time.
@endif
@if(!is_array($user) && !empty($user->pending_roles_id) && !empty($user->pending_role_start_date))
SCHEDULED
@php
$pendingRole = \Spatie\Permission\Models\Role::find($user->pending_roles_id);
$pendingStartDate = \Carbon\Carbon::parse($user->pending_role_start_date);
$daysUntilActivation = $pendingStartDate->diffInDays(now());
@endphp
Will change to:
{{ $pendingRole->name ?? 'Unknown' }}
Activation date:
{{ $pendingStartDate->format('M j, Y g:i A') }}
Time until activation:
{{ $pendingStartDate->diffForHumans() }}
@endif
@if(!is_array($user) && !empty($user->rolechangedate) && \Carbon\Carbon::parse($user->rolechangedate)->isFuture())
@endif
@if(!empty($user['id']))
API Requests
{{ is_array($user) ? ($user['daily_api_count'] ?? 0) : ($user->daily_api_count ?? 0) }}
In the last 24 hours
Downloads
{{ is_array($user) ? ($user['daily_download_count'] ?? 0) : ($user->daily_download_count ?? 0) }}
In the last 24 hours
These counters show activity from the past 24 hours and are automatically updated.
@endif
@if(!empty($user['id']))
@endif