def open_defects_start_date(update: Update, context: CallbackContext) -> int: text = "Введіть початкову дату в форматі день.місяць.рік (01.01.2021)" keyboard = Buttons.cancel() query = update.callback_query query.answer() query.edit_message_text(text=text, reply_markup=keyboard) return con.END_DATE
def defect_title(update: Update, context: CallbackContext) -> int: text = "Введіть назву пошкодження" keyboard = Buttons.cancel() query = update.callback_query query.answer() query.edit_message_text(text=text, reply_markup=keyboard) return con.DEFECT_DESCRIPTION
def open_defects_end_date(update: Update, context: CallbackContext) -> int: start_date = update.message.text context.user_data[con.DATE] = {con.START_DATE: start_date} text = "Введіть кінцеву дату в форматі день.місяць.рік (01.01.2021)" keyboard = Buttons.cancel() update.message.reply_text(text=text, reply_markup=keyboard) return con.FIND_BY_DATE
def defect_photo(update: Update, context: CallbackContext) -> int: room = update.message.text context.user_data[con.DEFECT].update({con.DEFECT_ROOM: room}) text = "Завантажте фото" keyboard = Buttons.cancel() update.message.reply_text(text=text, reply_markup=keyboard) return con.DEFECT_DONE
def defect_room(update: Update, context: CallbackContext) -> int: description = update.message.text context.user_data[con.DEFECT].update({con.DEFECT_DESCRIPTION: description}) text = "Введіть кімнату" keyboard = Buttons.cancel() update.message.reply_text(text=text, reply_markup=keyboard) return con.DEFECT_PHOTO
def defect_description(update: Update, context: CallbackContext) -> int: title = update.message.text context.user_data[con.DEFECT] = {con.DEFECT_TITLE: title} text = "Введіть опис пошкодження" keyboard = Buttons.cancel() update.message.reply_text(text=text, reply_markup=keyboard) return con.DEFECT_ROOM