Merge branch 'feature/archiefoptie-ondersteuningsvorm' into develop
This commit is contained in:
@@ -63,10 +63,19 @@ class Groepen extends MY_Controller{
|
||||
$groep->ondersteuningsvormen = $this->Ondersteuningsvormen_model->getvormen($orgid, $minnivo, $maxnivo);
|
||||
if ($groep->ondersteuningsvormen){
|
||||
foreach($groep->ondersteuningsvormen as $ondersteuningsvorm){
|
||||
// hier get aantal
|
||||
$ax = $this->Aantalxondersteuningsvorm_model->getaantal($groepid, $ondersteuningsvorm->id);
|
||||
if ($ax){ $ondersteuningsvorm->aantal = $ax->aantal; }
|
||||
else{ $ondersteuningsvorm->aantal =0; };
|
||||
$aantal = 0;
|
||||
$archief = 'F';
|
||||
$details = $this->Aantalxondersteuningsvorm_model->getdetails($groepid, $ondersteuningsvorm->id);
|
||||
if($details) {
|
||||
if ($details->aantal) $aantal = $details->aantal;
|
||||
if ($details->archief) $archief = $details->archief;
|
||||
}
|
||||
$ondersteuningsvorm->aantal = $aantal;
|
||||
$ondersteuningsvorm->archief = $archief;
|
||||
|
||||
$gebruikt = $this->Aantalxondersteuningsvorm_model->aantalGebruikt($orgid, $groepid, $ondersteuningsvorm->id);
|
||||
$ondersteuningsvorm->gebruikt = $gebruikt > 0 ? 'T' : 'F';
|
||||
|
||||
}
|
||||
}
|
||||
echo json_encode($groep);
|
||||
@@ -126,53 +135,120 @@ class Groepen extends MY_Controller{
|
||||
echo json_encode($groep);
|
||||
}
|
||||
|
||||
|
||||
function insertorupdateOS(){
|
||||
//TODO clean input
|
||||
if(!$this->userid) die;
|
||||
$osid = $this->clean_input('id');
|
||||
$orgid = $this->clean_input("orgid");
|
||||
$aantal = $this->clean_input('aantal');
|
||||
if (($osid == 0 || $osid == null) &&($aantal > 0)) {
|
||||
$data=array("organisatie_id" => $orgid,
|
||||
"naam" => $this->clean_input("naam"),
|
||||
"nivo" => $this->clean_input('nivo')
|
||||
|
||||
$osid = $this->clean_input('id');
|
||||
$orgid = $this->clean_input("orgid");
|
||||
$aantal = $this->clean_input('aantal');
|
||||
$archief = $this->clean_input('archief');
|
||||
|
||||
if ($archief !== 'T') $archief = 'F';
|
||||
|
||||
if (($osid == 0 || $osid == null) && ($aantal > 0)) {
|
||||
$data = array(
|
||||
"organisatie_id" => $orgid,
|
||||
"naam" => $this->clean_input("naam"),
|
||||
"nivo" => $this->clean_input('nivo')
|
||||
);
|
||||
$osid = $this->Ondersteuningsvormen_model->insert_record($data);
|
||||
}
|
||||
else {
|
||||
if ($orgid > 0){
|
||||
$data=array("naam" => $this->clean_input('naam'));
|
||||
$data = array("naam" => $this->clean_input('naam'));
|
||||
$this->Ondersteuningsvormen_model->update_record($data, $osid);
|
||||
}
|
||||
// update name
|
||||
}
|
||||
$data2= array("organisatie_id" => $orgid,
|
||||
"groep_id" => $this->clean_input('groepid'),
|
||||
"ondersteuningsvorm_id" => $osid);
|
||||
$aos =$this->Aantalxondersteuningsvorm_model->get_records_where($data2, TRUE);
|
||||
|
||||
$data2 = array(
|
||||
"organisatie_id" => $orgid,
|
||||
"groep_id" => $this->clean_input('groepid'),
|
||||
"ondersteuningsvorm_id" => $osid
|
||||
);
|
||||
|
||||
$aos = $this->Aantalxondersteuningsvorm_model->get_records_where($data2, TRUE);
|
||||
|
||||
if($aos){
|
||||
if ($this->clean_input('aantal') == 0) {
|
||||
//delete de regel
|
||||
if ($aantal == 0 && $archief !== 'T') {
|
||||
// delete alleen als het niet gearchiveerd is
|
||||
$this->Aantalxondersteuningsvorm_model->delete_record($aos->id);
|
||||
}
|
||||
else {
|
||||
// update de regel
|
||||
$data=array( "aantal" => $this->clean_input('aantal') );
|
||||
// update de regel (ook archief opslaan)
|
||||
$data = array(
|
||||
"aantal" => $aantal,
|
||||
"archief" => $archief
|
||||
);
|
||||
$this->Aantalxondersteuningsvorm_model->update_record($data, $aos->id);
|
||||
}
|
||||
}
|
||||
else{
|
||||
if ($this->clean_input('aantal') > 0){
|
||||
$data = array( "organisatie_id" => $orgid,
|
||||
"groep_id" => $this->clean_input('groepid'),
|
||||
"ondersteuningsvorm_id" => $osid,
|
||||
"aantal" => $this->clean_input('aantal'));
|
||||
// record bestaat nog niet: maak hem aan als er aantal > 0 is OF als het archief is
|
||||
if ($aantal > 0 || $archief === 'T'){
|
||||
$data = array(
|
||||
"organisatie_id" => $orgid,
|
||||
"groep_id" => $this->clean_input('groepid'),
|
||||
"ondersteuningsvorm_id" => $osid,
|
||||
"aantal" => $aantal,
|
||||
"archief" => $archief
|
||||
);
|
||||
$aantalid = $this->Aantalxondersteuningsvorm_model->insert_record($data);
|
||||
}
|
||||
}
|
||||
|
||||
echo json_encode($osid);
|
||||
}
|
||||
|
||||
// function insertorupdateOS(){
|
||||
// //TODO clean input
|
||||
// if(!$this->userid) die;
|
||||
// $osid = $this->clean_input('id');
|
||||
// $orgid = $this->clean_input("orgid");
|
||||
// $aantal = $this->clean_input('aantal');
|
||||
// if (($osid == 0 || $osid == null) &&($aantal > 0)) {
|
||||
// $data=array("organisatie_id" => $orgid,
|
||||
// "naam" => $this->clean_input("naam"),
|
||||
// "nivo" => $this->clean_input('nivo')
|
||||
// );
|
||||
// $osid = $this->Ondersteuningsvormen_model->insert_record($data);
|
||||
// }
|
||||
// else {
|
||||
// if ($orgid > 0){
|
||||
// $data=array("naam" => $this->clean_input('naam'));
|
||||
// $this->Ondersteuningsvormen_model->update_record($data, $osid);
|
||||
// }
|
||||
// // update name
|
||||
// }
|
||||
// $data2= array("organisatie_id" => $orgid,
|
||||
// "groep_id" => $this->clean_input('groepid'),
|
||||
// "ondersteuningsvorm_id" => $osid);
|
||||
// $aos =$this->Aantalxondersteuningsvorm_model->get_records_where($data2, TRUE);
|
||||
// if($aos){
|
||||
// if ($this->clean_input('aantal') == 0) {
|
||||
// //delete de regel
|
||||
// $this->Aantalxondersteuningsvorm_model->delete_record($aos->id);
|
||||
// }
|
||||
// else {
|
||||
// // update de regel
|
||||
// $data=array( "aantal" => $this->clean_input('aantal') );
|
||||
// $this->Aantalxondersteuningsvorm_model->update_record($data, $aos->id);
|
||||
// }
|
||||
// }
|
||||
// else{
|
||||
// if ($this->clean_input('aantal') > 0){
|
||||
// $data = array( "organisatie_id" => $orgid,
|
||||
// "groep_id" => $this->clean_input('groepid'),
|
||||
// "ondersteuningsvorm_id" => $osid,
|
||||
// "aantal" => $this->clean_input('aantal'));
|
||||
// $aantalid = $this->Aantalxondersteuningsvorm_model->insert_record($data);
|
||||
// }
|
||||
// }
|
||||
// echo json_encode($osid);
|
||||
// }
|
||||
|
||||
function getgroepen(){
|
||||
if (!$this->userid) die;
|
||||
$orgid = $this->clean_input('schoolID');
|
||||
@@ -240,6 +316,40 @@ class Groepen extends MY_Controller{
|
||||
$this->Aantalxondersteuningsvorm_model->delete_record_where(array("ondersteuningsvorm_id" => $osid));
|
||||
$this->Ondersteuningsvormen_model->delete_record($osid);
|
||||
}
|
||||
|
||||
function archiveerOS(){
|
||||
if (!$this->userid) die;
|
||||
if (!$this->writer) return;
|
||||
$vormID = $this->clean_input('vormID');
|
||||
$groepID = $this->clean_input('groepID');
|
||||
$orgID = $this->clean_input('orgID');
|
||||
$axovID =$this->Aantalxondersteuningsvorm_model->get_fieldvalue(["ondersteuningsvorm_id"=> $vormID, "groep_id" => $groepID], "id");
|
||||
if ($axovID) $this->Aantalxondersteuningsvorm_model->update_record(["archief"=> 'T', "aantal"=> 0], $axovID);
|
||||
else $data = [ 'organisatie_id' => $orgID,
|
||||
'groep_id' => $groepID,
|
||||
'ondersteuningsvorm_id' => $vormID,
|
||||
'archief' => 'T',
|
||||
'aantal' => 0];
|
||||
|
||||
$newid = $this->Aantalxondersteuningsvorm_model->insert_record($data);
|
||||
}
|
||||
|
||||
function activeerOS(){
|
||||
if (!$this->userid) die;
|
||||
if (!$this->writer) return;
|
||||
$vormID = $this->clean_input('vormID');
|
||||
$groepID = $this->clean_input('groepID');
|
||||
$orgID = $this->clean_input('orgID');
|
||||
$axovID =$this->Aantalxondersteuningsvorm_model->get_fieldvalue(["ondersteuningsvorm_id"=> $vormID, "groep_id" => $groepID], "id");
|
||||
if ($axovID) $this->Aantalxondersteuningsvorm_model->update_record(["archief"=> 'F'], $axovID);
|
||||
else $data = [ 'organisatie_id' => $orgID,
|
||||
'groep_id' => $groepID,
|
||||
'ondersteuningsvorm_id' => $vormID,
|
||||
'archief' => 'T',
|
||||
'aantal' => 0];
|
||||
|
||||
$newid = $this->Aantalxondersteuningsvorm_model->insert_record($data);
|
||||
}
|
||||
function getwriter(){
|
||||
$writer = false;
|
||||
if ($this->Autorisaties_model->check_autorisatie($this->userrole, 259) > 0){$writer = true;};
|
||||
|
||||
@@ -99,7 +99,10 @@ class MY_Controller extends CI_Controller{
|
||||
// public $version = '1.20.27';//dingen
|
||||
// public $version = '1.21.00';//2factor
|
||||
// public $version = '1.21.00L'; //2factor -twee
|
||||
public $version = '1.21.01M'; //verbeteringen compact sop
|
||||
// public $version = '1.21.01M'; //verbeteringen compact sop
|
||||
// public $version = '1.21.02M '; //monfin, geen rode cijfers
|
||||
public $version = '1.21.03M '; //mondiv ondersteuningsvorm archiveren per groep
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -19,6 +19,24 @@ class Aantalxondersteuningsvorm_model extends MY_Model{
|
||||
AND ondersteuningsvorm_id = {$ondersteuningsvorm}";
|
||||
return $this->get_query_row();
|
||||
}
|
||||
|
||||
function getdetails($groepid, $ondersteuningsvorm){
|
||||
$this->sql = " SELECT *
|
||||
FROM tb_aantalxondersteuningsvorm
|
||||
WHERE groep_id = {$groepid}
|
||||
AND ondersteuningsvorm_id = {$ondersteuningsvorm}";
|
||||
return $this->get_query_row();
|
||||
}
|
||||
|
||||
function aantalGebruikt($orgid, $groepid, $ondersteuningsvorm){
|
||||
$this->sql = " SELECT SUM(aantal) AS aantal
|
||||
FROM tb_aantalxondersteuningsvorm
|
||||
WHERE organisatie_id = {$orgid}
|
||||
AND ondersteuningsvorm_id = {$ondersteuningsvorm}
|
||||
AND groep_id <> {$groepid}";
|
||||
return $this->get_query_row('aantal');
|
||||
}
|
||||
|
||||
function getaantallen($vormid, $orgid,$schooljaarnr, $groepids){
|
||||
$this->sql ="SELECT G.id, G.naam, IF(AOS.id,aantal,0) AS aantal
|
||||
FROM tb_groepen G
|
||||
|
||||
@@ -131,8 +131,15 @@
|
||||
<td style="width: 45px" class="integer" data-bind="text: totplus"></td>
|
||||
</tr>
|
||||
<!-- ko foreach: ondersteuningsvormen -->
|
||||
<tr data-bind="visible: !$parent.geopend2() && nivo==2" >
|
||||
<td ><button class="delete" data-bind="click: $root.fDeleteOS, visible: orgid > 0 && $root.writer()"></button></td>
|
||||
<tr data-bind="visible: !$parent.geopend2() && nivo==2 && !archief()" >
|
||||
<td >
|
||||
<button class="delete"
|
||||
data-bind="click: $root.fDeleteOS, visible: orgid > 0 && !gebruikt && $root.writer()">
|
||||
</button>
|
||||
<i class="fa fa-archive"
|
||||
data-bind="click: $root.fArchiveOS, visible: orgid > 0 && gebruikt && $root.writer()">
|
||||
</i>
|
||||
</td>
|
||||
<td ><input style="width:100%"
|
||||
data-bind="textInput: naam,
|
||||
enable: orgid > 0 && $root.writer(),
|
||||
@@ -140,9 +147,9 @@
|
||||
</td>
|
||||
<td><input class = "integer"
|
||||
data-bind="textInput: aantal,
|
||||
attr:{'id' : 'aantal2-' + $index()},
|
||||
event:{input: $root.fCheckinput.bind($data, 'aantal2-'+$index() )},
|
||||
enable: $root.writer() && !$root.bezig()" /></td>
|
||||
attr:{'id' : 'aantal2-' + $index()},
|
||||
event:{input: $root.fCheckinput.bind($data, 'aantal2-'+$index() )},
|
||||
enable: $root.writer() && !$root.bezig()" /></td>
|
||||
|
||||
|
||||
</tr>
|
||||
@@ -150,9 +157,44 @@
|
||||
|
||||
<tr data-bind="visible: !geopend2()">
|
||||
<td></td>
|
||||
<td colspan=2> <button data-bind="click: $parent.fNewOndersteuning.bind($data,2), visible: $root.writer()">voeg ondersteuningsvorm toe</button></td>
|
||||
<td colspan=2 style="padding-top: 2px; padding-bottom: 5px;">
|
||||
<button class="btn-subtle"
|
||||
data-bind="click: $parent.fNewOndersteuning.bind($data,2), visible: $root.writer()">voeg ondersteuningsvorm toe
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr data-bind="visible: !geopend2()">
|
||||
|
||||
<!-- ko if:archiefplus() -->
|
||||
<tr data-bind="visible: !geopend2() && !archief2() ">
|
||||
<td></td>
|
||||
<td colspan=2 style="padding-top: 2px;">
|
||||
<button class="btn-subtle" data-bind="click: $parent.fToggleArchief.bind($data,2), visible: $root.writer()">toon archief
|
||||
</button></td>
|
||||
</tr>
|
||||
<tr data-bind="visible: !geopend2() && archief2() ">
|
||||
<td colspan=3 style="background-color: lightgrey;"> Gearchiveerde ondersteuningsvormen
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- ko foreach: ondersteuningsvormen -->
|
||||
|
||||
<tr style="background-color: #f1f1f1;" data-bind="visible: !$parent.geopend2() && $parent.archief2() && nivo==2 && orgid > 0 && archief() && $root.writer()">
|
||||
<td >
|
||||
<button class="activeer" data-bind="click: $root.fActivateOS, ">
|
||||
</button>
|
||||
</td>
|
||||
<td colspan=2 data-bind="text: naam"></td>
|
||||
</tr>
|
||||
<!-- /ko -->
|
||||
<tr style="background-color: #f1f1f1;" data-bind="visible: !geopend2() && archief2() ">
|
||||
<td colspan=2 ></td>
|
||||
<td style="padding-top: 2px;"> <button class="btn-subtle" data-bind="click: $parent.fToggleArchief.bind($data,2), visible: $root.writer()">sluit</button></td>
|
||||
</tr>
|
||||
<!--/ko-->
|
||||
|
||||
|
||||
<tr data-bind="visible: !geopend2() ">
|
||||
<td colspan=3> <hr/></td>
|
||||
</tr>
|
||||
|
||||
@@ -165,8 +207,11 @@
|
||||
</tr>
|
||||
|
||||
<!-- ko foreach: ondersteuningsvormen -->
|
||||
<tr data-bind="visible: !$parent.geopend3() && nivo==3" >
|
||||
<td></td>
|
||||
<tr data-bind="visible: !$parent.geopend3() && nivo==3 && !archief() " >
|
||||
<td >
|
||||
<button class="delete" data-bind="click: $root.fDeleteOS, visible: orgid > 0 && !gebruikt && $root.writer()"></button>
|
||||
<i class="fa fa-archive" data-bind="click: $root.fArchiveOS, visible: orgid> 0 && gebruikt && $root.writer()"></i>
|
||||
</td>
|
||||
<td ><input style="width:100%"
|
||||
data-bind="textInput: naam,
|
||||
enable: orgid > 0,
|
||||
@@ -178,10 +223,35 @@
|
||||
enable: $root.writer() && !$root.bezig()" /></td>
|
||||
</tr>
|
||||
<!-- /ko -->
|
||||
<tr data-bind="visible: !geopend3()">
|
||||
<tr data-bind="visible: !geopend3() " style="padding-bottom: 5px;">
|
||||
<td></td>
|
||||
<td colspan=2> <button data-bind="click: $parent.fNewOndersteuning.bind($data,3), visible: $root.writer()">voeg ondersteuningsvorm toe</button></td>
|
||||
<td colspan=2 style="padding-top: 2px;"> <button class="btn-subtle" data-bind="click: $parent.fNewOndersteuning.bind($data,3), visible: $root.writer()">voeg ondersteuningsvorm toe</button></td>
|
||||
</tr>
|
||||
|
||||
<!-- ko if:archiefextra() -->
|
||||
<tr data-bind="visible: !geopend3() && !archief3()">
|
||||
<td></td>
|
||||
<td colspan=2 style="padding-top: 2px;"> <button class="btn-subtle" data-bind="click: $parent.fToggleArchief.bind($data,3), visible: $root.writer()">toon archief</button></td>
|
||||
</tr>
|
||||
<tr data-bind="visible: !geopend3() && archief3() ">
|
||||
<td colspan=3 style="background-color: lightgrey;"> Gearchiveerde ondersteuningsvormen</td>
|
||||
</tr>
|
||||
|
||||
<!-- ko foreach: ondersteuningsvormen -->
|
||||
|
||||
<tr style="background-color: #f1f1f1;" data-bind="visible: !$parent.geopend3() && $parent.archief3() && nivo==3 && orgid > 0 && archief() && $root.writer()">
|
||||
<td >
|
||||
<button class="activeer" data-bind="click: $root.fActivateOS "></button>
|
||||
</td>
|
||||
<td colspan=2 data-bind="text: naam"></td>
|
||||
</tr>
|
||||
<!-- /ko -->
|
||||
<tr style="background-color: #f1f1f1;" data-bind="visible: !geopend3() && archief3()">
|
||||
<td colspan=2></td>
|
||||
<td style="padding-top: 2px;"> <button class="btn-subtle" data-bind="click: $parent.fToggleArchief.bind($data,3), visible: $root.writer()">sluit</button></td>
|
||||
</tr>
|
||||
<!-- /ko -->
|
||||
|
||||
<tr data-bind="visible: !geopend3()">
|
||||
<td colspan=3> <hr/></td>
|
||||
</tr>
|
||||
@@ -193,8 +263,11 @@
|
||||
<td style="width: 45px" class= "integer" data-bind="text: totextraplus"></td>
|
||||
</tr>
|
||||
<!-- ko foreach: ondersteuningsvormen -->
|
||||
<tr data-bind="visible: !$parent.geopend4() && nivo==4">
|
||||
<td></td>
|
||||
<tr data-bind="visible: !$parent.geopend4() && nivo==4 && !archief()">
|
||||
<td >
|
||||
<button class="delete" data-bind="click: $root.fDeleteOS, visible: orgid > 0 && ! gebruikt && $root.writer()"></button>
|
||||
<i class="fa fa-archive" data-bind="click: $root.fArchiveOS, visible: orgid> 0 && gebruikt && $root.writer()"></i>
|
||||
</td>
|
||||
<td ><input style="width:100%"
|
||||
data-bind="textInput: naam,
|
||||
enable: orgid > 0,
|
||||
@@ -206,13 +279,37 @@
|
||||
enable: $root.writer() && !$root.bezig()" /></td>
|
||||
</tr>
|
||||
<!-- /ko -->
|
||||
<tr data-bind="visible: !geopend4()">
|
||||
<tr data-bind="visible: !geopend4()" style="padding-bottom: 5px;">
|
||||
<td></td>
|
||||
<td colspan=2> <button data-bind="click: $parent.fNewOndersteuning.bind($data,4), visible: $root.writer()">voeg ondersteuningsvorm toe</button></td>
|
||||
<td colspan=2 style="padding-top: 2px;"> <button class="btn-subtle" data-bind="click: $parent.fNewOndersteuning.bind($data,4), visible: $root.writer()">voeg ondersteuningsvorm toe</button></td>
|
||||
</tr>
|
||||
<!-- ko if: archiefextraplus() -->
|
||||
<tr data-bind="visible: !geopend4() && !archief4()">
|
||||
<td></td>
|
||||
<td colspan=2 style="padding-top: 2px;"> <button class="btn-subtle" style="background-color: #f1f1f1; " data-bind="click: $parent.fToggleArchief.bind($data,4), visible: $root.writer()">toon archief</button></td>
|
||||
</tr>
|
||||
<tr data-bind="visible: !geopend4() && archief4() ">
|
||||
<td colspan=3 style="background-color: lightgrey;"> Gearchiveerde ondersteuningsvormen</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- ko foreach: ondersteuningsvormen -->
|
||||
|
||||
<tr style="background-color: #f1f1f1;" data-bind="visible: !$parent.geopend4() && $parent.archief4() && nivo==4 && orgid > 0 && archief() && $root.writer()">
|
||||
<td >
|
||||
<button class="activeer" data-bind="click: $root.fActivateOS "></button>
|
||||
</td>
|
||||
<td colspan=2 data-bind="text: naam"></td>
|
||||
</tr>
|
||||
<!-- /ko -->
|
||||
<tr style="background-color: #f1f1f1;" data-bind="visible: !geopend4() && archief4()">
|
||||
<td colspan=2></td>
|
||||
<td style="padding-top: 2px;"> <button class="btn-subtle" data-bind="click: $parent.fToggleArchief.bind($data,4), visible: $root.writer()">sluit</button></td>
|
||||
</tr>
|
||||
<tr data-bind="visible: !geopend4()">
|
||||
<td colspan=3> <hr/></td>
|
||||
</tr>
|
||||
<!-- /ko -->
|
||||
</table>
|
||||
<div>
|
||||
<p>Notitie</p>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2026 Fonticons, Inc.--><path d="M560.3 301.2C570.7 313 588.6 315.6 602.1 306.7C616.8 296.9 620.8 277 611 262.3L563 190.3C560.2 186.1 556.4 182.6 551.9 180.1L351.4 68.7C332.1 58 308.6 58 289.2 68.7L88.8 180C83.4 183 79.1 187.4 76.2 192.8L27.7 282.7C15.1 306.1 23.9 335.2 47.3 347.8L80.3 365.5L80.3 418.8C80.3 441.8 92.7 463.1 112.7 474.5L288.7 574.2C308.3 585.3 332.2 585.3 351.8 574.2L527.8 474.5C547.9 463.1 560.2 441.9 560.2 418.8L560.2 301.3zM320.3 291.4L170.2 208L320.3 124.6L470.4 208L320.3 291.4zM278.8 341.6L257.5 387.8L91.7 299L117.1 251.8L278.8 341.6z"/></svg>
|
||||
|
After Width: | Height: | Size: 759 B |
@@ -202,6 +202,33 @@ button.delete{
|
||||
cursor: pointer;
|
||||
box-shadow:none;
|
||||
}
|
||||
|
||||
button.activeer{
|
||||
background-image: url('/css/images/box-open.svg');
|
||||
margin-right: 1px;
|
||||
background-color: rgba(255, 255, 255, 0);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 15px 20px;
|
||||
background-position:center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border: medium none;
|
||||
cursor: pointer;
|
||||
box-shadow:none;
|
||||
}
|
||||
|
||||
button.btn-subtle{
|
||||
border-color: #bdbdbd;
|
||||
background-color: #f1f1f1;
|
||||
box-shadow: 1px 1px 2px #9b9b9b;
|
||||
}
|
||||
button.btn-subtle:hover{
|
||||
box-shadow: 1px 1px 2px #7f7f7f;
|
||||
}
|
||||
button.btn-subtle:focus{
|
||||
outline: none;
|
||||
box-shadow: 0 0 0 2px #d0d0d0;
|
||||
}
|
||||
.printer{
|
||||
background-image: url('/css/images/print.png');
|
||||
margin-right: 1px;
|
||||
|
||||
@@ -28,11 +28,14 @@ $(function(){
|
||||
}
|
||||
|
||||
function fAddEditGroep(p){
|
||||
var dit = this;
|
||||
this.id = p.id;
|
||||
var dit= this;
|
||||
this.id = p.id;
|
||||
this.naam = ko.observable(p.naam);
|
||||
this.orgid = p.orgid;
|
||||
this.schooljaar = p.schooljaar;
|
||||
this.schooljaar = p.schooljaar;
|
||||
this.archief2 = ko.observable(false);
|
||||
this.archief3 = ko.observable(false);
|
||||
this.archief4 = ko.observable(false);
|
||||
|
||||
this.niveau = ko.observableArray([]);
|
||||
if (p.niveau){
|
||||
@@ -88,6 +91,44 @@ $(function(){
|
||||
this.basis = ko.computed(function(){
|
||||
return parseInt(dit.totaantal()) - (parseInt(dit.totplus()) + dit.totextra()+dit.totextraplus());
|
||||
})
|
||||
this.archiefplus = ko.computed(function(){
|
||||
let toon = false;
|
||||
if (dit.ondersteuningsvormen()){
|
||||
$.each(dit.ondersteuningsvormen(), function(x,y){
|
||||
|
||||
if (parseInt(y.nivo )=== 2 ){
|
||||
console.log(y, 'wat is y')
|
||||
if(y.archief() && y.orgid > 0)
|
||||
|
||||
toon = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
console.log(toon);
|
||||
return toon;
|
||||
});
|
||||
this.archiefextra = ko.computed(function(){
|
||||
var toon = false
|
||||
if (dit.ondersteuningsvormen()){
|
||||
$.each(dit.ondersteuningsvormen(), function(x,y){
|
||||
if (parseInt(y.nivo) === 3 && y.archief()){
|
||||
toon = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
return toon;
|
||||
});
|
||||
this.archiefextraplus = ko.computed(function(){
|
||||
var toon = false;
|
||||
if (dit.ondersteuningsvormen()){
|
||||
$.each(dit.ondersteuningsvormen(), function(x,y){
|
||||
if (parseInt(y.nivo) === 4 && y.archief()){
|
||||
toon = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
return toon;
|
||||
});
|
||||
this.geopend1 = ko.observable(false);
|
||||
this.geopend2 = ko.observable(false);
|
||||
this.geopend3 = ko.observable(false);
|
||||
@@ -99,11 +140,13 @@ $(function(){
|
||||
function fAddOndersteuningsvorm(k){
|
||||
var dit = this;
|
||||
this.id = k.id;
|
||||
this.orgid = k.organisatie_id;
|
||||
this.naam = ko.observable(k.naam);
|
||||
this.orgid = k.organisatie_id;
|
||||
this.naam = ko.observable(k.naam);
|
||||
this.nivo = k.nivo;
|
||||
this.aantal = ko.observable(k.aantal);
|
||||
|
||||
this.gebruikt = k.gebruikt==='T';
|
||||
this.archief = ko.observable(false);
|
||||
if (k.archief==='T') dit.archief(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -309,7 +352,8 @@ $(function(){
|
||||
groepid : self.editGroep().id,
|
||||
nivo : p.nivo,
|
||||
naam : p.naam(),
|
||||
aantal : p.aantal() };
|
||||
aantal : p.aantal(),
|
||||
archief : p.archief() ? 'T': 'F'}
|
||||
|
||||
$.post("index.php/monpas/groepen/insertorupdateOS", submitData, function(result){
|
||||
if (result){
|
||||
@@ -396,10 +440,24 @@ $(function(){
|
||||
orgid:self.schoolid(),
|
||||
naam: ko.observable(''),
|
||||
nivo: wat,
|
||||
aantal: ko.observable(0)}
|
||||
aantal: ko.observable(0),
|
||||
gebruikt: false,
|
||||
archief: ko.observable(false)
|
||||
|
||||
}
|
||||
self. editGroep().ondersteuningsvormen.push( newos);
|
||||
},
|
||||
|
||||
fToggleArchief: function(wat){
|
||||
var self = ls.GroepenModel;
|
||||
console.log(wat, 'wat');
|
||||
if (!self.editGroep()) return;
|
||||
if (wat === 2) self.editGroep().archief2(! self.editGroep().archief2());
|
||||
if (wat === 3) self.editGroep().archief3(! self.editGroep().archief3());
|
||||
if (wat === 4) self.editGroep().archief4(! self.editGroep().archief4());
|
||||
console.log(self.editGroep().archief4(), 'archief4');
|
||||
},
|
||||
|
||||
fCheckinput: function(data,elid){
|
||||
var self =ls.GroepenModel;
|
||||
var dit = this;
|
||||
@@ -484,17 +542,64 @@ $(function(){
|
||||
}
|
||||
},'json');
|
||||
},
|
||||
|
||||
fArchiveOS : function(){
|
||||
var self = ls.GroepenModel;
|
||||
var dit = this;
|
||||
|
||||
let waarschuwing ="Weet u zeker dat u " + dit.naam() + " wilt archiveren?";
|
||||
if(dit.aantal() > 0) waarschuwing = waarschuwing + "<br/>De leerlingen in deze groep die toegewezen zijn aan deze" +
|
||||
" ondersteuningsvorm worden ingedeeld in de basisondersteuning."
|
||||
|
||||
let sd ={
|
||||
vormID : dit.id,
|
||||
groepID: self.editGroep().id,
|
||||
orgID: self.schoolid()
|
||||
}
|
||||
|
||||
apprise(waarschuwing , {verify: true, textYes: 'ja', textNo:'nee'}, function(ans){
|
||||
if (ans){
|
||||
$.post("index.php/monpas/groepen/archiveerOS", sd, function(){
|
||||
dit.archief(true);
|
||||
dit.aantal(0);
|
||||
});
|
||||
};// if ans
|
||||
});//apprise
|
||||
},
|
||||
|
||||
fActivateOS : function(){
|
||||
var self = ls.GroepenModel;
|
||||
var dit = this;
|
||||
|
||||
let waarschuwing ="Weet u zeker dat u " + dit.naam() + " actief wilt maken?";
|
||||
|
||||
let sd ={
|
||||
vormID : dit.id,
|
||||
groepID: self.editGroep().id,
|
||||
orgID: self.schoolid()
|
||||
}
|
||||
|
||||
apprise(waarschuwing , {verify: true, textYes: 'ja', textNo:'nee'}, function(ans){
|
||||
if (ans){
|
||||
$.post("index.php/monpas/groepen/activeerOS", sd, function(){
|
||||
dit.archief(false);
|
||||
});
|
||||
};// if ans
|
||||
});//apprise
|
||||
},
|
||||
|
||||
fDeleteOS : function(){
|
||||
var self = ls.GroepenModel;
|
||||
var dit = this;
|
||||
apprise("Weet u zeker dat u " + dit.naam() + " wilt verwijderen? </br/> Alle leerlingen (in alle groepen) die toegewezen zijn aan deze" +
|
||||
" ondersteuningsvorm worden ingedeeld in de basisondersteuning.", {verify: true, textYes: 'ja', textNo:'nee'}, function(ans){
|
||||
let waarschuwing ="Weet u zeker dat u " + dit.naam() + " wilt verwijderen?";
|
||||
if(dit.aantal > 0) "</br/> De leerlingen die toegewezen zijn aan deze ondersteuningsvorm worden ingedeeld in de basisondersteuning.";
|
||||
|
||||
apprise(waarschuwing, {verify: true, textYes: 'ja', textNo:'nee'}, function(ans){
|
||||
if (ans){
|
||||
$.post("index.php/monpas/groepen/deleteOS/" + dit.id, function(){
|
||||
self.editGroep().ondersteuningsvormen.remove(dit);
|
||||
});
|
||||
};// if ans
|
||||
}// if ans
|
||||
});//apprise
|
||||
},
|
||||
fWijzigLeerkrachten : function(){
|
||||
|
||||
Reference in New Issue
Block a user