mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
Merge branch 'feature-14199/HomeofficeProMitarbeiter'
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
* Manfred Kindl <kindlm@technikum.wien.at>
|
||||
* Gerald Raab <raab@technikum-wien.at>
|
||||
* Alexei Karpenko <karpenko@technikum-wien.at>
|
||||
* Manuela Thamer <manuela.thamer@technikum-wien.at>
|
||||
*/
|
||||
require_once('../../../config/cis.config.inc.php');
|
||||
require_once('../../../include/functions.inc.php');
|
||||
@@ -44,6 +45,7 @@ require_once('../../../include/bisverwendung.class.php');
|
||||
require_once('../../../include/studiensemester.class.php');
|
||||
require_once('../../../include/benutzerberechtigung.class.php');
|
||||
|
||||
|
||||
$sprache = getSprache();
|
||||
$p=new phrasen($sprache);
|
||||
$sprache_obj = new sprache();
|
||||
@@ -88,7 +90,7 @@ $fieldheadings = array(
|
||||
'oe1' => $p->t("zeitaufzeichnung/oe"), 'oe2' => $p->t("zeitaufzeichnung/oe").'2', 'aktivitaet' => $p->t("zeitaufzeichnung/aktivitaet"),
|
||||
'service' => $p->t("zeitaufzeichnung/service"), 'start' => $p->t("zeitaufzeichnung/start"), 'ende' => $p->t("zeitaufzeichnung/ende"),
|
||||
'dauer' => $p->t("zeitaufzeichnung/dauer"), 'kunde' => $p->t("zeitaufzeichnung/kunde"), 'beschreibung' => $p->t("global/beschreibung"), 'aktion' => $p->t("global/aktion"),
|
||||
'datum' => $p->t("global/datum")
|
||||
'datum' => $p->t("global/datum"),'homeoffice' => $p->t("zeitaufzeichnung/homeoffice")
|
||||
);
|
||||
|
||||
if ($rechte->isBerechtigt('basis/servicezeitaufzeichnung'))
|
||||
@@ -131,10 +133,13 @@ $bis_datum = (isset($_REQUEST['bis_datum'])?$_REQUEST['bis_datum']:date('d.m.Y')
|
||||
$bis_uhrzeit = (isset($_POST['bis_uhrzeit'])?$_POST['bis_uhrzeit']:date('H:i',mktime(date('H'), date('i')+10)));
|
||||
$bis = $bis_datum.' '.$bis_uhrzeit;
|
||||
|
||||
$homeoffice = (isset($_POST['homeoffice'])?true:false);
|
||||
$pause_von = (isset($_POST['pause_von'])?$_POST['pause_von']:date('H:i'));
|
||||
$pause_bis = (isset($_POST['pause_bis'])?$_POST['pause_bis']:date('H:i'));
|
||||
$von_pause = $von_datum.' '.$pause_von;
|
||||
$bis_pause = $bis_datum.' '.$pause_bis;
|
||||
$homeofficeChecked = '';
|
||||
//$reload = false;
|
||||
|
||||
$beschreibung = (isset($_POST['beschreibung'])?$_POST['beschreibung']:'');
|
||||
$service_id = (isset($_POST['service_id'])?$_POST['service_id']:'');
|
||||
@@ -221,7 +226,7 @@ echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
resetProjekt()
|
||||
//resetProjekt()
|
||||
$( ".datepicker_datum" ).datepicker({
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
@@ -274,10 +279,38 @@ echo '
|
||||
$("#projekt").change(
|
||||
function()
|
||||
{
|
||||
getProjektphasen($(this).val());
|
||||
var uid = $("#uidpass").val();
|
||||
getProjektphasen($(this).val(),uid);
|
||||
}
|
||||
)
|
||||
|
||||
useCheckedDate();
|
||||
|
||||
$("#von_datum").change(
|
||||
function()
|
||||
{
|
||||
var uid = $("#uidpass").val();
|
||||
var Datum = $(this).val();
|
||||
Tag=Datum.substring(0,2);
|
||||
Monat=Datum.substring(3,5);
|
||||
Jahr=Datum.substring(6,10);
|
||||
var day = Jahr + "-" + Monat + "-" + Tag;
|
||||
checkBisverwendung(day,uid);
|
||||
}
|
||||
)
|
||||
|
||||
function isVisible()
|
||||
{
|
||||
resetPhasen()
|
||||
}
|
||||
|
||||
$("#triggerPhasenReset").bind("isVisible", isVisible);
|
||||
|
||||
$("#triggerPhasenReset").show("slow", function()
|
||||
{
|
||||
$(this).trigger("isVisible");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function setbisdatum()
|
||||
@@ -516,14 +549,20 @@ echo '
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function resetProjekt()
|
||||
{
|
||||
$("#projekt").val("");
|
||||
$("#projektphaseformgroup").hide();
|
||||
}
|
||||
|
||||
function getProjektphasen(projekt_kurzbz)
|
||||
function resetPhasen()
|
||||
{
|
||||
var uid = $("#uidpass").val();
|
||||
getProjektphasen($("#projekt").val(),uid);
|
||||
}
|
||||
|
||||
function getProjektphasen(projekt_kurzbz, uid)
|
||||
{
|
||||
$.ajax
|
||||
(
|
||||
@@ -533,7 +572,9 @@ echo '
|
||||
dataType: "json",
|
||||
data:
|
||||
{
|
||||
"uid":uid,
|
||||
"projekt_kurzbz":projekt_kurzbz
|
||||
|
||||
},
|
||||
success: function(json)
|
||||
{
|
||||
@@ -572,6 +613,48 @@ echo '
|
||||
);
|
||||
}
|
||||
|
||||
function appendProjektphasenzeiten(projektphase_id)
|
||||
{
|
||||
$.ajax
|
||||
(
|
||||
{
|
||||
type: "GET",
|
||||
url: "zeitaufzeichnung_projektphasenzeiten.php",
|
||||
dataType: "json",
|
||||
data:
|
||||
{
|
||||
"projektphase_id":projektphase_id
|
||||
|
||||
},
|
||||
success: function(json)
|
||||
{
|
||||
//append Projektphasenzeiten if any
|
||||
if (json.length > 0)
|
||||
{
|
||||
var projphasenhtml = "";
|
||||
for (var i = 0; i < json.length; i++)
|
||||
{
|
||||
projphasenhtml += "<option value = \'" + json[i].projektphase_id + "\'>";
|
||||
projphasenhtml += json[i].bezeichnung;
|
||||
if(json[i].start != \'\' && json[i].ende !=\'\')
|
||||
{
|
||||
projphasenhtml += " ( "+json[i].start+" - "+json[i].ende+" )";
|
||||
}
|
||||
projphasenhtml += "<\/option>";
|
||||
}
|
||||
|
||||
$("#projektphase").append(projphasenhtml);
|
||||
$("#projektphaseformgroup").show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#projektphaseformgroup").hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// Pausenblock
|
||||
|
||||
function checkPausenblock()
|
||||
@@ -651,6 +734,40 @@ echo '
|
||||
$("#pause_von").val("");
|
||||
$("#pause_bis").val("");
|
||||
}
|
||||
|
||||
function useCheckedDate(){
|
||||
var uid = $("#uidpass").val();
|
||||
var Datum = $("#von_datum").val();
|
||||
Tag=Datum.substring(0,2);
|
||||
Monat=Datum.substring(3,5);
|
||||
Jahr=Datum.substring(6,10);
|
||||
var checkedDay = Jahr + "-" + Monat + "-" + Tag;
|
||||
checkBisverwendung(checkedDay, uid);
|
||||
}
|
||||
|
||||
function checkBisverwendung(day, uid)
|
||||
{
|
||||
$.ajax({
|
||||
url: "zeitaufzeichnung_bisverwendung.php",
|
||||
data: {
|
||||
day: day,
|
||||
uid: uid
|
||||
},
|
||||
success: function (result)
|
||||
{
|
||||
if (result==\'true\')
|
||||
{
|
||||
$("#homeofficeBlock").show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#homeofficeBlock").hide();
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -806,6 +923,39 @@ if(isset($_POST['save']) || isset($_POST['edit']) || isset($_POST['import']))
|
||||
$zeit->projektphase_id = $data[7];
|
||||
if (isset($data[8]))
|
||||
$zeit->service_id = $data[8];
|
||||
if (isset($data[9]))
|
||||
{
|
||||
if (strtolower($data[9] == 'true'))
|
||||
{
|
||||
// check, ob homeoffice gemäß Bisverwendung
|
||||
$verwendung = new bisverwendung();
|
||||
$verwendung->getVerwendungDatum($data[0],$vonCSV);
|
||||
|
||||
foreach ($verwendung->result as $v)
|
||||
// echo "homeoffice für Tag " . $vonCSV . " ". $v->homeoffice . " " . $v->bisverwendung_id . "<br>";
|
||||
|
||||
if ($v->homeoffice)
|
||||
{
|
||||
|
||||
// echo "homeoffice erlaubt <br>";
|
||||
$zeit->homeoffice = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<span style="color:orange"><b>'.$p->t("zeitaufzeichnung/homeofficeNichtErlaubt", ($vonCSV)) .'</b></span><br>';
|
||||
|
||||
$zeit->homeoffice = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$zeit->homeoffice = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$zeit->homeoffice = false;
|
||||
}
|
||||
$tag = $datum->formatDatum($data[2], $format='Y-m-d');
|
||||
|
||||
if(!in_array($tag, $importtage_array))
|
||||
@@ -829,6 +979,7 @@ if(isset($_POST['save']) || isset($_POST['edit']) || isset($_POST['import']))
|
||||
$pause->start = $ende_vorher;
|
||||
$pause->ende = $zeit->start;
|
||||
$pause->beschreibung = '';
|
||||
$pause->homeoffice = $homeoffice;
|
||||
if(!$pause->save())
|
||||
{
|
||||
echo '<span style="color:red"><b>'.$p->t("global/fehlerBeimSpeichernDerDaten").': '.$pause->errormsg.'</b></span><br>';
|
||||
@@ -908,6 +1059,7 @@ if(isset($_POST['save']) || isset($_POST['edit']) || isset($_POST['import']))
|
||||
$zeit->updatevon = $user;
|
||||
$zeit->projekt_kurzbz = $projekt_kurzbz;
|
||||
$zeit->projektphase_id = $projektphase_id;
|
||||
$zeit->homeoffice = $homeoffice;
|
||||
$zeit->service_id = $service_id;
|
||||
$zeit->kunde_uid = $kunde_uid;
|
||||
$saveerror = 0;
|
||||
@@ -924,8 +1076,10 @@ if(isset($_POST['save']) || isset($_POST['edit']) || isset($_POST['import']))
|
||||
}
|
||||
elseif (!$projectphase->checkProjectphaseInCorrectTime($projektphase_id, $datum->formatDatum($von, $format='Y-m-d'), $datum->formatDatum($bis, $format='Y-m-d')))
|
||||
{
|
||||
echo '<span style="color:red"><b>'.$p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich, da angegebenes Anfangs und Enddatum nicht in den Projektphasenzeitrahmen fällt.</b></span><br>';
|
||||
echo '<p id="triggerPhasenReset"><span style="color:red" ><b>'.$p->t("global/fehlerBeimSpeichernDerDaten").':
|
||||
Eingabe nicht möglich, da angegebenes Anfangs und Enddatum nicht in den Projektphasenzeitrahmen fällt.</b></span></p><br>';
|
||||
$saveerror = 1;
|
||||
|
||||
}
|
||||
elseif (abs($von-$bis)>0 && $aktivitaet_kurzbz!="DienstreiseMT")
|
||||
{
|
||||
@@ -968,6 +1122,7 @@ if(isset($_POST['save']) || isset($_POST['edit']) || isset($_POST['import']))
|
||||
$pause->insertvon = $user;
|
||||
$pause->uid = $user;
|
||||
$pause->aktivitaet_kurzbz = 'Pause';
|
||||
$pause->homeoffice = $homeoffice;
|
||||
$pause->start = $datum->formatDatum($von_pause, $format='Y-m-d H:i:s');
|
||||
$pause->ende = $datum->formatDatum($bis_pause, $format='Y-m-d H:i:s');
|
||||
$pause->beschreibung = '';
|
||||
@@ -1055,13 +1210,12 @@ else
|
||||
echo '<b> </b>';
|
||||
|
||||
//Laden der Daten zum aendern
|
||||
if(isset($_GET['type']) && $_GET['type']=='edit')
|
||||
if (isset($_GET['type']) && $_GET['type'] == 'edit')
|
||||
{
|
||||
$zeit = new zeitaufzeichnung();
|
||||
|
||||
if($zeit->load($zeitaufzeichnung_id))
|
||||
if ($zeit->load($zeitaufzeichnung_id))
|
||||
{
|
||||
if($zeit->uid==$user)
|
||||
if ($zeit->uid == $user)
|
||||
{
|
||||
$uid = $zeit->uid;
|
||||
$aktivitaet_kurzbz = $zeit->aktivitaet_kurzbz;
|
||||
@@ -1072,13 +1226,15 @@ if(isset($_GET['type']) && $_GET['type']=='edit')
|
||||
$oe_kurzbz_2 = $zeit->oe_kurzbz_2;
|
||||
$projekt_kurzbz = $zeit->projekt_kurzbz;
|
||||
$projektphase_id = $zeit->projektphase_id;
|
||||
$homeoffice = $zeit->homeoffice;
|
||||
$homeoffice[0] == 't' ? $homeofficeChecked = 'checked' : $homeofficeChecked = '';
|
||||
$service_id = $zeit->service_id;
|
||||
$kunde_uid = $zeit->kunde_uid;
|
||||
|
||||
$projektphase = new projektphase();
|
||||
|
||||
$projektphasen = array();
|
||||
if($projektphase->getProjektphasen($projekt_kurzbz))
|
||||
|
||||
if ($projektphase->getProjectphaseForMitarbeiterByKurzBz($uid, $projekt_kurzbz))
|
||||
{
|
||||
foreach ($projektphase->result as $row)
|
||||
{
|
||||
@@ -1089,15 +1245,16 @@ if(isset($_GET['type']) && $_GET['type']=='edit')
|
||||
else
|
||||
{
|
||||
echo "<b>".$p->t("global/keineBerechtigungZumAendernDesDatensatzes")."</b>";
|
||||
$zeitaufzeichnung_id='';
|
||||
$zeitaufzeichnung_id = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Projekte holen zu denen der Benutzer zugeteilt ist
|
||||
$projekt = new projekt();
|
||||
|
||||
if($projekt->getProjekteMitarbeiter($user, true))
|
||||
if ($projekt->getProjekteMitarbeiter($user, true))
|
||||
{
|
||||
//if(count($projekt->result)>0)
|
||||
//{
|
||||
@@ -1324,36 +1481,48 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
$selected = '';
|
||||
|
||||
echo '<option 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();">-->';
|
||||
|
||||
//Projektphase
|
||||
$showprojphases = isset($projektphasen) && is_array($projektphasen) && count($projektphasen) > 0 && $projektfound;
|
||||
$hiddentext = $showprojphases ? "" : " style='display:none'";
|
||||
|
||||
echo
|
||||
'<span id="projektphaseformgroup"'.$hiddentext.'> '.
|
||||
$p->t("zeitaufzeichnung/projektphase").'
|
||||
<SELECT name="projektphase" id="projektphase">
|
||||
<OPTION value="" id="projektphasekeineausw">-- '.$p->t('zeitaufzeichnung/keineAuswahl').' --</OPTION>';
|
||||
|
||||
if ($showprojphases)
|
||||
{
|
||||
foreach ($projektphasen as $projektphase)
|
||||
{
|
||||
if ($projektphase_id == $projektphase->projektphase_id/* || $filter == $row_projekt->projekt_kurzbz*/)
|
||||
$selected = 'selected';
|
||||
else
|
||||
$selected = '';
|
||||
|
||||
echo '<option value="'.$db->convert_html_chars($projektphase->projektphase_id).'" '.$selected.'>'.$db->convert_html_chars($projektphase->bezeichnung).'</option>';
|
||||
}
|
||||
echo '</SELECT></span>';
|
||||
}
|
||||
echo '</td></tr>';
|
||||
}
|
||||
echo '</SELECT><!--<input type="button" value="'.$p->t("zeitaufzeichnung/uebersicht").'" onclick="loaduebersicht();">-->';
|
||||
|
||||
if ($za_simple == 0)
|
||||
//Projektphase
|
||||
$showprojphases = isset($projektphasen) && is_array($projektphasen) && count($projektphasen) > 0 && $projektfound;
|
||||
$hiddentext = $showprojphases ? "" : " style='display:none'";
|
||||
|
||||
echo
|
||||
'<span id="projektphaseformgroup"'.$hiddentext.'> '.
|
||||
$p->t("zeitaufzeichnung/projektphase").'
|
||||
<SELECT name="projektphase" id="projektphase">
|
||||
<OPTION value="" id="projektphasekeineausw">-- '.$p->t('zeitaufzeichnung/keineAuswahl').' --</OPTION>';
|
||||
|
||||
if ($showprojphases)
|
||||
{
|
||||
foreach ($projektphasen as $projektphase)
|
||||
{
|
||||
if (($projektphase->start != "" ) && ($projektphase->ende != " "))
|
||||
{
|
||||
$phasentext = " (". $datum->formatDatum($projektphase->start, 'd.m.Y'). " - ".
|
||||
$datum->formatDatum($projektphase->ende, 'd.m.Y'). ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
$phasentext = '';
|
||||
}
|
||||
|
||||
if ($projektphase_id == $projektphase->projektphase_id/* || $filter == $row_projekt->projekt_kurzbz*/)
|
||||
$selected = 'selected';
|
||||
else
|
||||
$selected = '';
|
||||
|
||||
echo '<option value="'.$db->convert_html_chars($projektphase->projektphase_id).'" '.$selected.'>'.$db->convert_html_chars($projektphase->bezeichnung). $phasentext.'</option>';
|
||||
}
|
||||
echo '</SELECT></span>';
|
||||
}
|
||||
echo '</td></tr>';
|
||||
}
|
||||
|
||||
echo "<input type ='hidden' value='$user'id=uidpass>";
|
||||
|
||||
if ($za_simple == 0)
|
||||
{
|
||||
// Service
|
||||
echo '<tr>
|
||||
@@ -1402,6 +1571,7 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
$von_ts = $datum->mktime_fromtimestamp($datum->formatDatum($von, $format='Y-m-d H:i:s'));
|
||||
$bis_ts = $datum->mktime_fromtimestamp($datum->formatDatum($bis, $format='Y-m-d H:i:s'));
|
||||
$diff = $bis_ts - $von_ts;
|
||||
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$p->t("global/von").' - '.$p->t("global/bis").'</td>
|
||||
@@ -1444,6 +1614,20 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
</td>
|
||||
</tr>
|
||||
';
|
||||
|
||||
//Homeoffice Checkbox
|
||||
echo '
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td colspan="1">
|
||||
<span id="homeofficeBlock">
|
||||
<input type="checkbox" name="homeoffice" id="homeoffice" '. $homeofficeChecked . '>Homeoffice</input>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
';
|
||||
|
||||
//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></td><td></td><td></td><td align="right">';
|
||||
@@ -1505,7 +1689,7 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
echo '<a href="?normal" style="text-decoration:none"><input type="button" value="'.$p->t('zeitaufzeichnung/xTageAnsicht', array($angezeigte_tage)).'"></a>';
|
||||
else
|
||||
echo '<a href="?alle" style="text-decoration:none"><input type="button" value="'.$p->t('zeitaufzeichnung/alleAnzeigen').'"></a>';
|
||||
//echo '<input type="submit" value="'.($alle===true?$p->t('zeitaufzeichnung/xTageAnsicht', array($angezeigte_tage)):$p->t('zeitaufzeichnung/alleAnzeigen')).'" name="'.($alle===true?'normal':'alle').'">';
|
||||
//echo '<input type="submit" value="'.($alle===true?$p->t('zeitaufzeichnung/xTageAnsicht', array(fehlt!)):$p->t('zeitaufzeichnung/alleAnzeigen')).'" name="'.($alle===true?'normal':'alle').'">';
|
||||
|
||||
$za = new zeitaufzeichnung();
|
||||
if(isset($_GET['filter']))
|
||||
@@ -1621,6 +1805,7 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
elseif ($tagessaldo > 18000 && $tagessaldo < 19800 && $pausesumme < $tagessaldo - 18000)
|
||||
$pausefehlt_str = '<span style="color:red; font-weight:bold;">-- Pause fehlt oder zu kurz --</span>';
|
||||
|
||||
|
||||
$tagessaldo = date('H:i', ($tagessaldo));
|
||||
$colspan = ($za_simple)?6:8;
|
||||
echo '<tr id="tag_row_'.$datum->formatDatum($tag,'d_m_Y').'"><td '.$style.' colspan="'.$colspan.'")>';
|
||||
@@ -1770,6 +1955,11 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
$style = 'style="border-top: 3px solid #8DBDD8; border-bottom: 3px solid #8DBDD8"';
|
||||
if ($row->aktivitaet_kurzbz=='Pause' || $row->aktivitaet_kurzbz=='LehreExtern'|| $row->aktivitaet_kurzbz=='Ersatzruhe')
|
||||
$style .= ' style="color: grey;"';
|
||||
if($db->convert_html_chars($row->homeoffice)=='t')
|
||||
{
|
||||
$homeoffice = " - Homeoffice";
|
||||
}else
|
||||
$homeoffice="";
|
||||
$summe = $row->summe;
|
||||
$service = new service();
|
||||
$service->load($row->service_id);
|
||||
@@ -1785,7 +1975,7 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
{
|
||||
echo '<td '.$style.' > '.$db->convert_html_chars($row->oe_kurzbz_2).'</td>';
|
||||
}
|
||||
echo '<td '.$style.'>'.$db->convert_html_chars($row->aktivitaet_kurzbz).'</td>';
|
||||
echo '<td '.$style.'>'.$db->convert_html_chars($row->aktivitaet_kurzbz).($homeoffice).'</td>';
|
||||
if(!$za_simple)
|
||||
{
|
||||
echo '<td '.$style.' title = "'.$service->bezeichnung.'" > '.StringCut($db->convert_html_chars($service->bezeichnung),20,null,'...').' </td>';
|
||||
@@ -1919,8 +2109,8 @@ function getDataForCSV($rawdata, $fieldheadings, $za_simple = false)
|
||||
$datum = new datum();
|
||||
$csvData = array();
|
||||
//headers schreiben
|
||||
$csvData[] = ($za_simple) ? array($fieldheadings['user'], $fieldheadings['datum'], $fieldheadings['start'], $fieldheadings['ende'], $fieldheadings['projekt'], $fieldheadings['ap'], $fieldheadings['oe1'], $fieldheadings['aktivitaet'], $fieldheadings['beschreibung'])
|
||||
: array($fieldheadings['user'], $fieldheadings['datum'], $fieldheadings['start'], $fieldheadings['ende'], $fieldheadings['projekt'], $fieldheadings['ap'], $fieldheadings['oe1'], $fieldheadings['oe2'], $fieldheadings['aktivitaet'], $fieldheadings['service'], $fieldheadings['kunde'], $fieldheadings['beschreibung']);
|
||||
$csvData[] = ($za_simple) ? array($fieldheadings['user'], $fieldheadings['datum'], $fieldheadings['start'], $fieldheadings['ende'], $fieldheadings['projekt'], $fieldheadings['ap'], $fieldheadings['oe1'], $fieldheadings['aktivitaet'], $fieldheadings['beschreibung'], $fieldheadings['homeoffice'])
|
||||
: array($fieldheadings['user'], $fieldheadings['datum'], $fieldheadings['start'], $fieldheadings['ende'], $fieldheadings['projekt'], $fieldheadings['ap'], $fieldheadings['oe1'], $fieldheadings['oe2'], $fieldheadings['aktivitaet'], $fieldheadings['service'], $fieldheadings['kunde'], $fieldheadings['beschreibung'], $fieldheadings['homeoffice']);
|
||||
foreach ($rawdata as $zeitauf)
|
||||
{
|
||||
//Newline characters bei Beschreibung ersetzen
|
||||
@@ -1933,13 +2123,13 @@ function getDataForCSV($rawdata, $fieldheadings, $za_simple = false)
|
||||
if($za_simple)
|
||||
{
|
||||
$csvData[] = array($zeitauf->uid, $hauptdatum, $datum->formatDatum($zeitauf->start, 'H:i'),
|
||||
$bisdatum, $zeitauf->projekt_kurzbz, $zeitauf->projektphase_id, $zeitauf->oe_kurzbz_1, $zeitauf->aktivitaet_kurzbz, $beschreibung);
|
||||
$bisdatum, $zeitauf->projekt_kurzbz, $zeitauf->projektphase_id, $zeitauf->oe_kurzbz_1, $zeitauf->aktivitaet_kurzbz, $beschreibung, $zeitauf->homeoffice);
|
||||
}
|
||||
else
|
||||
{
|
||||
$servicebez = ($service->load($zeitauf->service_id))?$service->bezeichnung:"";
|
||||
$csvData[] = array($zeitauf->uid, $hauptdatum, $datum->formatDatum($zeitauf->start, 'H:i'), $bisdatum,
|
||||
$zeitauf->projekt_kurzbz, $zeitauf->projektphase_id, $zeitauf->oe_kurzbz_1, $zeitauf->oe_kurzbz_2, $zeitauf->aktivitaet_kurzbz, $servicebez, $zeitauf->kunde_uid, $beschreibung);
|
||||
$zeitauf->projekt_kurzbz, $zeitauf->projektphase_id, $zeitauf->oe_kurzbz_1, $zeitauf->oe_kurzbz_2, $zeitauf->aktivitaet_kurzbz, $servicebez, $zeitauf->kunde_uid, $beschreibung, $zeitauf->homeoffice);
|
||||
}
|
||||
}
|
||||
return $csvData;
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/* Copyright (C) 2021 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Author: Manuela Thamer <manuela.thamer@technikum-wien.at>
|
||||
*/
|
||||
/**
|
||||
* Checks, if there is the possibility for homeoffice for the given bisverwendung of
|
||||
* a certain date.
|
||||
*/
|
||||
require_once('../../../config/cis.config.inc.php');
|
||||
require_once('../../../include/globals.inc.php');
|
||||
require_once('../../../include/phrasen.class.php');
|
||||
require_once('../../../include/datum.class.php');
|
||||
require_once('../../../include/Excel/excel.php');
|
||||
require_once('../../../include/benutzer.class.php');
|
||||
require_once('../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../include/mitarbeiter.class.php');
|
||||
require_once('../../../include/zeitaufzeichnung.class.php');
|
||||
require_once('../../../include/projekt.class.php');
|
||||
require_once('../../../include/bisverwendung.class.php');
|
||||
|
||||
if ((isset($_GET['uid'])) && (isset($_GET['day'])))
|
||||
{
|
||||
$uid = get_uid();
|
||||
|
||||
//Wenn User Administrator ist und UID uebergeben wurde, dann die Zeitaufzeichnung
|
||||
//des uebergebenen Users anzeigen
|
||||
if (isset($_GET['uid']) && $_GET['uid'] != $uid)
|
||||
{
|
||||
$p = new phrasen();
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($uid);
|
||||
|
||||
if ($rechte->isBerechtigt('admin'))
|
||||
{
|
||||
$uid = $_GET['uid'];
|
||||
}
|
||||
else
|
||||
{
|
||||
die($p->t('global/FuerDieseAktionBenoetigenSieAdministrationsrechte'));
|
||||
}
|
||||
}
|
||||
|
||||
$day = $_GET['day'];
|
||||
|
||||
$verwendung = new bisverwendung();
|
||||
|
||||
$verwendung->getVerwendungDatum($uid, $day);
|
||||
$homeoffice = false;
|
||||
|
||||
foreach ($verwendung->result as $v)
|
||||
{
|
||||
if ($v->homeoffice)
|
||||
{
|
||||
$homeoffice = true;
|
||||
}
|
||||
}
|
||||
|
||||
echo json_encode($homeoffice);
|
||||
|
||||
}
|
||||
@@ -1,18 +1,59 @@
|
||||
<?php
|
||||
/* Copyright (C) 2021 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Oliver Hacker <hacker@technikum-wien.at>
|
||||
Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>
|
||||
Manuela Thamer <manuela.thamer@technikum-wien.at>
|
||||
*/
|
||||
|
||||
require_once('../../../config/cis.config.inc.php');
|
||||
require_once('../../../include/functions.inc.php');
|
||||
require_once('../../../include/basis_db.class.php');
|
||||
require_once('../../../include/projektphase.class.php');
|
||||
require_once('../../../include/datum.class.php');
|
||||
require_once('../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../include/phrasen.class.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
||||
|
||||
$user = get_uid();
|
||||
|
||||
//Wenn User Administrator ist und UID uebergeben wurde, dann die Phasen
|
||||
//des uebergebenen Users anzeigen
|
||||
if (isset($_GET['uid']) && $user != $_GET['uid'])
|
||||
{
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
|
||||
if ($rechte->isBerechtigt('admin'))
|
||||
{
|
||||
$user = $_GET['uid'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$p = new phrasen();
|
||||
die($p->t('global/FuerDieseAktionBenoetigenSieAdministrationsrechte'));
|
||||
}
|
||||
}
|
||||
|
||||
$datum_obj = new datum();
|
||||
|
||||
if(isset($_GET['projekt_kurzbz'])) // TODO maybe check that phasen only shown if projekt is projekt of logged in user
|
||||
if (isset($_GET['projekt_kurzbz']))
|
||||
{
|
||||
$projekt_kurzbz = $_GET['projekt_kurzbz'];
|
||||
$projektphase = new projektphase();
|
||||
@@ -28,12 +69,12 @@ if(isset($_GET['projekt_kurzbz'])) // TODO maybe check that phasen only shown if
|
||||
array_push($pp_user_ids, $pp_user->projektphase_id);
|
||||
}
|
||||
|
||||
if($projektphase->getProjektphasen($projekt_kurzbz))
|
||||
if ($projektphase->getProjektphasen($projekt_kurzbz))
|
||||
{
|
||||
$result_obj = array();
|
||||
foreach($projektphase->result as $row)
|
||||
foreach ($projektphase->result as $row)
|
||||
{
|
||||
if(in_array($row->projektphase_id, $pp_user_ids))
|
||||
if (in_array($row->projektphase_id, $pp_user_ids))
|
||||
{
|
||||
$item['projektphase_id'] = $row->projektphase_id;
|
||||
$item['bezeichnung'] = $row->bezeichnung;
|
||||
|
||||
@@ -181,6 +181,13 @@ if(!$error)
|
||||
$verwendung->azgrelevant = false;
|
||||
else
|
||||
$verwendung->azgrelevant = '';
|
||||
|
||||
if($_POST['homeoffice']=='true')
|
||||
$verwendung->homeoffice = true;
|
||||
elseif($_POST['homeoffice']=='false')
|
||||
$verwendung->homeoffice = false;
|
||||
else
|
||||
$verwendung->homeoffice = '';
|
||||
|
||||
if($verwendung->save())
|
||||
{
|
||||
|
||||
@@ -1234,6 +1234,7 @@ function MitarbeiterVerwendungSpeichern(dialog, bisverwendung_id, mitarbeiter_ui
|
||||
inkludierte_lehre = dialog.getElementById('mitarbeiter-verwendung-detail-textbox-inkludierte_lehre').value;
|
||||
zeitaufzeichnungspflichtig = dialog.getElementById('mitarbeiter-verwendung-detail-checkbox-zeitaufzeichnungspflichtig').checked;
|
||||
azgrelevant = dialog.getElementById('mitarbeiter-verwendung-detail-checkbox-azgrelevant').checked;
|
||||
homeoffice = dialog.getElementById('mitarbeiter-verwendung-detail-checkbox-homeoffice').checked;
|
||||
|
||||
if(verwendung_code=='1')
|
||||
{
|
||||
@@ -1293,6 +1294,7 @@ function MitarbeiterVerwendungSpeichern(dialog, bisverwendung_id, mitarbeiter_ui
|
||||
req.add('inkludierte_lehre', inkludierte_lehre);
|
||||
req.add('zeitaufzeichnungspflichtig', zeitaufzeichnungspflichtig);
|
||||
req.add('azgrelevant', azgrelevant);
|
||||
req.add('homeoffice', homeoffice);
|
||||
|
||||
var response = req.executePOST();
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ function MitarbeiterVerwendungInit(mitarbeiter_uid, bisverwendung_id)
|
||||
inkludierte_lehre = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#inkludierte_lehre" ));
|
||||
zeitaufzeichnungspflichtig = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#zeitaufzeichnungspflichtig" ));
|
||||
azgrelevant = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#azgrelevant" ));
|
||||
homeoffice = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#homeoffice" ));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -89,6 +90,7 @@ function MitarbeiterVerwendungInit(mitarbeiter_uid, bisverwendung_id)
|
||||
|
||||
fixangestellt = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#fixangestellt" ));
|
||||
azgrelevant = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#azgrelevant" ));
|
||||
homeoffice = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#homeoffice" ));
|
||||
//neuer Datensatz wird angelegt
|
||||
MitarbeiterVerwendungDetailNeu='true';
|
||||
|
||||
@@ -121,6 +123,15 @@ function MitarbeiterVerwendungInit(mitarbeiter_uid, bisverwendung_id)
|
||||
{
|
||||
azgrelevant='Ja';
|
||||
}
|
||||
|
||||
if (!homeoffice)
|
||||
{
|
||||
homeoffice='Nein';
|
||||
}
|
||||
else
|
||||
{
|
||||
homeoffice='Ja';
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('mitarbeiter-verwendung-detail-menulist-beschart1').value=ba1code;
|
||||
@@ -151,6 +162,11 @@ function MitarbeiterVerwendungInit(mitarbeiter_uid, bisverwendung_id)
|
||||
document.getElementById('mitarbeiter-verwendung-detail-checkbox-azgrelevant').checked=false;
|
||||
else
|
||||
document.getElementById('mitarbeiter-verwendung-detail-checkbox-azgrelevant').checked=true;
|
||||
|
||||
if(homeoffice=='Nein')
|
||||
document.getElementById('mitarbeiter-verwendung-detail-checkbox-homeoffice').checked=false;
|
||||
else
|
||||
document.getElementById('mitarbeiter-verwendung-detail-checkbox-homeoffice').checked=true;
|
||||
MitarbeiterVerwendungDetailToggleHauptberuf();
|
||||
MitarbeiterVerwendungVerwendungChange();
|
||||
}
|
||||
|
||||
@@ -170,6 +170,10 @@ echo '<?xml-stylesheet href="'.APP_ROOT.'content/datepicker/datepicker.css" type
|
||||
<row>
|
||||
<label value="AZG-relevant" control="mitarbeiter-verwendung-detail-checkbox-azgrelevant"/>
|
||||
<checkbox id="mitarbeiter-verwendung-detail-checkbox-azgrelevant"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Homeoffice" control="mitarbeiter-verwendung-detail-checkbox-homeoffice"/>
|
||||
<checkbox id="mitarbeiter-verwendung-detail-checkbox-homeoffice"/>
|
||||
</row>
|
||||
<row>
|
||||
<spacer />
|
||||
|
||||
@@ -48,6 +48,7 @@ class bisverwendung extends basis_db
|
||||
public $inkludierte_lehre;
|
||||
public $zeitaufzeichnungspflichtig;
|
||||
public $azgrelevant;
|
||||
public $homeoffice;
|
||||
|
||||
public $ba1bez;
|
||||
public $ba2bez;
|
||||
@@ -124,6 +125,7 @@ class bisverwendung extends basis_db
|
||||
$this->inkludierte_lehre = $row->inkludierte_lehre;
|
||||
$this->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig);
|
||||
$this->azgrelevant = $this->db_parse_bool($row->azgrelevant);
|
||||
$this->homeoffice = $this->db_parse_bool($row->homeoffice);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -257,13 +259,22 @@ class bisverwendung extends basis_db
|
||||
{
|
||||
$azgrelevant = 'null';
|
||||
}
|
||||
if(is_bool($this->homeoffice))
|
||||
{
|
||||
$homeoffice = $this->db_add_param($this->homeoffice, FHC_BOOLEAN);
|
||||
}
|
||||
else
|
||||
{
|
||||
$homeoffice = 'null';
|
||||
}
|
||||
|
||||
if($new)
|
||||
{
|
||||
//Neuen Datensatz anlegen
|
||||
$qry = "BEGIN;INSERT INTO bis.tbl_bisverwendung (ba1code, ba2code, beschausmasscode,
|
||||
verwendung_code, mitarbeiter_uid, hauptberufcode, hauptberuflich, habilitation, beginn, ende, vertragsstunden,
|
||||
updateamum, updatevon, insertamum, insertvon, dv_art, inkludierte_lehre, zeitaufzeichnungspflichtig, azgrelevant) VALUES (".
|
||||
updateamum, updatevon, insertamum, insertvon, dv_art, inkludierte_lehre, zeitaufzeichnungspflichtig,
|
||||
azgrelevant, homeoffice) VALUES (".
|
||||
$this->db_add_param($this->ba1code, FHC_INTEGER).', '.
|
||||
$this->db_add_param($this->ba2code, FHC_INTEGER).', '.
|
||||
$this->db_add_param($this->beschausmasscode, FHC_INTEGER).', '.
|
||||
@@ -282,7 +293,8 @@ class bisverwendung extends basis_db
|
||||
$this->db_add_param($this->dv_art).','.
|
||||
$this->db_add_param($this->inkludierte_lehre).','.
|
||||
$zeitaufzeichnungspflichtig.','.
|
||||
$azgrelevant. ');';
|
||||
$azgrelevant.','.
|
||||
$homeoffice. ');';
|
||||
|
||||
}
|
||||
else
|
||||
@@ -307,7 +319,8 @@ class bisverwendung extends basis_db
|
||||
" dv_art=".$this->db_add_param($this->dv_art).",".
|
||||
" inkludierte_lehre=".$this->db_add_param($this->inkludierte_lehre).",".
|
||||
" zeitaufzeichnungspflichtig=". $zeitaufzeichnungspflichtig.",".
|
||||
" azgrelevant =". $azgrelevant.
|
||||
" azgrelevant =". $azgrelevant.",".
|
||||
" homeoffice =". $homeoffice.
|
||||
" WHERE bisverwendung_id=".$this->db_add_param($this->bisverwendung_id, FHC_INTEGER);
|
||||
}
|
||||
|
||||
@@ -401,6 +414,7 @@ class bisverwendung extends basis_db
|
||||
$obj->inkludierte_lehre = $row->inkludierte_lehre;
|
||||
$obj->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig);
|
||||
$obj->azgrelevant = $this->db_parse_bool($row->azgrelevant);
|
||||
$obj->homeoffice = $this->db_parse_bool($row->homeoffice);
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
@@ -458,6 +472,7 @@ class bisverwendung extends basis_db
|
||||
$obj->inkludierte_lehre = $row->inkludierte_lehre;
|
||||
$obj->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig);
|
||||
$obj->azgrelevant = $this->db_parse_bool($row->azgrelevant);
|
||||
$obj->homeoffice = $this->db_parse_bool($row->homeoffice);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -517,6 +532,7 @@ class bisverwendung extends basis_db
|
||||
$obj->inkludierte_lehre = $row->inkludierte_lehre;
|
||||
$obj->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig);
|
||||
$obj->azgrelevant = $this->db_parse_bool($row->azgrelevant);
|
||||
$obj->homeoffice = $this->db_parse_bool($row->homeoffice);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -571,6 +587,7 @@ class bisverwendung extends basis_db
|
||||
$this->inkludierte_lehre = $row->inkludierte_lehre;
|
||||
$this->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig);
|
||||
$this->azgrelevant = $this->db_parse_bool($row->azgrelevant);
|
||||
$this->homeoffice = $this->db_parse_bool($row->homeoffice);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -625,6 +642,7 @@ class bisverwendung extends basis_db
|
||||
$this->inkludierte_lehre = $row->inkludierte_lehre;
|
||||
$this->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig);
|
||||
$this->azgrelevant = $this->db_parse_bool($row->azgrelevant);
|
||||
$this->homeoffice = $this->db_parse_bool($row->homeoffice);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -688,6 +706,7 @@ class bisverwendung extends basis_db
|
||||
$obj->inkludierte_lehre = $row->inkludierte_lehre;
|
||||
$obj->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig);
|
||||
$obj->azgrelevant = $this->db_parse_bool($row->azgrelevant);
|
||||
$obj->homeoffice = $this->db_parse_bool($row->homeoffice);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ class zeitaufzeichnung extends basis_db
|
||||
public $ext_id; // bigint
|
||||
public $service_id; // integer
|
||||
public $kunde_uid; // varchar(32)
|
||||
public $homeoffice; // bool
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
@@ -104,6 +105,7 @@ class zeitaufzeichnung extends basis_db
|
||||
$this->ext_id = $row->ext_id;
|
||||
$this->service_id = $row->service_id;
|
||||
$this->kunde_uid = $row->kunde_uid;
|
||||
$this->homeoffice = $row->homeoffice;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -203,7 +205,7 @@ class zeitaufzeichnung extends basis_db
|
||||
{
|
||||
//Neuen Datensatz einfuegen
|
||||
$qry='BEGIN;INSERT INTO campus.tbl_zeitaufzeichnung (uid, aktivitaet_kurzbz, start, ende, beschreibung,
|
||||
oe_kurzbz_1, oe_kurzbz_2, insertamum, insertvon, updateamum, updatevon, projekt_kurzbz, projektphase_id, service_id, kunde_uid) VALUES('.
|
||||
oe_kurzbz_1, oe_kurzbz_2, insertamum, insertvon, updateamum, updatevon, projekt_kurzbz, projektphase_id, service_id, homeoffice, kunde_uid) VALUES('.
|
||||
$this->db_add_param($this->uid).', '.
|
||||
$this->db_add_param($this->aktivitaet_kurzbz).', '.
|
||||
$this->db_add_param($this->start).', '.
|
||||
@@ -218,6 +220,7 @@ class zeitaufzeichnung extends basis_db
|
||||
$this->db_add_param($this->projekt_kurzbz).', '.
|
||||
$this->db_add_param($this->projektphase_id, FHC_INTEGER).', '.
|
||||
$this->db_add_param($this->service_id).', '.
|
||||
$this->db_add_param($this->homeoffice, FHC_BOOLEAN).', '.
|
||||
$this->db_add_param($this->kunde_uid).');';
|
||||
}
|
||||
else
|
||||
@@ -244,6 +247,7 @@ class zeitaufzeichnung extends basis_db
|
||||
' projekt_kurzbz='.$this->db_add_param($this->projekt_kurzbz).', '.
|
||||
' projektphase_id='.$this->db_add_param($this->projektphase_id, FHC_INTEGER).', '.
|
||||
' service_id='.$this->db_add_param($this->service_id).', '.
|
||||
' homeoffice ='.$this->db_add_param($this->homeoffice, FHC_BOOLEAN).', '.
|
||||
' kunde_uid='.$this->db_add_param($this->kunde_uid).' '.
|
||||
'WHERE zeitaufzeichnung_id='.$this->db_add_param($this->zeitaufzeichnung_id, FHC_INTEGER, false);
|
||||
}
|
||||
@@ -349,6 +353,7 @@ class zeitaufzeichnung extends basis_db
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->projekt_kurzbz = $row->projekt_kurzbz;
|
||||
$obj->projektphase_id = $row->projektphase_id;
|
||||
$obj->homeoffice = $row->homeoffice;
|
||||
$obj->ext_id = $row->ext_id;
|
||||
$obj->service_id = $row->service_id;
|
||||
$obj->kunde_uid = $row->kunde_uid;
|
||||
@@ -430,6 +435,7 @@ class zeitaufzeichnung extends basis_db
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->projekt_kurzbz = $row->projekt_kurzbz;
|
||||
$obj->projektphase_id = $row->projektphase_id;
|
||||
$obj->homeoffice = $row->homeoffice;
|
||||
$obj->ext_id = $row->ext_id;
|
||||
$obj->service_id = $row->service_id;
|
||||
$obj->kunde_uid = $row->kunde_uid;
|
||||
@@ -491,6 +497,7 @@ class zeitaufzeichnung extends basis_db
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->projekt_kurzbz = $row->projekt_kurzbz;
|
||||
$obj->projektphase_id = $row->projektphase_id;
|
||||
$obj->homeoffice = $row->homeoffice;
|
||||
$obj->ext_id = $row->ext_id;
|
||||
$obj->service_id = $row->service_id;
|
||||
$obj->kunde_uid = $row->kunde_uid;
|
||||
@@ -556,6 +563,7 @@ class zeitaufzeichnung extends basis_db
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->projekt_kurzbz = $row->projekt_kurzbz;
|
||||
$obj->projektphase_id = $row->projektphase_id;
|
||||
$obj->homeoffice = $row->homeoffice;
|
||||
$obj->ext_id = $row->ext_id;
|
||||
$obj->service_id = $row->service_id;
|
||||
$obj->kunde_uid = $row->kunde_uid;
|
||||
|
||||
@@ -7,6 +7,7 @@ $this->phrasen['zeitaufzeichnung/projekt']='Projekt';
|
||||
$this->phrasen['zeitaufzeichnung/projektphase']='Projektphase';
|
||||
$this->phrasen['zeitaufzeichnung/keineAuswahl']='keine Auswahl';
|
||||
$this->phrasen['zeitaufzeichnung/aktivitaet']='Aktivität';
|
||||
$this->phrasen['zeitaufzeichnung/homeoffice']='Homeoffice';
|
||||
$this->phrasen['zeitaufzeichnung/id']='ID';
|
||||
$this->phrasen['zeitaufzeichnung/user']='User';
|
||||
$this->phrasen['zeitaufzeichnung/start']='Start';
|
||||
@@ -63,3 +64,4 @@ $this->phrasen['zeitaufzeichnung/projektphase']='AP';
|
||||
$this->phrasen['zeitaufzeichnung/pauseEinfuegen']='Pause automatisch einfügen';
|
||||
$this->phrasen['zeitaufzeichnung/zeitraumZuKurz']='Zeitraum zu kurz für automatische Pause';
|
||||
$this->phrasen['zeitaufzeichnung/supportAnfragen']='<p><hr>Supportanfragen unter<br><a href="mailto:zeiterfassung@technikum-wien.at">zeiterfassung@technikum-wien.at</a></p>';
|
||||
$this->phrasen['zeitaufzeichnung/homeofficeNichtErlaubt']='Homeoffice für den Tag %s nicht erlaubt';
|
||||
|
||||
@@ -7,6 +7,7 @@ $this->phrasen['zeitaufzeichnung/projekt']='Project';
|
||||
$this->phrasen['zeitaufzeichnung/projektphase']='Projectphase';
|
||||
$this->phrasen['zeitaufzeichnung/keineAuswahl']='no selection';
|
||||
$this->phrasen['zeitaufzeichnung/aktivitaet']='Activity';
|
||||
$this->phrasen['zeitaufzeichnung/homeoffice']='Homeoffice';
|
||||
$this->phrasen['zeitaufzeichnung/id']='ID';
|
||||
$this->phrasen['zeitaufzeichnung/user']='User';
|
||||
$this->phrasen['zeitaufzeichnung/start']='Start';
|
||||
@@ -63,3 +64,4 @@ $this->phrasen['zeitaufzeichnung/projektphase']='WP';
|
||||
$this->phrasen['zeitaufzeichnung/pauseEinfuegen']='insert break automatically';
|
||||
$this->phrasen['zeitaufzeichnung/zeitraumZuKurz']='Timeslot too short for automatic break.';
|
||||
$this->phrasen['zeitaufzeichnung/supportAnfragen']='<p><hr>Contact for support<br><a href="mailto:zeiterfassung@technikum-wien.at">zeiterfassung@technikum-wien.at</a></p>';
|
||||
$this->phrasen['zeitaufzeichnung/homeofficeNichtErlaubt']='Homeoffice for day %s not allowed';
|
||||
|
||||
@@ -94,6 +94,11 @@ function draw_row($row)
|
||||
$azgrelevant = $row->azgrelevant?'Ja':'Nein';
|
||||
else
|
||||
$azgrelevant = '';
|
||||
|
||||
if(is_bool($row->homeoffice))
|
||||
$homeoffice = $row->homeoffice?'Ja':'Nein';
|
||||
else
|
||||
$homeoffice = '';
|
||||
|
||||
echo '
|
||||
<RDF:li>
|
||||
@@ -125,6 +130,7 @@ function draw_row($row)
|
||||
<VERWENDUNG:inkludierte_lehre><![CDATA['.$row->inkludierte_lehre.']]></VERWENDUNG:inkludierte_lehre>
|
||||
<VERWENDUNG:zeitaufzeichnungspflichtig><![CDATA['.$zeitaufzeichnungspflichtig.']]></VERWENDUNG:zeitaufzeichnungspflichtig>
|
||||
<VERWENDUNG:azgrelevant><![CDATA['.$azgrelevant.']]></VERWENDUNG:azgrelevant>
|
||||
<VERWENDUNG:homeoffice><![CDATA['.$homeoffice.']]></VERWENDUNG:homeoffice>
|
||||
</RDF:Description>
|
||||
</RDF:li>
|
||||
';
|
||||
|
||||
+28
-4
@@ -4955,6 +4955,30 @@ if(!@$db->db_query("SELECT statusgrund_kurzbz FROM public.tbl_status_grund LIMIT
|
||||
echo '<br>Neue Spalte statusgrund_kurzbz zu Tabelle public.tbl_status_grund hinzugefügt';
|
||||
}
|
||||
|
||||
// Add column homeoffice to bis.tbl_bisverwendung
|
||||
if (!$result = @$db->db_query("SELECT homeoffice FROM bis.tbl_bisverwendung LIMIT 1"))
|
||||
{
|
||||
$qry = "ALTER TABLE bis.tbl_bisverwendung ADD COLUMN homeoffice boolean NOT NULL DEFAULT FALSE";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>bis.tbl_bisverwendung: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>bis.tbl_bisverwendung: Spalte homeoffice hinzugefuegt';
|
||||
}
|
||||
|
||||
// ADD COLUMN homeoffice to campus.tbl_zeitaufzeichnung
|
||||
if(!$result = @$db->db_query("SELECT homeoffice FROM campus.tbl_zeitaufzeichnung LIMIT 1"))
|
||||
{
|
||||
$qry = "
|
||||
ALTER TABLE campus.tbl_zeitaufzeichnung ADD COLUMN homeoffice boolean NOT NULL DEFAULT false ;
|
||||
";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_zeitaufzeichnung: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>campus.tbl_zeitaufzeichnung Spalte homeoffice hinzugefügt.';
|
||||
}
|
||||
|
||||
// INDEX idx_anrechnung_anrechnung_status_anrechnung_id
|
||||
if ($result = $db->db_query("SELECT 0 FROM pg_class WHERE relname = 'idx_anrechnung_anrechnung_status_anrechnung_id'"))
|
||||
{
|
||||
@@ -5000,8 +5024,8 @@ if(!@$db->db_query("SELECT lehrmodus_kurzbz FROM lehre.tbl_lehrveranstaltung LIM
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_lehrveranstaltung '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Spalte lehrmodus_kurzbz in lehre.tbl_lehrveranstaltung hinzugefügt';
|
||||
else
|
||||
echo '<br>Spalte lehrmodus_kurzbz in lehre.tbl_lehrveranstaltung hinzugefügt';
|
||||
}
|
||||
|
||||
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
|
||||
@@ -5021,7 +5045,7 @@ $tabellen=array(
|
||||
"bis.tbl_bisfunktion" => array("bisverwendung_id","studiengang_kz","sws","updateamum","updatevon","insertamum","insertvon","ext_id"),
|
||||
"bis.tbl_bisio" => array("bisio_id","mobilitaetsprogramm_code","nation_code","von","bis","zweck_code","student_uid","updateamum","updatevon","insertamum","insertvon","ext_id","ort","universitaet","lehreinheit_id","ects_erworben","ects_angerechnet"),
|
||||
"bis.tbl_bisio_zweck" => array("bisio_id","zweck_code"),
|
||||
"bis.tbl_bisverwendung" => array("bisverwendung_id","ba1code","ba2code","vertragsstunden","beschausmasscode","verwendung_code","mitarbeiter_uid","hauptberufcode","hauptberuflich","habilitation","beginn","ende","updateamum","updatevon","insertamum","insertvon","ext_id","dv_art","inkludierte_lehre","zeitaufzeichnungspflichtig","azgrelevant"),
|
||||
"bis.tbl_bisverwendung" => array("bisverwendung_id","ba1code","ba2code","vertragsstunden","beschausmasscode","verwendung_code","mitarbeiter_uid","hauptberufcode","hauptberuflich","habilitation","beginn","ende","updateamum","updatevon","insertamum","insertvon","ext_id","dv_art","inkludierte_lehre","zeitaufzeichnungspflichtig","azgrelevant", "homeoffice"),
|
||||
"bis.tbl_bundesland" => array("bundesland_code","kurzbz","bezeichnung"),
|
||||
"bis.tbl_entwicklungsteam" => array("mitarbeiter_uid","studiengang_kz","besqualcode","beginn","ende","updateamum","updatevon","insertamum","insertvon","ext_id"),
|
||||
"bis.tbl_gemeinde" => array("gemeinde_id","plz","name","ortschaftskennziffer","ortschaftsname","bulacode","bulabez","kennziffer"),
|
||||
@@ -5090,7 +5114,7 @@ $tabellen=array(
|
||||
"campus.tbl_uebung" => array("uebung_id","gewicht","punkte","angabedatei","freigabevon","freigabebis","abgabe","beispiele","statistik","bezeichnung","positiv","defaultbemerkung","lehreinheit_id","maxstd","maxbsp","liste_id","prozent","nummer","updateamum","updatevon","insertamum","insertvon"),
|
||||
"campus.tbl_veranstaltung" => array("veranstaltung_id","titel","beschreibung","veranstaltungskategorie_kurzbz","inhalt","start","ende","freigabevon","freigabeamum","updateamum","updatevon","insertamum","insertvon"),
|
||||
"campus.tbl_veranstaltungskategorie" => array("veranstaltungskategorie_kurzbz","bezeichnung","bild","farbe"),
|
||||
"campus.tbl_zeitaufzeichnung" => array("zeitaufzeichnung_id","uid","aktivitaet_kurzbz","projekt_kurzbz","start","ende","beschreibung","oe_kurzbz_1","oe_kurzbz_2","insertamum","insertvon","updateamum","updatevon","ext_id","service_id","kunde_uid","projektphase_id"),
|
||||
"campus.tbl_zeitaufzeichnung" => array("zeitaufzeichnung_id","uid","aktivitaet_kurzbz","projekt_kurzbz","start","ende","beschreibung","oe_kurzbz_1","oe_kurzbz_2","insertamum","insertvon","updateamum","updatevon","ext_id","service_id","kunde_uid","projektphase_id","homeoffice"),
|
||||
"campus.tbl_zeitaufzeichnung_gd" => array("zeitaufzeichnung_gd_id","uid","studiensemester_kurzbz","selbstverwaltete_pause","insertamum","insertvon","updateamum","updatevon"),
|
||||
"campus.tbl_zeitsperre" => array("zeitsperre_id","zeitsperretyp_kurzbz","mitarbeiter_uid","bezeichnung","vondatum","vonstunde","bisdatum","bisstunde","vertretung_uid","updateamum","updatevon","insertamum","insertvon","erreichbarkeit_kurzbz","freigabeamum","freigabevon"),
|
||||
"campus.tbl_zeitsperretyp" => array("zeitsperretyp_kurzbz","beschreibung","farbe"),
|
||||
|
||||
Reference in New Issue
Block a user