diff --git a/BACKEND/Modules/Admin/app/Http/Controllers/EvaluationController.php b/BACKEND/Modules/Admin/app/Http/Controllers/EvaluationController.php index 2023d29..dbe194a 100644 --- a/BACKEND/Modules/Admin/app/Http/Controllers/EvaluationController.php +++ b/BACKEND/Modules/Admin/app/Http/Controllers/EvaluationController.php @@ -199,17 +199,18 @@ class EvaluationController extends Controller ]); $table->addRow(); - $table->addCell(2500)->addText('Criteria', ['bold' => true]); - $table->addCell(2500)->addText('Note', ['bold' => true]); - $table->addCell(2500)->addText('Created By', ['bold' => true]); - $table->addCell(2500)->addText('Point', ['bold' => true]); + + $table->addCell(2500, ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER])->addText('Criteria', ['bold' => true], ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]); + $table->addCell(2500, ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER])->addText('Note', ['bold' => true], ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]); + $table->addCell(2500, ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER])->addText('Created By', ['bold' => true], ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]); + $table->addCell(2500, ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER])->addText('Point', ['bold' => true], ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]); foreach ($sprint['criterias'] as $criteria) { $table->addRow(); $table->addCell(2500)->addText($criteria['criteria']); $table->addCell(2500)->addText($criteria['note']); $table->addCell(2500)->addText($criteria['createdBy']); - $table->addCell(2500)->addText($criteria['point']); + $table->addCell(2500, ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER, 'valign' => 'center'])->addText($criteria['point'] > 0 ? $criteria['point'] : '', [], ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]); } $section->addText(' ', [], [ @@ -233,17 +234,18 @@ class EvaluationController extends Controller 'cellMargin' => 80, ]); $table->addRow(); - $table->addCell(2500)->addText('Level', ['bold' => true]); - $table->addCell(2500)->addText('Name', ['bold' => true]); - $table->addCell(2500)->addText('Point', ['bold' => true]); - $table->addCell(2500)->addText('Last Update', ['bold' => true]); + + $table->addCell(2500, ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER])->addText('Level', ['bold' => true], ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]); + $table->addCell(2500, ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER])->addText('Name', ['bold' => true], ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]); + $table->addCell(2500, ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER])->addText('Point', ['bold' => true], ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]); + $table->addCell(2500, ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER])->addText('Last Update', ['bold' => true], ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]); foreach ($technicalData as $technical) { $updated_at = $technical['updated_at'] ? Carbon::parse($technical['updated_at'])->format('d/m/Y H:i:s') : null; $table->addRow(); - $table->addCell(2500)->addText($technical['level']); + $table->addCell(2500, ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER, 'valign' => 'center'])->addText($technical['level'], [], ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]); $table->addCell(2500)->addText($technical['name']); - $table->addCell(2500)->addText($technical['point']); + $table->addCell(2500, ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER, 'valign' => 'center'])->addText($technical['point'], [], ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]); $table->addCell(2500)->addText($updated_at); }