Fix minori

This commit is contained in:
Thomas Zilio 2019-08-27 15:48:31 +02:00
parent 17eaf05824
commit 25596f37f0
2 changed files with 6 additions and 4 deletions

View File

@ -12,7 +12,6 @@ class EmailHook extends Manager
public function execute()
{
$accounts = MailAccount::all();
$diff = date('Y-m-d', strtotime('-4 hours'));
$list = [];
@ -50,6 +49,7 @@ class EmailHook extends Manager
public function prepare()
{
$yesterday = date('Y-m-d', strtotime('-1 days'));
$diff = date('Y-m-d', strtotime('-4 hours'));
$user = auth()->getUser();
$remaining = Mail::whereNull('sent_at')
@ -61,7 +61,9 @@ class EmailHook extends Manager
->count();
$current = $total - $remaining;
$total_remaining = Mail::whereNull('sent_at')->count();
$total_remaining = Mail::whereNull('sent_at')
->whereDate('failed_at', '<', $diff)
->count();
$message = !empty($remaining) ? tr('Invio email in corso...') : tr('Invio email completato!');

View File

@ -77,9 +77,9 @@ if ($structure->permission == 'rw') {
<input type="hidden" name="op" value="add_nota">
<input type="hidden" name="backto" value="record-edit">
{[ "type": "date", "label": "'.tr('Data di notifica').'", "name": "data_notifica" ]}
{[ "type": "date", "label": "'.tr('Data di notifica').'", "name": "data_notifica", "class": "unblockable" ]}
{[ "type": "ckeditor", "label": "'.tr('Nuova nota').'", "name": "contenuto", "required": 1]}
{[ "type": "ckeditor", "label": "'.tr('Nuova nota').'", "name": "contenuto", "required": 1, "class": "unblockable" ]}
<!-- PULSANTI -->
<div class="row">