Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 855 | Rev 941 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 855 Rev 939
Línea 354... Línea 354...
354
            $userMapper = $CompanyUserMapper->fetchOne($companySelfEvaluationTest->user_id);
354
            $userMapper = $CompanyUserMapper->fetchOne($companySelfEvaluationTest->user_id);
Línea 355... Línea 355...
355
 
355
 
Línea 356... Línea 356...
356
            if ($companySelfEvaluationForm && $userMapper) {
356
            if ($companySelfEvaluationForm && $userMapper) {
357
 
-
 
358
                return $this->renderPDF($companySelfEvaluationForm, $companySelfEvaluationTest, $userMapper);
357
 
Línea 359... Línea 358...
359
           
358
                return $this->renderPDF($companySelfEvaluationForm, $companySelfEvaluationTest, $userMapper);
360
            } else {
359
            } else {
361
 
360
 
362
                $data = [
361
                $data = [
Línea 363... Línea 362...
363
                    'success' => false,
362
                    'success' => false,
364
                    'data' => 'ERROR_METHOD_NOT_ALLOWED'
363
                    'data' => 'ERROR_METHOD_NOT_ALLOWED'
365
                ];
-
 
366
 
364
                ];
367
                return new JsonModel($data);
365
 
368
            }
366
                return new JsonModel($data);
369
 
367
            }
370
        } else {
368
        } else {
Línea 398... Línea 396...
398
        //Generate New PDF
396
        //Generate New PDF
399
        $pdf = new SelfEvaluationPDF();
397
        $pdf = new SelfEvaluationPDF();
Línea 400... Línea 398...
400
 
398
 
401
        $pdf->AliasNbPages();
399
        $pdf->AliasNbPages();
402
        $pdf->AddPage();
400
        $pdf->AddPage();
403
        
401
 
404
        // Set header secundary
402
        // Set header secundary
Línea 405... Línea 403...
405
        $pdf->customHeader($headerFormName, $headerUserName);
403
        $pdf->customHeader($headerFormName, $headerUserName);
406
 
404
 
Línea 428... Línea 426...
428
 
426
 
429
            $values = [$valueSection, $totalQuestion];
427
            $values = [$valueSection, $totalQuestion];
Línea 430... Línea 428...
430
            $valueFormQuestions = $valueFormQuestions + $totalQuestion;
428
            $valueFormQuestions = $valueFormQuestions + $totalQuestion;
431
 
429
 
432
 
430
 
433
            $filename = 'data' . DIRECTORY_SEPARATOR . 'self-evaluation'. $sections[$i]['slug_section'] . '.png';
431
            $filename = 'data' . DIRECTORY_SEPARATOR . 'self-evaluation' . $sections[$i]['slug_section'] . '.png';
434
            $pdf->pieChart($labels, $values,'',$filename);
432
            $pdf->pieChart($labels, $values, '', $filename);
435
            $pdf->SetFont('Arial', '', 8);
433
            $pdf->SetFont('Arial', '', 8);
436
            $pdf->Cell(190, 10, utf8_decode($sections[$i]['name']), 0, 0, 'C');
434
            $pdf->Cell(190, 10, utf8_decode($sections[$i]['name']), 0, 0, 'C');
Línea 449... Línea 447...
449
        $pdf->Cell(190, 10, utf8_decode('Desempeño General'), 0, 0, 'C');
447
        $pdf->Cell(190, 10, utf8_decode('Desempeño General'), 0, 0, 'C');
450
        $pdf->setY($pdf->getY() + 10);
448
        $pdf->setY($pdf->getY() + 10);
Línea 451... Línea 449...
451
 
449
 
Línea 452... Línea 450...
452
        $values = [$valueFormSections, $valueFormQuestions];
450
        $values = [$valueFormSections, $valueFormQuestions];
453
 
451
 
454
        $filenameGeneral = 'data' . DIRECTORY_SEPARATOR . 'self-evaluation'. uniqid() . '.png';
452
        $filenameGeneral = 'data' . DIRECTORY_SEPARATOR . 'self-evaluation' . uniqid() . '.png';
455
        $pdf->pieChart($labels, $values, '', $filenameGeneral);
453
        $pdf->pieChart($labels, $values, '', $filenameGeneral);
Línea 456... Línea 454...
456
        $pdf->Image($filenameGeneral, 60, $pdf->getY(), 90);
454
        $pdf->Image($filenameGeneral, 60, $pdf->getY(), 90);
Línea 457... Línea 455...
457
        $pdf->setY($pdf->getY() + 60);
455
        $pdf->setY($pdf->getY() + 60);
458
 
456
 
459
        if($companySelfEvaluationTest->comments){
457
        if ($companySelfEvaluationTest->comments) {
460
 
-
 
461
            $pdf->SetFont('Arial','B', 10);
-
 
462
            $pdf->Cell(190,10, utf8_decode('Comentarios finales'),0,0,'C');
-
 
463
            $pdf->setY($pdf->getY() + 10);
-
 
Línea -... Línea 458...
-
 
458
 
-
 
459
            $pdf->SetFont('Arial', 'B', 10);
-
 
460
            $pdf->Cell(190, 10, utf8_decode('Comentarios finales'), 0, 0, 'C');
464
            
461
            $pdf->setY($pdf->getY() + 10);
Línea 465... Línea 462...
465
            $pdf->SetFont('Arial','', 8);
462
 
466
            $pdf->MultiCell(180,  8, utf8_decode($companySelfEvaluationTest->comments));
463
            $pdf->SetFont('Arial', '', 8);