fix(qma): resolve dim backdrop stacking on physical unit modals and reorganize p2h and summary menus
This commit is contained in:
@@ -322,9 +322,9 @@
|
|||||||
</a>
|
</a>
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
@if(auth()->user()->canAny(['qma.logs.view', 'qma.p2h.view']))
|
@can('qma.logs.view')
|
||||||
@php
|
@php
|
||||||
$isActivityRoute = request()->routeIs('qma.activity.log') || request()->routeIs('qma.activity.support_timesheet') || request()->routeIs('qma.p2h.index') || request()->routeIs('qma.p2h.show');
|
$isActivityRoute = request()->routeIs('qma.activity.log') || request()->routeIs('qma.activity.support_timesheet');
|
||||||
@endphp
|
@endphp
|
||||||
<!-- Dropdown Menu: Log Aktifitas -->
|
<!-- Dropdown Menu: Log Aktifitas -->
|
||||||
<div>
|
<div>
|
||||||
@@ -338,9 +338,8 @@
|
|||||||
<i id="activityChevronDesktop" class="fa-solid fa-chevron-down text-[11px] transition-transform duration-200 {{ $isActivityRoute ? 'rotate-180 text-[#1b5e20]' : 'text-slate-400 group-hover:text-slate-600' }}"></i>
|
<i id="activityChevronDesktop" class="fa-solid fa-chevron-down text-[11px] transition-transform duration-200 {{ $isActivityRoute ? 'rotate-180 text-[#1b5e20]' : 'text-slate-400 group-hover:text-slate-600' }}"></i>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- Submenu Dropdown: Timesheet LV, History Timesheet Unit Support & P2H Unit Support (Tanpa Icon) -->
|
<!-- Submenu Dropdown: Timesheet LV & History Timesheet Unit Support (Tanpa Icon) -->
|
||||||
<div id="activitySubmenuDesktop" class="{{ $isActivityRoute ? '' : 'hidden' }} mt-1 pl-7 pr-1 space-y-1">
|
<div id="activitySubmenuDesktop" class="{{ $isActivityRoute ? '' : 'hidden' }} mt-1 pl-7 pr-1 space-y-1">
|
||||||
@can('qma.logs.view')
|
|
||||||
<a href="{{ route('qma.activity.log') }}"
|
<a href="{{ route('qma.activity.log') }}"
|
||||||
class="block px-3.5 py-2 text-xs rounded-xl transition {{ request()->routeIs('qma.activity.log') ? 'bg-[#1b5e20] text-white font-bold shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-slate-100 font-medium' }}">
|
class="block px-3.5 py-2 text-xs rounded-xl transition {{ request()->routeIs('qma.activity.log') ? 'bg-[#1b5e20] text-white font-bold shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-slate-100 font-medium' }}">
|
||||||
<span>Timesheet LV</span>
|
<span>Timesheet LV</span>
|
||||||
@@ -350,17 +349,17 @@
|
|||||||
class="block px-3.5 py-2 text-xs rounded-xl transition {{ request()->routeIs('qma.activity.support_timesheet') ? 'bg-[#1b5e20] text-white font-bold shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-slate-100 font-medium' }}">
|
class="block px-3.5 py-2 text-xs rounded-xl transition {{ request()->routeIs('qma.activity.support_timesheet') ? 'bg-[#1b5e20] text-white font-bold shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-slate-100 font-medium' }}">
|
||||||
<span>History Timesheet Unit Support</span>
|
<span>History Timesheet Unit Support</span>
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
@can('qma.p2h.view')
|
@can('qma.p2h.view')
|
||||||
<a href="{{ route('qma.p2h.index') }}"
|
<a href="{{ route('qma.p2h.index') }}"
|
||||||
class="block px-3.5 py-2 text-xs rounded-xl transition {{ request()->routeIs('qma.p2h.index') || request()->routeIs('qma.p2h.show') ? 'bg-[#1b5e20] text-white font-bold shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-slate-100 font-medium' }}">
|
class="flex items-center space-x-3 px-3.5 py-2.5 text-sm {{ request()->routeIs('qma.p2h.index') || request()->routeIs('qma.p2h.show') ? 'sidebar-item-active' : 'sidebar-item-inactive' }}">
|
||||||
|
<i class="fa-solid fa-clipboard-check text-base w-5 text-center"></i>
|
||||||
<span>P2H Unit Support</span>
|
<span>P2H Unit Support</span>
|
||||||
</a>
|
</a>
|
||||||
@endcan
|
@endcan
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@can('qma.p2h.templates')
|
@can('qma.p2h.templates')
|
||||||
<a href="{{ route('qma.p2h.templates') }}"
|
<a href="{{ route('qma.p2h.templates') }}"
|
||||||
@@ -370,13 +369,40 @@
|
|||||||
</a>
|
</a>
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
|
@if(auth()->user()->canAny(['qma.summary.view', 'qma.p2h.view']))
|
||||||
|
@php
|
||||||
|
$isSummaryRoute = request()->routeIs('qma.activity.summary*') || request()->routeIs('qma.p2h.summary*');
|
||||||
|
@endphp
|
||||||
|
<!-- Dropdown Menu: Summary Aktivitas -->
|
||||||
|
<div>
|
||||||
|
<button type="button"
|
||||||
|
onclick="toggleSummaryMenu('desktop')"
|
||||||
|
class="w-full flex items-center justify-between px-3.5 py-2.5 text-sm rounded-xl transition group {{ $isSummaryRoute ? 'bg-emerald-50/70 text-[#1b5e20] font-bold' : 'sidebar-item-inactive' }}">
|
||||||
|
<div class="flex items-center space-x-3">
|
||||||
|
<i class="fa-solid fa-chart-pie text-base w-5 text-center {{ $isSummaryRoute ? 'text-[#1b5e20]' : '' }}"></i>
|
||||||
|
<span>Summary Aktivitas</span>
|
||||||
|
</div>
|
||||||
|
<i id="summaryChevronDesktop" class="fa-solid fa-chevron-down text-[11px] transition-transform duration-200 {{ $isSummaryRoute ? 'rotate-180 text-[#1b5e20]' : 'text-slate-400 group-hover:text-slate-600' }}"></i>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<!-- Submenu Dropdown: Summary Timesheet LV & Summary P2H Unit Support (Tanpa Icon) -->
|
||||||
|
<div id="summarySubmenuDesktop" class="{{ $isSummaryRoute ? '' : 'hidden' }} mt-1 pl-7 pr-1 space-y-1">
|
||||||
@can('qma.summary.view')
|
@can('qma.summary.view')
|
||||||
<a href="{{ route('qma.activity.summary') }}"
|
<a href="{{ route('qma.activity.summary') }}"
|
||||||
class="flex items-center space-x-3 px-3.5 py-2.5 text-sm {{ request()->routeIs('qma.activity.summary') ? 'sidebar-item-active' : 'sidebar-item-inactive' }}">
|
class="block px-3.5 py-2 text-xs rounded-xl transition {{ request()->routeIs('qma.activity.summary') ? 'bg-[#1b5e20] text-white font-bold shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-slate-100 font-medium' }}">
|
||||||
<i class="fa-solid fa-chart-pie text-base w-5 text-center"></i>
|
<span>Summary Timesheet LV</span>
|
||||||
<span>Summary Aktivitas</span>
|
|
||||||
</a>
|
</a>
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
|
@if(auth()->user()->canAny(['qma.p2h.view', 'qma.vehicles.view']))
|
||||||
|
<a href="{{ route('qma.p2h.summary') }}"
|
||||||
|
class="block px-3.5 py-2 text-xs rounded-xl transition {{ request()->routeIs('qma.p2h.summary') ? 'bg-[#1b5e20] text-white font-bold shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-slate-100 font-medium' }}">
|
||||||
|
<span>Summary P2H Unit Support</span>
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@@ -657,9 +683,9 @@
|
|||||||
</a>
|
</a>
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
@if(auth()->user()->canAny(['qma.logs.view', 'qma.p2h.view']))
|
@can('qma.logs.view')
|
||||||
@php
|
@php
|
||||||
$isActivityRouteMob = request()->routeIs('qma.activity.log') || request()->routeIs('qma.activity.support_timesheet') || request()->routeIs('qma.p2h.index') || request()->routeIs('qma.p2h.show');
|
$isActivityRouteMob = request()->routeIs('qma.activity.log') || request()->routeIs('qma.activity.support_timesheet');
|
||||||
@endphp
|
@endphp
|
||||||
<div>
|
<div>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
@@ -673,7 +699,6 @@
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div id="activitySubmenuMobile" class="{{ $isActivityRouteMob ? '' : 'hidden' }} mt-1 pl-7 pr-1 space-y-1">
|
<div id="activitySubmenuMobile" class="{{ $isActivityRouteMob ? '' : 'hidden' }} mt-1 pl-7 pr-1 space-y-1">
|
||||||
@can('qma.logs.view')
|
|
||||||
<a href="{{ route('qma.activity.log') }}"
|
<a href="{{ route('qma.activity.log') }}"
|
||||||
class="block px-3.5 py-2 text-xs rounded-xl transition {{ request()->routeIs('qma.activity.log') ? 'bg-[#1b5e20] text-white font-bold shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-slate-100 font-medium' }}">
|
class="block px-3.5 py-2 text-xs rounded-xl transition {{ request()->routeIs('qma.activity.log') ? 'bg-[#1b5e20] text-white font-bold shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-slate-100 font-medium' }}">
|
||||||
<span>Timesheet LV</span>
|
<span>Timesheet LV</span>
|
||||||
@@ -683,17 +708,16 @@
|
|||||||
class="block px-3.5 py-2 text-xs rounded-xl transition {{ request()->routeIs('qma.activity.support_timesheet') ? 'bg-[#1b5e20] text-white font-bold shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-slate-100 font-medium' }}">
|
class="block px-3.5 py-2 text-xs rounded-xl transition {{ request()->routeIs('qma.activity.support_timesheet') ? 'bg-[#1b5e20] text-white font-bold shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-slate-100 font-medium' }}">
|
||||||
<span>History Timesheet Unit Support</span>
|
<span>History Timesheet Unit Support</span>
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
@can('qma.p2h.view')
|
@can('qma.p2h.view')
|
||||||
<a href="{{ route('qma.p2h.index') }}"
|
<a href="{{ route('qma.p2h.index') }}" class="flex items-center space-x-3 px-3 py-2.5 rounded-xl text-sm {{ request()->routeIs('qma.p2h.index') || request()->routeIs('qma.p2h.show') ? 'sidebar-item-active' : 'sidebar-item-inactive' }}">
|
||||||
class="block px-3.5 py-2 text-xs rounded-xl transition {{ request()->routeIs('qma.p2h.index') || request()->routeIs('qma.p2h.show') ? 'bg-[#1b5e20] text-white font-bold shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-slate-100 font-medium' }}">
|
<i class="fa-solid fa-clipboard-check w-5 text-center"></i>
|
||||||
<span>P2H Unit Support</span>
|
<span>P2H Unit Support</span>
|
||||||
</a>
|
</a>
|
||||||
@endcan
|
@endcan
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@can('qma.p2h.templates')
|
@can('qma.p2h.templates')
|
||||||
<a href="{{ route('qma.p2h.templates') }}" class="flex items-center space-x-3 px-3 py-2.5 rounded-xl text-sm {{ request()->routeIs('qma.p2h.templates*') ? 'sidebar-item-active' : 'sidebar-item-inactive' }}">
|
<a href="{{ route('qma.p2h.templates') }}" class="flex items-center space-x-3 px-3 py-2.5 rounded-xl text-sm {{ request()->routeIs('qma.p2h.templates*') ? 'sidebar-item-active' : 'sidebar-item-inactive' }}">
|
||||||
@@ -702,12 +726,38 @@
|
|||||||
</a>
|
</a>
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
@can('qma.summary.view')
|
@if(auth()->user()->canAny(['qma.summary.view', 'qma.p2h.view']))
|
||||||
<a href="{{ route('qma.activity.summary') }}" class="flex items-center space-x-3 px-3 py-2.5 rounded-xl text-sm {{ request()->routeIs('qma.activity.summary') ? 'sidebar-item-active' : 'sidebar-item-inactive' }}">
|
@php
|
||||||
<i class="fa-solid fa-chart-pie w-5 text-center"></i>
|
$isSummaryRouteMob = request()->routeIs('qma.activity.summary*') || request()->routeIs('qma.p2h.summary*');
|
||||||
|
@endphp
|
||||||
|
<div>
|
||||||
|
<button type="button"
|
||||||
|
onclick="toggleSummaryMenu('mobile')"
|
||||||
|
class="w-full flex items-center justify-between px-3 py-2.5 text-sm rounded-xl transition group {{ $isSummaryRouteMob ? 'bg-emerald-50/70 text-[#1b5e20] font-bold' : 'sidebar-item-inactive' }}">
|
||||||
|
<div class="flex items-center space-x-3">
|
||||||
|
<i class="fa-solid fa-chart-pie w-5 text-center {{ $isSummaryRouteMob ? 'text-[#1b5e20]' : '' }}"></i>
|
||||||
<span>Summary Aktivitas</span>
|
<span>Summary Aktivitas</span>
|
||||||
|
</div>
|
||||||
|
<i id="summaryChevronMobile" class="fa-solid fa-chevron-down text-[11px] transition-transform duration-200 {{ $isSummaryRouteMob ? 'rotate-180 text-[#1b5e20]' : 'text-slate-400 group-hover:text-slate-600' }}"></i>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="summarySubmenuMobile" class="{{ $isSummaryRouteMob ? '' : 'hidden' }} mt-1 pl-7 pr-1 space-y-1">
|
||||||
|
@can('qma.summary.view')
|
||||||
|
<a href="{{ route('qma.activity.summary') }}"
|
||||||
|
class="block px-3.5 py-2 text-xs rounded-xl transition {{ request()->routeIs('qma.activity.summary') ? 'bg-[#1b5e20] text-white font-bold shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-slate-100 font-medium' }}">
|
||||||
|
<span>Summary Timesheet LV</span>
|
||||||
</a>
|
</a>
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
|
@if(auth()->user()->canAny(['qma.p2h.view', 'qma.vehicles.view']))
|
||||||
|
<a href="{{ route('qma.p2h.summary') }}"
|
||||||
|
class="block px-3.5 py-2 text-xs rounded-xl transition {{ request()->routeIs('qma.p2h.summary') ? 'bg-[#1b5e20] text-white font-bold shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-slate-100 font-medium' }}">
|
||||||
|
<span>Summary P2H Unit Support</span>
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@@ -849,7 +899,7 @@
|
|||||||
@elseif(request()->routeIs('qma.p2h.*'))
|
@elseif(request()->routeIs('qma.p2h.*'))
|
||||||
P2H Unit Support
|
P2H Unit Support
|
||||||
@elseif(request()->routeIs('qma.activity.summary'))
|
@elseif(request()->routeIs('qma.activity.summary'))
|
||||||
Summary Aktivitas
|
Summary Timesheet LV
|
||||||
@elseif(request()->routeIs('profile.*'))
|
@elseif(request()->routeIs('profile.*'))
|
||||||
Profil Saya
|
Profil Saya
|
||||||
@elseif(request()->routeIs('pg.dashboard'))
|
@elseif(request()->routeIs('pg.dashboard'))
|
||||||
@@ -1221,6 +1271,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Toggle Dropdown Menu Summary Aktivitas (Desktop & Mobile)
|
||||||
|
function toggleSummaryMenu(target) {
|
||||||
|
const submenu = document.getElementById(target === 'desktop' ? 'summarySubmenuDesktop' : 'summarySubmenuMobile');
|
||||||
|
const chevron = document.getElementById(target === 'desktop' ? 'summaryChevronDesktop' : 'summaryChevronMobile');
|
||||||
|
if (submenu) {
|
||||||
|
submenu.classList.toggle('hidden');
|
||||||
|
}
|
||||||
|
if (chevron) {
|
||||||
|
chevron.classList.toggle('rotate-180');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Toggle Dropdown Menu Profil Pengguna di Pojok Kanan Atas
|
// Toggle Dropdown Menu Profil Pengguna di Pojok Kanan Atas
|
||||||
function toggleProfileDropdown() {
|
function toggleProfileDropdown() {
|
||||||
const dropdown = document.getElementById('userProfileDropdownMenu');
|
const dropdown = document.getElementById('userProfileDropdownMenu');
|
||||||
|
|||||||
@@ -327,14 +327,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modal Tambah Unit Baru (Sesuai Referensi Gambar media_1792028135493_30b2da2e.png) -->
|
<!-- Modal Tambah Unit Baru (Sesuai Referensi Gambar media_1792028135493_30b2da2e.png) -->
|
||||||
<div id="addUnitModal" class="fixed inset-0 z-50 hidden overflow-y-auto" aria-labelledby="modal-title" role="dialog" aria-modal="true">
|
<div id="addUnitModal" class="hidden fixed inset-0 z-50 overflow-y-auto" style="display: none;" aria-labelledby="modal-title" role="dialog" aria-modal="true">
|
||||||
<div class="flex items-center justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:block sm:p-0">
|
<div class="fixed inset-0 bg-slate-900/60 backdrop-blur-xs transition-opacity" aria-hidden="true" onclick="closeAddUnitModal()"></div>
|
||||||
<div class="fixed inset-0 transition-opacity bg-slate-900/60 backdrop-blur-xs" aria-hidden="true" onclick="closeAddUnitModal()"></div>
|
|
||||||
|
|
||||||
<span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span>
|
<div class="flex min-h-full items-center justify-center p-4">
|
||||||
|
<div class="relative z-10 w-full max-w-lg bg-white rounded-2xl text-left overflow-hidden shadow-2xl transform transition-all border border-slate-200 p-6">
|
||||||
<div class="inline-block align-bottom bg-white rounded-2xl text-left overflow-hidden shadow-2xl transform transition-all sm:my-8 sm:align-middle sm:max-w-md sm:w-full border border-slate-200">
|
|
||||||
<div class="p-6">
|
|
||||||
<!-- Judul Modal -->
|
<!-- Judul Modal -->
|
||||||
<h3 class="text-xl font-extrabold text-slate-900 tracking-tight mb-5" id="modal-title">
|
<h3 class="text-xl font-extrabold text-slate-900 tracking-tight mb-5" id="modal-title">
|
||||||
Tambah Unit Baru
|
Tambah Unit Baru
|
||||||
@@ -510,16 +507,13 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modal Edit Data Unit Fisik -->
|
<!-- Modal Edit Data Unit Fisik -->
|
||||||
<div id="editModal" class="fixed inset-0 z-50 hidden overflow-y-auto" role="dialog" aria-modal="true">
|
<div id="editModal" class="hidden fixed inset-0 z-50 overflow-y-auto" style="display: none;" role="dialog" aria-modal="true">
|
||||||
<div class="flex items-center justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:block sm:p-0">
|
<div class="fixed inset-0 bg-slate-900/60 backdrop-blur-xs transition-opacity" onclick="closeEditModal()"></div>
|
||||||
<div class="fixed inset-0 transition-opacity bg-slate-900/60 backdrop-blur-xs" onclick="closeEditModal()"></div>
|
<div class="flex min-h-full items-center justify-center p-4">
|
||||||
<span class="hidden sm:inline-block sm:align-middle sm:h-screen">​</span>
|
<div class="relative z-10 w-full max-w-lg bg-white rounded-2xl text-left overflow-hidden shadow-2xl transform transition-all border border-slate-200 p-6">
|
||||||
<div class="inline-block align-bottom bg-white rounded-2xl text-left overflow-hidden shadow-2xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full border border-slate-200">
|
|
||||||
<div class="p-6">
|
|
||||||
<h3 class="text-xl font-extrabold text-slate-900 tracking-tight mb-5">
|
<h3 class="text-xl font-extrabold text-slate-900 tracking-tight mb-5">
|
||||||
Edit Data Unit Fisik
|
Edit Data Unit Fisik
|
||||||
</h3>
|
</h3>
|
||||||
@@ -615,16 +609,13 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modal Detail Unit Fisik -->
|
<!-- Modal Detail Unit Fisik -->
|
||||||
<div id="detailModal" class="fixed inset-0 z-50 hidden overflow-y-auto" role="dialog" aria-modal="true">
|
<div id="detailModal" class="hidden fixed inset-0 z-50 overflow-y-auto" style="display: none;" role="dialog" aria-modal="true">
|
||||||
<div class="flex items-center justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:block sm:p-0">
|
<div class="fixed inset-0 bg-slate-900/60 backdrop-blur-xs transition-opacity" onclick="closeDetailModal()"></div>
|
||||||
<div class="fixed inset-0 transition-opacity bg-slate-900/60 backdrop-blur-xs" onclick="closeDetailModal()"></div>
|
<div class="flex min-h-full items-center justify-center p-4">
|
||||||
<span class="hidden sm:inline-block sm:align-middle sm:h-screen">​</span>
|
<div class="relative z-10 w-full max-w-md bg-white rounded-2xl text-left overflow-hidden shadow-2xl transform transition-all border border-slate-200 p-6">
|
||||||
<div class="inline-block align-bottom bg-white rounded-2xl text-left overflow-hidden shadow-2xl transform transition-all sm:my-8 sm:align-middle sm:max-w-md sm:w-full border border-slate-200">
|
|
||||||
<div class="p-6">
|
|
||||||
<div class="flex items-center justify-between pb-3 border-b border-slate-100">
|
<div class="flex items-center justify-between pb-3 border-b border-slate-100">
|
||||||
<div>
|
<div>
|
||||||
<span class="text-[10px] font-bold uppercase tracking-wider text-slate-400">DETAIL UNIT FISIK</span>
|
<span class="text-[10px] font-bold uppercase tracking-wider text-slate-400">DETAIL UNIT FISIK</span>
|
||||||
@@ -694,16 +685,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modal Hapus Unit Fisik -->
|
<!-- Modal Hapus Unit Fisik -->
|
||||||
<div id="deleteModal" class="fixed inset-0 z-50 hidden overflow-y-auto" role="dialog" aria-modal="true">
|
<div id="deleteModal" class="hidden fixed inset-0 z-50 overflow-y-auto" style="display: none;" role="dialog" aria-modal="true">
|
||||||
<div class="flex items-center justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:block sm:p-0">
|
<div class="fixed inset-0 bg-slate-900/60 backdrop-blur-xs transition-opacity" onclick="closeDeleteModal()"></div>
|
||||||
<div class="fixed inset-0 transition-opacity bg-slate-900/60 backdrop-blur-xs" onclick="closeDeleteModal()"></div>
|
<div class="flex min-h-full items-center justify-center p-4">
|
||||||
<span class="hidden sm:inline-block sm:align-middle sm:h-screen">​</span>
|
<div class="relative z-10 w-full max-w-sm bg-white rounded-2xl text-center overflow-hidden shadow-2xl transform transition-all border border-slate-200 p-6">
|
||||||
<div class="inline-block align-bottom bg-white rounded-2xl text-left overflow-hidden shadow-2xl transform transition-all sm:my-8 sm:align-middle sm:max-w-sm sm:w-full border border-slate-200">
|
|
||||||
<div class="p-6 text-center">
|
|
||||||
<div class="w-12 h-12 rounded-full bg-rose-100 text-rose-600 flex items-center justify-center mx-auto mb-4">
|
<div class="w-12 h-12 rounded-full bg-rose-100 text-rose-600 flex items-center justify-center mx-auto mb-4">
|
||||||
<i class="fa-solid fa-triangle-exclamation text-xl"></i>
|
<i class="fa-solid fa-triangle-exclamation text-xl"></i>
|
||||||
</div>
|
</div>
|
||||||
@@ -721,7 +709,6 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -746,7 +733,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openAddUnitModal() {
|
function openAddUnitModal() {
|
||||||
document.getElementById('addUnitModal').classList.remove('hidden');
|
const modal = document.getElementById('addUnitModal');
|
||||||
|
modal.classList.remove('hidden');
|
||||||
|
modal.style.display = 'block';
|
||||||
const addPhotoPreview = document.getElementById('addPhotoPreview');
|
const addPhotoPreview = document.getElementById('addPhotoPreview');
|
||||||
const addPhotoPlaceholder = document.getElementById('addPhotoPlaceholder');
|
const addPhotoPlaceholder = document.getElementById('addPhotoPlaceholder');
|
||||||
const addPhotoInput = document.getElementById('addPhotoInput');
|
const addPhotoInput = document.getElementById('addPhotoInput');
|
||||||
@@ -762,7 +751,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function closeAddUnitModal() {
|
function closeAddUnitModal() {
|
||||||
document.getElementById('addUnitModal').classList.add('hidden');
|
const modal = document.getElementById('addUnitModal');
|
||||||
|
modal.classList.add('hidden');
|
||||||
|
modal.style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Live preview kode lengkap
|
// Live preview kode lengkap
|
||||||
@@ -821,11 +812,15 @@
|
|||||||
if (editPhotoPlaceholder) editPhotoPlaceholder.classList.remove('hidden');
|
if (editPhotoPlaceholder) editPhotoPlaceholder.classList.remove('hidden');
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById('editModal').classList.remove('hidden');
|
const modal = document.getElementById('editModal');
|
||||||
|
modal.classList.remove('hidden');
|
||||||
|
modal.style.display = 'block';
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeEditModal() {
|
function closeEditModal() {
|
||||||
document.getElementById('editModal').classList.add('hidden');
|
const modal = document.getElementById('editModal');
|
||||||
|
modal.classList.add('hidden');
|
||||||
|
modal.style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
function openDetailModal(unit) {
|
function openDetailModal(unit) {
|
||||||
@@ -849,22 +844,30 @@
|
|||||||
if (detailPhotoContainer) detailPhotoContainer.classList.add('hidden');
|
if (detailPhotoContainer) detailPhotoContainer.classList.add('hidden');
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById('detailModal').classList.remove('hidden');
|
const modal = document.getElementById('detailModal');
|
||||||
|
modal.classList.remove('hidden');
|
||||||
|
modal.style.display = 'block';
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeDetailModal() {
|
function closeDetailModal() {
|
||||||
document.getElementById('detailModal').classList.add('hidden');
|
const modal = document.getElementById('detailModal');
|
||||||
|
modal.classList.add('hidden');
|
||||||
|
modal.style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
function openDeleteModal(id, code) {
|
function openDeleteModal(id, code) {
|
||||||
const form = document.getElementById('deleteForm');
|
const form = document.getElementById('deleteForm');
|
||||||
form.action = "{{ url('qma/vehicles') }}/" + id;
|
form.action = "{{ url('qma/vehicles') }}/" + id;
|
||||||
document.getElementById('deleteUnitCode').textContent = code;
|
document.getElementById('deleteUnitCode').textContent = code;
|
||||||
document.getElementById('deleteModal').classList.remove('hidden');
|
const modal = document.getElementById('deleteModal');
|
||||||
|
modal.classList.remove('hidden');
|
||||||
|
modal.style.display = 'block';
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeDeleteModal() {
|
function closeDeleteModal() {
|
||||||
document.getElementById('deleteModal').classList.add('hidden');
|
const modal = document.getElementById('deleteModal');
|
||||||
|
modal.classList.add('hidden');
|
||||||
|
modal.style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
// =========================================================================
|
// =========================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user