diff --git a/app/static/admin.js b/app/static/admin.js index d4ffe05..14dc603 100644 --- a/app/static/admin.js +++ b/app/static/admin.js @@ -148,6 +148,11 @@ }, 4000); } + const directoryFilters = document.querySelector(".directory__filter-panel"); + directoryFilters?.addEventListener("invalid", () => { + directoryFilters.open = true; + }, true); + setupColumns(); setupProgress(); })(); diff --git a/app/templates/directory.html b/app/templates/directory.html index 7cc84d9..e57c5db 100644 --- a/app/templates/directory.html +++ b/app/templates/directory.html @@ -175,5 +175,5 @@ {% endblock %} {% block scripts %} - + {% endblock %} diff --git a/app/version.py b/app/version.py index 50bb595..40c9de5 100644 --- a/app/version.py +++ b/app/version.py @@ -1,3 +1,3 @@ -APP_VERSION = "2.1.0" -FRONTEND_VERSION = "2.1.0" -BACKEND_VERSION = "2.1.0" +APP_VERSION = "2.1.1" +FRONTEND_VERSION = "2.1.1" +BACKEND_VERSION = "2.1.1" diff --git a/pyproject.toml b/pyproject.toml index b21e924..d4ffe55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "miem-workers" -version = "2.1.0" +version = "2.1.1" description = "MIEM employees parser, admin API, and web admin" requires-python = ">=3.11" dependencies = [ diff --git a/tests/test_api.py b/tests/test_api.py index 83950cc..ec2ba73 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -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.1.0" + assert response.json()["backend_version"] == "2.1.1" def test_api_employees_and_stats_require_admin_session(): diff --git a/tests/test_council.py b/tests/test_council.py index e5a8faf..731c470 100644 --- a/tests/test_council.py +++ b/tests/test_council.py @@ -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.1.0 · Frontend 2.1.0" in response.text + assert "Backend 2.1.1 · Frontend 2.1.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