tussenstand

This commit is contained in:
2024-01-25 11:03:38 +01:00
parent d802c1eb6b
commit e46a239206
8 changed files with 321 additions and 66 deletions
@@ -496,6 +496,51 @@ $lijsten[0]->vorm=2;
$this->Phantom_model->create_pdf($html, $filenaam, FALSE, FALSE, FALSE);
}
function ijkpuntenpdf(){
$inputstring = $this->input->post('data');
$input = json_decode($inputstring);
$versieID = $input->versie;
$titel = $this->Modules_model->get_module_bij_versie($versieID);
$data= [];
$datum = new DateTime();
$datum = $datum->format('Y-m-d H:i:s');
$filenaam = preg_replace('/\s+/', '', $titel)."_". preg_replace('/\s+/', '', $datum);
$data['titel'] = $titel;
$data['chart'] = $input->chart;
$data['tabellen'] = $input->tabellen;
$data['legenda'] = $input->legenda;
$data['ambities'] = $input->ambities;
$data['resultaten'] = $input->resultaten;
$logo = [];
$html = $this->load->view("monpas/reports/ijkpuntenchart", $data, true);
$filenaam="ijkpunten";
$orientatie = 'landscape';
$this->Phantom_model->create_pdf($html, $filenaam, FALSE, FALSE, FALSE, $orientatie);
// $this->Phantom_model->create_pdf($html, $filenaam, FALSE, TRUE, FALSE, 'portrait');
// $pdf = $this->Phantom_model->create_and_get_pdf($html, $filenaam, FALSE, TRUE, FALSE, 'portrait');
// $pdf = $pdf.'pdf';
// $fileNameRapport = '../documents/tmp/'.random_string('alnum', 40).'.pdf';
// file_put_contents($fileNameRapport, $pdf);
//
// header( 'Cache-Control: public' );
// header( 'Content-type: application/pdf' );
// header( 'Content-Disposition: inline; filename=" ' . $filenaam . ' ".pdf" ' );
// header( 'Content-Length: ' . filesize( $fileNameRapport ) );
// readfile($fileNameRapport );
// unlink($fileNameRapport);
}
function maakijkpuntenpdf(){
//TODO clean input
@@ -228,8 +228,10 @@ class Lijsten
if(intval($this->lijst->aantalorgs) == 1) $scholen = ' school';
$toevoeging = '';
$versie = ', schoolversie';
$versie2 = 'schoolversie';
if(intval($this->lijst->vorm) == 2) {
$versie = ', ind. versie';
$versie2 = 'individuele versie';
$metingen =' metingen';
if(intval($this->lijst->metingen) == 1) $metingen = ' meting';
$toevoeging = ', '. $this->lijst->metingen. $metingen;
@@ -239,6 +241,9 @@ class Lijsten
$this->lijst->vantm = "p. " . $this->lijst->orgversie->periodenummer . " van " .
mysql2date($this->lijst->orgversie->geldigvanaf) . " t/m " . mysql2date($this->lijst->orgversie->geldigtm) .
$versie . $toevoeging;
$this->lijst->vantmresult = " <span>periode ". $this->lijst->orgversie->periodenummer ."</span><br><span>".
mysql2date($this->lijst->orgversie->geldigvanaf)." t/m " . mysql2date($this->lijst->orgversie->geldigtm) .
"</span><br><span>".$versie2 . $toevoeging."</span>";
}
private function setLijsten(){
@@ -125,6 +125,14 @@ class Modules_model extends MY_Model{
return $this->get_query_row("pad");
}
function get_module_bij_versie($versieID){
$this->sql = "SELECT M.naam
FROM tb_modules M
JOIN tb_versies V ON M.sysnr = V.modulenr
WHERE V.id = {$versieID}";
return $this->get_query_row("naam");
}
+64 -54
View File
@@ -212,18 +212,19 @@
<!-- </table>-->
</div>
<div id="alleIJktabellen" class="row ">
<div class="col-xs-12">
<div style="margin-left: 30px" >
<div class="tabelcontainer">
<table style="float: left; width: 300px;" >
<table class="tabelitem1pdf">
<thead>
<tr style="height: 100px;">
<tr style="height: 110px;" class="headpdf">
<th
style="border-right: 2px solid white; width:50px; padding-left: 10px;vertical-align: top; border-bottom: none">
style="border-right: 1px solid white; padding-left: 10px;vertical-align: top; border-bottom: none">
nr
</th>
<th
style="border-right: 2px solid white; width:400px; padding-left: 4px;vertical-align: top; border-bottom: none" data-bind="text: label"
style="border-right: 1px solid white; padding-left: 4px;vertical-align: top; border-bottom: none" data-bind="text: label"
>
</th>
@@ -255,34 +256,34 @@
</table>
</div>
<div style="margin-left: 30px" data-bind="foreach: lijsten">
<!--ko foreach: lijsten-->
<!-- Nieuwste meting + ijkpunten van school, bestuur en kamer-->
<table style="float: left; width: 150px;" data-bind="visible: $root.isSWV()==false && tooninfo() == true">
<table class="tabelitem" data-bind="visible: $root.isSWV()==false && tooninfo() == true">
<thead>
<tr style="height: 40px;">
<tr class="headpdf " style="height: 40px;">
<th colspan="2"
style="border-right: 2px solid white; width: 100px; font-size: 10px; border-bottom: 1px solid #a07b8e;"
style="border-right: 1px solid white; width: 100px; font-size: 10px; border-bottom: 1px solid #a07b8e;"
data-bind="text: vantm ">
</th>
</tr>
<tr style="height: 40px;">
<tr class="headpdf " style="height: 50px;">
<th colspan="1"
style="border-right: 1px solid #a07b8e; overflow: hidden; text-overflow: ellipsis; vertical-align: top; font-size: 10px; padding-left: 3px;"
data-bind=" text: $root.selectedUser() ? $root.selectedUser().naam : orgnaam">
</th>
<th colspan="1"
style="overflow: hidden; text-overflow: ellipsis; font-size: 10px;vertical-align: top; border-right: 2px solid white; padding-left: 3px;"
style="overflow: hidden; text-overflow: ellipsis; font-size: 10px;vertical-align: top; border-right: 1px solid white; padding-left: 3px;"
data-bind=" text: naamV">
</th>
</tr>
<tr style="height: 20px;">
<tr class="headpdf" style="height: 20px;">
<th colspan="1" style="font-size: 10px; border-right: 1px solid #a07b8e; padding-left: 3px;"
data-bind="text: 'metingen: ' + metingen " >
</th>
<th colspan="1" style="font-size: 10px; border-right: 2px solid white; padding-left: 3px;"
<th colspan="1" style="font-size: 10px; border-right: 1px solid white; padding-left: 3px;"
data-bind="text: 'metingen: ' + metingenV"></th>
</tr>
</thead>
@@ -302,31 +303,31 @@
</table>
<!-- metingen ter vergelijking van school bestuur en kamer-->
<table style="float: left; width: 150px;" data-bind="visible: tooninfo() == false && $root.isSWV() == false && erzijnscores()== true; ">
<table class="tabelitem" data-bind="visible: tooninfo() == false && $root.isSWV() == false && erzijnscores()== true; ">
<thead>
<tr style="height: 40px; border-bottom: none">
<tr class="headpdf" style="height: 40px; border-bottom: none">
<th colspan="2"
style="border-right: 2px solid white; font-size: 10px; border-bottom: 1px solid #a07b8e;"
style="border-right: 1px solid white; font-size: 10px; border-bottom: 1px solid #a07b8e;"
data-bind="text: vantm ">
</th>
</tr>
<tr style="height: 40px;">
<tr class="headpdf" style="height: 50px;">
<th colspan="1"
style="border-right: 1px solid #a07b8e; overflow: hidden; text-overflow: ellipsis; vertical-align: top; font-size: 10px; padding-left: 3px;"
data-bind=" text: orgnaam">
</th>
<th colspan="1"
style="overflow: hidden; text-overflow: ellipsis; font-size: 10px; vertical-align: top; border-right: 2px solid white; padding-left: 3px;"
style="overflow: hidden; text-overflow: ellipsis; font-size: 10px; vertical-align: top; border-right: 1px solid white; padding-left: 3px;"
data-bind=" text: naamV" >
</th>
</tr>
<tr style="height: 20px;">
<tr class="headpdf" style="height: 20px;">
<th colspan="1"
style="font-size: 10px; border-right: 1px solid #a07b8e; padding-left: 3px;"
data-bind="text: 'metingen: ' + metingen " >
</th>
<th colspan="1"
style="font-size: 10px; border-right: 2px solid white; padding-left: 3px;"
style="font-size: 10px; border-right: 1px solid white; padding-left: 3px;"
data-bind="text: 'metingen: ' + metingenV " >
</th>
</tr>
@@ -348,19 +349,19 @@
</table>
<!-- Nieuwste meting + ijkpunten van swv-->
<table style="float: left; width: 150px;" data-bind="visible: tooninfo()== true && $root.isSWV() == true ">
<table class="tabelitem" data-bind="visible: tooninfo()== true && $root.isSWV() == true ">
<thead>
<tr >
<th style= "border-right: 2px solid white; width: 100px; font-size: 10px; height: 40px; border-bottom: 1px solid #a07b8e;"
<tr class="headpdf" >
<th style= "border-right: 1px solid white; width: 100px; font-size: 10px; height: 40px; border-bottom: 1px solid #a07b8e;"
data-bind="text: vantm ">
</th>
</tr>
<tr style="height: 40px; ">
<tr class="headpdf" style="height: 50px; ">
<th style=" overflow: hidden; text-overflow: ellipsis; vertical-align: top; font-size: 10px; height: 40px; padding-left: 3px;"
data-bind=" text: orgnaam">
</th>
</tr>
<tr style="height: 20px; ">
<tr class="headpdf" style="height: 20px; ">
<th style="font-size: 10px; padding-left: 3px; height: 20px;"
data-bind="text: 'metingen: ' + metingen " >
</th>
@@ -377,21 +378,21 @@
</table>
<!-- Metingen ter vergelijking van swv-->
<table style="float: left; width: 150px;" data-bind="visible: tooninfo() == false && $root.isSWV() == true">
<table class="tabelitem"data-bind="visible: tooninfo() == false && $root.isSWV() == true">
<thead>
<tr style="height: 40px; border-bottom: none">
<th style="border-right: 2px solid white; font-size: 10px; height: 40px;border-bottom: 1px solid #a07b8e;"
<tr class="headpdf" style="height: 40px; border-bottom: none">
<th style="border-right: 1px solid white; font-size: 10px; height: 40px;border-bottom: 1px solid #a07b8e;"
data-bind="text: vantm ">
</th>
</tr>
<tr style="height: 40px;">
<tr class="headpdf" style="height: 50px;">
<th
style="border-right: 2px solid white; height: 40px; overflow: hidden; text-overflow: ellipsis; vertical-align: top; font-size: 10px; padding-left: 3px;"
style="border-right: 1px solid white; height: 40px; overflow: hidden; text-overflow: ellipsis; vertical-align: top; font-size: 10px; padding-left: 3px;"
data-bind=" text: orgnaam">
</th>
</tr>
<tr style="height: 20px;">
<th style="font-size: 10px; border-right: 2px solid white; padding-left: 3px; height: 20px"
<tr class="headpdf" style="height: 20px;">
<th style="font-size: 10px; border-right: 1px solid white; padding-left: 3px; height: 20px"
data-bind="text: 'metingen: ' + metingen " >
</th>
</tr>
@@ -405,14 +406,18 @@
</tr>
</tbody>
</table>
<!--/ko-->
</div>
</div>
</div>
</div>
<div class="row" data-bind="visible: erzijnlijsten()== true">
<table style=" margin-top: 20px; margin-left: 50px; width: 230px;" data-bind="with: scorekleuren, visible: erzijnlijsten() == true">
<div class="col-xs-12">
<table id="ijktabellegenda" class="pdflegenda" style=" margin-top: 20px; width: 230px;" data-bind="with: scorekleuren, visible: erzijnlijsten() == true">
<tr data-bind="visible: $root.scoretype != 7 ">
<td style="width: 30px; border-bottom: 1px solid #ebebeb; background-color: #99d6ff"></td>
<td style="padding-left:10px; border-bottom: 1px solid #ebebeb;"data-bind="text: 'score >= ' + grens3 + ' en <= ' + grens4"></td>
@@ -436,15 +441,15 @@
</tr>
</table>
</div>
<div class="row">
<div class="col-xs-12 "data-bind="visible: erzijnlijsten() == true">
<div class="col-xs-5">
<h4 style="margin-top: 30px; margin-left: 10px;">Ambities</h4>
<div data-bind="foreach: lijsten" style="margin: 5px">
</div>
<div data-bind="visible: erzijnlijsten() == true">
<div id="ijkambities" class="row">
<div class="col-xs-12">
<h4 class="h4koppdf" style="margin-top: 30px;">Ambities</h4>
<div class="blokjescontainer" data-bind="foreach: lijsten" >
<!--ko if: $parent.eigenambitie() || $index() == 0 -->
<div class="col-xs-11" style="background-color:#f5f0f2; padding: 5px; padding-left: 10px;border-radius: 2px">
<div class=" blokjesitempdf">
<!--ko if: $parent.eigenambitie() -->
<span style="font-weight: bold; margin-bottom: 10px" data-bind="text: vantm + ':'"></span>
<br>
@@ -457,29 +462,33 @@
<span data-bind="text: ambitievan "></span>
<br>
</div>
<!-- /ko-->
</div>
</div>
</div>
<div class="col-xs-5 ">
<h4 style="margin-top: 30px; ">Resultaten</h4>
<div data-bind="foreach: lijsten" >
<div data-bind="visible: metingen > 0;" style="background-color:#f5f0f2; padding: 5px; padding-left: 10px; border-radius: 2px;">
<p style="font-weight: bold; margin-bottom: 10px; "data-bind="text: vantm + ':'"></p>
<p data-bind= " text: 'gemiddelde score ' + totgem + ' %, ' +
ijkpuntenok + ' ' + label +
<div id="ijkresultaten" class="row">
<div class="col-xs-12 ">
<h4 class="h4koppdf" style="margin-top: 30px; ">Resultaten</h4>
<div class="blokjescontainer" data-bind="foreach: lijsten" >
<!--ko if: metingen > 0 -->
<div class="blokjesitem" ">
<div style="font-weight: bold; margin-bottom: 12px; " data-bind="html: vantmresult "></div>
<span data-bind= " text: 'gemiddelde score ' + totgem + ' %, ' "></span>
<br>
<span data-bind="text: ijkpuntenok + ' ' + label +
' op ' + zprocent + '% of hoger'">
</p>
<p style="margin-bottom: 10px" data-bind="text: 'hoogst scorende ' + label + ' is nummer ' + welkehoogste +
</span>
<p style="margin-bottom: 10px" data-bind="text: ' het hoogst scorende ' + label2 + ' is nummer ' + welkehoogste +
' met een score van ' + hoogstescore"></p>
<p style="margin-bottom: 10px" data-bind="text: 'laagst scorende ' + label + ' is nummer ' + welkelaagste +
<p style="margin-bottom: 10px" data-bind="text: ' het laagst scorende ' + label2 + ' is nummer ' + welkelaagste +
' met een score van ' + laagstescore">
</p>
</div>
<div style="margin-bottom: 10px; background-color: white; ">
</div>
<!--/ko-->
</div>
</div>
</div>
@@ -492,6 +501,7 @@
<?php $this->load->view("monpas/modals/ijkpuntenlijst_modal"); ?>
</div>
@@ -257,14 +257,15 @@
};
?>
</div>
<div style=" width: 450px; float: left; margin-right: 20px;">
<div style=" width: 600px; float: left; ">
<h2 >Resultaten</h2>
<?php
foreach($lijsten as $lijst){
?>
<div style=" background-color: #f5f0f2; padding: 10px; border-radius: 2px; width: 450px;">
<p>Periode: <?=$lijst->vantm?>
<div style="width:150px; background-color: #ffffff">
<div style=" background-color: #f5f0f2; padding: 10px; margin: 5px; border-radius: 2px; width: 140px; float: left; display: inline-block">
<p>Periode: <?=$lijst->vantmresult?>
</p>
<p>Betreft: <?=$lijst->metingen?><?php if ($lijst->metingen ==1 ) {echo " meting"; } else {echo "metingen";}; ?>
</p>
@@ -280,7 +281,8 @@
met een score van <?=$lijst->laagstescore?>.
</p>
</div>
<br>
</div>
<?php };
?>
</div>
@@ -0,0 +1,131 @@
<!doctype html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<!-- <link rel="stylesheet"-->
<!-- href="--><?php //echo $this->config->item('vendor_url');?><!--/css_lib/bootstrap-3.3.2-dist/css/bootstrap.css" crossorigin="anonymous" />-->
<!---->
<!-- <script type="text/javascript"-->
<!-- src="--><?php //echo $this->config->item('vendor_url_secure');?><!--/css_lib/bootstrap-3.3.2-dist/js/bootstrap.min.js"></script>-->
<script type="text/javascript"
src="<?php echo $this->config->item('vendor_url');?>/js_lib/knockout.min.js"></script>
<?php { ?>
<style>
.headpdf{
background-color:#ded0d7;
}
.blokjesitempdf{
margin 2px;
padding: 10px 5px 5px 10px;
height: 125px !important;
width: 22%;
font-size:0.8em;
background-color:#f5f0f2 !important;
border-radius: 2px;
}
.h4koppdf{
font-size: 1.5em !important;
font-family: Verdana, Geneva, sans-serif !important;
font-weight: normal;
margin-bottom: 5px;
margin-left: 0;
padding-left: 0;
}
.blokjesitem{
background-color:#f5f0f2 !important;
float:left;
width:22%;
margin 2px;
margin-right:15px;
padding: 10px 5px 5px 10px;
border-radius: 2px;
height: 325px;
font-size:0.8em;
font-family: Verdana, Geneva, sans-serif !important;
}
.tabelitem{
float: left;
font-size:0.8em;
font-family: Verdana, Geneva, sans-serif !important;
width:15%;
margin: 0;
}
.tabelitem1pdf{
width: 35% !important;
float: left;
font-size:0.8em;
font-family: Verdana, Geneva, sans-serif !important;
margin: 0;
}
.pdflegenda{
font-size:0.8em;
font-family: Verdana, Geneva, sans-serif !important;
width:35%;
height: 150px!important;
margin-top: 5px;
}
</style>
<?php }; ?>
</head>
<body style="font-size:1.3em; font-family: Verdana, Geneva, sans-serif !important;">
<div style=" padding: 5px; font-size: 2em; " >
<?=$titel?>
</div>
<div style="margin-top: 10px; margin-bottom: 20px; page-break-after: always; ">
<?php if (isset($chart) ) {?>
<div >
<img src="<?=$chart?>"
</div>
<?php }; ?>
</div>
<div style="font-family: Verdana, Geneva, sans-serif !important;">
<?=$tabellen?>
</div>
<br>
<br/>
<p>legenda</p>
<div style=" font-family: Verdana, Geneva, sans-serif !important;">
<?=$legenda?>
</div>
<br>
<div style=" font-family: Verdana, Geneva, sans-serif !important;">
<?=$ambities?>
</div>
<!-- <div class="eindepagina"></div>-->
<div style=" font-family: Verdana, Geneva, sans-serif !important; page-break-before: always">
<?=$resultaten?>
</div>
</body>
</html>
+31
View File
@@ -1296,3 +1296,34 @@ z-index: 50;
box-shadow: none;
}
.blokjescontainer{
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-gap: 4px;
}
.blokjesitempdf{
background-color:#f5f0f2 !important;
padding: 5px;
padding-left: 10px;
border-radius: 2px;
}
.blokjesitem{
background-color:#f5f0f2 !important;
padding: 5px;
padding-left: 10px;
border-radius: 2px;
}
.tabelcontainer{
display: grid;
grid-template-columns: 300px 150px 150px 150px 150px;
grid-gap: 0;
margin-left: 20px;
}
.tabelitem{
}
.h4koppdf{
}
+25 -2
View File
@@ -125,10 +125,12 @@ ls.initIJkpuntenModel = function(){
this.metingen = l.metingen;
this.metingenV = l.metingenV;
this.vantm = l.vantm;
this.vantmresult = l.vantmresult;
this.periodenummer = l.orgversie.periodenummer
this.jaartal = l.jaartal;
this.label = l.label;
this.label2 = l.label2;
this.gemscore = l.ambities.gemscore;
this.ijkpunten = l.ambities.xijkpunten;
this.zprocent = l.ambities.zprocent;
@@ -396,7 +398,6 @@ ls.initIJkpuntenModel = function(){
var orgversie =
{'orgversieid': p.orgversieid,
'vorm' : p.vorm };
self.selectie.push(orgversie);
}
@@ -848,9 +849,31 @@ ls.initIJkpuntenModel = function(){
},
fPrint: function () {
var self = ls.IJkpuntenModel;
var chart = document.getElementById("hc-chart1").outerHTML;
var tabellen = document.getElementById("alleIJktabellen").outerHTML;
var legenda = document.getElementById("ijktabellegenda").outerHTML;
var ambities = document.getElementById("ijkambities").outerHTML
var resultaten = document.getElementById("ijkresultaten").outerHTML;
var sd = {
chart: chart,
tabellen: tabellen,
legenda: legenda,
ambities: ambities,
resultaten: resultaten,
versie: self.selectedSerie().versieid
};
data = JSON.stringify(sd);
var $form = $("<form method='post' action='index.php/monpas/rapijkpunten/ijkpuntenpdf/' target='_blank'>").append($('<input type = "hidden" name="data" id ="ijkpdf">').val(data));
$form.appendTo("body").submit();
},
fPrintEvenNiet: function(){
var self = ls.IJkpuntenModel;
// var element = document.querySelector('#hc-chart1')
// var svgAsXML = (new XMLSerializer).serializeToString(element);
var orgid = self.selectedOrg().id;