From: Vincent Vanwaelscappel Date: Wed, 17 Dec 2025 17:02:38 +0000 (+0100) Subject: wait #7439 @6 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=295cc3ae5bbdb8867e366bbf1fe1cc67a0cce0f4;p=psq.git wait #7439 @6 --- diff --git a/.docker/production/docker-compose.yml b/.docker/production/docker-compose.yml index e09a34f..6559a39 100644 --- a/.docker/production/docker-compose.yml +++ b/.docker/production/docker-compose.yml @@ -10,6 +10,8 @@ services: - './www/public:/usr/local/apache2/htdocs' - './www/:/application/' - './www/.docker/config/httpd/httpd.conf:/usr/local/apache2/conf/httpd.conf' + - './www/storage/s3/public/:/usr/local/apache2/htdocs/s3/' + - './www/storage/s3/public/:/application/public/s3/' environment: VIRTUAL_HOST: admin.dev.prescription-quotidien.com,dev.prescription-quotidien.com LETSENCRYPT_HOST: admin.dev.prescription-quotidien.com,dev.prescription-quotidien.com @@ -57,6 +59,8 @@ services: - './www/.env.production:/application/.env' # Web path - './www:/application' + # S3 + - './www/storage/s3/public/:/application/public/s3/' ports: - '43441:22' networks: diff --git a/app/Console/Commands/Migration.php b/app/Console/Commands/Migration.php index 236ef78..5a730f8 100644 --- a/app/Console/Commands/Migration.php +++ b/app/Console/Commands/Migration.php @@ -69,6 +69,7 @@ class Migration extends Command // Sync S3 `rclone sync olds3:prescription-sante s3:presquot`; `rclone sync olds3:prescription-sante/flowpaper/ /application/storage/app/flowpaper/`; + `rclone sync olds3:prescription-sante /application/storage/s3/`; Artisan::call('psq:fluidbook:archives'); Artisan::call('optimize:clear'); diff --git a/app/Http/Controllers/Admin/PublishController.php b/app/Http/Controllers/Admin/PublishController.php index 4d041c9..008e74f 100644 --- a/app/Http/Controllers/Admin/PublishController.php +++ b/app/Http/Controllers/Admin/PublishController.php @@ -54,13 +54,13 @@ class PublishController extends Controller $batch = EmailBatch::createFromRequest($data); $processEmailBatch = new ProcessEmailBatch($batch, $usersBuilder); - dispatch($processEmailBatch); + dispatch_sync($processEmailBatch); - if ($pdfBatch = EmailBatch::createAttachmentMailFromRequest($data)) { - $userReceivesPdfBuilder->subscriber()->receivesPdf(); - $pdfProcessEmailBatch = new ProcessEmailBatch($pdfBatch, $userReceivesPdfBuilder); - dispatch($pdfProcessEmailBatch->withFile()); - } +// if ($pdfBatch = EmailBatch::createAttachmentMailFromRequest($data)) { +// $userReceivesPdfBuilder->subscriber()->receivesPdf(); +// $pdfProcessEmailBatch = new ProcessEmailBatch($pdfBatch, $userReceivesPdfBuilder); +// dispatch($pdfProcessEmailBatch->withFile()); +// } return ['data' => $batch->id]; } diff --git a/app/Jobs/ProcessEmailBatch.php b/app/Jobs/ProcessEmailBatch.php index 1d2321f..169509a 100644 --- a/app/Jobs/ProcessEmailBatch.php +++ b/app/Jobs/ProcessEmailBatch.php @@ -147,13 +147,11 @@ class ProcessEmailBatch implements ShouldQueue $this->html = $this->batch->render(); $this->templateVariables = $this->processVariablesForMailer(); - dd($this->html); - foreach ($this->users as $user) { - Mail::send([],[], function ($message) use ($user) { + Mail::send([], [], function ($message) use ($user) { $message->from(config('mail.from.address'), config('mail.from_name')); $message->subject($this->batch->subject); - $message->setBody($this->html,'text/html'); + $message->setBody($this->html, 'text/html'); $message->to($user->email); $message->replyTo(env('MAIL_REPLYTO')); }); diff --git a/config/app.php b/config/app.php index a817e29..1f50653 100644 --- a/config/app.php +++ b/config/app.php @@ -123,7 +123,7 @@ return [ 'cipher' => 'AES-256-CBC', - 'aws_s3_url' => 'https://prescription-sante.s3.eu-west-3.amazonaws.com', + 'aws_s3_url' => env('AWS_URL'), 'version' => '1.0.0', diff --git a/public/.htaccess b/public/.htaccess index c65d98c..63a4869 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -14,6 +14,8 @@ # RewriteCond %{REQUEST_URI} (.+)/$ # RewriteRule ^ %1 [L,R=301] + RewriteRule ^s3 - [L] + # Send Requests To Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f diff --git a/resources/views/vendor/nova/partials/meta.blade.php b/resources/views/vendor/nova/partials/meta.blade.php index e6ea596..82a8fa2 100644 --- a/resources/views/vendor/nova/partials/meta.blade.php +++ b/resources/views/vendor/nova/partials/meta.blade.php @@ -1,22 +1,22 @@ {{-- --}} @if(app()->isProduction()) - - - - - - + + + + + + - + @else - - - - - - + + + + + + - + @endif diff --git a/resources/views/vendor/twill/partials/head.blade.php b/resources/views/vendor/twill/partials/head.blade.php index 388d1ac..516c318 100644 --- a/resources/views/vendor/twill/partials/head.blade.php +++ b/resources/views/vendor/twill/partials/head.blade.php @@ -1,10 +1,10 @@ - + - + {{ config('app.name') }} {{ config('twill.admin_app_title_suffix') }} - + @if(app()->isProduction()) @@ -20,25 +20,25 @@ - @if(app()->isProduction()) - - - - - - +@if(app()->isProduction()) + + + + + + - + @else - - - - - - + + + + + + - + @endif @@ -50,7 +50,23 @@ @stack('extra_css')