Sfoglia il codice sorgente

[ledger] Reports list

Innocenty Enikeew 8 anni fa
parent
commit
398f259f14
1 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. 6 1
      plugins/ledger.lisp

+ 6 - 1
plugins/ledger.lisp

@@ -230,7 +230,10 @@
   (let ((crons (get-chat-crons :ledger-report chat-id)))
     (if crons
         (bot-send-message
-         chat-id "Отчёты"
+         chat-id (format nil "Отчёты~%~%~{~A) ~A _~A_: ~A~^~%~}"
+                         (loop for (schedule name query) in crons
+                            for idx from 1
+                            append (list idx name schedule query)))
          :parse-mode "markdown"
          :reply-markup
          (get-inline-keyboard
@@ -243,6 +246,8 @@
                       (cron-name name))
                   (list (inline-button ((format nil "Удалить '~A'" cron-name))
                           (delete-chat-cron :ledger-report chat-id cron-index)
+                          (telegram-edit-message-reply-markup
+                           nil :chat-id source-chat-id :message-id source-message-id)
                           (bot-send-message chat-id (format nil "Удалил *~A*" cron-name)
                                             :parse-mode "markdown")))))
            (list (list (inline-button ("Отмена")