From cfb67293491420e7895d0cd4f2a43d31a3d7ed37 Mon Sep 17 00:00:00 2001 From: pbao9 Date: Sat, 7 Feb 2026 18:27:18 +0700 Subject: [PATCH] update --- .../administrator/layout/master.blade.php | 1 - .../layout/partials/toast.blade.php | 98 +- .../categories/datatable/action.blade.php | 2 +- .../datatable/action_trash.blade.php | 2 +- .../categories/datatable/modal.blade.php | 51 +- .../pages/product/categories/index.blade.php | 32 +- .../pages/product/categories/trash.blade.php | 75 +- .../views/components/data-table.blade.php | 1008 +++++++++-------- 8 files changed, 618 insertions(+), 651 deletions(-) diff --git a/resources/views/administrator/layout/master.blade.php b/resources/views/administrator/layout/master.blade.php index 79038cc..cbe22b3 100644 --- a/resources/views/administrator/layout/master.blade.php +++ b/resources/views/administrator/layout/master.blade.php @@ -58,7 +58,6 @@ @yield('content') -
@include('administrator.layout.partials.footer') diff --git a/resources/views/administrator/layout/partials/toast.blade.php b/resources/views/administrator/layout/partials/toast.blade.php index d85f8ae..095e6d2 100644 --- a/resources/views/administrator/layout/partials/toast.blade.php +++ b/resources/views/administrator/layout/partials/toast.blade.php @@ -1,60 +1,74 @@ - - - + + + + // Compatibility layer with old FuiToast calls + window.FuiToast = { + success: function (message) { return showToast(message, 'success'); }, + error: function (message) { return showToast(message, 'error'); } + }; + \ No newline at end of file diff --git a/resources/views/administrator/pages/product/categories/datatable/action.blade.php b/resources/views/administrator/pages/product/categories/datatable/action.blade.php index 53a1d72..ea67d1e 100644 --- a/resources/views/administrator/pages/product/categories/datatable/action.blade.php +++ b/resources/views/administrator/pages/product/categories/datatable/action.blade.php @@ -1,7 +1,7 @@
+ data-bs-toggle="modal" data-bs-target="#deleteModal-{{ $row->id }}" />
@include('administrator.pages.product.categories.datatable.modal', [ diff --git a/resources/views/administrator/pages/product/categories/datatable/action_trash.blade.php b/resources/views/administrator/pages/product/categories/datatable/action_trash.blade.php index daa1aea..2235cef 100644 --- a/resources/views/administrator/pages/product/categories/datatable/action_trash.blade.php +++ b/resources/views/administrator/pages/product/categories/datatable/action_trash.blade.php @@ -1,7 +1,7 @@
+ data-bs-toggle="modal" data-bs-target="#forceDeleteModal-{{ $row->id }}" />
@include('administrator.pages.product.categories.datatable.modal', [ diff --git a/resources/views/administrator/pages/product/categories/datatable/modal.blade.php b/resources/views/administrator/pages/product/categories/datatable/modal.blade.php index e9b75bb..209761c 100644 --- a/resources/views/administrator/pages/product/categories/datatable/modal.blade.php +++ b/resources/views/administrator/pages/product/categories/datatable/modal.blade.php @@ -1,33 +1,36 @@ - diff --git a/resources/views/administrator/pages/product/categories/index.blade.php b/resources/views/administrator/pages/product/categories/index.blade.php index 5125747..dd8261b 100644 --- a/resources/views/administrator/pages/product/categories/index.blade.php +++ b/resources/views/administrator/pages/product/categories/index.blade.php @@ -64,36 +64,8 @@ $tabs = [ @push('custom-scripts') @endpush diff --git a/resources/views/administrator/pages/product/categories/trash.blade.php b/resources/views/administrator/pages/product/categories/trash.blade.php index ee6dcf3..dea6fd7 100644 --- a/resources/views/administrator/pages/product/categories/trash.blade.php +++ b/resources/views/administrator/pages/product/categories/trash.blade.php @@ -7,28 +7,28 @@ @section('breadcrumb') @php - $breadcrumbItems = [ - ['label' => 'Product'], - ['label' => 'Product Group', 'route' => route('products.group.index')], - ['label' => 'Trash List', 'active' => true] - ]; +$breadcrumbItems = [ + ['label' => 'Product'], + ['label' => 'Product Group', 'route' => route('products.group.index')], + ['label' => 'Trash List', 'active' => true] +]; @endphp @endsection @section('tab') @php - $tabs = [ - [ - 'label' => 'Product', - 'route' => 'products.index', - 'icon' => 'server', - ], - [ - 'label' => 'Product Group', - 'route' => 'products.group.index', - 'icon' => 'server', - ], - ]; +$tabs = [ + [ + 'label' => 'Product', + 'route' => 'products.index', + 'icon' => 'server', + ], + [ + 'label' => 'Product Group', + 'route' => 'products.group.index', + 'icon' => 'server', + ], +]; @endphp @endsection @@ -40,11 +40,11 @@
+ ['key' => 'name', 'label' => 'Group'], + ['key' => 'slug', 'label' => 'Slug'], + ['key' => 'deleted_at', 'label' => 'Deleted At'], + ['key' => 'action', 'label' => 'Action', 'searchable' => false], + ]" />
@@ -63,36 +63,7 @@ @push('custom-scripts') @endpush diff --git a/resources/views/components/data-table.blade.php b/resources/views/components/data-table.blade.php index 33d4989..880205c 100644 --- a/resources/views/components/data-table.blade.php +++ b/resources/views/components/data-table.blade.php @@ -1,580 +1,588 @@ @props(['id', 'columns', 'ajax', 'bulkDeleteUrl' => null]) @php -$dtColumns = collect($columns)->map(function ($c) { - return [ - 'data' => $c['key'], - 'name' => $c['key'], - 'orderable' => $c['orderable'] ?? true, - 'searchable' => $c['searchable'] ?? true, - 'className' => $c['className'] ?? '', - ]; -})->values(); + $dtColumns = collect($columns) + ->map(function ($c) { + return [ + 'data' => $c['key'], + 'name' => $c['key'], + 'orderable' => $c['orderable'] ?? true, + 'searchable' => $c['searchable'] ?? true, + 'className' => $c['className'] ?? '', + ]; + }) + ->values(); @endphp -@if($bulkDeleteUrl) -
-
-
- - 0 items selected -
-
- - Delete Selected - -
-
- - {{-- Bulk Delete Confirmation Modal (Bootstrap 5) --}} - -@endif -
- {{-- Loading Process Indicator --}} - - - - - - @foreach($columns as $col) - - @endforeach - - - @foreach($columns as $col) - - @endforeach - - - - {{-- DataTables will populate this --}} - -
-
- - @if($col['key'] === 'checkbox') - {!! $col['label'] !!} - @else - {{ $col['label'] }} - @endif - - @if($col['key'] !== 'checkbox' && ($col['orderable'] ?? true)) -
- - -
- @endif -
-
- @if(($col['searchable'] ?? true)) -
- - - - -
- @endif -
+@if ($bulkDeleteUrl) +
+
+
+ + 0 items selected
- @push('custom-scripts') - + }); + }); + @endif + - - @endpush \ No newline at end of file + th.sorting_desc .sort-icon-asc { + display: none !important; + } + + /* Hide default DataTables icons */ + table.dataTable thead .sorting:before, + table.dataTable thead .sorting:after, + table.dataTable thead .sorting_asc:before, + table.dataTable thead .sorting_asc:after, + table.dataTable thead .sorting_desc:before, + table.dataTable thead .sorting_desc:after { + display: none !important; + } + + /* Processing Indicator with improved look - Centered */ + div.dataTables_processing { + display: none !important; + /* Hide default processing */ + } + +@endpush