Compare commits
No commits in common. "cf77797512f9ae118d543779bd545680688ec28c" and "a9ecdfe4bbd3925538ed61125d108f4cb64cfcf0" have entirely different histories.
cf77797512
...
a9ecdfe4bb
|
@ -23,14 +23,18 @@ class PreventionRememberAction
|
|||
->orWhereNull('last_remembered_at')
|
||||
);
|
||||
foreach ($query->get() as $participant) {
|
||||
if ($participant->getFields()->getMailRecipient() === null || count($participant->preventions()) === 0) {
|
||||
continue;
|
||||
if (count($participant->preventions()) === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$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,6 +3,7 @@
|
|||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Tests\RequestFactories\EditorRequestFactory;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
|
@ -14,7 +15,7 @@ return new class extends Migration
|
|||
public function up()
|
||||
{
|
||||
Schema::table('forms', function (Blueprint $table) {
|
||||
$table->json('prevention_text')->after('description')->default(json_encode(['time' => 4, 'blocks' => [], 'version' => '1.0']));
|
||||
$table->json('prevention_text')->after('description')->default(json_encode(EditorRequestFactory::new()->empty()->create()));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue