60 lines
3.1 KiB
PHP
60 lines
3.1 KiB
PHP
<x-app-layout>
|
|
<x-slot name="header">
|
|
<h2 class="text-xl font-semibold leading-tight text-gray-800">
|
|
{{ __('Import members from CSV') }}
|
|
</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">
|
|
<p class="text-sm text-gray-700 mb-4">
|
|
{{ __('Upload a CSV file with the following header columns (existing members matched by email are updated):') }}
|
|
</p>
|
|
<ul class="list-disc list-inside text-sm text-gray-700 mb-4 space-y-1">
|
|
<li><code>full_name</code></li>
|
|
<li><code>email</code></li>
|
|
<li><code>phone</code></li>
|
|
<li><code>address_line_1</code> (optional)</li>
|
|
<li><code>address_line_2</code> (optional)</li>
|
|
<li><code>city</code> (optional)</li>
|
|
<li><code>postal_code</code> (optional)</li>
|
|
<li><code>emergency_contact_name</code> (optional)</li>
|
|
<li><code>emergency_contact_phone</code> (optional)</li>
|
|
<li><code>membership_started_at</code> (YYYY-MM-DD)</li>
|
|
<li><code>membership_expires_at</code> (YYYY-MM-DD)</li>
|
|
</ul>
|
|
|
|
<form method="POST" action="{{ route('admin.members.import') }}" enctype="multipart/form-data" class="space-y-6">
|
|
@csrf
|
|
|
|
<div>
|
|
<label for="file" class="block text-sm font-medium text-gray-700">
|
|
{{ __('CSV file') }}
|
|
</label>
|
|
<input
|
|
type="file"
|
|
name="file"
|
|
id="file"
|
|
accept=".csv,text/csv"
|
|
class="mt-1 block w-full text-sm text-gray-900 file:mr-4 file:rounded-md file:border-0 file:bg-indigo-50 file:px-4 file:py-2 file:text-sm file:font-semibold file:text-indigo-700 hover:file:bg-indigo-100"
|
|
required
|
|
>
|
|
@error('file')
|
|
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="flex justify-end">
|
|
<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">
|
|
{{ __('Start import') }}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-app-layout>
|