118 lines
6.2 KiB
PHP
118 lines
6.2 KiB
PHP
<x-app-layout>
|
|
<x-slot name="header">
|
|
<h2 class="text-xl font-semibold leading-tight text-gray-800">
|
|
{{ __('New Finance Document') }}
|
|
</h2>
|
|
</x-slot>
|
|
|
|
<div class="py-12">
|
|
<div class="mx-auto max-w-3xl sm:px-6 lg:px-8">
|
|
<div class="bg-white shadow sm:rounded-lg">
|
|
<div class="px-4 py-5 sm:p-6">
|
|
<form method="POST" action="{{ route('admin.finance.store') }}" enctype="multipart/form-data" class="space-y-6" aria-label="{{ __('Finance document submission form') }}">
|
|
@csrf
|
|
|
|
<div>
|
|
<label for="member_id" class="block text-sm font-medium text-gray-700">
|
|
{{ __('Member (optional)') }}
|
|
</label>
|
|
<select
|
|
name="member_id"
|
|
id="member_id"
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
>
|
|
<option value="">{{ __('Not linked to a member') }}</option>
|
|
@foreach ($members as $member)
|
|
<option value="{{ $member->id }}" @selected(old('member_id') == $member->id)>
|
|
{{ $member->full_name }}
|
|
</option>
|
|
@endforeach
|
|
</select>
|
|
@error('member_id')
|
|
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="title" class="block text-sm font-medium text-gray-700">
|
|
{{ __('Title') }}
|
|
</label>
|
|
<input
|
|
type="text"
|
|
name="title"
|
|
id="title"
|
|
value="{{ old('title') }}"
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
required
|
|
>
|
|
@error('title')
|
|
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="amount" class="block text-sm font-medium text-gray-700">
|
|
{{ __('Amount') }}
|
|
</label>
|
|
<input
|
|
type="number"
|
|
step="0.01"
|
|
name="amount"
|
|
id="amount"
|
|
value="{{ old('amount') }}"
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
>
|
|
@error('amount')
|
|
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="description" class="block text-sm font-medium text-gray-700">
|
|
{{ __('Description') }}
|
|
</label>
|
|
<textarea
|
|
name="description"
|
|
id="description"
|
|
rows="4"
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
>{{ old('description') }}</textarea>
|
|
@error('description')
|
|
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="attachment" class="block text-sm font-medium text-gray-700">
|
|
{{ __('Attachment (optional)') }}
|
|
</label>
|
|
<input
|
|
type="file"
|
|
name="attachment"
|
|
id="attachment"
|
|
class="mt-1 block w-full text-sm text-gray-900 border border-gray-300 rounded-md cursor-pointer focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"
|
|
>
|
|
@error('attachment')
|
|
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
<p class="mt-1 text-sm text-gray-500">
|
|
{{ __('Max file size: 10MB') }}
|
|
</p>
|
|
</div>
|
|
|
|
<div class="flex justify-end gap-3">
|
|
<a href="{{ route('admin.finance.index') }}" class="inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
|
|
{{ __('Cancel') }}
|
|
</a>
|
|
<button type="submit" class="inline-flex items-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
|
|
{{ __('Submit Document') }}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-app-layout>
|
|
|