Merge pull request 'fix report generation' (#30) from fix-permissions into main
Deploy / deploy (push) Successful in 13s Details

Reviewed-on: https://72.56.235.246.nip.io/gitea/romanskijdev/ruspet_portal_back/pulls/30
This commit is contained in:
romanskijdev 2026-06-25 12:50:40 +03:00
commit b3d3602a4e
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()
}