feat(admin): dashboard widget shown only when there are failed queue items

This commit is contained in:
Vladimir Bryzgalov
2026-04-17 22:50:29 +05:00
parent fef22c1ff8
commit f5816e4648
2 changed files with 45 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
<?php
/** @var array<int,object> $failed */
/** @var int $count */
/** @var string $settings_url */
?>
<p>Есть <b><?php echo (int)$count; ?></b> неотправленных сообщений (TG-API отвечает ошибкой):</p>
<ul style="margin:0 0 8px 18px;list-style:disc">
<?php foreach ($failed as $row): ?>
<li>
<?php echo esc_html((string)$row->created_at); ?> —
<?php echo esc_html((string)$row->last_error); ?>
</li>
<?php endforeach; ?>
</ul>
<p><a href="<?php echo esc_url($settings_url); ?>" class="button">Открыть настройки →</a></p>