Merge branch 'master' of https://gitea.nswteam.net/joseph/ManagementSystem into Sprint-4/MS-36-FE-Technical

This commit is contained in:
dbdbd9 2024-09-21 10:29:01 +07:00
commit edb873f1f1
1 changed files with 16 additions and 14 deletions

View File

@ -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(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(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)->addText($criteria['point']);
$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(' ', [], [
@ -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(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)->addText($technical['level']);
$table->addCell(2500)->addText($technical['name']);
$table->addCell(2500)->addText($technical['point']);
$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);
}