daftar guru removed
This commit is contained in:
parent
3b21f82135
commit
4f29a9ed24
|
|
@ -1,29 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers\Guru;
|
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
use App\Models\Guru;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
|
|
||||||
class GuruController extends Controller
|
|
||||||
{
|
|
||||||
public function index(Request $request)
|
|
||||||
{
|
|
||||||
$query = Guru::query();
|
|
||||||
|
|
||||||
// SEARCH
|
|
||||||
if ($request->has('search')) {
|
|
||||||
$search = $request->search;
|
|
||||||
$query->where('nama', 'like', "%$search%")
|
|
||||||
->orWhere('nip', 'like', "%$search%");
|
|
||||||
}
|
|
||||||
|
|
||||||
// SHOW PER PAGE
|
|
||||||
$perPage = $request->get('perPage', 10);
|
|
||||||
|
|
||||||
$gurus = $query->paginate($perPage)->appends($request->all());
|
|
||||||
|
|
||||||
return view('guru.guru.index', compact('gurus'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -34,6 +34,21 @@
|
||||||
.stat-card:nth-child(2) .stat-icon { background: rgba(34,197,94,0.15); }
|
.stat-card:nth-child(2) .stat-icon { background: rgba(34,197,94,0.15); }
|
||||||
.stat-card:nth-child(3) .stat-icon { background: rgba(249,115,22,0.15); }
|
.stat-card:nth-child(3) .stat-icon { background: rgba(249,115,22,0.15); }
|
||||||
|
|
||||||
|
.stat-link {
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 12px;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 700;
|
||||||
|
padding: 4px 12px;
|
||||||
|
border-radius: 99px;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: opacity 0.2s;
|
||||||
|
}
|
||||||
|
.stat-link:hover { opacity: 0.75; }
|
||||||
|
.stat-card:nth-child(1) .stat-link { background: rgba(43,142,243,0.15); color: #1d5fb8; }
|
||||||
|
.stat-card:nth-child(2) .stat-link { background: rgba(34,197,94,0.15); color: #15803d; }
|
||||||
|
.stat-card:nth-child(3) .stat-link { background: rgba(249,115,22,0.15); color: #c2651a; }
|
||||||
|
|
||||||
/* BOTTOM GRID */
|
/* BOTTOM GRID */
|
||||||
.dash-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; animation: fadeUp 0.4s ease 0.2s both; }
|
.dash-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; animation: fadeUp 0.4s ease 0.2s both; }
|
||||||
|
|
||||||
|
|
@ -91,16 +106,19 @@
|
||||||
<div class="stat-icon">🏫</div>
|
<div class="stat-icon">🏫</div>
|
||||||
<div class="stat-label">Kelas Diampu</div>
|
<div class="stat-label">Kelas Diampu</div>
|
||||||
<div class="stat-num">{{ $totalKelas }}</div>
|
<div class="stat-num">{{ $totalKelas }}</div>
|
||||||
|
<a href="{{ route('guru.kelas.index') }}" class="stat-link">Lihat Data →</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-card">
|
<div class="stat-card">
|
||||||
<div class="stat-icon">📚</div>
|
<div class="stat-icon">📚</div>
|
||||||
<div class="stat-label">Mata Pelajaran</div>
|
<div class="stat-label">Mata Pelajaran</div>
|
||||||
<div class="stat-num">{{ $totalMapel }}</div>
|
<div class="stat-num">{{ $totalMapel }}</div>
|
||||||
|
<a href="{{ route('guru.mapel.index') }}" class="stat-link">Lihat Data →</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-card">
|
<div class="stat-card">
|
||||||
<div class="stat-icon">👨🎓</div>
|
<div class="stat-icon">👨🎓</div>
|
||||||
<div class="stat-label">Siswa Diajar</div>
|
<div class="stat-label">Siswa Diajar</div>
|
||||||
<div class="stat-num">{{ $totalSiswa }}</div>
|
<div class="stat-num">{{ $totalSiswa }}</div>
|
||||||
|
<a href="{{ route('guru.siswa.index') }}" class="stat-link">Lihat Data →</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,125 +0,0 @@
|
||||||
@extends('guru.layouts.app')
|
|
||||||
|
|
||||||
@section('title', 'Daftar Guru')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.page-title {
|
|
||||||
font-size: 30px;
|
|
||||||
font-weight: 800;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
margin-top: -20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-card {
|
|
||||||
background: white;
|
|
||||||
border-radius: 20px;
|
|
||||||
border: 2px solid #e5e5e5;
|
|
||||||
padding: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-header {
|
|
||||||
background: #bae6fd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-box {
|
|
||||||
background: #bae6fd;
|
|
||||||
border-radius: 30px;
|
|
||||||
padding: 6px 15px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-box input {
|
|
||||||
border: none;
|
|
||||||
outline: none;
|
|
||||||
background: transparent;
|
|
||||||
width: 150px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.per-page-select {
|
|
||||||
border-radius: 10px;
|
|
||||||
padding: 5px;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.badge-info {
|
|
||||||
background: #e0f2fe;
|
|
||||||
color: #0369a1;
|
|
||||||
padding: 5px 12px;
|
|
||||||
border-radius: 8px;
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<h3 class="page-title">DAFTAR GURU</h3>
|
|
||||||
|
|
||||||
<div class="custom-card">
|
|
||||||
|
|
||||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
||||||
|
|
||||||
<div class="badge-info">
|
|
||||||
📖 Mode Hanya Lihat (Read Only)
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<form method="GET">
|
|
||||||
<div class="search-box">
|
|
||||||
<input type="text" name="search" placeholder="Cari" value="{{ request('search') }}">
|
|
||||||
<button style="border:none;background:none">
|
|
||||||
<img src="{{ asset('images/icon/main/search.png') }}" width="18">
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<form method="GET" class="mb-2">
|
|
||||||
<span>Tampilkan</span>
|
|
||||||
|
|
||||||
<select name="perPage" onchange="this.form.submit()" class="per-page-select">
|
|
||||||
<option value="10" {{ request('perPage') == 10 ? 'selected' : '' }}>10</option>
|
|
||||||
<option value="25" {{ request('perPage') == 25 ? 'selected' : '' }}>25</option>
|
|
||||||
<option value="50" {{ request('perPage') == 50 ? 'selected' : '' }}>50</option>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<span>data</span>
|
|
||||||
|
|
||||||
<input type="hidden" name="search" value="{{ request('search') }}">
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<table class="table text-center align-middle">
|
|
||||||
<thead class="table-header">
|
|
||||||
<tr>
|
|
||||||
<th>No</th>
|
|
||||||
<th>NIP</th>
|
|
||||||
<th>Nama Guru</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
@forelse($gurus as $index => $guru)
|
|
||||||
<tr>
|
|
||||||
<td>{{ $gurus->firstItem() + $index }}</td>
|
|
||||||
<td>{{ $guru->nip }}</td>
|
|
||||||
<td>{{ $guru->nama }}</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
@empty
|
|
||||||
<tr>
|
|
||||||
<td colspan="3">Belum ada data guru</td>
|
|
||||||
</tr>
|
|
||||||
@endforelse
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<div class="d-flex justify-content-end">
|
|
||||||
{{ $gurus->links() }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
<title>@yield('title', 'Panel Guru')</title>
|
<title>@yield('title', 'Dashboard Guru ')</title>
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
<style>
|
<style>
|
||||||
|
|
@ -109,9 +109,6 @@
|
||||||
<a href="{{ route('guru.dashboard') }}" class="sidebar-link {{ request()->routeIs('guru.dashboard') ? 'active' : '' }}">
|
<a href="{{ route('guru.dashboard') }}" class="sidebar-link {{ request()->routeIs('guru.dashboard') ? 'active' : '' }}">
|
||||||
<img src="{{ asset('images/icon/sidebar/home.png') }}" class="sidebar-icon"><span>Dashboard</span>
|
<img src="{{ asset('images/icon/sidebar/home.png') }}" class="sidebar-icon"><span>Dashboard</span>
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ route('guru.guru.index') }}" class="sidebar-link {{ request()->routeIs('guru.guru.*') ? 'active' : '' }}">
|
|
||||||
<img src="{{ asset('images/icon/sidebar/guru.png') }}" class="sidebar-icon"><span>Daftar Guru</span>
|
|
||||||
</a>
|
|
||||||
<a href="{{ route('guru.kelas.index') }}" class="sidebar-link {{ request()->routeIs('guru.kelas.*') ? 'active' : '' }}">
|
<a href="{{ route('guru.kelas.index') }}" class="sidebar-link {{ request()->routeIs('guru.kelas.*') ? 'active' : '' }}">
|
||||||
<img src="{{ asset('images/icon/sidebar/kelas.png') }}" class="sidebar-icon"><span>Daftar Kelas</span>
|
<img src="{{ asset('images/icon/sidebar/kelas.png') }}" class="sidebar-icon"><span>Daftar Kelas</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@
|
||||||
// GURU CONTROLLERS
|
// GURU CONTROLLERS
|
||||||
use App\Http\Controllers\Guru\LoginController as GuruLoginController;
|
use App\Http\Controllers\Guru\LoginController as GuruLoginController;
|
||||||
use App\Http\Controllers\Guru\DashboardController as GuruDashboardController;
|
use App\Http\Controllers\Guru\DashboardController as GuruDashboardController;
|
||||||
use App\Http\Controllers\Guru\GuruController as GuruGuruController;
|
|
||||||
use App\Http\Controllers\Guru\KelasController as GuruKelasController;
|
use App\Http\Controllers\Guru\KelasController as GuruKelasController;
|
||||||
use App\Http\Controllers\Guru\SiswaController as GuruSiswaController;
|
use App\Http\Controllers\Guru\SiswaController as GuruSiswaController;
|
||||||
use App\Http\Controllers\Guru\ProfileController as GuruProfileController;
|
use App\Http\Controllers\Guru\ProfileController as GuruProfileController;
|
||||||
|
|
@ -133,10 +132,7 @@
|
||||||
Route::middleware(['auth:guru'])->prefix('guru')->name('guru.')->group(function () {
|
Route::middleware(['auth:guru'])->prefix('guru')->name('guru.')->group(function () {
|
||||||
|
|
||||||
Route::get('/dashboard', [GuruDashboardController::class, 'index'])->name('dashboard');
|
Route::get('/dashboard', [GuruDashboardController::class, 'index'])->name('dashboard');
|
||||||
|
|
||||||
// Daftar Guru (Read Only)
|
|
||||||
Route::get('/daftar-guru', [GuruGuruController::class, 'index'])->name('guru.index');
|
|
||||||
|
|
||||||
// Daftar Kelas (Read Only)
|
// Daftar Kelas (Read Only)
|
||||||
Route::get('/daftar-kelas', [GuruKelasController::class, 'index'])->name('kelas.index');
|
Route::get('/daftar-kelas', [GuruKelasController::class, 'index'])->name('kelas.index');
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue