fix report generation #30

Merged
romanskijdev merged 1 commits from fix-permissions into main 2026-06-25 12:50:41 +03:00
2 changed files with 2 additions and 2 deletions

View File

@ -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 {

View File

@ -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()
}