From 0c1dd2942b1eb49b2f12c55d5e7316b98f0a7313 Mon Sep 17 00:00:00 2001 From: Monique Date: Tue, 25 Jan 2022 09:25:06 +0100 Subject: [PATCH 1/9] header sop --- application/controllers/monpas/Pdfmaker.php | 1 + public/tmp/temp187.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/application/controllers/monpas/Pdfmaker.php b/application/controllers/monpas/Pdfmaker.php index 3c3bf10..620c6d8 100644 --- a/application/controllers/monpas/Pdfmaker.php +++ b/application/controllers/monpas/Pdfmaker.php @@ -25,6 +25,7 @@ class Pdfmaker extends MY_Controller{ $inhoud = $input->pagina; $schooljaar = $input->titel; $orgsoort = $input->orgsoort; + //maak goede titel switch($orgsoort){ case 1 : $profiel = 'SWOP'; break; diff --git a/public/tmp/temp187.html b/public/tmp/temp187.html index c5358eb..38678f3 100644 --- a/public/tmp/temp187.html +++ b/public/tmp/temp187.html @@ -670,7 +670,7 @@ margin-bottom : 10px; margin-left : 10px; max-height : 95%; - min-width: : 70%; + min-width : 70%; max-width : 100%; font-size : 0.7em; } From 3ae6d69187b33246a20a5dc7301c911493ed154b Mon Sep 17 00:00:00 2001 From: Monique Date: Tue, 25 Jan 2022 09:28:50 +0100 Subject: [PATCH 2/9] nieuwe poging --- application/controllers/monpas/Pdfmaker.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/controllers/monpas/Pdfmaker.php b/application/controllers/monpas/Pdfmaker.php index 2d3533d..02c0bb2 100644 --- a/application/controllers/monpas/Pdfmaker.php +++ b/application/controllers/monpas/Pdfmaker.php @@ -23,9 +23,9 @@ class Pdfmaker extends MY_Controller{ $inputstring = $this->input->post('data'); $input = json_decode($inputstring); $inhoud = $input->pagina; -<<<<<<< HEAD + $titel = $input->titel; -======= + $schooljaar = $input->titel; $orgsoort = $input->orgsoort; //maak goede titel @@ -39,7 +39,7 @@ class Pdfmaker extends MY_Controller{ default : $profiel = 'SOP'; } $soptitel = 'Compact '.$profiel. ' ' . $schooljaar; ->>>>>>> zarchief/headersop + $schoolid = $input->schoolid; $schooljaarnummer = $input->schooljaarnr; $organisatie = $this->Organisaties_model->get(['id' => $schoolid],false, true); From 9fd2eac8ee415bdf40d41bbbd5a23635434bf9df Mon Sep 17 00:00:00 2001 From: Monique Date: Tue, 25 Jan 2022 10:21:13 +0100 Subject: [PATCH 3/9] pdfmaker --- application/controllers/monpas/Pdfmaker.php | 40 ++++++++++----------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/application/controllers/monpas/Pdfmaker.php b/application/controllers/monpas/Pdfmaker.php index 02c0bb2..d727d70 100644 --- a/application/controllers/monpas/Pdfmaker.php +++ b/application/controllers/monpas/Pdfmaker.php @@ -19,27 +19,23 @@ class Pdfmaker extends MY_Controller{ } function pdfSVG(){ - // if (!$this->userid) die; + // if (!$this->userid) die; $inputstring = $this->input->post('data'); $input = json_decode($inputstring); $inhoud = $input->pagina; - - $titel = $input->titel; - $schooljaar = $input->titel; $orgsoort = $input->orgsoort; //maak goede titel switch($orgsoort){ case 1 : $profiel = 'SWOP'; - break; + break; case 2 : $profiel = 'ROP'; - break; + break; case 3 : $profiel = 'BOP'; - break; + break; default : $profiel = 'SOP'; } $soptitel = 'Compact '.$profiel. ' ' . $schooljaar; - $schoolid = $input->schoolid; $schooljaarnummer = $input->schooljaarnr; $organisatie = $this->Organisaties_model->get(['id' => $schoolid],false, true); @@ -47,31 +43,31 @@ class Pdfmaker extends MY_Controller{ $html = $this->load->view('monpas/compactsop/sopcompact.php', $data, TRUE); $date = date('dmY'); $zoek = [" ", "'", "/"]; + $bestandstitel = str_replace($zoek, "", $soptitel); $schoolid = str_replace($zoek, "",$schoolid); - $schoolnaam = str_replace($zoek, "",$organisatie->naamkort); -// $schoolnaam = $organisatie->naamkort; - $titel = str_replace($zoek, "",$titel); + $sopschoolnaam = str_replace("'", "'", $organisatie->naamkort); + $bestandsschoolnaam = str_replace($zoek, "",$sopschoolnaam);; $frameworklogo= $this->config->item('vendor_url').'/images/logos/frameworklogo.png'; $logonaam = $this->Schooldetails_model->get(["organisatie_id" =>$schoolid],'logo', true); if (! $logonaam) $logonaam="monpaslogo.png"; $schoollogo = $this->config->item('vendor_url').'/images/logos/'.$logonaam; - - $headerdata = ['titel' =>$titel, - 'schoolnaam' =>$schoolnaam ? $schoolnaam : '', - 'logoframework' =>$frameworklogo, - 'logoschool' =>$schoollogo]; + + $headerdata = ['titel' =>$soptitel, + 'schoolnaam' =>$sopschoolnaam ? $sopschoolnaam : '', + 'logoframework' =>$frameworklogo, + 'logoschool' =>$schoollogo]; $footerdata = ""; $header = $this->load->view( "monpas/compactsop/compactheader", $headerdata, TRUE ) ; $footer = $this->load->view ("monpas/compactsop/compactfooter", $footerdata, TRUE); $filenaam = $this->compactsoppath.'sop.pdf'; - $bestandsnaam = "compactsop".$schoolnaam.$schoolid.$titel.'-'.$date.'.pdf'; + $bestandsnaam = "compactsop".$bestandsschoolnaam.$schoolid.$bestandstitel.'-'.$date.'.pdf'; $downloadnaam = $this->compactsoppath.$bestandsnaam; - - // TODO check if exists + + // TODO check if exists $data = [ 'organisatie_id' =>$schoolid, - 'schooljaarnummer' => $schooljaarnummer]; + 'schooljaarnummer' => $schooljaarnummer]; $csop = $this->Compactsop_model->get($data,false, true); if ($csop && $csop->id){ @@ -83,7 +79,7 @@ class Pdfmaker extends MY_Controller{ $sopid = $this->Compactsop_model->insert_record($data); } $margins = [15, 15,10, 5, 150]; //100 was 45 = headerheight - + $pdf= $this->Phantom_model->create_and_get_pdf($html, $filenaam, $header, TRUE, $margins,'portrait',TRUE,TRUE); file_put_contents($downloadnaam, $pdf); chmod($downloadnaam, 0777); @@ -96,6 +92,6 @@ class Pdfmaker extends MY_Controller{ header( 'Content-Length: ' . filesize( $downloadnaam ) ); readfile($downloadnaam); // - + } } \ No newline at end of file From db58248259dc64e7b54ca621158b4951739236ee Mon Sep 17 00:00:00 2001 From: Monique Date: Tue, 25 Jan 2022 10:23:10 +0100 Subject: [PATCH 4/9] Comacteonderdelen --- application/libraries/monpas/compactsop/Compacteonderdelen.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/libraries/monpas/compactsop/Compacteonderdelen.php b/application/libraries/monpas/compactsop/Compacteonderdelen.php index dd0e6f3..c0d36ed 100644 --- a/application/libraries/monpas/compactsop/Compacteonderdelen.php +++ b/application/libraries/monpas/compactsop/Compacteonderdelen.php @@ -106,6 +106,7 @@ class Compacteonderdelen 'naamkort' => $this->organisatie->naamkort, 'details' => $this->details, 'orgsoort' => $this->orgsoort, + 'orgsoortnr' => $this->organisatie->soort, 'schooljaar' => $this->schooljaar->naam, 'schooljaarnr' => $this->schooljaarnr, 'datum' => date("d-m-Y"), From 6686431d6f8d5167ffbf67eee47bf125a8a18d79 Mon Sep 17 00:00:00 2001 From: Monique Date: Tue, 25 Jan 2022 10:26:51 +0100 Subject: [PATCH 5/9] test --- application/libraries/monpas/compactsop/test.phtml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/libraries/monpas/compactsop/test.phtml b/application/libraries/monpas/compactsop/test.phtml index c931345..ebf1fd9 100644 --- a/application/libraries/monpas/compactsop/test.phtml +++ b/application/libraries/monpas/compactsop/test.phtml @@ -10,6 +10,12 @@ + + + +
From 0940c16dfddef39abeb654e4a02f3d1b5836021a Mon Sep 17 00:00:00 2001 From: Monique Date: Tue, 25 Jan 2022 10:28:15 +0100 Subject: [PATCH 6/9] blokjescompact --- application/views/monpas/compactsop/blokjescompact.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/application/views/monpas/compactsop/blokjescompact.php b/application/views/monpas/compactsop/blokjescompact.php index e12d4f7..fbc9703 100644 --- a/application/views/monpas/compactsop/blokjescompact.php +++ b/application/views/monpas/compactsop/blokjescompact.php @@ -10,6 +10,11 @@ + + +
From 20f773bc74a630adc398aa0928f2cd17999d4749 Mon Sep 17 00:00:00 2001 From: Monique Date: Tue, 25 Jan 2022 10:29:53 +0100 Subject: [PATCH 7/9] titel --- application/views/monpas/compactsop/compactheader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/monpas/compactsop/compactheader.php b/application/views/monpas/compactsop/compactheader.php index 5444c6e..55d3e21 100644 --- a/application/views/monpas/compactsop/compactheader.php +++ b/application/views/monpas/compactsop/compactheader.php @@ -13,7 +13,7 @@ padding-top:15px; margin-top:0px; margin-bottom:0px"> - +

Date: Wed, 2 Feb 2022 11:12:25 +0100 Subject: [PATCH 9/9] pdf van invullijst --- application/controllers/monpas/Monitor.php | 36 +++-- application/models/Phantom_model.php | 3 +- application/views/monpas/pages/monitor.php | 114 ++++++++----- .../views/monpas/reports/printlijst.php | 150 ++++++++++-------- public/css/monpas/main.css | 40 ++++- public/js/monpas/models/monitormodel.js | 73 ++++++++- 6 files changed, 291 insertions(+), 125 deletions(-) diff --git a/application/controllers/monpas/Monitor.php b/application/controllers/monpas/Monitor.php index 86b08f9..013046c 100644 --- a/application/controllers/monpas/Monitor.php +++ b/application/controllers/monpas/Monitor.php @@ -27,6 +27,8 @@ class Monitor extends MY_Controller{ $versies = array(); $organisatie=$this->Organisaties_model->get_record_by_id($this->globorgid); $module = $this->session->userdata('module'); + $modulenaam = $this->Modules_model->get_fieldvalue(['id'=>$module],'naamkort'); + $modulenaam = str_replace(' ', '', $modulenaam); $gaverder = true; // zoek verder omdat er nog geen actieve versie is // zoek eerst de reeds ingevulde versies // zoek dan de actieve versie @@ -56,7 +58,9 @@ class Monitor extends MY_Controller{ $versies = array_merge($actieveversie, $versies); } }; - echo json_encode(array("versies"=>$versies, "soort"=>$organisatie->soort)); + echo json_encode(array("versies"=>$versies, + "soort"=>$organisatie->soort, + "module" => $modulenaam)); } function getperiodesperschoolvanuitpartituur(){ if (!$this->userid) die; @@ -220,20 +224,26 @@ class Monitor extends MY_Controller{ } function printlijst(){ - $input0 = $this->input->post('data'); - $input = json_decode($input0); -//var_dump('input', $input); + $inputstring = $this->input->post('data'); + $input = json_decode($inputstring); + $module = $input->module; + $info = $input->info; + $tabel = $input->tabel; + $notitie = $input->notitie; + $zichtbaar = $input->zichtbaar; + $data = []; + $data['module'] = $module; + $data['info'] = $info; + $data['tabel'] = $tabel; + $data['notitie'] = $notitie; + $data['zichtbaar'] = $zichtbaar; + $data['today'] = date("d-m-Y"); + $data['organisatie'] = ''; $organisatie = $this->Organisaties_model->get_orgnaam($this->globorgid); - $instrument = $this->Modules_model->get_fieldvalue(array("sysnr" =>$this->module), "naam") ; + if($organisatie) $data['organisatie'] = $organisatie; + $filenaam = $input->filenaam; + $html=$this->load->view("monpas/reports/printlijst.php", $data, true); - $data=array( "instrument" => $instrument, - "organisatie" => $organisatie, - "versie" => $input->orgversie, - "today" => date('d-m-Y'), - "listitems" => json_decode($input->tabelinfo), - "notitie" => $input->notitie); - $html=$this->load->view("monpas/reports/printlijst", $data, true); - $filenaam="MonPasInvullijst"; $this->Phantom_model->create_pdf($html,$filenaam, FALSE,FALSE,FALSE); } } diff --git a/application/models/Phantom_model.php b/application/models/Phantom_model.php index f4233aa..42b901c 100644 --- a/application/models/Phantom_model.php +++ b/application/models/Phantom_model.php @@ -25,7 +25,8 @@ class Phantom_model extends CI_Model{ curl_setopt_array($curl, array( CURLOPT_RETURNTRANSFER => 1, - CURLOPT_URL => 'https://print.pensare-services.nl/print', + CURLOPT_URL => $_ENV['printserver'], +// CURLOPT_URL => 'https://print.pensare-services.nl/print', CURLOPT_POST => 1, CURLOPT_POSTFIELDS => $data )); diff --git a/application/views/monpas/pages/monitor.php b/application/views/monpas/pages/monitor.php index 443adc8..5bfb7a2 100644 --- a/application/views/monpas/pages/monitor.php +++ b/application/views/monpas/pages/monitor.php @@ -13,10 +13,10 @@ value : selectedOrgversion, event : {change: fChangeVersion}"> - - - - + +

@@ -28,11 +28,11 @@
-
+
- - + + - + + +
- - - - -
nr indicator score
- - - +
+ + + +
+
+ + +
+
- % - + % + +
+
@@ -117,8 +127,8 @@ - - + + @@ -132,8 +142,10 @@ +
nr indicator nr indicator
+ style: {color: $parent.disabled()? '#d9d9d9' : '#262626' }" + style="vertical-align:top; border-right: 1px solid #ebebeb;">
@@ -144,7 +156,7 @@

@@ -157,7 +169,7 @@

+ enable: false" />

@@ -175,18 +187,44 @@
-
+

Notitie

+ data-bind="textInput: notitie, + event:{'input' : fUpdateNotitie} "> +
-
+ +
+
+

Notitie

+ +
+
+

- - - Zichtbaar maken bij de tabbladen ijkpunten, resultaatmatrix, ontwikkelagenda & lijsten.* + + + + Zichtbaar maken bij de tabbladen ijkpunten, resultaatmatrix, ontwikkelagenda & lijsten.* +

+ +
+

*Vul de gehele lijst in voordat u deze zichtbaar maakt. Niet ingevulde indicatoren worden ook meegenomen bij de berekening van het gemiddelde.

+
+
+
+
+
+

+ + □ + ✓ + Zichtbaar maken bij de tabbladen ijkpunten, resultaatmatrix, ontwikkelagenda & lijsten.*

diff --git a/application/views/monpas/reports/printlijst.php b/application/views/monpas/reports/printlijst.php index 1e4755e..a0ca698 100644 --- a/application/views/monpas/reports/printlijst.php +++ b/application/views/monpas/reports/printlijst.php @@ -1,17 +1,89 @@ - + input[type='radio']:after { + background-color: #ffffff; + content: ''; + display: inline-block; + visibility: visible; + border: 2px solid gainsboro; + width: 15px; + height: 15px; + border-radius: 15px; + top: -2px; + left: -1px; + position: relative; + } -
-

: Invullijst

+ input[type='radio']:checked:after { + width: 15px; + height: 15px; + border-radius: 15px; + top: -2px; + left: -1px; + position: relative; + background-color: #6f0b3d !important; + content: ''; + display: inline-block; + visibility: visible; + border: 2px solid gainsboro; + } + + .breakpagepdf{ + page-break-after: always; + } + .rapport{ + text-align: right; + padding-right: 3px; + max-width:40px; + } + + .alleenVoorPdf{ + display: inline; + } + .nietVoorPdf{ + display: none; + } + + + + + + + + +
+ +

: Invullijst


@@ -20,7 +92,7 @@ - + @@ -28,63 +100,13 @@
Lijstversie:
Per:

+
+ +
+
- - - - - - - - - - -
nummer?>omschrijving?>
- - - - - - - - - - indicatorscores){ - foreach($item->indicatorscores as $score){ ?> - - - - - - - - -
nr indicator score
nummer?>omschrijving?> - scoretype == 1){echo $score->score;}; - if ($score->scoretype == 2){echo $score->score." %";}; - if ($score->scoretype == 3 ||$score->scoretype == 4 ||$score->scoretype == 5 || - $score->scoretype == 6|| $score->scoretype == 7){ - if ($score->scoretype== 6) { - $textJa = ' onvol.'; - $textNee = 'vol.';} - else { - $textJa ="ja"; - $textNee = 'nee'; - }; - ?> - - score ==1) echo "checked"; ?> /> - score ==2) echo "checked"; ?> /> - score ==3) echo "checked"; ?> /> thirdoptiontext?> - scoretype; ?> - -
-
-Notitie

"; - echo "".$notitie.""; -} ?> +
+ + + diff --git a/public/css/monpas/main.css b/public/css/monpas/main.css index 8b96669..a8b3cd2 100644 --- a/public/css/monpas/main.css +++ b/public/css/monpas/main.css @@ -42,6 +42,37 @@ font-style: normal; } +input[type='radio']:after { + width: 15px; + height: 15px; + border-radius: 15px; + top: -2px; + left: -1px; + position: relative; + background-color: #ffffff; + content: ''; + display: inline-block; + visibility: visible; + border: 2px solid gainsboro; +} + +input[type='radio']:checked:after { + width: 15px; + height: 15px; + border-radius: 15px; + top: -2px; + left: -1px; + position: relative; + background-color: #6f0b3d !important; + content: ''; + display: inline-block; + visibility: visible; + border: 2px solid gainsboro; +} + +.breakpagepdf{ + page-break-after: always; +} .appriseOuter{ border: 1px solid #003469 @@ -854,6 +885,13 @@ tr.selected, td.selected{ padding-right: 3px; max-width:40px; } + +.alleenVoorPdf{ + display: none; +} +.nietVoorPdf{ + display: inline; +} .integer{ text-align: right; padding-right: 3px; @@ -978,7 +1016,7 @@ z-index: 50; } .noinput{ border:none; - background-color: #ffffff important!; + background-color: #ffffff !important; } .kopje{ background-color: #d8a8bf; diff --git a/public/js/monpas/models/monitormodel.js b/public/js/monpas/models/monitormodel.js index 2e81921..fcc69ba 100644 --- a/public/js/monpas/models/monitormodel.js +++ b/public/js/monpas/models/monitormodel.js @@ -118,6 +118,7 @@ $(function(){ bezig : ko.observable(false), meetellen : ko.observable(false), optieslengte : ko.observable(0), + module : ko.observable(''), initBindings :function(){ var self = ls.MonitorModel; @@ -145,6 +146,7 @@ $(function(){ }; // if self.soort(data.soort); + self.module(data.module); hideAjaxLoader(); },'json'); }, @@ -211,7 +213,6 @@ $(function(){ fUpdateScoretypeVanaf3: function(data){ var self= ls.MonitorModel var indicatorscoreID = data; - console.log(this, "this") var submitData = { indicatorscoreid : indicatorscoreID, @@ -260,17 +261,73 @@ $(function(){ fPrint:function(){ var self =ls.MonitorModel; - if (self.bezig()) return; + // if (self.bezig()) return; self.bezig(true); - var items = ko.toJSON(self.listitems()); - var data ={ 'orgversie' : self.selectedOrgversion().info(), - 'tabelinfo' : items, - 'notitie' : self.notitie()} - data=JSON.stringify(data); + var fvID = self.fvid(); + $.post("index.php/monpas/monitor/getlistitems/" + self.selectedOrgversion().id, function(data){ + self.listitems.removeAll(); + self.scoreopties.removeAll(); + if (data.ijkpunten){ + $.each(data.ijkpunten,function(i,p){ + self.listitems.push(new fAddListitem(p)); + });// each + }; //if + + if(data.scoreopties){ + $.each(data.scoreopties,function(x,o){ + self.scoreopties.push(new fAddScoreoptie(o)); + });// each + self.optieslengte(self.scoreopties().length); + } + + self.notitie(data.notitie); + if(data.meetellen && data.meetellen == 1) { + self.meetellen(true); + } + else{ + self.meetellen(false); + } + self.fvid(fvID); + + self.fMaakPDF(); + + + },'json'); + + + + self.bezig(false); + + }, + + fMaakPDF(){ + var self = ls.MonitorModel; + var module = self.module(); + var info = self.selectedOrgversion().info(); + var tabel = document.getElementById("invulTabel").outerHTML; + var notitie = false; + var ingevuldenotitie = self.notitie(); + if (ingevuldenotitie && ingevuldenotitie.length > 0) + notitie = document.getElementById("invulNotitie").outerHTML; + var zichtbaar = document.getElementById("invulZichtbaar").outerHTML; + + + console.log( notitie, "notitie") + + var sd = { + 'module' : module, + 'info' : info, + 'tabel' : tabel, + 'notitie' : notitie, + 'zichtbaar' : zichtbaar, + 'filenaam' : 'formulier' + self.module()+ 'nr' + self.selectedOrgversion().periodenummer + } + + data=JSON.stringify(sd); + var $form = $("
").append($('').val(data) ); $form.appendTo("body").submit(); - self.bezig(false); } } ; // definition van model