Files
monpas/application/views/monpas/compactsop/tevredencompact.php
T
2022-03-01 14:43:16 +01:00

255 lines
11 KiB
PHP

<div class="sopOnderdeelBlok" >
<div class="sopTitelHolder">
<?php if($naam){ ?>
<p class="sopTitel"><?php echo $naam ?></p>
<?php if ($data['lijsten'][0]){ ?>
<div ><p class="subTitel1" >
<?php echo $data['versienaam']?>
</p>
<?php foreach($data['lijsten'] as $index => $lijst){
?>
<p class="subTitel2"><?php echo $lijst->vantm ?></p>
<?php }; ?>
</div>
<?php } ?>
<?php }; ?>
</div>
<div class="sopKaderGrafiek highcharts-background"
id="chartCompactTevreden"
style=" width:355px; height: 150px;">
</div>
<script>
<?php if ($data['lijsten']){ ?>
$(function(){
fFillGraph13=function(){
var xas = [];
var verkorteVersies = [];
var balkGegevens = [];
var lijnGegevens;
<?php foreach($data['lijsten'] as $index => $lijst){ ?>
var indexnummer = <?= $index?>;
var labels = [];
var scores = [];
var ambities = [];
var xastitel = '';
<?php if($lijst->label){ ?>
var xastitel = '<?php echo $lijst->label ?>';
<?php } ?>
<?php foreach($lijst->scores as $index2 => $score){
?>
labels.push(<?php $score->nummer ?>);
<?php if(floatval($score->gem) > 0 ){ ?>
scores.push({
y: <?= floatval($score->gem) ?>,
color: '<?=$score->kleur ?>',
name: '<?= $score->nummer ?>',
});
<?php } ?>
<?php if($score->gem == 0 ){ ?>
scores.push({
y: null,
color: '<?=$score->kleur ?>',
name: '<?= $score->nummer ?>',
});
<?php } ?>
<?php } // foreach lijstscores ?>
verkorteVersies.push(<?= $lijst->periodenummer ?>);
var ambitiewaarde =<?=$data['lijsten'][0]->ambities->gemscore; ?>;
ambities.push(
{ y: <?=$data['lijsten'][0]->ambities->gemscore; ?>,
color: '#000000',
name: '',
}
);
labels.unshift(' ');
var legescore ={
y : null,
color : 'transparent',
name : '0',
};
scores.unshift(legescore);
verkorteVersies.unshift(<?= $lijst->periodenummer ?>);
labels.push(' ');
scores.push(legescore);
verkorteVersies.push(<?=$lijst->periodenummer ?>);
balkGegevens[indexnummer] =({
dataLabels: {
format: '<span style="font-size: 8px;">{point.versie}</span>'
},
type : 'column',
name : verkorteVersies,
backgroundColor: '#e6e6e6',
data : scores
});
<?php } // foreach lijsten ?>
var extralijn = {
y: ambitiewaarde,
name: '',
};
ambities.unshift(extralijn);
ambities.push(extralijn);
var splinedata=[];
var xas = [];
if (balkGegevens[0]){
$.each(balkGegevens[0].data,function(i,p){
if (p.name=== '0') xas.push('')
else xas.push(p.name);
splinedata.push(ambitiewaarde)
});
}
lijnGegevens = ({
dataLabels: {
format: ''
},
type: 'spline',
name: verkorteVersies,
data: splinedata //ambities
});
balkGegevens.push(lijnGegevens);
// });
var ijkgrafiek;
ijkgrafiek = Highcharts.chart('chartCompactTevreden', {
chart:{
animation: false,
backgroundColor: '#e6e6e6',
options3d: {
enabled: true,
alpha: 15,
beta: 15,
viewDistance: 25,
depth: 40
},
},
title:{
text:''
},
credits: {
enabled: false
},
xAxis: {
type: 'category',
categories: xas,
labels:{
skew3d: true,
style:{
fontSize: '8px'
}
}
},
yAxis: {
min:0,
max: 100,
title: false,
labels:{
skew3d: true,
style:{
fontSize: '8px'
}
}
},
legend: {
enabled: false
},
plotOptions: {
column:{
pointPadding: 0.05,
borderWidth:0
},
series:{
groupPadding: 0.05,
animation: false,
dataLabels: {
enabled: true,
inside: true,
align: 'center',
verticalAlign: 'top',
color: '#404040',
style: {
textOutline: false
}
}
},
spline: {
color: 'grey',
pointStart: 0,
marker: {
enabled: false
}
}
},
series: balkGegevens,
showInLegend: false
});
}()
});
<?php } ?>
</script>
<div class="sopKaderTabel" >
<?php if ($data['lijsten'][0]->scores){
?>
<table class="sopTabel">
<thead >
<tr >
<th style="width: 20px; padding-left: 3px; ">nr</th>
<th style=" width: 230px; padding-left:3px; "> <?=$data['lijsten'][0]->label?></th>
<?php foreach ($data['lijsten'] as $lijst){ ?>
<th style="width: 30px; padding-right: 3px; ">
<?php echo 'p.'. $lijst->periodenummer; ?>
</th>
<?php }; // foreach ?>
</tr>
</thead>
<tbody >
<?php $i =0;
foreach( $data['lijsten'][0]->scores as $score){ ?>
<tr style="border:1px solid lightgrey;" >
<td style=" padding-left: 3px;" ><?php if($score->nummer != 'gem'){ echo $score->nummer . '.';}?>
</td>
<td style="overflow-x: hidden; overflow-y: hidden; text-overflow: ellipsis; white-space: nowrap; " ><?php echo isset($score->omschrijving) ? $score->omschrijving: 'Gemiddelde'?>
</td>
<?php foreach ($data['lijsten'] as $lijst){
$kleur = $lijst->scores[$i]->disabled == 'T' || $lijst->scores[$i]->disablenvt == 'T' ? '' : (isset($lijst->scores[$i]->kleur) ? $lijst->scores[$i]->kleur : '');
$gem = $lijst->scores[$i]->disabled == 'T' ? 'uit' : ($lijst->scores[$i]->disablenvt == 'T' ? 'nvt' : (isset($lijst->scores[$i]->gem) ? $lijst->scores[$i]->gem : '')); ?>
<td style="background-color: <?=$kleur ?> !important;
padding-right: 3px;
text-align: right" >
<?=$gem?>
</td>
<?php }; // foreach data[lijsten]
$i++; ?>
</tr>
<?php ;} ; ?>
</tbody>
<tr >
<td colspan="8"
class="inforegel">Scores in procenten </td>
</tr>
</table>
<?php } ?>
</div>
</div>