Fix audit logs and issue reports pages, rename Issues to Tasks
修復稽核日誌與任務報表頁面,並將「問題」改名為「任務」 ## Changes 變更內容 ### Bug Fixes 錯誤修復 1. Fixed audit logs page 500 error - Added missing $auditableTypes variable to controller - Changed $events to $actions in view - Added description and ip_address columns to audit_logs table - Updated AuditLog model fillable array 2. Fixed issue reports page SQLite compatibility errors - Replaced MySQL NOW() function with Laravel now() helper - Replaced TIMESTAMPDIFF() with PHP-based date calculation - Fixed request->date() default value handling ### Feature Changes 功能變更 3. Renamed "Issues" terminology to "Tasks" throughout the system - Updated navigation menus (Admin: Issues → Admin: Tasks) - Updated all issue-related views to use task terminology - Changed Chinese labels from "問題" to "任務" - Updated dashboard, issue tracker, and reports pages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
<div class="hidden sm:flex sm:items-center">
|
||||
<x-dropdown align="right" width="48">
|
||||
<x-slot name="trigger">
|
||||
<button class="@if(request()->routeIs('admin.*')) inline-flex items-center px-1 pt-1 border-b-2 border-indigo-400 text-sm font-medium leading-5 text-gray-900 focus:outline-none focus:border-indigo-700 transition duration-150 ease-in-out @else inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-medium leading-5 text-gray-500 hover:text-gray-700 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-300 transition duration-150 ease-in-out @endif">
|
||||
<button class="@if(request()->routeIs('admin.*')) inline-flex items-center px-1 pt-1 border-b-2 border-indigo-400 dark:border-indigo-600 text-sm font-medium leading-5 text-gray-900 dark:text-slate-100 focus:outline-none focus:border-indigo-700 dark:focus:border-indigo-300 transition duration-150 ease-in-out @else inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-medium leading-5 text-gray-500 dark:text-slate-400 hover:text-gray-700 dark:hover:text-slate-300 hover:border-gray-300 dark:hover:border-slate-600 focus:outline-none focus:text-gray-700 dark:focus:text-slate-300 focus:border-gray-300 dark:focus:border-slate-600 transition duration-150 ease-in-out @endif">
|
||||
<div>{{ __('Management') }}</div>
|
||||
|
||||
<div class="ms-1">
|
||||
@@ -40,6 +40,11 @@
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="content">
|
||||
@can('view_announcements')
|
||||
<x-dropdown-link :href="route('admin.announcements.index')">
|
||||
{{ __('Admin: Announcements') }}
|
||||
</x-dropdown-link>
|
||||
@endcan
|
||||
@hasrole('admin|membership_manager')
|
||||
<x-dropdown-link :href="route('admin.members.index')">
|
||||
{{ __('Admin: Members') }}
|
||||
@@ -66,7 +71,7 @@
|
||||
</x-dropdown-link>
|
||||
@endcan
|
||||
<x-dropdown-link :href="route('admin.issues.index')">
|
||||
{{ __('Admin: Issues') }}
|
||||
{{ __('Admin: Tasks') }}
|
||||
</x-dropdown-link>
|
||||
@role('admin')
|
||||
<x-dropdown-link :href="route('admin.audit.index')">
|
||||
@@ -94,23 +99,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Settings Dropdown -->
|
||||
<div class="hidden sm:flex sm:items-center sm:ms-6 space-x-3">
|
||||
<button
|
||||
type="button"
|
||||
@click="$root.toggle()"
|
||||
class="inline-flex items-center px-3 py-2 rounded-md text-sm font-medium border border-transparent bg-gray-100 text-gray-600 hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:bg-slate-800 dark:text-slate-100 dark:hover:bg-slate-700"
|
||||
aria-label="Toggle theme"
|
||||
>
|
||||
<span x-show="$root.isDark" class="flex items-center space-x-2">
|
||||
<svg class="h-4 w-4" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path d="M17.293 13.293a1 1 0 00-1.414 0l-.586.586a6 6 0 01-8.486-8.486l.586-.586A1 1 0 006.172 3H6a1 1 0 00-.707.293l-.586.586a8 8 0 1011.314 11.314l.586-.586a1 1 0 000-1.414l-.314-.314z"/></svg>
|
||||
<span class="sr-only">Switch to light</span>
|
||||
</span>
|
||||
<span x-show="!$root.isDark" class="flex items-center space-x-2">
|
||||
<svg class="h-4 w-4" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path d="M10 3a1 1 0 011 1v1a1 1 0 11-2 0V4a1 1 0 011-1zm0 8a3 3 0 100-6 3 3 0 000 6zm5.657-6.657a1 1 0 010 1.414l-.707.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 9a1 1 0 110 2h-1a1 1 0 110-2h1zM5 9a1 1 0 100 2H4a1 1 0 100-2h1zm10.657 6.657a1 1 0 00-1.414 0l-.707.707a1 1 0 001.414 1.414l.707-.707a1 1 0 000-1.414zM10 16a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zm-5.657-.343a1 1 0 010-1.414l.707-.707a1 1 0 011.414 1.414l-.707.707a1 1 0 01-1.414 0z"/></svg>
|
||||
<span class="sr-only">Switch to dark</span>
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<div class="hidden sm:flex sm:items-center sm:ms-6">
|
||||
<x-dropdown align="right" width="48">
|
||||
<x-slot name="trigger">
|
||||
<button class="inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md text-gray-500 bg-white hover:text-gray-700 focus:outline-none transition ease-in-out duration-150 dark:bg-slate-800 dark:text-slate-100 dark:hover:text-white">
|
||||
@@ -145,7 +134,7 @@
|
||||
|
||||
<!-- Hamburger -->
|
||||
<div class="-me-2 flex items-center sm:hidden">
|
||||
<button @click="open = ! open" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 focus:text-gray-500 transition duration-150 ease-in-out" aria-label="{{ __('Main menu') }}">
|
||||
<button @click="open = ! open" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 focus:text-gray-500 transition duration-150 ease-in-out dark:text-slate-500 dark:hover:text-slate-400 dark:hover:bg-slate-800 dark:focus:bg-slate-800 dark:focus:text-slate-400" aria-label="{{ __('Main menu') }}">
|
||||
<svg class="h-6 w-6" stroke="currentColor" fill="none" viewBox="0 0 24 24">
|
||||
<path :class="{'hidden': open, 'inline-flex': ! open }" class="inline-flex" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
|
||||
<path :class="{'hidden': ! open, 'inline-flex': open }" class="hidden" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
||||
@@ -172,10 +161,15 @@
|
||||
|
||||
@if(Auth::user() && (Auth::user()->hasRole(['admin', 'membership_manager', 'finance_accountant', 'staff']) || Auth::user()->canAny(['view_finance_documents', 'view_accounting_transactions', 'manage_system_settings'])))
|
||||
<div class="pt-2 pb-1 border-t border-gray-200 dark:border-gray-700 mt-2">
|
||||
<div class="px-4 text-xs font-semibold text-gray-500 uppercase tracking-wider">
|
||||
<div class="px-4 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider">
|
||||
{{ __('Management') }}
|
||||
</div>
|
||||
</div>
|
||||
@can('view_announcements')
|
||||
<x-responsive-nav-link :href="route('admin.announcements.index')" :active="request()->routeIs('admin.announcements.*')">
|
||||
{{ __('Admin: Announcements') }}
|
||||
</x-responsive-nav-link>
|
||||
@endcan
|
||||
@hasrole('admin|membership_manager')
|
||||
<x-responsive-nav-link :href="route('admin.members.index')" :active="request()->routeIs('admin.members.*')">
|
||||
{{ __('Admin: Members') }}
|
||||
@@ -202,7 +196,7 @@
|
||||
</x-responsive-nav-link>
|
||||
@endcan
|
||||
<x-responsive-nav-link :href="route('admin.issues.index')" :active="request()->routeIs('admin.issues.*')">
|
||||
{{ __('Admin: Issues') }}
|
||||
{{ __('Admin: Tasks') }}
|
||||
</x-responsive-nav-link>
|
||||
@role('admin')
|
||||
<x-responsive-nav-link :href="route('admin.audit.index')" :active="request()->routeIs('admin.audit.*')">
|
||||
@@ -226,10 +220,10 @@
|
||||
</div>
|
||||
|
||||
<!-- Responsive Settings Options -->
|
||||
<div class="pt-4 pb-1 border-t border-gray-200">
|
||||
<div class="pt-4 pb-1 border-t border-gray-200 dark:border-gray-700">
|
||||
<div class="px-4">
|
||||
<div class="font-medium text-base text-gray-800">{{ Auth::user()->name }}</div>
|
||||
<div class="font-medium text-sm text-gray-500">{{ Auth::user()->email }}</div>
|
||||
<div class="font-medium text-base text-gray-800 dark:text-slate-200">{{ Auth::user()->name }}</div>
|
||||
<div class="font-medium text-sm text-gray-500 dark:text-slate-400">{{ Auth::user()->email }}</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 space-y-1">
|
||||
|
||||
Reference in New Issue
Block a user