From 0a9bf59d51ba8cf33500919fe0e424b6bf215a5b Mon Sep 17 00:00:00 2001 From: Monique Date: Thu, 8 Dec 2022 16:40:53 +0100 Subject: [PATCH] conrole op ambitie groter dan 0 verwijderd --- application/core/MY_Controller.php | 2 +- application/libraries/monpas/ijkpunten/Lijsten.php | 4 ++-- application/models/monpas/Ambities_model.php | 2 +- public/js/monpas/models/streefcijfersmodel.js | 5 +++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/application/core/MY_Controller.php b/application/core/MY_Controller.php index 3a2aa79..db286f9 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.03';// ambities per org incl kamerversies + public $version = '1.19.04';// ambities per org incl kamerversies public $partituurid; public $globProfielVersieID = 1; public $userid; //id of the user that is logged in diff --git a/application/libraries/monpas/ijkpunten/Lijsten.php b/application/libraries/monpas/ijkpunten/Lijsten.php index a126e47..0e2542d 100644 --- a/application/libraries/monpas/ijkpunten/Lijsten.php +++ b/application/libraries/monpas/ijkpunten/Lijsten.php @@ -189,13 +189,13 @@ class Lijsten $standaard->zprocent = 60; - if($this->results && $this->results['ambities'] && $this->results['ambities']->gemscore > 0) $this->lijst->ambities = $this->results['ambities']; + if($this->results && $this->results['ambities'] && $this->results['ambities']->gemscore >= 0) $this->lijst->ambities = $this->results['ambities']; else $this->lijst->ambities = $standaard; if(!isset($this->vergelijkingen) || !$this->vergelijkingen) return; - if($this->vergelijkingen['ambities'] && $this->vergelijkingen['ambities']->gemscore > 0 ) $ambitiesV = $this->vergelijkingen['ambities']; + if($this->vergelijkingen['ambities'] && $this->vergelijkingen['ambities']->gemscore >= 0 ) $ambitiesV = $this->vergelijkingen['ambities']; else $ambitiesV = $standaard; if($ambitiesV->ambitievan != $this->lijst->ambities->ambitievan) $this->lijst->ambitiesV = $ambitiesV; diff --git a/application/models/monpas/Ambities_model.php b/application/models/monpas/Ambities_model.php index 0cf4681..2d71d12 100644 --- a/application/models/monpas/Ambities_model.php +++ b/application/models/monpas/Ambities_model.php @@ -148,7 +148,7 @@ function mh_get_ambitie_orgversie($orgversieid, $ambitieorgs, $toporgs){ A.gem_score AS gemscore, A.x_ijkpunten AS xijkpunten, A.z_procent AS zprocent, - O.naamkort AS ambitievan, + O.naamkort AS ambitievanorg, OV.id AS orgversieID, DATE_FORMAT( OV.geldigvanaf, '%d-%m-%Y') as geldigvanaf, DATE_FORMAT( OV.geldigtm, '%d-%m-%Y') as geldigtm, diff --git a/public/js/monpas/models/streefcijfersmodel.js b/public/js/monpas/models/streefcijfersmodel.js index f3c3e69..d74e490 100644 --- a/public/js/monpas/models/streefcijfersmodel.js +++ b/public/js/monpas/models/streefcijfersmodel.js @@ -16,7 +16,8 @@ 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.ambitievan); + 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.soort = p.soort; @@ -150,7 +151,7 @@ ls.initStreefcijfersModel = function(){ self.bezig(true); var submitData={ "id" : dit.id, "orgversie_id" : self.orgversieID, - "gemscore" : dit.gemscore(), + "gemscore" : dit.gemscore(), "xijkpunten" : dit.xijkpunten(), "zprocent" : dit.zprocent()} $.post("index.php/monpas/streefcijfers/updateambitie", submitData, function(newid){