diff --git a/service/telegram_service/handlers/approval/handler_report.go b/service/telegram_service/handlers/approval/handler_report.go index 14bf7f8..5ad64c7 100644 --- a/service/telegram_service/handlers/approval/handler_report.go +++ b/service/telegram_service/handlers/approval/handler_report.go @@ -30,11 +30,10 @@ func (h *Handler) getTopicCodeByApproval(ctx context.Context, a *typescore.Appro const reportDateLayout = "02.01.2006" -// HandleReportMenu — первый шаг: показываем выбор типа отчёта. // HandleReportMenu — сразу показываем выбор периода (тип отчёта один — согласования). func (h *Handler) HandleReportMenu(bot *tgbotapi.BotAPI, chatID int64, telegramID int64) { ctx, cancel := context.WithTimeout(context.Background(), variables.ContextTimeoutBase) - cancel() + defer cancel() user, err := h.ipc.Database.User.GetUserByTelegramIDDB(ctx, telegramID) if err != nil || user == nil || user.ID == nil { diff --git a/service/telegram_service/keyboard/misc.go b/service/telegram_service/keyboard/misc.go index 1508b00..26fe742 100644 --- a/service/telegram_service/keyboard/misc.go +++ b/service/telegram_service/keyboard/misc.go @@ -197,6 +197,7 @@ func BuildObserverApprovalList(approvals []*typescore.Approval, initiators map[u func BuildReportDateToMenu() interface{} { return tgkit.NewInlineKeyboard(). Row(tgkit.Btn("📤 Выгрузить (по сегодня)", "report_generate")). + Row(tgkit.Btn("Указать даты", "report_set_dates")). Build() }