mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 08:34:29 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2cd103b23e | ||
|
|
73f03ad09f | ||
|
|
ae5ad15948 | ||
|
|
b24102a0b9 | ||
|
|
c456803f7f | ||
|
|
2492f68527 |
@@ -45,7 +45,7 @@ $uid = get_uid();
|
||||
|
||||
$PHP_SELF = $_SERVER['PHP_SELF'];
|
||||
|
||||
$typen_arr = array("Urlaub", "PflegeU", "ZA", "Krank", "DienstF", "DienstV", "CovidSB", "CovidKS");
|
||||
$typen_arr = array("Urlaub", "PflegeU", "ZA", "Krank", "DienstF", "DienstV", "CovidSB", "CovidKS","Mutter");
|
||||
|
||||
if(isset($_GET['type']))
|
||||
$type=$_GET['type'];
|
||||
@@ -312,7 +312,8 @@ function showHideStudeDropDown()
|
||||
|| dd.options[dd.selectedIndex].value == 'DienstF'
|
||||
|| dd.options[dd.selectedIndex].value == 'DienstV'
|
||||
|| dd.options[dd.selectedIndex].value == 'CovidSB'
|
||||
|| dd.options[dd.selectedIndex].value == 'CovidKS')
|
||||
|| dd.options[dd.selectedIndex].value == 'CovidKS'
|
||||
|| dd.options[dd.selectedIndex].value == 'Mutter')
|
||||
{
|
||||
document.getElementById('vonStd').style.visibility = 'hidden';
|
||||
document.getElementById('bisStd').style.visibility = 'hidden';
|
||||
|
||||
@@ -21,7 +21,7 @@ class zeitaufzeichnung_import {
|
||||
protected $project;
|
||||
protected $phase;
|
||||
protected $limitdate;
|
||||
|
||||
|
||||
protected $zeit;
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class zeitaufzeichnung_import {
|
||||
|
||||
$this->zeit = new zeitaufzeichnung();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
@@ -64,7 +64,7 @@ class zeitaufzeichnung_import {
|
||||
public function hasInfos() {
|
||||
return !empty($this->infos);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
@@ -96,15 +96,15 @@ class zeitaufzeichnung_import {
|
||||
$html .= '<span style="color:green;"><b>' . $msg . '</b></span><br>' . "\n";
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function OutputToHTML() {
|
||||
return $this->InfosToHTML() . $this->WarningsToHTML() . $this->ErrorsToHTML();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $msg
|
||||
* @return void
|
||||
@@ -112,7 +112,7 @@ class zeitaufzeichnung_import {
|
||||
protected function addError($msg) {
|
||||
$this->errors[] = $msg;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $msg
|
||||
* @return void
|
||||
@@ -120,7 +120,7 @@ class zeitaufzeichnung_import {
|
||||
protected function addWarning($msg) {
|
||||
$this->warnings[] = $msg;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $msg
|
||||
* @return void
|
||||
@@ -134,7 +134,7 @@ class zeitaufzeichnung_import {
|
||||
* @param string $uid The user id
|
||||
* @param string $day "Y-m-d" formatted datestring
|
||||
* @return void
|
||||
*
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkZeitsperren($uid, $day) {
|
||||
@@ -150,25 +150,25 @@ class zeitaufzeichnung_import {
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ": " . $this->p->t("zeitaufzeichnung/zeitsperreVorhanden", [$zsdate, $zs->result[0]->zeitsperretyp_kurzbz]));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $date datetimestring
|
||||
* @return void
|
||||
*
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkLimitdatum($date) {
|
||||
if ($this->datum->formatDatum($date, 'Y-m-d H:i:s') > $this->limitdate) {
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Eingabe nicht möglich da (' . $date . ') zu weit in der Zukunft liegt.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $start datestring
|
||||
* @param string $end datestring
|
||||
* @param string $aktivitaet_kurzbz
|
||||
* @return void
|
||||
*
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkDienstreise($start, $end, $aktivitaet_kurzbz) {
|
||||
@@ -179,11 +179,11 @@ class zeitaufzeichnung_import {
|
||||
.': Eingabe nicht möglich, da keine Zeitaufzeichnung über mehrere Tage erlaubt ist (ausgenommen Dienstreisen).');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $end timestring
|
||||
* @return void
|
||||
*
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkTagesgenau($end) {
|
||||
@@ -193,13 +193,13 @@ class zeitaufzeichnung_import {
|
||||
.': Bitte Arbeitszeiten gemäß Arbeitsaufzeichnung Leitfaden tagesgenau abgrenzen: Nur Eingaben von 00:00 bis 23:59 erlaubt!');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $projekt_kurzbz
|
||||
* @param string $start datestring
|
||||
* @param string $end datestring
|
||||
* @return void
|
||||
*
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkProjectInterval($projekt_kurzbz, $start, $end) {
|
||||
@@ -207,13 +207,13 @@ class zeitaufzeichnung_import {
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Eingabe nicht möglich, da angegebenes Anfangs und Enddatum nicht in den Projektzeitrahmen fällt: (' . $start . ') (' . $end . ')');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $phase The Projektphase ID
|
||||
* @param string $start datestring
|
||||
* @param string $end datestring
|
||||
* @return void
|
||||
*
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkPhaseInterval($phase, $start, $end) {
|
||||
@@ -222,84 +222,4 @@ class zeitaufzeichnung_import {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $start datetime
|
||||
* @param string $end datetime
|
||||
* @return void
|
||||
*/
|
||||
protected function processPause($start, $end) {
|
||||
if (isset($_POST['genPause'])) {
|
||||
$p_start = $this->datum->formatDatum($start, 'Y-m-d H:i:s');
|
||||
$p_end = $this->datum->formatDatum($end, 'Y-m-d H:i:s');
|
||||
$this->checkPauseInArbeitszeit($p_start, $p_end);
|
||||
$this->checkPauseValid($p_start, $p_end);
|
||||
$this->savePauseGeneric($start, $end);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $start "Y-m-d H:i:s" formatted datetime
|
||||
* @param string $end "Y-m-d H:i:s" formatted datetime
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkPauseInArbeitszeit($start, $end) {
|
||||
if ($this->zeit->start > $start || $this->zeit->ende < $end) {
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Pause außerhalb der Arbeitszeit');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $start "Y-m-d H:i:s" formatted datetime
|
||||
* @param string $end "Y-m-d H:i:s" formatted datetime
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkPauseValid($start, $end) {
|
||||
if ($start > $end) {
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Fehlerhafte Pausenzeiten');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $start datetime
|
||||
* @param string $end datetime
|
||||
* @return void
|
||||
*/
|
||||
protected function savePauseGeneric($start, $end) {
|
||||
//Eintrag Arbeit bis zur Pause
|
||||
$ende = $this->zeit->ende;
|
||||
$this->zeit->ende = $this->datum->formatDatum($start, 'Y-m-d H:i:s');
|
||||
if (!$this->zeit->save()) {
|
||||
$this->addError($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': ' . $this->zeit->errormsg);
|
||||
}
|
||||
//Eintrag für die Pause
|
||||
$pause = new zeitaufzeichnung();
|
||||
$pause->new = true;
|
||||
$pause->insertamum = date('Y-m-d H:i:s');
|
||||
$pause->updateamum = date('Y-m-d H:i:s');
|
||||
$pause->updatevon = $this->user;
|
||||
$pause->insertvon = $this->user;
|
||||
$pause->uid = $this->user;
|
||||
$pause->aktivitaet_kurzbz = 'Pause';
|
||||
$pause->homeoffice = $this->zeit->homeoffice;
|
||||
$pause->start = $this->datum->formatDatum($start, 'Y-m-d H:i:s');
|
||||
$pause->ende = $this->datum->formatDatum($end, 'Y-m-d H:i:s');
|
||||
$pause->beschreibung = '';
|
||||
if (!$pause->save()) {
|
||||
$this->addError($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': ' . $pause->errormsg);
|
||||
}
|
||||
// Eintrag Arbeit ab der Pause
|
||||
if ($this->zeit->new == false) {
|
||||
$this->zeit->new = true;
|
||||
$this->zeit->insertamum = date('Y-m-d H:i:s');
|
||||
$this->zeit->insertvon = $this->user;
|
||||
}
|
||||
|
||||
$this->zeit->start = $this->datum->formatDatum($end, 'Y-m-d H:i:s');
|
||||
$this->zeit->ende = $ende;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -176,8 +176,6 @@ class zeitaufzeichnung_import_csv extends zeitaufzeichnung_import {
|
||||
$this->mapLehreIntern($data);
|
||||
$this->prepareZeitaufzeichnung($data);
|
||||
$this->checkImporttage($data[self::STARTDT]);
|
||||
$this->checkPauseInArbeitszeit($data[self::STARTDT], $data[self::ENDEDT]);
|
||||
$this->checkPauseValid($data[self::STARTDT], $data[self::ENDEDT]);
|
||||
$this->saveZeit($data[self::STARTDT], $data[self::ENDEDT]);
|
||||
} catch (Exception $ex) {
|
||||
$this->addError($ex->getMessage(), true);
|
||||
@@ -385,8 +383,6 @@ class zeitaufzeichnung_import_csv extends zeitaufzeichnung_import {
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function savePause() {
|
||||
$pause = new zeitaufzeichnung();
|
||||
@@ -403,7 +399,7 @@ class zeitaufzeichnung_import_csv extends zeitaufzeichnung_import {
|
||||
$pause->homeoffice = $this->zeit->homeoffice;
|
||||
if(!$pause->save())
|
||||
{
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten").': '.$pause->errormsg, true);
|
||||
$this->addError($this->p->t("global/fehlerBeimSpeichernDerDaten").': '.$pause->errormsg, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -411,7 +407,6 @@ class zeitaufzeichnung_import_csv extends zeitaufzeichnung_import {
|
||||
* @param string $start datetimestring
|
||||
* @param string $end datetimestring
|
||||
* @return void
|
||||
|
||||
*/
|
||||
protected function saveZeit($start, $end) {
|
||||
if ($start != $end) {
|
||||
@@ -423,7 +418,6 @@ class zeitaufzeichnung_import_csv extends zeitaufzeichnung_import {
|
||||
} else {
|
||||
$this->anzahl++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -126,6 +126,86 @@ class zeitaufzeichnung_import_post extends zeitaufzeichnung_import {
|
||||
$this->zeit->kunde_uid = $kunde_uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $start datetime
|
||||
* @param string $end datetime
|
||||
* @return void
|
||||
*/
|
||||
protected function processPause($start, $end) {
|
||||
if (isset($_POST['genPause'])) {
|
||||
$p_start = $this->datum->formatDatum($start, 'Y-m-d H:i:s');
|
||||
$p_end = $this->datum->formatDatum($end, 'Y-m-d H:i:s');
|
||||
$this->checkPauseInArbeitszeit($p_start, $p_end);
|
||||
$this->checkPauseValid($p_start, $p_end);
|
||||
$this->savePause($start, $end);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $start "Y-m-d H:i:s" formatted datetime
|
||||
* @param string $end "Y-m-d H:i:s" formatted datetime
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkPauseInArbeitszeit($start, $end) {
|
||||
if ($this->zeit->start > $start || $this->zeit->ende < $end) {
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Pause außerhalb der Arbeitszeit');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $start "Y-m-d H:i:s" formatted datetime
|
||||
* @param string $end "Y-m-d H:i:s" formatted datetime
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkPauseValid($start, $end) {
|
||||
if ($start > $end) {
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Fehlerhafte Pausenzeiten');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $start datetime
|
||||
* @param string $end datetime
|
||||
* @return void
|
||||
*/
|
||||
protected function savePause($start, $end) {
|
||||
//Eintrag Arbeit bis zur Pause
|
||||
$ende = $this->zeit->ende;
|
||||
$this->zeit->ende = $this->datum->formatDatum($start, 'Y-m-d H:i:s');
|
||||
if (!$this->zeit->save()) {
|
||||
$this->addError($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': ' . $this->zeit->errormsg);
|
||||
}
|
||||
//Eintrag für die Pause
|
||||
$pause = new zeitaufzeichnung();
|
||||
$pause->new = true;
|
||||
$pause->insertamum = date('Y-m-d H:i:s');
|
||||
$pause->updateamum = date('Y-m-d H:i:s');
|
||||
$pause->updatevon = $this->user;
|
||||
$pause->insertvon = $this->user;
|
||||
$pause->uid = $this->user;
|
||||
$pause->aktivitaet_kurzbz = 'Pause';
|
||||
$pause->homeoffice = $this->zeit->homeoffice;
|
||||
$pause->start = $this->datum->formatDatum($start, 'Y-m-d H:i:s');
|
||||
$pause->ende = $this->datum->formatDatum($end, 'Y-m-d H:i:s');
|
||||
$pause->beschreibung = '';
|
||||
if (!$pause->save()) {
|
||||
$this->addError($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': ' . $pause->errormsg);
|
||||
}
|
||||
// Eintrag Arbeit ab der Pause
|
||||
if ($this->zeit->new == false) {
|
||||
$this->zeit->new = true;
|
||||
$this->zeit->insertamum = date('Y-m-d H:i:s');
|
||||
$this->zeit->insertvon = $this->user;
|
||||
}
|
||||
|
||||
$this->zeit->start = $this->datum->formatDatum($end, 'Y-m-d H:i:s');
|
||||
$this->zeit->ende = $ende;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*
|
||||
|
||||
@@ -24,7 +24,7 @@ require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
class zeitsperre extends basis_db
|
||||
{
|
||||
const NUR_BLOCKIERENDE_ZEITSPERREN = true;
|
||||
const BLOCKIERENDE_ZEITSPERREN = "'Krank','Urlaub','ZA','DienstV','PflegeU','DienstF','CovidSB','CovidKS'";
|
||||
const BLOCKIERENDE_ZEITSPERREN = "'Krank','Urlaub','ZA','DienstV','PflegeU','DienstF','CovidSB','CovidKS','Mutter'";
|
||||
|
||||
public $new; // boolean
|
||||
public $result = array(); // news Objekt
|
||||
@@ -551,13 +551,13 @@ class zeitsperre extends basis_db
|
||||
public function getVonBis($uid, $von, $bis, $zeitsperretyp_kurzbz = null)
|
||||
{
|
||||
$qry = '
|
||||
SELECT
|
||||
SELECT
|
||||
zeitsperre_id, zeitsperretyp_kurzbz, vondatum, vonstunde, bisdatum, bisstunde
|
||||
FROM
|
||||
FROM
|
||||
campus.tbl_zeitsperre
|
||||
LEFT JOIN campus.tbl_zeitsperretyp USING (zeitsperretyp_kurzbz)
|
||||
WHERE
|
||||
mitarbeiter_uid = '. $this->db_add_param($uid). '
|
||||
WHERE
|
||||
mitarbeiter_uid = '. $this->db_add_param($uid). '
|
||||
AND (
|
||||
(vondatum BETWEEN '.$this->db_add_param($von).' AND '.$this->db_add_param($bis).')
|
||||
OR
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
*
|
||||
*/
|
||||
export const LogsViewerTabulatorOptions = {
|
||||
height: 700,
|
||||
height: 500,
|
||||
layout: 'fitColumns',
|
||||
columns: [
|
||||
{title: 'Log ID', field: 'LogId'},
|
||||
@@ -29,17 +29,7 @@ export const LogsViewerTabulatorOptions = {
|
||||
{title: 'Description', field: 'Description'},
|
||||
{title: 'Data', field: 'Data'},
|
||||
{title: 'Web service type', field: 'WebserviceType'}
|
||||
],
|
||||
rowFormatter: function(row) {
|
||||
if (row.getData().RequestId.includes("error"))
|
||||
{
|
||||
row.getElement().style.color = "red";
|
||||
}
|
||||
else if (row.getData().RequestId.includes("warning"))
|
||||
{
|
||||
row.getElement().style.color = "orange";
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -533,7 +533,7 @@ export const CoreFilterCmpt = {
|
||||
@data-fetched="fetchCmptDataFetched">
|
||||
</core-fetch-cmpt>
|
||||
|
||||
<div class="row" v-if="title != null && title != ''">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header">
|
||||
{{ title }}
|
||||
|
||||
@@ -28,6 +28,8 @@ require_once('dbupdate_3.4/example2.php');
|
||||
...
|
||||
*/
|
||||
|
||||
require_once('dbupdate_3.4/feature_18732_Neue_Zeitsperre_Mutterschutz.php');
|
||||
|
||||
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
|
||||
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
//Neue Zeitsperre Mutterschutz
|
||||
if($result = $db->db_query("SELECT 1 FROM campus.tbl_zeitsperretyp WHERE zeitsperretyp_kurzbz = 'Mutter'"))
|
||||
{
|
||||
if($db->db_num_rows($result)==0)
|
||||
{
|
||||
$qry = "INSERT INTO campus.tbl_zeitsperretyp (zeitsperretyp_kurzbz, beschreibung) VALUES ('Mutter', 'Mutterschutz');";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_zeitsperretyp: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Zeitsperretyp Mutterschutz in campus.tbl_zeitsperretyp hinzugefügt';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user