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">
|
||||
{{ __('Audit Logs') }}
|
||||
稽核日誌
|
||||
</h2>
|
||||
</x-slot>
|
||||
|
||||
@@ -9,18 +9,18 @@
|
||||
<div class="mx-auto max-w-7xl sm:px-6 lg:px-8">
|
||||
<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.audit.index') }}" class="space-y-4" role="search" aria-label="{{ __('Filter audit logs') }}">
|
||||
<form method="GET" action="{{ route('admin.audit.index') }}" class="space-y-4" role="search" aria-label="篩選稽核日誌">
|
||||
<div class="grid grid-cols-1 gap-4 md:grid-cols-4">
|
||||
<div>
|
||||
<label for="user_id" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('User') }}
|
||||
使用者
|
||||
</label>
|
||||
<select
|
||||
name="user_id"
|
||||
id="user_id"
|
||||
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-700 dark:text-gray-100"
|
||||
>
|
||||
<option value="">{{ __('All Users') }}</option>
|
||||
<option value="">所有使用者</option>
|
||||
@foreach ($users as $user)
|
||||
<option value="{{ $user->id }}" @selected(request('user_id') == $user->id)>
|
||||
{{ $user->name }}
|
||||
@@ -31,14 +31,14 @@
|
||||
|
||||
<div>
|
||||
<label for="event" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Event') }}
|
||||
事件
|
||||
</label>
|
||||
<select
|
||||
name="event"
|
||||
id="event"
|
||||
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-700 dark:text-gray-100"
|
||||
>
|
||||
<option value="">{{ __('All Events') }}</option>
|
||||
<option value="">所有事件</option>
|
||||
@foreach ($actions as $action)
|
||||
<option value="{{ $action }}" @selected(request('action') == $action)>
|
||||
{{ ucfirst($action) }}
|
||||
@@ -49,14 +49,14 @@
|
||||
|
||||
<div>
|
||||
<label for="auditable_type" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
{{ __('Model Type') }}
|
||||
模型類型
|
||||
</label>
|
||||
<select
|
||||
name="auditable_type"
|
||||
id="auditable_type"
|
||||
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-700 dark:text-gray-100"
|
||||
>
|
||||
<option value="">{{ __('All Types') }}</option>
|
||||
<option value="">所有類型</option>
|
||||
@foreach ($auditableTypes as $type)
|
||||
<option value="{{ $type }}" @selected(request('auditable_type') == $type)>
|
||||
{{ class_basename($type) }}
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
<div class="flex items-end">
|
||||
<button type="submit" class="inline-flex w-full justify-center rounded-md border border-transparent bg-indigo-600 dark:bg-indigo-500 px-4 py-2 text-sm font-medium text-white shadow-sm 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">
|
||||
{{ __('Filter') }}
|
||||
篩選
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -78,22 +78,22 @@
|
||||
<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">
|
||||
{{ __('User') }}
|
||||
使用者
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">
|
||||
{{ __('Event') }}
|
||||
事件
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">
|
||||
{{ __('Model') }}
|
||||
模型
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">
|
||||
{{ __('Details') }}
|
||||
詳情
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">
|
||||
{{ __('IP Address') }}
|
||||
IP位址
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">
|
||||
{{ __('Date') }}
|
||||
日期
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -120,7 +120,7 @@
|
||||
<div>{{ $log->description ?: '—' }}</div>
|
||||
@if(!empty($log->metadata))
|
||||
<details class="cursor-pointer group mt-1">
|
||||
<summary class="text-xs text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300">{{ __('Metadata') }}</summary>
|
||||
<summary class="text-xs text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300">元數據</summary>
|
||||
<div class="mt-2 p-2 bg-gray-50 dark:bg-gray-900 rounded text-xs font-mono overflow-x-auto">
|
||||
<pre class="whitespace-pre-wrap text-gray-800 dark:text-gray-200">{{ json_encode($log->metadata, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}</pre>
|
||||
</div>
|
||||
@@ -137,7 +137,7 @@
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="6" class="px-3 py-4 text-sm text-gray-500 dark:text-gray-400 text-center">
|
||||
{{ __('No audit logs found.') }}
|
||||
找不到稽核日誌。
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
|
||||
Reference in New Issue
Block a user