add dialog for events_list

This commit is contained in:
2025-09-25 21:51:46 +03:00
parent 91f247c8b4
commit 5982351dd2
5 changed files with 39 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ from aiogram_dialog import Dialog, Window
from aiogram_dialog.widgets.kbd import Button, Start
from aiogram_dialog.widgets.text import Const, Format
from app.bot.dialogs.flows.events.dialogs import EventsSG
from app.bot.dialogs.flows.profile.dialogs import ProfileSG
from app.bot.dialogs.widgets.getters import is_admin, username_getter
@@ -10,7 +11,7 @@ from .states import StartSG
start_dialog = Dialog(
Window(
Format("Привет, {username}"),
Button(Const("события"), id="events"),
Start(Const("события"), id="events", state=EventsSG.events_list),
Button(Const("создать событие"), id="create_event", when="is_admin"),
Start(Const("профиль"), id="profile", state=ProfileSG.profile),
getter=[username_getter, is_admin],