feat: admin product deletion

This commit is contained in:
2026-08-13 12:03:56 +07:00
parent 1b78f2ba36
commit 406356c240
5 changed files with 239 additions and 6 deletions

View File

@@ -79,3 +79,16 @@ def edit_product(product: Product):
[InlineKeyboardButton(text="⬅️", callback_data=f"cat:{product.category_id}")],
]
).as_markup()
def confirm_product_deletion(product_id: int) -> InlineKeyboardMarkup:
return InlineKeyboardBuilder(
[
[
InlineKeyboardButton(
text="✅ Да, удалить", callback_data=f"delete_product:confirm:{product_id}"
),
InlineKeyboardButton(text="❌ Отмена", callback_data=f"product:{product_id}"),
]
]
).as_markup()

View File

@@ -21,3 +21,7 @@ class AdminControlStorage(StatesGroup):
edit_product_photo = State()
edit_category = State()
new_category = State()
new_product_name = State()
new_product_description = State()
new_product_price = State()
new_product_photo = State()