This commit is contained in:
pbao9
2026-02-08 17:08:46 +07:00
parent cfb6729349
commit 4d4bf020d4
4 changed files with 490 additions and 441 deletions
@@ -4,6 +4,7 @@
data-bs-toggle="modal" data-bs-target="#deleteModal-{{ $row->id }}" />
</div>
@push('modals')
@include('administrator.pages.product.categories.datatable.modal', [
'deleteRoute' => 'products.group.destroy',
'itemLabel' => 'Product Group',
@@ -11,4 +12,5 @@
'itemName' => $row->name,
'modalId' => 'deleteModal-' . $row->id
])
@endpush
@@ -1,6 +1,6 @@
<!-- Delete Confirmation Modal -->
<div class="modal fade" id="{{ $modalId ?? 'deleteModal' }}" tabindex="-1"
aria-labelledby="deleteModalLabel-{{ $modalId ?? 'deleteModal' }}" aria-hidden="true">
aria-labelledby="deleteModalLabel-{{ $modalId ?? 'deleteModal' }}" aria-hidden="true" data-bs-backdrop="true">
<div class="modal-dialog modal-dialog-centered modal-sm">
<div class="modal-content shadow-lg border-0">
<div class="modal-header bg-danger text-white py-2">
@@ -64,8 +64,55 @@ $tabs = [
@push('custom-scripts')
<script>
document.addEventListener('DOMContentLoaded', function () {
// DataTable is already initialized in components/datatable
// If we need custom behavior here, we can add it.
// Re-initialize Lucide icons after DataTable draws
$('#productTable').on('draw.dt', function() {
setTimeout(function() {
if (typeof lucide !== 'undefined') {
lucide.createIcons();
}
}, 100);
});
});
</script>
@endpush
@push('custom-styles')
<style>
/* Fix Bootstrap 5 modal z-index to be above DataTable and all other elements */
.modal-backdrop {
z-index: 9998 !important;
}
.modal {
z-index: 9999 !important;
}
/* Override datatable wrapper overflow to prevent clipping modals */
.data-table-wrapper {
overflow: visible !important;
overflow-x: auto !important;
}
/* Reduce z-index of sticky elements to be below modal */
.data-table-wrapper .table thead th {
z-index: 3 !important;
}
.table thead th:last-child,
.table tbody td:last-child {
z-index: 2 !important;
}
.table thead th:first-child,
.table tbody td:first-child {
z-index: 2 !important;
}
.table thead th:nth-child(2) {
z-index: 4 !important;
}
</style>
@endpush
{{-- Render all modals outside datatable wrapper --}}
@stack('modals')
@@ -363,7 +363,7 @@
vertical-align: middle;
position: sticky;
top: 0;
z-index: 10;
z-index: 3; {{-- Lowered from 10 --}}
background-color: #f8f9fa;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
@@ -374,14 +374,14 @@
position: sticky;
right: 0;
background: #fff;
z-index: 5;
z-index: 2; {{-- Lowered from 5 --}}
border-left: 1px solid #f1f5f9;
box-shadow: -2px 0 5px rgba(0, 0, 0, 0.02);
}
.table thead th:last-child {
background: #f8f9fa;
z-index: 11;
z-index: 4; {{-- Lowered from 11 --}}
}
/* Sticky Checkbox Column */
@@ -390,14 +390,14 @@
position: sticky;
left: 0;
background: #fff;
z-index: 5;
z-index: 2; {{-- Lowered from 5 --}}
border-right: 1px solid #f1f5f9;
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.02);
}
.table thead th:first-child {
background: #f8f9fa;
z-index: 11;
z-index: 4; {{-- Lowered from 11 --}}
}
.table tbody tr:hover td {
@@ -497,7 +497,7 @@
left: 0;
right: 0;
bottom: 0;
z-index: 1000;
z-index: 5; {{-- Lowered from 1000 --}}
pointer-events: none;
}
@@ -509,7 +509,7 @@
width: 100%;
background: #f1f5f9;
overflow: hidden;
z-index: 1001;
z-index: 6; {{-- Lowered from 1001 --}}
}
.loading-bar::after {