diff --git a/app.db b/app.db index fca998c..b30ed58 100644 Binary files a/app.db and b/app.db differ diff --git a/medods_handler.py b/medods_handler.py index f95764d..5dbbc52 100644 --- a/medods_handler.py +++ b/medods_handler.py @@ -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"], diff --git a/static/css/birthdate.css b/static/css/birthdate.css index 098b800..eed018f 100644 --- a/static/css/birthdate.css +++ b/static/css/birthdate.css @@ -27,7 +27,7 @@ /* Таблица сотрудников */ .table-responsive { - max-height: 600px; + max-height: 800px; overflow-y: auto; } diff --git a/static/js/birthdate.js b/static/js/birthdate.js index 568651a..3925f19 100644 --- a/static/js/birthdate.js +++ b/static/js/birthdate.js @@ -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() {
- ${monthStr}.${dayStr} + ${dayStr} ${monthStr}
@@ -132,10 +134,7 @@ function renderUsersTable() { ${sexBadge} ${specialtiesHtml} - ${enabledStatus} - -
${dataStatus}
- + ${enabledStatus} ${dataStatus} `; }); diff --git a/templates/birthdate.html b/templates/birthdate.html index ac4746e..6fa7905 100644 --- a/templates/birthdate.html +++ b/templates/birthdate.html @@ -23,7 +23,7 @@
-
Сотрудники
+
Сотрудники (0)
@@ -41,7 +41,6 @@ Пол Специальности Статус - Данные @@ -61,13 +60,13 @@