Полный редизайн на KT AI + выгрузка CSV с BOM
This commit is contained in:
parent
aef73850ae
commit
7cadd1632d
220
index.html
220
index.html
@ -1,129 +1,151 @@
|
||||
<!doctype html>
|
||||
<html lang="ru">
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru" data-theme="auto">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Журнал выдачи спецодежды</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Журнал выдачи спецодежды</title>
|
||||
<link rel="stylesheet" href="design-system/kt-ai-fonts.css">
|
||||
<link rel="stylesheet" href="design-system/kt-ai-tokens.css">
|
||||
<link rel="stylesheet" href="design-system/kt-ai-components.css">
|
||||
<link rel="stylesheet" href="design-system/kt-ai-page.css">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body class="bg-gray-50 min-h-screen">
|
||||
<div class="container mx-auto px-4 py-8 max-w-7xl">
|
||||
<!-- Заголовок -->
|
||||
<header class="mb-8">
|
||||
<h1 class="text-3xl font-bold text-gray-800 mb-2">📦 Журнал выдачи спецодежды</h1>
|
||||
<p class="text-gray-600">Учёт выдачи средств индивидуальной защиты сотрудникам</p>
|
||||
</header>
|
||||
<body>
|
||||
|
||||
<!-- Счётчики -->
|
||||
<div class="grid grid-cols-2 md:grid-cols-5 gap-4 mb-6">
|
||||
<div class="bg-white rounded-xl shadow-sm p-4 border border-gray-200">
|
||||
<div class="text-sm text-gray-500 mb-1">Всего</div>
|
||||
<div class="text-2xl font-bold text-gray-800" id="count-total">0</div>
|
||||
<header class="kt-ai-pagehead">
|
||||
<div class="kt-ai-wrap kt-ai-pagehead-in">
|
||||
<strong>📦 Журнал выдачи спецодежды</strong>
|
||||
<span class="kt-ai-spacer"></span>
|
||||
<button class="kt-ai-btn" data-variant="ghost" onclick="exportToExcel()">📊 Скачать в Excel</button>
|
||||
<button class="kt-ai-btn" data-variant="primary" onclick="openModal()">+ Добавить выдачу</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section class="kt-ai-hero" data-align="center" style="padding-top: var(--kt-ai-space-6); padding-bottom: var(--kt-ai-space-6);">
|
||||
<div class="kt-ai-wrap">
|
||||
<p class="kt-ai-hero-sub">Учёт выдачи средств индивидуальной защиты сотрудникам</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Счётчики -->
|
||||
<section class="kt-ai-section" style="padding-top: 0; padding-bottom: var(--kt-ai-space-6);">
|
||||
<div class="kt-ai-wrap" data-width="wide">
|
||||
<div class="stats-grid">
|
||||
<div class="stat-card">
|
||||
<div class="stat-label">Всего</div>
|
||||
<div class="stat-value" id="count-total">0</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-xl shadow-sm p-4 border border-gray-200">
|
||||
<div class="text-sm text-gray-500 mb-1">В носке</div>
|
||||
<div class="text-2xl font-bold text-blue-600" id="count-worn">0</div>
|
||||
<div class="stat-card stat-blue">
|
||||
<div class="stat-label">В носке</div>
|
||||
<div class="stat-value" id="count-worn">0</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-xl shadow-sm p-4 border border-gray-200">
|
||||
<div class="text-sm text-gray-500 mb-1">Сдано</div>
|
||||
<div class="text-2xl font-bold text-green-600" id="count-returned">0</div>
|
||||
<div class="stat-card stat-green">
|
||||
<div class="stat-label">Сдано</div>
|
||||
<div class="stat-value" id="count-returned">0</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-xl shadow-sm p-4 border border-gray-200">
|
||||
<div class="text-sm text-gray-500 mb-1">Просрочено</div>
|
||||
<div class="text-2xl font-bold text-red-600" id="count-overdue">0</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-xl shadow-sm p-4 border border-gray-200 flex items-center justify-center">
|
||||
<button onclick="openModal()" class="w-full h-full flex items-center justify-center gap-2 text-blue-600 font-semibold hover:bg-blue-50 rounded-lg transition-colors">
|
||||
<span class="text-xl">+</span> Добавить выдачу
|
||||
</button>
|
||||
<div class="stat-card stat-red">
|
||||
<div class="stat-label">Просрочено</div>
|
||||
<div class="stat-value" id="count-overdue">0</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Поиск и фильтры -->
|
||||
<div class="bg-white rounded-xl shadow-sm p-4 mb-6 border border-gray-200">
|
||||
<div class="flex flex-col md:flex-row gap-4">
|
||||
<div class="flex-1">
|
||||
<input
|
||||
type="text"
|
||||
id="search"
|
||||
placeholder="🔍 Поиск по ФИО или наименованию..."
|
||||
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
||||
oninput="renderTable()"
|
||||
>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2" id="filters">
|
||||
<!-- Фильтры генерируются JS -->
|
||||
</div>
|
||||
<button onclick="exportToExcel()" class="px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700 transition-colors font-medium whitespace-nowrap">
|
||||
📊 Скачать в Excel
|
||||
</button>
|
||||
<!-- Поиск и фильтры -->
|
||||
<section class="kt-ai-section" style="padding-top: 0; padding-bottom: var(--kt-ai-space-6);">
|
||||
<div class="kt-ai-wrap" data-width="wide">
|
||||
<div class="search-filters-row">
|
||||
<input
|
||||
type="text"
|
||||
id="search"
|
||||
placeholder="🔍 Поиск по ФИО или наименованию..."
|
||||
class="kt-ai-input search-input"
|
||||
oninput="renderTable()"
|
||||
>
|
||||
<div class="filters-container" id="filters">
|
||||
<!-- Фильтры генерируются JS -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Таблица -->
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden mb-6">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full">
|
||||
<thead class="bg-gray-50">
|
||||
<!-- Таблица -->
|
||||
<section class="kt-ai-section" style="padding-top: 0; padding-bottom: var(--kt-ai-space-8);">
|
||||
<div class="kt-ai-wrap" data-width="wide">
|
||||
<div class="kt-ai-card table-container">
|
||||
<div class="table-scroll">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">№</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">ФИО сотрудника</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">Наименование</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">Дата выдачи</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">Дата возврата</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">Статус</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">Действия</th>
|
||||
<th class="col-num">№</th>
|
||||
<th class="col-fio">ФИО сотрудника</th>
|
||||
<th class="col-item">Наименование</th>
|
||||
<th class="col-date">Дата выдачи</th>
|
||||
<th class="col-date">Дата возврата</th>
|
||||
<th class="col-status">Статус</th>
|
||||
<th class="col-actions">Действия</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="table-body" class="divide-y divide-gray-200">
|
||||
<tbody id="table-body">
|
||||
<!-- Строки генерируются JS -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Журнал изменений -->
|
||||
<div class="bg-white rounded-xl shadow-sm p-6 border border-gray-200">
|
||||
<h2 class="text-xl font-bold text-gray-800 mb-4">📋 Журнал изменений</h2>
|
||||
<div id="log-container" class="space-y-2 max-h-64 overflow-y-auto">
|
||||
<!-- Журнал изменений -->
|
||||
<section class="kt-ai-section" data-divider="true">
|
||||
<div class="kt-ai-wrap" data-width="wide">
|
||||
<div class="kt-ai-section-head">
|
||||
<h2>📋 Журнал изменений</h2>
|
||||
<p>История всех операций с записями</p>
|
||||
</div>
|
||||
<div class="kt-ai-card">
|
||||
<div id="log-container" class="log-container">
|
||||
<!-- Логи генерируются JS -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Модальное окно -->
|
||||
<div id="modal" class="fixed inset-0 bg-black bg-opacity-50 hidden items-center justify-center z-50">
|
||||
<div class="bg-white rounded-xl shadow-2xl p-6 w-full max-w-md mx-4">
|
||||
<h2 class="text-2xl font-bold text-gray-800 mb-4" id="modal-title">Новая выдача</h2>
|
||||
<form id="form" onsubmit="saveItem(event)">
|
||||
<input type="hidden" id="edit-id">
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1">ФИО сотрудника *</label>
|
||||
<input type="text" id="form-fio" required class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Иванов И.И.">
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1">Наименование спецодежды *</label>
|
||||
<input type="text" id="form-item" required class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Каска защитная">
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1">Дата выдачи *</label>
|
||||
<input type="date" id="form-issue-date" required class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1">Плановая дата возврата *</label>
|
||||
<input type="date" id="form-return-date" required class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex gap-3 mt-6">
|
||||
<button type="submit" class="flex-1 bg-blue-600 text-white py-2 px-4 rounded-lg hover:bg-blue-700 transition-colors font-medium">Сохранить</button>
|
||||
<button type="button" onclick="closeModal()" class="flex-1 bg-gray-200 text-gray-700 py-2 px-4 rounded-lg hover:bg-gray-300 transition-colors font-medium">Отмена</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<footer class="kt-ai-wrap kt-ai-pagefoot">
|
||||
<span>© 2026 Журнал выдачи спецодежды</span>
|
||||
<span class="kt-ai-spacer"></span>
|
||||
<span>Локальное хранилище браузера</span>
|
||||
</footer>
|
||||
|
||||
<!-- Модальное окно -->
|
||||
<div id="modal" class="modal-overlay hidden">
|
||||
<div class="modal-content">
|
||||
<h2 class="text-2xl font-bold mb-6" id="modal-title">Новая выдача</h2>
|
||||
<form id="form" onsubmit="saveItem(event)">
|
||||
<input type="hidden" id="edit-id">
|
||||
<div class="kt-ai-field">
|
||||
<label class="kt-ai-field-label">ФИО сотрудника *</label>
|
||||
<input type="text" id="form-fio" required class="kt-ai-input" placeholder="Иванов И.И.">
|
||||
</div>
|
||||
<div class="kt-ai-field">
|
||||
<label class="kt-ai-field-label">Наименование спецодежды *</label>
|
||||
<input type="text" id="form-item" required class="kt-ai-input" placeholder="Каска защитная">
|
||||
</div>
|
||||
<div class="kt-ai-field">
|
||||
<label class="kt-ai-field-label">Дата выдачи *</label>
|
||||
<input type="date" id="form-issue-date" required class="kt-ai-input">
|
||||
</div>
|
||||
<div class="kt-ai-field">
|
||||
<label class="kt-ai-field-label">Плановая дата возврата *</label>
|
||||
<input type="date" id="form-return-date" required class="kt-ai-input">
|
||||
</div>
|
||||
<div class="modal-actions">
|
||||
<button type="submit" class="kt-ai-btn" data-variant="primary" data-size="lg">Сохранить</button>
|
||||
<button type="button" onclick="closeModal()" class="kt-ai-btn" data-variant="ghost" data-size="lg">Отмена</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="script.js"></script>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
34
script.js
34
script.js
@ -94,11 +94,9 @@ function renderTable() {
|
||||
if (filtered.length === 0) {
|
||||
tbody.innerHTML = `
|
||||
<tr>
|
||||
<td colspan="7" class="px-4 py-12 text-center text-gray-500">
|
||||
<div class="empty-state">
|
||||
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg>
|
||||
<p>Нет записей для отображения</p>
|
||||
</div>
|
||||
<td colspan="7" class="empty-state">
|
||||
<div class="empty-state-icon">📋</div>
|
||||
<p>Нет записей для отображения</p>
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
@ -109,18 +107,18 @@ function renderTable() {
|
||||
tbody.innerHTML = filtered.map((item, idx) => {
|
||||
const isOverdue = item.status === "Просрочено";
|
||||
return `
|
||||
<tr class="${isOverdue ? "row-overdue" : "hover:bg-gray-50"} transition-colors">
|
||||
<td class="px-4 py-3 text-sm text-gray-700">${idx + 1}</td>
|
||||
<td class="px-4 py-3 text-sm font-medium text-gray-800">${escapeHtml(item.fio)}</td>
|
||||
<td class="px-4 py-3 text-sm text-gray-700">${escapeHtml(item.item)}</td>
|
||||
<td class="px-4 py-3 text-sm text-gray-600">${formatDate(item.issueDate)}</td>
|
||||
<td class="px-4 py-3 text-sm text-gray-600">${formatDate(item.returnDate)}</td>
|
||||
<td class="px-4 py-3">
|
||||
<tr class="${isOverdue ? "row-overdue" : ""}">
|
||||
<td class="col-num">${idx + 1}</td>
|
||||
<td class="col-fio">${escapeHtml(item.fio)}</td>
|
||||
<td class="col-item">${escapeHtml(item.item)}</td>
|
||||
<td class="col-date">${formatDate(item.issueDate)}</td>
|
||||
<td class="col-date">${formatDate(item.returnDate)}</td>
|
||||
<td class="col-status">
|
||||
<span class="status-badge ${getStatusClass(item.status)}">${item.status}</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-sm">
|
||||
<button onclick="editItem(${item.id})" class="text-blue-600 hover:text-blue-800 mr-3 font-medium">✏️ Изменить</button>
|
||||
<button onclick="deleteItem(${item.id})" class="text-red-600 hover:text-red-800 font-medium">🗑️ Удалить</button>
|
||||
<td class="col-actions">
|
||||
<button class="action-btn edit" onclick="editItem(${item.id})">✏️ Изменить</button>
|
||||
<button class="action-btn delete" onclick="deleteItem(${item.id})">🗑️ Удалить</button>
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
@ -169,7 +167,7 @@ function updateCounts() {
|
||||
|
||||
// Модальное окно
|
||||
function openModal(isEdit = false) {
|
||||
document.getElementById("modal").style.display = "flex";
|
||||
document.getElementById("modal").classList.remove("hidden");
|
||||
document.getElementById("modal-title").textContent = isEdit ? "Редактирование выдачи" : "Новая выдача";
|
||||
|
||||
if (!isEdit) {
|
||||
@ -181,7 +179,7 @@ function openModal(isEdit = false) {
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
document.getElementById("modal").style.display = "none";
|
||||
document.getElementById("modal").classList.add("hidden");
|
||||
}
|
||||
|
||||
// Сохранение (добавление/редактирование)
|
||||
@ -280,7 +278,7 @@ function renderLog() {
|
||||
const dateStr = date.toLocaleDateString("ru-RU") + " " + date.toLocaleTimeString("ru-RU", { hour: "2-digit", minute: "2-digit" });
|
||||
return `
|
||||
<div class="log-entry ${log.type}">
|
||||
<span class="font-medium text-gray-700">${log.message}</span>
|
||||
<span class="font-medium">${log.message}</span>
|
||||
<span class="text-gray-500 text-xs ml-2">(${dateStr})</span>
|
||||
</div>
|
||||
`;
|
||||
|
||||
327
style.css
327
style.css
@ -1,16 +1,167 @@
|
||||
/* Кастомные стили поверх Tailwind */
|
||||
/* Дополнительные стили поверх KT AI дизайн-системы */
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
/* Сетка счётчиков */
|
||||
.stats-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: var(--kt-ai-space-4);
|
||||
}
|
||||
|
||||
/* Статусы в таблице */
|
||||
@media (min-width: 768px) {
|
||||
.stats-grid {
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
.stat-card {
|
||||
background: var(--kt-ai-card-bg);
|
||||
border: 1px solid var(--kt-ai-card-border);
|
||||
border-radius: var(--kt-ai-radius-xl);
|
||||
padding: var(--kt-ai-space-5);
|
||||
text-align: center;
|
||||
transition: transform 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.stat-card:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: var(--kt-ai-text-sm);
|
||||
color: var(--kt-ai-fg-muted);
|
||||
margin-bottom: var(--kt-ai-space-2);
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
font-size: var(--kt-ai-text-3xl);
|
||||
font-weight: var(--kt-ai-weight-bold);
|
||||
color: var(--kt-ai-fg);
|
||||
}
|
||||
|
||||
.stat-blue .stat-value { color: var(--kt-ai-primary); }
|
||||
.stat-green .stat-value { color: #16a34a; }
|
||||
.stat-red .stat-value { color: var(--kt-ai-danger); }
|
||||
|
||||
/* Поиск и фильтры */
|
||||
.search-filters-row {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--kt-ai-space-4);
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.search-filters-row {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.search-input {
|
||||
flex: 1;
|
||||
min-width: 280px;
|
||||
}
|
||||
|
||||
.filters-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--kt-ai-space-2);
|
||||
}
|
||||
|
||||
/* Фильтры-чипсы */
|
||||
.filter-chip {
|
||||
padding: var(--kt-ai-space-2) var(--kt-ai-space-4);
|
||||
border-radius: var(--kt-ai-radius-full);
|
||||
font-size: var(--kt-ai-text-sm);
|
||||
font-weight: var(--kt-ai-weight-medium);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
border: 2px solid var(--kt-ai-border);
|
||||
background: var(--kt-ai-card-bg);
|
||||
color: var(--kt-ai-fg-muted);
|
||||
}
|
||||
|
||||
.filter-chip:hover {
|
||||
border-color: var(--kt-ai-primary);
|
||||
color: var(--kt-ai-primary);
|
||||
}
|
||||
|
||||
.filter-chip.active {
|
||||
background: var(--kt-ai-primary);
|
||||
border-color: var(--kt-ai-primary);
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* Таблица */
|
||||
.table-container {
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.table-scroll {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.data-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.data-table thead {
|
||||
background: var(--kt-ai-bg-soft);
|
||||
border-bottom: 2px solid var(--kt-ai-border);
|
||||
}
|
||||
|
||||
.data-table th {
|
||||
padding: var(--kt-ai-space-3) var(--kt-ai-space-4);
|
||||
text-align: left;
|
||||
font-size: var(--kt-ai-text-xs);
|
||||
font-weight: var(--kt-ai-weight-semibold);
|
||||
color: var(--kt-ai-fg-muted);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.data-table td {
|
||||
padding: var(--kt-ai-space-3) var(--kt-ai-space-4);
|
||||
border-bottom: 1px solid var(--kt-ai-border);
|
||||
font-size: var(--kt-ai-text-sm);
|
||||
color: var(--kt-ai-fg);
|
||||
}
|
||||
|
||||
.data-table tbody tr {
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
.data-table tbody tr:hover {
|
||||
background: var(--kt-ai-bg-soft);
|
||||
}
|
||||
|
||||
/* Просроченные строки */
|
||||
.row-overdue {
|
||||
background-color: #fef2f2 !important;
|
||||
border-left: 4px solid var(--kt-ai-danger);
|
||||
}
|
||||
|
||||
.row-overdue:hover {
|
||||
background-color: #fee2e2 !important;
|
||||
}
|
||||
|
||||
.col-num { width: 50px; }
|
||||
.col-fio { min-width: 180px; }
|
||||
.col-item { min-width: 200px; }
|
||||
.col-date { width: 120px; white-space: nowrap; }
|
||||
.col-status { width: 120px; }
|
||||
.col-actions { width: 180px; }
|
||||
|
||||
/* Статусы */
|
||||
.status-badge {
|
||||
display: inline-block;
|
||||
padding: 4px 12px;
|
||||
border-radius: 9999px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
padding: var(--kt-ai-space-1) var(--kt-ai-space-3);
|
||||
border-radius: var(--kt-ai-radius-full);
|
||||
font-size: var(--kt-ai-text-xs);
|
||||
font-weight: var(--kt-ai-weight-semibold);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
@ -30,80 +181,51 @@ body {
|
||||
color: #991b1b;
|
||||
}
|
||||
|
||||
/* Подсветка просроченных строк */
|
||||
.row-overdue {
|
||||
background-color: #fef2f2 !important;
|
||||
border-left: 4px solid #ef4444;
|
||||
}
|
||||
|
||||
.row-overdue:hover {
|
||||
background-color: #fee2e2 !important;
|
||||
}
|
||||
|
||||
/* Фильтры-чипсы */
|
||||
.filter-chip {
|
||||
padding: 6px 16px;
|
||||
border-radius: 9999px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
/* Кнопки действий */
|
||||
.action-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
border: 2px solid #e5e7eb;
|
||||
background: white;
|
||||
color: #6b7280;
|
||||
padding: var(--kt-ai-space-1) var(--kt-ai-space-2);
|
||||
border-radius: var(--kt-ai-radius-md);
|
||||
font-size: var(--kt-ai-text-sm);
|
||||
font-weight: var(--kt-ai-weight-medium);
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
.filter-chip:hover {
|
||||
border-color: #3b82f6;
|
||||
color: #3b82f6;
|
||||
.action-btn.edit {
|
||||
color: var(--kt-ai-primary);
|
||||
}
|
||||
|
||||
.filter-chip.active {
|
||||
background: #3b82f6;
|
||||
border-color: #3b82f6;
|
||||
color: white;
|
||||
.action-btn.edit:hover {
|
||||
background: #eff6ff;
|
||||
}
|
||||
|
||||
/* Анимации */
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; transform: translateY(-10px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
.action-btn.delete {
|
||||
color: var(--kt-ai-danger);
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
animation: fadeIn 0.2s ease-out;
|
||||
.action-btn.delete:hover {
|
||||
background: #fef2f2;
|
||||
}
|
||||
|
||||
/* Скроллбар для журнала */
|
||||
#log-container::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
/* Журнал изменений */
|
||||
.log-container {
|
||||
max-height: 400px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
#log-container::-webkit-scrollbar-track {
|
||||
background: #f1f1f1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#log-container::-webkit-scrollbar-thumb {
|
||||
background: #c1c1c1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#log-container::-webkit-scrollbar-thumb:hover {
|
||||
background: #a1a1a1;
|
||||
}
|
||||
|
||||
/* Лог записи */
|
||||
.log-entry {
|
||||
padding: 8px 12px;
|
||||
background: #f9fafb;
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
border-left: 3px solid #6b7280;
|
||||
padding: var(--kt-ai-space-2) var(--kt-ai-space-3);
|
||||
background: var(--kt-ai-bg-soft);
|
||||
border-radius: var(--kt-ai-radius-md);
|
||||
font-size: var(--kt-ai-text-sm);
|
||||
margin-bottom: var(--kt-ai-space-2);
|
||||
border-left: 3px solid var(--kt-ai-border);
|
||||
}
|
||||
|
||||
.log-entry.delete {
|
||||
border-left-color: #ef4444;
|
||||
border-left-color: var(--kt-ai-danger);
|
||||
background: #fef2f2;
|
||||
}
|
||||
|
||||
@ -113,20 +235,81 @@ body {
|
||||
}
|
||||
|
||||
.log-entry.edit {
|
||||
border-left-color: #3b82f6;
|
||||
border-left-color: var(--kt-ai-primary);
|
||||
background: #eff6ff;
|
||||
}
|
||||
|
||||
/* Модальное окно */
|
||||
.modal-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 1000;
|
||||
padding: var(--kt-ai-space-4);
|
||||
}
|
||||
|
||||
.modal-overlay.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background: var(--kt-ai-card-bg);
|
||||
border: 1px solid var(--kt-ai-card-border);
|
||||
border-radius: var(--kt-ai-radius-2xl);
|
||||
padding: var(--kt-ai-space-6);
|
||||
width: 100%;
|
||||
max-width: 480px;
|
||||
max-height: 90vh;
|
||||
overflow-y: auto;
|
||||
animation: modalFadeIn 0.2s ease-out;
|
||||
}
|
||||
|
||||
@keyframes modalFadeIn {
|
||||
from { opacity: 0; transform: translateY(-10px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
.modal-actions {
|
||||
display: flex;
|
||||
gap: var(--kt-ai-space-3);
|
||||
margin-top: var(--kt-ai-space-6);
|
||||
}
|
||||
|
||||
.modal-actions .kt-ai-btn {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* Пустое состояние */
|
||||
.empty-state {
|
||||
text-align: center;
|
||||
padding: 48px 24px;
|
||||
color: #9ca3af;
|
||||
padding: var(--kt-ai-space-12) var(--kt-ai-space-6);
|
||||
color: var(--kt-ai-fg-faint);
|
||||
}
|
||||
|
||||
.empty-state svg {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
margin-bottom: 16px;
|
||||
.empty-state-icon {
|
||||
font-size: 64px;
|
||||
opacity: 0.5;
|
||||
margin-bottom: var(--kt-ai-space-4);
|
||||
}
|
||||
|
||||
/* Скроллбар для журнала */
|
||||
.log-container::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
|
||||
.log-container::-webkit-scrollbar-track {
|
||||
background: var(--kt-ai-bg-soft);
|
||||
border-radius: var(--kt-ai-radius-md);
|
||||
}
|
||||
|
||||
.log-container::-webkit-scrollbar-thumb {
|
||||
background: var(--kt-ai-border);
|
||||
border-radius: var(--kt-ai-radius-md);
|
||||
}
|
||||
|
||||
.log-container::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--kt-ai-fg-muted);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user