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,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">
|
||||
{{ __('Create Budget') }} (úË—)
|
||||
新增預算 ()
|
||||
</h2>
|
||||
</x-slot>
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
<div class="mx-auto max-w-7xl sm:px-6 lg:px-8">
|
||||
<div class="bg-white shadow sm:rounded-lg dark:bg-gray-800">
|
||||
<div class="px-4 py-5 sm:p-6">
|
||||
<form method="POST" action="{{ route('admin.budgets.store') }}" class="space-y-6" aria-label="{{ __('Create budget form') }}">
|
||||
<form method="POST" action="{{ route('admin.budgets.store') }}" class="space-y-6" aria-label="新增預算表單">
|
||||
@csrf
|
||||
|
||||
<!-- Fiscal Year -->
|
||||
<div>
|
||||
<label for="fiscal_year" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Fiscal Year') }} <span class="text-red-500" aria-label="{{ __('required') }}">*</span>
|
||||
會計年度 <span class="text-red-500" aria-label="必填">*</span>
|
||||
</label>
|
||||
<input type="number"
|
||||
name="fiscal_year"
|
||||
@@ -27,7 +27,7 @@
|
||||
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 dark:focus:ring-offset-gray-800 @error('fiscal_year') border-red-300 dark:border-red-500 @enderror"
|
||||
aria-describedby="fiscal_year_help @error('fiscal_year') fiscal_year_error @enderror">
|
||||
<p id="fiscal_year_help" class="mt-1 text-sm text-gray-500 dark:text-gray-400">
|
||||
{{ __('The fiscal year this budget applies to') }}
|
||||
此預算適用的會計年度
|
||||
</p>
|
||||
@error('fiscal_year')
|
||||
<p id="fiscal_year_error" class="mt-1 text-sm text-red-600 dark:text-red-400" role="alert">{{ $message }}</p>
|
||||
@@ -37,7 +37,7 @@
|
||||
<!-- Name -->
|
||||
<div>
|
||||
<label for="name" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Budget Name') }} <span class="text-red-500" aria-label="{{ __('required') }}">*</span>
|
||||
預算名稱 <span class="text-red-500" aria-label="必填">*</span>
|
||||
</label>
|
||||
<input type="text"
|
||||
name="name"
|
||||
@@ -46,10 +46,10 @@
|
||||
required
|
||||
maxlength="255"
|
||||
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 dark:focus:ring-offset-gray-800 @error('name') border-red-300 dark:border-red-500 @enderror"
|
||||
placeholder="{{ __('e.g., Annual Budget 2025') }}"
|
||||
placeholder="例如:2025年度預算"
|
||||
aria-describedby="name_help @error('name') name_error @enderror">
|
||||
<p id="name_help" class="mt-1 text-sm text-gray-500 dark:text-gray-400">
|
||||
{{ __('Descriptive name for this budget') }}
|
||||
此預算的描述性名稱
|
||||
</p>
|
||||
@error('name')
|
||||
<p id="name_error" class="mt-1 text-sm text-red-600 dark:text-red-400" role="alert">{{ $message }}</p>
|
||||
@@ -59,19 +59,19 @@
|
||||
<!-- Period Type -->
|
||||
<div>
|
||||
<label for="period_type" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Period Type') }} <span class="text-red-500" aria-label="{{ __('required') }}">*</span>
|
||||
期間類型 <span class="text-red-500" aria-label="必填">*</span>
|
||||
</label>
|
||||
<select name="period_type"
|
||||
id="period_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 dark:focus:ring-offset-gray-800 @error('period_type') border-red-300 dark:border-red-500 @enderror"
|
||||
aria-describedby="period_type_help @error('period_type') period_type_error @enderror">
|
||||
<option value="annual" @selected(old('period_type', 'annual') === 'annual')>{{ __('Annual') }} (t¦)</option>
|
||||
<option value="quarterly" @selected(old('period_type') === 'quarterly')>{{ __('Quarterly') }} (c¦)</option>
|
||||
<option value="monthly" @selected(old('period_type') === 'monthly')>{{ __('Monthly') }} (¦)</option>
|
||||
<option value="annual" @selected(old('period_type', 'annual') === 'annual')>年度 </option>
|
||||
<option value="quarterly" @selected(old('period_type') === 'quarterly')>季度 </option>
|
||||
<option value="monthly" @selected(old('period_type') === 'monthly')>月度 ()</option>
|
||||
</select>
|
||||
<p id="period_type_help" class="mt-1 text-sm text-gray-500 dark:text-gray-400">
|
||||
{{ __('Budget period duration') }}
|
||||
預算期間長度
|
||||
</p>
|
||||
@error('period_type')
|
||||
<p id="period_type_error" class="mt-1 text-sm text-red-600 dark:text-red-400" role="alert">{{ $message }}</p>
|
||||
@@ -82,7 +82,7 @@
|
||||
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2">
|
||||
<div>
|
||||
<label for="period_start" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Period Start Date') }} <span class="text-red-500" aria-label="{{ __('required') }}">*</span>
|
||||
期間開始日期 <span class="text-red-500" aria-label="必填">*</span>
|
||||
</label>
|
||||
<input type="date"
|
||||
name="period_start"
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
<div>
|
||||
<label for="period_end" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Period End Date') }} <span class="text-red-500" aria-label="{{ __('required') }}">*</span>
|
||||
期間結束日期 <span class="text-red-500" aria-label="必填">*</span>
|
||||
</label>
|
||||
<input type="date"
|
||||
name="period_end"
|
||||
@@ -116,16 +116,16 @@
|
||||
<!-- Notes -->
|
||||
<div>
|
||||
<label for="notes" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Notes') }} (™;)
|
||||
備註
|
||||
</label>
|
||||
<textarea name="notes"
|
||||
id="notes"
|
||||
rows="3"
|
||||
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 dark:focus:ring-offset-gray-800 @error('notes') border-red-300 dark:border-red-500 @enderror"
|
||||
placeholder="{{ __('Optional notes about this budget...') }}"
|
||||
placeholder="關於此預算的選填備註..."
|
||||
aria-describedby="notes_help @error('notes') notes_error @enderror">{{ old('notes') }}</textarea>
|
||||
<p id="notes_help" class="mt-1 text-sm text-gray-500 dark:text-gray-400">
|
||||
{{ __('Additional information about this budget (optional)') }}
|
||||
關於此預算的額外資訊(選填)
|
||||
</p>
|
||||
@error('notes')
|
||||
<p id="notes_error" class="mt-1 text-sm text-red-600 dark:text-red-400" role="alert">{{ $message }}</p>
|
||||
@@ -136,11 +136,11 @@
|
||||
<div class="flex items-center justify-end gap-x-4 border-t border-gray-200 pt-6 dark:border-gray-700">
|
||||
<a href="{{ route('admin.budgets.index') }}"
|
||||
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 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:bg-gray-700 dark:text-gray-100 dark:ring-gray-600 dark:hover:bg-gray-600 dark:focus:ring-offset-gray-800">
|
||||
{{ __('Cancel') }}
|
||||
取消
|
||||
</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 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:bg-indigo-500 dark:hover:bg-indigo-400 dark:focus:ring-offset-gray-800">
|
||||
{{ __('Create Budget') }}
|
||||
新增預算
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
@@ -157,14 +157,14 @@
|
||||
</div>
|
||||
<div class="ml-3">
|
||||
<h3 class="text-sm font-medium text-blue-800 dark:text-blue-200">
|
||||
{{ __('Next Steps') }}
|
||||
下一步
|
||||
</h3>
|
||||
<div class="mt-2 text-sm text-blue-700 dark:text-blue-300">
|
||||
<p>{{ __('After creating the budget, you will be able to:') }}</p>
|
||||
<p>建立預算後,您將能夠:</p>
|
||||
<ul class="list-disc pl-5 mt-2 space-y-1">
|
||||
<li>{{ __('Add budget items for income and expense accounts') }}</li>
|
||||
<li>{{ __('Submit the budget for chair approval') }}</li>
|
||||
<li>{{ __('Activate the budget to start tracking actual amounts') }}</li>
|
||||
<li>為收入和支出帳戶新增預算項目</li>
|
||||
<li>提交預算以供主席核准</li>
|
||||
<li>啟用預算以開始追蹤實際金額</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user