catalogue operations, db migr and so on.
pre release version.
This commit is contained in:
@@ -1,21 +1,18 @@
|
||||
from typing import Optional, Callable
|
||||
from typing import Optional, Callable, Union
|
||||
from aiogram.types import InlineKeyboardButton, InlineKeyboardMarkup
|
||||
from aiogram.utils.keyboard import InlineKeyboardBuilder
|
||||
|
||||
main_menu: InlineKeyboardMarkup = InlineKeyboardBuilder(
|
||||
[
|
||||
[InlineKeyboardButton(text="📦 Изменить товары", callback_data="cat:root")],
|
||||
[
|
||||
InlineKeyboardButton(
|
||||
text="📜 Изменить категории", callback_data="edit:categories"
|
||||
)
|
||||
],
|
||||
[InlineKeyboardButton(text="📦 Изменить каталог", callback_data="cat:root")],
|
||||
# [InlineKeyboardButton(text="", callback_data="")],
|
||||
]
|
||||
).as_markup()
|
||||
|
||||
|
||||
def back_to_product_kb(product_id: int, *, cb_factory: Callable[[int], str]):
|
||||
def back_to_product_kb(
|
||||
product_id: Union[int, str], *, cb_factory: Callable[[int | str], str]
|
||||
):
|
||||
return InlineKeyboardBuilder(
|
||||
[[InlineKeyboardButton(text="⬅️", callback_data=cb_factory(product_id))]]
|
||||
).as_markup()
|
||||
|
||||
Reference in New Issue
Block a user