deactiveren swv,kamer,bestuur
This commit is contained in:
@@ -28,7 +28,7 @@ class Organisaties extends MY_Controller{
|
||||
function getorgsperlevel(){
|
||||
$soort = $this->uri->segment(4);
|
||||
$toporgid = $this->input->post("toporgid");
|
||||
$orgs = $this->Organisaties_model->getorgsdetails($soort,$toporgid);
|
||||
$orgs = $this->Organisaties_model->getorgsdetails_metarchief($soort,$toporgid);
|
||||
echo json_encode($orgs);
|
||||
}
|
||||
|
||||
|
||||
@@ -282,13 +282,29 @@ class Organisaties_model extends MY_Model{
|
||||
O.bijlagefile, SD.email1
|
||||
FROM tb_organisaties O
|
||||
LEFT JOIN tb_schooldetails SD ON O.id = SD.organisatie_id
|
||||
WHERE O.soort = {$soort} ";
|
||||
WHERE O.soort = {$soort}
|
||||
AND actief = 1 ";
|
||||
if ($valtonder) {
|
||||
$this->sql .=" AND O.valtonder_id = {$valtonder} ";
|
||||
}
|
||||
$this->sql .=" ORDER BY O.actief DESC, O.id ASC ";
|
||||
|
||||
return $this->get_query_result();
|
||||
}
|
||||
|
||||
function getorgsdetails_metarchief($soort, $valtonder){
|
||||
$this->sql="SELECT O.id, O.soort, O.brin, O.naamkort, O.naam,
|
||||
O.plaats, O.valtonder_id, O.actief, O.monbas, O.mondiv,
|
||||
O.bijlagefile, SD.email1
|
||||
FROM tb_organisaties O
|
||||
LEFT JOIN tb_schooldetails SD ON O.id = SD.organisatie_id
|
||||
WHERE O.soort = {$soort} ";
|
||||
if ($valtonder) {
|
||||
$this->sql .=" AND O.valtonder_id = {$valtonder} ";
|
||||
}
|
||||
$this->sql .=" ORDER BY O.actief DESC, O.id ASC ";
|
||||
return $this->get_query_result();
|
||||
}
|
||||
|
||||
function getorgdetails($id){
|
||||
$this->sql="SELECT id, soort, brin, naamkort, naam, plaats,valtonder_id, actief,monbas, mondiv
|
||||
FROM tb_organisaties
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<div class="col-sm-12 mainpagina submenupage" id="pagOrganisatiesXL">
|
||||
<div class="row">
|
||||
<div class="col-sm-7" style="margin-top:20px">
|
||||
|
||||
<span style="width: 100px;display:inline-block;"> SWV </span>
|
||||
<select style="width: 65%"
|
||||
data-bind=" options : swvs,
|
||||
@@ -16,12 +15,14 @@
|
||||
click:fPopEditOrg.bind($data,1)">
|
||||
</button>
|
||||
|
||||
<i class="fa fa-square-o"
|
||||
style=" background-color: white; font-size: 23px; margin: 2px; margin-top 6px;"
|
||||
data-bind="visible: selectedSWV() && selectedSWV().actief() == false, click: $root.fDearchiveer.bind($data,1)"></i>
|
||||
<button data-bind="visible: selectedSWV() && selectedSWV().actief() == false,
|
||||
click: $root.fDearchiveer.bind($data,1)"
|
||||
style=" border: none; border-radius: unset; box-shadow:none; font-weight: bold ">A
|
||||
</button>
|
||||
|
||||
<button class="noshow delete" data-bind="click:fDeleteOrg.bind($data, 1)"> </button>
|
||||
|
||||
<button class="noshow delete"
|
||||
data-bind="click:fDeleteOrg.bind($data, 1)">
|
||||
</button>
|
||||
|
||||
<div style="margin-top:10px">
|
||||
<span style="width: 100px;display:inline-block;"> Kamer </span>
|
||||
@@ -32,18 +33,18 @@
|
||||
style : {'backgroundColor': selectedKamer() && selectedKamer().actief() == true ? 'white' : 'lightgrey'},
|
||||
event : {change: fChangeKamer}">
|
||||
</select>
|
||||
<button class="noshow plus" data-bind="click:fPopNewKamer"> </button>
|
||||
<button class="noshow plus" data-bind="click:fPopNewKamer">
|
||||
</button>
|
||||
<button class="noshow editbutton"
|
||||
data-bind="visible: selectedKamer() && selectedKamer().actief() == true,
|
||||
click:fPopEditOrg.bind($data,2)">
|
||||
click:fPopEditOrg.bind($data,2)">
|
||||
</button>
|
||||
<button data-bind="visible: selectedKamer() && selectedKamer().actief() == false,
|
||||
click: $root.fDearchiveer.bind($data,2)"
|
||||
style=" border: none; border-radius: unset; box-shadow:none; font-weight: bold ">A
|
||||
</button>
|
||||
<button class="noshow delete" data-bind="click:fDeleteOrg.bind($data,2)">
|
||||
</button>
|
||||
|
||||
<i class="fa fa-square-o"
|
||||
style=" background-color: white; font-size: 23px; margin: 2px; margin-top 6px;"
|
||||
data-bind="visible: selectedKamer() && selectedKamer().actief() == false, click: $root.fDearchiveer.bind($data,2)"></i>
|
||||
|
||||
|
||||
<button class="noshow delete" data-bind="click:fDeleteOrg.bind($data,2)"> </button>
|
||||
</div>
|
||||
|
||||
<div style="margin-top:10px">
|
||||
@@ -56,7 +57,8 @@
|
||||
style : {'backgroundColor': selectedBG() && selectedBG().actief() == true ? 'white' : 'lightgrey'},
|
||||
event : {change: fChangeBG}">
|
||||
</select>
|
||||
<button class="noshow plus" data-bind="click:fPopNewBG"> </button>
|
||||
<button class="noshow plus" data-bind="click:fPopNewBG">
|
||||
</button>
|
||||
|
||||
|
||||
<button class="noshow editbutton"
|
||||
@@ -64,13 +66,17 @@
|
||||
click:fPopEditOrg.bind($data,3)">
|
||||
</button>
|
||||
|
||||
<i class="fa fa-square-o"
|
||||
style=" background-color: white; font-size: 23px; margin: 2px; margin-top 6px;"
|
||||
data-bind="visible: selectedBG() && selectedBG().actief() == false, click: $root.fDearchiveer.bind($data,3)"></i>
|
||||
<button data-bind="visible: selectedBG() && selectedBG().actief() == false,
|
||||
click: $root.fDearchiveer.bind($data,3)"
|
||||
style=" border: none; border-radius: unset; box-shadow:none; font-weight: bold ">A
|
||||
|
||||
</button>
|
||||
|
||||
|
||||
|
||||
<button class="noshow delete" data-bind="click:fDeleteOrg.bind($data,3)"> </button>
|
||||
<button class="noshow delete"
|
||||
data-bind="click:fDeleteOrg.bind($data,3)">
|
||||
</button>
|
||||
</div>
|
||||
</div> <!-- div col 6-->
|
||||
<div class="col-sm-5">
|
||||
|
||||
@@ -430,7 +430,7 @@ ls.initOrganisatiesModel = function(){
|
||||
dit = this;
|
||||
break;
|
||||
}
|
||||
dit.actief(true);
|
||||
|
||||
|
||||
|
||||
var submitData = {
|
||||
@@ -444,6 +444,7 @@ ls.initOrganisatiesModel = function(){
|
||||
|
||||
}
|
||||
else{
|
||||
dit.actief(true);
|
||||
self.erIsArchief(false);
|
||||
$.each(self.scholen(), function (i,s){
|
||||
if(s.actief() == false) self.erIsArchief(true);
|
||||
|
||||
Reference in New Issue
Block a user