feat: move reset filter to top-right corner of filter card in qma activity log
This commit is contained in:
@@ -36,6 +36,12 @@
|
||||
<span class="text-slate-800 font-bold text-xs uppercase tracking-wider">
|
||||
Filter & Pencarian Log
|
||||
</span>
|
||||
@if(request()->anyFilled(['search', 'start_date', 'end_date', 'gate_id', 'direction', 'status']))
|
||||
<a href="{{ route('qma.activity.log') }}" class="text-xs text-rose-600 hover:text-rose-700 font-semibold flex items-center space-x-1 transition">
|
||||
<i class="fa-solid fa-rotate-left text-[11px]"></i>
|
||||
<span>Reset Filter</span>
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Baris Input Filter (Grid Responsif 12 Kolom) -->
|
||||
@@ -117,15 +123,6 @@
|
||||
<option value="pending" {{ request('status') === 'pending' ? 'selected' : '' }}>Menunggu PG</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Tombol Reset (Hanya tampil jika filter digunakan) -->
|
||||
@if(request()->anyFilled(['search', 'start_date', 'end_date', 'gate_id', 'direction', 'status']))
|
||||
<div class="flex items-center space-x-2 justify-end">
|
||||
<a href="{{ route('qma.activity.log') }}" class="px-4 py-2 rounded-xl text-xs font-semibold text-slate-600 bg-slate-100 hover:bg-slate-200 border border-slate-200 transition">
|
||||
<span>Reset</span>
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -190,17 +190,17 @@ class VehicleActivityTest extends TestCase
|
||||
// 1. Unfiltered request should NOT see Reset button
|
||||
$response = $this->actingAs($qmaAdmin)->get('/qma/activity-log');
|
||||
$response->assertStatus(200);
|
||||
$response->assertDontSee('<span>Reset</span>', false);
|
||||
$response->assertDontSee('<span>Reset Filter</span>', false);
|
||||
|
||||
// 2. Request with empty filter params should NOT see Reset button
|
||||
$responseEmpty = $this->actingAs($qmaAdmin)->get('/qma/activity-log?search=&direction=&gate_id=');
|
||||
$responseEmpty->assertStatus(200);
|
||||
$responseEmpty->assertDontSee('<span>Reset</span>', false);
|
||||
$responseEmpty->assertDontSee('<span>Reset Filter</span>', false);
|
||||
|
||||
// 3. Request with active filter should see Reset button
|
||||
$responseFiltered = $this->actingAs($qmaAdmin)->get('/qma/activity-log?direction=in');
|
||||
$responseFiltered->assertStatus(200);
|
||||
$responseFiltered->assertSee('<span>Reset</span>', false);
|
||||
$responseFiltered->assertSee('<span>Reset Filter</span>', false);
|
||||
}
|
||||
|
||||
public function test_admin_pg_can_store_security_guard_and_creates_login_account(): void
|
||||
|
||||
Reference in New Issue
Block a user