289 lines
10 KiB
PHP
289 lines
10 KiB
PHP
<!DOCTYPE html>
|
||
<html lang="ru">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>Панель управления</title>
|
||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||
<style>
|
||
:root {
|
||
--primary-color: #3b82f6;
|
||
--secondary-color: #64748b;
|
||
--success-color: #10b981;
|
||
--warning-color: #f59e0b;
|
||
--danger-color: #ef4444;
|
||
}
|
||
|
||
body {
|
||
font-family: 'Inter', sans-serif;
|
||
background-color: #f8fafc;
|
||
}
|
||
|
||
.dashboard-container {
|
||
max-width: 1400px;
|
||
margin: 2rem auto;
|
||
padding: 1rem;
|
||
}
|
||
|
||
.dashboard-header {
|
||
margin-bottom: 2.5rem;
|
||
text-align: center;
|
||
}
|
||
|
||
.stats-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
||
gap: 1.5rem;
|
||
margin-bottom: 3rem;
|
||
}
|
||
|
||
.stat-card {
|
||
background: white;
|
||
border-radius: 0.75rem;
|
||
padding: 1.5rem;
|
||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
||
transition: transform 0.2s;
|
||
position: relative;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.stat-card::before {
|
||
content: '';
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
width: 4px;
|
||
height: 100%;
|
||
}
|
||
|
||
.stat-card.students::before {
|
||
background-color: var(--primary-color);
|
||
}
|
||
|
||
.stat-card.groups::before {
|
||
background-color: var(--success-color);
|
||
}
|
||
|
||
.stat-card.directions::before {
|
||
background-color: var(--warning-color);
|
||
}
|
||
|
||
.stat-card.discipline::before {
|
||
background-color: var(--danger-color);
|
||
}
|
||
|
||
.stat-card.statements::before {
|
||
background-color: var(--color-amber-700);
|
||
}
|
||
|
||
.stat-value {
|
||
font-size: 2rem;
|
||
font-weight: 700;
|
||
margin-bottom: 0.5rem;
|
||
}
|
||
|
||
.stat-title {
|
||
color: var(--secondary-color);
|
||
font-size: 0.875rem;
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.05em;
|
||
}
|
||
|
||
.cards-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||
gap: 1.5rem;
|
||
}
|
||
|
||
.card {
|
||
background: white;
|
||
border-radius: 0.75rem;
|
||
padding: 1.75rem;
|
||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
||
transition: all 0.3s ease;
|
||
text-align: center;
|
||
cursor: pointer;
|
||
border: 1px solid #e2e8f0;
|
||
}
|
||
|
||
.card:hover {
|
||
transform: translateY(-5px);
|
||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
|
||
border-color: var(--primary-color);
|
||
}
|
||
|
||
.card-icon {
|
||
width: 64px;
|
||
height: 64px;
|
||
margin: 0 auto 1.25rem;
|
||
color: var(--primary-color);
|
||
transition: transform 0.3s;
|
||
}
|
||
|
||
.card:hover .card-icon {
|
||
transform: scale(1.1);
|
||
}
|
||
|
||
.card-title {
|
||
font-size: 1.25rem;
|
||
font-weight: 600;
|
||
margin-bottom: 0.5rem;
|
||
color: #1e293b;
|
||
}
|
||
|
||
.card-description {
|
||
color: var(--secondary-color);
|
||
font-size: 0.9375rem;
|
||
line-height: 1.5;
|
||
}
|
||
|
||
.logout-btn {
|
||
display: block;
|
||
margin: 3rem auto 0;
|
||
padding: 0.75rem 1.5rem;
|
||
background-color: var(--danger-color);
|
||
color: white;
|
||
border: none;
|
||
border-radius: 0.5rem;
|
||
font-weight: 600;
|
||
cursor: pointer;
|
||
transition: background-color 0.2s;
|
||
}
|
||
|
||
.logout-btn:hover {
|
||
background-color: #dc2626;
|
||
}
|
||
|
||
.section-title {
|
||
font-size: 1.5rem;
|
||
font-weight: 700;
|
||
margin-bottom: 1.5rem;
|
||
color: #1e293b;
|
||
position: relative;
|
||
padding-left: 1rem;
|
||
}
|
||
|
||
.section-title::before {
|
||
content: '';
|
||
position: absolute;
|
||
left: 0;
|
||
top: 0;
|
||
height: 100%;
|
||
width: 4px;
|
||
background-color: var(--primary-color);
|
||
border-radius: 2px;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body class="bg-gray-50">
|
||
<div class="dashboard-container">
|
||
<div class="dashboard-header">
|
||
<h1 class="text-4xl font-bold text-gray-800 mb-2">Панель управления</h1>
|
||
<p class="text-lg text-gray-600">Добро пожаловать, {{ $user['name'] }}!</p>
|
||
</div>
|
||
|
||
<div>
|
||
<h2 class="section-title">Статистика</h2>
|
||
<div class="stats-grid">
|
||
<div class="stat-card students">
|
||
<div class="stat-value">{{ number_format($stats['students_count'] ?? 0, 0, ',', ' ') }}</div>
|
||
<div class="stat-title">Студентов</div>
|
||
</div>
|
||
|
||
<div class="stat-card groups">
|
||
<div class="stat-value">{{ number_format($stats['groups_count'] ?? 0, 0, ',', ' ') }}</div>
|
||
<div class="stat-title">Учебных группы</div>
|
||
</div>
|
||
|
||
<div class="stat-card directions">
|
||
<div class="stat-value">{{ number_format($stats['directions_count'] ?? 0, 0, ',', ' ') }}</div>
|
||
<div class="stat-title">Направлений</div>
|
||
</div>
|
||
|
||
<div class="stat-card discipline">
|
||
<div class="stat-value">{{ number_format($stats['disciplines_count'] ?? 0, 0, ',', ' ') }}</div>
|
||
<div class="stat-title">Дисциплин</div>
|
||
</div>
|
||
|
||
<div class="stat-card statements">
|
||
<div class="stat-value">{{ number_format($stats['statements_count'] ?? 0, 0, ',', ' ') }}</div>
|
||
<div class="stat-title">Ведомостей</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div>
|
||
<h2 class="section-title">Быстрый доступ</h2>
|
||
<div class="cards-grid">
|
||
<a href="{{ route('students.index') }}" class="card">
|
||
<div class="card-icon">
|
||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z" />
|
||
</svg>
|
||
</div>
|
||
<h3 class="card-title">Студенты</h3>
|
||
<p class="card-description">Управление списком студентов</p>
|
||
</a>
|
||
|
||
<a href="{{ route('groups.index') }}" class="card">
|
||
<div class="card-icon">
|
||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" />
|
||
</svg>
|
||
</div>
|
||
<h3 class="card-title">Группы</h3>
|
||
<p class="card-description">Управление учебными группами</p>
|
||
</a>
|
||
|
||
<a href="{{ route('directions.index') }}" class="card">
|
||
<div class="card-icon">
|
||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6" />
|
||
</svg>
|
||
</div>
|
||
<h3 class="card-title">Направления</h3>
|
||
<p class="card-description">Управление направлениями подготовки</p>
|
||
</a>
|
||
|
||
<a href="{{ route('disciplines.index') }}" class="card">
|
||
<div class="card-icon">
|
||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
|
||
</svg>
|
||
</div>
|
||
<h3 class="card-title">Дисциплины</h3>
|
||
<p class="card-description">Управление учебными дисциплинами</p>
|
||
</a>
|
||
|
||
<a href="{{ route('statements.index') }}" class="card">
|
||
<div class="card-icon">
|
||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" />
|
||
</svg>
|
||
</div>
|
||
<h3 class="card-title">Ведомости</h3>
|
||
<p class="card-description">Работа с ведомостями</p>
|
||
</a>
|
||
|
||
<a href="{{ route('statistics.index') }}" class="card">
|
||
<div class="card-icon">
|
||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
|
||
</svg>
|
||
</div>
|
||
<h3 class="card-title">Аналитика</h3>
|
||
<p class="card-description">Подробная статистика и аналитические отчеты</p>
|
||
</a>
|
||
</div>
|
||
</div>
|
||
|
||
<form action="{{ route('logout') }}" method="POST">
|
||
@csrf
|
||
<button type="submit" class="logout-btn">
|
||
Выйти из системы
|
||
</button>
|
||
</form>
|
||
</div>
|
||
</body>
|
||
</html>
|