fix report generation #30
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue