From 600de45445185b8175d345e63ea79ae49b3dda2e Mon Sep 17 00:00:00 2001 From: Monique Date: Fri, 9 Dec 2022 16:31:45 +0100 Subject: [PATCH] orgversie swv --- application/controllers/monpas/Streefcijfers.php | 14 +++++++++----- application/core/MY_Controller.php | 2 +- application/views/monpas/pages/streefcijfers.php | 2 +- public/js/monpas/models/streefcijfersmodel.js | 6 ++---- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/application/controllers/monpas/Streefcijfers.php b/application/controllers/monpas/Streefcijfers.php index 972d17b..ff8f14d 100644 --- a/application/controllers/monpas/Streefcijfers.php +++ b/application/controllers/monpas/Streefcijfers.php @@ -272,11 +272,14 @@ class Streefcijfers extends MY_Controller{ } } - $ambitie = $this->Ambities_model->mh_get_ambities($module, $this->globorgid, $this->globorgid); - if($ambitie) $ambities = array_merge($ambities,$ambitie); - else{ - $standaardSWVNodig = true; - $orgversie = $this->Orgversies_model->getOrgVersie($this->globorgid, $module); + $orgversie = $this->Orgversies_model->getOrgVersie($this->globorgid, $module); + if($orgversie) { + $ambitie = $this->Ambities_model->mh_get_ambities($module, $this->globorgid, $orgversie->orgversieID); + if ($ambitie) $ambities = array_merge($ambities, $ambitie); + else { + $standaardSWVNodig = true; + + } } } @@ -383,6 +386,7 @@ class Streefcijfers extends MY_Controller{ if (!$this->userid) die; $orgversieid = $this->clean_input("orgversieid"); + $id = false; if($this->super == false) { $result = $this->Autorisatienivos_model->checkmanage($this->userid, $this->globorgid); diff --git a/application/core/MY_Controller.php b/application/core/MY_Controller.php index db286f9..8f7b4e4 100644 --- a/application/core/MY_Controller.php +++ b/application/core/MY_Controller.php @@ -80,7 +80,7 @@ class MY_Controller extends CI_Controller{ // public $version = '1.18.08';// kleurenfout // public $version = '1.19.00';// ambities per org // public $version = '1.19.01';// compactdiv met orgid ipv globorg - public $version = '1.19.04';// ambities per org incl kamerversies + public $version = '1.19.05';// ambities per org incl kamerversies public $partituurid; public $globProfielVersieID = 1; public $userid; //id of the user that is logged in diff --git a/application/views/monpas/pages/streefcijfers.php b/application/views/monpas/pages/streefcijfers.php index 8131c4d..75c8826 100644 --- a/application/views/monpas/pages/streefcijfers.php +++ b/application/views/monpas/pages/streefcijfers.php @@ -58,7 +58,7 @@ % - + diff --git a/public/js/monpas/models/streefcijfersmodel.js b/public/js/monpas/models/streefcijfersmodel.js index d74e490..f860589 100644 --- a/public/js/monpas/models/streefcijfersmodel.js +++ b/public/js/monpas/models/streefcijfersmodel.js @@ -16,10 +16,9 @@ ls.initStreefcijfersModel = function(){ this.gemscore = ko.observable(p.gemscore); this.zprocent = ko.observable(p.zprocent); this.xijkpunten = ko.observable(p.xijkpunten); - this.ambitievan = ko.observable(p.ambitievanorg); this.ambitievansoort = ko.observable(p.ambitievan); this.versievan = ko.observable(p.versievan); - this.organisatie = p.organisatie ? p.organisatie : ''; + this.organisatie = p.organisatie ? p.organisatie : 'standaard'; this.soort = p.soort; this.aantalY = p.xijkpunten; this.periodenummer = p.periodenummer; @@ -162,7 +161,6 @@ ls.initStreefcijfersModel = function(){ }, fNew: function(){ var self = ls.StreefcijfersModel; - console.log(self, "self") self.insert(true); self.gemscoreNew(100); self.aantalYNew(); @@ -185,7 +183,7 @@ ls.initStreefcijfersModel = function(){ "xijkpunten" : self.aantalYNew(), "zprocent" : self.zprocentNew(), } - console.log(submitData, "sd") + $.post("index.php/monpas/streefcijfers/saveAmbitie", submitData, function(newid){