beta 2.3
This commit is contained in:
@@ -28,6 +28,7 @@ def updateUsersBirthdate() -> bool:
|
||||
continue
|
||||
userDict = {
|
||||
"id": int(user["id"]),
|
||||
"enabled": user["status"] == "active",
|
||||
"name": f"{user['surname']} {user['name']} {user['secondName']}",
|
||||
"short_name": f"{user['surname']} {user['name'][:1]}. {user['secondName'][:1]}.",
|
||||
"sex": user["sex"],
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/* Таблица сотрудников */
|
||||
.table-responsive {
|
||||
max-height: 600px;
|
||||
max-height: 800px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ function renderUsersTable() {
|
||||
`;
|
||||
return;
|
||||
}
|
||||
document.getElementById('usersCount').textContent = usersData.length;
|
||||
|
||||
// Сортируем по дате рождения (месяц и день)
|
||||
usersData.sort((a, b) => {
|
||||
@@ -85,7 +86,8 @@ function renderUsersTable() {
|
||||
const fullDate = birthdate.toLocaleDateString('ru-RU');
|
||||
|
||||
// Форматируем месяц и день (двузначные)
|
||||
const monthStr = month.toString().padStart(2, '0');
|
||||
const monthNames = ['января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря'];
|
||||
const monthStr = monthNames[month - 1];
|
||||
const dayStr = day.toString().padStart(2, '0');
|
||||
|
||||
// Определяем пол
|
||||
@@ -119,7 +121,7 @@ function renderUsersTable() {
|
||||
<tr class="${isSelected}" onclick="selectUser(${user.id})" data-user-id="${user.id}">
|
||||
<td>
|
||||
<div class="birthdate-cell">
|
||||
<span class="month-day">${monthStr}.${dayStr}</span>
|
||||
<span class="month-day">${dayStr} ${monthStr}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
@@ -132,10 +134,7 @@ function renderUsersTable() {
|
||||
</td>
|
||||
<td>${sexBadge}</td>
|
||||
<td>${specialtiesHtml}</td>
|
||||
<td class="text-center">${enabledStatus}</td>
|
||||
<td class="text-center">
|
||||
<div class="icon-group">${dataStatus}</div>
|
||||
</td>
|
||||
<td class="text-center">${enabledStatus} ${dataStatus}</td>
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<div class="col-lg-7">
|
||||
<div class="card h-100">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h5 class="mb-0"><i class="bi bi-people-fill me-2"></i>Сотрудники</h5>
|
||||
<h5 class="mb-0"><i class="bi bi-people-fill me-2"></i>Сотрудники (<span id="usersCount">0</span>)</h5>
|
||||
<button type="button" class="btn btn-sm btn-outline-primary" onclick="refreshUsersList()">
|
||||
<i class="bi bi-arrow-clockwise me-1"></i>Обновить список
|
||||
</button>
|
||||
@@ -41,7 +41,6 @@
|
||||
<th>Пол</th>
|
||||
<th>Специальности</th>
|
||||
<th width="100" class="text-center">Статус</th>
|
||||
<th width="80" class="text-center">Данные</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="usersTableBody">
|
||||
@@ -61,13 +60,13 @@
|
||||
<div class="row g-2">
|
||||
<div class="col-md-6">
|
||||
<button type="button" class="btn btn-sm btn-outline-success w-100" onclick="enableAllUsers()">
|
||||
<i class="bi bi-check-circle me-1"></i>Включить всех
|
||||
<i class="bi bi-check-circle me-1"></i>Поздравлять всех
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary w-100"
|
||||
onclick="disableAllUsers()">
|
||||
<i class="bi bi-x-circle me-1"></i>Отключить всех
|
||||
<i class="bi bi-x-circle me-1"></i>Не поздравлять никого
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user