- Replace emoji icons with Lucide across admin pages; add vendor/lucide.min.js and renderIcons() helper\n- Reorder sidebar logically (Dashboard, Journal, Students, Groups, Files, Links, Trash + admin sections)\n- Groups: open photo chronology only via the Фото button; covers no longer clickable\n- Journal: show group badge over card photo, compact AI-status icon beside description, and date range in empty-state message\n- Update README (AI worker, Lucide, worker.js)
148 lines
4.1 KiB
HTML
148 lines
4.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<title>Филиалы — Админ-панель</title>
|
|
<link rel="stylesheet" href="admin.css">
|
|
</head>
|
|
<body data-page="branches">
|
|
<div class="layout">
|
|
<div class="sidebar" id="sidebar"></div>
|
|
<div class="main">
|
|
<div class="page-head">
|
|
<h2>Филиалы</h2>
|
|
<p class="page-sub">Управление филиалами и привязка групп</p>
|
|
</div>
|
|
|
|
<div class="actions-row" style="margin-bottom:16px">
|
|
<button class="btn-primary" id="addBranchBtn" type="button">
|
|
<span style="font-size:1.2rem">+</span> Добавить филиал
|
|
</button>
|
|
</div>
|
|
|
|
<div class="branches-grid" id="branchesGrid">
|
|
<div class="empty">Загрузка…</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Branch Modal -->
|
|
<div class="modal-overlay" id="branchModal">
|
|
<div class="edit-modal" style="max-width:480px">
|
|
<h3 id="branchModalTitle">Создать филиал</h3>
|
|
<form id="branchForm" class="settings-stack" style="gap:12px">
|
|
<input type="hidden" name="id" id="branchId">
|
|
<div class="settings-row">
|
|
<div class="settings-field" style="flex:1">
|
|
<label>Название <span style="color:#ef4444">*</span></label>
|
|
<input type="text" name="name" class="settings-input" required placeholder="Например: Центральный офис" autocomplete="off">
|
|
</div>
|
|
</div>
|
|
<div class="settings-row">
|
|
<div class="settings-field" style="flex:1">
|
|
<label>Адрес</label>
|
|
<input type="text" name="address" class="settings-input" placeholder="Улица, дом, офис">
|
|
</div>
|
|
</div>
|
|
<div class="settings-row">
|
|
<div class="settings-field" style="flex:1">
|
|
<label>Телефон</label>
|
|
<input type="text" name="phone" class="settings-input" placeholder="+7 (XXX) XXX-XX-XX">
|
|
</div>
|
|
</div>
|
|
<div class="card-foot" style="justify-content:flex-end;gap:8px">
|
|
<button type="button" class="btn-primary ghost" id="branchCancelBtn">Отмена</button>
|
|
<button type="submit" class="btn-primary" id="branchSubmitBtn">Создать</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-overlay" id="imgModal">
|
|
<img id="imgModalSrc" alt="">
|
|
</div>
|
|
<div class="toast" id="toast"></div>
|
|
<script src="vendor/lucide.min.js"></script>
|
|
<script src="admin.js"></script>
|
|
<script src="js/branches.js"></script>
|
|
<style>
|
|
.branches-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
gap: 12px;
|
|
}
|
|
.branch-card {
|
|
background: var(--card);
|
|
border: 1px solid var(--border);
|
|
border-radius: 12px;
|
|
padding: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
transition: box-shadow .15s, border-color .15s;
|
|
}
|
|
.branch-card:hover {
|
|
box-shadow: 0 4px 16px rgba(0,0,0,.08);
|
|
border-color: var(--accent);
|
|
}
|
|
.branch-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
}
|
|
.branch-name {
|
|
font-weight: 600;
|
|
font-size: .95rem;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
.branch-badge {
|
|
font-size: .7rem;
|
|
font-weight: 600;
|
|
color: var(--accent);
|
|
background: rgba(37,99,235,.1);
|
|
padding: 2px 8px;
|
|
border-radius: 999px;
|
|
white-space: nowrap;
|
|
flex-shrink: 0;
|
|
}
|
|
.branch-meta {
|
|
font-size: .78rem;
|
|
color: var(--muted);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
.branch-actions {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 6px;
|
|
margin-top: 4px;
|
|
}
|
|
.branch-actions button {
|
|
background: none;
|
|
border: none;
|
|
color: var(--muted);
|
|
cursor: pointer;
|
|
font-size: 1rem;
|
|
padding: 6px 8px;
|
|
border-radius: 6px;
|
|
transition: background .15s, color .15s;
|
|
}
|
|
.branch-actions button:hover {
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
}
|
|
.branch-actions .branch-delete:hover {
|
|
color: #ef4444;
|
|
background: rgba(239,68,68,.1);
|
|
}
|
|
@media (max-width: 640px) {
|
|
.branches-grid { grid-template-columns: 1fr; }
|
|
}
|
|
</style>
|
|
</body>
|
|
</html> |