Add membership fee system with disability discount and fix document permissions
Features: - Implement two fee types: entrance fee and annual fee (both NT$1,000) - Add 50% discount for disability certificate holders - Add disability certificate upload in member profile - Integrate disability verification into cashier approval workflow - Add membership fee settings in system admin Document permissions: - Fix hard-coded role logic in Document model - Use permission-based authorization instead of role checks Additional features: - Add announcements, general ledger, and trial balance modules - Add income management and accounting entries - Add comprehensive test suite with factories - Update UI translations to Traditional Chinese 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header">
|
||||
<h2 class="text-xl font-semibold leading-tight text-gray-800 dark:text-gray-200">
|
||||
{{ __('Activate Membership') }} - {{ $member->full_name }}
|
||||
啟用會員資格 - {{ $member->full_name }}
|
||||
</h2>
|
||||
</x-slot>
|
||||
|
||||
<div class="py-12">
|
||||
<div class="mx-auto max-w-2xl sm:px-6 lg:px-8">
|
||||
<div class="bg-white shadow sm:rounded-lg dark:bg-gray-800 px-4 py-5 sm:p-6">
|
||||
<div class="bg-white dark:bg-gray-800 shadow sm:rounded-lg px-4 py-5 sm:p-6">
|
||||
|
||||
@if($approvedPayment)
|
||||
{{-- Approved Payment Info --}}
|
||||
@@ -19,12 +19,12 @@
|
||||
</svg>
|
||||
</div>
|
||||
<div class="ml-3">
|
||||
<h3 class="text-sm font-medium text-green-800 dark:text-green-200">{{ __('Payment Approved') }}</h3>
|
||||
<h3 class="text-sm font-medium text-green-800 dark:text-green-200">付款已核准</h3>
|
||||
<div class="mt-2 text-sm text-green-700 dark:text-green-300">
|
||||
<p>{{ __('Amount') }}: TWD {{ number_format($approvedPayment->amount, 0) }}</p>
|
||||
<p>{{ __('Payment Date') }}: {{ $approvedPayment->paid_at->format('Y-m-d') }}</p>
|
||||
<p>{{ __('Payment Method') }}: {{ $approvedPayment->payment_method_label }}</p>
|
||||
<p>{{ __('Approved on') }}: {{ $approvedPayment->chair_verified_at->format('Y-m-d H:i') }}</p>
|
||||
<p>金額: TWD {{ number_format($approvedPayment->amount, 0) }}</p>
|
||||
<p>付款日期: {{ $approvedPayment->paid_at->format('Y-m-d') }}</p>
|
||||
<p>付款方式: {{ $approvedPayment->payment_method_label }}</p>
|
||||
<p>核准日期: {{ $approvedPayment->chair_verified_at->format('Y-m-d H:i') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -33,18 +33,18 @@
|
||||
|
||||
{{-- Member Info --}}
|
||||
<div class="mb-6">
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-3">{{ __('Member Information') }}</h3>
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-3">會員資訊</h3>
|
||||
<dl class="grid grid-cols-1 gap-x-4 gap-y-4 sm:grid-cols-2">
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">{{ __('Full Name') }}</dt>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">全名</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">{{ $member->full_name }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">{{ __('Email') }}</dt>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">電子郵件</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">{{ $member->email }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">{{ __('Current Status') }}</dt>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">目前狀態</dt>
|
||||
<dd class="mt-1">
|
||||
<span class="inline-flex items-center rounded-full px-2 py-1 text-xs font-medium {{ $member->membership_status_badge }}">
|
||||
{{ $member->membership_status_label }}
|
||||
@@ -59,19 +59,19 @@
|
||||
@csrf
|
||||
|
||||
<div class="border-t border-gray-200 dark:border-gray-700 pt-6">
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-4">{{ __('Membership Activation Details') }}</h3>
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-4">會員啟用詳情</h3>
|
||||
|
||||
{{-- Membership Type --}}
|
||||
<div>
|
||||
<label for="membership_type" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Membership Type') }} <span class="text-red-500">*</span>
|
||||
會員類型 <span class="text-red-500 dark:text-red-400">*</span>
|
||||
</label>
|
||||
<select name="membership_type" id="membership_type" required
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100 @error('membership_type') border-red-300 @enderror">
|
||||
<option value="regular" {{ old('membership_type', 'regular') == 'regular' ? 'selected' : '' }}>{{ __('Regular Member (一般會員)') }}</option>
|
||||
<option value="student" {{ old('membership_type') == 'student' ? 'selected' : '' }}>{{ __('Student Member (學生會員)') }}</option>
|
||||
<option value="honorary" {{ old('membership_type') == 'honorary' ? 'selected' : '' }}>{{ __('Honorary Member (榮譽會員)') }}</option>
|
||||
<option value="lifetime" {{ old('membership_type') == 'lifetime' ? 'selected' : '' }}>{{ __('Lifetime Member (終身會員)') }}</option>
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm @error('membership_type') border-red-300 @enderror">
|
||||
<option value="regular" {{ old('membership_type', 'regular') == 'regular' ? 'selected' : '' }}>一般會員</option>
|
||||
<option value="student" {{ old('membership_type') == 'student' ? 'selected' : '' }}>學生會員</option>
|
||||
<option value="honorary" {{ old('membership_type') == 'honorary' ? 'selected' : '' }}>榮譽會員</option>
|
||||
<option value="lifetime" {{ old('membership_type') == 'lifetime' ? 'selected' : '' }}>終身會員</option>
|
||||
</select>
|
||||
@error('membership_type')<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>@enderror
|
||||
</div>
|
||||
@@ -79,23 +79,23 @@
|
||||
{{-- Start Date --}}
|
||||
<div class="mt-4">
|
||||
<label for="membership_started_at" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Membership Start Date') }} <span class="text-red-500">*</span>
|
||||
會員資格開始日 <span class="text-red-500 dark:text-red-400">*</span>
|
||||
</label>
|
||||
<input type="date" name="membership_started_at" id="membership_started_at"
|
||||
value="{{ old('membership_started_at', today()->format('Y-m-d')) }}" required
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100 @error('membership_started_at') border-red-300 @enderror">
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm @error('membership_started_at') border-red-300 @enderror">
|
||||
@error('membership_started_at')<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>@enderror
|
||||
</div>
|
||||
|
||||
{{-- End Date --}}
|
||||
<div class="mt-4">
|
||||
<label for="membership_expires_at" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Membership Expiry Date') }} <span class="text-red-500">*</span>
|
||||
會員資格到期日 <span class="text-red-500 dark:text-red-400">*</span>
|
||||
</label>
|
||||
<input type="date" name="membership_expires_at" id="membership_expires_at"
|
||||
value="{{ old('membership_expires_at', today()->addYear()->format('Y-m-d')) }}" required
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100 @error('membership_expires_at') border-red-300 @enderror">
|
||||
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">{{ __('Default: One year from start date') }}</p>
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm @error('membership_expires_at') border-red-300 @enderror">
|
||||
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">預設:開始日期後一年</p>
|
||||
@error('membership_expires_at')<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>@enderror
|
||||
</div>
|
||||
</div>
|
||||
@@ -110,21 +110,21 @@
|
||||
</div>
|
||||
<div class="ml-3">
|
||||
<p class="text-sm text-blue-700 dark:text-blue-300">
|
||||
{{ __('After activation, the member will receive a confirmation email and gain access to member-only resources.') }}
|
||||
啟用後,會員將收到確認電子郵件並獲得會員專屬資源的存取權限。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Submit Buttons --}}
|
||||
<div class="flex items-center justify-end gap-x-4 border-t border-gray-200 pt-6 dark:border-gray-700">
|
||||
<div class="flex items-center justify-end gap-x-4 border-t border-gray-200 dark:border-gray-700 pt-6">
|
||||
<a href="{{ route('admin.members.show', $member) }}"
|
||||
class="rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 dark:bg-gray-700 dark:text-gray-100 dark:ring-gray-600">
|
||||
{{ __('Cancel') }}
|
||||
class="rounded-md bg-white dark:bg-gray-700 px-3 py-2 text-sm font-semibold text-gray-900 dark:text-gray-100 shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-600 hover:bg-gray-50 dark:hover:bg-gray-600">
|
||||
取消
|
||||
</a>
|
||||
<button type="submit"
|
||||
class="inline-flex justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 dark:bg-indigo-500 dark:hover:bg-indigo-400">
|
||||
{{ __('Activate Membership') }}
|
||||
class="inline-flex justify-center rounded-md bg-indigo-600 dark:bg-indigo-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 dark:hover:bg-indigo-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">
|
||||
啟用會員資格
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
@@ -168,4 +168,4 @@
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</x-app-layout>
|
||||
</x-app-layout>
|
||||
@@ -1,236 +1,236 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header">
|
||||
<h2 class="text-xl font-semibold leading-tight text-gray-800">
|
||||
{{ __('Create new member') }}
|
||||
<h2 class="text-xl font-semibold leading-tight text-gray-800 dark:text-gray-200">
|
||||
新增會員
|
||||
</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="bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
||||
<div class="px-4 py-5 sm:p-6">
|
||||
@if (session('status'))
|
||||
<div class="mb-4 rounded-md bg-green-50 p-4" role="status" aria-live="polite">
|
||||
<p class="text-sm font-medium text-green-800">
|
||||
<div class="mb-4 rounded-md bg-green-50 dark:bg-green-900/50 p-4" role="status" aria-live="polite">
|
||||
<p class="text-sm font-medium text-green-800 dark:text-green-200">
|
||||
{{ session('status') }}
|
||||
</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form method="POST" action="{{ route('admin.members.store') }}" class="space-y-6" aria-label="{{ __('Create member form') }}">
|
||||
<form method="POST" action="{{ route('admin.members.store') }}" class="space-y-6" aria-label="新增會員表單">
|
||||
@csrf
|
||||
|
||||
<div>
|
||||
<label for="full_name" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Full name') }}
|
||||
<label for="full_name" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
全名
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="full_name"
|
||||
id="full_name"
|
||||
value="{{ old('full_name') }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
required
|
||||
>
|
||||
@error('full_name')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="email" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Email') }}
|
||||
<label for="email" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
電子郵件
|
||||
</label>
|
||||
<input
|
||||
type="email"
|
||||
name="email"
|
||||
id="email"
|
||||
value="{{ old('email') }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
required
|
||||
>
|
||||
@error('email')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
<p class="mt-1 text-sm text-gray-500">
|
||||
{{ __('An activation email will be sent to this address.') }}
|
||||
<p class="mt-1 text-sm text-gray-500 dark:text-gray-400">
|
||||
啟用電子郵件將發送至此地址。
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="national_id" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('National ID') }}
|
||||
<label for="national_id" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
身分證號
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="national_id"
|
||||
id="national_id"
|
||||
value="{{ old('national_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"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
autocomplete="off"
|
||||
>
|
||||
@error('national_id')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
<p class="mt-1 text-sm text-gray-500">
|
||||
{{ __('Will be stored encrypted for security.') }}
|
||||
<p class="mt-1 text-sm text-gray-500 dark:text-gray-400">
|
||||
將加密儲存以確保安全。
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="phone" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Phone') }}
|
||||
<label for="phone" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
電話
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="phone"
|
||||
id="phone"
|
||||
value="{{ old('phone') }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
@error('phone')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="grid gap-6 sm:grid-cols-2">
|
||||
<div>
|
||||
<label for="membership_started_at" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Membership start date') }}
|
||||
<label for="membership_started_at" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
會員資格開始日
|
||||
</label>
|
||||
<input
|
||||
type="date"
|
||||
name="membership_started_at"
|
||||
id="membership_started_at"
|
||||
value="{{ old('membership_started_at') }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
@error('membership_started_at')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="membership_expires_at" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Membership expiry date') }}
|
||||
<label for="membership_expires_at" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
會員資格到期日
|
||||
</label>
|
||||
<input
|
||||
type="date"
|
||||
name="membership_expires_at"
|
||||
id="membership_expires_at"
|
||||
value="{{ old('membership_expires_at') }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
@error('membership_expires_at')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="address_line_1" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Address Line 1') }}
|
||||
<label for="address_line_1" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
地址第1行
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="address_line_1"
|
||||
id="address_line_1"
|
||||
value="{{ old('address_line_1') }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
@error('address_line_1')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="address_line_2" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Address Line 2') }}
|
||||
<label for="address_line_2" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
地址第2行
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="address_line_2"
|
||||
id="address_line_2"
|
||||
value="{{ old('address_line_2') }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
@error('address_line_2')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="grid gap-6 sm:grid-cols-2">
|
||||
<div>
|
||||
<label for="city" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('City') }}
|
||||
<label for="city" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
城市
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="city"
|
||||
id="city"
|
||||
value="{{ old('city') }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
@error('city')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="postal_code" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Postal Code') }}
|
||||
<label for="postal_code" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
郵遞區號
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="postal_code"
|
||||
id="postal_code"
|
||||
value="{{ old('postal_code') }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
@error('postal_code')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="emergency_contact_name" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Emergency Contact Name') }}
|
||||
<label for="emergency_contact_name" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
緊急聯絡人姓名
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="emergency_contact_name"
|
||||
id="emergency_contact_name"
|
||||
value="{{ old('emergency_contact_name') }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
@error('emergency_contact_name')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="emergency_contact_phone" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Emergency Contact Phone') }}
|
||||
<label for="emergency_contact_phone" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
緊急聯絡人電話
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="emergency_contact_phone"
|
||||
id="emergency_contact_phone"
|
||||
value="{{ old('emergency_contact_phone') }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
@error('emergency_contact_phone')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end gap-3">
|
||||
<a href="{{ route('admin.members.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 href="{{ route('admin.members.index') }}" class="inline-flex items-center rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:focus:ring-indigo-600 focus:ring-offset-2 dark:focus:ring-offset-gray-800">
|
||||
取消
|
||||
</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">
|
||||
{{ __('Create member') }}
|
||||
<button type="submit" class="inline-flex items-center rounded-md border border-transparent bg-indigo-600 dark:bg-indigo-500 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-700 dark:hover:bg-indigo-600 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:focus:ring-indigo-600 focus:ring-offset-2 dark:focus:ring-offset-gray-800">
|
||||
新增會員
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header">
|
||||
<h2 class="text-xl font-semibold leading-tight text-gray-800">
|
||||
{{ __('Edit member') }}
|
||||
<h2 class="text-xl font-semibold leading-tight text-gray-800 dark:text-gray-200">
|
||||
編輯會員
|
||||
</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="bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
||||
<div class="px-4 py-5 sm:p-6">
|
||||
@if (session('status'))
|
||||
<div class="mb-4 rounded-md bg-green-50 p-4" role="status" aria-live="polite">
|
||||
<p class="text-sm font-medium text-green-800">
|
||||
<div class="mb-4 rounded-md bg-green-50 dark:bg-green-900/50 p-4" role="status" aria-live="polite">
|
||||
<p class="text-sm font-medium text-green-800 dark:text-green-200">
|
||||
{{ session('status') }}
|
||||
</p>
|
||||
</div>
|
||||
@@ -22,210 +22,210 @@
|
||||
@method('PATCH')
|
||||
|
||||
<div>
|
||||
<label for="full_name" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Full name') }}
|
||||
<label for="full_name" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
全名
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="full_name"
|
||||
id="full_name"
|
||||
value="{{ old('full_name', $member->full_name) }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
required
|
||||
>
|
||||
@error('full_name')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="email" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Email') }}
|
||||
<label for="email" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
電子郵件
|
||||
</label>
|
||||
<input
|
||||
type="email"
|
||||
name="email"
|
||||
id="email"
|
||||
value="{{ old('email', $member->email) }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
required
|
||||
>
|
||||
@error('email')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="national_id" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('National ID') }}
|
||||
<label for="national_id" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
身分證號
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="national_id"
|
||||
id="national_id"
|
||||
value="{{ old('national_id', $member->national_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"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
autocomplete="off"
|
||||
>
|
||||
@error('national_id')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
<p class="mt-1 text-sm text-gray-500">
|
||||
{{ __('Will be stored encrypted for security.') }}
|
||||
<p class="mt-1 text-sm text-gray-500 dark:text-gray-400">
|
||||
將加密儲存以確保安全。
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="phone" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Phone') }}
|
||||
<label for="phone" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
電話
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="phone"
|
||||
id="phone"
|
||||
value="{{ old('phone', $member->phone) }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
@error('phone')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="grid gap-6 sm:grid-cols-2">
|
||||
<div>
|
||||
<label for="membership_started_at" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Membership start date') }}
|
||||
<label for="membership_started_at" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
會員資格開始日
|
||||
</label>
|
||||
<input
|
||||
type="date"
|
||||
name="membership_started_at"
|
||||
id="membership_started_at"
|
||||
value="{{ old('membership_started_at', optional($member->membership_started_at)->toDateString()) }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
@error('membership_started_at')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="membership_expires_at" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Membership expiry date') }}
|
||||
<label for="membership_expires_at" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
會員資格到期日
|
||||
</label>
|
||||
<input
|
||||
type="date"
|
||||
name="membership_expires_at"
|
||||
id="membership_expires_at"
|
||||
value="{{ old('membership_expires_at', optional($member->membership_expires_at)->toDateString()) }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
@error('membership_expires_at')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="address_line_1" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Address Line 1') }}
|
||||
<label for="address_line_1" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
地址第1行
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="address_line_1"
|
||||
id="address_line_1"
|
||||
value="{{ old('address_line_1', $member->address_line_1) }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
@error('address_line_1')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="address_line_2" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Address Line 2') }}
|
||||
<label for="address_line_2" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
地址第2行
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="address_line_2"
|
||||
id="address_line_2"
|
||||
value="{{ old('address_line_2', $member->address_line_2) }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
@error('address_line_2')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="grid gap-6 sm:grid-cols-2">
|
||||
<div>
|
||||
<label for="city" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('City') }}
|
||||
<label for="city" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
城市
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="city"
|
||||
id="city"
|
||||
value="{{ old('city', $member->city) }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
@error('city')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="postal_code" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Postal Code') }}
|
||||
<label for="postal_code" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
郵遞區號
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="postal_code"
|
||||
id="postal_code"
|
||||
value="{{ old('postal_code', $member->postal_code) }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
@error('postal_code')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="emergency_contact_name" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Emergency Contact Name') }}
|
||||
<label for="emergency_contact_name" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
緊急聯絡人姓名
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="emergency_contact_name"
|
||||
id="emergency_contact_name"
|
||||
value="{{ old('emergency_contact_name', $member->emergency_contact_name) }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
@error('emergency_contact_name')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="emergency_contact_phone" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Emergency Contact Phone') }}
|
||||
<label for="emergency_contact_phone" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
緊急聯絡人電話
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="emergency_contact_phone"
|
||||
id="emergency_contact_phone"
|
||||
value="{{ old('emergency_contact_phone', $member->emergency_contact_phone) }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
@error('emergency_contact_phone')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $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">
|
||||
{{ __('Save changes') }}
|
||||
<button type="submit" class="inline-flex items-center rounded-md border border-transparent bg-indigo-600 dark:bg-indigo-500 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-700 dark:hover:bg-indigo-600 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:focus:ring-indigo-600 focus:ring-offset-2 dark:focus:ring-offset-gray-800">
|
||||
儲存變更
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -1,54 +1,54 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header">
|
||||
<h2 class="text-xl font-semibold leading-tight text-gray-800">
|
||||
{{ __('Import members from CSV') }}
|
||||
<h2 class="text-xl font-semibold leading-tight text-gray-800 dark:text-gray-200">
|
||||
從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="bg-white dark:bg-gray-800 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 class="text-sm text-gray-700 dark:text-gray-300 mb-4">
|
||||
上傳具有以下標題列的CSV檔案(現有會員將依電子郵件比對並更新):
|
||||
</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 class="list-disc list-inside text-sm text-gray-700 dark:text-gray-300 mb-4 space-y-1">
|
||||
<li><code class="text-gray-800 dark:text-gray-200">full_name</code></li>
|
||||
<li><code class="text-gray-800 dark:text-gray-200">email</code></li>
|
||||
<li><code class="text-gray-800 dark:text-gray-200">phone</code></li>
|
||||
<li><code class="text-gray-800 dark:text-gray-200">address_line_1</code> (optional)</li>
|
||||
<li><code class="text-gray-800 dark:text-gray-200">address_line_2</code> (optional)</li>
|
||||
<li><code class="text-gray-800 dark:text-gray-200">city</code> (optional)</li>
|
||||
<li><code class="text-gray-800 dark:text-gray-200">postal_code</code> (optional)</li>
|
||||
<li><code class="text-gray-800 dark:text-gray-200">emergency_contact_name</code> (optional)</li>
|
||||
<li><code class="text-gray-800 dark:text-gray-200">emergency_contact_phone</code> (optional)</li>
|
||||
<li><code class="text-gray-800 dark:text-gray-200">membership_started_at</code> (YYYY-MM-DD)</li>
|
||||
<li><code class="text-gray-800 dark:text-gray-200">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 for="file" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
CSV檔案
|
||||
</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"
|
||||
class="mt-1 block w-full text-sm text-gray-900 dark:text-gray-100 file:mr-4 file:rounded-md file:border-0 file:bg-indigo-50 dark:file:bg-indigo-900/50 file:px-4 file:py-2 file:text-sm file:font-semibold file:text-indigo-700 dark:file:text-indigo-300 hover:file:bg-indigo-100 dark:hover:file:bg-indigo-900"
|
||||
required
|
||||
>
|
||||
@error('file')
|
||||
<p class="mt-2 text-sm text-red-600">{{ $message }}</p>
|
||||
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $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 type="submit" class="inline-flex items-center rounded-md border border-transparent bg-indigo-600 dark:bg-indigo-500 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-700 dark:hover:bg-indigo-600 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:focus:ring-indigo-600 focus:ring-offset-2 dark:focus:ring-offset-gray-800">
|
||||
開始匯入
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -1,170 +1,236 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header">
|
||||
<h2 class="text-xl font-semibold leading-tight text-gray-800">
|
||||
{{ __('Members') }}
|
||||
<h2 class="text-xl font-semibold leading-tight text-gray-800 dark:text-gray-200">
|
||||
會員管理
|
||||
</h2>
|
||||
</x-slot>
|
||||
|
||||
<div class="py-12">
|
||||
<div class="mx-auto max-w-7xl sm:px-6 lg:px-8">
|
||||
<div class="bg-white shadow sm:rounded-lg">
|
||||
<div class="bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
||||
<div class="px-4 py-5 sm:p-6">
|
||||
<form method="GET" action="{{ route('admin.members.index') }}" class="mb-4 space-y-4" role="search" aria-label="{{ __('Search and filter members') }}">
|
||||
<form method="GET" action="{{ route('admin.members.index') }}" class="mb-4 space-y-4" role="search" aria-label="搜尋和篩選會員">
|
||||
<div>
|
||||
<label for="search" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Search by name, email, phone, or national ID') }}
|
||||
<label for="search" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
依姓名、電子郵件、電話或身分證號搜尋
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="search"
|
||||
id="search"
|
||||
value="{{ $filters['search'] ?? '' }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
placeholder="{{ __('Enter search term...') }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
placeholder="輸入搜尋關鍵字..."
|
||||
>
|
||||
<p class="mt-1 text-xs text-gray-500">
|
||||
{{ __('Searches in name, email, phone number, and national ID') }}
|
||||
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">
|
||||
在姓名、電子郵件、電話號碼和身分證號中搜尋
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 gap-4 sm:grid-cols-3">
|
||||
<div>
|
||||
<label for="status" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Membership status') }}
|
||||
<label for="status" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
會員資格狀態
|
||||
</label>
|
||||
<select
|
||||
id="status"
|
||||
name="status"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
<option value="">{{ __('All') }}</option>
|
||||
<option value="active" @selected(($filters['status'] ?? '') === 'active')>{{ __('Active') }}</option>
|
||||
<option value="expired" @selected(($filters['status'] ?? '') === 'expired')>{{ __('Expired') }}</option>
|
||||
<option value="expiring_soon" @selected(($filters['status'] ?? '') === 'expiring_soon')>{{ __('Expiring Soon (30 days)') }}</option>
|
||||
<option value="">所有</option>
|
||||
<option value="active" @selected(($filters['status'] ?? '') === 'active')>使用中</option>
|
||||
<option value="expired" @selected(($filters['status'] ?? '') === 'expired')>已過期</option>
|
||||
<option value="expiring_soon" @selected(($filters['status'] ?? '') === 'expiring_soon')>即將到期(30天內)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="payment_status" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Payment status') }}
|
||||
<label for="payment_status" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
付款狀態
|
||||
</label>
|
||||
<select
|
||||
id="payment_status"
|
||||
name="payment_status"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
<option value="">{{ __('All') }}</option>
|
||||
<option value="has_payments" @selected(($filters['payment_status'] ?? '') === 'has_payments')>{{ __('Has Payments') }}</option>
|
||||
<option value="no_payments" @selected(($filters['payment_status'] ?? '') === 'no_payments')>{{ __('No Payments') }}</option>
|
||||
<option value="">所有</option>
|
||||
<option value="has_payments" @selected(($filters['payment_status'] ?? '') === 'has_payments')>有付款記錄</option>
|
||||
<option value="no_payments" @selected(($filters['payment_status'] ?? '') === 'no_payments')>無付款記錄</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Date range') }}
|
||||
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
日期範圍
|
||||
</label>
|
||||
<button
|
||||
type="button"
|
||||
onclick="document.getElementById('dateFilters').classList.toggle('hidden')"
|
||||
class="mt-1 inline-flex w-full items-center justify-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"
|
||||
class="mt-1 inline-flex w-full items-center justify-center rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:focus:ring-indigo-600 focus:ring-offset-2 dark:focus:ring-offset-gray-800"
|
||||
>
|
||||
{{ __('Toggle Date Filters') }}
|
||||
切換日期篩選
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="dateFilters" class="{{ (($filters['started_from'] ?? '') || ($filters['started_to'] ?? '')) ? '' : 'hidden' }} grid grid-cols-1 gap-4 sm:grid-cols-2">
|
||||
<div>
|
||||
<label for="started_from" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Joined from') }}
|
||||
<label for="started_from" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
加入起始
|
||||
</label>
|
||||
<input
|
||||
type="date"
|
||||
name="started_from"
|
||||
id="started_from"
|
||||
value="{{ $filters['started_from'] ?? '' }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="started_to" class="block text-sm font-medium text-gray-700">
|
||||
{{ __('Joined to') }}
|
||||
<label for="started_to" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
加入結束
|
||||
</label>
|
||||
<input
|
||||
type="date"
|
||||
name="started_to"
|
||||
id="started_to"
|
||||
value="{{ $filters['started_to'] ?? '' }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap items-center gap-2 justify-between">
|
||||
<div class="flex gap-2">
|
||||
<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">
|
||||
{{ __('Apply filters') }}
|
||||
<button type="submit" class="inline-flex items-center rounded-md border border-transparent bg-indigo-600 dark:bg-indigo-500 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-700 dark:hover:bg-indigo-600 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:focus:ring-indigo-600 focus:ring-offset-2 dark:focus:ring-offset-gray-800">
|
||||
套用篩選
|
||||
</button>
|
||||
<a href="{{ route('admin.members.export', request()->only('search','status')) }}" 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">
|
||||
{{ __('Export CSV') }}
|
||||
<a href="{{ route('admin.members.export', request()->only('search','status')) }}" class="inline-flex items-center rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:focus:ring-indigo-600 focus:ring-offset-2 dark:focus:ring-offset-gray-800">
|
||||
匯出CSV
|
||||
</a>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<a href="{{ route('admin.members.create') }}" class="inline-flex items-center rounded-md border border-transparent bg-green-600 px-4 py-2 text-sm font-medium text-white hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2">
|
||||
{{ __('Create Member') }}
|
||||
<a href="{{ route('admin.members.create') }}" class="inline-flex items-center rounded-md border border-transparent bg-green-600 dark:bg-green-500 px-4 py-2 text-sm font-medium text-white hover:bg-green-700 dark:hover:bg-green-600 focus:outline-none focus:ring-2 focus:ring-green-500 dark:focus:ring-green-600 focus:ring-offset-2 dark:focus:ring-offset-gray-800">
|
||||
新增會員
|
||||
</a>
|
||||
<a href="{{ route('admin.members.import-form') }}" 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">
|
||||
{{ __('Import CSV') }}
|
||||
<a href="{{ route('admin.members.import-form') }}" class="inline-flex items-center rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:focus:ring-indigo-600 focus:ring-offset-2 dark:focus:ring-offset-gray-800">
|
||||
匯入CSV
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- Batch Actions Toolbar (Hidden by default) -->
|
||||
<div id="batchActions" class="hidden mb-4 p-4 bg-gray-50 dark:bg-gray-700 rounded-md border border-gray-200 dark:border-gray-600 flex items-center justify-between">
|
||||
<div class="flex items-center space-x-4">
|
||||
<span class="text-sm font-medium text-gray-700 dark:text-gray-200">
|
||||
<span id="selectedCount">0</span> 已選擇
|
||||
</span>
|
||||
|
||||
<!-- Batch Delete -->
|
||||
<form id="batchDeleteForm" action="{{ route('admin.members.batch-destroy') }}" method="POST" onsubmit="return confirm('您確定要刪除選取的會員嗎?');">
|
||||
@csrf
|
||||
<div id="batchDeleteInputs"></div>
|
||||
<button type="submit" class="text-red-600 dark:text-red-400 hover:text-red-800 dark:hover:text-red-300 text-sm font-medium">
|
||||
刪除所選
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<span class="text-gray-300 dark:text-gray-500">|</span>
|
||||
|
||||
<!-- Batch Update Status -->
|
||||
<form id="batchStatusForm" action="{{ route('admin.members.batch-update-status') }}" method="POST" class="flex items-center space-x-2">
|
||||
@csrf
|
||||
<div id="batchStatusInputs"></div>
|
||||
<select name="status" required class="text-sm border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-100 rounded-md shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600">
|
||||
<option value="">設定狀態...</option>
|
||||
<option value="active">活躍</option>
|
||||
<option value="pending">待審核</option>
|
||||
<option value="expired">已過期</option>
|
||||
<option value="suspended">已停權</option>
|
||||
</select>
|
||||
<button type="submit" class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-800 dark:hover:text-indigo-300 text-sm font-medium">
|
||||
更新
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4 overflow-x-auto">
|
||||
<table class="min-w-full divide-y divide-gray-200" role="table">
|
||||
<thead class="bg-gray-50">
|
||||
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700" role="table">
|
||||
<thead class="bg-gray-50 dark:bg-gray-700">
|
||||
<tr>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500">
|
||||
{{ __('Name') }}
|
||||
<th scope="col" class="px-4 py-3 text-left">
|
||||
<input type="checkbox" id="selectAll" class="rounded border-gray-300 dark:border-gray-600 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:bg-gray-800">
|
||||
</th>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500">
|
||||
{{ __('Email') }}
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-300">
|
||||
名稱
|
||||
</th>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500">
|
||||
{{ __('Membership Expires') }}
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-300">
|
||||
電子郵件
|
||||
</th>
|
||||
<th scope="col" class="px-4 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-500">
|
||||
<span class="sr-only">{{ __('Actions') }}</span>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-300">
|
||||
角色
|
||||
</th>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-300">
|
||||
會員資格到期
|
||||
</th>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-300">
|
||||
狀態
|
||||
</th>
|
||||
<th scope="col" class="px-4 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-300">
|
||||
<span class="sr-only">操作</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 bg-white">
|
||||
<tbody class="divide-y divide-gray-200 dark:divide-gray-700 bg-white dark:bg-gray-800">
|
||||
@forelse ($members as $member)
|
||||
<tr>
|
||||
<td class="whitespace-nowrap px-4 py-3 text-sm text-gray-900">
|
||||
<td class="px-4 py-3">
|
||||
<input type="checkbox" name="selected_ids[]" value="{{ $member->id }}" class="member-checkbox rounded border-gray-300 dark:border-gray-600 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:bg-gray-700">
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-4 py-3 text-sm text-gray-900 dark:text-gray-100">
|
||||
{{ $member->full_name }}
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-4 py-3 text-sm text-gray-900">
|
||||
<td class="whitespace-nowrap px-4 py-3 text-sm text-gray-900 dark:text-gray-100">
|
||||
{{ $member->email }}
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-4 py-3 text-sm text-gray-900">
|
||||
<td class="whitespace-nowrap px-4 py-3 text-sm text-gray-900 dark:text-gray-100">
|
||||
@if($member->user && $member->user->roles->isNotEmpty())
|
||||
<div class="flex flex-wrap gap-1">
|
||||
@foreach($member->user->roles as $role)
|
||||
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-indigo-100 dark:bg-indigo-900 text-indigo-800 dark:text-indigo-200">
|
||||
{{ $role->name }}
|
||||
</span>
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
<span class="text-gray-500 dark:text-gray-400">-</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-4 py-3 text-sm text-gray-900 dark:text-gray-100">
|
||||
@if ($member->membership_expires_at)
|
||||
{{ $member->membership_expires_at->toDateString() }}
|
||||
@else
|
||||
<span class="text-gray-500">{{ __('Not set') }}</span>
|
||||
<span class="text-gray-500 dark:text-gray-400">未設定</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-4 py-3 text-sm">
|
||||
<span class="inline-flex rounded-full px-2 text-xs font-semibold leading-5 {{ $member->membership_status_badge }}">
|
||||
{{ $member->membership_status_label }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-4 py-3 text-right text-sm font-medium">
|
||||
<a href="{{ route('admin.members.show', $member) }}" class="text-indigo-600 hover:text-indigo-900">
|
||||
{{ __('View') }}
|
||||
<a href="{{ route('admin.members.show', $member) }}" class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300">
|
||||
檢視
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="4" class="px-4 py-4 text-sm text-gray-500">
|
||||
{{ __('No members found.') }}
|
||||
<td colspan="7" class="px-4 py-4 text-sm text-gray-500 dark:text-gray-400">
|
||||
找不到會員。
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
@@ -179,4 +245,56 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const selectAll = document.getElementById('selectAll');
|
||||
const checkboxes = document.querySelectorAll('.member-checkbox');
|
||||
const batchActions = document.getElementById('batchActions');
|
||||
const selectedCount = document.getElementById('selectedCount');
|
||||
const batchDeleteInputs = document.getElementById('batchDeleteInputs');
|
||||
const batchStatusInputs = document.getElementById('batchStatusInputs');
|
||||
|
||||
function updateBatchUI() {
|
||||
const selected = Array.from(checkboxes).filter(cb => cb.checked);
|
||||
selectedCount.textContent = selected.length;
|
||||
|
||||
if (selected.length > 0) {
|
||||
batchActions.classList.remove('hidden');
|
||||
} else {
|
||||
batchActions.classList.add('hidden');
|
||||
}
|
||||
|
||||
// Update hidden inputs for forms
|
||||
batchDeleteInputs.innerHTML = '';
|
||||
batchStatusInputs.innerHTML = '';
|
||||
|
||||
selected.forEach(cb => {
|
||||
const input1 = document.createElement('input');
|
||||
input1.type = 'hidden';
|
||||
input1.name = 'ids[]';
|
||||
input1.value = cb.value;
|
||||
batchDeleteInputs.appendChild(input1);
|
||||
|
||||
const input2 = document.createElement('input');
|
||||
input2.type = 'hidden';
|
||||
input2.name = 'ids[]';
|
||||
input2.value = cb.value;
|
||||
batchStatusInputs.appendChild(input2);
|
||||
});
|
||||
}
|
||||
|
||||
selectAll.addEventListener('change', function() {
|
||||
checkboxes.forEach(cb => cb.checked = selectAll.checked);
|
||||
updateBatchUI();
|
||||
});
|
||||
|
||||
checkboxes.forEach(cb => {
|
||||
cb.addEventListener('change', function() {
|
||||
updateBatchUI();
|
||||
selectAll.checked = Array.from(checkboxes).every(c => c.checked);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</x-app-layout>
|
||||
@@ -1,7 +1,7 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header">
|
||||
<h2 class="text-xl font-semibold leading-tight text-gray-800 dark:text-gray-200">
|
||||
{{ __('Member details') }}
|
||||
會員詳情
|
||||
</h2>
|
||||
</x-slot>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
->first();
|
||||
@endphp
|
||||
|
||||
@if($approvedPayment && $member->isPending() && (Auth::user()->can('activate_memberships') || Auth::user()->is_admin))
|
||||
@if($approvedPayment && $member->isPending() && (Auth::user()->can('activate_memberships') || Auth::user()->hasRole('admin')))
|
||||
<div class="rounded-md bg-green-50 dark:bg-green-900/30 p-4">
|
||||
<div class="flex">
|
||||
<div class="flex-shrink-0">
|
||||
@@ -25,14 +25,14 @@
|
||||
</div>
|
||||
<div class="ml-3 flex-1">
|
||||
<h3 class="text-sm font-medium text-green-800 dark:text-green-200">
|
||||
{{ __('Ready for Activation') }}
|
||||
準備啟用
|
||||
</h3>
|
||||
<div class="mt-2 text-sm text-green-700 dark:text-green-300">
|
||||
<p>{{ __('This member has a fully approved payment and is ready for membership activation.') }}</p>
|
||||
<p>此會員的付款已完全核准,準備啟用會員資格。</p>
|
||||
</div>
|
||||
<div class="mt-4">
|
||||
<a href="{{ route('admin.members.activate', $member) }}" class="inline-flex items-center rounded-md bg-green-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-green-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-green-600">
|
||||
{{ __('Activate Membership') }}
|
||||
<a href="{{ route('admin.members.activate', $member) }}" class="inline-flex items-center rounded-md bg-green-600 dark:bg-green-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-green-500 dark:hover:bg-green-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-green-600">
|
||||
啟用會員資格
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -45,29 +45,40 @@
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<div class="flex items-center gap-3">
|
||||
@if ($member->user?->profilePhotoUrl())
|
||||
<img src="{{ $member->user->profilePhotoUrl() }}" alt="{{ __('Profile photo') }}" class="h-16 w-16 rounded-full object-cover ring-2 ring-indigo-500">
|
||||
<img src="{{ $member->user->profilePhotoUrl() }}" alt="個人照片" class="h-16 w-16 rounded-full object-cover ring-2 ring-indigo-500">
|
||||
@endif
|
||||
<div>
|
||||
<h3 id="member-info-heading" class="text-lg font-medium leading-6 text-gray-900 dark:text-gray-100">
|
||||
{{ $member->full_name }}
|
||||
</h3>
|
||||
<div class="mt-1 flex items-center gap-2">
|
||||
{!! $member->membership_status_badge !!}
|
||||
@php
|
||||
$statusClasses = match($member->membership_status) {
|
||||
'pending' => 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200',
|
||||
'active' => 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200',
|
||||
'expired' => 'bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-200',
|
||||
'suspended' => 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200',
|
||||
default => 'bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-200',
|
||||
};
|
||||
@endphp
|
||||
<span class="inline-flex rounded-full px-2 text-xs font-semibold leading-5 {{ $statusClasses }}">
|
||||
{{ $member->membership_status_label }}
|
||||
</span>
|
||||
<span class="inline-flex items-center rounded-md bg-gray-100 dark:bg-gray-700 px-2.5 py-0.5 text-xs font-medium text-gray-800 dark:text-gray-200">
|
||||
{{ $member->membership_type_label }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="{{ route('admin.members.edit', $member) }}" 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">
|
||||
{{ __('Edit') }}
|
||||
<a href="{{ route('admin.members.edit', $member) }}" class="inline-flex items-center rounded-md border border-transparent bg-indigo-600 dark:bg-indigo-500 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-700 dark:hover:bg-indigo-600 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:focus:ring-indigo-600 focus:ring-offset-2 dark:focus:ring-offset-gray-800">
|
||||
編輯
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<dl class="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-2">
|
||||
<div class="overflow-hidden rounded-lg bg-gray-50 dark:bg-gray-700 px-4 py-5 sm:p-6">
|
||||
<dt class="truncate text-sm font-medium text-gray-500 dark:text-gray-400">
|
||||
{{ __('Email') }}
|
||||
電子郵件
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">
|
||||
{{ $member->email }}
|
||||
@@ -76,7 +87,7 @@
|
||||
|
||||
<div class="overflow-hidden rounded-lg bg-gray-50 dark:bg-gray-700 px-4 py-5 sm:p-6">
|
||||
<dt class="truncate text-sm font-medium text-gray-500 dark:text-gray-400">
|
||||
{{ __('Phone') }}
|
||||
電話
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">
|
||||
{{ $member->phone ?? __('Not set') }}
|
||||
@@ -85,7 +96,7 @@
|
||||
|
||||
<div class="overflow-hidden rounded-lg bg-gray-50 dark:bg-gray-700 px-4 py-5 sm:p-6">
|
||||
<dt class="truncate text-sm font-medium text-gray-500 dark:text-gray-400">
|
||||
{{ __('Membership Status') }}
|
||||
會員資格狀態
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">
|
||||
{{ $member->membership_status_label }}
|
||||
@@ -94,7 +105,7 @@
|
||||
|
||||
<div class="overflow-hidden rounded-lg bg-gray-50 dark:bg-gray-700 px-4 py-5 sm:p-6">
|
||||
<dt class="truncate text-sm font-medium text-gray-500 dark:text-gray-400">
|
||||
{{ __('Membership Type') }}
|
||||
會員類型
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">
|
||||
{{ $member->membership_type_label }}
|
||||
@@ -103,35 +114,35 @@
|
||||
|
||||
<div class="overflow-hidden rounded-lg bg-gray-50 dark:bg-gray-700 px-4 py-5 sm:p-6">
|
||||
<dt class="truncate text-sm font-medium text-gray-500 dark:text-gray-400">
|
||||
{{ __('Membership start') }}
|
||||
會員資格開始
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">
|
||||
@if ($member->membership_started_at)
|
||||
{{ $member->membership_started_at->toDateString() }}
|
||||
@else
|
||||
{{ __('Not set') }}
|
||||
未設定
|
||||
@endif
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
<div class="overflow-hidden rounded-lg bg-gray-50 dark:bg-gray-700 px-4 py-5 sm:p-6">
|
||||
<dt class="truncate text-sm font-medium text-gray-500 dark:text-gray-400">
|
||||
{{ __('Membership expires') }}
|
||||
會員資格到期
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">
|
||||
@if ($member->membership_expires_at)
|
||||
{{ $member->membership_expires_at->toDateString() }}
|
||||
@else
|
||||
{{ __('Not set') }}
|
||||
未設定
|
||||
@endif
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
<div class="overflow-hidden rounded-lg bg-gray-50 px-4 py-5 sm:p-6 sm:col-span-2">
|
||||
<dt class="truncate text-sm font-medium text-gray-500">
|
||||
{{ __('Address') }}
|
||||
<div class="overflow-hidden rounded-lg bg-gray-50 dark:bg-gray-700 px-4 py-5 sm:p-6 sm:col-span-2">
|
||||
<dt class="truncate text-sm font-medium text-gray-500 dark:text-gray-400">
|
||||
地址
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 space-y-1">
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100 space-y-1">
|
||||
<div>{{ $member->address_line_1 ?? __('Not set') }}</div>
|
||||
@if ($member->address_line_2)
|
||||
<div>{{ $member->address_line_2 }}</div>
|
||||
@@ -145,43 +156,75 @@
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
<div class="overflow-hidden rounded-lg bg-gray-50 px-4 py-5 sm:p-6 sm:col-span-2">
|
||||
<dt class="truncate text-sm font-medium text-gray-500">
|
||||
{{ __('Emergency Contact') }}
|
||||
<div class="overflow-hidden rounded-lg bg-gray-50 dark:bg-gray-700 px-4 py-5 sm:p-6 sm:col-span-2">
|
||||
<dt class="truncate text-sm font-medium text-gray-500 dark:text-gray-400">
|
||||
緊急聯絡人
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 space-y-1">
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100 space-y-1">
|
||||
<div>{{ $member->emergency_contact_name ?? __('Not set') }}</div>
|
||||
<div>{{ $member->emergency_contact_phone ?? '' }}</div>
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
{{-- Disability Certificate Status --}}
|
||||
<div class="overflow-hidden rounded-lg bg-gray-50 dark:bg-gray-700 px-4 py-5 sm:p-6 sm:col-span-2">
|
||||
<dt class="truncate text-sm font-medium text-gray-500 dark:text-gray-400">
|
||||
身心障礙手冊
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">
|
||||
<div class="flex items-center gap-3">
|
||||
<span class="inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium {{ $member->disability_status_badge }}">
|
||||
{{ $member->disability_status_label }}
|
||||
</span>
|
||||
@if($member->hasDisabilityCertificate())
|
||||
<a href="{{ route('admin.members.disability-certificate', $member) }}" target="_blank" class="text-indigo-600 dark:text-indigo-400 hover:underline text-sm">
|
||||
檢視手冊
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
@if($member->hasApprovedDisability() && $member->disability_verified_at)
|
||||
<p class="mt-2 text-xs text-gray-500 dark:text-gray-400">
|
||||
審核時間:{{ $member->disability_verified_at->format('Y/m/d H:i') }}
|
||||
@if($member->disabilityVerifiedBy)
|
||||
(審核人:{{ $member->disabilityVerifiedBy->name }})
|
||||
@endif
|
||||
</p>
|
||||
@endif
|
||||
@if($member->isDisabilityRejected() && $member->disability_rejection_reason)
|
||||
<p class="mt-2 text-xs text-red-500 dark:text-red-400">
|
||||
駁回原因:{{ $member->disability_rejection_reason }}
|
||||
</p>
|
||||
@endif
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@if ($member->user)
|
||||
<section aria-labelledby="roles-heading" class="bg-white shadow sm:rounded-lg">
|
||||
<section aria-labelledby="roles-heading" class="bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
||||
<div class="px-4 py-5 sm:p-6 space-y-4">
|
||||
<div class="flex items-center justify-between">
|
||||
<h3 id="roles-heading" class="text-lg font-medium leading-6 text-gray-900">
|
||||
{{ __('Roles') }}
|
||||
<h3 id="roles-heading" class="text-lg font-medium leading-6 text-gray-900 dark:text-gray-100">
|
||||
角色管理
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@forelse ($member->user->roles as $role)
|
||||
<span class="inline-flex items-center rounded-full bg-indigo-100 px-3 py-1 text-sm font-medium text-indigo-800">
|
||||
<span class="inline-flex items-center rounded-full bg-indigo-100 dark:bg-indigo-900 px-3 py-1 text-sm font-medium text-indigo-800 dark:text-indigo-200">
|
||||
{{ $role->name }}
|
||||
</span>
|
||||
@empty
|
||||
<p class="text-sm text-gray-500">{{ __('No roles assigned.') }}</p>
|
||||
<p class="text-sm text-gray-500 dark:text-gray-400">未指派角色。</p>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
<form method="POST" action="{{ route('admin.members.roles.update', $member) }}" class="space-y-3">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<p class="text-sm text-gray-600">
|
||||
{{ __('Select roles for this member\'s user account.') }}
|
||||
<p class="text-sm text-gray-600 dark:text-gray-400">
|
||||
選擇此會員使用者帳戶的角色。
|
||||
</p>
|
||||
<div class="grid gap-3 sm:grid-cols-2">
|
||||
@foreach ($roles as $role)
|
||||
@@ -191,18 +234,18 @@
|
||||
name="roles[]"
|
||||
value="{{ $role->name }}"
|
||||
@checked($member->user->hasRole($role->name))
|
||||
class="rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500"
|
||||
class="rounded border-gray-300 dark:border-gray-600 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:bg-gray-700"
|
||||
>
|
||||
<span class="text-sm text-gray-800">
|
||||
<span class="text-sm text-gray-800 dark:text-gray-200">
|
||||
{{ $role->name }}
|
||||
<span class="block text-xs text-gray-500">{{ $role->description }}</span>
|
||||
<span class="block text-xs text-gray-500 dark:text-gray-400">{{ $role->description }}</span>
|
||||
</span>
|
||||
</label>
|
||||
@endforeach
|
||||
</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">
|
||||
{{ __('Update Roles') }}
|
||||
<button type="submit" class="inline-flex items-center rounded-md border border-transparent bg-indigo-600 dark:bg-indigo-500 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-700 dark:hover:bg-indigo-600 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:focus:ring-indigo-600 focus:ring-offset-2 dark:focus:ring-offset-gray-800">
|
||||
更新角色
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
@@ -214,10 +257,10 @@
|
||||
<div class="px-4 py-5 sm:p-6">
|
||||
<div class="flex items-center justify-between">
|
||||
<h3 id="admin-payment-history-heading" class="text-lg font-medium leading-6 text-gray-900 dark:text-gray-100">
|
||||
{{ __('Payment history') }}
|
||||
付款歷史
|
||||
</h3>
|
||||
<a href="{{ route('admin.members.payments.create', $member) }}" 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">
|
||||
{{ __('Record payment') }}
|
||||
<a href="{{ route('admin.members.payments.create', $member) }}" class="inline-flex items-center rounded-md border border-transparent bg-indigo-600 dark:bg-indigo-500 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-700 dark:hover:bg-indigo-600 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:focus:ring-indigo-600 focus:ring-offset-2 dark:focus:ring-offset-gray-800">
|
||||
記錄付款
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -226,22 +269,22 @@
|
||||
<thead class="bg-gray-50 dark:bg-gray-700">
|
||||
<tr>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-300">
|
||||
{{ __('Paid at') }}
|
||||
付款時間
|
||||
</th>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-300">
|
||||
{{ __('Amount') }}
|
||||
金額
|
||||
</th>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-300">
|
||||
{{ __('Method') }}
|
||||
方式
|
||||
</th>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-300">
|
||||
{{ __('Status') }}
|
||||
狀態
|
||||
</th>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-300">
|
||||
{{ __('Submitted By') }}
|
||||
提交者
|
||||
</th>
|
||||
<th scope="col" class="px-4 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-300">
|
||||
{{ __('Actions') }}
|
||||
操作
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -269,29 +312,29 @@
|
||||
<span class="text-xs">{{ $payment->submittedBy->name }}</span>
|
||||
</div>
|
||||
@else
|
||||
<span class="text-xs text-gray-500 dark:text-gray-400">{{ __('Admin') }}</span>
|
||||
<span class="text-xs text-gray-500 dark:text-gray-400">管理員</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-4 py-3 text-right text-sm space-x-3">
|
||||
@if($payment->status)
|
||||
{{-- New payment verification system --}}
|
||||
@if(Auth::user()->can('view_payment_verifications') || Auth::user()->is_admin)
|
||||
@if(Auth::user()->can('view_payment_verifications') || Auth::user()->hasRole('admin'))
|
||||
<a href="{{ route('admin.payment-verifications.show', $payment) }}" class="text-blue-600 hover:text-blue-900 dark:text-blue-400 dark:hover:text-blue-300">
|
||||
{{ __('Verify') }}
|
||||
驗證
|
||||
</a>
|
||||
@endif
|
||||
@if($payment->receipt_path)
|
||||
<a href="{{ route('admin.payment-verifications.download-receipt', $payment) }}" class="text-green-600 hover:text-green-900 dark:text-green-400 dark:hover:text-green-300" title="{{ __('Download Receipt') }}">
|
||||
{{ __('Receipt') }}
|
||||
<a href="{{ route('admin.payment-verifications.download-receipt', $payment) }}" class="text-green-600 hover:text-green-900 dark:text-green-400 dark:hover:text-green-300" title="下載收據">
|
||||
收據
|
||||
</a>
|
||||
@endif
|
||||
@else
|
||||
{{-- Legacy admin-created payments --}}
|
||||
<a href="{{ route('admin.members.payments.receipt', [$member, $payment]) }}" class="text-green-600 hover:text-green-900 dark:text-green-400 dark:hover:text-green-300" title="{{ __('Download Receipt') }}">
|
||||
{{ __('Receipt') }}
|
||||
<a href="{{ route('admin.members.payments.receipt', [$member, $payment]) }}" class="text-green-600 hover:text-green-900 dark:text-green-400 dark:hover:text-green-300" title="下載收據">
|
||||
收據
|
||||
</a>
|
||||
<a href="{{ route('admin.members.payments.edit', [$member, $payment]) }}" class="text-indigo-600 hover:text-indigo-900 dark:text-indigo-400 dark:hover:text-indigo-300">
|
||||
{{ __('Edit') }}
|
||||
編輯
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
@@ -302,7 +345,7 @@
|
||||
<svg class="mx-auto h-12 w-12 text-gray-400 dark:text-gray-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z" />
|
||||
</svg>
|
||||
<p class="mt-2">{{ __('No payment records found.') }}</p>
|
||||
<p class="mt-2">找不到付款記錄。</p>
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
@@ -313,4 +356,4 @@
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
</x-app-layout>
|
||||
Reference in New Issue
Block a user