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>
|
||||
|
||||
@@ -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">
|
||||
{{ __('Edit Budget') }} - {{ $budget->fiscal_year }}
|
||||
編輯預算 - {{ $budget->fiscal_year }}
|
||||
</h2>
|
||||
</x-slot>
|
||||
|
||||
@@ -13,30 +13,30 @@
|
||||
|
||||
<!-- Basic Info -->
|
||||
<div class="bg-white shadow sm:rounded-lg dark:bg-gray-800 px-4 py-5 sm:p-6">
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-4">{{ __('Basic Information') }}</h3>
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-4">基本資訊</h3>
|
||||
|
||||
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2">
|
||||
<div>
|
||||
<label for="name" class="block text-sm font-medium text-gray-700 dark:text-gray-300">{{ __('Budget Name') }} *</label>
|
||||
<label for="name" class="block text-sm font-medium text-gray-700 dark:text-gray-300">預算名稱 *</label>
|
||||
<input type="text" name="name" id="name" value="{{ old('name', $budget->name) }}" 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('name')<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="period_start" class="block text-sm font-medium text-gray-700 dark:text-gray-300">{{ __('Period Start') }} *</label>
|
||||
<label for="period_start" class="block text-sm font-medium text-gray-700 dark:text-gray-300">期間開始 *</label>
|
||||
<input type="date" name="period_start" id="period_start" value="{{ old('period_start', $budget->period_start->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">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="period_end" class="block text-sm font-medium text-gray-700 dark:text-gray-300">{{ __('Period End') }} *</label>
|
||||
<label for="period_end" class="block text-sm font-medium text-gray-700 dark:text-gray-300">期間結束 *</label>
|
||||
<input type="date" name="period_end" id="period_end" value="{{ old('period_end', $budget->period_end->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">
|
||||
</div>
|
||||
|
||||
<div class="sm:col-span-2">
|
||||
<label for="notes" class="block text-sm font-medium text-gray-700 dark:text-gray-300">{{ __('Notes') }}</label>
|
||||
<label for="notes" class="block text-sm font-medium text-gray-700 dark:text-gray-300">備註</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">{{ old('notes', $budget->notes) }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
@@ -45,25 +45,25 @@
|
||||
<!-- Income Items -->
|
||||
<div class="bg-white shadow sm:rounded-lg dark:bg-gray-800 px-4 py-5 sm:p-6">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100">{{ __('Income') }} (6e)</h3>
|
||||
<button type="button" @click="addItem('income')" class="btn-secondary text-sm">+ {{ __('Add Income Item') }}</button>
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100">收入 </h3>
|
||||
<button type="button" @click="addItem('income')" class="btn-secondary text-sm">+ 新增收入項目</button>
|
||||
</div>
|
||||
|
||||
<div class="space-y-4">
|
||||
<template x-for="(item, index) in incomeItems" :key="index">
|
||||
<div class="flex gap-4 items-start bg-gray-50 dark:bg-gray-900 p-4 rounded-md">
|
||||
<div class="flex-1">
|
||||
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300">{{ __('Account') }}</label>
|
||||
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300">帳戶</label>
|
||||
<select :name="'budget_items[income_' + index + '][chart_of_account_id]'" x-model="item.account_id" 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">
|
||||
<option value="">{{ __('Select account...') }}</option>
|
||||
<option value="">選擇帳戶...</option>
|
||||
@foreach($incomeAccounts as $account)
|
||||
<option value="{{ $account->id }}">{{ $account->account_code }} - {{ $account->account_name_zh }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="w-48">
|
||||
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300">{{ __('Amount') }}</label>
|
||||
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300">金額</label>
|
||||
<input type="number" :name="'budget_items[income_' + index + '][budgeted_amount]'" x-model="item.amount" step="0.01" min="0" 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">
|
||||
</div>
|
||||
@@ -75,7 +75,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<div x-show="incomeItems.length === 0" class="text-center py-8 text-gray-500 dark:text-gray-400">
|
||||
{{ __('No income items. Click "Add Income Item" to get started.') }}
|
||||
無收入項目。點擊「新增收入項目」開始。
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -83,25 +83,25 @@
|
||||
<!-- Expense Items -->
|
||||
<div class="bg-white shadow sm:rounded-lg dark:bg-gray-800 px-4 py-5 sm:p-6">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100">{{ __('Expenses') }} (/ú)</h3>
|
||||
<button type="button" @click="addItem('expense')" class="btn-secondary text-sm">+ {{ __('Add Expense Item') }}</button>
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100">支出 (/<EFBFBD>)</h3>
|
||||
<button type="button" @click="addItem('expense')" class="btn-secondary text-sm">+ 新增支出項目</button>
|
||||
</div>
|
||||
|
||||
<div class="space-y-4">
|
||||
<template x-for="(item, index) in expenseItems" :key="index">
|
||||
<div class="flex gap-4 items-start bg-gray-50 dark:bg-gray-900 p-4 rounded-md">
|
||||
<div class="flex-1">
|
||||
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300">{{ __('Account') }}</label>
|
||||
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300">帳戶</label>
|
||||
<select :name="'budget_items[expense_' + index + '][chart_of_account_id]'" x-model="item.account_id" 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">
|
||||
<option value="">{{ __('Select account...') }}</option>
|
||||
<option value="">選擇帳戶...</option>
|
||||
@foreach($expenseAccounts as $account)
|
||||
<option value="{{ $account->id }}">{{ $account->account_code }} - {{ $account->account_name_zh }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="w-48">
|
||||
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300">{{ __('Amount') }}</label>
|
||||
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300">金額</label>
|
||||
<input type="number" :name="'budget_items[expense_' + index + '][budgeted_amount]'" x-model="item.amount" step="0.01" min="0" 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">
|
||||
</div>
|
||||
@@ -113,15 +113,15 @@
|
||||
</div>
|
||||
</template>
|
||||
<div x-show="expenseItems.length === 0" class="text-center py-8 text-gray-500 dark:text-gray-400">
|
||||
{{ __('No expense items. Click "Add Expense Item" to get started.') }}
|
||||
無支出項目。點擊「新增支出項目」開始。
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Actions -->
|
||||
<div class="flex items-center justify-end gap-x-4">
|
||||
<a href="{{ route('admin.budgets.show', $budget) }}" class="btn-secondary">{{ __('Cancel') }}</a>
|
||||
<button type="submit" class="btn-primary">{{ __('Save Budget') }}</button>
|
||||
<a href="{{ route('admin.budgets.show', $budget) }}" class="btn-secondary">取消</a>
|
||||
<button type="submit" class="btn-primary">儲存預算</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -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">
|
||||
{{ __('Budgets') }} (—¡)
|
||||
預算管理
|
||||
</h2>
|
||||
</x-slot>
|
||||
|
||||
@@ -31,34 +31,34 @@
|
||||
<div class="sm:flex sm:items-center sm:justify-between mb-6">
|
||||
<div>
|
||||
<h3 class="text-lg font-medium leading-6 text-gray-900 dark:text-gray-100">
|
||||
{{ __('Budget List') }}
|
||||
預算列表
|
||||
</h3>
|
||||
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ __('Manage annual budgets and track financial performance') }}
|
||||
管理年度預算並追蹤財務績效
|
||||
</p>
|
||||
</div>
|
||||
<div class="mt-4 sm:mt-0">
|
||||
<a href="{{ route('admin.budgets.create') }}"
|
||||
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 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"
|
||||
aria-label="{{ __('Create new budget') }}">
|
||||
aria-label="新增預算">
|
||||
<svg class="-ml-0.5 mr-1.5 h-5 w-5" fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
|
||||
<path d="M10.75 4.75a.75.75 0 00-1.5 0v4.5h-4.5a.75.75 0 000 1.5h4.5v4.5a.75.75 0 001.5 0v-4.5h4.5a.75.75 0 000-1.5h-4.5v-4.5z" />
|
||||
</svg>
|
||||
{{ __('Create Budget') }}
|
||||
新增預算
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Filters -->
|
||||
<form method="GET" action="{{ route('admin.budgets.index') }}" class="mb-6 space-y-4" role="search" aria-label="{{ __('Filter budgets') }}">
|
||||
<form method="GET" action="{{ route('admin.budgets.index') }}" class="mb-6 space-y-4" role="search" aria-label="篩選預算">
|
||||
<div class="grid grid-cols-1 gap-4 sm:grid-cols-3">
|
||||
<div>
|
||||
<label for="fiscal_year" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Fiscal Year') }} (t¦)
|
||||
會計年度
|
||||
</label>
|
||||
<select id="fiscal_year" name="fiscal_year"
|
||||
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">
|
||||
<option value="">{{ __('All Years') }}</option>
|
||||
<option value="">所有年度</option>
|
||||
@foreach($fiscalYears as $year)
|
||||
<option value="{{ $year }}" @selected(request('fiscal_year') == $year)>
|
||||
{{ $year }}
|
||||
@@ -69,23 +69,23 @@
|
||||
|
||||
<div>
|
||||
<label for="status" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Status') }} (ÀK)
|
||||
狀態
|
||||
</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 dark:bg-gray-700 dark:border-gray-600 dark:text-gray-100">
|
||||
<option value="">{{ __('All Statuses') }}</option>
|
||||
<option value="draft" @selected(request('status') === 'draft')>{{ __('Draft') }}</option>
|
||||
<option value="submitted" @selected(request('status') === 'submitted')>{{ __('Submitted') }}</option>
|
||||
<option value="approved" @selected(request('status') === 'approved')>{{ __('Approved') }}</option>
|
||||
<option value="active" @selected(request('status') === 'active')>{{ __('Active') }}</option>
|
||||
<option value="closed" @selected(request('status') === 'closed')>{{ __('Closed') }}</option>
|
||||
<option value="">所有狀態</option>
|
||||
<option value="draft" @selected(request('status') === 'draft')>草稿</option>
|
||||
<option value="submitted" @selected(request('status') === 'submitted')>已提交</option>
|
||||
<option value="approved" @selected(request('status') === 'approved')>已核准</option>
|
||||
<option value="active" @selected(request('status') === 'active')>使用中</option>
|
||||
<option value="closed" @selected(request('status') === 'closed')>已結案</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="flex items-end">
|
||||
<button type="submit"
|
||||
class="inline-flex w-full justify-center 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">
|
||||
{{ __('Filter') }}
|
||||
篩選
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -95,27 +95,27 @@
|
||||
<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">
|
||||
<caption class="sr-only">
|
||||
{{ __('List of budgets showing fiscal year, name, period, and status') }}
|
||||
預算列表,顯示會計年度、名稱、期間和狀態
|
||||
</caption>
|
||||
<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 sm:pl-6">
|
||||
{{ __('Fiscal Year') }}
|
||||
會計年度
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">
|
||||
{{ __('Name') }}
|
||||
名稱
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">
|
||||
{{ __('Period') }}
|
||||
期間
|
||||
</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">
|
||||
{{ __('Created By') }}
|
||||
建立者
|
||||
</th>
|
||||
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6">
|
||||
<span class="sr-only">{{ __('Actions') }}</span>
|
||||
<span class="sr-only">操作</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -133,24 +133,24 @@
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm">
|
||||
@if($budget->status === 'draft')
|
||||
<span class="inline-flex items-center rounded-full bg-gray-100 px-2.5 py-0.5 text-xs font-medium text-gray-800 dark:bg-gray-700 dark:text-gray-200" role="status" aria-label="{{ __('Status: Draft') }}">
|
||||
{{ __('Draft') }}
|
||||
<span class="inline-flex items-center rounded-full bg-gray-100 px-2.5 py-0.5 text-xs font-medium text-gray-800 dark:bg-gray-700 dark:text-gray-200" role="status" aria-label="狀態:草稿">
|
||||
草稿
|
||||
</span>
|
||||
@elseif($budget->status === 'submitted')
|
||||
<span class="inline-flex items-center rounded-full bg-yellow-100 px-2.5 py-0.5 text-xs font-medium text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200" role="status" aria-label="{{ __('Status: Submitted') }}">
|
||||
{{ __('Submitted') }}
|
||||
<span class="inline-flex items-center rounded-full bg-yellow-100 px-2.5 py-0.5 text-xs font-medium text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200" role="status" aria-label="狀態:已提交">
|
||||
已提交
|
||||
</span>
|
||||
@elseif($budget->status === 'approved')
|
||||
<span class="inline-flex items-center rounded-full bg-blue-100 px-2.5 py-0.5 text-xs font-medium text-blue-800 dark:bg-blue-900 dark:text-blue-200" role="status" aria-label="{{ __('Status: Approved') }}">
|
||||
{{ __('Approved') }}
|
||||
<span class="inline-flex items-center rounded-full bg-blue-100 px-2.5 py-0.5 text-xs font-medium text-blue-800 dark:bg-blue-900 dark:text-blue-200" role="status" aria-label="狀態:已核准">
|
||||
已核准
|
||||
</span>
|
||||
@elseif($budget->status === 'active')
|
||||
<span class="inline-flex items-center rounded-full bg-green-100 px-2.5 py-0.5 text-xs font-medium text-green-800 dark:bg-green-900 dark:text-green-200" role="status" aria-label="{{ __('Status: Active') }}">
|
||||
{{ __('Active') }}
|
||||
<span class="inline-flex items-center rounded-full bg-green-100 px-2.5 py-0.5 text-xs font-medium text-green-800 dark:bg-green-900 dark:text-green-200" role="status" aria-label="狀態:使用中">
|
||||
使用中
|
||||
</span>
|
||||
@elseif($budget->status === 'closed')
|
||||
<span class="inline-flex items-center rounded-full bg-gray-100 px-2.5 py-0.5 text-xs font-medium text-gray-800 dark:bg-gray-700 dark:text-gray-200" role="status" aria-label="{{ __('Status: Closed') }}">
|
||||
{{ __('Closed') }}
|
||||
<span class="inline-flex items-center rounded-full bg-gray-100 px-2.5 py-0.5 text-xs font-medium text-gray-800 dark:bg-gray-700 dark:text-gray-200" role="status" aria-label="狀態:已結案">
|
||||
已結案
|
||||
</span>
|
||||
@endif
|
||||
</td>
|
||||
@@ -160,15 +160,15 @@
|
||||
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
|
||||
<a href="{{ route('admin.budgets.show', $budget) }}"
|
||||
class="text-indigo-600 hover:text-indigo-900 dark:text-indigo-400 dark:hover:text-indigo-300 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800"
|
||||
aria-label="{{ __('View budget for fiscal year :year', ['year' => $budget->fiscal_year]) }}">
|
||||
{{ __('View') }}
|
||||
aria-label="檢視 {{ $budget->fiscal_year }} 年度預算">
|
||||
檢視
|
||||
</a>
|
||||
@if($budget->canBeEdited())
|
||||
<span class="text-gray-300 dark:text-gray-600" aria-hidden="true"> | </span>
|
||||
<a href="{{ route('admin.budgets.edit', $budget) }}"
|
||||
class="text-indigo-600 hover:text-indigo-900 dark:text-indigo-400 dark:hover:text-indigo-300 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800"
|
||||
aria-label="{{ __('Edit budget for fiscal year :year', ['year' => $budget->fiscal_year]) }}">
|
||||
{{ __('Edit') }}
|
||||
aria-label="編輯 {{ $budget->fiscal_year }} 年度預算">
|
||||
編輯
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
@@ -179,15 +179,15 @@
|
||||
<svg class="mx-auto h-12 w-12 text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
|
||||
</svg>
|
||||
<p class="mt-2 text-sm font-semibold">{{ __('No budgets found') }}</p>
|
||||
<p class="mt-1 text-sm">{{ __('Get started by creating a new budget.') }}</p>
|
||||
<p class="mt-2 text-sm font-semibold">找不到預算</p>
|
||||
<p class="mt-1 text-sm">開始建立新的預算。</p>
|
||||
<div class="mt-6">
|
||||
<a href="{{ route('admin.budgets.create') }}"
|
||||
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 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">
|
||||
<svg class="-ml-0.5 mr-1.5 h-5 w-5" fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
|
||||
<path d="M10.75 4.75a.75.75 0 00-1.5 0v4.5h-4.5a.75.75 0 000 1.5h4.5v4.5a.75.75 0 001.5 0v-4.5h4.5a.75.75 0 000-1.5h-4.5v-4.5z" />
|
||||
</svg>
|
||||
{{ __('Create Budget') }}
|
||||
新增預算
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -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">
|
||||
{{ __('Budget Details') }} - {{ $budget->fiscal_year }}
|
||||
預算詳情 - {{ $budget->fiscal_year }}
|
||||
</h2>
|
||||
</x-slot>
|
||||
|
||||
@@ -24,23 +24,23 @@
|
||||
</div>
|
||||
<div>
|
||||
@if($budget->status === 'active')
|
||||
<span class="inline-flex rounded-full bg-green-100 px-3 py-1 text-sm font-medium text-green-800 dark:bg-green-900 dark:text-green-200"> {{ __('Active') }}</span>
|
||||
<span class="inline-flex rounded-full bg-green-100 px-3 py-1 text-sm font-medium text-green-800 dark:bg-green-900 dark:text-green-200"> 使用中</span>
|
||||
@elseif($budget->status === 'approved')
|
||||
<span class="inline-flex rounded-full bg-blue-100 px-3 py-1 text-sm font-medium text-blue-800 dark:bg-blue-900 dark:text-blue-200">{{ __('Approved') }}</span>
|
||||
<span class="inline-flex rounded-full bg-blue-100 px-3 py-1 text-sm font-medium text-blue-800 dark:bg-blue-900 dark:text-blue-200">已核准</span>
|
||||
@else
|
||||
<span class="inline-flex rounded-full bg-gray-100 px-3 py-1 text-sm font-medium text-gray-800 dark:bg-gray-700 dark:text-gray-200">{{ __(ucfirst($budget->status)) }}</span>
|
||||
<span class="inline-flex rounded-full bg-gray-100 px-3 py-1 text-sm font-medium text-gray-800 dark:bg-gray-700 dark:text-gray-200">{{ ucfirst($budget->status) }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex gap-3">
|
||||
@if($budget->canBeEdited())
|
||||
<a href="{{ route('admin.budgets.edit', $budget) }}" class="btn-secondary">{{ __('Edit') }}</a>
|
||||
<a href="{{ route('admin.budgets.edit', $budget) }}" class="btn-secondary">編輯</a>
|
||||
@endif
|
||||
@if($budget->isDraft())
|
||||
<form method="POST" action="{{ route('admin.budgets.submit', $budget) }}">
|
||||
@csrf
|
||||
<button type="submit" class="btn-primary">{{ __('Submit') }}</button>
|
||||
<button type="submit" class="btn-primary">提交</button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
@@ -49,19 +49,19 @@
|
||||
<!-- Summary Cards -->
|
||||
<div class="grid grid-cols-1 gap-6 sm:grid-cols-4">
|
||||
<div class="bg-white shadow rounded-lg dark:bg-gray-800 p-5">
|
||||
<dt class="text-sm text-gray-500 dark:text-gray-400">{{ __('Budgeted Income') }}</dt>
|
||||
<dt class="text-sm text-gray-500 dark:text-gray-400">預算收入</dt>
|
||||
<dd class="text-2xl font-bold text-gray-900 dark:text-gray-100">NT$ {{ number_format($budget->total_budgeted_income) }}</dd>
|
||||
</div>
|
||||
<div class="bg-white shadow rounded-lg dark:bg-gray-800 p-5">
|
||||
<dt class="text-sm text-gray-500 dark:text-gray-400">{{ __('Budgeted Expense') }}</dt>
|
||||
<dt class="text-sm text-gray-500 dark:text-gray-400">預算支出</dt>
|
||||
<dd class="text-2xl font-bold text-gray-900 dark:text-gray-100">NT$ {{ number_format($budget->total_budgeted_expense) }}</dd>
|
||||
</div>
|
||||
<div class="bg-white shadow rounded-lg dark:bg-gray-800 p-5">
|
||||
<dt class="text-sm text-gray-500 dark:text-gray-400">{{ __('Actual Income') }}</dt>
|
||||
<dt class="text-sm text-gray-500 dark:text-gray-400">實際收入</dt>
|
||||
<dd class="text-2xl font-bold text-gray-900 dark:text-gray-100">NT$ {{ number_format($budget->total_actual_income) }}</dd>
|
||||
</div>
|
||||
<div class="bg-white shadow rounded-lg dark:bg-gray-800 p-5">
|
||||
<dt class="text-sm text-gray-500 dark:text-gray-400">{{ __('Actual Expense') }}</dt>
|
||||
<dt class="text-sm text-gray-500 dark:text-gray-400">實際支出</dt>
|
||||
<dd class="text-2xl font-bold text-gray-900 dark:text-gray-100">NT$ {{ number_format($budget->total_actual_expense) }}</dd>
|
||||
</div>
|
||||
</div>
|
||||
@@ -69,14 +69,14 @@
|
||||
<!-- Income Items -->
|
||||
@if($incomeItems->count() > 0)
|
||||
<div class="bg-white shadow sm:rounded-lg dark:bg-gray-800 px-4 py-5 sm:p-6">
|
||||
<h3 class="text-base font-semibold text-gray-900 dark:text-gray-100 mb-4">{{ __('Income') }} (6e)</h3>
|
||||
<h3 class="text-base font-semibold text-gray-900 dark:text-gray-100 mb-4">收入 </h3>
|
||||
<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 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">{{ __('Account') }}</th>
|
||||
<th scope="col" class="px-3 py-3 text-right text-sm font-semibold text-gray-900 dark:text-gray-100">{{ __('Budgeted') }}</th>
|
||||
<th scope="col" class="px-3 py-3 text-right text-sm font-semibold text-gray-900 dark:text-gray-100">{{ __('Actual') }}</th>
|
||||
<th scope="col" class="px-3 py-3 text-right text-sm font-semibold text-gray-900 dark:text-gray-100">{{ __('Variance') }}</th>
|
||||
<th scope="col" class="py-3 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">帳戶</th>
|
||||
<th scope="col" class="px-3 py-3 text-right text-sm font-semibold text-gray-900 dark:text-gray-100">預算</th>
|
||||
<th scope="col" class="px-3 py-3 text-right text-sm font-semibold text-gray-900 dark:text-gray-100">實際</th>
|
||||
<th scope="col" class="px-3 py-3 text-right text-sm font-semibold text-gray-900 dark:text-gray-100">差異</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 dark:divide-gray-700">
|
||||
@@ -96,14 +96,14 @@
|
||||
<!-- Expense Items -->
|
||||
@if($expenseItems->count() > 0)
|
||||
<div class="bg-white shadow sm:rounded-lg dark:bg-gray-800 px-4 py-5 sm:p-6">
|
||||
<h3 class="text-base font-semibold text-gray-900 dark:text-gray-100 mb-4">{{ __('Expenses') }} (/ú)</h3>
|
||||
<h3 class="text-base font-semibold text-gray-900 dark:text-gray-100 mb-4">支出 (/<EFBFBD>)</h3>
|
||||
<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 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">{{ __('Account') }}</th>
|
||||
<th scope="col" class="px-3 py-3 text-right text-sm font-semibold text-gray-900 dark:text-gray-100">{{ __('Budgeted') }}</th>
|
||||
<th scope="col" class="px-3 py-3 text-right text-sm font-semibold text-gray-900 dark:text-gray-100">{{ __('Actual') }}</th>
|
||||
<th scope="col" class="px-3 py-3 text-right text-sm font-semibold text-gray-900 dark:text-gray-100">{{ __('Utilization') }}</th>
|
||||
<th scope="col" class="py-3 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">帳戶</th>
|
||||
<th scope="col" class="px-3 py-3 text-right text-sm font-semibold text-gray-900 dark:text-gray-100">預算</th>
|
||||
<th scope="col" class="px-3 py-3 text-right text-sm font-semibold text-gray-900 dark:text-gray-100">實際</th>
|
||||
<th scope="col" class="px-3 py-3 text-right text-sm font-semibold text-gray-900 dark:text-gray-100">使用率</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 dark:divide-gray-700">
|
||||
|
||||
Reference in New Issue
Block a user