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>
157 lines
11 KiB
PHP
157 lines
11 KiB
PHP
<x-app-layout>
|
|
<x-slot name="header">
|
|
<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">
|
|
@if (session('status'))
|
|
<div class="mb-4 rounded-md bg-green-50 p-4 dark:bg-green-900/30 border-l-4 border-green-400 dark:border-green-500">
|
|
<p class="text-sm text-green-800 dark:text-green-200">{{ session('status') }}</p>
|
|
</div>
|
|
@endif
|
|
|
|
@if (session('error'))
|
|
<div class="mb-4 rounded-md bg-red-50 p-4 dark:bg-red-900/30 border-l-4 border-red-400 dark:border-red-500">
|
|
<p class="text-sm text-red-800 dark:text-red-200">{{ session('error') }}</p>
|
|
</div>
|
|
@endif
|
|
|
|
{{-- Tabs --}}
|
|
<div class="mb-4 border-b border-gray-200 dark:border-gray-700">
|
|
<nav class="-mb-px flex space-x-8">
|
|
<a href="{{ route('admin.payment-verifications.index', ['tab' => 'all']) }}"
|
|
class="border-b-2 py-4 px-1 text-sm font-medium {{ $tab === 'all' ? 'border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 dark:hover:border-gray-600' }}">
|
|
所有付款
|
|
</a>
|
|
|
|
@can('verify_payments_cashier')
|
|
<a href="{{ route('admin.payment-verifications.index', ['tab' => 'cashier']) }}"
|
|
class="border-b-2 py-4 px-1 text-sm font-medium {{ $tab === 'cashier' ? 'border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 dark:hover:border-gray-600' }}">
|
|
出納待處理
|
|
@if($counts['pending'] > 0)
|
|
<span class="ml-2 rounded-full bg-red-100 px-2 py-0.5 text-xs font-medium text-red-800 dark:bg-red-900 dark:text-red-200">
|
|
{{ $counts['pending'] }}
|
|
</span>
|
|
@endif
|
|
</a>
|
|
@endcan
|
|
|
|
@can('verify_payments_accountant')
|
|
<a href="{{ route('admin.payment-verifications.index', ['tab' => 'accountant']) }}"
|
|
class="border-b-2 py-4 px-1 text-sm font-medium {{ $tab === 'accountant' ? 'border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 dark:hover:border-gray-600' }}">
|
|
會計待處理
|
|
@if($counts['cashier_approved'] > 0)
|
|
<span class="ml-2 rounded-full bg-red-100 px-2 py-0.5 text-xs font-medium text-red-800 dark:bg-red-900 dark:text-red-200">
|
|
{{ $counts['cashier_approved'] }}
|
|
</span>
|
|
@endif
|
|
</a>
|
|
@endcan
|
|
|
|
@can('verify_payments_chair')
|
|
<a href="{{ route('admin.payment-verifications.index', ['tab' => 'chair']) }}"
|
|
class="border-b-2 py-4 px-1 text-sm font-medium {{ $tab === 'chair' ? 'border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 dark:hover:border-gray-600' }}">
|
|
主席待處理
|
|
@if($counts['accountant_approved'] > 0)
|
|
<span class="ml-2 rounded-full bg-red-100 px-2 py-0.5 text-xs font-medium text-red-800 dark:bg-red-900 dark:text-red-200">
|
|
{{ $counts['accountant_approved'] }}
|
|
</span>
|
|
@endif
|
|
</a>
|
|
@endcan
|
|
|
|
<a href="{{ route('admin.payment-verifications.index', ['tab' => 'approved']) }}"
|
|
class="border-b-2 py-4 px-1 text-sm font-medium {{ $tab === 'approved' ? 'border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 dark:hover:border-gray-600' }}">
|
|
已核准 ({{ $counts['approved'] }})
|
|
</a>
|
|
|
|
<a href="{{ route('admin.payment-verifications.index', ['tab' => 'rejected']) }}"
|
|
class="border-b-2 py-4 px-1 text-sm font-medium {{ $tab === 'rejected' ? 'border-indigo-500 text-indigo-600 dark:text-indigo-400' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 dark:hover:border-gray-600' }}">
|
|
已拒絕 ({{ $counts['rejected'] }})
|
|
</a>
|
|
</nav>
|
|
</div>
|
|
|
|
{{-- Search --}}
|
|
<div class="mb-4">
|
|
<form method="GET" action="{{ route('admin.payment-verifications.index') }}" class="flex gap-2">
|
|
<input type="hidden" name="tab" value="{{ $tab }}">
|
|
<input type="text" name="search" value="{{ request('search') }}" placeholder="依會員姓名、電子郵件或參考編號搜尋..."
|
|
class="flex-1 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">
|
|
<button type="submit" class="inline-flex items-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">
|
|
搜尋
|
|
</button>
|
|
</form>
|
|
</div>
|
|
|
|
{{-- Payment List --}}
|
|
<div class="bg-white shadow sm:rounded-lg dark:bg-gray-800">
|
|
<div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 sm:rounded-lg dark:ring-gray-700">
|
|
<table class="min-w-full divide-y divide-gray-300 dark:divide-gray-600">
|
|
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
<tr>
|
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">會員</th>
|
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">金額</th>
|
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">付款日期</th>
|
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">方式</th>
|
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">狀態</th>
|
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">已提交</th>
|
|
<th scope="col" class="relative py-3.5 pl-3 pr-4"><span class="sr-only">操作</span></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-200 bg-white dark:divide-gray-700 dark:bg-gray-800">
|
|
@forelse($payments as $payment)
|
|
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700">
|
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm">
|
|
<div class="font-medium text-gray-900 dark:text-gray-100">{{ $payment->member->full_name }}</div>
|
|
<div class="text-gray-500 dark:text-gray-400">{{ $payment->member->email }}</div>
|
|
</td>
|
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-900 dark:text-gray-100">
|
|
TWD {{ number_format($payment->amount, 0) }}
|
|
</td>
|
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-900 dark:text-gray-100">
|
|
{{ $payment->paid_at->format('Y-m-d') }}
|
|
</td>
|
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-900 dark:text-gray-100">
|
|
{{ $payment->payment_method_label }}
|
|
</td>
|
|
<td class="whitespace-nowrap px-3 py-4 text-sm">
|
|
<span class="inline-flex items-center rounded-full px-2 py-1 text-xs font-medium
|
|
@if($payment->status === 'pending') bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200
|
|
@elseif($payment->status === 'approved_chair') bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200
|
|
@elseif($payment->status === 'rejected') bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200
|
|
@else bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200
|
|
@endif">
|
|
{{ $payment->status_label }}
|
|
</span>
|
|
</td>
|
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500 dark:text-gray-400">
|
|
{{ $payment->created_at->format('Y-m-d H:i') }}
|
|
</td>
|
|
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium">
|
|
<a href="{{ route('admin.payment-verifications.show', $payment) }}" class="text-indigo-600 hover:text-indigo-900 dark:text-indigo-400 dark:hover:text-indigo-300">
|
|
查看與驗證
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="7" class="px-3 py-8 text-center text-sm text-gray-500 dark:text-gray-400">
|
|
找不到付款記錄
|
|
</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="px-4 py-3">
|
|
{{ $payments->links() }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-app-layout> |