fix(qma): remove non-existent is_active column on employees and separate support timesheet into standalone menu

This commit is contained in:
Ray1111-aa
2026-10-20 21:14:34 +07:00
parent 0cd02a17cd
commit 26e614c407
3 changed files with 19 additions and 15 deletions
@@ -133,8 +133,7 @@ class SupportTimesheetController extends Controller
->orderBy('code') ->orderBy('code')
->get(); ->get();
$operators = Employee::where('is_active', true) $operators = Employee::orderBy('name')
->orderBy('name')
->get(['id', 'nik', 'name', 'position', 'is_operator']); ->get(['id', 'nik', 'name', 'position', 'is_operator']);
$shifts = self::SHIFTS; $shifts = self::SHIFTS;
+18 -12
View File
@@ -314,9 +314,17 @@
</a> </a>
@endcan @endcan
@can('qma.logs.view')
<a href="{{ route('qma.support_timesheet.index') }}"
class="flex items-center space-x-3 px-3.5 py-2.5 text-sm {{ request()->routeIs('qma.support_timesheet.*') ? 'sidebar-item-active' : 'sidebar-item-inactive' }}">
<i class="fa-solid fa-stopwatch text-base w-5 text-center"></i>
<span>Timesheet Unit Support</span>
</a>
@endcan
@if(auth()->user()->canAny(['qma.logs.view', 'qma.p2h.view'])) @if(auth()->user()->canAny(['qma.logs.view', 'qma.p2h.view']))
@php @php
$isActivityRoute = request()->routeIs('qma.activity.log') || request()->routeIs('qma.support_timesheet.*') || request()->routeIs('qma.p2h.index') || request()->routeIs('qma.p2h.show'); $isActivityRoute = request()->routeIs('qma.activity.log') || request()->routeIs('qma.p2h.index') || request()->routeIs('qma.p2h.show');
@endphp @endphp
<!-- Dropdown Menu: Log Aktifitas --> <!-- Dropdown Menu: Log Aktifitas -->
<div> <div>
@@ -337,11 +345,6 @@
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>
</a> </a>
<a href="{{ route('qma.support_timesheet.index') }}"
class="block px-3.5 py-2 text-xs rounded-xl transition {{ request()->routeIs('qma.support_timesheet.*') ? 'bg-[#1b5e20] text-white font-bold shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-slate-100 font-medium' }}">
<span>Timesheet Unit Support</span>
</a>
@endcan @endcan
@can('qma.p2h.view') @can('qma.p2h.view')
@@ -641,9 +644,17 @@
</a> </a>
@endcan @endcan
@can('qma.logs.view')
<a href="{{ route('qma.support_timesheet.index') }}"
class="flex items-center space-x-3 px-3 py-2.5 rounded-xl text-sm {{ request()->routeIs('qma.support_timesheet.*') ? 'sidebar-item-active' : 'sidebar-item-inactive' }}">
<i class="fa-solid fa-stopwatch w-5 text-center"></i>
<span>Timesheet Unit Support</span>
</a>
@endcan
@if(auth()->user()->canAny(['qma.logs.view', 'qma.p2h.view'])) @if(auth()->user()->canAny(['qma.logs.view', 'qma.p2h.view']))
@php @php
$isActivityRouteMob = request()->routeIs('qma.activity.log') || request()->routeIs('qma.support_timesheet.*') || request()->routeIs('qma.p2h.index') || request()->routeIs('qma.p2h.show'); $isActivityRouteMob = request()->routeIs('qma.activity.log') || request()->routeIs('qma.p2h.index') || request()->routeIs('qma.p2h.show');
@endphp @endphp
<div> <div>
<button type="button" <button type="button"
@@ -662,11 +673,6 @@
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>
</a> </a>
<a href="{{ route('qma.support_timesheet.index') }}"
class="block px-3.5 py-2 text-xs rounded-xl transition {{ request()->routeIs('qma.support_timesheet.*') ? 'bg-[#1b5e20] text-white font-bold shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-slate-100 font-medium' }}">
<span>Timesheet Unit Support</span>
</a>
@endcan @endcan
@can('qma.p2h.view') @can('qma.p2h.view')
@@ -61,7 +61,6 @@ class QmaSupportTimesheetTest extends TestCase
'department' => 'Civil Construction', 'department' => 'Civil Construction',
'is_operator' => true, 'is_operator' => true,
'is_driver' => true, 'is_driver' => true,
'is_active' => true,
]); ]);
} }