diff --git a/config/__pycache__/config.cpython-311.pyc b/config/__pycache__/config.cpython-311.pyc new file mode 100644 index 0000000..195a325 Binary files /dev/null and b/config/__pycache__/config.cpython-311.pyc differ diff --git a/config/__pycache__/config.cpython-313.pyc b/config/__pycache__/config.cpython-313.pyc new file mode 100644 index 0000000..4b3cb15 Binary files /dev/null and b/config/__pycache__/config.cpython-313.pyc differ diff --git a/lk/handlers.py b/lk/handlers.py index 24397d3..8bbdc31 100644 --- a/lk/handlers.py +++ b/lk/handlers.py @@ -207,6 +207,7 @@ async def send_tabel_months_menu(msg: Message, user_id: str): now = datetime.now() m1 = now.replace(day=1) - timedelta(days=1) # Прошлый месяц (M-1) m2 = m1.replace(day=1) - timedelta(days=1) # Позапрошлый месяц (M-2) + m3 = m2.replace(day=1) - timedelta(days=1) # За два месяца (M-3) months_ru = { 1: "Январь", 2: "Февраль", 3: "Март", 4: "Апрель", 5: "Май", 6: "Июнь", @@ -215,11 +216,13 @@ async def send_tabel_months_menu(msg: Message, user_id: str): m1_str = f"{months_ru[m1.month]} {m1.year} г." m2_str = f"{months_ru[m2.month]} {m2.year} г." + m3_str = f"{months_ru[m3.month]} {m3.year} г." menu_text = ( "⏱ Выберите месяц для просмотра табеля:\n\n" f"{EMOJI_DIGITS['1']} — {m1_str}\n" - f"{EMOJI_DIGITS['2']} — {m2_str}\n\n" + f"{EMOJI_DIGITS['2']} — {m2_str}\n" + f"{EMOJI_DIGITS['3']} — {m3_str}\n\n" f"{EMOJI_DIGITS['9']} — Назад\n{EMOJI_DIGITS['0']} — В главное меню" ) @@ -403,7 +406,7 @@ async def lk_router_handler(msg: Message): elif cmd == "9": set_state(user_id, "LK_MODE") await send_dynamic_lk_main_menu(msg, user_id) - elif cmd in ["1", "2"]: + elif cmd in ["1", "2", "3"]: log_menu_stats(user_id, "Личный кабинет", f"Просмотр табеля (вариант {cmd})") await msg.answer(lk_tabel_loading(EMOJI_DIGITS), parse_mode="html") try: @@ -411,10 +414,13 @@ async def lk_router_handler(msg: Message): now = datetime.now() m1 = now.replace(day=1) - timedelta(days=1) + m2 = m1.replace(day=1) - timedelta(days=1) if cmd == "1": target_date = m1 # Прошлый месяц elif cmd == "2": - target_date = m1.replace(day=1) - timedelta(days=1) # Позапрошлый месяц + target_date = m2 # Позапрошлый месяц + elif cmd == "3": + target_date = m2.replace(day=1) - timedelta(days=1) # За два месяца tabel_report = await asyncio.to_thread( get_tabel_report_text, diff --git a/utils/__pycache__/__init__.cpython-311.pyc b/utils/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..e4e0487 Binary files /dev/null and b/utils/__pycache__/__init__.cpython-311.pyc differ diff --git a/utils/__pycache__/ad_search.cpython-311.pyc b/utils/__pycache__/ad_search.cpython-311.pyc new file mode 100644 index 0000000..9753f66 Binary files /dev/null and b/utils/__pycache__/ad_search.cpython-311.pyc differ