fix-permissions #62
|
|
@ -91,6 +91,7 @@ func initDBModules(modules *ModuleDB, redisClient *redismodule.ModuleRedis) *Mod
|
|||
modules.Notification = dbcore.NewNotificationDB(modules.Pool)
|
||||
modules.DirectorNotifications = dbcore.NewDirectorNotificationDB(modules.Pool)
|
||||
modules.ApprovalTaskTransfer = dbcore.NewApprovalTaskTransferDB(modules.Pool)
|
||||
modules.ApprovalRevocation = dbcore.NewApprovalRevocationDB(modules.Pool)
|
||||
|
||||
return modules
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package approval
|
||||
|
||||
import (
|
||||
"bitrix_balancer_api/core/lib/external/tgkit"
|
||||
"bitrix_balancer_api/core/typescore"
|
||||
"bitrix_balancer_api/telegram_service/approvalflow"
|
||||
"bitrix_balancer_api/telegram_service/keyboard"
|
||||
|
|
@ -668,9 +667,9 @@ func (h *Handler) HandleViewFilesCallback(bot *tgbotapi.BotAPI, cq *tgbotapi.Cal
|
|||
return
|
||||
}
|
||||
|
||||
cardButton := tgkit.NewInlineKeyboard().
|
||||
Row(tgkit.Btn("📋 Показать заявку", fmt.Sprintf("appr_show_card:%d", approvalID))).
|
||||
Build()
|
||||
//cardButton := tgkit.NewInlineKeyboard().
|
||||
// Row(tgkit.Btn("📋 Показать заявку", fmt.Sprintf("appr_show_card:%d", approvalID))).
|
||||
// Build()
|
||||
|
||||
caption := fmt.Sprintf("📎 <b>Файлы к заявке #%d (%d шт.):</b>", approvalID, len(files))
|
||||
|
||||
|
|
@ -689,16 +688,16 @@ func (h *Handler) HandleViewFilesCallback(bot *tgbotapi.BotAPI, cq *tgbotapi.Cal
|
|||
})
|
||||
doc.ParseMode = "HTML"
|
||||
|
||||
isLast := i == len(files)-1
|
||||
//isLast := i == len(files)-1
|
||||
|
||||
// Подпись — на первом файле, чтобы сразу было видно к какой заявке относится
|
||||
if i == 0 {
|
||||
doc.Caption = caption
|
||||
}
|
||||
// Кнопка возврата к карточке — на последнем файле
|
||||
if isLast {
|
||||
doc.ReplyMarkup = cardButton
|
||||
}
|
||||
//// Кнопка возврата к карточке — на последнем файле
|
||||
//if isLast {
|
||||
// doc.ReplyMarkup = cardButton
|
||||
//}
|
||||
|
||||
if _, err := bot.Send(doc); err != nil {
|
||||
logrus.Errorf("HandleViewFilesCallback: Send err=%v", err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue