Compare commits
3 Commits
a9ecdfe4bb
...
cf77797512
Author | SHA1 | Date |
---|---|---|
|
cf77797512 | |
|
d44ad4bc53 | |
|
94597e57c1 |
|
@ -23,18 +23,14 @@ class PreventionRememberAction
|
||||||
->orWhereNull('last_remembered_at')
|
->orWhereNull('last_remembered_at')
|
||||||
);
|
);
|
||||||
foreach ($query->get() as $participant) {
|
foreach ($query->get() as $participant) {
|
||||||
if (count($participant->preventions()) === 0) {
|
if ($participant->getFields()->getMailRecipient() === null || count($participant->preventions()) === 0) {
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$body = app(PreventionSettings::class)->refresh()->formmail
|
$body = app(PreventionSettings::class)->refresh()->formmail
|
||||||
->placeholder('formname', $participant->form->name)
|
->placeholder('formname', $participant->form->name)
|
||||||
->append($participant->form->prevention_text);
|
->append($participant->form->prevention_text);
|
||||||
|
|
||||||
if ($participant->getFields()->getMailRecipient() === null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
Mail::send(new PreventionRememberMail($participant, $body));
|
Mail::send(new PreventionRememberMail($participant, $body));
|
||||||
|
|
||||||
$participant->update(['last_remembered_at' => now()]);
|
$participant->update(['last_remembered_at' => now()]);
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
use Tests\RequestFactories\EditorRequestFactory;
|
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration
|
||||||
{
|
{
|
||||||
|
@ -15,7 +14,7 @@ return new class extends Migration
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::table('forms', function (Blueprint $table) {
|
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