Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
febddada12 | ||
|
|
0bbf82004b | ||
|
|
520c1df4f3 |
No files matched your search
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## 2.4.3
|
||||
|
||||
- В справочнике и XLSX колонка с числом пройденных курсов называется «ДПО» и занимает меньше места.
|
||||
|
||||
## 2.4.2
|
||||
|
||||
- Подтверждённые курсы ДПО остаются в карточке и редакторе после обновления профиля. Изменившиеся сведения источника доступны для сверки.
|
||||
|
||||
@@ -41,7 +41,7 @@ DIRECTORY_COLUMNS = (
|
||||
("last_seen_at", "Последний раз найден", "last_seen_display"),
|
||||
("dismissed_at", "Дата увольнения", "dismissed_display"),
|
||||
("profile", "Профиль", "canonical_url"),
|
||||
("dpo_count", "Количество ДПО", "dpo_count"),
|
||||
("dpo_count", "ДПО", "dpo_count"),
|
||||
)
|
||||
|
||||
_TRAINING_LABEL = "повышение квалификации"
|
||||
|
||||
@@ -19,7 +19,7 @@ def directory_xlsx(employees: list[dict]) -> bytes:
|
||||
(employee[key] or "Без имени") if key == "full_name" else employee[key]
|
||||
for _, _, key in DIRECTORY_COLUMNS
|
||||
])
|
||||
for cell, width in zip(sheet[1], (34, 20, 48, 14, 28, 22, 34, 30, 14, 10, 10, 22, 24, 22, 46, 18)):
|
||||
for cell, width in zip(sheet[1], (34, 20, 48, 14, 28, 22, 34, 30, 14, 10, 10, 22, 24, 22, 46, 10)):
|
||||
cell.font = Font(bold=True)
|
||||
sheet.column_dimensions[get_column_letter(cell.column)].width = width
|
||||
sheet.freeze_panes = "A2"
|
||||
|
||||
@@ -796,6 +796,11 @@
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.directory-table [data-column="dpo_count"] {
|
||||
width: 4rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.directory-table .badge {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,3 +1,3 @@
|
||||
APP_VERSION = "2.4.2"
|
||||
FRONTEND_VERSION = "2.4.2"
|
||||
BACKEND_VERSION = "2.4.2"
|
||||
APP_VERSION = "2.4.3"
|
||||
FRONTEND_VERSION = "2.4.3"
|
||||
BACKEND_VERSION = "2.4.3"
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "miem-workers"
|
||||
version = "2.4.2"
|
||||
version = "2.4.3"
|
||||
description = "MIEM employees parser, admin API, and web admin"
|
||||
requires-python = ">=3.11"
|
||||
dependencies = [
|
||||
|
||||
+12
-1
@@ -22,7 +22,7 @@ def test_health_returns_versions():
|
||||
response = TestClient(app).get("/api/health")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert response.json()["backend_version"] == "2.4.2"
|
||||
assert response.json()["backend_version"] == "2.4.3"
|
||||
|
||||
|
||||
def test_api_employees_and_stats_require_admin_session():
|
||||
@@ -168,6 +168,10 @@ def test_directory_export_uses_applied_filters_and_sort_across_pages(db_session)
|
||||
status="dismissed" if number == 28 else "active",
|
||||
current_data={
|
||||
"hse_start_year": 2025 - number,
|
||||
"sections": [
|
||||
{"type": "courses_by_year", "courses": [{"title": "Физика"}]},
|
||||
{"type": "additional_education", "education_format": 2, "items": ["Курс А", "Курс Б"]},
|
||||
],
|
||||
"positions": ["Инженер" if number == 29 else "Кафедра физики"],
|
||||
"contacts": {"address": "=1+1", "phones": ["+7 123"]},
|
||||
},
|
||||
@@ -202,6 +206,13 @@ def test_directory_export_uses_applied_filters_and_sort_across_pages(db_session)
|
||||
assert [cell.value for cell in sheet[1]] == [
|
||||
cell.get_text(strip=True) for cell in page.select(".directory-table th")
|
||||
]
|
||||
assert page.select_one('th[data-column="dpo_count"]').get_text(strip=True) == "ДПО"
|
||||
assert page.select_one('td[data-column="dpo_count"]').get_text(strip=True) == "2"
|
||||
columns = {cell.value: cell for cell in sheet[1]}
|
||||
dpo = columns["ДПО"]
|
||||
assert sheet.cell(2, dpo.column).value == 2
|
||||
assert sheet.cell(2, columns["Преподаваемые курсы"].column).value == 1
|
||||
assert sheet.column_dimensions[dpo.column_letter].width == 10
|
||||
assert sheet.max_column == 16
|
||||
assert [cell.value for cell in sheet["A"][1:]] == [f"Export {number:02d}" for number in range(28)]
|
||||
assert [cell.value for cell in sheet["A"][-3:]] == [
|
||||
|
||||
@@ -230,7 +230,7 @@ def test_public_page_data_minimization_and_safe_links(db_session, export):
|
||||
assert "javascript:" not in fragment.text and "private@example.org" not in fragment.text
|
||||
assert "javascript:" not in response.text and "private@example.org" not in response.text
|
||||
assert "/admin/employees/" not in response.text and "/admin/logout" not in response.text
|
||||
assert "Backend 2.4.2 · Frontend 2.4.2" in response.text
|
||||
assert "Backend 2.4.3 · Frontend 2.4.3" in response.text
|
||||
assert "Вход в систему" in response.text
|
||||
assert client.get("/admin/directory", follow_redirects=False).status_code in (302, 303, 401, 403)
|
||||
assert "Сотрудники не найдены" in client.get("/admin/council?q=missing").text
|
||||
|
||||
Reference in new issue
Block a user