Merge pull request 'Hiệu chỉnh format cột bảng dữ liệu export' (#66) from Sprint-4/MS-37-FE-Evaluation into master

Reviewed-on: #66
This commit is contained in:
vincent.vo 2024-09-21 13:28:23 +10:00
commit 033599402e
1 changed files with 10 additions and 10 deletions

View File

@ -200,17 +200,17 @@ class EvaluationController extends Controller
$table->addRow();
$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(3000, ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER])->addText('Criteria', ['bold' => true], ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]);
$table->addCell(3000, ['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]);
$table->addCell(1500, ['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(3000)->addText($criteria['criteria']);
$table->addCell(3000)->addText($criteria['note']);
$table->addCell(2500)->addText($criteria['createdBy']);
$table->addCell(2500, ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER, 'valign' => 'center'])->addText($criteria['point'] > 0 ? $criteria['point'] : '', [], ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]);
$table->addCell(1500, ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER, 'valign' => 'center'])->addText($criteria['point'] > 0 ? $criteria['point'] : '', [], ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]);
}
$section->addText(' ', [], [
@ -235,16 +235,16 @@ class EvaluationController extends Controller
]);
$table->addRow();
$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(1500, ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER])->addText('Level', ['bold' => true], ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]);
$table->addCell(3500, ['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, ['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(1500, ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER, 'valign' => 'center'])->addText($technical['level'], [], ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]);
$table->addCell(3500)->addText($technical['name']);
$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);
}