invoices, order handling, db updates

This commit is contained in:
2026-02-14 23:09:21 +07:00
parent a3aaafd7ac
commit 50b1a8f80c
28 changed files with 508 additions and 44 deletions

View File

@@ -0,0 +1,34 @@
from typing import Optional
from aiogram.types import InlineKeyboardButton, InlineKeyboardMarkup
from aiogram.utils.keyboard import InlineKeyboardBuilder
placeholder_kb = InlineKeyboardBuilder(
[[InlineKeyboardButton(text="🍃", callback_data="...")]]
).as_markup()
def customer_contacts(
user_id: int, has_mention: bool, mention: Optional[str] = None
) -> InlineKeyboardMarkup:
btns: list[list[InlineKeyboardButton]] = []
(
btns.append(
[InlineKeyboardButton(text="👤 Перейти", url=f"https://t.me/{mention}")]
)
if has_mention
else None
)
btns.append(
[
InlineKeyboardButton(text="✍️", url=f"tg://openmessage?user_id={user_id}"),
InlineKeyboardButton(text="✍️", url=f"tg://user?id={user_id}"),
]
)
return InlineKeyboardBuilder(btns).as_markup()
def payment_link(url: str) -> InlineKeyboardMarkup:
return InlineKeyboardBuilder(
[[InlineKeyboardButton(text="💸 Оплатить", url=url)]]
).as_markup()

View File

@@ -214,7 +214,7 @@ def order_specs_confirmation(order_id: int) -> InlineKeyboardMarkup:
[
[
InlineKeyboardButton(
text="🟢 Перейти к оплате",
text="🟢 Подтвердить",
callback_data=f"payment:{order_id}",
)
],