Initial commit: Aplikasi Ketertiban Siswa

- Fitur: input pelanggaran, sistem poin, surat peringatan otomatis, SP progress
- Realtime notifikasi via Laravel Reverb + Echo
- Dashboard statistik, manajemen user, manajemen master data
- Login 2 kolom premium, user dropdown, pengaturan akun
- Tema biru kalem, logo sekolah dinamis, sidebar brand dinamis
- Sinkronisasi siswa dari Database Kesiswaan via API
This commit is contained in:
Bro
2026-07-21 22:43:13 +07:00
commit 1c35734f7b
116 changed files with 19664 additions and 0 deletions
+130
View File
@@ -0,0 +1,130 @@
@extends('layouts.app')
@section('title', 'Pengaturan Akun')
@section('content')
<div>
<div class="mb-6">
<nav class="flex items-center space-x-2 text-sm text-gray-400 mb-2">
<span class="text-gray-700 font-medium">Pengaturan Akun</span>
</nav>
<h1 class="text-2xl font-bold text-gray-900 tracking-tight">Pengaturan Akun</h1>
<p class="text-sm text-gray-500 mt-1">Ubah nama pengguna dan kata sandi</p>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
{{-- Profile Info Sidebar --}}
<div class="lg:col-span-1">
<div class="bg-white rounded-2xl shadow-sm border border-gray-200 p-6 text-center">
<div class="w-20 h-20 rounded-2xl bg-gradient-to-br from-blue-500 to-sky-400 flex items-center justify-center text-white text-3xl font-bold shadow-sm mx-auto mb-4">
{{ strtoupper(substr($user->name, 0, 1)) }}
</div>
<h2 class="text-lg font-semibold text-gray-900">{{ $user->name }}</h2>
<p class="text-sm text-gray-400 capitalize">{{ $user->role }}</p>
<div class="mt-4 pt-4 border-t border-gray-100">
<div class="text-left space-y-3">
<div>
<p class="text-[10px] font-semibold text-gray-400 uppercase tracking-widest">Username</p>
<p class="text-sm font-medium text-gray-900 mt-0.5">{{ $user->username }}</p>
</div>
<div>
<p class="text-[10px] font-semibold text-gray-400 uppercase tracking-widest">Email</p>
<p class="text-sm text-gray-700 mt-0.5">{{ $user->email ?? '—' }}</p>
</div>
<div>
<p class="text-[10px] font-semibold text-gray-400 uppercase tracking-widest">Bergabung</p>
<p class="text-sm text-gray-700 mt-0.5">{{ $user->created_at->format('d M Y') }}</p>
</div>
</div>
</div>
</div>
</div>
{{-- Form --}}
<div class="lg:col-span-2">
<form method="POST" action="{{ route('profile.update') }}" class="bg-white rounded-2xl shadow-sm border border-gray-200">
@csrf
{{-- Ubah Profil --}}
<div class="px-6 py-4 border-b border-gray-100">
<div class="flex items-center gap-2.5">
<div class="w-8 h-8 rounded-lg bg-blue-50 flex items-center justify-center">
<svg class="w-4 h-4 text-blue-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/>
</svg>
</div>
<h3 class="text-base font-semibold text-gray-900">Informasi Profil</h3>
</div>
</div>
<div class="p-6 space-y-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1.5">Nama Lengkap</label>
<input type="text" name="name" value="{{ old('name', $user->name) }}" required
class="w-full px-4 py-2.5 border border-gray-300 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition">
@error('name') <p class="text-xs text-red-500 mt-1">{{ $message }}</p> @enderror
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1.5">Username</label>
<input type="text" name="username" value="{{ old('username', $user->username) }}" required
class="w-full px-4 py-2.5 border border-gray-300 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition">
@error('username') <p class="text-xs text-red-500 mt-1">{{ $message }}</p> @enderror
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1.5">Email</label>
<input type="email" name="email" value="{{ old('email', $user->email) }}"
class="w-full px-4 py-2.5 border border-gray-300 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition">
@error('email') <p class="text-xs text-red-500 mt-1">{{ $message }}</p> @enderror
</div>
</div>
{{-- Ubah Password --}}
<div class="px-6 py-4 border-t border-gray-100 border-b border-gray-100">
<div class="flex items-center gap-2.5">
<div class="w-8 h-8 rounded-lg bg-blue-50 flex items-center justify-center">
<svg class="w-4 h-4 text-blue-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"/>
</svg>
</div>
<div>
<h3 class="text-base font-semibold text-gray-900">Ganti Kata Sandi</h3>
<p class="text-xs text-gray-400">Kosongkan jika tidak ingin mengubah</p>
</div>
</div>
</div>
<div class="p-6 space-y-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1.5">Kata Sandi Saat Ini</label>
<input type="password" name="current_password"
class="w-full px-4 py-2.5 border border-gray-300 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition">
@error('current_password') <p class="text-xs text-red-500 mt-1">{{ $message }}</p> @enderror
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1.5">Kata Sandi Baru</label>
<input type="password" name="password"
class="w-full px-4 py-2.5 border border-gray-300 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition">
@error('password') <p class="text-xs text-red-500 mt-1">{{ $message }}</p> @enderror
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1.5">Konfirmasi Kata Sandi</label>
<input type="password" name="password_confirmation"
class="w-full px-4 py-2.5 border border-gray-300 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition">
</div>
</div>
</div>
{{-- Submit --}}
<div class="px-6 py-4 border-t border-gray-100 bg-gray-50/50 rounded-b-2xl flex items-center justify-end">
<button type="submit"
class="px-6 py-2.5 text-sm font-medium text-white bg-blue-600 rounded-xl hover:bg-blue-700 transition shadow-sm flex items-center gap-2">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/>
</svg>
Simpan Perubahan
</button>
</div>
</form>
</div>
</div>
</div>
@endsection