diff --git a/app.db b/app.db index 0b5cca1..4f2f238 100644 Binary files a/app.db and b/app.db differ diff --git a/app.py b/app.py index 3d9991a..756520b 100644 --- a/app.py +++ b/app.py @@ -274,6 +274,7 @@ def api_posts(): if full_name is not None: vkPost.full_name = full_name else: + vkPostData["selected_users"] = vkPostData.pop("selectedUsers") db.session.merge(VkPost(**vkPostData)) db.session.commit() except Exception as e: @@ -287,14 +288,24 @@ def api_posts(): endTime = schedulerData.get("endTime", None) interval_minutes = schedulerData.get("interval_minutes", None) enabled = schedulerData.get("enabled", None) - if startTime: - scheduler.start_hour = int(startTime) - if endTime: - scheduler.end_hour = int(endTime) - if interval_minutes: - scheduler.interval_minutes = int(interval_minutes) - if enabled is not None: - scheduler.enabled = enabled + if scheduler: + if startTime: + scheduler.start_hour = int(startTime) + if endTime: + scheduler.end_hour = int(endTime) + if interval_minutes: + scheduler.interval_minutes = int(interval_minutes) + if enabled is not None: + scheduler.enabled = enabled + else: + db.session.merge( + PostScheduler( + start_hour=int(startTime), + end_hour=int(endTime), + interval_minutes=int(interval_minutes), + enabled=enabled, + ) + ) db.session.commit() except Exception as e: logger.error(f"Ошибка при обновлении расписания публикации: {e}") diff --git a/static/css/posts.css b/static/css/posts.css index 1660e34..6486d6c 100644 --- a/static/css/posts.css +++ b/static/css/posts.css @@ -17,10 +17,15 @@ /* Таблица сотрудников */ .table-responsive { - max-height: 500px; + height: 100vh; overflow-y: auto; } +.col-lg-7 .table-responsive { + scrollbar-width: thin; +} + + .table { margin-bottom: 0; } @@ -138,6 +143,10 @@ cursor: pointer; } +.user-row input:checked { + background-color: rgba(13,110,253,.15); +} + .user-row:hover td { background-color: rgba(13, 110, 253, 0.05); }