From 2b14e74c3c40f4350ed45d9a67e3d8698b882a09 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 25 Jan 2023 09:49:24 +0100 Subject: [PATCH] wait #5697 @0.5 --- app/Console/Commands/FluidbookQuote.php | 38 +++++++++++++++++++++++++ app/Console/Kernel.php | 2 ++ app/Jobs/FluidbookCompiler.php | 1 - 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 app/Console/Commands/FluidbookQuote.php diff --git a/app/Console/Commands/FluidbookQuote.php b/app/Console/Commands/FluidbookQuote.php new file mode 100644 index 000000000..cac806679 --- /dev/null +++ b/app/Console/Commands/FluidbookQuote.php @@ -0,0 +1,38 @@ +option('reminder')) { + return $this->reminder(); + } + } + + protected function reminder() + { + App::setLocale('fr'); + $nottreated = \App\Models\FluidbookQuote::where('status', '0')->count(); + if ($nottreated > 0 && request()->get('status', null) == null) { + Slack::send(User::withoutGlobalScopes()->find('5')->slack/*Slack::fluidbookQuoteChannel*/, + ':alarm_clock: ' . __('Des demandes de devis n\'ont pas été traitées'), + __(':awaiting demandes de devis doivent être confiées à un revendeur ou un chef de projet', ['awaiting' => $nottreated]), + [__('Toutes les demandes') => ['url' => backpack_url('fluidbook-quote?status=0')]], + false, + ); + } + + + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index d29a03397..a461fe906 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -31,6 +31,8 @@ class Kernel extends \Cubist\Backpack\Console\Kernel $schedule->command('ws:migrate --publications=v2 --documents=missing')->dailyAt('1:00'); + $schedule->command('fluidbook:quote --reminder')->weekdays()->at('10:00'); + $schedule->command('job:dispatch ProcessTotals')->everyTwoHours(); $schedule->command('fluidbook:player:updatesources')->everyTwoHours(); diff --git a/app/Jobs/FluidbookCompiler.php b/app/Jobs/FluidbookCompiler.php index 80b80b20a..70181d5af 100644 --- a/app/Jobs/FluidbookCompiler.php +++ b/app/Jobs/FluidbookCompiler.php @@ -3304,7 +3304,6 @@ height="0" width="0" style="display:none;visibility:hidden"> $less->setArg(null, $destination_less); $less->setArg(null, $destination_css); $less->execute(); - $less->debug(); if (!file_exists($destination_css)) { die($less->output); continue; -- 2.39.5