Compare commits
3 Commits
a9ecdfe4bb
...
cf77797512
Author | SHA1 | Date |
---|---|---|
philipp lang | cf77797512 | |
philipp lang | d44ad4bc53 | |
philipp lang | 94597e57c1 |
|
@ -23,18 +23,14 @@ class PreventionRememberAction
|
|||
->orWhereNull('last_remembered_at')
|
||||
);
|
||||
foreach ($query->get() as $participant) {
|
||||
if (count($participant->preventions()) === 0) {
|
||||
return;
|
||||
if ($participant->getFields()->getMailRecipient() === null || count($participant->preventions()) === 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$body = app(PreventionSettings::class)->refresh()->formmail
|
||||
->placeholder('formname', $participant->form->name)
|
||||
->append($participant->form->prevention_text);
|
||||
|
||||
if ($participant->getFields()->getMailRecipient() === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Mail::send(new PreventionRememberMail($participant, $body));
|
||||
|
||||
$participant->update(['last_remembered_at' => now()]);
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Tests\RequestFactories\EditorRequestFactory;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
|
@ -15,7 +14,7 @@ return new class extends Migration
|
|||
public function up()
|
||||
{
|
||||
Schema::table('forms', function (Blueprint $table) {
|
||||
$table->json('prevention_text')->after('description')->default(json_encode(EditorRequestFactory::new()->empty()->create()));
|
||||
$table->json('prevention_text')->after('description')->default(json_encode(['time' => 4, 'blocks' => [], 'version' => '1.0']));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue