sops per criterium bors,robs en swop niet
This commit is contained in:
@@ -9,7 +9,8 @@ class Overzichtsop extends MY_Controller{
|
||||
"shared/Organisaties_model",
|
||||
"shared/Orgusers_model",
|
||||
"monpas/Compactsop_model",
|
||||
"monpas/Sorteringen_model"
|
||||
"monpas/Sorteringen_model",
|
||||
"monpas/Sorteerlabels_model",
|
||||
|
||||
|
||||
|
||||
@@ -22,16 +23,30 @@ class Overzichtsop extends MY_Controller{
|
||||
if (!$this->userid) die;
|
||||
$schooljaren = $this->Schooljaren_model->getschooljaren();
|
||||
$org = $this->Organisaties_model->get_record_by_id($this->globorgid);
|
||||
$swvID = $this->getSWVID($this->globorgid);
|
||||
$criteria = $this->Sorteringen_model->get_criteriabijSWV($swvID);
|
||||
if(!$criteria){
|
||||
$criteria = [];
|
||||
if($org->soort == 4) $criteria = false;
|
||||
else {
|
||||
switch ($org->soort) {
|
||||
case 1:
|
||||
$swvID = $this->globorgid;
|
||||
break;
|
||||
case 2:
|
||||
$swvID = $org->valtonder_id;
|
||||
break;
|
||||
case 3:
|
||||
$swvID = $this->Organisaties_model->get_fieldvalue(['id' => $org->valtonder_id], 'valtonder_id');
|
||||
break;
|
||||
}
|
||||
|
||||
$criteria = $this->Sorteringen_model->get_criteriabijSWV($swvID);
|
||||
if (!$criteria) {
|
||||
$criteria = [];
|
||||
}
|
||||
$criterium = new stdClass();
|
||||
$criterium->id = 0;
|
||||
$criterium->swv_id = $swvID;
|
||||
$criterium->naam = "bestuur";
|
||||
array_unshift($criteria, $criterium);
|
||||
}
|
||||
$criterium = new stdClass();
|
||||
$criterium->id = 0;
|
||||
$criterium->swv_id = $swvID;
|
||||
$criterium->naam = "bestuur";
|
||||
array_unshift($criteria, $criterium);
|
||||
|
||||
$data = [
|
||||
'schooljaren' => $schooljaren,
|
||||
@@ -43,13 +58,7 @@ class Overzichtsop extends MY_Controller{
|
||||
echo json_encode($data);
|
||||
}
|
||||
|
||||
function getSWVID($orgID){
|
||||
$valtonder = $this->Organisaties_model->get_fieldvalue(['id' => $orgID], 'valtonder_id');
|
||||
if($orgID != $valtonder) {
|
||||
$this->getSWVID($valtonder);
|
||||
}
|
||||
return $valtonder;
|
||||
}
|
||||
|
||||
|
||||
function getOrgsoort(){
|
||||
if (!$this->userid) die;
|
||||
@@ -73,24 +82,40 @@ class Overzichtsop extends MY_Controller{
|
||||
'schooljaarnummer' => $schooljaarnr], 'id');
|
||||
if ($compactsopID) $organisatie->sop = 'T';
|
||||
if ($organisatie->soort == 4){
|
||||
echo json_encode(array("organisatie" => $organisatie, "soort" => 4,));}
|
||||
echo json_encode(["soort" => 4,
|
||||
"organisatie" => $organisatie,
|
||||
"criteriumscholen" => false]);
|
||||
}
|
||||
|
||||
|
||||
if ($criteriumID > 0){
|
||||
$criteriumOrg = clone $organisatie;
|
||||
$criteriumresult = $this->overzichtPerCriterium($criteriumOrg, $schooljaarnr, $criteriumID);
|
||||
}
|
||||
if($organisatie->soort < 3 ||$criteriumID == 0 ) $niveauresult = $this->overzichtPerNiveau($organisatie, $schooljaarnr, $criteriumID);
|
||||
$niveauorgs = [];
|
||||
echo json_encode([
|
||||
'soort' => $organisatie->soort,
|
||||
'organisatie' => isset($niveauresult)? $niveauresult : false,
|
||||
'criteriumscholen' => isset($criteriumresult) ? $criteriumresult: false
|
||||
|
||||
]);
|
||||
|
||||
if ($criteriumID == 0) $this->overzichtPerNiveau($organisatie, $schooljaarnr);
|
||||
if ($criteriumID > 0) $this->overzichtPerCriterium($organisatie, $schooljaarnr, $criteriumID);
|
||||
|
||||
}
|
||||
|
||||
private function overzichtPerCriterium($organisatie, $schooljaarnr, $criteriumID){
|
||||
private function overzichtPerCriterium($criteriumOrg, $schooljaarnr, $criteriumID){
|
||||
|
||||
|
||||
$orgs = $this->Organisaties_model->getlistrecursief($organisatie->id);
|
||||
$lijst = [];
|
||||
$orgs = $this->Organisaties_model->getlistrecursief($criteriumOrg->id, $lijst);
|
||||
$orglist = implode(",", $orgs);
|
||||
$organisatie->scholen = $this->Compactsop_model->orgsEnSopsPerCriterium($schooljaarnr,$criteriumID,$orglist );
|
||||
echo json_encode(array("organisatie" => $organisatie, "soort" => $organisatie->soort));
|
||||
$criteriumOrg->scholen = $this->Sorteerlabels_model->orgsEnSopsPerCriterium($schooljaarnr,$criteriumID,$criteriumOrg->id, $orglist );
|
||||
|
||||
return $criteriumOrg;
|
||||
|
||||
}
|
||||
|
||||
private function overzichtPerNiveau($organisatie, $schooljaarnr){
|
||||
private function overzichtPerNiveau($organisatie, $schooljaarnr, $criteriumID){
|
||||
switch ($organisatie->soort) {
|
||||
case 3:
|
||||
$bgid = $organisatie->id;
|
||||
@@ -103,7 +128,6 @@ class Overzichtsop extends MY_Controller{
|
||||
if ($compactsopID) $school->sop = 'T';
|
||||
}
|
||||
}
|
||||
echo json_encode(array("organisatie" => $organisatie, "soort" => 3));
|
||||
break;
|
||||
case 2:
|
||||
$kamerid = $organisatie->id;
|
||||
@@ -114,16 +138,19 @@ class Overzichtsop extends MY_Controller{
|
||||
$compactsopID = $this->Compactsop_model->get_fieldvalue(
|
||||
['organisatie_id' => $bg->id, 'schooljaarnummer' => $schooljaarnr], 'id');
|
||||
if ($compactsopID) $bg->sop = 'T';
|
||||
$bg->scholen = $this->Organisaties_model->getorgsvanaf($bg->id);
|
||||
foreach ($bg->scholen as $index => $school) {
|
||||
$school->sop = 'F';
|
||||
$compactsopID = $this->Compactsop_model->get_fieldvalue(
|
||||
['organisatie_id' => $school->id, 'schooljaarnummer' => $schooljaarnr], 'id');
|
||||
if ($compactsopID) $school->sop = 'T';
|
||||
}
|
||||
if($criteriumID == 0 ) {
|
||||
$bg->scholen = $this->Organisaties_model->getorgsvanaf($bg->id);
|
||||
if($bg->scholen){
|
||||
foreach ($bg->scholen as $index => $school) {
|
||||
$school->sop = 'F';
|
||||
$compactsopID = $this->Compactsop_model->get_fieldvalue(
|
||||
['organisatie_id' => $school->id, 'schooljaarnummer' => $schooljaarnr], 'id');
|
||||
if ($compactsopID) $school->sop = 'T';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
echo json_encode(array("organisatie" => $organisatie, "soort" => 2));
|
||||
break;
|
||||
case 1;
|
||||
$swvid = $organisatie->id;
|
||||
@@ -144,23 +171,26 @@ class Overzichtsop extends MY_Controller{
|
||||
$compactsopID = $this->Compactsop_model->get_fieldvalue(
|
||||
['organisatie_id' => $bg->id, 'schooljaarnummer' => $schooljaarnr], 'id');
|
||||
if ($compactsopID) $bg->sop = 'T';
|
||||
$bg->scholen = $this->Organisaties_model->getorgsvanaf($bg->id);
|
||||
foreach ($bg->scholen as $index => $school) {
|
||||
$school->sop = 'F';
|
||||
$compactsopID = $this->Compactsop_model->get_fieldvalue(
|
||||
['organisatie_id' => $school->id, 'schooljaarnummer' => $schooljaarnr], 'id');
|
||||
if ($compactsopID) $school->sop = 'T';
|
||||
if($criteriumID == 0) {
|
||||
$bg->scholen = $this->Organisaties_model->getorgsvanaf($bg->id);
|
||||
if($bg->scholen) {
|
||||
foreach ($bg->scholen as $index => $school) {
|
||||
$school->sop = 'F';
|
||||
$compactsopID = $this->Compactsop_model->get_fieldvalue(
|
||||
['organisatie_id' => $school->id, 'schooljaarnummer' => $schooljaarnr], 'id');
|
||||
if ($compactsopID) $school->sop = 'T';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo json_encode([
|
||||
"organisatie" => $organisatie,
|
||||
"soort" => 1]);
|
||||
break;
|
||||
}
|
||||
|
||||
return $organisatie;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@ class Sorteerlabels_model extends MY_Model{
|
||||
return $this->get_query_row('id');
|
||||
}
|
||||
|
||||
function orgsEnSopsPerCriterium($schooljaarnr,$criteriumID,$orglist){
|
||||
function orgsEnSopsPerCriterium($schooljaarnr,$criteriumID,$orgid, $orglist){
|
||||
$this->sql =" SELECT O.id, O.soort, O.naamkort, O.plaats, O.brin, COALESCE(L.naam, 'niet ingedeeld') AS label,
|
||||
COALESCE(L.naam, 'ZZZZ') AS ordening,
|
||||
CASE WHEN IS NULL C.id THEN 'F'
|
||||
CASE WHEN C.id IS NULL THEN 'F'
|
||||
ELSE 'T'
|
||||
END AS sop
|
||||
|
||||
@@ -43,9 +43,12 @@ class Sorteerlabels_model extends MY_Model{
|
||||
|
||||
WHERE O.id IN ({$orglist})
|
||||
AND (S.id = {$criteriumID} OR S.id IS NULL)
|
||||
AND O.id <> {$orgid}
|
||||
AND O.soort = 4
|
||||
AND (C.schooljaarnummer = {$schooljaarnr} OR C.id IS NULL)
|
||||
|
||||
GROUP BY O.id
|
||||
ORDER BY ordening, O.soort, O.naamkort ";
|
||||
|
||||
return $this->get_query_result();
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
<table style="border: 1px solid #A28A29; margin-top: 30px;"
|
||||
<table style="border: 1px solid #A28A29; margin-top: 30px;width: 100%;"
|
||||
data-bind="with: $root.selectedOrg()">
|
||||
<thead>
|
||||
<tr style="border-bottom:1px solid #A28A29; ">
|
||||
|
||||
@@ -1,29 +1,44 @@
|
||||
|
||||
<table style="border: 1px solid #A28A29; margin-top: 30px;">
|
||||
<thead>
|
||||
<tr style="border-bottom:1px solid #A28A29; ">
|
||||
<th style="padding: 5px; color: white; background-color:#A28A29">Download</th>
|
||||
<th style="padding: 5px; color: white; background-color:#A28A29 ">Soort</th>
|
||||
<th style="padding: 5px; color: white; background-color:#A28A29 ">Organisatie</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody data-bind="foreach: overzicht">
|
||||
<tr data-bind="visible: $index() == 0 || $parent.overzicht()[$index-1].label != label ">
|
||||
<td colspan ="3" data-bind="text: label">
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="border-bottom:1px solid #A28A29; ">
|
||||
<td data-bind="attr: {backgroundColor: achtergrond} " >
|
||||
<button data-bind="visible: erIsEenSop(), click: $root.fOpenPDF, attr: {backgroundColor: kleur} "
|
||||
class="buttonCompact glyphicon glyphicon-open"
|
||||
style=" height: 30px; width: 30px; padding-left: 8px; border-radius: 50%;
|
||||
box-shadow: none; border: none; float: left">
|
||||
</button>
|
||||
</td>
|
||||
<td style="padding: 5px" data-bind="text: soort, attr: {backgroundColor: achtergrond} "></td>
|
||||
<td style="padding: 5px" data-bind="text: naam, attr: {backgroundColor: achtergrond} ">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table style="border: 1px solid #A28A29; width: 100%; margin-top: 30px;" data-bind="with: topOrg() ? topOrg(): ''" >
|
||||
<thead>
|
||||
<tr style="border-bottom:1px solid #A28A29; ">
|
||||
<th colspan="3" style="padding: 5px; color: white; background-color:#A28A29;">Compact SOPs per citerium</th>
|
||||
</tr>
|
||||
<tr style="border-bottom:1px solid #A28A29; ">
|
||||
<th style="padding: 5px; color: white; background-color:#A28A29">Download</th>
|
||||
<th style="padding: 5px; color: white; background-color:#A28A29 ">Soort</th>
|
||||
<th style="padding: 5px; color: white; background-color:#A28A29 ">Organisatie</th>
|
||||
|
||||
</tr>
|
||||
<tr style="border-bottom:1px solid #A28A29;" data-bind="visible: soort== 'BOP' ">
|
||||
<th data-bind="style: {backgroundColor: achtergrond} " >
|
||||
<button data-bind="visible: erIsEenSop(), click: $parent.fOpenPDF, style: {backgroundColor: kleur()} "
|
||||
class="buttonCompact glyphicon glyphicon-open"
|
||||
style=" height: 30px; width: 30px; padding-left: 8px; border-radius: 50%;
|
||||
box-shadow: none; border: none; float: left">
|
||||
</button></th>
|
||||
<th style="padding: 5px;" data-bind="text: soort, style: {backgroundColor: achtergrond()} "></th>
|
||||
<th style="padding: 5px;" data-bind="text: naam, style: {backgroundColor: achtergrond()} "></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody data-bind="foreach: orgs">
|
||||
<tr data-bind="visible: $index() == 0 || $parent.orgs()[$index()-1].label != label " style="border-bottom:1px solid #A28A29; ">
|
||||
<td colspan ="3" data-bind="text: label" style="background-color: #faf7eb; text-align: center; font-weight: bold; vertical-align: text-top">
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="border-bottom:1px solid #A28A29; ">
|
||||
<td data-bind="style: {backgroundColor: achtergrond} " style="border-bottom:1px solid #A28A29; ">
|
||||
<button data-bind="visible: erIsEenSop(), click: $root.fOpenPDF, style: {backgroundColor: kleur()} "
|
||||
class="buttonCompact glyphicon glyphicon-open"
|
||||
style=" height: 30px; width: 30px; padding-left: 8px; border-radius: 50%;
|
||||
box-shadow: none; border: none; float: left">
|
||||
</button>
|
||||
</td>
|
||||
<td style="padding: 5px" data-bind="text: soort, style: {backgroundColor: achtergrond()} "></td>
|
||||
<td style="padding: 5px" data-bind="text: naam, style: {backgroundColor: achtergrond()} ">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1,7 +1,12 @@
|
||||
<table style="border: 1px solid #A28A29; margin-top: 30px;"
|
||||
<table style="border: 1px solid #A28A29; margin-top: 30px; width: 100%;"
|
||||
data-bind="with: $root.selectedOrg()">
|
||||
|
||||
<thead>
|
||||
<!-- ko if: $parent.topOrg()-->
|
||||
<tr style="border-bottom: 1px solid white;">
|
||||
<th colspan="3" style="padding: 5px; color: white; background-color:#A28A29">Compact SWOP, ROPs en BOPs </th>
|
||||
</tr>
|
||||
<!-- /ko -->
|
||||
<tr>
|
||||
<th style="padding: 5px; color: white; background-color:#A28A29">Download</th>
|
||||
<th style="padding: 5px; color: white; background-color:#A28A29 ">Soort</th>
|
||||
@@ -33,7 +38,7 @@
|
||||
style=" height: 30px; width: 30px; padding-left: 8px; background-color: #8cff1a; float: left">
|
||||
</button>
|
||||
</td>
|
||||
<td style="padding: 5px; background-color: #f5f0f2;">ROP</td>
|
||||
<td style="padding: 5px; background-color: #f5f0f2;">BOP</td>
|
||||
<td style="padding: 5px; background-color: #f5f0f2;" data-bind="text: brin + ' ' + naam">
|
||||
</td>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<table style="width: 500px;" data-bind="with: $root.selectedOrg()">
|
||||
<table style="width: 100%;" data-bind="with: $root.selectedOrg()">
|
||||
<tr>
|
||||
<td style="padding: 5px">SOP</td>
|
||||
<td style="padding: 5px" data-bind="text: brin + ' ' + naam">
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
<table style="border: 1px solid #A28A29; margin-top: 30px;"
|
||||
data-bind="with: $root.selectedOrg() ">
|
||||
<table style="border: 1px solid #A28A29; margin-top: 30px; width: 100%;"
|
||||
data-bind="with: selectedOrg() ">
|
||||
<thead>
|
||||
<!-- ko if: $parent.topOrg()-->
|
||||
<tr style="border-bottom: 1px solid white;">
|
||||
<th colspan="3" style="padding: 5px; color: white; background-color:#A28A29">Compact SWOP, ROPs en BOPs </th>
|
||||
</tr>
|
||||
<!-- /ko -->
|
||||
<tr style="border-bottom: 1px solid white;">
|
||||
<th style="padding: 5px; color: white; background-color:#A28A29">Download</th>
|
||||
<th style="padding: 5px; color: white; background-color:#A28A29 ">Soort</th>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<div class="col-sm-12 mainpagina" id ="pagsopoverzicht">
|
||||
<div class="row">
|
||||
<div class="col-xs-2"></div>
|
||||
<div class="col-xs-1"></div>
|
||||
|
||||
<div class="col-xs-9 " >
|
||||
<div class="col-xs-11 " >
|
||||
|
||||
<h4 data-bind="text: titel() ? subtitel() ? titel() + ' ' + subtitel() : titel(): '' ">
|
||||
</h4>
|
||||
@@ -28,28 +28,40 @@
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<!-- ko if: orgsoort() == 4 -->
|
||||
<div class="col-xs-4">
|
||||
<?php $this->load->view("monpas/compactsop/overzicht/_school"); ?>
|
||||
</div>
|
||||
<!--/ko -->
|
||||
|
||||
<!-- ko if: orgsoort() == 4 -->
|
||||
<?php $this->load->view("monpas/compactsop/overzicht/_school"); ?>
|
||||
<!--/ko -->
|
||||
<!-- ko if: topOrg() -->
|
||||
<div class="col-xs-6">
|
||||
<?php $this->load->view("monpas/compactsop/overzicht/_criterium"); ?>
|
||||
</div>
|
||||
<!--/ko -->
|
||||
|
||||
<!-- ko if: selectedCriterium() && selectedCriterium().id == 0 -->
|
||||
<!-- ko if: orgsoort() == 3 -->
|
||||
<?php $this->load->view("monpas/compactsop/overzicht/_bestuur"); ?>
|
||||
<!--/ko -->
|
||||
<!-- ko if: orgsoort() == 3 && !topOrg() -->
|
||||
<div class="col-xs-6">
|
||||
<?php $this->load->view("monpas/compactsop/overzicht/_bestuur"); ?>
|
||||
</div>
|
||||
<!--/ko -->
|
||||
|
||||
<!-- ko if: orgsoort() == 2 -->
|
||||
<?php $this->load->view("monpas/compactsop/overzicht/_regio"); ?>
|
||||
<!--/ko -->
|
||||
<!-- ko if: orgsoort() == 1 -->
|
||||
<?php $this->load->view("monpas/compactsop/overzicht/_swv"); ?>
|
||||
<!--/ko -->
|
||||
<!--/ko -->
|
||||
<!-- ko if: orgsoort() == 2 -->
|
||||
<div class="col-xs-6">
|
||||
<?php $this->load->view("monpas/compactsop/overzicht/_regio"); ?>
|
||||
</div>
|
||||
<!--/ko -->
|
||||
|
||||
<!-- ko if: orgsoort() == 1 -->
|
||||
<div class="col-xs-6">
|
||||
<?php $this->load->view("monpas/compactsop/overzicht/_swv"); ?>
|
||||
</div>
|
||||
<!--/ko -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- ko if: selectedCriterium() && selectedCriterium().id > 0 -->
|
||||
<?php $this->load->view("monpas/compactsop/overzicht/_criterium"); ?>
|
||||
<!--/ko -->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ $(function(){
|
||||
mh.initSopOverzichtModel = function(){
|
||||
|
||||
function fAddSWV(p){
|
||||
console.log(p, "p")
|
||||
|
||||
var dit = this;
|
||||
this.id = p.id;
|
||||
this.soort = p.soort;
|
||||
@@ -57,6 +59,7 @@ mh.initSopOverzichtModel = function(){
|
||||
this.bgs = ko.observableArray();
|
||||
this.scholen = ko.observableArray([]);
|
||||
|
||||
|
||||
this.erIsEenSop = ko.observable(false);
|
||||
if(p.sop === 'T') dit.erIsEenSop(true)
|
||||
|
||||
@@ -79,38 +82,51 @@ mh.initSopOverzichtModel = function(){
|
||||
if(b.sop === 'T') dit.erIsEenSop(true)
|
||||
}
|
||||
|
||||
function fAddLabelOrg(p){
|
||||
var dit = this;
|
||||
this.id = p.id;
|
||||
this.soort = p.soort;
|
||||
this.naam = p.brin ? p.brin = ' ' + p.naamkort: p.naamkort;
|
||||
this.soort = 'SOP';
|
||||
this.kleur = '#1aa3ff';
|
||||
this.achtergrond = '#ffffff';
|
||||
switch(p.soort){
|
||||
case Number(1): dit.soort = 'SWOP'
|
||||
dit.kleur = '#A28A29';
|
||||
dit.achtergrond = '#a07b8e';
|
||||
function fAddLabelOrg(p) {
|
||||
var dit = this;
|
||||
this.id = p.id;
|
||||
this.soort = p.soort;
|
||||
this.naam = p.brin ? p.brin = ' ' + p.naamkort : p.naamkort;
|
||||
this.soort = ' ';
|
||||
this.kleur = ko.observable('');
|
||||
this.achtergrond = ko.observable('');
|
||||
switch (p.soort) {
|
||||
case "1":
|
||||
dit.soort = 'SWOP'
|
||||
dit.kleur('#A28A29');
|
||||
dit.achtergrond('#a07b8e');
|
||||
break;
|
||||
case Number(2): dit.soort = 'ROP';
|
||||
dit.kleur = '#ff8c1a';
|
||||
dit.achtergrond = '#ded0d7'
|
||||
case "2":
|
||||
dit.soort = 'ROP';
|
||||
dit.kleur('#ff8c1a');
|
||||
dit.achtergrond('#ded0d7');
|
||||
break;
|
||||
case Number(3): dit.soort = 'BOP';
|
||||
dit.kleur = '#8cff1a';
|
||||
dit.achtergrond = '#f5f0f2';
|
||||
break;
|
||||
case "3":
|
||||
dit.soort = 'BOP';
|
||||
dit.kleur('#8cff1a');
|
||||
dit.achtergrond('#f5f0f2');
|
||||
break;
|
||||
case "4":
|
||||
dit.soort = 'SOP';
|
||||
dit.kleur('#1aa3ff');
|
||||
dit.achtergrond('#ffffff');
|
||||
break;
|
||||
|
||||
}
|
||||
this.plaats = p.plaats;
|
||||
this.geopend = ko.observable(false);
|
||||
this.erIsEenSop = ko.observable(false);
|
||||
if(p.sop === 'T') dit.erIsEenSop(true);
|
||||
this.label = p.label;
|
||||
this.plaats = p.plaats;
|
||||
this.geopend = ko.observable(false);
|
||||
this.erIsEenSop = ko.observable(false);
|
||||
if (p.sop === 'T') dit.erIsEenSop(true);
|
||||
this.label = p.label;
|
||||
this.orgs = ko.observableArray([]);
|
||||
|
||||
if (p.scholen) {
|
||||
$.each(p.scholen, function (a, b) {
|
||||
dit.orgs.push(new fAddLabelOrg(b));
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function fAddSchooljaar(s){
|
||||
this.id = s.schooljaarnr;
|
||||
this.naam = s.naam;
|
||||
@@ -127,7 +143,7 @@ mh.initSopOverzichtModel = function(){
|
||||
}
|
||||
else {
|
||||
mh.SopOverzichtModel = {
|
||||
overzicht : ko.observable(''),
|
||||
|
||||
orgsoort : ko.observable(4),
|
||||
geopend : ko.observable(false),
|
||||
schooljaren : ko.observableArray([]),
|
||||
@@ -135,6 +151,7 @@ mh.initSopOverzichtModel = function(){
|
||||
selectedSchooljaar : ko.observable(''),
|
||||
selectedCriterium : ko.observable(''),
|
||||
selectedOrg : ko.observable(),
|
||||
topOrg : ko.observable(),
|
||||
gegevens : ko.observable(true),
|
||||
bezig : ko.observable(false),
|
||||
titel : ko.pureComputed( function(){
|
||||
@@ -211,23 +228,23 @@ mh.initSopOverzichtModel = function(){
|
||||
fGetOverzicht: function(){
|
||||
var self = mh.SopOverzichtModel;
|
||||
|
||||
console.log(self.selectedSchooljaar(), 'schooljaar')
|
||||
console.log(self.selectedCriterium(), 'criterium')
|
||||
|
||||
|
||||
var submitData = {
|
||||
'schooljaarnr' : self.selectedSchooljaar().id,
|
||||
'criteriumID' : self.selectedCriterium().id,
|
||||
};
|
||||
console.log(submitData)
|
||||
|
||||
$.post("index.php/monpas/overzichtsop/getoverzicht", submitData , function(data){
|
||||
if (data.organisatie){
|
||||
if (data){
|
||||
self.selectedOrg('');
|
||||
self.topOrg('');
|
||||
|
||||
|
||||
if(Number(self.selectedCriterium().id) == 0) {
|
||||
if(data.criteriumscholen){
|
||||
self.topOrg(new fAddLabelOrg(data.criteriumscholen));
|
||||
}
|
||||
|
||||
switch (self.orgsoort()) {
|
||||
if(data.organisatie) {
|
||||
switch (Number(self.orgsoort())) {
|
||||
case 1:
|
||||
self.selectedOrg(new fAddSWV(data.organisatie));
|
||||
break;
|
||||
@@ -242,12 +259,7 @@ mh.initSopOverzichtModel = function(){
|
||||
break;
|
||||
} // switch
|
||||
}
|
||||
if(Number(self.selectedCriterium().id) > 0){
|
||||
$.each(data.organisatie, function(i, o){
|
||||
self.overzicht.push(new fAddLabelOrg(i, o));
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
self.bezig(false);
|
||||
},'json');
|
||||
|
||||
Reference in New Issue
Block a user