create event

This commit is contained in:
2025-10-03 14:09:43 +03:00
parent 2056558ea8
commit 7734adda8b
18 changed files with 399 additions and 88 deletions

View File

@@ -3,6 +3,7 @@ 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.new_event.dialogs import NewEventSG
from app.bot.dialogs.flows.profile.dialogs import ProfileSG
from app.bot.dialogs.widgets.getters import is_admin_getter, user_getter
@@ -12,7 +13,12 @@ start_dialog = Dialog(
Window(
Format("Привет, {user.fullname}"),
Start(Const("📃 события"), id="events", state=EventsSG.events_list),
Button(Const("✏️ создать событие"), id="create_event", when="is_admin"),
Start(
Const("✏️ создать событие"),
id="create_event",
state=NewEventSG.input_title,
when="is_admin",
),
Start(Const("👤 профиль"), id="profile", state=ProfileSG.profile),
getter=[user_getter, is_admin_getter],
state=StartSG.start,