Compare commits
2 Commits
b330c431ab
...
b412ad3fca
Author | SHA1 | Date | |
---|---|---|---|
b412ad3fca | |||
b18c5c42bf |
@ -21,8 +21,6 @@ class ApplicationForm extends Component
|
|||||||
|
|
||||||
public $message = '';
|
public $message = '';
|
||||||
|
|
||||||
public $applicationUuid;
|
|
||||||
|
|
||||||
public $captcha;
|
public $captcha;
|
||||||
|
|
||||||
public $captchaInput;
|
public $captchaInput;
|
||||||
@ -71,9 +69,9 @@ class ApplicationForm extends Component
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->applicationUuid = (string) $application->uuid;
|
|
||||||
|
|
||||||
$this->reset(['photos', 'message', 'captchaInput']);
|
$this->reset(['photos', 'message', 'captchaInput']);
|
||||||
|
|
||||||
|
return redirect("/application-status/{$application->uuid}")->with('status', 'created');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render()
|
public function render()
|
||||||
|
@ -1,15 +1,4 @@
|
|||||||
<div class="max-w-2xl w-full md:w-xl mx-auto mt-10 flex flex-col gap-6">
|
<div class="max-w-2xl w-full md:w-xl mx-auto mt-10 flex flex-col gap-6">
|
||||||
@if ($applicationUuid)
|
|
||||||
<flux:callout variant="success" icon="check-circle">
|
|
||||||
<flux:callout.heading>Your application has been submitted.</flux:callout.heading>
|
|
||||||
<flux:callout.text>
|
|
||||||
You can check its status here: <flux:callout.link
|
|
||||||
href="{{ route('application', ['uuid' => $applicationUuid]) }}">View Application Status
|
|
||||||
</flux:callout.link>
|
|
||||||
<br>Please save or bookmark that link, as the approval process can take 24-48 hours.
|
|
||||||
</flux:callout.text>
|
|
||||||
</flux:callout>
|
|
||||||
@else
|
|
||||||
<form wire:submit.prevent="submit" enctype="multipart/form-data">
|
<form wire:submit.prevent="submit" enctype="multipart/form-data">
|
||||||
<div class="flex flex-col gap-4 mb-6">
|
<div class="flex flex-col gap-4 mb-6">
|
||||||
<flux:callout variant="secondary" icon="information-circle" heading="Here you can submit your application."
|
<flux:callout variant="secondary" icon="information-circle" heading="Here you can submit your application."
|
||||||
@ -45,5 +34,4 @@
|
|||||||
</div>
|
</div>
|
||||||
<flux:button class="w-full" variant="primary" wire:click="submit">Submit Application</flux:button>
|
<flux:button class="w-full" variant="primary" wire:click="submit">Submit Application</flux:button>
|
||||||
</form>
|
</form>
|
||||||
@endif
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -16,10 +16,11 @@
|
|||||||
</flux:callout>
|
</flux:callout>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<table class="w-full border-collapse border border-gray-300 dark:border-neutral-950 rounded-lg">
|
<div class="bg-white dark:bg-zinc-900 shadow-md rounded-lg overflow-hidden">
|
||||||
<thead class="bg-gray-100 dark:bg-neutral-900">
|
<table class="min-w-full text-sm text-left text-zinc-700 dark:text-zinc-300">
|
||||||
|
<thead class="bg-zinc-100 dark:bg-zinc-950 text-xs uppercase text-zinc-500 dark:text-zinc-400">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="px-4 py-2 text-left">UUID</th>
|
<th class="px-4 py-2 text-left hidden md:block">UUID</th>
|
||||||
<th class="px-4 py-2">Status</th>
|
<th class="px-4 py-2">Status</th>
|
||||||
<th class="px-4 py-2">Uploads</th>
|
<th class="px-4 py-2">Uploads</th>
|
||||||
<th class="px-4 py-2">Submitted</th>
|
<th class="px-4 py-2">Submitted</th>
|
||||||
@ -28,8 +29,9 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@forelse ($applications as $app)
|
@forelse ($applications as $app)
|
||||||
<tr>
|
<tr class="border-b dark:border-zinc-700 hover:bg-zinc-50 dark:hover:bg-zinc-950">
|
||||||
<td class="px-4 py-2 font-mono text-sm">{{ $app->uuid }}</td>
|
<td class="px-4 py-4 font-mono text-sm hidden md:block align-middle">{{ $app->uuid }}
|
||||||
|
</td>
|
||||||
<td class="px-4 py-2">
|
<td class="px-4 py-2">
|
||||||
@if ($app->status === 0)
|
@if ($app->status === 0)
|
||||||
<span class="text-yellow-600 font-semibold">Pending</span>
|
<span class="text-yellow-600 font-semibold">Pending</span>
|
||||||
@ -42,6 +44,7 @@
|
|||||||
<td class="px-4 py-2 text-center">{{ $app->uploads->count() }}</td>
|
<td class="px-4 py-2 text-center">{{ $app->uploads->count() }}</td>
|
||||||
<td class="px-4 py-2 text-sm">{{ $app->created_at->diffForHumans() }}</td>
|
<td class="px-4 py-2 text-sm">{{ $app->created_at->diffForHumans() }}</td>
|
||||||
<td class="px-4 py-2">
|
<td class="px-4 py-2">
|
||||||
|
<div class="flex flex-col xl:flex-row">
|
||||||
<flux:button size="sm" variant="primary"
|
<flux:button size="sm" variant="primary"
|
||||||
href="{{ route('application', ['uuid' => $app->uuid]) }}">
|
href="{{ route('application', ['uuid' => $app->uuid]) }}">
|
||||||
View
|
View
|
||||||
@ -57,7 +60,7 @@
|
|||||||
Reject
|
Reject
|
||||||
</flux:button>
|
</flux:button>
|
||||||
@endif
|
@endif
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@empty
|
@empty
|
||||||
@ -67,7 +70,7 @@
|
|||||||
@endforelse
|
@endforelse
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
{{ $applications->links() }}
|
{{ $applications->links() }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
<div wire:poll.10s="loadApplication" class="max-w-2xl w-full md:w-xl mx-auto mt-10 flex flex-col gap-6">
|
<div wire:poll.10s="loadApplication" class="max-w-2xl w-full md:w-xl mx-auto mt-10 flex flex-col gap-6">
|
||||||
|
|
||||||
|
@if (session('status'))
|
||||||
|
<flux:callout variant="success" icon="check-circle">
|
||||||
|
<flux:callout.heading>Your application has been submitted.</flux:callout.heading>
|
||||||
|
<flux:callout.text>
|
||||||
|
Please bookmark this page, as the approval process can take up to 24 hours.
|
||||||
|
</flux:callout.text>
|
||||||
|
</flux:callout>
|
||||||
|
@endif
|
||||||
|
|
||||||
@if ($application->status === 0)
|
@if ($application->status === 0)
|
||||||
<flux:callout variant="warning" icon="exclamation-circle">
|
<flux:callout variant="warning" icon="exclamation-circle">
|
||||||
<flux:callout.heading>Application pending</flux:callout.heading>
|
<flux:callout.heading>Application pending</flux:callout.heading>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user