feat(qma): add history timesheet unit support submenu in log aktifitas

This commit is contained in:
Ray1111-aa
2026-10-20 21:28:59 +07:00
parent 26e614c407
commit d4b919b54c
4 changed files with 34 additions and 9 deletions
+15 -3
View File
@@ -324,7 +324,7 @@
@if(auth()->user()->canAny(['qma.logs.view', 'qma.p2h.view']))
@php
$isActivityRoute = request()->routeIs('qma.activity.log') || request()->routeIs('qma.p2h.index') || request()->routeIs('qma.p2h.show');
$isActivityRoute = request()->routeIs('qma.activity.log') || request()->routeIs('qma.activity.support_timesheet') || request()->routeIs('qma.p2h.index') || request()->routeIs('qma.p2h.show');
@endphp
<!-- Dropdown Menu: Log Aktifitas -->
<div>
@@ -338,13 +338,18 @@
<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>
<!-- Submenu Dropdown: Timesheet LV & P2H Unit Support (Tanpa Icon) -->
<!-- Submenu Dropdown: Timesheet LV, History Timesheet Unit Support & P2H Unit Support (Tanpa Icon) -->
<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') }}"
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>
</a>
<a href="{{ route('qma.activity.support_timesheet') }}"
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>
</a>
@endcan
@can('qma.p2h.view')
@@ -654,7 +659,7 @@
@if(auth()->user()->canAny(['qma.logs.view', 'qma.p2h.view']))
@php
$isActivityRouteMob = request()->routeIs('qma.activity.log') || request()->routeIs('qma.p2h.index') || request()->routeIs('qma.p2h.show');
$isActivityRouteMob = request()->routeIs('qma.activity.log') || request()->routeIs('qma.activity.support_timesheet') || request()->routeIs('qma.p2h.index') || request()->routeIs('qma.p2h.show');
@endphp
<div>
<button type="button"
@@ -673,6 +678,11 @@
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>
</a>
<a href="{{ route('qma.activity.support_timesheet') }}"
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>
</a>
@endcan
@can('qma.p2h.view')
@@ -828,6 +838,8 @@
Manajemen Unit
@elseif(request()->routeIs('qma.activity.log'))
Timesheet LV
@elseif(request()->routeIs('qma.activity.support_timesheet'))
History Timesheet Unit Support
@elseif(request()->routeIs('qma.support_timesheet.*'))
Timesheet Unit Support
@elseif(request()->routeIs('qma.p2h.summary'))
@@ -1,6 +1,6 @@
@extends('layouts.app')
@section('title', 'Timesheet Unit Support - Admin QMA | PT Kerinci Merangin Hidro')
@section('title', (request()->routeIs('qma.activity.support_timesheet') ? 'History Timesheet Unit Support' : 'Timesheet Unit Support') . ' - Admin QMA | PT Kerinci Merangin Hidro')
@section('content')
<div class="w-full space-y-6">
@@ -14,11 +14,11 @@
</span>
<span class="text-slate-300">&bull;</span>
<span class="text-xs font-semibold text-slate-500">
Log Aktifitas
{{ request()->routeIs('qma.activity.support_timesheet') ? 'Log Aktifitas' : 'Operasional Unit' }}
</span>
</div>
<h2 class="text-2xl sm:text-3xl font-extrabold text-slate-900 tracking-tight">
Timesheet Unit Support
{{ request()->routeIs('qma.activity.support_timesheet') ? 'History Timesheet Unit Support' : 'Timesheet Unit Support' }}
</h2>
<p class="text-xs sm:text-sm text-slate-500 mt-0.5">
Pencatatan jam kerja (HM/KM), penugasan operator, utilisasi shift, serta pemakaian solar alat berat.
@@ -127,7 +127,7 @@
<!-- Filter & Pencarian -->
<div class="bg-white p-4 rounded-2xl border border-slate-200/80 shadow-xs space-y-3.5">
<form method="GET" action="{{ route('qma.support_timesheet.index') }}" class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-6 gap-2.5 items-center">
<form method="GET" action="{{ url()->current() }}" class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-6 gap-2.5 items-center">
<!-- Tanggal Mulai -->
<div>
@@ -194,7 +194,7 @@
</button>
@if(request()->anyFilled(['start_date', 'end_date', 'vehicle_id', 'operator_id', 'shift', 'status', 'search']))
<a href="{{ route('qma.support_timesheet.index') }}" class="px-3 py-2 rounded-xl text-xs font-semibold text-rose-600 bg-rose-50 border border-rose-200 hover:bg-rose-100 transition whitespace-nowrap" title="Reset Semua Filter">
<a href="{{ url()->current() }}" class="px-3 py-2 rounded-xl text-xs font-semibold text-rose-600 bg-rose-50 border border-rose-200 hover:bg-rose-100 transition whitespace-nowrap" title="Reset Semua Filter">
<i class="fa-solid fa-rotate-left"></i>
</a>
@endif
@@ -394,7 +394,7 @@
<p class="text-xs text-slate-400 mt-1">Gunakan tombol "Catat Timesheet" di atas untuk menambahkan laporan harian.</p>
@if(request()->anyFilled(['start_date', 'end_date', 'vehicle_id', 'shift', 'search']))
<div class="mt-4">
<a href="{{ route('qma.support_timesheet.index') }}" class="inline-flex items-center space-x-1.5 px-3.5 py-2 rounded-xl text-xs font-semibold text-rose-600 bg-rose-50 border border-rose-200 hover:bg-rose-100 transition cursor-pointer">
<a href="{{ url()->current() }}" class="inline-flex items-center space-x-1.5 px-3.5 py-2 rounded-xl text-xs font-semibold text-rose-600 bg-rose-50 border border-rose-200 hover:bg-rose-100 transition cursor-pointer">
<i class="fa-solid fa-rotate-left text-[11px]"></i>
<span>Reset Filter</span>
</a>