mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bc38f78e64 |
@@ -297,11 +297,47 @@ echo '
|
||||
}
|
||||
});
|
||||
|
||||
function updateArbeitsbeschreibung() {
|
||||
let selectedProjekt = $("#projekt").find("option:selected");
|
||||
let selectedPhase = $("#projektphase").find("option:selected");
|
||||
|
||||
let arbeitsbeschreibungProjekt = selectedProjekt.data("arbeitsbeschreibung");
|
||||
let arbeitsbeschreibungPhase = selectedPhase.data("arbeitsbeschreibung");
|
||||
|
||||
if (arbeitsbeschreibungPhase !== undefined && selectedPhase !== "")
|
||||
{
|
||||
if (arbeitsbeschreibungPhase)
|
||||
{
|
||||
$("#beschreibung-textarea").attr("required", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#beschreibung-textarea").removeAttr("required");
|
||||
}
|
||||
}
|
||||
else if (arbeitsbeschreibungProjekt)
|
||||
{
|
||||
$("#beschreibung-textarea").attr("required", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#beschreibung-textarea").removeAttr("required");
|
||||
}
|
||||
}
|
||||
|
||||
$("#projekt").change(
|
||||
function()
|
||||
{
|
||||
var uid = $("#uidpass").val();
|
||||
getProjektphasen($(this).val(),uid);
|
||||
updateArbeitsbeschreibung();
|
||||
}
|
||||
)
|
||||
|
||||
$("#projektphase").change(
|
||||
function()
|
||||
{
|
||||
updateArbeitsbeschreibung();
|
||||
}
|
||||
)
|
||||
|
||||
@@ -334,6 +370,7 @@ echo '
|
||||
$(this).trigger("isVisible");
|
||||
});
|
||||
|
||||
updateArbeitsbeschreibung();
|
||||
});
|
||||
|
||||
function setbisdatum()
|
||||
@@ -617,7 +654,7 @@ echo '
|
||||
var projphasenhtml = "";
|
||||
for (var i = 0; i < json.length; i++)
|
||||
{
|
||||
projphasenhtml += "<option value = \'" + json[i].projektphase_id + "\'>";
|
||||
projphasenhtml += "<option data-arbeitsbeschreibung=\'" + json[i].arbeitsbeschreibung + "\' value = \'" + json[i].projektphase_id + "\'>";
|
||||
projphasenhtml += json[i].bezeichnung;
|
||||
|
||||
if(json[i].start != \'\' && json[i].ende !=\'\')
|
||||
@@ -1233,7 +1270,7 @@ if ($projekt->getProjekteMitarbeiter($user, true))
|
||||
else
|
||||
$selected = '';
|
||||
|
||||
echo '<option value="'.$db->convert_html_chars($row_projekt->projekt_kurzbz).'" '.$selected.'>'.$db->convert_html_chars($row_projekt->titel).'</option>';
|
||||
echo '<option data-arbeitsbeschreibung="'. $db->db_parse_bool($row_projekt->arbeitsbeschreibung) .'" value="'.$db->convert_html_chars($row_projekt->projekt_kurzbz).'" '.$selected.'>'.$db->convert_html_chars($row_projekt->titel).'</option>';
|
||||
}
|
||||
echo '</SELECT><!--<input type="button" value="'.$p->t("zeitaufzeichnung/uebersicht").'" onclick="loaduebersicht();">-->';
|
||||
|
||||
@@ -1266,7 +1303,7 @@ if ($projekt->getProjekteMitarbeiter($user, true))
|
||||
else
|
||||
$selected = '';
|
||||
|
||||
echo '<option value="'.$db->convert_html_chars($projektphase->projektphase_id).'" '.$selected.'>'.$db->convert_html_chars($projektphase->bezeichnung).
|
||||
echo '<option data-arbeitsbeschreibung="'. $db->db_parse_bool($projektphase->arbeitsbeschreibung) .'" value="'.$db->convert_html_chars($projektphase->projektphase_id).'" '.$selected.'>'.$db->convert_html_chars($projektphase->bezeichnung).
|
||||
$phasentext. '</option>';
|
||||
}
|
||||
|
||||
@@ -1390,7 +1427,7 @@ if ($projekt->getProjekteMitarbeiter($user, true))
|
||||
if (!$adminView)
|
||||
{
|
||||
//Beschreibung
|
||||
echo '<tr><td>'.$p->t("global/beschreibung").'</td><td colspan="3"><textarea style="font-size: 13px" name="beschreibung" cols="60" maxlength="256">'.$db->convert_html_chars($beschreibung).'</textarea></td></tr>';
|
||||
echo '<tr><td>'.$p->t("global/beschreibung").'</td><td colspan="3"><textarea id="beschreibung-textarea" style="font-size: 13px" name="beschreibung" cols="60" maxlength="256">'.$db->convert_html_chars($beschreibung).'</textarea></td></tr>';
|
||||
echo '<tr><td></td><td></td><td></td><td align="right">';
|
||||
//SpeichernButton
|
||||
if($zeitaufzeichnung_id == '')
|
||||
|
||||
@@ -87,6 +87,7 @@ if (isset($_GET['projekt_kurzbz']))
|
||||
$item['start'] = $datum_obj->formatDatum($row->start, 'd.m.Y');
|
||||
$item['ende'] = $datum_obj->formatDatum($row->ende, 'd.m.Y');
|
||||
$item['zeitaufzeichnung_erlaubt'] = $row->zeitaufzeichnung;
|
||||
$item['arbeitsbeschreibung'] = $db->db_parse_bool($row->arbeitsbeschreibung);
|
||||
$result_obj[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,6 +154,7 @@ function onselectProjekt()
|
||||
var anzahl_ma=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#anzahl_ma" ));
|
||||
var aufwandstyp_kurzbz=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#aufwandstyp_kurzbz" ));
|
||||
var zeitaufzeichnung=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#zeitaufzeichnung" ));
|
||||
var arbeitsbeschreibung=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#arbeitsbeschreibung" ));
|
||||
|
||||
if (!zeitaufzeichnung)
|
||||
{
|
||||
@@ -164,6 +165,15 @@ function onselectProjekt()
|
||||
zeitaufzeichnung='Ja';
|
||||
}
|
||||
|
||||
if (!arbeitsbeschreibung)
|
||||
{
|
||||
arbeitsbeschreibung='Nein';
|
||||
}
|
||||
else
|
||||
{
|
||||
arbeitsbeschreibung='Ja';
|
||||
}
|
||||
|
||||
//Daten den Feldern zuweisen
|
||||
|
||||
document.getElementById('textbox-projekt-detail-projekt_kurzbz').value=projekt_kurzbz;
|
||||
@@ -184,6 +194,11 @@ function onselectProjekt()
|
||||
else
|
||||
document.getElementById('checkbox-projekt-detail-zeitaufzeichnung').checked=true;
|
||||
|
||||
if(arbeitsbeschreibung=='Nein')
|
||||
document.getElementById('checkbox-projekt-detail-arbeitsbeschreibung').checked=false;
|
||||
else
|
||||
document.getElementById('checkbox-projekt-detail-arbeitsbeschreibung').checked=true;
|
||||
|
||||
MenulistSelectItemOnValue('menulist-projekt-detail-aufwandstyp', aufwandstyp_kurzbz);
|
||||
|
||||
|
||||
@@ -218,11 +233,10 @@ function saveProjektDetail()
|
||||
anzahl_ma = document.getElementById('textbox-projekt-anzahl_ma').value;
|
||||
aufwand_pt = document.getElementById('textbox-projekt-aufwand_pt').value;
|
||||
zeitaufzeichnung = document.getElementById('checkbox-projekt-detail-zeitaufzeichnung').checked;
|
||||
arbeitsbeschreibung = document.getElementById('checkbox-projekt-detail-arbeitsbeschreibung').checked;
|
||||
|
||||
var soapBody = new SOAPObject("saveProjekt");
|
||||
//soapBody.appendChild(new SOAPObject("username")).val('joe');
|
||||
//soapBody.appendChild(new SOAPObject("passwort")).val('waschl');
|
||||
|
||||
|
||||
var projekt = new SOAPObject("projekt");
|
||||
projekt.appendChild(new SOAPObject("projekt_kurzbz")).val(projekt_kurzbz);
|
||||
projekt.appendChild(new SOAPObject("oe_kurzbz")).val(oe_kurzbz);
|
||||
@@ -246,6 +260,15 @@ function saveProjektDetail()
|
||||
projekt.appendChild(new SOAPObject("zeitaufzeichnung")).val('false');
|
||||
}
|
||||
|
||||
if(arbeitsbeschreibung)
|
||||
{
|
||||
projekt.appendChild(new SOAPObject("arbeitsbeschreibung")).val('true');
|
||||
}
|
||||
else
|
||||
{
|
||||
projekt.appendChild(new SOAPObject("arbeitsbeschreibung")).val('false');
|
||||
}
|
||||
|
||||
if(neu)
|
||||
{
|
||||
projekt.appendChild(new SOAPObject("neu")).val('true');
|
||||
|
||||
@@ -173,6 +173,15 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
</hbox>
|
||||
|
||||
</row>
|
||||
<row>
|
||||
|
||||
<label value="Arbeitsbeschreibung" control="checkbox-projekt-detail-arbeitsbeschreibung"/>
|
||||
<hbox>
|
||||
<checkbox id="checkbox-projekt-detail-arbeitsbeschreibung"/>
|
||||
<spacer />
|
||||
</hbox>
|
||||
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<hbox>
|
||||
|
||||
@@ -162,6 +162,7 @@ function onselectTreeProjektphase()
|
||||
var personentage=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#personentage" ));
|
||||
var farbe=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#farbe" ));
|
||||
var zeitaufzeichnung=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#zeitaufzeichnung" ));
|
||||
var arbeitsbeschreibung=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#arbeitsbeschreibung" ));
|
||||
|
||||
if (!zeitaufzeichnung)
|
||||
{
|
||||
@@ -171,6 +172,15 @@ function onselectTreeProjektphase()
|
||||
{
|
||||
zeitaufzeichnung='Ja';
|
||||
}
|
||||
|
||||
if (!arbeitsbeschreibung)
|
||||
{
|
||||
arbeitsbeschreibung='Nein';
|
||||
}
|
||||
else
|
||||
{
|
||||
arbeitsbeschreibung='Ja';
|
||||
}
|
||||
//alert(typ);
|
||||
|
||||
//Daten den Feldern zuweisen
|
||||
@@ -194,6 +204,11 @@ function onselectTreeProjektphase()
|
||||
else
|
||||
document.getElementById('checkbox-projektphase-detail-zeitaufzeichnung').checked=true;
|
||||
|
||||
if(arbeitsbeschreibung=='Nein')
|
||||
document.getElementById('checkbox-projektphase-detail-arbeitsbeschreibung').checked=false;
|
||||
else
|
||||
document.getElementById('checkbox-projektphase-detail-arbeitsbeschreibung').checked=true;
|
||||
|
||||
MenulistSelectItemOnValue('menulist-projektphase-detail-projektphase_fk', projektphase_fk);
|
||||
MenulistSelectItemOnValue('menulist-projektphase-detail-ressource', ressource_id);
|
||||
|
||||
@@ -248,6 +263,7 @@ function saveProjektphaseDetail()
|
||||
var farbe = document.getElementById('textbox-projektphase-detail-farbe').value;
|
||||
var neu = document.getElementById('checkbox-projektphase-detail-neu').checked;
|
||||
var zeitaufzeichnung = document.getElementById('checkbox-projektphase-detail-zeitaufzeichnung').checked;
|
||||
var arbeitsbeschreibung = document.getElementById('checkbox-projektphase-detail-arbeitsbeschreibung').checked;
|
||||
|
||||
var soapBody = new SOAPObject("saveProjektphase");
|
||||
//soapBody.appendChild(new SOAPObject("username")).val('joe');
|
||||
@@ -274,6 +290,15 @@ function saveProjektphaseDetail()
|
||||
{
|
||||
phase.appendChild(new SOAPObject("zeitaufzeichnung")).val('false');
|
||||
}
|
||||
|
||||
if(arbeitsbeschreibung)
|
||||
{
|
||||
phase.appendChild(new SOAPObject("arbeitsbeschreibung")).val('true');
|
||||
}
|
||||
else
|
||||
{
|
||||
phase.appendChild(new SOAPObject("arbeitsbeschreibung")).val('false');
|
||||
}
|
||||
if(neu)
|
||||
{
|
||||
phase.appendChild(new SOAPObject("neu")).val('true');
|
||||
|
||||
@@ -153,6 +153,15 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
</hbox>
|
||||
|
||||
</row>
|
||||
<row>
|
||||
|
||||
<label value="Arbeitsbeschreibung" control="checkbox-projektphase-detail-arbeitsbeschreibung"/>
|
||||
<hbox>
|
||||
<checkbox id="checkbox-projektphase-detail-arbeitsbeschreibung"/>
|
||||
<spacer />
|
||||
</hbox>
|
||||
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<hbox>
|
||||
|
||||
@@ -48,6 +48,7 @@ class projekt extends basis_db
|
||||
public $anzahl_ma; // integer
|
||||
public $aufwand_pt; // integer
|
||||
public $zeitaufzeichnung; //bool
|
||||
public $arbeitsbeschreibung; //bool
|
||||
public $sap_project_id;
|
||||
|
||||
|
||||
@@ -88,6 +89,7 @@ class projekt extends basis_db
|
||||
$this->anzahl_ma = $row->anzahl_ma;
|
||||
$this->aufwand_pt = $row->aufwand_pt;
|
||||
$this->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
|
||||
$this->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -143,6 +145,7 @@ class projekt extends basis_db
|
||||
$obj->anzahl_ma = $row->anzahl_ma;
|
||||
$obj->aufwand_pt = $row->aufwand_pt;
|
||||
$obj->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
|
||||
$obj->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -187,6 +190,7 @@ class projekt extends basis_db
|
||||
$obj->anzahl_ma = $row->anzahl_ma;
|
||||
$obj->aufwand_pt = $row->aufwand_pt;
|
||||
$obj->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
|
||||
$obj->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -230,6 +234,7 @@ class projekt extends basis_db
|
||||
$obj->anzahl_ma = $row->anzahl_ma;
|
||||
$obj->aufwand_pt = $row->aufwand_pt;
|
||||
$obj->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
|
||||
$obj->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -297,7 +302,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, zeitaufzeichnung) VALUES('.
|
||||
$qry = 'INSERT INTO fue.tbl_projekt (projekt_kurzbz, nummer, titel,beschreibung, beginn, ende, budget, farbe, oe_kurzbz, aufwand_pt, anzahl_ma, aufwandstyp_kurzbz, zeitaufzeichnung, arbeitsbeschreibung) VALUES('.
|
||||
$this->db_add_param($this->projekt_kurzbz).', '.
|
||||
$this->db_add_param($this->nummer).', '.
|
||||
$this->db_add_param($this->titel).', '.
|
||||
@@ -310,7 +315,8 @@ class projekt extends basis_db
|
||||
$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->zeitaufzeichnung,FHC_BOOLEAN).');';
|
||||
$this->db_add_param($this->zeitaufzeichnung, FHC_BOOLEAN).', '.
|
||||
$this->db_add_param($this->arbeitsbeschreibung, FHC_BOOLEAN).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -329,7 +335,8 @@ class projekt extends basis_db
|
||||
'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).', '.
|
||||
'zeitaufzeichnung='.$this->db_add_param($this->zeitaufzeichnung,FHC_BOOLEAN).' '.
|
||||
'zeitaufzeichnung='.$this->db_add_param($this->zeitaufzeichnung, FHC_BOOLEAN).', '.
|
||||
'arbeitsbeschreibung='.$this->db_add_param($this->arbeitsbeschreibung, FHC_BOOLEAN).' '.
|
||||
'WHERE projekt_kurzbz='.$this->db_add_param($this->projekt_kurzbz).';';
|
||||
}
|
||||
|
||||
@@ -429,6 +436,7 @@ class projekt extends basis_db
|
||||
$obj->ende = $row->ende;
|
||||
$obj->oe_kurzbz = $row->oe_kurzbz;
|
||||
$obj->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
|
||||
$obj->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -583,6 +591,7 @@ class projekt extends basis_db
|
||||
$this->anzahl_ma = $row->anzahl_ma;
|
||||
$this->aufwand_pt = $row->aufwand_pt;
|
||||
$this->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
|
||||
$this->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ class projektphase extends basis_db
|
||||
public $updateamum; // timestamp
|
||||
public $updatevon; // bigint
|
||||
public $zeitaufzeichnung; // bool
|
||||
public $arbeitsbeschreibung; // bool
|
||||
public $project_task_id;
|
||||
|
||||
|
||||
@@ -103,6 +104,7 @@ class projektphase extends basis_db
|
||||
$this->updateamum = $row->updateamum;
|
||||
$this->updatevon = $row->updatevon;
|
||||
$this->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
|
||||
$this->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -161,6 +163,7 @@ class projektphase extends basis_db
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
|
||||
$obj->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -216,6 +219,7 @@ class projektphase extends basis_db
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
|
||||
$obj->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -263,6 +267,7 @@ class projektphase extends basis_db
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
|
||||
$obj->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -323,7 +328,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, zeitaufzeichnung) VALUES ('.
|
||||
beschreibung, start, ende, budget, ressource_id, insertvon, insertamum, updatevon, updateamum, farbe, personentage, zeitaufzeichnung, arbeitsbeschreibung) VALUES ('.
|
||||
$this->db_add_param($this->projekt_kurzbz).', '.
|
||||
$this->db_add_param($this->projektphase_fk).', '.
|
||||
$this->db_add_param($this->bezeichnung).', '.
|
||||
@@ -337,7 +342,8 @@ class projektphase extends basis_db
|
||||
$this->db_add_param($this->updatevon).', now(), '.
|
||||
$this->db_add_param($this->farbe).', '.
|
||||
$this->db_add_param($this->personentage).', '.
|
||||
$this->db_add_param($this->zeitaufzeichnung,FHC_BOOLEAN).');';
|
||||
$this->db_add_param($this->zeitaufzeichnung, FHC_BOOLEAN).', '.
|
||||
$this->db_add_param($this->arbeitsbeschreibung, FHC_BOOLEAN).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -357,7 +363,8 @@ class projektphase extends basis_db
|
||||
'personentage='.$this->db_add_param($this->personentage).', '.
|
||||
'updateamum= now(), '.
|
||||
'updatevon='.$this->db_add_param($this->updatevon).', '.
|
||||
'zeitaufzeichnung='.$this->db_add_param($this->zeitaufzeichnung,FHC_BOOLEAN).' '.
|
||||
'zeitaufzeichnung='.$this->db_add_param($this->zeitaufzeichnung, FHC_BOOLEAN).', '.
|
||||
'arbeitsbeschreibung='.$this->db_add_param($this->arbeitsbeschreibung,FHC_BOOLEAN).' '.
|
||||
'WHERE projektphase_id='.$this->db_add_param($this->projektphase_id, FHC_INTEGER).';';
|
||||
}
|
||||
|
||||
@@ -819,6 +826,7 @@ class projektphase extends basis_db
|
||||
$obj->insertvon = $row->insertvon;
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->arbeitsbeschreibung = $row->arbeitsbeschreibung;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
|
||||
@@ -222,36 +222,63 @@ class zeitaufzeichnung_import {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $phase The Projektphase ID
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkPhaseBebuchbar($phase)
|
||||
{
|
||||
if ($this->phase->getPhasenZA($phase) == 'f')
|
||||
/**
|
||||
* @param string $phase The Projektphase ID
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkPhaseBebuchbar($phase)
|
||||
{
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Dieses Arbeitspaket darf nicht bebucht werden!');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $phase The Projektphase ID
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkIfArbeitspaketZuWaehlen($projekt_kurzbz, $phase)
|
||||
{
|
||||
if ($projekt_kurzbz != '')
|
||||
{
|
||||
$this->project->load($projekt_kurzbz);
|
||||
if (!$this->project->zeitaufzeichnung && !$phase)
|
||||
if ($this->phase->getPhasenZA($phase) == 'f')
|
||||
{
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Bitte ein Arbeitspaket wählen!');
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Dieses Arbeitspaket darf nicht bebucht werden!');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $phase The Projektphase ID
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkIfArbeitspaketZuWaehlen($projekt_kurzbz, $phase)
|
||||
{
|
||||
if ($projekt_kurzbz != '')
|
||||
{
|
||||
$this->project->load($projekt_kurzbz);
|
||||
|
||||
if (!$this->project->zeitaufzeichnung && !$phase)
|
||||
{
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Bitte ein Arbeitspaket wählen!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function checkIfArbeitsbeschreibungRequired($projekt_kurzbz, $beschreibung)
|
||||
{
|
||||
if ($projekt_kurzbz != '')
|
||||
{
|
||||
$this->project->load($projekt_kurzbz);
|
||||
|
||||
if ($this->project->arbeitsbeschreibung && empty(trim($beschreibung)))
|
||||
{
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Bitte eine Beschreibung angeben!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function checkIfArbeitsbeschreibungRequiredPhase($phase, $beschreibung)
|
||||
{
|
||||
if ($phase != '')
|
||||
{
|
||||
$this->phase->load($phase);
|
||||
|
||||
if ($this->phase->arbeitsbeschreibung && empty(trim($beschreibung)))
|
||||
{
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Bitte eine Beschreibung angeben!');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -174,6 +174,10 @@ class zeitaufzeichnung_import_csv extends zeitaufzeichnung_import {
|
||||
if(empty($data[self::PHASE]))
|
||||
$this->checkProjectInterval($data[self::PROJEKT], $data[self::STARTDT], $data[self::ENDEDT]);
|
||||
$this->checkPhaseInterval($data[self::PHASE], $data[self::STARTDT], $data[self::ENDEDT]);
|
||||
if ($data[self::PHASE] !== "")
|
||||
$this->checkIfArbeitsbeschreibungRequiredPhase($data[self::PHASE], $data[self::BESCHREIBUNG]);
|
||||
else
|
||||
$this->checkIfArbeitsbeschreibungRequired($data[self::PROJEKT], $data[self::BESCHREIBUNG]);
|
||||
$this->checkVals($data[self::OE],$data[self::PROJEKT],$data[self::PHASE],$data[self::SERVICE]);
|
||||
$this->mapLehreIntern($data);
|
||||
$this->prepareZeitaufzeichnung($data);
|
||||
|
||||
@@ -74,6 +74,10 @@ class zeitaufzeichnung_import_post extends zeitaufzeichnung_import {
|
||||
$this->processPause($this->data['von_pause'], $this->data['bis_pause']);
|
||||
$this->checkPhaseBebuchbar($this->data['projektphase_id']);
|
||||
$this->checkIfArbeitspaketZuWaehlen($this->data['projekt_kurzbz'], $this->data['projektphase_id']);
|
||||
if ($this->data['projektphase_id'] !== "")
|
||||
$this->checkIfArbeitsbeschreibungRequiredPhase($this->data['projektphase_id'], $this->data['beschreibung']);
|
||||
else
|
||||
$this->checkIfArbeitsbeschreibungRequired($this->data['projekt_kurzbz'], $this->data['beschreibung']);
|
||||
$this->saveZeit();
|
||||
} catch (Exception $ex) {
|
||||
$this->addError($ex->getMessage());
|
||||
|
||||
@@ -73,6 +73,7 @@ for ($i=0;$i<count($projekt_obj->result);$i++)
|
||||
<PROJEKT:aufwand_pt>'.$projekt->aufwand_pt.'</PROJEKT:aufwand_pt>
|
||||
<PROJEKT:aufwandstyp_kurzbz>'.$projekt->aufwandstyp_kurzbz.'</PROJEKT:aufwandstyp_kurzbz>
|
||||
<PROJEKT:zeitaufzeichnung>'.$projekt->zeitaufzeichnung.'</PROJEKT:zeitaufzeichnung>
|
||||
<PROJEKT:arbeitsbeschreibung>'.$projekt->arbeitsbeschreibung.'</PROJEKT:arbeitsbeschreibung>
|
||||
</RDF:Description>'."\n";
|
||||
|
||||
$sequenz.='<RDF:li RDF:resource="'.$rdf_url.$projekt->projekt_kurzbz.'" />'."\n";
|
||||
|
||||
@@ -64,6 +64,7 @@ if($projektphase_id != '')
|
||||
$oRdf->obj[$i]->setAttribut('typ',$phase->typ);
|
||||
$oRdf->obj[$i]->setAttribut('ressource_id',$phase->ressource_id);
|
||||
$oRdf->obj[$i]->setAttribut('zeitaufzeichnung',$phase->zeitaufzeichnung);
|
||||
$oRdf->obj[$i]->setAttribut('arbeitsbeschreibung',$phase->arbeitsbeschreibung);
|
||||
|
||||
if($phase->projektphase_fk!='')
|
||||
$oRdf->addSequence($phase->projektphase_id, $phase->projektphase_fk);
|
||||
@@ -97,6 +98,7 @@ else if($projekt_kurzbz != '')
|
||||
$oRdf->obj[$idx]->setAttribut('farbe', '');
|
||||
$oRdf->obj[$idx]->setAttribut('typ', '');
|
||||
$oRdf->obj[$idx]->setAttribut('zeitaufzeichnung','');
|
||||
$oRdf->obj[$idx]->setAttribut('arbeitsbeschreibung','');
|
||||
|
||||
$oRdf->addSequence('opt');
|
||||
}
|
||||
@@ -117,6 +119,7 @@ else if($projekt_kurzbz != '')
|
||||
$oRdf->obj[$idx]->setAttribut('farbe', $phase->farbe);
|
||||
$oRdf->obj[$idx]->setAttribut('typ', $phase->typ);
|
||||
$oRdf->obj[$idx]->setAttribut('zeitaufzeichnung',$phase->zeitaufzeichnung);
|
||||
$oRdf->obj[$idx]->setAttribut('arbeitsbeschreibung',$phase->arbeitsbeschreibung);
|
||||
|
||||
$oRdf->addSequence($phase->projektphase_id);
|
||||
}
|
||||
@@ -179,6 +182,7 @@ else
|
||||
$oRdf->obj[$idx]->setAttribut('ende','');
|
||||
$oRdf->obj[$idx]->setAttribut('typ','organisationseinheit');
|
||||
$oRdf->obj[$idx]->setAttribut('zeitaufzeichnung','');
|
||||
$oRdf->obj[$idx]->setAttribut('arbeitsbeschreibung','');
|
||||
|
||||
$oRdf->addSequence($projekt->oe_kurzbz);
|
||||
|
||||
@@ -201,6 +205,7 @@ else
|
||||
$oRdf->obj[$idx]->setAttribut('ende',$datum_obj->formatDatum($projekt->ende,'d.m.Y'));
|
||||
$oRdf->obj[$idx]->setAttribut('typ','projekt');
|
||||
$oRdf->obj[$idx]->setAttribut('zeitaufzeichnung',$projekt->zeitaufzeichnung);
|
||||
$oRdf->obj[$idx]->setAttribut('arbeitsbeschreibung',$projekt->arbeitsbeschreibung);
|
||||
|
||||
|
||||
$oRdf->addSequence($projekt->oe_kurzbz.'/'.$projekt->projekt_kurzbz, $projekt->oe_kurzbz);
|
||||
@@ -242,6 +247,7 @@ else
|
||||
$oRdf->obj[$idx]->setAttribut('ressource_bezeichnung',$projektphase->ressource_bezeichnung);
|
||||
$oRdf->obj[$idx]->setAttribut('ressource_id',$projektphase->ressource_id);
|
||||
$oRdf->obj[$idx]->setAttribut('zeitaufzeichnung',$projektphase->zeitaufzeichnung);
|
||||
$oRdf->obj[$idx]->setAttribut('arbeitsbeschreibung',$projektphase->arbeitsbeschreibung);
|
||||
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
|
||||
|
||||
@@ -81,6 +81,15 @@ function saveProjekt($username, $passwort, $projekt)
|
||||
$projektNew->zeitaufzeichnung = false;
|
||||
}
|
||||
|
||||
if($projekt->arbeitsbeschreibung=='true')
|
||||
{
|
||||
$projektNew->arbeitsbeschreibung = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$projektNew->arbeitsbeschreibung = false;
|
||||
}
|
||||
|
||||
if($projekt->neu=='true')
|
||||
{
|
||||
$projektNew->new = true;
|
||||
|
||||
@@ -91,6 +91,15 @@ function saveProjektphase($username, $passwort, $phase)
|
||||
$projektphase->zeitaufzeichnung = false;
|
||||
}
|
||||
|
||||
if($phase->arbeitsbeschreibung=='true')
|
||||
{
|
||||
$projektphase->arbeitsbeschreibung = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$projektphase->arbeitsbeschreibung = false;
|
||||
}
|
||||
|
||||
if($phase->neu=='true')
|
||||
{
|
||||
$projektphase->new = true;
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
if (!$result = @$db->db_query("SELECT arbeitsbeschreibung FROM fue.tbl_projekt LIMIT 1"))
|
||||
{
|
||||
$qry = "ALTER TABLE fue.tbl_projekt ADD COLUMN arbeitsbeschreibung BOOLEAN NOT NULL DEFAULT false;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>fue.tbl_projekt '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Spalte arbeitsbeschreibung zu fue.tbl_projekt hinzugefügt';
|
||||
}
|
||||
|
||||
if (!$result = @$db->db_query("SELECT arbeitsbeschreibung FROM fue.tbl_projektphase LIMIT 1"))
|
||||
{
|
||||
$qry = "ALTER TABLE fue.tbl_projektphase ADD COLUMN arbeitsbeschreibung BOOLEAN NOT NULL DEFAULT false;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>fue.tbl_projektphase '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Spalte arbeitsbeschreibung zu fue.tbl_projektphase hinzugefügt';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user