Merge branch 'feature/robbobswop' into develop

This commit is contained in:
Monique
2021-09-07 10:29:38 +02:00
170 changed files with 1738 additions and 194424 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

+58 -28
View File
@@ -24,6 +24,7 @@ mh.initCompactSopModel = function(){
var dit = this;
this.id = o.id;
this.nummer = o.nummer;
this.toonnummer = o.toon_nummer;
this.ijkpunten = o.ijkpunten;
this.geenLicentie = ko.observable(o.licentie == "T" ? false : true);
this.naam = o.naam;
@@ -36,23 +37,20 @@ mh.initCompactSopModel = function(){
case '5': dit.naamkort2('Exp.Team'); break;
case '6': dit.naamkort2('Tevr. School'); break;
case '7': dit.naamkort2('Middelen'); break;
case '8': dit.naamkort2('Insp. indic.');
case '8': dit.naamkort2('Insp. indic.'); break;
case '9': dit.naamkort2('Exp. SO & SBO'); break;
case '10': dit.naamkort2('Diversiteit'); break;
}
this.groepen = ko.observable(o && o.groepen && o.groepen > 8 ? o.groepen : 0);
this.schooltype = o.schooltype;
this.modulenr = o.modulenr;
this.versie = o.versie;
this.schooljaar = o.schooljaar;
// this.schooljaarV = o.schooljaarV;
this.aantallln = ko.observable(o && o.aantallln ? o.aantallln : 0);
// this.aantalllnV = ko.observable(o && o.aantalllnV ? o.aantalllnV : 0);
//
this.gekozenVersie = ko.observable('');
this.selected = ko.observable(false); // selected om geplaatst te worden
this.opA4 = ko.observable(false); // op een pagina gezet
this.gekozenVergelijking = ko.observable();
// this.tlvs = ko.observableArray([]);
// this.arrangementen = ko.observableArray([]);
this.orgversies = ko.observableArray([]);
this.budgetversies = ko.observableArray([]);
this.omvangschooljaren = ko.observableArray([]);
@@ -93,8 +91,10 @@ mh.initCompactSopModel = function(){
var diversiteit = o.erIsDiversiteit === 'T' ? true : false
if (this.geenLicentie() ) return "Geen licentie voor het instrument bij dit onderdeel." ;
if (diversiteit && this.nummer == 1) return this.versie
if (! diversiteit && this.nummer == 1) { return "Vul eerst de diversiteitsmeter" + schooljaar + " in."; }
if (diversiteit && (this.nummer == 1 || this.nummer == 10)) return this.versie
if (! diversiteit && this.nummer == 1 ) { return "Vul eerst de diversiteitsmeter" + schooljaar + " in."; }
if (! diversiteit && this.nummer == 10 ) { return "Vul eerst de diversiteitsmeter PO 2203, "+ schooljaar + " in. "; }
if (this.nummer==7 ){
if (!this.budgetversies() || this.budgetversies().length === 0 ) return "Vul eerst de monitor financiën in."
@@ -176,12 +176,16 @@ mh.initCompactSopModel = function(){
this.schooljaarnr = g.schooljaarnr;
this.erZijnTLVs = g.erZijnTLVs;
this.erZijnArrangementen = g.erZijnArrangementen;
this.orgsmetlln = g.orgsmetlln;
this.orgsmettlvs = g.orgsmettlvs;
this.orgsmetarrs = g.orgsmetarrs;
}
function fAddOrgversie(z, v) {
this.orgversieid = ko.observable(v.id);
this.naam = v.naam;
this.naamkort = v.naamkort;
this.aantalorgs = v.aantalorgs;
this.scoretype = v.scoretype;
this.periodenummer = v.periodenummer;
this.versieid = v.versie_id;
@@ -232,6 +236,7 @@ mh.initCompactSopModel = function(){
this.breedte = ko.observable('col-xs-5');
this.nummer = ko.observable(bestaandBlokje ? bestaandBlokje.nummer : null);
this.toonnummer = ko.observable(bestaandBlokje ? bestaandBlokje.toonnummer : null);
this.naam = ko.observable(bestaandBlokje ? bestaandBlokje.naam : '');
@@ -258,6 +263,9 @@ mh.initCompactSopModel = function(){
onderdelen : ko.observableArray([]),
school : ko.observableArray([]),
selectedOmvangJaren : ko.observableArray([]),
orgsoort : ko.observable(''),
orgsoortnummer : ko.observable(),
label : ko.observable(''),
schoolasobject : ko.observable(),
selectedSchooljaar : ko.observable(''),
selectedSopID : ko.observable(''),
@@ -276,7 +284,7 @@ mh.initCompactSopModel = function(){
looptijdNieuwV : ko.observable('L'),
aantalNieuwV : ko.observable(0),
schooljanee : ko.observable(false),
editok : ko.observable(false),
// editok : ko.observable(false),
erIsEenSop : ko.observable(false),
druk : ko.observable(false),
toonOnderdelen : ko.observable(true),
@@ -306,26 +314,43 @@ mh.initCompactSopModel = function(){
return mh.CompactSopModel.uploadLogoNaam().replace('C:\\fakepath\\', '')
}),
initBindings :function(){
var self = mh.CompactSopModel;
if (!ko.dataFor(document.getElementById('pagcompactsop')) ) {
ko.applyBindings(mh.CompactSopModel, document.getElementById("pagcompactsop"));
}
$.post('index.php/monpas/sop/getrechten', function (result) {
self.editok(result);
$.post("index.php/monpas/compactsop/getorgsoort", function (result){
console.log(result)
if(result){
self.orgsoortnummer(result);
console.log(self.orgsoortnummer())
console.log(result, "result")
switch(result){
case '1': self.orgsoort('SWV');
self.label('SWOP');
break;
case '2': self.orgsoort('Regio');
self.label('ROP');
break;
case '3': self.orgsoort('Bestuur');
self.label('BOP');
break;
case '4': self.orgsoort('School');
self.label('SOP');
break;
}
}
self.druk(true);
self.initModel();
}, 'json');
},'json');
},
initModel: function(){
var self =mh.CompactSopModel;
$.post("index.php/monpas/compactsop/controleerschool", function (result){
self.schooljanee(result);
if (self.schooljanee() ){
self.druk(true);
self.fGetSchooljaren(function(){self.fGetCompactSop()})
}
},'json');
self.fGetSchooljaren(function(){self.fGetCompactSop()})
},
fGetSchooljaren: function(callback){
@@ -357,6 +382,8 @@ mh.initCompactSopModel = function(){
self.fGetSchooljaren()
return
}
// return;
$.post("index.php/monpas/compactsop/getCompactsop/" + self.selectedSchooljaar().id, function(result){
self.onderdelen.removeAll();
@@ -385,10 +412,10 @@ mh.initCompactSopModel = function(){
self.paginas.removeAll();
if(self.erIsEenSop()){
apprise("Het nieuwe Compact Sop overschrijft het bestaande Compact Sop bij dit schooljaar. Wilt u doorgaan?",
apprise("Het nieuwe Compact " + self.label() + " overschrijft het bestaande Compact " + self.label() + " bij dit schooljaar. Wilt u doorgaan?",
{verify: true, textYes: ' ja ', textNo: "nee"}, function (ans) {
if (ans) {
$.post("index.php/monpas/compactsop/getOnderdelenEnVersies/" + schooljaar, function(result){
$.post("index.php/monpas/compactsop/getOnderdelenEnVersies/" + schooljaar + "/" + self.orgsoortnummer() , function(result){
self.onderdelen.removeAll();
if(result){
$.each(result, function(i, o){
@@ -401,7 +428,7 @@ mh.initCompactSopModel = function(){
} // if ans
});//apprise
} else {
$.post("index.php/monpas/compactsop/getOnderdelenEnVersies/" + schooljaar, function(result){
$.post("index.php/monpas/compactsop/getOnderdelenEnVersies/" + schooljaar + "/" + self.orgsoortnummer() , function(result){
self.onderdelen.removeAll();
if(result){
$.each(result, function(i, o){
@@ -413,23 +440,22 @@ mh.initCompactSopModel = function(){
} // else
},
fGetSchoolgegevens: function(){
fGetOrganisatiegegevens: function(){
var self = mh.CompactSopModel;
$.post("index.php/monpas/compactsop/getSchoolgegevens", function (result) {
$.post("index.php/monpas/compactsop/getOrganisatiegegevens", function (result) {
if(result){
self.school.removeAll();
// hier kun je ook
//self.school(new fAddSchool(result)) doen.
// dan wordt het geen array maar een object
self.schoolasobject(new fAddSchool(result))
self.school.push(new fAddSchool(result));
$("#modSchool").modal('show');
}
}, 'json');
},
fSaveSchool: function(){
fSaveOrg: function(){
var self = mh.CompactSopModel;
if (timeout) {
@@ -494,7 +520,7 @@ mh.initCompactSopModel = function(){
this.selected(true);
if(self.selectedOnderdeel().nummer === '1' ){
if(self.selectedOnderdeel().nummer === '1' || self.selectedOnderdeel().nummer === '10' ){
self.selectedOnderdeel().gekozenVersie("");
}
else if(self.selectedOnderdeel().nummer === '3'){
@@ -698,6 +724,8 @@ mh.initCompactSopModel = function(){
} else {
self.tobemovedOnderdeel(this)
}
console.log(self.tobemovedOnderdeel(),"onderdeel" )
},
fHiernaartoe: function(){
@@ -745,6 +773,7 @@ mh.initCompactSopModel = function(){
selectedBlokje.gekozenVersie(self.tobemovedOnderdeel().gekozenVersie() ? self.tobemovedOnderdeel().gekozenVersie() : null)
selectedBlokje.gekozenVergelijking(self.tobemovedOnderdeel().gekozenVergelijking() ? self.tobemovedOnderdeel().gekozenVergelijking() : null)
selectedBlokje.nummer(self.tobemovedOnderdeel().nummer);
selectedBlokje.toonnummer(self.tobemovedOnderdeel().toonnummer)
selectedBlokje.gevuld(true);
selectedBlokje.kleur('#930f50');
selectedBlokje.naam(self.tobemovedOnderdeel().naam);
@@ -845,7 +874,7 @@ mh.initCompactSopModel = function(){
});
if(self.selectedOmvangJaren().length > 1){
self.selectedOmvangJaren.sort(function(a,b){return a-b}) ;
self.selectedOmvangJaren.sort(function(a,b){return b-a}) ;
}
var submitData = {
'schooljaarnr' : self.selectedSchooljaar().id,
@@ -870,6 +899,7 @@ mh.initCompactSopModel = function(){
});
},
filterSelected_NotPlaced: function(onderdelen){
console.log(onderdelen(), "onderdelen not placed()")
if (! onderdelen()) return false;
return onderdelen().filter(function(onderdeel){
return ( onderdeel.selected() && ! onderdeel.opA4() );
-1
View File
@@ -361,7 +361,6 @@ mh.initOmvangModel = function(){
fMaakChart: function(){
var self = mh.OmvangModel;
var schooljaren = [];
var arrangementen = [];
var aantal = [];
var datasbo = [];
var dataso = [];
+71 -63
View File
@@ -8,20 +8,26 @@ mh.initSopOverzichtModel = function(){
this.soort = p.soort;
this.brin = p.brin;
this.naam = p.naamkort;
this.soort = 'SWOP'
this.plaats = p.plaats;
this.geopend = ko.observable(false);
dit.kamers = ko.observableArray([]);
dit.scholen = ko.observableArray([]);
this.erIsEenSop = ko.observable(false);
if(p.sop === 'T') dit.erIsEenSop(true);
this.kamers = ko.observableArray([]);
// dit.scholen = ko.observableArray([]);
if (p.kamers){
$.each(p.kamers, function(j,k){
dit.kamers.push(new fAddKamer(k));
})
}
if (p.scholen ){
$.each(p.scholen, function(i,s){
dit.scholen.push(new fAddSchool(s));
})
}
this.bgs = ko.observableArray([])
this.scholen = ko.observableArray([]);
// if (p.scholen ){
// $.each(p.scholen, function(i,s){
// dit.scholen.push(new fAddSchool(s));
// })
// }
}
function fAddKamer(p){
@@ -30,32 +36,43 @@ mh.initSopOverzichtModel = function(){
this.soort = p.soort;
this.brin = p.brin;
this.naam = p.naamkort;
this.soort = 'ROP'
this.plaats = p.plaats;
this.geopend = ko.observable(false);
this.erIsEenSop = ko.observable(false);
if(p.sop === 'T') dit.erIsEenSop(true)
this.kamers = ko.observableArray()
this.bgs = ko.observableArray([]);
this.scholen = ko.observableArray([]);
// this.scholen = ko.observableArray([]);
if (p.bgs){
$.each(p.bgs, function(x,z){
dit.bgs.push(new fAddBG(z));
})
}
if (p.scholen){
$.each(p.scholen, function(i,s){
dit.scholen.push(new fAddSchool(s));
})
}
// if (p.scholen){
// $.each(p.scholen, function(i,s){
// dit.scholen.push(new fAddSchool(s));
// })
// }
}
function fAddBG(p){
var dit = this;
this.id = p.id;
this.soort = p.soort;
this.soort = 'BOP';
this.brin = p.brin;
this.naam = p.naamkort;
this.plaats = p.plaats;
this.geopend = ko.observable(false);
this.kamers = ko.observableArray();
this.bgs = ko.observableArray();
this.scholen = ko.observableArray([]);
this.erIsEenSop = ko.observable(false);
if(p.sop === 'T') dit.erIsEenSop(true)
if (p.scholen){
$.each(p.scholen, function(a,b){
dit.scholen.push(new fAddSchool(b));
@@ -66,7 +83,7 @@ mh.initSopOverzichtModel = function(){
function fAddSchool(b){
var dit = this;
this.id = b.id;
this.soort = b.soort;
this.soort = 'SOP';
this.brin = b.brin;
this.naam = b.naamkort;
this.plaats = b.plaats;
@@ -87,12 +104,10 @@ mh.initSopOverzichtModel = function(){
toporg : ko.observable(''),
selectedOrg : ko.observable(''),
orgsoort : ko.observable(1),
keuzesoort : ko.observable(1),
geopend : ko.observable(false),
schooljaren : ko.observableArray([]),
selectedSchooljaar : ko.observable(''),
gegevens : ko.observable(true),
alfabetisch : ko.observable(false),
@@ -127,16 +142,16 @@ mh.initSopOverzichtModel = function(){
fGetMenu: function(){
var self = mh.SopOverzichtModel;
self.alfabetisch(false);
var submitData = {
'schooljaarnr' : self.selectedSchooljaar().id,
'orgid' : 0
};
$.post("index.php/monpas/overzichtsop/getoverzicht", submitData , function(data){
console.log(data, "data")
self.toporg('');
if (data.organisatie){
self.orgsoort(data.soort);
self.keuzesoort(data.soort);
self.orgsoort(data.soort);
switch (self.orgsoort()){
case 1: self.toporg(new fAddSWV(data.organisatie));
break;
@@ -151,19 +166,12 @@ mh.initSopOverzichtModel = function(){
},'json');
},
fChangeSchooljaar: function(){
fChangeSchooljaar: function() {
var self = mh.SopOverzichtModel;
if(!self.selectedSchooljaar()) return;
if(!self.alfabetisch())self.fGetOverzicht();
if(self.alfabetisch())self.fGetAlfabetisch();
if (!self.selectedSchooljaar()) return;
self.fGetOverzicht();
},
fToggleOrdening: function(){
var self = mh.SopOverzichtModel;
self.alfabetisch(!self.alfabetisch());
if(!self.alfabetisch())self.fGetOverzicht();
if(self.alfabetisch())self.fGetAlfabetisch();
},
fGetOverzicht: function(){
var self =mh.SopOverzichtModel;
@@ -174,8 +182,8 @@ mh.initSopOverzichtModel = function(){
};
$.post("index.php/monpas/overzichtsop/getoverzicht", submitData , function(data){
if (data.organisatie){
self.keuzesoort(data.soort);
switch (self.keuzesoort()){
self.orgsoort(data.soort);
switch (self.orgsoort()){
case 1: self.selectedOrg(new fAddSWV(data.organisatie));
break;
case 2: self.selectedOrg(new fAddKamer(data.organisatie));
@@ -189,40 +197,40 @@ mh.initSopOverzichtModel = function(){
},'json');
},
fGetAlfabetisch: function(){
var self =mh.SopOverzichtModel;
if(self.selectedOrg().soort === '3' || self.selectedOrg().soort === '4'){
self.fGetOverzicht();
return;
}
var submitData = {
'schooljaarnr' : self.selectedSchooljaar().id,
'orgid' : self.selectedOrg().id
};
$.post("index.php/monpas/overzichtsop/getAlfabetisch", submitData , function(data){
if (data.organisatie){
self.keuzesoort(data.soort);
if(self.keuzesoort() === '1') self.selectedOrg(new fAddSWV(data.organisatie));
if(self.keuzesoort() === '2') self.selectedOrg(new fAddKamer(data.organisatie));
}
},'json');
},
// fGetAlfabetisch: function(){
// var self =mh.SopOverzichtModel;
// if(self.selectedOrg().soort === '3' || self.selectedOrg().soort === '4'){
// self.fGetOverzicht();
// return;
// }
// var submitData = {
// 'schooljaarnr' : self.selectedSchooljaar().id,
// 'orgid' : self.selectedOrg().id
// };
// $.post("index.php/monpas/overzichtsop/getAlfabetisch", submitData , function(data){
// if (data.organisatie){
// self.orgsoort(data.soort);
// if(self.orgsoort() === '1') self.selectedOrg(new fAddSWV(data.organisatie));
// if(self.orgsoort() === '2') self.selectedOrg(new fAddKamer(data.organisatie));
// }
// },'json');
// },
fToggleGeopend: function(){
var self =mh.SopOverzichtModel;
this.geopend(!this.geopend());
},
// fToggleGeopend: function(){
// var self =mh.SopOverzichtModel;
// this.geopend(!this.geopend());
// },
fSwitchOrg: function(){
var self =mh.SopOverzichtModel;
if (self.selectedOrg() === undefined) return;
if (this.id === self.selectedOrg().id) return;
self.keuzesoort('');
self.selectedOrg(this);
if (!self.alfabetisch()) self.fGetOverzicht();
if (self.alfabetisch()) self.fGetAlfabetisch();
},
// fSwitchOrg: function(){
// var self =mh.SopOverzichtModel;
// if (self.selectedOrg() === undefined) return;
// if (this.id === self.selectedOrg().id) return;
// self.orgsoort('');
// self.selectedOrg(this);
// if (!self.alfabetisch()) self.fGetOverzicht();
// if (self.alfabetisch()) self.fGetAlfabetisch();
//
// },
fOpenPDF: function(){
var self =mh.SopOverzichtModel;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff