From 7d93b22c6b62cc766ec0f4845b951c2e9f7f705c Mon Sep 17 00:00:00 2001 From: soufiane Date: Wed, 14 Feb 2024 11:21:01 +0100 Subject: [PATCH] wait #6717 @0:25 --- app/Console/Commands/FluidbookSettingsExport.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/Console/Commands/FluidbookSettingsExport.php b/app/Console/Commands/FluidbookSettingsExport.php index 61d8b9b95..ca1f787cb 100644 --- a/app/Console/Commands/FluidbookSettingsExport.php +++ b/app/Console/Commands/FluidbookSettingsExport.php @@ -4,20 +4,16 @@ namespace App\Console\Commands; use App\Console\Commands\Base\ToolboxCommand; use App\Models\FluidbookPublication; -use App\Models\Traits\PublicationSettings; use App\Models\User; use App\Notifications\ToolboxNotification; -use App\SubForms\Link\Color; use Cubist\Util\ArrayUtil; use Cubist\Util\Files\Files; -use Illuminate\Support\Facades\Mail; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Style\Alignment; use PhpOffice\PhpSpreadsheet\Style\Fill; use PhpOffice\PhpSpreadsheet\Style\NumberFormat; use PhpOffice\PhpSpreadsheet\Style\Protection; use PhpOffice\PhpSpreadsheet\Writer\Xlsx; -use App\Mail\Base; class FluidbookSettingsExport extends ToolboxCommand { @@ -96,7 +92,13 @@ class FluidbookSettingsExport extends ToolboxCommand $style = $sheet->getStyleByColumnAndRow($c, $line); if(!$field[$key]['editable'] || $field[$key]['type'] === 'noteditable' || $field[$key]['type'] === 'hidden') { $style->getProtection()->setLocked(Protection::PROTECTION_PROTECTED); - $style->getFill()->setFillType(Fill::FILL_SOLID)->getStartColor()->setARGB('dddddd'); + $styleArray = [ + 'fill' => [ + 'fillType' => Fill::FILL_SOLID, + 'color' => ['argb' => 'dddddd'], // Couleur grise en format ARGB + ], + ]; + $style->applyFromArray($styleArray); } $style->getFont()->setBold(true); $style->getAlignment()->setVertical(Alignment::VERTICAL_CENTER); @@ -112,7 +114,6 @@ class FluidbookSettingsExport extends ToolboxCommand $value = is_array($value) ? json_encode($value) : $value; $sheet->getCellByColumnAndRow($c, $line)->setValue($value); $style = $sheet->getStyleByColumnAndRow($c, $line); - if(!$field[$key]['editable'] || $field[$key]['type'] === 'noteditable' || $field[$key]['type'] === 'hidden') { $style->getProtection()->setLocked(Protection::PROTECTION_PROTECTED); $style->getFill()->setFillType(Fill::FILL_SOLID)->getStartColor()->setARGB('dddddd'); -- 2.39.5