added delete option and simplified crud operation on teacher

This commit is contained in:
Hosein
2026-01-01 11:11:30 +03:30
parent e844392479
commit f03362c313
5 changed files with 143 additions and 114 deletions
+11
View File
@@ -0,0 +1,11 @@
from telebot import types
def create_entity_markup(entity_name, enitity_id):
markup = types.InlineKeyboardMarkup()
markup.add(types.InlineKeyboardButton(
f"✏️ Edit {entity_name}", callback_data=f"edit_{entity_name}_{enitity_id}"))
markup.add(types.InlineKeyboardButton(
f"🗑️ Delete {entity_name}", callback_data=f"delete_{entity_name}_{enitity_id}"))
return markup