From 09a5072a4a2951399b81a95d9dc6db4b3b3f69b8 Mon Sep 17 00:00:00 2001 From: OliiverHacker Date: Wed, 31 Mar 2021 18:21:12 +0200 Subject: [PATCH 001/105] db update --- system/dbupdate_3.3.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 62beadbce..048f8380b 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -2032,6 +2032,28 @@ if (!$result = @$db->db_query("SELECT projekt_id FROM fue.tbl_projekt LIMIT 1")) } +// add column buchbar to fue.tbl_project +if (!$result = @$db->db_query("SELECT buchbar FROM fue.tbl_projekt LIMIT 1")) +{ + $qry = "ALTER TABLE fue.tbl_projekt ADD COLUMN buchbar BOOLEAN NOT NULL DEFAULT true;"; + + if(!$db->db_query($qry)) + echo 'fue.tbl_projekt '.$db->db_last_error().'
'; + else + echo '
Spalte buchbar zu fue.tbl_projekt hinzugefügt'; +} + +// add column buchbar to fue.tbl_projectphase +if (!$result = @$db->db_query("SELECT buchbar FROM fue.tbl_projektphase LIMIT 1")) +{ + $qry = "ALTER TABLE fue.tbl_projektphase ADD COLUMN buchbar BOOLEAN NOT NULL DEFAULT true;"; + + if(!$db->db_query($qry)) + echo 'fue.tbl_projektphase '.$db->db_last_error().'
'; + else + echo '
Spalte buchbar zu fue.tbl_projektphase hinzugefügt'; +} + // Extension Schema if ($result = $db->db_query("SELECT schema_name FROM information_schema.schemata WHERE schema_name='extension'")) { From 1b38b1adca70d51e9bc5c6a93775abdd40ea84dd Mon Sep 17 00:00:00 2001 From: OliiverHacker Date: Wed, 31 Mar 2021 18:22:56 +0200 Subject: [PATCH 002/105] add functionality of buchbar to project overview --- content/projekt/projekt.overlay.js.php | 172 ++++++++++-------- content/projekt/projektdetail.overlay.xul.php | 11 +- content/projekt/projektphase.overlay.js.php | 16 +- .../projektphasedetail.overlay.xul.php | 9 + include/projekt.class.php | 20 +- include/projektphase.class.php | 12 +- rdf/projekt.rdf.php | 1 + rdf/projektphase.rdf.php | 17 +- soap/projekt.soap.php | 17 +- soap/projekt.wsdl.php | 1 + 10 files changed, 188 insertions(+), 88 deletions(-) diff --git a/content/projekt/projekt.overlay.js.php b/content/projekt/projekt.overlay.js.php index fcb511f00..b48681e94 100644 --- a/content/projekt/projekt.overlay.js.php +++ b/content/projekt/projekt.overlay.js.php @@ -149,12 +149,22 @@ function onselectProjekt() var beginn=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#beginn" )); var ende=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#ende" )); var budget=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#budget" )); - var farbe=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#farbe" )); - var aufwand_pt=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#aufwand_pt" )); + var farbe=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#farbe" )); + var aufwand_pt=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#aufwand_pt" )); var anzahl_ma=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#anzahl_ma" )); var aufwandstyp_kurzbz=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#aufwandstyp_kurzbz" )); - - //Daten den Feldern zuweisen + var buchbar=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#buchbar" )); + + if (!buchbar) + { + buchbar='Nein'; + } + else + { + buchbar='Ja'; + } + + //Daten den Feldern zuweisen document.getElementById('textbox-projekt-detail-projekt_kurzbz').value=projekt_kurzbz; //document.getElementById('menulist-projekt-detail-oe_kurzbz').value=oe_kurzbz; @@ -166,9 +176,14 @@ function onselectProjekt() document.getElementById('textbox-projekt-detail-ende').value=ende; document.getElementById('textbox-projekt-detail-budget').value=budget; document.getElementById('textbox-projekt-detail-farbe').value=farbe; - document.getElementById('checkbox-projekt-detail-neu').checked=false; - document.getElementById('textbox-projekt-anzahl_ma').value=anzahl_ma; + document.getElementById('checkbox-projekt-detail-neu').checked=false; + document.getElementById('textbox-projekt-anzahl_ma').value=anzahl_ma; document.getElementById('textbox-projekt-aufwand_pt').value=aufwand_pt; + if(buchbar=='Nein') + document.getElementById('checkbox-projekt-detail-buchbar').checked=false; + else + document.getElementById('checkbox-projekt-detail-buchbar').checked=true; + MenulistSelectItemOnValue('menulist-projekt-detail-aufwandstyp', aufwandstyp_kurzbz); @@ -197,12 +212,13 @@ function saveProjektDetail() beginn = document.getElementById('textbox-projekt-detail-beginn').iso; ende = document.getElementById('textbox-projekt-detail-ende').iso; budget = document.getElementById('textbox-projekt-detail-budget').value; - farbe = document.getElementById('textbox-projekt-detail-farbe').value; + farbe = document.getElementById('textbox-projekt-detail-farbe').value; neu = document.getElementById('checkbox-projekt-detail-neu').checked; - aufwandstyp_kurzbz = MenulistGetSelectedValue('menulist-projekt-detail-aufwandstyp'); - anzahl_ma = document.getElementById('textbox-projekt-anzahl_ma').value; + aufwandstyp_kurzbz = MenulistGetSelectedValue('menulist-projekt-detail-aufwandstyp'); + anzahl_ma = document.getElementById('textbox-projekt-anzahl_ma').value; aufwand_pt = document.getElementById('textbox-projekt-aufwand_pt').value; - + buchbar = document.getElementById('checkbox-projekt-detail-buchbar').checked; + var soapBody = new SOAPObject("saveProjekt"); //soapBody.appendChild(new SOAPObject("username")).val('joe'); //soapBody.appendChild(new SOAPObject("passwort")).val('waschl'); @@ -217,14 +233,28 @@ function saveProjektDetail() projekt.appendChild(new SOAPObject("ende")).val(ende); projekt.appendChild(new SOAPObject("budget")).val(budget); projekt.appendChild(new SOAPObject("farbe")).val(farbe); - projekt.appendChild(new SOAPObject("aufwandstyp_kurzbz")).val(aufwandstyp_kurzbz); - projekt.appendChild(new SOAPObject("anzahl_ma")).val(anzahl_ma); + projekt.appendChild(new SOAPObject("aufwandstyp_kurzbz")).val(aufwandstyp_kurzbz); + projekt.appendChild(new SOAPObject("anzahl_ma")).val(anzahl_ma); projekt.appendChild(new SOAPObject("aufwand_pt")).val(aufwand_pt); - + console.log(buchbar); + if(buchbar) + { + projekt.appendChild(new SOAPObject("buchbar")).val('true'); + } + else + { + projekt.appendChild(new SOAPObject("buchbar")).val('false'); + } + if(neu) + { projekt.appendChild(new SOAPObject("neu")).val('true'); - else + } + else + { projekt.appendChild(new SOAPObject("neu")).val('false'); + } + soapBody.appendChild(projekt); var sr = new SOAPRequest("saveProjekt",soapBody); @@ -342,9 +372,9 @@ function ProjektDetailReset() document.getElementById('textbox-projekt-detail-beschreibung').value=''; document.getElementById('textbox-projekt-detail-beginn').value=''; document.getElementById('textbox-projekt-detail-ende').value=''; - document.getElementById('textbox-projekt-detail-budget').value=''; - document.getElementById('textbox-projekt-anzahl_ma').value=''; - document.getElementById('textbox-projekt-aufwand_pt').value=''; + document.getElementById('textbox-projekt-detail-budget').value=''; + document.getElementById('textbox-projekt-anzahl_ma').value=''; + document.getElementById('textbox-projekt-aufwand_pt').value=''; document.getElementById('textbox-projekt-detail-projektwuerdigkeit').value=''; } @@ -362,7 +392,7 @@ function ProjektDisableFields(val) document.getElementById('textbox-projekt-detail-budget').disabled=val; document.getElementById('textbox-projekt-detail-farbe').disabled=val; document.getElementById('button-projekt-detail-speichern').disabled=val; - document.getElementById('menulist-projekt-detail-aufwandstyp').disabled=val; + document.getElementById('menulist-projekt-detail-aufwandstyp').disabled=val; document.getElementById('textbox-projekt-anzahl_ma').disabled=val; document.getElementById('textbox-projekt-aufwand_pt').disabled=val; } @@ -385,65 +415,65 @@ function ProjektNeu() document.getElementById('textbox-projekt-detail-projekt_kurzbz').disabled=false; document.getElementById('checkbox-projekt-detail-neu').checked=true; document.getElementById('caption-projekt-detail').label='Neues Projekt'; - document.getElementById('textbox-projekt-detail-farbe').value='#FF0000'; - document.getElementById('textbox-projekt-anzahl_ma').disabled=false; + document.getElementById('textbox-projekt-detail-farbe').value='#FF0000'; + document.getElementById('textbox-projekt-anzahl_ma').disabled=false; document.getElementById('textbox-projekt-aufwand_pt').disabled=false; //Detail Tab auswaehlen document.getElementById('tabs-projekt-main').selectedItem=document.getElementById('tab-projekt-detail'); } - -function makeProjektAnalyse(){ - var ergebnis_el = document.getElementById('textbox-projekt-detail-projektwuerdigkeit'); - ergebnis_el.value=""; - var anzahl_ma = document.getElementById('textbox-projekt-anzahl_ma').value; - var aufwand_pt = document.getElementById('textbox-projekt-aufwand_pt').value; - var budget = document.getElementById('textbox-projekt-detail-budget').value; + +function makeProjektAnalyse(){ + var ergebnis_el = document.getElementById('textbox-projekt-detail-projektwuerdigkeit'); + ergebnis_el.value=""; + var anzahl_ma = document.getElementById('textbox-projekt-anzahl_ma').value; + var aufwand_pt = document.getElementById('textbox-projekt-aufwand_pt').value; + var budget = document.getElementById('textbox-projekt-detail-budget').value; var beginn = document.getElementById('textbox-projekt-detail-beginn').value; - var ende = document.getElementById('textbox-projekt-detail-ende').value; - - if (!anzahl_ma || !aufwand_pt || !budget || !beginn || !ende) - { - ergebnis_el.value = 'Angaben unvollständig'; - } - else - { - var beginn_arr = beginn.split("."); - var ende_arr = ende.split("."); - var date1 = new Date(beginn_arr[2],beginn_arr[1],beginn_arr[0]); - var date2 = new Date(ende_arr[2],ende_arr[1],ende_arr[0]); - - var dauerTage = parseInt((date2 - date1) / (1000 * 60 * 60 * 24)); - - var punkte_gesamt = 0; - var projekttyp = ''; - if (aufwand_pt < 10) punkte_gesamt += 1; - else if (aufwand_pt <= 50) punkte_gesamt += 4; - else if (aufwand_pt <= 250) punkte_gesamt += 8; - else punkte_gesamt += 8; - - if (anzahl_ma < 3) punkte_gesamt += 1; - else if (anzahl_ma <= 5) punkte_gesamt += 3; - else if (anzahl_ma <= 20) punkte_gesamt += 6; - else punkte_gesamt += 9; - - if (budget < 5000) punkte_gesamt += 1; - else if (budget <= 25000) punkte_gesamt += 2; - else if (budget <= 500000) punkte_gesamt += 4; - else punkte_gesamt += 6; - - if (dauerTage < 30) punkte_gesamt += 0; - else if (dauerTage <= 90) punkte_gesamt += 4; - else if (dauerTage <= 360) punkte_gesamt += 5; - else punkte_gesamt += 7; - - if (punkte_gesamt <= 8) projekttyp = 'Vorhaben'; - else if (punkte_gesamt <= 15) projekttyp = 'Kleinprojekt'; - else if (punkte_gesamt <= 30) projekttyp = 'Projekt'; - else projekttyp = 'Großrojekt'; - ergebnis_el.value = projekttyp; - } -} + var ende = document.getElementById('textbox-projekt-detail-ende').value; + + if (!anzahl_ma || !aufwand_pt || !budget || !beginn || !ende) + { + ergebnis_el.value = 'Angaben unvollständig'; + } + else + { + var beginn_arr = beginn.split("."); + var ende_arr = ende.split("."); + var date1 = new Date(beginn_arr[2],beginn_arr[1],beginn_arr[0]); + var date2 = new Date(ende_arr[2],ende_arr[1],ende_arr[0]); + + var dauerTage = parseInt((date2 - date1) / (1000 * 60 * 60 * 24)); + + var punkte_gesamt = 0; + var projekttyp = ''; + if (aufwand_pt < 10) punkte_gesamt += 1; + else if (aufwand_pt <= 50) punkte_gesamt += 4; + else if (aufwand_pt <= 250) punkte_gesamt += 8; + else punkte_gesamt += 8; + + if (anzahl_ma < 3) punkte_gesamt += 1; + else if (anzahl_ma <= 5) punkte_gesamt += 3; + else if (anzahl_ma <= 20) punkte_gesamt += 6; + else punkte_gesamt += 9; + + if (budget < 5000) punkte_gesamt += 1; + else if (budget <= 25000) punkte_gesamt += 2; + else if (budget <= 500000) punkte_gesamt += 4; + else punkte_gesamt += 6; + + if (dauerTage < 30) punkte_gesamt += 0; + else if (dauerTage <= 90) punkte_gesamt += 4; + else if (dauerTage <= 360) punkte_gesamt += 5; + else punkte_gesamt += 7; + + if (punkte_gesamt <= 8) projekttyp = 'Vorhaben'; + else if (punkte_gesamt <= 15) projekttyp = 'Kleinprojekt'; + else if (punkte_gesamt <= 30) projekttyp = 'Projekt'; + else projekttyp = 'Großrojekt'; + ergebnis_el.value = projekttyp; + } +} function ProjektPrintStatusbericht() { diff --git a/content/projekt/projektdetail.overlay.xul.php b/content/projekt/projektdetail.overlay.xul.php index 9c814954f..86be93b60 100644 --- a/content/projekt/projektdetail.overlay.xul.php +++ b/content/projekt/projektdetail.overlay.xul.php @@ -125,7 +125,7 @@ echo ''; - + + + diff --git a/content/projekt/projektphase.overlay.js.php b/content/projekt/projektphase.overlay.js.php index c5f3a9eef..aac989b18 100644 --- a/content/projekt/projektphase.overlay.js.php +++ b/content/projekt/projektphase.overlay.js.php @@ -161,7 +161,16 @@ function onselectTreeProjektphase() var budget=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#budget" )); var personentage=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#personentage" )); var farbe=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#farbe" )); - + var buchbar=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#buchbar" )); + + if (!buchbar) + { + buchbar='Nein'; + } + else + { + buchbar='Ja'; + } //alert(typ); //Daten den Feldern zuweisen @@ -180,6 +189,11 @@ function onselectTreeProjektphase() document.getElementById('textbox-projektphase-detail-personentage').value=personentage; document.getElementById('textbox-projektphase-detail-farbe').value=farbe; document.getElementById('checkbox-projektphase-detail-neu').checked=false; + if(buchbar=='Nein') + document.getElementById('checkbox-projekt-detail-buchbar').checked=false; + else + document.getElementById('checkbox-projekt-detail-buchbar').checked=true; + MenulistSelectItemOnValue('menulist-projektphase-detail-projektphase_fk', projektphase_fk); MenulistSelectItemOnValue('menulist-projektphase-detail-ressource', ressource_id); diff --git a/content/projekt/projektphasedetail.overlay.xul.php b/content/projekt/projektphasedetail.overlay.xul.php index f7b4dcb5b..4d8858af8 100644 --- a/content/projekt/projektphasedetail.overlay.xul.php +++ b/content/projekt/projektphasedetail.overlay.xul.php @@ -143,6 +143,15 @@ echo ''; + + + diff --git a/include/projekt.class.php b/include/projekt.class.php index 92a3129ec..f2ace5e29 100644 --- a/include/projekt.class.php +++ b/include/projekt.class.php @@ -47,7 +47,7 @@ class projekt extends basis_db public $farbe; public $anzahl_ma; // integer public $aufwand_pt; // integer - + public $buchbar; //bool /** @@ -86,6 +86,7 @@ class projekt extends basis_db $this->farbe = $row->farbe; $this->anzahl_ma = $row->anzahl_ma; $this->aufwand_pt = $row->aufwand_pt; + $this->buchbar = $this->db_parse_bool($row->buchbar); return true; } @@ -140,6 +141,7 @@ class projekt extends basis_db $obj->aufwandstyp_kurzbz = $row->aufwandstyp_kurzbz; $obj->anzahl_ma = $row->anzahl_ma; $obj->aufwand_pt = $row->aufwand_pt; + $obj->buchbar = $this->db_parse_bool($row->buchbar); $this->result[] = $obj; } @@ -183,6 +185,7 @@ class projekt extends basis_db $obj->farbe = $row->farbe; $obj->anzahl_ma = $row->anzahl_ma; $obj->aufwand_pt = $row->aufwand_pt; + $obj->buchbar = $this->db_parse_bool($row->buchbar); $this->result[] = $obj; } @@ -226,6 +229,7 @@ class projekt extends basis_db $obj->aufwandstyp_kurzbz = $row->aufwandstyp_kurzbz; $obj->anzahl_ma = $row->anzahl_ma; $obj->aufwand_pt = $row->aufwand_pt; + $obj->buchbar = $this->db_parse_bool($row->buchbar); $this->result[] = $obj; } @@ -293,7 +297,7 @@ class projekt extends basis_db { //Neuen Datensatz einfuegen - $qry = 'INSERT INTO fue.tbl_projekt (projekt_kurzbz, nummer, titel,beschreibung, beginn, ende, budget, farbe, oe_kurzbz, aufwand_pt, anzahl_ma, aufwandstyp_kurzbz) VALUES('. + $qry = 'INSERT INTO fue.tbl_projekt (projekt_kurzbz, nummer, titel,beschreibung, beginn, ende, budget, farbe, oe_kurzbz, aufwand_pt, anzahl_ma, aufwandstyp_kurzbz, buchbar) VALUES('. $this->db_add_param($this->projekt_kurzbz).', '. $this->db_add_param($this->nummer).', '. $this->db_add_param($this->titel).', '. @@ -305,7 +309,8 @@ class projekt extends basis_db $this->db_add_param($this->oe_kurzbz).','. $this->db_add_param($this->aufwand_pt).','. $this->db_add_param($this->anzahl_ma).','. - $this->db_add_param($this->aufwandstyp_kurzbz).');'; + $this->db_add_param($this->aufwandstyp_kurzbz).', '. + $this->db_add_param($this->buchbar,FHC_BOOLEAN).');'; } else { @@ -323,7 +328,8 @@ class projekt extends basis_db 'oe_kurzbz='.$this->db_add_param($this->oe_kurzbz).', '. 'anzahl_ma='.$this->db_add_param($this->anzahl_ma).', '. 'aufwand_pt='.$this->db_add_param($this->aufwand_pt).', '. - 'aufwandstyp_kurzbz='.$this->db_add_param($this->aufwandstyp_kurzbz).' '. + 'aufwandstyp_kurzbz='.$this->db_add_param($this->aufwandstyp_kurzbz).', '. + 'buchbar='.$this->db_add_param($this->buchbar,FHC_BOOLEAN).' '. 'WHERE projekt_kurzbz='.$this->db_add_param($this->projekt_kurzbz).';'; } @@ -333,7 +339,9 @@ class projekt extends basis_db } else { - $this->errormsg = 'Fehler beim Speichern der Daten'; + $this->getErrorMsg(); + var_dump($this->getErrorMsg()); + $this->errormsg = $this->getErrorMsg(); return false; } } @@ -416,6 +424,7 @@ class projekt extends basis_db $obj->beginn = $row->beginn; $obj->ende = $row->ende; $obj->oe_kurzbz = $row->oe_kurzbz; + $obj->buchbar = $this->db_parse_bool($row->buchbar); $this->result[] = $obj; } @@ -448,6 +457,7 @@ class projekt extends basis_db $this->farbe = $row->farbe; $this->anzahl_ma = $row->anzahl_ma; $this->aufwand_pt = $row->aufwand_pt; + $this->buchbar = $this->db_parse_bool($row->buchbar); return true; } diff --git a/include/projektphase.class.php b/include/projektphase.class.php index 81de4e095..3825ac123 100644 --- a/include/projektphase.class.php +++ b/include/projektphase.class.php @@ -48,6 +48,7 @@ class projektphase extends basis_db public $insertvon; // bigint public $updateamum; // timestamp public $updatevon; // bigint + public $buchbar; // bool /** @@ -100,6 +101,7 @@ class projektphase extends basis_db $this->insertvon = $row->insertvon; $this->updateamum = $row->updateamum; $this->updatevon = $row->updatevon; + $this->buchbar = $this->db_parse_bool($row->buchbar); return true; } else @@ -158,6 +160,7 @@ class projektphase extends basis_db $obj->insertvon = $row->insertvon; $obj->updateamum = $row->updateamum; $obj->updatevon = $row->updatevon; + $obj->buchbar = $this->db_parse_bool($row->buchbar); $this->result[] = $obj; } @@ -213,7 +216,7 @@ class projektphase extends basis_db $obj->insertvon = $row->insertvon; $obj->updateamum = $row->updateamum; $obj->updatevon = $row->updatevon; - + $obj->buchbar = $this->db_parse_bool($row->buchbar); $this->result[] = $obj; } //var_dump($this->result); @@ -260,6 +263,7 @@ class projektphase extends basis_db $obj->insertvon = $row->insertvon; $obj->updateamum = $row->updateamum; $obj->updatevon = $row->updatevon; + $obj->buchbar = $this->db_parse_bool($row->buchbar); $this->result[] = $obj; } @@ -321,7 +325,7 @@ class projektphase extends basis_db //Neuen Datensatz einfuegen $qry='BEGIN; INSERT INTO fue.tbl_projektphase (projekt_kurzbz, projektphase_fk, bezeichnung, typ, - beschreibung, start, ende, budget, ressource_id, insertvon, insertamum, updatevon, updateamum, farbe, personentage) VALUES ('. + beschreibung, start, ende, budget, ressource_id, insertvon, insertamum, updatevon, updateamum, farbe, personentage, buchbar) VALUES ('. $this->db_add_param($this->projekt_kurzbz).', '. $this->db_add_param($this->projektphase_fk).', '. $this->db_add_param($this->bezeichnung).', '. @@ -334,7 +338,8 @@ class projektphase extends basis_db $this->db_add_param($this->insertvon).', now(), '. $this->db_add_param($this->updatevon).', now(), '. $this->db_add_param($this->farbe).', '. - $this->db_add_param($this->personentage).' );'; + $this->db_add_param($this->personentage).', '. + $this->db_add_param($this->buchbar,FHC_BOOLEAN).');'; } else { @@ -354,6 +359,7 @@ class projektphase extends basis_db 'personentage='.$this->db_add_param($this->personentage).', '. 'updateamum= now(), '. 'updatevon='.$this->db_add_param($this->updatevon).' '. + 'buchbar='.$this->db_add_param($this->buchbar,FHC_BOOLEAN).' '. 'WHERE projektphase_id='.$this->db_add_param($this->projektphase_id, FHC_INTEGER).';'; } diff --git a/rdf/projekt.rdf.php b/rdf/projekt.rdf.php index 386b50fe5..68415dbf1 100644 --- a/rdf/projekt.rdf.php +++ b/rdf/projekt.rdf.php @@ -72,6 +72,7 @@ for ($i=0;$iresult);$i++) '.$projekt->anzahl_ma.' '.$projekt->aufwand_pt.' '.$projekt->aufwandstyp_kurzbz.' + '.$projekt->buchbar.' '."\n"; $sequenz.=''."\n"; diff --git a/rdf/projektphase.rdf.php b/rdf/projektphase.rdf.php index ddd88ef94..a65d41535 100644 --- a/rdf/projektphase.rdf.php +++ b/rdf/projektphase.rdf.php @@ -61,9 +61,10 @@ if($projektphase_id != '') $oRdf->obj[$i]->setAttribut('fortschritt',$ergebnis); $oRdf->obj[$i]->setAttribut('personentage',$phase->personentage); $oRdf->obj[$i]->setAttribut('farbe',$phase->farbe); - $oRdf->obj[$i]->setAttribut('typ',$phase->typ); + $oRdf->obj[$i]->setAttribut('typ',$phase->typ); $oRdf->obj[$i]->setAttribut('ressource_id',$phase->ressource_id); - + $oRdf->obj[$i]->setAttribut('buchbar',$phase->buchbar); + if($phase->projektphase_fk!='') $oRdf->addSequence($phase->projektphase_id, $phase->projektphase_fk); else @@ -94,7 +95,8 @@ if($projektphase_id != '') $oRdf->obj[$idx]->setAttribut('personentage', ''); $oRdf->obj[$idx]->setAttribut('farbe', ''); $oRdf->obj[$idx]->setAttribut('typ', ''); - + $oRdf->obj[$idx]->setAttribut('buchbar',''); + $oRdf->addSequence('opt'); } @@ -113,7 +115,8 @@ if($projektphase_id != '') $oRdf->obj[$idx]->setAttribut('personentage', $phase->personentage); $oRdf->obj[$idx]->setAttribut('farbe', $phase->farbe); $oRdf->obj[$idx]->setAttribut('typ', $phase->typ); - + $oRdf->obj[$idx]->setAttribut('buchbar',$phase->buchbar); + $oRdf->addSequence($phase->projektphase_id); } @@ -163,7 +166,8 @@ else $oRdf->obj[$idx]->setAttribut('beginn',''); $oRdf->obj[$idx]->setAttribut('ende',''); $oRdf->obj[$idx]->setAttribut('typ','organisationseinheit'); - + $oRdf->obj[$idx]->setAttribut('buchbar',''); + $oRdf->addSequence($projekt->oe_kurzbz); $lastOE=$currentOE; @@ -184,6 +188,8 @@ else $oRdf->obj[$idx]->setAttribut('beginn',$datum_obj->formatDatum($projekt->beginn,'d.m.Y')); $oRdf->obj[$idx]->setAttribut('ende',$datum_obj->formatDatum($projekt->ende,'d.m.Y')); $oRdf->obj[$idx]->setAttribut('typ','projekt'); + $oRdf->obj[$idx]->setAttribut('buchbar',$projekt->buchbar); + $oRdf->addSequence($projekt->oe_kurzbz.'/'.$projekt->projekt_kurzbz, $projekt->oe_kurzbz); @@ -223,6 +229,7 @@ else $oRdf->obj[$idx]->setAttribut('typ',strtolower($projektphase->typ)); $oRdf->obj[$idx]->setAttribut('ressource_bezeichnung',$projektphase->ressource_bezeichnung); $oRdf->obj[$idx]->setAttribut('ressource_id',$projektphase->ressource_id); + $oRdf->obj[$idx]->setAttribut('buchbar',$projektphase->buchbar); if (!is_null($projektphase->projektphase_fk)) $oRdf->addSequence($projekt->oe_kurzbz.'/'.$projekt->projekt_kurzbz.'/'.$projektphase->projektphase_id, $projekt->oe_kurzbz.'/'.$projekt->projekt_kurzbz.'/'.$projektphase->projektphase_fk); else diff --git a/soap/projekt.soap.php b/soap/projekt.soap.php index 6dcfce420..bc6f678b9 100644 --- a/soap/projekt.soap.php +++ b/soap/projekt.soap.php @@ -68,14 +68,27 @@ function saveProjekt($username, $passwort, $projekt) $projektNew->budget = $projekt->budget; $projektNew->farbe = $projekt->farbe; $projektNew->oe_kurzbz = $projekt->oe_kurzbz; - $projektNew->aufwandstyp_kurzbz = $projekt->aufwandstyp_kurzbz; + $projektNew->aufwandstyp_kurzbz = $projekt->aufwandstyp_kurzbz; $projektNew->anzahl_ma = $projekt->anzahl_ma; - $projektNew->aufwand_pt = $projekt->aufwand_pt; + $projektNew->aufwand_pt = $projekt->aufwand_pt; + + if($projekt->buchbar=='true') + { + $projektNew->buchbar = true; + } + else + { + $projektNew->buchbar = false; + } if($projekt->neu=='true') + { $projektNew->new = true; + } else + { $projektNew->new = false; + } if($projektNew->save()) return $projektNew->projekt_kurzbz; diff --git a/soap/projekt.wsdl.php b/soap/projekt.wsdl.php index c1f884672..832cfc875 100644 --- a/soap/projekt.wsdl.php +++ b/soap/projekt.wsdl.php @@ -30,6 +30,7 @@ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> + From c37fb8836d5dd90c701a0e504a0cb0fadb138517 Mon Sep 17 00:00:00 2001 From: OliiverHacker Date: Wed, 31 Mar 2021 19:14:01 +0200 Subject: [PATCH 003/105] implement functionallity for phase --- content/projekt/projekt.overlay.js.php | 2 +- content/projekt/projektphase.overlay.js.php | 21 +++++++++++++++++---- include/projektphase.class.php | 2 +- soap/projektphase.soap.php | 21 +++++++++++++++++---- soap/projektphase.wsdl.php | 5 +++-- 5 files changed, 39 insertions(+), 12 deletions(-) diff --git a/content/projekt/projekt.overlay.js.php b/content/projekt/projekt.overlay.js.php index b48681e94..fcacf5fac 100644 --- a/content/projekt/projekt.overlay.js.php +++ b/content/projekt/projekt.overlay.js.php @@ -236,7 +236,7 @@ function saveProjektDetail() projekt.appendChild(new SOAPObject("aufwandstyp_kurzbz")).val(aufwandstyp_kurzbz); projekt.appendChild(new SOAPObject("anzahl_ma")).val(anzahl_ma); projekt.appendChild(new SOAPObject("aufwand_pt")).val(aufwand_pt); - console.log(buchbar); + if(buchbar) { projekt.appendChild(new SOAPObject("buchbar")).val('true'); diff --git a/content/projekt/projektphase.overlay.js.php b/content/projekt/projektphase.overlay.js.php index aac989b18..a9b44fa75 100644 --- a/content/projekt/projektphase.overlay.js.php +++ b/content/projekt/projektphase.overlay.js.php @@ -190,9 +190,9 @@ function onselectTreeProjektphase() document.getElementById('textbox-projektphase-detail-farbe').value=farbe; document.getElementById('checkbox-projektphase-detail-neu').checked=false; if(buchbar=='Nein') - document.getElementById('checkbox-projekt-detail-buchbar').checked=false; + document.getElementById('checkbox-projektphase-detail-buchbar').checked=false; else - document.getElementById('checkbox-projekt-detail-buchbar').checked=true; + document.getElementById('checkbox-projektphase-detail-buchbar').checked=true; MenulistSelectItemOnValue('menulist-projektphase-detail-projektphase_fk', projektphase_fk); MenulistSelectItemOnValue('menulist-projektphase-detail-ressource', ressource_id); @@ -247,6 +247,7 @@ function saveProjektphaseDetail() var personentage = document.getElementById('textbox-projektphase-detail-personentage').value; var farbe = document.getElementById('textbox-projektphase-detail-farbe').value; var neu = document.getElementById('checkbox-projektphase-detail-neu').checked; + var buchbar = document.getElementById('checkbox-projektphase-detail-buchbar').checked; var soapBody = new SOAPObject("saveProjektphase"); //soapBody.appendChild(new SOAPObject("username")).val('joe'); @@ -265,10 +266,22 @@ function saveProjektphaseDetail() phase.appendChild(new SOAPObject("budget")).val(budget); phase.appendChild(new SOAPObject("personentage")).val(personentage); phase.appendChild(new SOAPObject("farbe")).val(farbe); - if(neu) - phase.appendChild(new SOAPObject("neu")).val('true'); + if(buchbar) + { + phase.appendChild(new SOAPObject("buchbar")).val('true'); + } else + { + phase.appendChild(new SOAPObject("buchbar")).val('false'); + } + if(neu) + { + phase.appendChild(new SOAPObject("neu")).val('true'); + } + else + { phase.appendChild(new SOAPObject("neu")).val('false'); + } phase.appendChild(new SOAPObject("user")).val(getUsername()); soapBody.appendChild(phase); diff --git a/include/projektphase.class.php b/include/projektphase.class.php index 3825ac123..3bb497bef 100644 --- a/include/projektphase.class.php +++ b/include/projektphase.class.php @@ -358,7 +358,7 @@ class projektphase extends basis_db 'farbe='.$this->db_add_param($this->farbe).', '. 'personentage='.$this->db_add_param($this->personentage).', '. 'updateamum= now(), '. - 'updatevon='.$this->db_add_param($this->updatevon).' '. + 'updatevon='.$this->db_add_param($this->updatevon).', '. 'buchbar='.$this->db_add_param($this->buchbar,FHC_BOOLEAN).' '. 'WHERE projektphase_id='.$this->db_add_param($this->projektphase_id, FHC_INTEGER).';'; } diff --git a/soap/projektphase.soap.php b/soap/projektphase.soap.php index 20fc0afe4..1d32863bf 100644 --- a/soap/projektphase.soap.php +++ b/soap/projektphase.soap.php @@ -70,8 +70,8 @@ function saveProjektphase($username, $passwort, $phase) $projektphase->projektphase_id=$phase->projektphase_id; $projektphase->projekt_kurzbz=$phase->projekt_kurzbz; $projektphase->projektphase_fk=$phase->projektphase_fk; - $projektphase->bezeichnung = $phase->bezeichnung; - $projektphase->typ = $phase->typ; + $projektphase->bezeichnung = $phase->bezeichnung; + $projektphase->typ = $phase->typ; $projektphase->ressource_id = $phase->ressource_id; $projektphase->beschreibung = $phase->beschreibung; $projektphase->start = $phase->start; @@ -82,10 +82,23 @@ function saveProjektphase($username, $passwort, $phase) $projektphase->updatevon = $user; $projektphase->updateamum = date('Y-m-d H:i:s'); - if($phase->neu=='true') - $projektphase->new = true; + if($phase->buchbar=='true') + { + $projektphase->buchbar = true; + } else + { + $projektphase->buchbar = false; + } + + if($phase->neu=='true') + { + $projektphase->new = true; + } + else + { $projektphase->new = false; + } if($projektphase->save()) return $projektphase->projektphase_id; diff --git a/soap/projektphase.wsdl.php b/soap/projektphase.wsdl.php index 6039e5184..817721ac3 100644 --- a/soap/projektphase.wsdl.php +++ b/soap/projektphase.wsdl.php @@ -24,8 +24,8 @@ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> - - + + @@ -35,6 +35,7 @@ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> + From 8a672780b254c0a50f37dda5dbbccc2297e6e2ef Mon Sep 17 00:00:00 2001 From: OliiverHacker Date: Thu, 1 Apr 2021 18:13:58 +0200 Subject: [PATCH 004/105] Fix Typo in Anzahl MA --- content/projekt/projektdetail.overlay.xul.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/projekt/projektdetail.overlay.xul.php b/content/projekt/projektdetail.overlay.xul.php index 86be93b60..3da872a07 100644 --- a/content/projekt/projektdetail.overlay.xul.php +++ b/content/projekt/projektdetail.overlay.xul.php @@ -125,7 +125,7 @@ echo ''; - - -