[FEAT] 完善全站多語系支援、角色權限篩選優化及 UI 元件重構
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 1m4s
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 1m4s
- [DOCS] 補齊 en, ja, zh_TW 語系檔翻譯並完善驗證錯誤訊息 (validation.php) - [FEAT] 角色權限頁面新增「所屬單位」篩選功能 (僅限系統管理員) - [STYLE] 優化角色列表顯示,將「類型」變更為具體「所屬單位」名稱 - [STYLE] 修正角色頁面工具列佈局,搜尋框置前並修正下拉箭頭顯示 - [REFACTOR] 統一全站刪除確認視窗,導入新版 <x-delete-confirm-modal /> 組件 - [REFACTOR] 優化 PermissionController 查詢效能 (Eager Loading) - [FIX] 修正 RoleSeeder 角色命名與資料庫同步邏輯
This commit is contained in:
@@ -4,27 +4,9 @@
|
||||
@php
|
||||
@endphp
|
||||
|
||||
{{-- Toast 通知 --}}
|
||||
@if(session('success'))
|
||||
<div x-data="{ show: false }"
|
||||
x-show="show"
|
||||
x-cloak
|
||||
x-init="setTimeout(() => { show = true; setTimeout(() => show = false, 3000) }, 50)"
|
||||
x-transition:enter="transition cubic-bezier(0.34, 1.56, 0.64, 1) duration-300"
|
||||
x-transition:enter-start="opacity-0 -translate-y-40"
|
||||
x-transition:enter-end="opacity-100 translate-y-0"
|
||||
x-transition:leave="transition ease-in duration-400"
|
||||
x-transition:leave-start="opacity-100 translate-y-0"
|
||||
x-transition:leave-end="opacity-0 -translate-y-40"
|
||||
class="fixed top-4 left-0 right-0 mx-auto w-max z-[100] bg-green-500 text-white px-6 py-3 rounded-lg shadow-lg flex items-center">
|
||||
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
|
||||
</svg>
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="px-6 py-8">
|
||||
|
||||
<div class="px-6 py-8" x-data="{ isDeleteConfirmOpen: false, deleteFormAction: '' }">
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<h3 class="text-gray-900 dark:text-gray-200 text-3xl font-medium">會員等級設定</h3>
|
||||
<button onclick="document.getElementById('createModal').classList.remove('hidden')" class="btn-luxury-primary">
|
||||
@@ -57,11 +39,7 @@
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
<form action="{{ route('admin.membership-tiers.destroy', $tier) }}" method="POST" class="inline" onsubmit="return confirm('確定要刪除嗎?')">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="text-red-600 hover:text-red-800">刪除</button>
|
||||
</form>
|
||||
<button type="button" @click="deleteFormAction = '{{ route('admin.membership-tiers.destroy', $tier) }}'; isDeleteConfirmOpen = true" class="text-red-600 hover:text-red-800">刪除</button>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
@@ -116,5 +94,6 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<x-delete-confirm-modal :message="__('Are you sure you want to delete this tier?')" />
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user