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,20 +1,20 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header">
|
||||
<h2 class="text-xl font-semibold leading-tight text-gray-800 dark:text-gray-200">
|
||||
{{ __('Payment Verification Dashboard') }}
|
||||
付款驗證控制台
|
||||
</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">
|
||||
<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">
|
||||
<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
|
||||
@@ -23,14 +23,14 @@
|
||||
<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' }}">
|
||||
{{ __('All Payments') }}
|
||||
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' }}">
|
||||
{{ __('Cashier Queue') }}
|
||||
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'] }}
|
||||
@@ -41,8 +41,8 @@
|
||||
|
||||
@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' }}">
|
||||
{{ __('Accountant Queue') }}
|
||||
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'] }}
|
||||
@@ -53,8 +53,8 @@
|
||||
|
||||
@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' }}">
|
||||
{{ __('Chair Queue') }}
|
||||
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'] }}
|
||||
@@ -64,13 +64,13 @@
|
||||
@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' }}">
|
||||
{{ __('Approved') }} ({{ $counts['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' }}">
|
||||
{{ __('Rejected') }} ({{ $counts['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>
|
||||
@@ -79,10 +79,10 @@
|
||||
<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="{{ __('Search by member name, email, or reference...') }}"
|
||||
<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">
|
||||
{{ __('Search') }}
|
||||
<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>
|
||||
@@ -93,13 +93,13 @@
|
||||
<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">{{ __('Member') }}</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">{{ __('Amount') }}</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">{{ __('Payment Date') }}</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">{{ __('Method') }}</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">{{ __('Status') }}</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">{{ __('Submitted') }}</th>
|
||||
<th scope="col" class="relative py-3.5 pl-3 pr-4"><span class="sr-only">{{ __('Actions') }}</span></th>
|
||||
<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">
|
||||
@@ -133,14 +133,14 @@
|
||||
</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">
|
||||
{{ __('View & Verify') }}
|
||||
查看與驗證
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7" class="px-3 py-8 text-center text-sm text-gray-500 dark:text-gray-400">
|
||||
{{ __('No payments found') }}
|
||||
找不到付款記錄
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
@@ -154,4 +154,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
</x-app-layout>
|
||||
Reference in New Issue
Block a user