64 lines
2.1 KiB
PHP
64 lines
2.1 KiB
PHP
<x-filament::page>
|
|
<form wire:submit.prevent="validatePin" class="space-y-6">
|
|
|
|
{{-- Render the form --}}
|
|
<div>
|
|
{{ $this->form }}
|
|
</div>
|
|
|
|
{{-- Submit Button --}}
|
|
<div class="flex justify-end">
|
|
<x-filament::button type="submit" color="primary">
|
|
Validate PIN
|
|
</x-filament::button>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{{-- Error Message --}}
|
|
@if ($errorMessage)
|
|
<div class="rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-700 mt-4">
|
|
{{ $errorMessage }}
|
|
</div>
|
|
@endif
|
|
|
|
{{-- Validated PIN Info --}}
|
|
@if ($validated)
|
|
<div class="rounded-lg border border-green-200 bg-green-50 p-4 space-y-2 mt-4">
|
|
<h3 class="text-sm font-semibold text-green-900">Validated PIN details</h3>
|
|
|
|
<dl class="grid grid-cols-1 gap-3 sm:grid-cols-2 text-sm text-green-800">
|
|
<div>
|
|
<dt class="font-medium">Client</dt>
|
|
<dd>{{ $validated['user_name'] ?? 'Unknown' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="font-medium">Email</dt>
|
|
<dd>{{ $validated['user_email'] ?? 'Unknown' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="font-medium">Expires</dt>
|
|
<dd>{{ $validated['expires_at'] ?? 'n/a' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="font-medium">Last validated</dt>
|
|
<dd>{{ $validated['last_validated_at'] ?? 'n/a' }}</dd>
|
|
</div>
|
|
</dl>
|
|
|
|
@if (!empty($validated['user_url']))
|
|
<div class="flex justify-end pt-2">
|
|
<x-filament::button
|
|
tag="a"
|
|
:href="$validated['user_url']"
|
|
icon="heroicon-o-arrow-top-right-on-square"
|
|
target="_blank"
|
|
>
|
|
View client in admin
|
|
</x-filament::button>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
@endif
|
|
</x-filament::page>
|