Скрыть служебную сводку подтверждения ДПО в карточке
CI / Fingerprint diagnostics (production deployment temporarily disabled) (pull_request) Canceled after 0s
CI / test (pull_request) Canceled after 2m47s

This commit is contained in:
codex committed 2026-11-26 18:28:45 +03:00
1 parent 76f92b05e3
commit 48604a7b2a
6 files changed
+11 -16

No files matched your search

-9
View File
@@ -11,18 +11,9 @@
</fieldset>
{% endmacro %}
<section class="panel" id="unresolved-dpo" tabindex="-1">
<h2 class="panel__title">Проверка ДПО</h2>
{% if review %}
<p>Подтверждено курсов: <strong>{{ review.courses | length }}</strong> · {{ review.updated_by }} · {{ review.updated_at | admin_datetime }}</p>
{% if review.courses %}<ol>{% for course in review.courses %}
<li>{{ course.title }} · {{ kinds[course.kind] }}{% if course.year %} · {{ course.year }}{% endif %}{% if course.evidence %} · {{ course.evidence }}{% endif %}</li>
{% endfor %}</ol>{% endif %}
{% endif %}
{% if employee_view.dpo_uncertain %}
<h3>Количество ДПО требует проверки</h3>
{% if review %}<p>Сведения о ДПО изменились. В справочнике учтён последний подтверждённый список.</p>{% endif %}
{% endif %}
{% if employee_view.dpo_uncertain or review %}
{% for section in employee_view.sections if section.type == 'additional_education' %}
<h4>{{ section.title }} · сведения профиля</h4>
{% if not section.list_items %}<p>В разделе ДПО не удалось выделить отдельные записи.</p>{% endif %}
+3 -3
View File
@@ -1,3 +1,3 @@
APP_VERSION = "2.4.0"
FRONTEND_VERSION = "2.4.0"
BACKEND_VERSION = "2.4.0"
APP_VERSION = "2.4.1"
FRONTEND_VERSION = "2.4.1"
BACKEND_VERSION = "2.4.1"
+2 -2
View File
@@ -1,6 +1,6 @@
[project]
name = "miem-workers"
version = "2.4.0"
version = "2.4.1"
description = "MIEM employees parser, admin API, and web admin"
requires-python = ">=3.11"
dependencies = [
@@ -11,7 +11,7 @@ dependencies = [
"jinja2>=3.1.4",
"lxml>=5.2.0",
"psycopg[binary]>=3.2.0",
"pydantic-settings>=2.4.0",
"pydantic-settings>=2.4.1",
"openpyxl>=3.1.5,<4",
"python-multipart>=0.0.9",
"requests>=2.32.0",
+1 -1
View File
@@ -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.0"
assert response.json()["backend_version"] == "2.4.1"
def test_api_employees_and_stats_require_admin_session():
+1 -1
View File
@@ -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.0 · Frontend 2.4.0" in response.text
assert "Backend 2.4.1 · Frontend 2.4.1" 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
+4
View File
@@ -453,6 +453,10 @@ def test_reader_confirms_dpo_and_changed_sources_require_review(accounts):
assert client.post(url, json=payload).status_code == 403
assert client.post(url, json=payload, headers=headers).status_code == 200
assert client.post(url, json=payload, headers=headers).status_code == 409
panel = BeautifulSoup(client.get(url[:-4]).text, "html.parser").select_one("#unresolved-dpo")
assert "Подтверждено курсов" not in panel.get_text()
assert panel.select_one("ol") is None
assert panel.select_one("[data-rows] input[name=title]")["value"] == "Инженерная практика"
assert not employee_detail_payload(employee)["dpo_uncertain"]
result = list_employees_page(db, training_since_year=2025)["employees"]
assert [row["dpo_count"] for row in result] == [1]