Skip to content

Commit

Permalink
v0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
GaganovAlexander committed Apr 3, 2023
1 parent 8721a3f commit 82a0a53
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions handlers/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ async def client_inlines(call: CallbackQuery) -> None:
data = call.data.split('_')
match data[0]:
case 'book':
await call.message.answer(\
f'Для записи на услугу "{data[1]}", свяжитесь с {getenv("CONTACT1_FIO")} и уточните детали:\nНомер телефона: {getenv("CONTACT1_PHONE_NUMBER")}\nТелеграм: https://t.me/{getenv("CONTACT1_USERNAME")}')
if data[2] != '1':
await call.message.answer(\
f'Для записи на услугу "{data[1]}", свяжитесь с {getenv("CONTACT1_FIO")} и уточните детали:\nНомер телефона: {getenv("CONTACT1_PHONE_NUMBER")}\nСоцсети: {getenv("CONTACT1_USERNAME")}')
else:
await call.message.answer(f"Контакты Ш.")
case 'photos':
media = []
num = get_num(data[1])[0][0]
Expand Down
4 changes: 2 additions & 2 deletions keys/inline_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ def pricelist_inlines(list_of_items_names: list[str], last_item_num=0, first_pag
return kb.as_markup()


def client_items_inlines(name: str):
def client_items_inlines(name: str, is_unusual=False):
kb = InlineKeyboardBuilder()

kb.button(text='Больше фото', callback_data=f'photos_{name}')
kb.button(text='Записаться', callback_data=f'book_{name}')
kb.button(text='Записаться', callback_data=f'book_{name}_{int(is_unusual)}')

kb.adjust(1, 1)
return kb.as_markup()
2 changes: 1 addition & 1 deletion sqlite_db/sqlite_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def sql_start() -> None:
cur = base.cursor()
if base:
print('Подключение к базе данных прошло успешно')
base.execute('CREATE TABLE IF NOT EXISTS pricelist(name TEXT PRIMARY KEY, description TEXT, price TEXT, num INTEGER)')
base.execute('CREATE TABLE IF NOT EXISTS pricelist(name TEXT PRIMARY KEY, description TEXT, price TEXT, num INTEGER, is_shugaring INTEGER DEFAULT 0)')
base.commit()
else:
print('Произошла какая-то ошибка')
Expand Down

0 comments on commit 82a0a53

Please sign in to comment.