From 17d0c8c26f614e4cfee757bf285c21565e5a676f Mon Sep 17 00:00:00 2001 From: Egor Date: Sun, 31 Aug 2025 18:50:55 +0300 Subject: [PATCH] Update promocodes.py --- app/handlers/admin/promocodes.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/handlers/admin/promocodes.py b/app/handlers/admin/promocodes.py index a7d23289..9e7b5647 100644 --- a/app/handlers/admin/promocodes.py +++ b/app/handlers/admin/promocodes.py @@ -77,6 +77,7 @@ async def show_promocodes_list( return text = f"🎫 Список промокодов (стр. {page}/{total_pages})\n\n" + keyboard = [] for promo in promocodes: status_emoji = "✅" if promo.is_active else "❌" @@ -93,9 +94,14 @@ async def show_promocodes_list( if promo.valid_until: text += f"⏰ До: {format_datetime(promo.valid_until)}\n" - text += f"🔧 Управление: /promo_{promo.id}\n\n" - - keyboard = [] + keyboard.append([ + types.InlineKeyboardButton( + text=f"🎫 {promo.code}", + callback_data=f"promo_manage_{promo.id}" + ) + ]) + + text += "\n" if total_pages > 1: pagination_row = get_admin_pagination_keyboard(