mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Merge branch 'master' into feature-25999/C4_ma0594_profilePage
This commit is contained in:
@@ -0,0 +1,161 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* 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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (FAS) and the AntragLib (back-end)
|
||||
* This controller works with calls on the HTTP GET or POST and the output is always RDF
|
||||
*/
|
||||
class Wiederholung extends Auth_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Calls the parent's constructor and loads the FilterCmptLib
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getLvs' => ['student/studierendenantrag:r', 'student/noten:r'],
|
||||
'moveLvsToZeugnis' => ['student/studierendenantrag:w', 'student/noten:w']
|
||||
]);
|
||||
|
||||
// Libraries
|
||||
$this->load->library('AntragLib');
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'global',
|
||||
'studierendenantrag'
|
||||
]);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
public function getLvs($prestudent_id)
|
||||
{
|
||||
// header für no cache
|
||||
$this->output->set_header("Cache-Control: no-cache");
|
||||
$this->output->set_header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
$this->output->set_header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
$this->output->set_header("Pragma: no-cache");
|
||||
$this->output->set_header("Content-type: application/xhtml+xml");
|
||||
|
||||
$this->load->library('VariableLib', ['uid' => getAuthUID()]);
|
||||
$sem_akt = $this->variablelib->getVar('semester_aktuell');
|
||||
|
||||
|
||||
$result = $this->antraglib->getLvsForPrestudent($prestudent_id, $sem_akt);
|
||||
$lvs = $this->getDataOrTerminateWithError($result) ?: [];
|
||||
|
||||
$rdf_url = 'http://www.technikum-wien.at/antragnote';
|
||||
|
||||
$this->load->view('lehre/Antrag/Wiederholung/getLvs.rdf.php', [
|
||||
'url' => $rdf_url,
|
||||
'lvs' => $lvs
|
||||
]);
|
||||
}
|
||||
|
||||
public function moveLvsToZeugnis()
|
||||
{
|
||||
$anzahl = $this->input->post('anzahl');
|
||||
$student_uid = $this->input->post('student_uid');
|
||||
$this->load->model('education/Studierendenantraglehrveranstaltung_model', 'StudierendenantraglehrveranstaltungModel');
|
||||
$this->load->model('education/Zeugnisnote_model', 'ZeugnisnoteModel');
|
||||
|
||||
$errormsg = array();
|
||||
|
||||
for($i=0; $i<$anzahl; $i++)
|
||||
{
|
||||
$id = $this->input->post('studierendenantrag_lehrveranstaltung_id_' . $i);
|
||||
$result =$this->StudierendenantraglehrveranstaltungModel->load($id);
|
||||
if(isError($result))
|
||||
{
|
||||
$errormsg[] = getError($result);
|
||||
}
|
||||
elseif(!hasData($result))
|
||||
{
|
||||
$errormsg[] = $this->p->t('studierendenantrag', 'error_no_lv_in_application');
|
||||
}
|
||||
else
|
||||
{
|
||||
$antragLv = getData($result)[0];
|
||||
$result= $this->ZeugnisnoteModel->load([
|
||||
'lehrveranstaltung_id'=> $antragLv->lehrveranstaltung_id,
|
||||
'student_uid'=> $student_uid,
|
||||
'studiensemester_kurzbz' => $antragLv->studiensemester_kurzbz
|
||||
]);
|
||||
if(isError($result))
|
||||
{
|
||||
$errormsg[] = getError($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (hasData($result))
|
||||
{
|
||||
$result = $this->ZeugnisnoteModel->update(
|
||||
[
|
||||
'lehrveranstaltung_id'=> $antragLv->lehrveranstaltung_id,
|
||||
'student_uid'=> $student_uid,
|
||||
'studiensemester_kurzbz' => $antragLv->studiensemester_kurzbz
|
||||
],
|
||||
[
|
||||
'note'=> $antragLv->note,
|
||||
'uebernahmedatum' => date('c'),
|
||||
'benotungsdatum' => $antragLv->insertamum,
|
||||
'updateamum' => date('c'),
|
||||
'bemerkung'=>$antragLv->anmerkung,
|
||||
'updatevon'=>getAuthUID()
|
||||
]
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->ZeugnisnoteModel->insert([
|
||||
'lehrveranstaltung_id'=> $antragLv->lehrveranstaltung_id,
|
||||
'student_uid'=> $student_uid,
|
||||
'studiensemester_kurzbz' => $antragLv->studiensemester_kurzbz,
|
||||
'note'=> $antragLv->note,
|
||||
'uebernahmedatum' => date('c'),
|
||||
'benotungsdatum' => $antragLv->insertamum,
|
||||
'insertamum' => date('c'),
|
||||
'bemerkung'=>$antragLv->anmerkung,
|
||||
'insertvon'=>getAuthUID()
|
||||
]);
|
||||
}
|
||||
if(isError($result))
|
||||
{
|
||||
$errormsg[] = getError($result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($errormsg)
|
||||
$return = false;
|
||||
else
|
||||
$return = true;
|
||||
|
||||
$this->load->view('lehre/Antrag/Wiederholung/moveLvs.rdf.php', [
|
||||
'return' => $return,
|
||||
'errormsg' => $errormsg
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,231 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* 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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (GUI) and the FilterCmptLib (back-end)
|
||||
* Provides data to the ajax get calls about the filter component
|
||||
* Listens to ajax post calls to change the filter data
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
*/
|
||||
class Filter extends FHCAPI_Controller
|
||||
{
|
||||
const FILTER_UNIQUE_ID = 'filterUniqueId'; // Name of the filter cmpt unique id (mandatory)
|
||||
const FILTER_TYPE = 'filterType'; // The filter type (PHP filter definition) used (mandatory)
|
||||
const FILTER_ID = 'filterId'; // The id of the used filter (optional)
|
||||
|
||||
/**
|
||||
* Calls the parent's constructor and loads the FilterCmptLib
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// NOTE: FilterCmpt has its own permissions checks
|
||||
parent::__construct([
|
||||
'getFilter' => self::PERM_LOGGED,
|
||||
'removeFilterField' => self::PERM_LOGGED,
|
||||
'addFilterField' => self::PERM_LOGGED,
|
||||
'applyFilterFields' => self::PERM_LOGGED,
|
||||
'removeCustomFilter' => self::PERM_LOGGED,
|
||||
'saveCustomFilter' => self::PERM_LOGGED,
|
||||
'reloadDataset' => self::PERM_LOGGED
|
||||
]);
|
||||
|
||||
// Loads the FiltersModel
|
||||
$this->load->model('system/Filters_model', 'FiltersModel');
|
||||
|
||||
// Loads the FilterCmptLib with HTTP GET/POST parameters
|
||||
$this->_startFilterCmptLib();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Retrieves data about the current filter from the session and will be written on the output in JSON format
|
||||
*/
|
||||
public function getFilter()
|
||||
{
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$session = $this->filtercmptlib->getSession();
|
||||
if (is_object($session)) {
|
||||
// If stdClass it is an retval object
|
||||
$session = $this->getDataOrTerminateWithError($session);
|
||||
}
|
||||
$this->terminateWithSuccess($session);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an applied filter (SQL where condition) from the current filter
|
||||
*/
|
||||
public function removeFilterField()
|
||||
{
|
||||
$this->form_validation->set_rules('filterField', 'filterField', 'required');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$result = $this->filtercmptlib->removeFilterField($this->input->post('filterField'));
|
||||
|
||||
if (!$result)
|
||||
$this->terminateWithError('Error occurred', self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$this->terminateWithSuccess('Field removed');
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a filter (SQL where clause) to be applied to the current filter
|
||||
*/
|
||||
public function addFilterField()
|
||||
{
|
||||
$this->form_validation->set_rules('filterField', 'filterField', 'required');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$result = $this->filtercmptlib->addFilterField($this->input->post('filterField'));
|
||||
|
||||
if (!$result)
|
||||
$this->terminateWithError('Error occurred', self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$this->terminateWithSuccess('Field added');
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply the filter changes
|
||||
*/
|
||||
public function applyFilterFields()
|
||||
{
|
||||
$this->form_validation->set_rules('filterFields', 'filterFields', 'required');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$result = $this->filtercmptlib->applyFilterFields($this->input->post('filterFields'));
|
||||
|
||||
if (!$result)
|
||||
$this->terminateWithError('Error occurred', self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$this->terminateWithSuccess('Applied');
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the current filter as a custom filter for this user with the given description
|
||||
*/
|
||||
public function saveCustomFilter()
|
||||
{
|
||||
$this->form_validation->set_rules('customFilterName', 'customFilterName', 'required');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$result = $this->filtercmptlib->saveCustomFilter($this->input->post('customFilterName'));
|
||||
|
||||
if (!$result)
|
||||
$this->terminateWithError('Error occurred', self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$this->terminateWithSuccess('Saved');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a custom filter by its filterId
|
||||
*/
|
||||
public function removeCustomFilter()
|
||||
{
|
||||
$this->form_validation->set_rules('filterId', 'filterId', 'required');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$result = $this->filtercmptlib->removeCustomFilter($this->input->post('filterId'));
|
||||
|
||||
if (!$result)
|
||||
$this->terminateWithError('Error occurred', self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$this->terminateWithSuccess('Removed');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reloads the dataset
|
||||
*/
|
||||
public function reloadDataset()
|
||||
{
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$this->filtercmptlib->reloadDataset();
|
||||
|
||||
$this->terminateWithSuccess('Success');
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
/**
|
||||
* Loads the FilterCmptLib with the FILTER_UNIQUE_ID parameter
|
||||
* If the parameter FILTER_UNIQUE_ID is not given then the execution of the controller is terminated and
|
||||
* an error message is printed
|
||||
*/
|
||||
private function _startFilterCmptLib()
|
||||
{
|
||||
$filterUniqueId = null;
|
||||
$filterType = null;
|
||||
$filterId = null;
|
||||
|
||||
$validations = [
|
||||
[
|
||||
'field' => self::FILTER_UNIQUE_ID,
|
||||
'label' => self::FILTER_UNIQUE_ID,
|
||||
'rules' => 'required'
|
||||
],
|
||||
[
|
||||
'field' => self::FILTER_TYPE,
|
||||
'label' => self::FILTER_TYPE,
|
||||
'rules' => 'required'
|
||||
],
|
||||
];
|
||||
|
||||
$this->load->library('form_validation');
|
||||
|
||||
if ($this->input->method() == 'get')
|
||||
$this->form_validation->set_data($this->input->get());
|
||||
$this->form_validation->set_rules($validations);
|
||||
|
||||
if ($this->form_validation->run()) {
|
||||
$filterUniqueId = $this->input->post_get(self::FILTER_UNIQUE_ID);
|
||||
$filterType = $this->input->post_get(self::FILTER_TYPE);
|
||||
$filterId = $this->input->post_get(self::FILTER_ID);
|
||||
|
||||
// Loads the FilterCmptLib that contains all the used logic
|
||||
$this->load->library(
|
||||
'FilterCmptLib',
|
||||
array(
|
||||
'filterUniqueId' => $filterUniqueId,
|
||||
'filterType' => $filterType,
|
||||
'filterId' => $filterId
|
||||
)
|
||||
);
|
||||
|
||||
// Start the component
|
||||
$this->filtercmptlib->start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* 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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (GUI) and the NavigationLib (back-end)
|
||||
* Provides data to the ajax get calls about the filter
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
*/
|
||||
class Navigation extends FHCAPI_Controller
|
||||
{
|
||||
const NAVIGATION_PAGE_PARAM = 'navigation_page'; // Navigation page parameter name
|
||||
|
||||
/**
|
||||
* Loads the NavigationLib where the used logic lies
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'menu' => self::PERM_LOGGED,
|
||||
'header' => self::PERM_LOGGED
|
||||
]);
|
||||
|
||||
$this->_loadNavigationLib(); // Loads the NavigationLib with parameters
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* This function creates the left Menu for each Page
|
||||
* @param NAVIGATION_PAGE_PARAM GET Parameter witch holds the currently called Page
|
||||
* @return JSON object with the Menu Entries
|
||||
*/
|
||||
public function menu()
|
||||
{
|
||||
$menuArray = $this->navigationlib->getMenuArray($this->input->get(self::NAVIGATION_PAGE_PARAM));
|
||||
|
||||
$this->terminateWithSuccess($menuArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function creates the Top Menu for each Page
|
||||
* @param NAVIGATION_PAGE_PARAM GET Parameter witch holds the currently called Page
|
||||
* @return JSON object with the Menu Entries
|
||||
*/
|
||||
public function header()
|
||||
{
|
||||
$headerArray = $this->navigationlib->getHeaderArray($this->input->get(self::NAVIGATION_PAGE_PARAM));
|
||||
|
||||
$this->terminateWithSuccess($headerArray);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
/**
|
||||
* Loads the NavigationLib with the NAVIGATION_PAGE_PARAM parameter
|
||||
* If the parameter NAVIGATION_PAGE_PARAM is not given then the execution of the controller is terminated and
|
||||
* an error message is printed
|
||||
*/
|
||||
private function _loadNavigationLib()
|
||||
{
|
||||
// If the parameter NAVIGATION_PAGE_PARAM is present in the HTTP GET or POST
|
||||
if (isset($_GET[self::NAVIGATION_PAGE_PARAM]) || isset($_POST[self::NAVIGATION_PAGE_PARAM]))
|
||||
{
|
||||
// If it is present in the HTTP GET
|
||||
if (isset($_GET[self::NAVIGATION_PAGE_PARAM]))
|
||||
{
|
||||
$navigationPage = $this->input->get(self::NAVIGATION_PAGE_PARAM); // is retrieved from the HTTP GET
|
||||
}
|
||||
elseif (isset($_POST[self::NAVIGATION_PAGE_PARAM])) // Else if it is present in the HTTP POST
|
||||
{
|
||||
$navigationPage = $this->input->post(self::NAVIGATION_PAGE_PARAM); // is retrieved from the HTTP POST
|
||||
}
|
||||
|
||||
// Loads the NavigationLib that contains all the used logic
|
||||
$this->load->library('NavigationLib', array(self::NAVIGATION_PAGE_PARAM => $navigationPage));
|
||||
}
|
||||
else // Otherwise an error will be written in the output
|
||||
{
|
||||
show_error('Parameter "' . self::NAVIGATION_PAGE_PARAM . '" not provided!');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* 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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (GUI) and the PhrasesLib (back-end)
|
||||
* Provides data to the ajax get calls about the Phrasen plugin
|
||||
* This controller works with JSON calls on the HTTP GET and the output is always JSON
|
||||
*/
|
||||
class Phrasen extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'loadModule' => self::PERM_ANONYMOUS
|
||||
]);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* @param string $module
|
||||
*/
|
||||
public function loadModule($module)
|
||||
{
|
||||
$this->load->library('PhrasesLib', [$module], 'pj');
|
||||
$this->terminateWithSuccess(json_decode($this->pj->getJSON()));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* 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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (GUI) and the SearchBarLib (back-end)
|
||||
* Provides data to the ajax get calls about the searchbar component
|
||||
* This controller works with JSON calls on the HTTP GET and the output is always JSON
|
||||
*/
|
||||
class Searchbar extends FHCAPI_Controller
|
||||
{
|
||||
const SEARCHSTR_PARAM = 'searchstr';
|
||||
const TYPES_PARAM = 'types';
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// NOTE(chris): additional permission checks will be done in SearchBarLib
|
||||
parent::__construct([
|
||||
'search' => self::PERM_LOGGED
|
||||
]);
|
||||
|
||||
// Load the library SearchBarLib
|
||||
$this->load->library('SearchBarLib');
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Gets a JSON body via HTTP POST and provides the parameters
|
||||
*/
|
||||
public function search()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
// Checks if the searchstr and the types parameters are in the POSTed JSON
|
||||
$this->form_validation->set_rules(self::SEARCHSTR_PARAM, null, 'required');
|
||||
$this->form_validation->set_rules(self::TYPES_PARAM . '[]', null, 'required');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithError(SearchBarLib::ERROR_WRONG_JSON, self::ERROR_TYPE_GENERAL);
|
||||
|
||||
// Convert to json the result from searchbarlib->search
|
||||
$result = $this->searchbarlib->search($this->input->post(self::SEARCHSTR_PARAM), $this->input->post(self::TYPES_PARAM));
|
||||
if (property_exists($result, 'error'))
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* 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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use \REST_Controller as REST_Controller;
|
||||
use \Studierendenantrag_model as Studierendenantrag_model;
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (GUI) and the AntragLib (back-end)
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
*/
|
||||
class Abmeldung extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Calls the parent's constructor and loads the AntragLib
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getDetailsForNewAntrag' => self::PERM_LOGGED,
|
||||
'getDetailsForAntrag' => self::PERM_LOGGED,
|
||||
'createAntrag' => self::PERM_LOGGED,
|
||||
'cancelAntrag' => self::PERM_LOGGED
|
||||
]);
|
||||
|
||||
// Libraries
|
||||
$this->load->library('AntragLib');
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'studierendenantrag'
|
||||
]);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Retrieves data of the current studiengang for the current user
|
||||
*/
|
||||
|
||||
public function getDetailsForNewAntrag($prestudent_id)
|
||||
{
|
||||
if (!$this->antraglib->isEntitledToCreateAntragFor($prestudent_id, true))
|
||||
$this->terminateWithError('Forbidden', self::ERROR_TYPE_AUTH, REST_Controller::HTTP_FORBIDDEN);
|
||||
|
||||
$result = $this->antraglib->getPrestudentAbmeldeBerechtigt($prestudent_id);
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if (!$result) {
|
||||
$this->terminateWithError(
|
||||
$this->p->t('studierendenantrag', 'error_no_student'),
|
||||
self::ERROR_TYPE_AUTH,
|
||||
REST_Controller::HTTP_FORBIDDEN
|
||||
);
|
||||
} elseif ($result == -3) {
|
||||
$this->terminateWithError(
|
||||
$this->p->t('studierendenantrag', 'error_stg_blacklist'),
|
||||
self::ERROR_TYPE_AUTH,
|
||||
REST_Controller::HTTP_FORBIDDEN
|
||||
);
|
||||
} elseif ($result == -1) {
|
||||
$result = $this->antraglib->getDetailsForLastAntrag(
|
||||
$prestudent_id,
|
||||
[
|
||||
Studierendenantrag_model::TYP_ABMELDUNG,
|
||||
Studierendenantrag_model::TYP_ABMELDUNG_STGL
|
||||
]
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$data->canCancel = (
|
||||
$data->status == Studierendenantragstatus_model::STATUS_CREATED &&
|
||||
$this->antraglib->isEntitledToCancelAntrag($data->studierendenantrag_id)
|
||||
);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
$result = $this->antraglib->getDetailsForNewAntrag($prestudent_id);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getDetailsForAntrag($studierendenantrag_id)
|
||||
{
|
||||
if (!$this->antraglib->isEntitledToShowAntrag($studierendenantrag_id))
|
||||
return show_404();
|
||||
|
||||
$result = $this->antraglib->getDetailsForAntrag($studierendenantrag_id);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if ($data->typ !== Studierendenantrag_model::TYP_ABMELDUNG_STGL && $data->typ !== Studierendenantrag_model::TYP_ABMELDUNG)
|
||||
return show_404();
|
||||
|
||||
$data->canCancel = (
|
||||
$data->status == Studierendenantragstatus_model::STATUS_CREATED &&
|
||||
$this->antraglib->isEntitledToCancelAntrag($data->studierendenantrag_id)
|
||||
);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function createAntrag()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules('studiensemester', 'Studiensemester', 'required');
|
||||
$this->form_validation->set_rules('prestudent_id', 'Prestudent ID', 'required');
|
||||
$this->form_validation->set_rules('grund', 'Grund', 'required');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$grund = $this->input->post('grund');
|
||||
$studiensemester = $this->input->post('studiensemester');
|
||||
$prestudent_id = $this->input->post('prestudent_id');
|
||||
|
||||
$result = $this->antraglib->getPrestudentAbmeldeBerechtigt($prestudent_id);
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
if (!$result)
|
||||
$this->terminateWithError($this->p->t('studierendenantrag', 'error_no_student'), self::ERROR_TYPE_GENERAL);
|
||||
elseif ($result == -3)
|
||||
$this->terminateWithError($this->p->t('studierendenantrag', 'error_stg_blacklist'), self::ERROR_TYPE_GENERAL);
|
||||
elseif ($result < 0)
|
||||
$this->terminateWithError($this->p->t('studierendenantrag', 'error_antrag_exists'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$result = $this->antraglib->createAbmeldung($prestudent_id, $studiensemester, getAuthUID(), $grund);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$result = $this->antraglib->getDetailsForAntrag($data);
|
||||
if (!hasData($result))
|
||||
return $this->terminateWithSuccess(true);
|
||||
|
||||
$data = getData($result);
|
||||
$data->canCancel = (boolean)$this->antraglib->isEntitledToCancelAntrag($data->studierendenantrag_id);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function cancelAntrag()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules('antrag_id', 'Antrag ID', 'required');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$antrag_id = $this->input->post('antrag_id');
|
||||
|
||||
if (!$this->antraglib->isEntitledToCancelAntrag($antrag_id))
|
||||
$this->terminateWithError('Forbidden', self::ERROR_TYPE_AUTH, REST_Controller::HTTP_FORBIDDEN);
|
||||
|
||||
$result = $this->antraglib->cancelAntrag($antrag_id, getAuthUID());
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
$result = $this->antraglib->getDetailsForAntrag($antrag_id);
|
||||
if (!hasData($result))
|
||||
$this->terminateWithSuccess($antrag_id);
|
||||
|
||||
$data = getData($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,428 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* 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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use \stdClass as stdClass;
|
||||
use \Studierendenantrag_model as Studierendenantrag_model;
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (GUI) and the AntragLib (back-end)
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
*/
|
||||
class Leitung extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Calls the parent's constructor and loads the AntragLib
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getActiveStgs' => ['student/antragfreigabe:r', 'student/studierendenantrag:r'],
|
||||
'getAntraege' => ['student/antragfreigabe:r', 'student/studierendenantrag:r'],
|
||||
'getHistory' => ['student/antragfreigabe:r', 'student/studierendenantrag:r'],
|
||||
'getPrestudents' => 'student/studierendenantrag:w',
|
||||
'approveAntrag' => 'student/antragfreigabe:w',
|
||||
'rejectAntrag' => 'student/antragfreigabe:w',
|
||||
'reopenAntrag' => 'student/studierendenantrag:w',
|
||||
'pauseAntrag' => ['student/antragfreigabe:w', 'student/studierendenantrag:w'],
|
||||
'unpauseAntrag' => ['student/antragfreigabe:w', 'student/studierendenantrag:w'],
|
||||
'objectAntrag' => ['student/antragfreigabe:w', 'student/studierendenantrag:w'],
|
||||
'approveObjection' => ['student/antragfreigabe:w', 'student/studierendenantrag:w'],
|
||||
'denyObjection' => ['student/antragfreigabe:w', 'student/studierendenantrag:w']
|
||||
]);
|
||||
|
||||
// Libraries
|
||||
$this->load->library('AntragLib');
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'studierendenantrag'
|
||||
]);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
public function getActiveStgs()
|
||||
{
|
||||
$studiengaenge = $this->permissionlib->getSTG_isEntitledFor('student/antragfreigabe') ?: [];
|
||||
$studiengaenge = array_merge($studiengaenge, $this->permissionlib->getSTG_isEntitledFor('student/studierendenantrag') ?: []);
|
||||
|
||||
$result = $this->StudierendenantragModel->loadStgsWithAntraege($studiengaenge);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getAntraege($studiengang = null, $extra = null)
|
||||
{
|
||||
if ($studiengang && $studiengang == 'todo') {
|
||||
$studiengang = $extra;
|
||||
$extra = true;
|
||||
} else {
|
||||
$extra = false;
|
||||
}
|
||||
|
||||
$studiengaenge = $this->permissionlib->getSTG_isEntitledFor('student/antragfreigabe');
|
||||
if(!is_array($studiengaenge))
|
||||
$studiengaenge = [];
|
||||
|
||||
|
||||
$stgsNeuanlage = $this->permissionlib->getSTG_isEntitledFor('student/studierendenantrag');
|
||||
if(!is_array($stgsNeuanlage))
|
||||
$stgsNeuanlage = [];
|
||||
|
||||
$studiengaenge = array_unique(array_merge($studiengaenge, $stgsNeuanlage));
|
||||
|
||||
if ($studiengang) {
|
||||
if (!in_array($studiengang, $studiengaenge))
|
||||
$this->terminateWithError(
|
||||
'Forbidden',
|
||||
self::ERROR_TYPE_AUTH,
|
||||
REST_Controller::HTTP_FORBIDDEN
|
||||
);
|
||||
$studiengaenge = [$studiengang];
|
||||
}
|
||||
|
||||
$antraege = [];
|
||||
if ($studiengaenge) {
|
||||
$result = $extra
|
||||
? $this->StudierendenantragModel->loadActiveForStudiengaenge($studiengaenge)
|
||||
: $this->StudierendenantragModel->loadForStudiengaenge($studiengaenge);
|
||||
|
||||
$antraege = $this->getDataOrTerminateWithError($result);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess($antraege ?: []);
|
||||
}
|
||||
|
||||
public function getHistory($studierendenantrag_id)
|
||||
{
|
||||
if (!$this->antraglib->isEntitledToSeeHistoryForAntrag($studierendenantrag_id))
|
||||
$this->terminateWithError(
|
||||
'Forbidden',
|
||||
self::ERROR_TYPE_AUTH,
|
||||
REST_Controller::HTTP_FORBIDDEN
|
||||
);
|
||||
|
||||
$result = $this->antraglib->getAntragHistory($studierendenantrag_id);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data ?: []);
|
||||
}
|
||||
|
||||
public function getPrestudents()
|
||||
{
|
||||
$query = $this->input->post('query');
|
||||
|
||||
$studiengaenge = $this->permissionlib->getSTG_isEntitledFor('student/studierendenantrag');
|
||||
|
||||
$result = $this->antraglib->getAktivePrestudentenInStgs($studiengaenge, $query);
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess($result ?: []);
|
||||
}
|
||||
|
||||
public function approveAntrag()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'studierendenantrag_id',
|
||||
'Studierenden Antrag',
|
||||
[
|
||||
'required',
|
||||
['isEntitledToApproveAntrag', [$this->antraglib, 'isEntitledToApproveAntrag']],
|
||||
],
|
||||
[
|
||||
'isEntitledToApproveAntrag' => $this->p->t('studierendenantrag', 'error_no_right')
|
||||
]
|
||||
);
|
||||
$this->form_validation->set_rules(
|
||||
'typ',
|
||||
'Typ',
|
||||
'required|in_list[' . implode(',', [
|
||||
Studierendenantrag_model::TYP_ABMELDUNG,
|
||||
Studierendenantrag_model::TYP_ABMELDUNG_STGL,
|
||||
Studierendenantrag_model::TYP_UNTERBRECHUNG,
|
||||
Studierendenantrag_model::TYP_WIEDERHOLUNG
|
||||
]) . ']'
|
||||
);
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
|
||||
switch ($this->input->post('typ')) {
|
||||
case Studierendenantrag_model::TYP_ABMELDUNG:
|
||||
case Studierendenantrag_model::TYP_ABMELDUNG_STGL:
|
||||
$result = $this->antraglib->approveAbmeldung([$studierendenantrag_id], getAuthUID());
|
||||
break;
|
||||
case Studierendenantrag_model::TYP_UNTERBRECHUNG:
|
||||
$result = $this->antraglib->approveUnterbrechung([$studierendenantrag_id], getAuthUID());
|
||||
break;
|
||||
case Studierendenantrag_model::TYP_WIEDERHOLUNG:
|
||||
$result = $this->antraglib->approveWiederholung($studierendenantrag_id, getAuthUID());
|
||||
break;
|
||||
}
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function rejectAntrag()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'studierendenantrag_id',
|
||||
'Studierenden Antrag',
|
||||
[
|
||||
'required',
|
||||
['isEntitledToRejectAntrag', [$this->antraglib, 'isEntitledToRejectAntrag']],
|
||||
],
|
||||
[
|
||||
'isEntitledToRejectAntrag' => $this->p->t('studierendenantrag', 'error_no_right')
|
||||
]
|
||||
);
|
||||
$this->form_validation->set_rules('grund', 'Grund', 'required');
|
||||
$this->form_validation->set_rules(
|
||||
'typ',
|
||||
'Typ',
|
||||
'required|in_list[' . implode(',', [
|
||||
Studierendenantrag_model::TYP_UNTERBRECHUNG
|
||||
]) . ']'
|
||||
);
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
|
||||
$grund = $this->input->post('grund');
|
||||
|
||||
$result = $this->antraglib->rejectUnterbrechung([$studierendenantrag_id], getAuthUID(), $grund);
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function reopenAntrag()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'studierendenantrag_id',
|
||||
'Studierenden Antrag',
|
||||
[
|
||||
'required',
|
||||
['isEntitledToReopenAntrag', [$this->antraglib, 'isEntitledToReopenAntrag']],
|
||||
],
|
||||
[
|
||||
'isEntitledToReopenAntrag' => $this->p->t('studierendenantrag', 'error_no_right')
|
||||
]
|
||||
);
|
||||
$this->form_validation->set_rules(
|
||||
'typ',
|
||||
'Typ',
|
||||
'required|in_list[' . implode(',', [
|
||||
Studierendenantrag_model::TYP_WIEDERHOLUNG
|
||||
]) . ']'
|
||||
);
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
|
||||
|
||||
$result = $this->antraglib->reopenWiederholung($studierendenantrag_id, getAuthUID());
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function pauseAntrag()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'studierendenantrag_id',
|
||||
'Studierenden Antrag',
|
||||
[
|
||||
'required',
|
||||
['isEntitledToPauseAntrag', [$this->antraglib, 'isEntitledToPauseAntrag']],
|
||||
['antragCanBeManualPaused', [$this->antraglib, 'antragCanBeManualPaused']]
|
||||
],
|
||||
[
|
||||
'isEntitledToPauseAntrag' => $this->p->t('studierendenantrag', 'error_no_right'),
|
||||
'antragCanBeManualPaused' => $this->p->t(
|
||||
'studierendenantrag',
|
||||
'error_not_pauseable',
|
||||
['id' => $this->input->post('studierendenantrag_id')]
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
|
||||
|
||||
$result = $this->antraglib->pauseAntrag($studierendenantrag_id, getAuthUID());
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function unpauseAntrag()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'studierendenantrag_id',
|
||||
'Studierenden Antrag',
|
||||
[
|
||||
'required',
|
||||
['isEntitledToUnpauseAntrag', [$this->antraglib, 'isEntitledToUnpauseAntrag']],
|
||||
['antragCanBeManualUnpaused', [$this->antraglib, 'antragCanBeManualUnpaused']]
|
||||
],
|
||||
[
|
||||
'isEntitledToUnpauseAntrag' => $this->p->t('studierendenantrag', 'error_no_right'),
|
||||
'antragCanBeManualUnpaused' => $this->p->t(
|
||||
'studierendenantrag',
|
||||
'error_not_paused',
|
||||
['id' => $this->input->post('studierendenantrag_id')]
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
|
||||
|
||||
$result = $this->antraglib->unpauseAntrag($studierendenantrag_id, getAuthUID());
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function objectAntrag()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'studierendenantrag_id',
|
||||
'Studierenden Antrag',
|
||||
[
|
||||
'required',
|
||||
['isEntitledToObjectAntrag', [$this->antraglib, 'isEntitledToObjectAntrag']],
|
||||
['canBeObjected', function ($a) {
|
||||
return $this->antraglib->hasType($a, Studierendenantrag_model::TYP_ABMELDUNG_STGL);
|
||||
}]
|
||||
],
|
||||
[
|
||||
'isEntitledToObjectAntrag' => $this->p->t('studierendenantrag', 'error_no_right'),
|
||||
'canBeObjected' => $this->p->t(
|
||||
'studierendenantrag',
|
||||
'error_no_objection'
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
|
||||
|
||||
$result = $this->antraglib->objectAbmeldung($studierendenantrag_id, getAuthUID());
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function approveObjection()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'studierendenantrag_id',
|
||||
'Studierenden Antrag',
|
||||
[
|
||||
'required',
|
||||
['isEntitledToObjectAntrag', [$this->antraglib, 'isEntitledToObjectAntrag']],
|
||||
['isObjected', function ($a) {
|
||||
return $this->antraglib->hasStatus($a, Studierendenantragstatus_model::STATUS_OBJECTED);
|
||||
}]
|
||||
],
|
||||
[
|
||||
'isEntitledToObjectAntrag' => $this->p->t('studierendenantrag', 'error_no_right'),
|
||||
'isObjected' => $this->p->t(
|
||||
'studierendenantrag',
|
||||
'error_not_objected'
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
|
||||
|
||||
$result = $this->antraglib->cancelAntrag($studierendenantrag_id, getAuthUID());
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function denyObjection()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'studierendenantrag_id',
|
||||
'Studierenden Antrag',
|
||||
[
|
||||
'required',
|
||||
['isEntitledToObjectAntrag', [$this->antraglib, 'isEntitledToObjectAntrag']],
|
||||
['isObjected', function ($a) {
|
||||
return $this->antraglib->hasStatus($a, Studierendenantragstatus_model::STATUS_OBJECTED);
|
||||
}]
|
||||
],
|
||||
[
|
||||
'isEntitledToObjectAntrag' => $this->p->t('studierendenantrag', 'error_no_right'),
|
||||
'isObjected' => $this->p->t(
|
||||
'studierendenantrag',
|
||||
'error_not_objected'
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
|
||||
$grund = $this->input->post('grund');
|
||||
|
||||
$result = $this->antraglib->denyObjectionAbmeldung($studierendenantrag_id, getAuthUID(), $grund);
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess($studierendenantrag_id);
|
||||
}
|
||||
}
|
||||
+88
-95
@@ -1,4 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* 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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
@@ -6,23 +22,28 @@ use \Studierendenantrag_model as Studierendenantrag_model;
|
||||
use \DateTime as DateTime;
|
||||
|
||||
/**
|
||||
*
|
||||
* This controller operates between (interface) the JS (GUI) and the AntragLib (back-end)
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
*/
|
||||
class Unterbrechung extends FHC_Controller
|
||||
class Unterbrechung extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Calls the parent's constructor and loads the FilterCmptLib
|
||||
* Calls the parent's constructor and loads the AntragLib
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct([
|
||||
'getDetailsForNewAntrag' => self::PERM_LOGGED,
|
||||
'getDetailsForAntrag' => self::PERM_LOGGED,
|
||||
'createAntrag' => self::PERM_LOGGED,
|
||||
'cancelAntrag' => self::PERM_LOGGED
|
||||
]);
|
||||
|
||||
// Configs
|
||||
$this->load->config('studierendenantrag');
|
||||
|
||||
// Libraries
|
||||
$this->load->library('AuthLib');
|
||||
$this->load->library('AntragLib');
|
||||
|
||||
// Load language phrases
|
||||
@@ -38,74 +59,62 @@ class Unterbrechung extends FHC_Controller
|
||||
|
||||
public function getDetailsForNewAntrag($prestudent_id)
|
||||
{
|
||||
if (!$this->antraglib->isEntitledToCreateAntragFor($prestudent_id, false)) {
|
||||
$this->output->set_status_header(403);
|
||||
return $this->outputJsonError('Forbidden');
|
||||
}
|
||||
if (!$this->antraglib->isEntitledToCreateAntragFor($prestudent_id, false))
|
||||
$this->terminateWithError('Forbidden', self::ERROR_TYPE_AUTH, REST_Controller::HTTP_FORBIDDEN);
|
||||
|
||||
$result = $this->antraglib->getPrestudentUnterbrechungsBerechtigt($prestudent_id);
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(500);
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
$result = $result->retval;
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if (!$result) {
|
||||
$this->output->set_status_header(403);
|
||||
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_no_student'));
|
||||
}
|
||||
elseif ($result == -1)
|
||||
{
|
||||
$this->terminateWithError(
|
||||
$this->p->t('studierendenantrag', 'error_no_student'),
|
||||
self::ERROR_TYPE_AUTH,
|
||||
REST_Controller::HTTP_FORBIDDEN
|
||||
);
|
||||
} elseif ($result == -1) {
|
||||
$result = $this->antraglib->getDetailsForLastAntrag($prestudent_id, Studierendenantrag_model::TYP_UNTERBRECHUNG);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->outputJsonSuccess(getData($result));
|
||||
}
|
||||
elseif ($result == -2)
|
||||
{
|
||||
return $this->terminateWithSuccess($data);
|
||||
} elseif ($result == -2) {
|
||||
$result = $this->antraglib->getDetailsForLastAntrag($prestudent_id);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
|
||||
$result = getData($result);
|
||||
$this->output->set_status_header(400);
|
||||
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_antrag_pending', [
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithError($this->p->t('studierendenantrag', 'error_antrag_pending', [
|
||||
'typ' => $this->p->t('studierendenantrag', 'antrag_typ_' . $result->typ)
|
||||
]));
|
||||
} elseif ($result == -3) {
|
||||
$this->terminateWithError(
|
||||
$this->p->t('studierendenantrag', 'error_stg_blacklist'),
|
||||
self::ERROR_TYPE_AUTH,
|
||||
REST_Controller::HTTP_FORBIDDEN
|
||||
);
|
||||
}
|
||||
elseif ($result == -3)
|
||||
{
|
||||
$this->output->set_status_header(403);
|
||||
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_stg_blacklist'));
|
||||
}
|
||||
|
||||
$result = $this->antraglib->getDetailsForNewAntrag($prestudent_id);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
|
||||
$data = getData($result);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$data->studiensemester = $this->antraglib->getSemesterForUnterbrechung($data->studiensemester_kurzbz);
|
||||
$data->studiensemester = $this->antraglib->getSemesterForUnterbrechung($prestudent_id, null);
|
||||
|
||||
$this->outputJsonSuccess($data);
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getDetailsForAntrag($studierendenantrag_id)
|
||||
{
|
||||
if (!$this->antraglib->isEntitledToShowAntrag($studierendenantrag_id)) return show_404();
|
||||
if (!$this->antraglib->isEntitledToShowAntrag($studierendenantrag_id))
|
||||
return show_404();
|
||||
|
||||
$result = $this->antraglib->getDetailsForAntrag($studierendenantrag_id);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
|
||||
$data = getData($result);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if ($data->typ !== Studierendenantrag_model::TYP_UNTERBRECHUNG)
|
||||
return show_404();
|
||||
|
||||
$this->outputJsonSuccess($data);
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function createAntrag()
|
||||
@@ -125,9 +134,8 @@ class Unterbrechung extends FHC_Controller
|
||||
]
|
||||
);
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
return $this->outputJsonError($this->form_validation->error_array());
|
||||
if (!$this->form_validation->run()) {
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$grund = $this->input->post('grund');
|
||||
@@ -136,26 +144,18 @@ class Unterbrechung extends FHC_Controller
|
||||
$datum_wiedereinstieg = $this->input->post('datum_wiedereinstieg');
|
||||
$dms_id = null;
|
||||
|
||||
$result = $this->antraglib->getPrestudentUnterbrechungsBerechtigt($prestudent_id);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(['db' => getError($result)]);
|
||||
}
|
||||
$result = $result->retval;
|
||||
if (!$result)
|
||||
{
|
||||
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_no_student')]);
|
||||
}
|
||||
elseif ($result == -3)
|
||||
{
|
||||
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_stg_blacklist')]);
|
||||
}
|
||||
elseif ($result < 0)
|
||||
{
|
||||
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_antrag_exists')]);
|
||||
}
|
||||
$result = $this->antraglib->getPrestudentUnterbrechungsBerechtigt($prestudent_id, $studiensemester, $datum_wiedereinstieg);
|
||||
|
||||
if(isset($_FILES['attachment']) && (!isset($_FILES['attachment']['error']) || $_FILES['attachment']['error'] != UPLOAD_ERR_NO_FILE))
|
||||
{
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if (!$result)
|
||||
$this->terminateWithError($this->p->t('studierendenantrag', 'error_no_student'), self::ERROR_TYPE_GENERAL);
|
||||
elseif ($result == -3)
|
||||
$this->terminateWithError($this->p->t('studierendenantrag', 'error_stg_blacklist'), self::ERROR_TYPE_GENERAL);
|
||||
elseif ($result < 0)
|
||||
$this->terminateWithError($this->p->t('studierendenantrag', 'error_antrag_exists'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
if (isset($_FILES['attachment']) && (!isset($_FILES['attachment']['error']) || $_FILES['attachment']['error'] != UPLOAD_ERR_NO_FILE)) {
|
||||
$this->load->library('DmsLib');
|
||||
|
||||
$dms = $this->config->item('unterbrechung_dms');
|
||||
@@ -167,53 +167,46 @@ class Unterbrechung extends FHC_Controller
|
||||
|
||||
$allowed_filetypes = $this->config->item('unterbrechung_dms_filetypes') ?: ['*'];
|
||||
$result = $this->dmslib->upload($dms, 'attachment', $allowed_filetypes);
|
||||
if(isError($result))
|
||||
{
|
||||
return $this->outputJsonError(['db' => getError($result)]);
|
||||
}
|
||||
$dms_id = getData($result)['dms_id'];
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$dms_id = $data['dms_id'];
|
||||
}
|
||||
|
||||
$result = $this->antraglib->createUnterbrechung($prestudent_id, $studiensemester, getAuthUID(), $grund, $datum_wiedereinstieg, $dms_id);
|
||||
if(isError($result))
|
||||
{
|
||||
return $this->outputJsonError(['db' => getError($result)]);
|
||||
}
|
||||
|
||||
$antragId = getData($result);
|
||||
$antragId = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$result = $this->antraglib->getDetailsForAntrag($antragId);
|
||||
|
||||
if(!hasData($result))
|
||||
return $this->outputJsonSuccess($antragId);
|
||||
$this->outputJsonSuccess(getData($result));
|
||||
if (!hasData($result))
|
||||
$this->terminateWithSuccess($antragId);
|
||||
|
||||
$this->terminateWithSuccess(getData($result));
|
||||
}
|
||||
|
||||
public function cancelAntrag()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$_POST = json_decode($this->input->raw_input_stream, true);
|
||||
|
||||
$this->form_validation->set_rules('antrag_id', 'Antrag ID', 'required');
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
return $this->outputJsonError($this->form_validation->error_array());
|
||||
if (!$this->form_validation->run()) {
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$antrag_id = $this->input->post('antrag_id');
|
||||
|
||||
$result = $this->antraglib->cancelAntrag($antrag_id, getAuthUID());
|
||||
if (isError($result))
|
||||
{
|
||||
return $this->outputJsonError(['db' => getError($result)]);
|
||||
}
|
||||
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
$result = $this->antraglib->getDetailsForAntrag($antrag_id);
|
||||
|
||||
if (!hasData($result))
|
||||
return $this->outputJsonSuccess($antrag_id);
|
||||
$this->outputJsonSuccess(getData($result));
|
||||
return $this->terminateWithSuccess($antrag_id);
|
||||
|
||||
$this->terminateWithSuccess(getData($result));
|
||||
}
|
||||
|
||||
public function isValidDate($date)
|
||||
@@ -0,0 +1,258 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* 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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use \REST_Controller as REST_Controller;
|
||||
use \Studierendenantragstatus_model as Studierendenantragstatus_model;
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (GUI) and the AntragLib (back-end)
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
*/
|
||||
class Wiederholung extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Calls the parent's constructor and loads the FilterCmptLib
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getDetailsForNewAntrag' => self::PERM_LOGGED,
|
||||
'createAntrag' => self::PERM_LOGGED,
|
||||
'cancelAntrag' => self::PERM_LOGGED,
|
||||
'getLvs' => self::PERM_LOGGED,
|
||||
'saveLvs' => ['student/studierendenantrag:w']
|
||||
]);
|
||||
|
||||
// Libraries
|
||||
$this->load->library('AntragLib');
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'global',
|
||||
'studierendenantrag'
|
||||
]);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Retrieves data of the current studiengang for the current user
|
||||
*/
|
||||
|
||||
public function getDetailsForNewAntrag($prestudent_id)
|
||||
{
|
||||
if (!$this->antraglib->isEntitledToCreateAntragFor($prestudent_id, false))
|
||||
$this->terminateWithError('Forbidden', self::ERROR_TYPE_AUTH, REST_Controller::HTTP_FORBIDDEN);
|
||||
|
||||
$result = $this->antraglib->getPrestudentWiederholungsBerechtigt($prestudent_id);
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if (!$result) {
|
||||
$this->terminateWithError(
|
||||
$this->p->t('studierendenantrag', 'error_no_student_no_failed_exam'),
|
||||
self::ERROR_TYPE_AUTH,
|
||||
REST_Controller::HTTP_FORBIDDEN
|
||||
);
|
||||
} elseif ($result == -1) {
|
||||
$result = $this->antraglib->getDetailsForLastAntrag($prestudent_id, Studierendenantrag_model::TYP_WIEDERHOLUNG);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$result = $this->antraglib->getFailedExamForPrestudent($prestudent_id, $data->datum, $data->studiensemester_kurzbz);
|
||||
// NOTE(chris): error handling for this function should already happenden in antraglib->getPrestudentWiederholungsBerechtigt()
|
||||
$pruefungsdata = current(getData($result));
|
||||
|
||||
$data->studiensemester_kurzbz = $pruefungsdata->studiensemester_kurzbz;
|
||||
$data->lvbezeichnung = $pruefungsdata->lvbezeichnung;
|
||||
$data->pruefungsdatum = $pruefungsdata->datum;
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
} elseif ($result == -2) {
|
||||
$result = $this->antraglib->getDetailsForLastAntrag($prestudent_id);
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithError(
|
||||
$this->p->t('studierendenantrag', 'error_antrag_pending', [
|
||||
'typ' => $this->p->t('studierendenantrag', 'antrag_typ_' . $result->typ)
|
||||
]),
|
||||
self::ERROR_TYPE_GENERAL,
|
||||
REST_Controller::HTTP_BAD_REQUEST
|
||||
);
|
||||
} elseif ($result == -3) {
|
||||
$this->terminateWithError(
|
||||
$this->p->t('studierendenantrag', 'error_stg_blacklist'),
|
||||
self::ERROR_TYPE_GENERAL,
|
||||
REST_Controller::HTTP_BAD_REQUEST
|
||||
);
|
||||
}
|
||||
|
||||
$result = $this->antraglib->getDetailsForNewAntrag($prestudent_id);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$result = $this->antraglib->getFailedExamForPrestudent($prestudent_id);
|
||||
// NOTE(chris): error handling for this function should already happenden in antraglib->getPrestudentWiederholungsBerechtigt()
|
||||
$pruefungsdata = current(getData($result));
|
||||
|
||||
$data->studiensemester_kurzbz = $pruefungsdata->studiensemester_kurzbz;
|
||||
$data->lvbezeichnung = $pruefungsdata->lvbezeichnung;
|
||||
$data->pruefungsdatum = $pruefungsdata->datum;
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function createAntrag()
|
||||
{
|
||||
$this->createAntragWithStatus(true);
|
||||
}
|
||||
|
||||
public function cancelAntrag()
|
||||
{
|
||||
$this->createAntragWithStatus(false);
|
||||
}
|
||||
|
||||
protected function createAntragWithStatus($repeat)
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules('prestudent_id', 'Prestudent ID', 'required');
|
||||
$this->form_validation->set_rules('studiensemester', 'Studiensemester', 'required');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$prestudent_id = $this->input->post('prestudent_id');
|
||||
$studiensemester = $this->input->post('studiensemester');
|
||||
|
||||
$result = $this->antraglib->getPrestudentWiederholungsBerechtigt($prestudent_id);
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if (!$result) {
|
||||
$this->terminateWithError($this->p->t('studierendenantrag', 'error_no_student'), self::ERROR_TYPE_GENERAL);
|
||||
} elseif ($result == -1) {
|
||||
$result = $this->PrestudentstatusModel->getLastStatus($prestudent_id);
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
if (!$result)
|
||||
$this->terminateWithError($this->p->t('studierendenantrag', 'error_no_prestudentstatus', [
|
||||
'prestudent_id' => $prestudent_id
|
||||
]), self::ERROR_TYPE_GENERAL);
|
||||
if (!in_array(current($result)->status_kurzbz, $this->config->item('antrag_prestudentstatus_whitelist')))
|
||||
$this->terminateWithError($this->p->t('studierendenantrag', 'error_no_student'), self::ERROR_TYPE_GENERAL);
|
||||
} elseif ($result == -2) {
|
||||
$this->terminateWithError($this->p->t('studierendenantrag', 'error_antrag_exists'), self::ERROR_TYPE_GENERAL);
|
||||
} elseif ($result == -3) {
|
||||
$this->terminateWithError($this->p->t('studierendenantrag', 'error_stg_blacklist'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$result = $this->antraglib->createWiederholung($prestudent_id, $studiensemester, getAuthUID(), $repeat);
|
||||
$antragId = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$result = $this->antraglib->getDetailsForAntrag($antragId);
|
||||
|
||||
if (!hasData($result))
|
||||
$this->terminateWithSuccess(true);
|
||||
|
||||
$data = getData($result);
|
||||
|
||||
$result = $this->antraglib->getFailedExamForPrestudent($prestudent_id);
|
||||
// NOTE(chris): error handling for this function should already happenden in antraglib->getPrestudentWiederholungsBerechtigt()
|
||||
$pruefungsdata = current(getData($result));
|
||||
|
||||
$data->studiensemester_kurzbz = $pruefungsdata->studiensemester_kurzbz;
|
||||
$data->lvbezeichnung = $pruefungsdata->lvbezeichnung;
|
||||
$data->pruefungsdatum = $pruefungsdata->datum;
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
|
||||
public function getLvs($antrag_id)
|
||||
{
|
||||
$result = $this->antraglib->getLvsForAntrag($antrag_id);
|
||||
if (isError($result)) {
|
||||
$error = getError($result);
|
||||
if ($error == 'Forbidden')
|
||||
$this->terminateWithError(
|
||||
$error,
|
||||
self::ERROR_TYPE_AUTH,
|
||||
REST_Controller::HTTP_FORBIDDEN
|
||||
);
|
||||
$this->terminateWithError(
|
||||
$error,
|
||||
self::ERROR_TYPE_GENERAL
|
||||
);
|
||||
}
|
||||
$lvs = getData($result);
|
||||
|
||||
$this->terminateWithSuccess($lvs);
|
||||
}
|
||||
|
||||
public function saveLvs()
|
||||
{
|
||||
$forbiddenLvs = $this->input->post('forbiddenLvs');
|
||||
$mandatoryLvs = $this->input->post('mandatoryLvs');
|
||||
$antragsLvs = array_merge($forbiddenLvs, $mandatoryLvs);
|
||||
|
||||
if (!$antragsLvs)
|
||||
$this->terminateWithError($this->p->t('studierendenantrag', 'error_no_lv'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$insert = array_map(function ($lv) {
|
||||
return [
|
||||
'studierendenantrag_id' => $lv['studierendenantrag_id'],
|
||||
'lehrveranstaltung_id' => $lv['lehrveranstaltung_id'],
|
||||
'note' => $lv['zugelassen']
|
||||
? ($lv['zugelassen'] == 1 ? 0 : $this->config->item('wiederholung_note_angerechnet'))
|
||||
: $this->config->item('wiederholung_note_nicht_zugelassen'),
|
||||
'anmerkung' => $lv['anmerkung'],
|
||||
'insertvon' => getAuthUID(),
|
||||
'studiensemester_kurzbz' => $lv['studiensemester_kurzbz']
|
||||
];
|
||||
}, $antragsLvs);
|
||||
|
||||
$antrag_ids = array_unique(array_map(function ($lv) {
|
||||
return $lv['studierendenantrag_id'];
|
||||
}, $insert));
|
||||
|
||||
foreach ($antrag_ids as $antrag_id) {
|
||||
$result = $this->StudierendenantragModel->loadIdAndStatusWhere([
|
||||
'studierendenantrag_id' => $antrag_id
|
||||
]);
|
||||
$antrag = $this->getDataOrTerminateWithError($result);
|
||||
if (!$antrag)
|
||||
$this->terminateWithError(
|
||||
$this->p->t('studierendenantrag', 'error_no_antrag_found', ['id' => $antrag_id]),
|
||||
self::ERROR_TYPE_GENERAL
|
||||
);
|
||||
$antrag = current($antrag);
|
||||
|
||||
if ($antrag->status != Studierendenantragstatus_model::STATUS_CREATED
|
||||
&& $antrag->status != Studierendenantragstatus_model::STATUS_LVSASSIGNED)
|
||||
$this->terminateWithError(
|
||||
$this->p->t('studierendenantrag', 'error_antrag_locked'),
|
||||
self::ERROR_TYPE_GENERAL
|
||||
);
|
||||
}
|
||||
|
||||
$result = $this->antraglib->saveLvs($insert);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
* NOTE: extends the FHC_Controller instead of the Auth_Controller because the FilterCmpt has its
|
||||
* own permissions check
|
||||
* TODO(chris): deprecated
|
||||
*/
|
||||
class Filter extends FHC_Controller
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
* TODO(chris): deprecated
|
||||
*/
|
||||
class Phrasen extends FHC_Controller
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
* TODO(chris): deprecated
|
||||
*/
|
||||
class SearchBar extends FHC_Controller
|
||||
{
|
||||
@@ -21,7 +21,7 @@ class SearchBar extends FHC_Controller
|
||||
// NOTE:
|
||||
// - A user must be authenticated via another controller to access this one
|
||||
// - It is loaded to be able to call the isLogged function later
|
||||
$this->load->library('AuthLib', array(false));
|
||||
$this->load->library('AuthLib');
|
||||
|
||||
// Load the library SearchBarLib
|
||||
$this->load->library('SearchBarLib');
|
||||
|
||||
@@ -19,6 +19,8 @@ class AntragJob extends JOB_Controller
|
||||
// Loads SanchoHelper
|
||||
$this->load->helper('hlp_sancho_helper');
|
||||
|
||||
$this->load->library('AntragLib');
|
||||
|
||||
// Load Model
|
||||
$this->load->model('education/Studierendenantrag_model', 'StudierendenantragModel');
|
||||
$this->load->model('education/Studierendenantragstatus_model', 'StudierendenantragstatusModel');
|
||||
@@ -172,7 +174,16 @@ class AntragJob extends JOB_Controller
|
||||
$cc = $leitung['Details']->email;
|
||||
|
||||
// NOTE(chris): Sancho mail
|
||||
if (sendSanchoMail("Sancho_Mail_Antrag_Stgl", $data, $to, 'Anträge - Aktion(en) erforderlich', DEFAULT_SANCHO_HEADER_IMG, DEFAULT_SANCHO_FOOTER_IMG, '', $cc))
|
||||
if (sendSanchoMail(
|
||||
"Sancho_Mail_Antrag_Stgl",
|
||||
$data,
|
||||
$to,
|
||||
'Anträge - Aktion(en) erforderlich',
|
||||
DEFAULT_SANCHO_HEADER_IMG,
|
||||
DEFAULT_SANCHO_FOOTER_IMG,
|
||||
'',
|
||||
$cc
|
||||
))
|
||||
$count++;
|
||||
}
|
||||
|
||||
@@ -316,12 +327,52 @@ class AntragJob extends JOB_Controller
|
||||
} else {
|
||||
$deregisterStatus = getData($result);
|
||||
|
||||
$result = $this->antraglib->pauseAntrag(
|
||||
$prestudent->studierendenantrag_id,
|
||||
Studierendenantragstatus_model::INSERTVON_DEREGISTERED
|
||||
);
|
||||
if (isError($result))
|
||||
$this->logError(getError($result));
|
||||
|
||||
$result = $this->prestudentlib->setAbbrecher($prestudent->prestudent_id, '', $insertvon);
|
||||
if (isError($result)) {
|
||||
$this->StudierendenantragstatusModel->delete($deregisterStatus);
|
||||
$this->logError(getError($result));
|
||||
} else {
|
||||
$count++;
|
||||
|
||||
$datum_kp = new DateTime($prestudent->datum);
|
||||
$dataMail = array(
|
||||
'name'=> trim($prestudent->vorname . ' '. $prestudent->nachname),
|
||||
'vorname' => $prestudent->vorname,
|
||||
'nachname' => $prestudent->nachname,
|
||||
'pers_kz'=> $prestudent->matrikelnr,
|
||||
'stg' => $prestudent->bezeichnung,
|
||||
'lvbezeichnung' => $prestudent->lvbezeichnung,
|
||||
'datum_kp' => $datum_kp->format('d.m.Y'),
|
||||
'studiensemester'=> $prestudent->studiensemester_kurzbz,
|
||||
'Orgform'=> $prestudent->orgform,
|
||||
'prestudent_id' => $prestudent->prestudent_id,
|
||||
'fristablauf' => $dateDeadline->format('d.m.Y')
|
||||
);
|
||||
|
||||
$email = $this->StudentModel->getEmailFH($this->StudentModel->getUID($prestudent->prestudent_id));
|
||||
// Mail to Student
|
||||
if (!sendSanchoMail('Sancho_Mail_Antrag_W_DL_Stud', $dataMail, $email, 'Wiederholung: Frist abgelaufen')) {
|
||||
$this->logWarning("Failed to send Notification to " . $email);
|
||||
}
|
||||
|
||||
$result = $this->StudiengangModel->load($prestudent->studiengang_kz);
|
||||
if (!hasData($result)) {
|
||||
$this->logWarning('No Studiengang found');
|
||||
continue;
|
||||
}
|
||||
$studiengang = current(getData($result));
|
||||
$email = $studiengang->email;
|
||||
// Mail to Assistenz
|
||||
if (!sendSanchoMail('Sancho_Mail_Antrag_W_DL_Assist', $dataMail, $email, 'Wiederholung: Frist abgelaufen')) {
|
||||
$this->logWarning("Failed to send Notification to " . $email);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -339,8 +390,6 @@ class AntragJob extends JOB_Controller
|
||||
{
|
||||
$this->logInfo('Start Job handleAbmeldungenStglDeadline');
|
||||
|
||||
$this->load->library('AntragLib');
|
||||
|
||||
$insertvon = $this->config->item('antrag_job_systemuser');
|
||||
if (!$insertvon) {
|
||||
$this->logError('Config "antrag_job_systemuser" nicht gesetzt');
|
||||
@@ -364,7 +413,10 @@ class AntragJob extends JOB_Controller
|
||||
$this->StudierendenantragModel->addSelect('s.insertamum');
|
||||
$this->StudierendenantragModel->addSelect('s.insertvon');
|
||||
|
||||
$this->StudierendenantragModel->db->where_in('public.get_rolle_prestudent(prestudent_id, studiensemester_kurzbz)', $this->config->item('antrag_prestudentstatus_whitelist'));
|
||||
$this->StudierendenantragModel->db->where_in(
|
||||
'public.get_rolle_prestudent(prestudent_id, studiensemester_kurzbz)',
|
||||
$this->config->item('antrag_prestudentstatus_whitelist')
|
||||
);
|
||||
|
||||
$result = $this->StudierendenantragModel->getWithLastStatusWhere([
|
||||
'typ' => Studierendenantrag_model::TYP_ABMELDUNG_STGL,
|
||||
@@ -393,6 +445,10 @@ class AntragJob extends JOB_Controller
|
||||
else {
|
||||
$deregisterStatus = getData($result);
|
||||
|
||||
$result = $this->antraglib->pauseAntrag($antrag->studierendenantrag_id, Studierendenantragstatus_model::INSERTVON_DEREGISTERED);
|
||||
if (isError($result))
|
||||
$this->logError(getError($result));
|
||||
|
||||
$result = $this->prestudentlib->setAbbrecher(
|
||||
$antrag->prestudent_id,
|
||||
$antrag->studiensemester_kurzbz,
|
||||
@@ -438,7 +494,6 @@ class AntragJob extends JOB_Controller
|
||||
$this->logWarning("Failed to send Notification to " . $email);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
$this->logInfo($count . "/" . count($antraege) . " Students set to Abbrecher");
|
||||
@@ -569,12 +624,6 @@ class AntragJob extends JOB_Controller
|
||||
}
|
||||
}
|
||||
|
||||
$this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
|
||||
$result = $this->PrestudentstatusModel->loadLastWithStgDetails($prestudent->prestudent_id, $prestudent->studiensemester_kurzbz);
|
||||
if (hasData($result)) {
|
||||
$ausbildungssemester = current(getData($result))->semester;
|
||||
}
|
||||
|
||||
$dataMail = array(
|
||||
'name'=> trim($prestudent->vorname . ' '. $prestudent->nachname),
|
||||
'vorname' => $prestudent->vorname,
|
||||
@@ -591,7 +640,7 @@ class AntragJob extends JOB_Controller
|
||||
'fristablauf' => $fristende->format('d.m.Y'),
|
||||
'pre_wiederholer_sem' => $next_sem,
|
||||
'wiederholer_sem' => $sem_after_next_sem,
|
||||
'sem' => $ausbildungssemester
|
||||
'sem' => $prestudent->ausbildungssemester
|
||||
);
|
||||
|
||||
// NOTE(chris): Sancho mail
|
||||
|
||||
@@ -1023,7 +1023,7 @@ class ReihungstestJob extends JOB_Controller
|
||||
{
|
||||
$studiengang = $this->StudiengangModel->load($stg);
|
||||
$mailcontent = '';
|
||||
|
||||
$content = false;
|
||||
foreach ($orgform AS $art=>$value)
|
||||
{
|
||||
// Orgform nur dazu schreiben, wenn es mehr als Eine gibt
|
||||
@@ -1044,6 +1044,7 @@ class ReihungstestJob extends JOB_Controller
|
||||
$mailcontent .= '<tr><td style="font-family: verdana, sans-serif; border: 1px solid grey; padding: 3px">'.$bewerber.'</td></tr>';
|
||||
}
|
||||
$mailcontent .= '</tbody></table><br><br>';
|
||||
$content = true;
|
||||
}
|
||||
if (isset($value['AufnahmeHoeherePrio']) && !isEmptyArray($value['AufnahmeHoeherePrio']))
|
||||
{
|
||||
@@ -1058,6 +1059,7 @@ class ReihungstestJob extends JOB_Controller
|
||||
$mailcontent .= '<tr><td style="font-family: verdana, sans-serif; border: 1px solid grey; padding: 3px">'.$bewerber.'</td></tr>';
|
||||
}
|
||||
$mailcontent .= '</tbody></table>';
|
||||
$content = true;
|
||||
}
|
||||
if (isset($value['AbgewiesenHoeherePrio']) && !isEmptyArray($value['AbgewiesenHoeherePrio']))
|
||||
{
|
||||
@@ -1071,6 +1073,7 @@ class ReihungstestJob extends JOB_Controller
|
||||
$mailcontent .= '<tr><td style="font-family: verdana, sans-serif; border: 1px solid grey; padding: 3px">'.$bewerber.'</td></tr>';
|
||||
}
|
||||
$mailcontent .= '</tbody></table>';
|
||||
$content = true;
|
||||
}
|
||||
if ($bcc != '' && isset($value['AbgewiesenWeilBewerber']) && !isEmptyArray($value['AbgewiesenWeilBewerber']))
|
||||
{
|
||||
@@ -1085,13 +1088,14 @@ class ReihungstestJob extends JOB_Controller
|
||||
$mailcontent .= '<tr><td style="font-family: verdana, sans-serif; border: 1px solid grey; padding: 3px">'.$bewerber.'</td></tr>';
|
||||
}
|
||||
$mailcontent .= '</tbody></table>';
|
||||
$content = true;
|
||||
}
|
||||
}
|
||||
|
||||
$mailcontent_data_arr['table'] = $mailcontent;
|
||||
|
||||
// Send email in Sancho design
|
||||
if (!isEmptyString($mailcontent))
|
||||
if (!isEmptyString($mailcontent) && $content === true)
|
||||
{
|
||||
sendSanchoMail(
|
||||
'Sancho_ReihungstestteilnehmerJob',
|
||||
|
||||
@@ -677,4 +677,35 @@ class MigrateContract extends CLI_Controller
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Habilitation wird aus der Tabelle bis.tbl_bisverwendung in die Tabelle public.tbl_mitarbeiter uebernommen
|
||||
* Sofern die Person einmal in den Verwendungen eine habiliation eingetragen hat wird diese in den MA-Datensatz übernommen
|
||||
* Da es in der regel öfter vorkommt dass das hakerl vergessen wurde beim Vertragswechsel als dass die person die habiliation verliert.
|
||||
*/
|
||||
public function migrateHabilitation()
|
||||
{
|
||||
$this->load->model('ressource/Mitarbeiter_model','MitarbeiterModel');
|
||||
$db = new DB_Model();
|
||||
|
||||
$qry = "
|
||||
SELECT
|
||||
distinct mitarbeiter_uid
|
||||
FROM
|
||||
bis.tbl_bisverwendung
|
||||
WHERE
|
||||
habilitation=true";
|
||||
|
||||
$resultHabilitation = $db->execReadOnlyQuery($qry);
|
||||
|
||||
if (isSuccess($resultHabilitation) && hasData($resultHabilitation))
|
||||
{
|
||||
$habilitationen = getData($resultHabilitation);
|
||||
|
||||
foreach ($habilitationen as $row_habilitationen)
|
||||
{
|
||||
$this->MitarbeiterModel->update($row_habilitationen->mitarbeiter_uid, array('habilitation'=>true));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Job zur einmaligen Import der Gehälter
|
||||
*
|
||||
* Aufruf (Encode / im Filenmae mit %2F):
|
||||
* php index.ci.php system/MigrateSalary/import filename
|
||||
* php index.ci.php system/MigrateSalary/import filename
|
||||
*
|
||||
*/
|
||||
/*
|
||||
@@ -34,7 +34,7 @@ class MigrateSalary extends CLI_Controller
|
||||
$this->load->model('vertragsbestandteil/VertragsbestandteilStunden_model','VertragsbestandteilStundenModel');
|
||||
$this->load->model('vertragsbestandteil/VertragsbestandteilFreitext_model','VertragsbestandteilFreitextModel');
|
||||
$this->load->model('vertragsbestandteil/VertragsbestandteilFunktion_model','VertragsbestandteilFunktionModel');
|
||||
|
||||
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
@@ -45,7 +45,7 @@ class MigrateSalary extends CLI_Controller
|
||||
*/
|
||||
public function import($file)
|
||||
{
|
||||
|
||||
|
||||
// CSV Laden
|
||||
$file = urldecode($file);
|
||||
if($handle = fopen($file, "r"))
|
||||
@@ -108,8 +108,8 @@ class MigrateSalary extends CLI_Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($data[$i] != ''
|
||||
&& isset($gehaltsarr[$gehaltsindex]) && isset($gehaltsarr[$gehaltsindex]['betrag'])
|
||||
if ($data[$i] != ''
|
||||
&& isset($gehaltsarr[$gehaltsindex]) && isset($gehaltsarr[$gehaltsindex]['betrag'])
|
||||
&& $gehaltsarr[$gehaltsindex]['betrag'] == $data[$i])
|
||||
{
|
||||
// Gehalt bleibt gleich
|
||||
@@ -138,30 +138,31 @@ class MigrateSalary extends CLI_Controller
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$monat++;
|
||||
}
|
||||
|
||||
// Zeile zu Ende - Ende Datum setzen wenn nicht für alle Monate ein Eintrag vorhanden ist
|
||||
if($monat < count($monate) && isset($gehaltsarr[$gehaltsindex]))
|
||||
$gehaltsarr[$gehaltsindex]['ende'] == $monate[$monat-1];
|
||||
|
||||
$gehaltsarr[$gehaltsindex]['ende'] = $monate[$monat-1];
|
||||
|
||||
}
|
||||
$this->_saveGehalt($lastuser, $gehaltsarr);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ermittelt das passende Dienstverhaeltnis uns speichert den
|
||||
* Ermittelt das passende Dienstverhaeltnis uns speichert den
|
||||
* Gehaltsbestandteil
|
||||
*/
|
||||
private function _saveGehalt($uid, $gehaltsarr)
|
||||
{
|
||||
{
|
||||
$failed = false;
|
||||
$this->db->trans_begin();
|
||||
|
||||
foreach($gehaltsarr as $row_gehalt)
|
||||
{
|
||||
//var_dump($row_gehalt);
|
||||
$auszahlungen = 14;
|
||||
$dvid = '';
|
||||
$vbsid = '';
|
||||
@@ -171,16 +172,18 @@ class MigrateSalary extends CLI_Controller
|
||||
//DV und VBS Ermitteln
|
||||
$dv = $this->DienstverhaeltnisModel->getDVByPersonUID($uid, $this->OE_DEFAULT, $row_gehalt['beginn']);
|
||||
|
||||
if (!hasData($dv))
|
||||
// Wenn keiner gefunden wird oder mit Monatsersteln nur ein externer gefunden wird, weitersuchen ob im Monat noch ein
|
||||
// "richtiger" Vertrag startet
|
||||
if (!hasData($dv) || getData($dv)[0]->vertragsart_kurzbz='externerLehrender')
|
||||
{
|
||||
$date = new DateTime($row_gehalt['beginn']);
|
||||
$date->modify('last day of this month');
|
||||
$last_day_this_month = $date->format('Y-m-d');
|
||||
|
||||
// Wenn mit Monatsersten kein DV gefunden wird, wird stattdessen mit Monatsletzten gesucht um DVs zu finden
|
||||
// Wenn mit Monatsersten kein DV gefunden wird, wird stattdessen mit Monatsletzten gesucht um DVs zu finden
|
||||
// für Personen die erst später im Monat in ihr DV einsteigen
|
||||
$dv = $this->DienstverhaeltnisModel->getDVByPersonUID($uid, $this->OE_DEFAULT, $last_day_this_month);
|
||||
|
||||
$dv = $this->DienstverhaeltnisModel->getDVByPersonUIDOverlapping($uid, $this->OE_DEFAULT, $row_gehalt['beginn'], $last_day_this_month);
|
||||
|
||||
if (!hasData($dv))
|
||||
{
|
||||
echo "\nKein passendes DV gefunden für User ".$uid." und Datum ".$row_gehalt['beginn']." -> ROLLBACK\n";
|
||||
@@ -189,34 +192,53 @@ class MigrateSalary extends CLI_Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
// Gehaltsstart wird auf den Start des DV korrigiert wenn nicht der Monatserste
|
||||
$row_gehalt['beginn'] = getData($dv)[0]->von;
|
||||
$resultdata = getData($dv);
|
||||
foreach($resultdata as $dvdata)
|
||||
{
|
||||
// Externer DV wird in Monatsmitte zu echten DV - daher weitersuchen bei externenDVs da
|
||||
// diese sowieso kein Gehalt zugeordnet haben
|
||||
if($dvdata->vertragsart_kurzbz != 'externerLehrender')
|
||||
{
|
||||
$dvid = $dvdata->dienstverhaeltnis_id;
|
||||
// Gehaltsstart wird auf den Start des DV korrigiert wenn nicht der Monatserste
|
||||
// nur wenn das Beginndatum vor dem DV-Start liegt da sonst das Datum korrigiert wird
|
||||
// wenn der Vertragsbestandteil wechselt
|
||||
if($row_gehalt['beginn'] < $dvdata->von)
|
||||
$row_gehalt['beginn'] = $dvdata->von;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$resultdata = getData($dv);
|
||||
if (count($resultdata) !== 1)
|
||||
else
|
||||
{
|
||||
echo "Kein oder Mehrere DVs gefunden -> ROLLBACK";
|
||||
$resultdata = getData($dv);
|
||||
|
||||
if (count($resultdata) == 1)
|
||||
$dvid = $resultdata[0]->dienstverhaeltnis_id;
|
||||
}
|
||||
|
||||
if ($dvid == '')
|
||||
{
|
||||
echo "Kein oder mehrere DVs gefunden -> ROLLBACK";
|
||||
$failed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
$dvid = $resultdata[0]->dienstverhaeltnis_id;
|
||||
|
||||
$allin = $this->_isAllIn($dvid, $row_gehalt['beginn']);
|
||||
|
||||
$db = new DB_Model();
|
||||
|
||||
$resultVBS = $this->_getVBS($dvid, $row_gehalt['beginn']);
|
||||
|
||||
|
||||
if (hasData($resultVBS))
|
||||
{
|
||||
$vbsid = getData($resultVBS)[0]->vertragsbestandteil_id;
|
||||
$vbsbis = getData($resultVBS)[0]->bis;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Vertragsbestandteil wurde nicht gefunden -> ROLLBACK";
|
||||
echo "Vertragsbestandteil fuer $uid DV $dvid wurde nicht gefunden mit Beginn ".$row_gehalt['beginn']."-> ROLLBACK";
|
||||
$failed = true;
|
||||
break;
|
||||
}
|
||||
@@ -246,7 +268,7 @@ class MigrateSalary extends CLI_Controller
|
||||
);
|
||||
if (isset($row_gehalt['ende']) && $row_gehalt['ende']!='')
|
||||
$data['bis'] = $row_gehalt['ende'];
|
||||
|
||||
|
||||
$resultVBS = $this->VertragsbestandteilModel->Insert($data);
|
||||
if(!isSuccess($resultVBS))
|
||||
{
|
||||
@@ -286,7 +308,7 @@ class MigrateSalary extends CLI_Controller
|
||||
);
|
||||
if (isset($row_gehalt['ende']) && $row_gehalt['ende']!='')
|
||||
$data['bis'] = $row_gehalt['ende'];
|
||||
|
||||
|
||||
$resultVBS = $this->VertragsbestandteilModel->Insert($data);
|
||||
if(!isSuccess($resultVBS))
|
||||
{
|
||||
@@ -356,16 +378,24 @@ class MigrateSalary extends CLI_Controller
|
||||
$date->modify('last day of this month');
|
||||
$last_day_this_month = $date->format('Y-m-d');
|
||||
|
||||
// TODO: wenn das Dienstverhaeltnis in diesem Monat endet und nicht der Monatsletzte ist,
|
||||
// Wenn das Dienstverhaeltnis in diesem Monat endet und nicht der Monatsletzte ist,
|
||||
// dann muss hier das Ende Datum des DV stehen bzw das Ende
|
||||
// oder das Ende des VBS falls die Person in der Monatsmitte Stunden wechselt
|
||||
$data['bis'] = $last_day_this_month;
|
||||
|
||||
// Wenn der Vertragsbestandteil endet bevor das Gehalt endet, dann wir das Gehaltsende auf VBS Ende gesetzt
|
||||
//echo "Ende des VBS: $vbsbis Ende des Gehalt: ".$data['bis'];
|
||||
if ($vbsbis != '' && $vbsbis < $data['bis'])
|
||||
{
|
||||
$data['bis'] = $vbsbis;
|
||||
//echo "Gehalt auf vbs ende gesetzt";
|
||||
}
|
||||
}
|
||||
|
||||
$ret = $this->GehaltsbestandteilModel->insert($data,
|
||||
$this->GehaltsbestandteilModel->getEncryptedColumns()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if(!$failed)
|
||||
{
|
||||
@@ -375,7 +405,7 @@ class MigrateSalary extends CLI_Controller
|
||||
{
|
||||
echo "ROLLBACK";
|
||||
$this->db->trans_rollback();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -386,17 +416,17 @@ class MigrateSalary extends CLI_Controller
|
||||
$db = new DB_Model();
|
||||
|
||||
$qry = "
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
hr.tbl_vertragsbestandteil
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
hr.tbl_vertragsbestandteil
|
||||
JOIN hr.tbl_vertragsbestandteil_freitext USING(vertragsbestandteil_id)
|
||||
WHERE
|
||||
dienstverhaeltnis_id=".$db->escape($dvid)."
|
||||
AND vertragsbestandteiltyp_kurzbz='freitext'
|
||||
WHERE
|
||||
dienstverhaeltnis_id=".$db->escape($dvid)."
|
||||
AND vertragsbestandteiltyp_kurzbz='freitext'
|
||||
AND ".$db->escape($datum)." BETWEEN von AND COALESCE(bis, '2999-12-31')
|
||||
AND freitexttyp_kurzbz='allin'";
|
||||
|
||||
|
||||
$resultAllIn = $db->execReadOnlyQuery($qry);
|
||||
|
||||
if (hasData($resultAllIn))
|
||||
@@ -410,15 +440,15 @@ class MigrateSalary extends CLI_Controller
|
||||
$db = new DB_Model();
|
||||
|
||||
$qry = "
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
hr.tbl_vertragsbestandteil
|
||||
WHERE
|
||||
dienstverhaeltnis_id=".$db->escape($dvid)."
|
||||
AND vertragsbestandteiltyp_kurzbz='stunden'
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
hr.tbl_vertragsbestandteil
|
||||
WHERE
|
||||
dienstverhaeltnis_id=".$db->escape($dvid)."
|
||||
AND vertragsbestandteiltyp_kurzbz='stunden'
|
||||
AND ".$db->escape($datum)." BETWEEN von AND COALESCE(bis, '2999-12-31')";
|
||||
|
||||
|
||||
$resultVBS = $db->execReadOnlyQuery($qry);
|
||||
|
||||
return $resultVBS;
|
||||
@@ -430,22 +460,22 @@ class MigrateSalary extends CLI_Controller
|
||||
private function _getUser($svnr)
|
||||
{
|
||||
$db = new DB_Model();
|
||||
|
||||
|
||||
$qry = "
|
||||
SELECT
|
||||
mitarbeiter_uid
|
||||
FROM
|
||||
public.tbl_person
|
||||
SELECT
|
||||
mitarbeiter_uid
|
||||
FROM
|
||||
public.tbl_person
|
||||
JOIN public.tbl_benutzer using(person_id)
|
||||
JOIN public.tbl_mitarbeiter ON(uid=mitarbeiter_uid)
|
||||
WHERE
|
||||
tbl_person.svnr = ". $db->escape($svnr)."
|
||||
AND EXISTS(
|
||||
SELECT
|
||||
1
|
||||
FROM
|
||||
hr.tbl_dienstverhaeltnis
|
||||
WHERE
|
||||
SELECT
|
||||
1
|
||||
FROM
|
||||
hr.tbl_dienstverhaeltnis
|
||||
WHERE
|
||||
mitarbeiter_uid=tbl_mitarbeiter.mitarbeiter_uid
|
||||
AND oe_kurzbz=". $db->escape($this->OE_DEFAULT)."
|
||||
)
|
||||
|
||||
@@ -22,6 +22,7 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
* This controller operates between (interface) the JS (GUI) and the NavigationLib (back-end)
|
||||
* Provides data to the ajax get calls about the filter
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
* TODO(chris): deprecated
|
||||
*/
|
||||
class Navigation extends FHC_Controller
|
||||
{
|
||||
|
||||
@@ -7,6 +7,10 @@ if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
*/
|
||||
abstract class Auth_Controller extends FHC_Controller
|
||||
{
|
||||
// Special Permissions
|
||||
const PERM_ANONYMOUS = 'anonymous'; // Everyone
|
||||
const PERM_LOGGED = 'logged_in'; // Every registered user
|
||||
|
||||
/**
|
||||
* Extends this controller if authentication is required
|
||||
*/
|
||||
@@ -14,17 +18,41 @@ abstract class Auth_Controller extends FHC_Controller
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Loads authentication library and starts authentication
|
||||
$this->load->library('AuthLib');
|
||||
if (!is_array($requiredPermissions) || isEmptyArray($requiredPermissions))
|
||||
show_error('The given permissions is not a valid array or it is an empty one');
|
||||
|
||||
if (!isset($requiredPermissions[$this->router->method]))
|
||||
show_error('The given permission array does not contain the given method or is not correctly set');
|
||||
|
||||
$anonAllowed = false;
|
||||
if ($requiredPermissions[$this->router->method] == self::PERM_ANONYMOUS)
|
||||
$anonAllowed = true;
|
||||
elseif (is_array($requiredPermissions[$this->router->method])
|
||||
&& in_array(self::PERM_ANONYMOUS, $requiredPermissions[$this->router->method]))
|
||||
$anonAllowed = true;
|
||||
|
||||
// Checks if the caller is allowed to access to this content
|
||||
$this->_isAllowed($requiredPermissions);
|
||||
if ($anonAllowed) {
|
||||
// Loads authentication library without authentication
|
||||
$this->load->library('AuthLib', [false]);
|
||||
|
||||
// Loads helper since it would only be called on authentication
|
||||
$this->load->helper('hlp_authentication');
|
||||
} else {
|
||||
// Loads authentication library and starts authentication
|
||||
$this->load->library('AuthLib');
|
||||
|
||||
// Checks if the caller is allowed to access to this content
|
||||
$this->_isAllowed($requiredPermissions);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the caller is allowed to access to this content with the given permissions
|
||||
* If it is not allowed will set the HTTP header with code 401
|
||||
* Wrapper for permissionlib->isEntitled
|
||||
*
|
||||
* @param array $requiredPermissions
|
||||
* @return void
|
||||
*/
|
||||
private function _isAllowed($requiredPermissions)
|
||||
{
|
||||
@@ -34,28 +62,43 @@ abstract class Auth_Controller extends FHC_Controller
|
||||
// Checks if this user is entitled to access to this content
|
||||
if (!$this->permissionlib->isEntitled($requiredPermissions, $this->router->method))
|
||||
{
|
||||
$this->output->set_status_header(REST_Controller::HTTP_UNAUTHORIZED); // set the HTTP header as unauthorized
|
||||
|
||||
$this->load->library('EPrintfLib'); // loads the EPrintfLib to format the output
|
||||
|
||||
// Prints the main error message
|
||||
$this->eprintflib->printError('You are not allowed to access to this content');
|
||||
// Prints the called controller name
|
||||
$this->eprintflib->printInfo('Controller name: '.$this->router->class);
|
||||
// Prints the called controller method name
|
||||
$this->eprintflib->printInfo('Method name: '.$this->router->method);
|
||||
// Prints the required permissions needed to access to this method
|
||||
$this->eprintflib->printInfo('Required permissions: '.$this->_rpsToString($requiredPermissions, $this->router->method));
|
||||
|
||||
$this->_outputAuthError($requiredPermissions);
|
||||
exit; // immediately terminate the execution
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs an error message and sets the HTTP Header.
|
||||
* This function is protected so that it can be overwritten.
|
||||
*
|
||||
* @param array $requiredPermissions
|
||||
* @return void
|
||||
*/
|
||||
protected function _outputAuthError($requiredPermissions)
|
||||
{
|
||||
$this->output->set_status_header(REST_Controller::HTTP_UNAUTHORIZED); // set the HTTP header as unauthorized
|
||||
|
||||
$this->load->library('EPrintfLib'); // loads the EPrintfLib to format the output
|
||||
|
||||
// Prints the main error message
|
||||
$this->eprintflib->printError('You are not allowed to access to this content');
|
||||
// Prints the called controller name
|
||||
$this->eprintflib->printInfo('Controller name: '.$this->router->class);
|
||||
// Prints the called controller method name
|
||||
$this->eprintflib->printInfo('Method name: '.$this->router->method);
|
||||
// Prints the required permissions needed to access to this method
|
||||
$this->eprintflib->printInfo('Required permissions: '.$this->_rpsToString($requiredPermissions, $this->router->method));
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts an array of permissions to a string that contains them as a comma separated list
|
||||
* Ex: "<permission 1>, <permission 2>, <permission 3>"
|
||||
*
|
||||
* @param array $requiredPermissions
|
||||
* @param string $method
|
||||
* @return void
|
||||
*/
|
||||
private function _rpsToString($requiredPermissions, $method)
|
||||
final protected function _rpsToString($requiredPermissions, $method)
|
||||
{
|
||||
$strRequiredPermissions = ''; // string that contains all the required permissions needed to access to this method
|
||||
|
||||
|
||||
@@ -0,0 +1,231 @@
|
||||
<?php
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Controller using JSON
|
||||
*/
|
||||
class FHCAPI_Controller extends Auth_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Response status
|
||||
* @see https://github.com/omniti-labs/jsend
|
||||
*/
|
||||
const STATUS_SUCCESS = 'success';
|
||||
const STATUS_FAIL = 'fail';
|
||||
const STATUS_ERROR = 'error';
|
||||
|
||||
/**
|
||||
* Error types
|
||||
*/
|
||||
const ERROR_TYPE_PHP = 'php';
|
||||
const ERROR_TYPE_EXCEPTION = 'exception';
|
||||
const ERROR_TYPE_GENERAL = 'general';
|
||||
const ERROR_TYPE_404 = '404';
|
||||
const ERROR_TYPE_DB = 'db';
|
||||
const ERROR_TYPE_VALIDATION = 'validation';
|
||||
const ERROR_TYPE_AUTH = 'auth';
|
||||
|
||||
/**
|
||||
* Return Object
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $returnObj = [];
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $requiredPermissions
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($requiredPermissions = [])
|
||||
{
|
||||
if (is_cli())
|
||||
show_404();
|
||||
|
||||
global $g_result;
|
||||
$g_result = $this;
|
||||
|
||||
ob_start(function ($content) {
|
||||
$http_response_code = http_response_code();
|
||||
// NOTE(chris): For security reasons 404 will be displayed the same everywhere
|
||||
if ($http_response_code == REST_Controller::HTTP_NOT_FOUND)
|
||||
return $content;
|
||||
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
|
||||
if (!isset($this->returnObj['meta']) || !isset($this->returnObj['meta']['status'])) {
|
||||
switch ($http_response_code) {
|
||||
case 200:
|
||||
$this->setStatus(self::STATUS_SUCCESS);
|
||||
break;
|
||||
case 400:
|
||||
$this->setStatus(self::STATUS_FAIL);
|
||||
break;
|
||||
default:
|
||||
$this->setStatus(self::STATUS_ERROR);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return json_encode($this->returnObj);
|
||||
});
|
||||
|
||||
// NOTE(chris): overwrite error_views_path before constructor
|
||||
load_class('Config')->set_item('error_views_path', VIEWPATH.'errors'.DIRECTORY_SEPARATOR.'json'.DIRECTORY_SEPARATOR);
|
||||
|
||||
parent::__construct($requiredPermissions);
|
||||
|
||||
// For JSON Requests (as opposed to multipart/form-data) get the $_POST variable from the input stream instead
|
||||
if ($this->input->get_request_header('Content-Type', true) == 'application/json')
|
||||
$_POST = json_decode($this->security->xss_clean($this->input->raw_input_stream), true);
|
||||
elseif (isset($_POST['_jsondata'])) {
|
||||
$_POST = array_merge($_POST, json_decode($_POST['_jsondata'], true));
|
||||
unset($_POST['_jsondata']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Handle Output object
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @param string $type (optional)
|
||||
* @return void
|
||||
*/
|
||||
public function addError($data, $type = null)
|
||||
{
|
||||
if (!isset($this->returnObj['errors']))
|
||||
$this->returnObj['errors'] = [];
|
||||
|
||||
$error = [];
|
||||
|
||||
if (is_array($data)) {
|
||||
if ($type == self::ERROR_TYPE_VALIDATION)
|
||||
$error['messages'] = $data;
|
||||
else
|
||||
$error = $data;
|
||||
} else {
|
||||
$error['message'] = $data;
|
||||
}
|
||||
|
||||
if ($type)
|
||||
$error['type'] = $type;
|
||||
|
||||
$this->returnObj['errors'][] = $error;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $data
|
||||
* @return void
|
||||
*/
|
||||
public function setData($data)
|
||||
{
|
||||
$this->returnObj['data'] = $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
* @return void
|
||||
*/
|
||||
public function addMeta($key, $value)
|
||||
{
|
||||
if (!isset($this->returnObj['meta']))
|
||||
$this->returnObj['meta'] = [];
|
||||
$this->returnObj['meta'][$key] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $status
|
||||
* @return void
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$this->addMeta('status', $status);
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Handle Output object - Shortcut functions
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @param mixed $data (optional)
|
||||
* @return void
|
||||
*/
|
||||
protected function terminateWithSuccess($data = null)
|
||||
{
|
||||
$this->setData($data);
|
||||
$this->setStatus(self::STATUS_SUCCESS);
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $errors
|
||||
* @return void
|
||||
*/
|
||||
protected function terminateWithValidationErrors($errors)
|
||||
{
|
||||
$this->output->set_status_header(REST_Controller::HTTP_BAD_REQUEST);
|
||||
$this->addError($errors, self::ERROR_TYPE_VALIDATION);
|
||||
$this->setStatus(self::STATUS_FAIL);
|
||||
exit(EXIT_ERROR);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $error
|
||||
* @param string $type (optional)
|
||||
* @param integer $status (optional)
|
||||
* @return void
|
||||
*/
|
||||
protected function terminateWithError($error, $type = null, $status = REST_Controller::HTTP_INTERNAL_SERVER_ERROR)
|
||||
{
|
||||
$this->output->set_status_header($status);
|
||||
$this->addError($error, $type);
|
||||
$this->setStatus(self::STATUS_ERROR);
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param stdclass $result
|
||||
* @param string $errortype
|
||||
* @return void
|
||||
*/
|
||||
protected function getDataOrTerminateWithError($result, $errortype = self::ERROR_TYPE_GENERAL)
|
||||
{
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), $errortype);
|
||||
}
|
||||
return $result->retval;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Security
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Outputs an error message and sets the HTTP Header.
|
||||
* This overwrites the default behaviour to output a json object.
|
||||
*
|
||||
* @param array $requiredPermissions
|
||||
* @return void
|
||||
*/
|
||||
protected function _outputAuthError($requiredPermissions)
|
||||
{
|
||||
$this->output->set_status_header(isLogged() ? REST_Controller::HTTP_FORBIDDEN : REST_Controller::HTTP_UNAUTHORIZED);
|
||||
|
||||
$this->addError([
|
||||
'message' => 'You are not allowed to access to this content',
|
||||
'controller' => $this->router->class,
|
||||
'method' => $this->router->method,
|
||||
'required_permissions' => $this->_rpsToString($requiredPermissions, $this->router->method)
|
||||
], self::ERROR_TYPE_AUTH);
|
||||
}
|
||||
}
|
||||
+316
-120
@@ -62,9 +62,11 @@ class AntragLib
|
||||
'insertvon' => $insertvon
|
||||
]);
|
||||
|
||||
// NOTE(chris): remove "preabbrecher" statusgrund for Stgl-Abmeldungen if set
|
||||
// NOTE(chris): remove "preabbrecher" statusgrund and paused stati for sibling Anträge for Stgl-Abmeldungen if set
|
||||
$res = $this->_ci->StudierendenantragModel->load($antrag_id);
|
||||
if (hasData($res) && current(getData($res))->typ == Studierendenantrag_model::TYP_ABMELDUNG_STGL) {
|
||||
$this->unpauseAntrag($antrag_id, Studierendenantragstatus_model::INSERTVON_ABMELDUNGSTGL);
|
||||
|
||||
$this->_ci->PrestudentstatusModel->addSelect('tbl_status_grund.statusgrund_kurzbz');
|
||||
$res = $this->_ci->PrestudentstatusModel->getLastStatusWithStgEmail(current(getData($res))->prestudent_id, '', 'Student');
|
||||
if (hasData($res) && current(getData($res))->statusgrund_kurzbz == 'preabbrecher') {
|
||||
@@ -83,6 +85,67 @@ class AntragLib
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $antrag_id
|
||||
* @param string $insertvon
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
public function pauseAntrag($antrag_id, $insertvon)
|
||||
{
|
||||
switch ($insertvon) {
|
||||
case Studierendenantragstatus_model::INSERTVON_ABMELDUNGSTGL:
|
||||
$result = $this->_ci->StudierendenantragstatusModel->stopAntraegeForAbmeldungStgl($antrag_id);
|
||||
break;
|
||||
case Studierendenantragstatus_model::INSERTVON_DEREGISTERED:
|
||||
$result = $this->_ci->StudierendenantragstatusModel->stopAntraegeForAbbruchBy($antrag_id);
|
||||
break;
|
||||
default:
|
||||
$result = $this->_ci->StudierendenantragstatusModel->insert([
|
||||
'studierendenantrag_id' => $antrag_id,
|
||||
'studierendenantrag_statustyp_kurzbz' => Studierendenantragstatus_model::STATUS_PAUSE,
|
||||
'insertvon' => $insertvon
|
||||
]);
|
||||
break;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $antrag_id
|
||||
* @param string $insertvon
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
public function unpauseAntrag($antrag_id, $insertvon)
|
||||
{
|
||||
if ($insertvon == Studierendenantragstatus_model::INSERTVON_DEREGISTERED)
|
||||
return error($this->p->t('studierendenantrag', 'error_no_right'));
|
||||
if ($insertvon == Studierendenantragstatus_model::INSERTVON_ABMELDUNGSTGL) {
|
||||
return $this->_ci->StudierendenantragstatusModel->resumeAntraegeForAbmeldungStgl($antrag_id);
|
||||
}
|
||||
// NOTE(chris): get last status that is not pause
|
||||
$this->_ci->StudierendenantragstatusModel->addOrder('insertamum');
|
||||
$this->_ci->StudierendenantragstatusModel->addLimit(1);
|
||||
$result = $this->_ci->StudierendenantragstatusModel->loadWhere([
|
||||
'studierendenantrag_id' => $antrag_id,
|
||||
'studierendenantrag_statustyp_kurzbz !=' => Studierendenantragstatus_model::STATUS_PAUSE
|
||||
]);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
if (!hasData($result))
|
||||
return error($this->_ci->p->t('studierendenantrag', 'error_no_antragstatus', ['id' => $antrag_id]));
|
||||
$status = current(getData($result));
|
||||
|
||||
$result = $this->_ci->StudierendenantragstatusModel->insert([
|
||||
'studierendenantrag_id' => $antrag_id,
|
||||
'studierendenantrag_statustyp_kurzbz' => $status->studierendenantrag_statustyp_kurzbz,
|
||||
'insertvon' => $insertvon
|
||||
]);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* NOTE(chris): permissions & verification must be handled outside
|
||||
*
|
||||
@@ -169,7 +232,7 @@ class AntragLib
|
||||
if (isError($result))
|
||||
$errors[] = getError($result);
|
||||
else {
|
||||
$this->_ci->StudiengangModel->addJoin('public.tbl_prestudent ps','studiengang_kz');
|
||||
$this->_ci->StudiengangModel->addJoin('public.tbl_prestudent ps', 'studiengang_kz');
|
||||
$result = $this->_ci->StudiengangModel->loadWhere(['prestudent_id' => $antrag->prestudent_id]);
|
||||
$stg = '';
|
||||
$orgform = '';
|
||||
@@ -190,6 +253,10 @@ class AntragLib
|
||||
$vorlage ='Sancho_Mail_Antrag_A_Approve';
|
||||
$subject = $this->_ci->p->t('studierendenantrag', 'mail_subject_A_Approve');
|
||||
|
||||
$result = $this->pauseAntrag($studierendenantrag_id, Studierendenantragstatus_model::INSERTVON_DEREGISTERED);
|
||||
if (isError($result))
|
||||
$errors[] = getError($result);
|
||||
|
||||
$result = $this->_ci->prestudentlib->setAbbrecher(
|
||||
$antrag->prestudent_id,
|
||||
$antrag->studiensemester_kurzbz,
|
||||
@@ -208,7 +275,13 @@ class AntragLib
|
||||
$data = [
|
||||
'student' => $this->_ci->p->t('person', 'studentIn'),
|
||||
'sem' => $antrag->studiensemester_kurzbz,
|
||||
'linkPdf' => base_url('content/pdfExport.php?xml=Antrag' . $antrag->typ . '.xml.php&xsl=Antrag' . $antrag->typ . '&id=' . $antrag->studierendenantrag_id . '&output=pdf')
|
||||
'linkPdf' => base_url('content/pdfExport.php?xml=Antrag' .
|
||||
$antrag->typ .
|
||||
'.xml.php&xsl=Antrag' .
|
||||
$antrag->typ .
|
||||
'&id=' .
|
||||
$antrag->studierendenantrag_id .
|
||||
'&output=pdf')
|
||||
];
|
||||
if (hasData($result)) {
|
||||
$person = current(getData($result));
|
||||
@@ -229,6 +302,10 @@ class AntragLib
|
||||
sendSanchoMail($vorlage, $data, $prestudent_status->email, $subject);
|
||||
}
|
||||
} else { // ($antrag->typ == Studierendenantrag_model::TYP_ABMELDUNG_STGL)
|
||||
$result = $this->pauseAntrag($studierendenantrag_id, Studierendenantragstatus_model::INSERTVON_ABMELDUNGSTGL);
|
||||
if (isError($result))
|
||||
$errors[] = getError($result);
|
||||
|
||||
$result = $this->_ci->PrestudentstatusModel->getLastStatusWithStgEmail($antrag->prestudent_id, '', 'Student');
|
||||
if (isError($result))
|
||||
{
|
||||
@@ -340,6 +417,10 @@ class AntragLib
|
||||
if (isError($result))
|
||||
return $result;
|
||||
else {
|
||||
$result = $this->pauseAntrag($studierendenantrag_id, Studierendenantragstatus_model::INSERTVON_DEREGISTERED);
|
||||
// NOTE(chris): here we should have error handling but at the
|
||||
// moment there is no way to notify the user for "soft" errors
|
||||
|
||||
$result = $this->_ci->prestudentlib->setAbbrecher(
|
||||
$antrag->prestudent_id,
|
||||
$antrag->studiensemester_kurzbz,
|
||||
@@ -471,7 +552,6 @@ class AntragLib
|
||||
'<br>Details:<br>' .
|
||||
$error_msg;
|
||||
} else {
|
||||
|
||||
$data = getData($data);
|
||||
|
||||
$result = $this->_ci->StudierendenantragstatusModel->insert([
|
||||
@@ -582,7 +662,11 @@ class AntragLib
|
||||
'nachname' => $data['person']->nachname,
|
||||
'UID' => $data['UID'],
|
||||
'sem' => $resultAntrag->studiensemester_kurzbz,
|
||||
'linkPdf' => base_url('content/pdfExport.php?xml=AntragUnterbrechung.xml.php&xsl=AntragUnterbrechung&id=' . $studierendenantrag_id . '&output=pdf'),
|
||||
'linkPdf' => base_url(
|
||||
'content/pdfExport.php?xml=AntragUnterbrechung.xml.php&xsl=AntragUnterbrechung&id=' .
|
||||
$studierendenantrag_id .
|
||||
'&output=pdf'
|
||||
),
|
||||
'insertvon' => $approvedBy
|
||||
],
|
||||
$data['prestudent_status']->email,
|
||||
@@ -699,7 +783,9 @@ class AntragLib
|
||||
'Orgform' => $data['prestudent_status']->orgform_kurzbz,
|
||||
'prestudent_id' => $data['prestudent_status']->prestudent_id,
|
||||
'abmeldungLink' => site_url('lehre/Studierendenantrag/abmeldung/' . $data['prestudent_status']->prestudent_id),
|
||||
'abmeldungLinkCIS' => CIS_ROOT . 'index.ci.php/lehre/Studierendenantrag/abmeldung/' . $data['prestudent_status']->prestudent_id
|
||||
'abmeldungLinkCIS' => CIS_ROOT .
|
||||
'index.ci.php/lehre/Studierendenantrag/abmeldung/' .
|
||||
$data['prestudent_status']->prestudent_id
|
||||
],
|
||||
$data['email'],
|
||||
$this->_ci->p->t('studierendenantrag', 'mail_subject_U_Reject')
|
||||
@@ -734,7 +820,7 @@ class AntragLib
|
||||
return error($this->_ci->p->t('studierendenantrag', 'error_no_antrag_found', ['id' => $studierendenantrag_id]));
|
||||
|
||||
$result['antrag'] = $antrag = current($res);
|
||||
$this->_ci->StudiengangModel->addJoin('public.tbl_prestudent ps','studiengang_kz');
|
||||
$this->_ci->StudiengangModel->addJoin('public.tbl_prestudent ps', 'studiengang_kz');
|
||||
$res = $this->_ci->StudiengangModel->loadWhere(['prestudent_id' => $antrag->prestudent_id]);
|
||||
if (hasData($res)) {
|
||||
$result['studiengang'] = current(getData($res));
|
||||
@@ -862,7 +948,9 @@ class AntragLib
|
||||
|
||||
$result = $this->_ci->StudierendenantragstatusModel->insert([
|
||||
'studierendenantrag_id' => $antrag_id,
|
||||
'studierendenantrag_statustyp_kurzbz' => $repeat ? Studierendenantragstatus_model::STATUS_CREATED : Studierendenantragstatus_model::STATUS_PASS,
|
||||
'studierendenantrag_statustyp_kurzbz' => $repeat
|
||||
? Studierendenantragstatus_model::STATUS_CREATED
|
||||
: Studierendenantragstatus_model::STATUS_PASS,
|
||||
'insertvon' => $insertvon
|
||||
]);
|
||||
|
||||
@@ -878,8 +966,7 @@ class AntragLib
|
||||
$email = $prestudent_status->email;
|
||||
// NOTE(chris): Sancho mail
|
||||
$lvzuweisungLink = site_url('lehre/Antrag/Wiederholung/assistenz/' . $antrag_id);
|
||||
if( defined('VILESCI_ROOT') )
|
||||
{
|
||||
if (defined('VILESCI_ROOT')) {
|
||||
$lvzuweisungLink = VILESCI_ROOT . 'index.ci.php/lehre/Antrag/Wiederholung/assistenz/' . $antrag_id;
|
||||
}
|
||||
sendSanchoMail(
|
||||
@@ -888,7 +975,7 @@ class AntragLib
|
||||
'antrag_id' => $antrag_id,
|
||||
'stg' => $prestudent_status->stg_bezeichnung,
|
||||
'Orgform' => $prestudent_status->orgform,
|
||||
'lvzuweisungLink' => $lvzuweisungLink
|
||||
'lvzuweisungLink' => $lvzuweisungLink
|
||||
],
|
||||
$email,
|
||||
$this->_ci->p->t('studierendenantrag', 'mail_subject_W_New')
|
||||
@@ -1062,7 +1149,11 @@ class AntragLib
|
||||
if (isError($result))
|
||||
return $result;
|
||||
if (!hasData($result))
|
||||
return error($this->_ci->p->t('studierendenantrag', 'error_no_stdsem', ['studiensemester_kurzbz' => $antrag->studiensemester_kurzbz]));
|
||||
return error($this->_ci->p->t(
|
||||
'studierendenantrag',
|
||||
'error_no_stdsem',
|
||||
['studiensemester_kurzbz' => $antrag->studiensemester_kurzbz]
|
||||
));
|
||||
$asem = current(getData($result));
|
||||
|
||||
foreach ($stdsems as $sem) {
|
||||
@@ -1117,7 +1208,6 @@ class AntragLib
|
||||
$lv->antrag_anmerkung = $lvszugewiesen[$lv->lehrveranstaltung_id]->anmerkung;
|
||||
$lv->antrag_zugelassen = true;
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
$lvsA = null;
|
||||
@@ -1224,10 +1314,10 @@ class AntragLib
|
||||
* @param integer $prestudent_id
|
||||
*
|
||||
* @return \stdClass on success retval 0 means not a student;
|
||||
* retval 1 means Berechtigt;
|
||||
* retval -1 means has already an Antrag pending;
|
||||
* retval -2 means other Antrag pending;
|
||||
* retval -3 means in blacklist stg
|
||||
* retval 1 means Berechtigt;
|
||||
* retval -1 means has already an Antrag pending;
|
||||
* retval -2 means other Antrag pending;
|
||||
* retval -3 means in blacklist stg
|
||||
*/
|
||||
public function getPrestudentAbmeldeBerechtigt($prestudent_id)
|
||||
{
|
||||
@@ -1251,12 +1341,24 @@ class AntragLib
|
||||
|
||||
if (!in_array($result->status_kurzbz, $this->_ci->config->item('antrag_prestudentstatus_whitelist_abmeldung'))) {
|
||||
$result = $this->_ci->StudierendenantragModel->loadWithStatusWhere([
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'campus.get_status_studierendenantrag(studierendenantrag_id)' => Studierendenantragstatus_model::STATUS_APPROVED
|
||||
], [
|
||||
Studierendenantrag_model::TYP_ABMELDUNG,
|
||||
Studierendenantrag_model::TYP_ABMELDUNG_STGL
|
||||
]);
|
||||
'prestudent_id' => $prestudent_id,
|
||||
's.studierendenantrag_statustyp_kurzbz' => Studierendenantragstatus_model::STATUS_APPROVED
|
||||
], [
|
||||
Studierendenantrag_model::TYP_ABMELDUNG,
|
||||
Studierendenantrag_model::TYP_ABMELDUNG_STGL
|
||||
]);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
if (hasData($result))
|
||||
return success(-1);
|
||||
|
||||
$result = $this->_ci->StudierendenantragModel->loadWithStatusWhere([
|
||||
'prestudent_id' => $prestudent_id,
|
||||
's.studierendenantrag_statustyp_kurzbz' => Studierendenantragstatus_model::STATUS_PAUSE
|
||||
], [
|
||||
Studierendenantrag_model::TYP_ABMELDUNG,
|
||||
Studierendenantrag_model::TYP_ABMELDUNG_STGL
|
||||
]);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
if (hasData($result))
|
||||
@@ -1297,12 +1399,12 @@ class AntragLib
|
||||
* @param string $studiensemester_kurzbz (optional)
|
||||
*
|
||||
* @return \stdClass on success retval 0 means not a student;
|
||||
* retval 1 means Berechtigt;
|
||||
* retval 1 means Berechtigt;
|
||||
* retval -1 means has already an Antrag pending;
|
||||
* retval -2 means other Antrag pending;
|
||||
* retval -3 means in blacklist stg
|
||||
*/
|
||||
public function getPrestudentUnterbrechungsBerechtigt($prestudent_id, $studiensemester_kurzbz = null)
|
||||
public function getPrestudentUnterbrechungsBerechtigt($prestudent_id, $studiensemester_kurzbz = null, $datum_wiedereinstieg = null)
|
||||
{
|
||||
$result = $this->_ci->PrestudentModel->load($prestudent_id);
|
||||
if (isError($result))
|
||||
@@ -1320,18 +1422,10 @@ class AntragLib
|
||||
if (!hasData($result))
|
||||
return success(0);
|
||||
$result = current(getData($result));
|
||||
$prestudent_stdsem = $result->studiensemester_kurzbz;
|
||||
$datumStatus = $result->datum;
|
||||
if (!in_array($result->status_kurzbz, $this->_ci->config->item('antrag_prestudentstatus_whitelist'))) {
|
||||
$result = $this->_ci->StudierendenantragModel->loadWithStatusWhere([
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'typ' => Studierendenantrag_model::TYP_UNTERBRECHUNG,
|
||||
'campus.get_status_studierendenantrag(studierendenantrag_id)' => Studierendenantragstatus_model::STATUS_APPROVED
|
||||
]);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
if (hasData($result))
|
||||
return success(-1);
|
||||
|
||||
if (!in_array($result->status_kurzbz, $this->_ci->config->item('antrag_prestudentstatus_whitelist'))
|
||||
&& $result->status_kurzbz != 'Unterbrecher') {
|
||||
return success(0);
|
||||
}
|
||||
$result = $this->_ci->StudierendenantragModel->loadWithStatusWhere(['prestudent_id' => $prestudent_id]);
|
||||
@@ -1339,7 +1433,8 @@ class AntragLib
|
||||
return $result;
|
||||
if (!hasData($result))
|
||||
return success(1);
|
||||
$result= getData($result);
|
||||
|
||||
$result = getData($result);
|
||||
foreach ($result as $antrag)
|
||||
{
|
||||
if ($antrag->typ == Studierendenantrag_model::TYP_ABMELDUNG || $antrag->typ == Studierendenantrag_model::TYP_ABMELDUNG_STGL)
|
||||
@@ -1349,11 +1444,11 @@ class AntragLib
|
||||
elseif($antrag->status == Studierendenantragstatus_model::STATUS_APPROVED && $antrag->datum > $datumStatus)
|
||||
return success(-2);
|
||||
}
|
||||
if ($studiensemester_kurzbz && $antrag->typ == Studierendenantrag_model::TYP_UNTERBRECHUNG)
|
||||
if ($antrag->typ == Studierendenantrag_model::TYP_UNTERBRECHUNG)
|
||||
{
|
||||
// NOTE(chris): check if this is an old or canceled one
|
||||
if ($antrag->studiensemester_kurzbz == $studiensemester_kurzbz && $antrag->status != Studierendenantragstatus_model::STATUS_CANCELLED)
|
||||
return success(-1);
|
||||
// NOTE(chris): Ignore canceled ones
|
||||
if ($antrag->status == Studierendenantragstatus_model::STATUS_CANCELLED)
|
||||
continue;
|
||||
}
|
||||
if ($antrag->typ == Studierendenantrag_model::TYP_WIEDERHOLUNG)
|
||||
{
|
||||
@@ -1362,6 +1457,17 @@ class AntragLib
|
||||
}
|
||||
}
|
||||
|
||||
if (!$studiensemester_kurzbz) {
|
||||
$sems = $this->getSemesterForUnterbrechung($prestudent_id, $prestudent_stdsem);
|
||||
if (!count(array_filter($sems, function ($item) {
|
||||
return !$item['disabled'];
|
||||
})))
|
||||
return success(-1);
|
||||
} else {
|
||||
if ($this->_ci->StudierendenantragModel->hasRunningUnterbrechungBetween($prestudent_id, $studiensemester_kurzbz, $datum_wiedereinstieg))
|
||||
return success(-1);
|
||||
}
|
||||
|
||||
return success(1);
|
||||
}
|
||||
|
||||
@@ -1406,7 +1512,27 @@ class AntragLib
|
||||
$result = $this->_ci->StudierendenantragModel->loadWithStatusWhere([
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'typ' => Studierendenantrag_model::TYP_WIEDERHOLUNG,
|
||||
'campus.get_status_studierendenantrag(studierendenantrag_id)' => Studierendenantragstatus_model::STATUS_APPROVED
|
||||
's.studierendenantrag_statustyp_kurzbz' => Studierendenantragstatus_model::STATUS_APPROVED
|
||||
]);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
if (hasData($result))
|
||||
return success(-1);
|
||||
|
||||
$result = $this->_ci->StudierendenantragModel->loadWithStatusWhere([
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'typ' => Studierendenantrag_model::TYP_WIEDERHOLUNG,
|
||||
's.studierendenantrag_statustyp_kurzbz' => Studierendenantragstatus_model::STATUS_DEREGISTERED
|
||||
]);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
if (hasData($result))
|
||||
return success(-1);
|
||||
|
||||
$result = $this->_ci->StudierendenantragModel->loadWithStatusWhere([
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'typ' => Studierendenantrag_model::TYP_WIEDERHOLUNG,
|
||||
's.studierendenantrag_statustyp_kurzbz' => Studierendenantragstatus_model::STATUS_PAUSE
|
||||
]);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
@@ -1457,15 +1583,16 @@ class AntragLib
|
||||
return success($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets details for the latest Antrag of one or more types
|
||||
*
|
||||
* @param integer $prestudent_id
|
||||
* @param array|string $typ
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
public function getDetailsForLastAntrag($prestudent_id, $typ = null)
|
||||
{
|
||||
$result = $this->_ci->PrestudentstatusModel->loadLastWithStgDetails($prestudent_id);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
if (!hasData($result))
|
||||
return error($this->_ci->p->t('studierendenantrag', 'error_no_prestudentstatus', ['prestudent_id' => $prestudent_id]));
|
||||
$resultDetails = current(getData($result));
|
||||
|
||||
$where = [
|
||||
'prestudent_id' => $prestudent_id
|
||||
];
|
||||
@@ -1494,21 +1621,20 @@ class AntragLib
|
||||
'prestudent_id' => $prestudent_id
|
||||
]));
|
||||
|
||||
$resultDetails->status = $resultAntrag->status;
|
||||
$resultDetails->statustyp = $resultAntrag->statustyp;
|
||||
$resultDetails->grund = $resultAntrag->grund;
|
||||
$resultDetails->studierendenantrag_id = $resultAntrag->studierendenantrag_id;
|
||||
$resultDetails->typ = $resultAntrag->typ;
|
||||
$resultDetails->datum = $resultAntrag->datum;
|
||||
$resultDetails->studiensemester_kurzbz = $resultAntrag->studiensemester_kurzbz;
|
||||
|
||||
return success($resultDetails);
|
||||
return $this->addDetailsToAntrag($resultAntrag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets details for a specific Antrag
|
||||
*
|
||||
* @param integer $studierendenantrag_id
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
public function getDetailsForAntrag($studierendenantrag_id)
|
||||
{
|
||||
$where = [
|
||||
'studierendenantrag_id' => $studierendenantrag_id
|
||||
's.studierendenantrag_id' => $studierendenantrag_id
|
||||
];
|
||||
|
||||
$result = $this->_ci->StudierendenantragModel->loadWithStatusWhere($where);
|
||||
@@ -1519,76 +1645,99 @@ class AntragLib
|
||||
return error($this->_ci->p->t('studierendenantrag', "error_no_antrag_found", ['id' => $studierendenantrag_id]));
|
||||
$resultAntrag = current(getData($result));
|
||||
|
||||
$result = $this->_ci->PrestudentstatusModel->loadLastWithStgDetails($resultAntrag->prestudent_id, $resultAntrag->studiensemester_kurzbz);
|
||||
return $this->addDetailsToAntrag($resultAntrag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function for getDetailsForAntrag and getDetailsForLastAntrag
|
||||
*
|
||||
* @param \stdClass $antrag
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function addDetailsToAntrag($antrag)
|
||||
{
|
||||
$result = $this->_ci->PrestudentstatusModel->loadLastWithStgDetails(
|
||||
$antrag->prestudent_id,
|
||||
$antrag->studiensemester_kurzbz,
|
||||
$antrag->insertamum
|
||||
);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
if (!hasData($result)) {
|
||||
$result = $this->_ci->PrestudentstatusModel->loadLastWithStgDetails($resultAntrag->prestudent_id);
|
||||
$result = $this->_ci->PrestudentstatusModel->loadLastWithStgDetails(
|
||||
$antrag->prestudent_id,
|
||||
null,
|
||||
$antrag->insertamum
|
||||
);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
if (!hasData($result))
|
||||
return error($this->_ci->p->t('studierendenantrag', 'error_no_prestudentstatus', $resultAntrag));
|
||||
return error($this->_ci->p->t('studierendenantrag', 'error_no_prestudent_in_sem', $antrag));
|
||||
$tmp = current(getData($result));
|
||||
$this->_ci->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
$res = $this->_ci->StudiensemesterModel->load($antrag->studiensemester_kurzbz);
|
||||
if (hasData($res))
|
||||
$tmp->studienjahr_kurzbz = current(getData($res))->studienjahr_kurzbz;
|
||||
else
|
||||
$tmp->studienjahr_kurzbz = '';
|
||||
// NOTE(chris): the semester might not be correct on this fallback so we disable it
|
||||
$tmp->semester = '';
|
||||
}
|
||||
$resultDetails = current(getData($result));
|
||||
|
||||
$resultDetails->status = $resultAntrag->status;
|
||||
$resultDetails->statustyp = $resultAntrag->statustyp;
|
||||
$resultDetails->grund = $resultAntrag->grund;
|
||||
$resultDetails->studierendenantrag_id = $resultAntrag->studierendenantrag_id;
|
||||
$resultDetails->typ = $resultAntrag->typ;
|
||||
$resultDetails->dms_id = $resultAntrag->dms_id;
|
||||
$resultDetails->datum_wiedereinstieg = $resultAntrag->datum_wiedereinstieg;
|
||||
$result = current(getData($result));
|
||||
|
||||
return success($resultDetails);
|
||||
$result->status = $antrag->status;
|
||||
$result->statustyp = $antrag->statustyp;
|
||||
$result->status_insertvon = $antrag->status_insertvon;
|
||||
$result->grund = $antrag->grund;
|
||||
$result->studierendenantrag_id = $antrag->studierendenantrag_id;
|
||||
$result->typ = $antrag->typ;
|
||||
$result->datum = $antrag->datum;
|
||||
$result->dms_id = $antrag->dms_id;
|
||||
$result->datum_wiedereinstieg = $antrag->datum_wiedereinstieg;
|
||||
|
||||
return success($result);
|
||||
}
|
||||
|
||||
public function getSemesterForUnterbrechung($studiensemester_kurzbz)
|
||||
/**
|
||||
* Rearrange the free semester slots for a new Unterbrechung
|
||||
*
|
||||
* @param integer $prestudent_id
|
||||
* @param string $studiensemester_kurzbz
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getSemesterForUnterbrechung($prestudent_id, $studiensemester_kurzbz)
|
||||
{
|
||||
$this->_ci->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
|
||||
$semester = [];
|
||||
|
||||
$result = $this->_ci->StudiensemesterModel->getNextFrom($studiensemester_kurzbz);
|
||||
if (!hasData($result))
|
||||
return $semester;
|
||||
$nextSem = current(getData($result));
|
||||
|
||||
$semester[0] = [
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'wiedereinstieg' => [$nextSem]
|
||||
];
|
||||
|
||||
$result = $this->_ci->StudiensemesterModel->getNextFrom($nextSem->studiensemester_kurzbz);
|
||||
if (!hasData($result))
|
||||
return $semester;
|
||||
|
||||
$currSemester = current(getData($result));
|
||||
$followingSemester = [$currSemester];
|
||||
|
||||
$max = $this->_ci->config->item('unterbrecher_semester_max_length');
|
||||
if(!$max || $max < 1)
|
||||
$max = 2;
|
||||
|
||||
for ($i = 1; $i < $max; $i++) {
|
||||
$result = $this->_ci->StudiensemesterModel->getNextFrom($currSemester->studiensemester_kurzbz);
|
||||
if (!hasData($result))
|
||||
break;
|
||||
$currSemester = current(getData($result));
|
||||
$followingSemester[] = $currSemester;
|
||||
}
|
||||
|
||||
$semester[1] = [
|
||||
'studiensemester_kurzbz' => $nextSem->studiensemester_kurzbz,
|
||||
'wiedereinstieg' => $followingSemester
|
||||
];
|
||||
|
||||
//remove last Semester of the array
|
||||
array_pop($followingSemester);
|
||||
|
||||
foreach ($followingSemester as $sem)
|
||||
$semester[0]['wiedereinstieg'][] = $sem;
|
||||
|
||||
return $semester;
|
||||
$result = $this->_ci->StudierendenantragModel->getFreeSlotsForUnterbrechung($prestudent_id, $studiensemester_kurzbz);
|
||||
if (isError($result))
|
||||
return [];
|
||||
$result = getData($result);
|
||||
if (!$result)
|
||||
return [];
|
||||
return array_reduce($result, function ($carry, $item) {
|
||||
if (!isset($carry[$item->von]))
|
||||
$carry[$item->von] = [
|
||||
'studienjahr_kurzbz' => $item->studienjahr_kurzbz,
|
||||
'studiensemester_kurzbz' => $item->von,
|
||||
'wiedereinstieg' => [],
|
||||
'disabled' => true
|
||||
];
|
||||
|
||||
$carry[$item->von]['wiedereinstieg'][] = [
|
||||
'studiensemester_kurzbz' => $item->bis,
|
||||
'start' => $item->ende,
|
||||
'disabled' => (boolean)$item->studierendenantrag_id
|
||||
];
|
||||
|
||||
if ($carry[$item->von]['disabled'] && !$item->studierendenantrag_id) {
|
||||
$carry[$item->von]['disabled'] = false;
|
||||
}
|
||||
|
||||
return $carry;
|
||||
}, []);
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getAktivePrestudentenInStgs($studiengaenge, $query)
|
||||
@@ -1664,7 +1813,6 @@ class AntragLib
|
||||
return error($this->_ci->p->t('studierendenantrag', 'error_no_stg_antrag', ['id' => $antrag_id]));
|
||||
|
||||
$stg = current($result);
|
||||
$studiengang_kz = $stg->studiengang_kz;
|
||||
$semester = $stg->ausbildungssemester;
|
||||
|
||||
$result = $this->_ci->StudierendenantragModel->load($antrag_id);
|
||||
@@ -1726,9 +1874,7 @@ class AntragLib
|
||||
$result = $this->getLvsForAntrag($antrag_id);
|
||||
if (hasData($result)) {
|
||||
$lvs = getData($result);
|
||||
$repeat_last = false;
|
||||
if (isset($lvs['repeat_last'])) {
|
||||
$repeat_last = true;
|
||||
unset($lvs['repeat_last']);
|
||||
$vorlage .= '_Lst';
|
||||
}
|
||||
@@ -1895,6 +2041,26 @@ class AntragLib
|
||||
return $this->hasAccessToAntrag($antrag_id, 'student/studierendenantrag');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $antrag_id
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isEntitledToPauseAntrag($antrag_id)
|
||||
{
|
||||
return ($this->hasAccessToAntrag($antrag_id, 'student/antragfreigabe') || $this->hasAccessToAntrag($antrag_id, 'student/studierendenantrag'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $antrag_id
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isEntitledToUnpauseAntrag($antrag_id)
|
||||
{
|
||||
return ($this->hasAccessToAntrag($antrag_id, 'student/antragfreigabe') || $this->hasAccessToAntrag($antrag_id, 'student/studierendenantrag'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $antrag_id
|
||||
*
|
||||
@@ -1935,6 +2101,36 @@ class AntragLib
|
||||
return $this->hasAccessToAntrag($antrag_id, 'student/antragfreigabe');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $antrag_id
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function antragCanBeManualPaused($antrag_id)
|
||||
{
|
||||
$this->_ci->StudierendenantragModel->db->where_not_in('campus.get_status_studierendenantrag(studierendenantrag_id)', [
|
||||
Studierendenantragstatus_model::STATUS_DEREGISTERED,
|
||||
Studierendenantragstatus_model::STATUS_APPROVED,
|
||||
Studierendenantragstatus_model::STATUS_PAUSE
|
||||
]);
|
||||
$result = $this->_ci->StudierendenantragModel->loadWhere([
|
||||
'studierendenantrag_id' => $antrag_id,
|
||||
'typ' => Studierendenantrag_model::TYP_WIEDERHOLUNG
|
||||
]);
|
||||
|
||||
return hasData($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $antrag_id
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function antragCanBeManualUnpaused($antrag_id)
|
||||
{
|
||||
return $this->_ci->StudierendenantragModel->isManuallyPaused($antrag_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $antrag_id
|
||||
* @param string|array $status
|
||||
|
||||
@@ -21,6 +21,8 @@ require_once(FHCPATH.'include/functions.inc.php');
|
||||
require_once(FHCPATH.'include/wawi_kostenstelle.class.php');
|
||||
require_once(FHCPATH.'include/benutzerberechtigung.class.php');
|
||||
|
||||
use \benutzerberechtigung as benutzerberechtigung;
|
||||
|
||||
class PermissionLib
|
||||
{
|
||||
// Available rights in the DB
|
||||
@@ -65,8 +67,10 @@ class PermissionLib
|
||||
if (!is_cli())
|
||||
{
|
||||
// API Caller rights initialization
|
||||
$authObj = $this->_ci->authlib->getAuthObj();
|
||||
self::$bb = new benutzerberechtigung();
|
||||
self::$bb->getBerechtigungen(($this->_ci->authlib->getAuthObj())->{AuthLib::AO_USERNAME});
|
||||
if ($authObj)
|
||||
self::$bb->getBerechtigungen($authObj->{AuthLib::AO_USERNAME});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,6 +170,16 @@ class PermissionLib
|
||||
if ($checkPermissions === true) break;
|
||||
}
|
||||
}
|
||||
elseif ($permissions[$pCounter] == Auth_Controller::PERM_ANONYMOUS)
|
||||
{
|
||||
$checkPermissions = true;
|
||||
break;
|
||||
}
|
||||
elseif ($permissions[$pCounter] == Auth_Controller::PERM_LOGGED)
|
||||
{
|
||||
$checkPermissions = isLogged();
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
show_error('The given permission does not use the correct format');
|
||||
|
||||
@@ -247,7 +247,7 @@ EOTXT;
|
||||
$this->validationerrors[] = 'Das Beginndatum muss vor dem Endedatum liegen.';
|
||||
}
|
||||
|
||||
if( $this->checkoverlap && !($this->vertragsart_kurzbz === 'werkvertrag')
|
||||
if( $this->checkoverlap && !(in_array($this->vertragsart_kurzbz, array('werkvertrag', 'studentischehilfskr')) )
|
||||
&& $ci->VertragsbestandteilLib->isOverlappingExistingDV($this) )
|
||||
{
|
||||
$this->validationerrors[] = 'Es existiert bereits ein überlappendes Dienstverhältnis';
|
||||
|
||||
@@ -26,30 +26,35 @@ class VertragsbestandteilLib
|
||||
{
|
||||
const INCLUDE_FUTURE = true;
|
||||
const DO_NOT_INCLUDE_FUTURE = false;
|
||||
|
||||
|
||||
protected $CI;
|
||||
/** @var Dienstverhaeltnis_model */
|
||||
protected $DienstverhaeltnisModel;
|
||||
/** @var Vertragsbestandteil_model */
|
||||
protected $VertragsbestandteilModel;
|
||||
/**
|
||||
/** @var Benutzer_model */
|
||||
protected $BenutzerModel;
|
||||
/**
|
||||
* @var GehaltsbestandteilLib
|
||||
*/
|
||||
protected $GehaltsbestandteilLib;
|
||||
|
||||
|
||||
protected $loggedInUser;
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->loggedInUser = getAuthUID();
|
||||
$this->CI = get_instance();
|
||||
$this->CI->load->model('vertragsbestandteil/Dienstverhaeltnis_model',
|
||||
$this->CI->load->model('vertragsbestandteil/Dienstverhaeltnis_model',
|
||||
'DienstverhaeltnisModel');
|
||||
$this->DienstverhaeltnisModel = $this->CI->DienstverhaeltnisModel;
|
||||
$this->CI->load->model('vertragsbestandteil/Vertragsbestandteil_model',
|
||||
$this->CI->load->model('vertragsbestandteil/Vertragsbestandteil_model',
|
||||
'VertragsbestandteilModel');
|
||||
$this->VertragsbestandteilModel = $this->CI->VertragsbestandteilModel;
|
||||
$this->CI->load->library('vertragsbestandteil/GehaltsbestandteilLib',
|
||||
$this->CI->load->model('person/benutzer_model',
|
||||
'BenutzerModel');
|
||||
$this->BenutzerModel = $this->CI->BenutzerModel;
|
||||
$this->CI->load->library('vertragsbestandteil/GehaltsbestandteilLib',
|
||||
null, 'GehaltsbestandteilLib');
|
||||
$this->GehaltsbestandteilLib = $this->CI->GehaltsbestandteilLib;
|
||||
}
|
||||
@@ -63,49 +68,54 @@ class VertragsbestandteilLib
|
||||
} catch (Exception $ex)
|
||||
{
|
||||
log_message('debug', "Error handling json data from GUI. " . $ex->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public function fetchDienstverhaeltnisse($unternehmen, $stichtag=null, $mitarbeiteruid=null) {
|
||||
$dvs = $this->DienstverhaeltnisModel->fetchDienstverhaeltnisse($unternehmen, $stichtag, $mitarbeiteruid);
|
||||
return $dvs;
|
||||
}
|
||||
|
||||
public function fetchDienstverhaeltnis($dienstverhaeltnis_id)
|
||||
{
|
||||
$result = $this->DienstverhaeltnisModel->load($dienstverhaeltnis_id);
|
||||
$dv = null;
|
||||
if(null !== ($row = getData($result)))
|
||||
if(null !== ($row = getData($result)))
|
||||
{
|
||||
$dv = new Dienstverhaeltnis();
|
||||
$dv->hydrateByStdClass($row[0], true);
|
||||
}
|
||||
return $dv;
|
||||
}
|
||||
|
||||
|
||||
public function fetchVertragsbestandteile($dienstverhaeltnis_id, $stichtag=null, $includefuture=false)
|
||||
{
|
||||
$vbs = $this->VertragsbestandteilModel->getVertragsbestandteile($dienstverhaeltnis_id, $stichtag, $includefuture);
|
||||
$gbs = $this->GehaltsbestandteilLib->fetchGehaltsbestandteile($dienstverhaeltnis_id, $stichtag, $includefuture);
|
||||
|
||||
|
||||
$gbsByVBid = array();
|
||||
foreach( $gbs as $gb )
|
||||
foreach( $gbs as $gb )
|
||||
{
|
||||
if( intval($gb->getVertragsbestandteil_id()) > 0 )
|
||||
if( intval($gb->getVertragsbestandteil_id()) > 0 )
|
||||
{
|
||||
if( !isset($gbsByVBid[$gb->getVertragsbestandteil_id()])
|
||||
if( !isset($gbsByVBid[$gb->getVertragsbestandteil_id()])
|
||||
|| !is_array($gbsByVBid[$gb->getVertragsbestandteil_id()]) ) {
|
||||
$gbsByVBid[$gb->getVertragsbestandteil_id()] = array();
|
||||
}
|
||||
$gbsByVBid[$gb->getVertragsbestandteil_id()][] = $gb;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach ($vbs as $vb)
|
||||
{
|
||||
if( isset($gbsByVBid[$vb->getVertragsbestandteil_id()]) )
|
||||
if( isset($gbsByVBid[$vb->getVertragsbestandteil_id()]) )
|
||||
{
|
||||
$vb->setGehaltsbestandteile($gbsByVBid[$vb->getVertragsbestandteil_id()]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $vbs;
|
||||
}
|
||||
|
||||
@@ -113,22 +123,22 @@ class VertragsbestandteilLib
|
||||
{
|
||||
return $this->VertragsbestandteilModel->getVertragsbestandteil($vertragsbestandteil_id);
|
||||
}
|
||||
|
||||
|
||||
public function storeDienstverhaeltnis(Dienstverhaeltnis $dv)
|
||||
{
|
||||
if( intval($dv->getDienstverhaeltnis_id()) > 0 )
|
||||
{
|
||||
$this->updateDienstverhaeltnis($dv);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$this->insertDienstverhaeltnis($dv);
|
||||
$this->insertDienstverhaeltnis($dv);
|
||||
}
|
||||
}
|
||||
|
||||
public function storeVertragsbestandteil(Vertragsbestandteil $vertragsbestandteil)
|
||||
|
||||
public function storeVertragsbestandteil(Vertragsbestandteil $vertragsbestandteil)
|
||||
{
|
||||
$this->CI->db->trans_begin();
|
||||
$this->CI->db->trans_begin();
|
||||
try
|
||||
{
|
||||
$this->setUIDtoPGSQL();
|
||||
@@ -144,7 +154,7 @@ class VertragsbestandteilLib
|
||||
{
|
||||
log_message('debug', "Transaction failed");
|
||||
throw new Exception("Transaction failed");
|
||||
}
|
||||
}
|
||||
$this->CI->db->trans_commit();
|
||||
}
|
||||
catch (Exception $ex)
|
||||
@@ -152,7 +162,7 @@ class VertragsbestandteilLib
|
||||
log_message('debug', "Transaction rolled back. " . $ex->getMessage());
|
||||
$this->CI->db->trans_rollback();
|
||||
throw new Exception('Storing Vertragsbestandteil failed.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function deleteDienstverhaeltnis(Dienstverhaeltnis $dv)
|
||||
@@ -220,13 +230,13 @@ class VertragsbestandteilLib
|
||||
throw new Exception('Delete Vertragsbestandteil failed.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected function insertDienstverhaeltnis(Dienstverhaeltnis $dv)
|
||||
{
|
||||
$dv->setInsertvon($this->loggedInUser)
|
||||
->setInsertamum(strftime('%Y-%m-%d %H:%M:%S'));
|
||||
$ret = $this->DienstverhaeltnisModel->insert($dv->toStdClass());
|
||||
if( hasData($ret) )
|
||||
if( hasData($ret) )
|
||||
{
|
||||
$dv->setDienstverhaeltnis_id(getData($ret));
|
||||
}
|
||||
@@ -235,14 +245,14 @@ class VertragsbestandteilLib
|
||||
throw new Exception('error inserting dienstverhaeltnis');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected function insertVertragsbestandteil(Vertragsbestandteil $vertragsbestandteil)
|
||||
{
|
||||
$vertragsbestandteil->setInsertvon($this->loggedInUser)
|
||||
->setInsertamum(strftime('%Y-%m-%d %H:%M:%S'));
|
||||
$vertragsbestandteil->beforePersist();
|
||||
$ret = $this->VertragsbestandteilModel->insert($vertragsbestandteil->baseToStdClass());
|
||||
if( hasData($ret) )
|
||||
if( hasData($ret) )
|
||||
{
|
||||
$vertragsbestandteil->setVertragsbestandteil_id(getData($ret));
|
||||
}
|
||||
@@ -254,19 +264,19 @@ class VertragsbestandteilLib
|
||||
$specialisedModel = VertragsbestandteilFactory::getVertragsbestandteilDBModel(
|
||||
$vertragsbestandteil->getVertragsbestandteiltyp_kurzbz());
|
||||
$retspecial = $specialisedModel->insert($vertragsbestandteil->toStdClass());
|
||||
|
||||
|
||||
if(isError($retspecial) )
|
||||
{
|
||||
throw new Exception('error updating vertragsbestandteil '
|
||||
throw new Exception('error updating vertragsbestandteil '
|
||||
. $vertragsbestandteil->getVertragsbestandteiltyp_kurzbz());
|
||||
}
|
||||
|
||||
try
|
||||
|
||||
try
|
||||
{
|
||||
$gehaltsbestandteile = $vertragsbestandteil->getGehaltsbestandteile();
|
||||
$this->GehaltsbestandteilLib->storeGehaltsbestandteile($gehaltsbestandteile);
|
||||
}
|
||||
catch(Exception $ex)
|
||||
}
|
||||
catch(Exception $ex)
|
||||
{
|
||||
throw new Exception('VertragsbestandteilLib insertVertragsbestandteil '
|
||||
. 'failed to store Gehaltsbestandteile. ' . $ex->getMessage());
|
||||
@@ -278,7 +288,7 @@ class VertragsbestandteilLib
|
||||
if(!$dv->isDirty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$dv->setUpdatevon($this->loggedInUser)
|
||||
->setUpdateamum(strftime('%Y-%m-%d %H:%M:%S'));
|
||||
$ret = $this->DienstverhaeltnisModel->update($dv->getDienstverhaeltnis_id(),
|
||||
@@ -288,20 +298,20 @@ class VertragsbestandteilLib
|
||||
throw new Exception('error updating dienstverhaeltnis');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function deleteVertragsbestandteilHelper(Vertragsbestandteil $vertragsbestandteil)
|
||||
{
|
||||
|
||||
$specialisedModel = VertragsbestandteilFactory::getVertragsbestandteilDBModel(
|
||||
$vertragsbestandteil->getVertragsbestandteiltyp_kurzbz());
|
||||
$retspecial = $specialisedModel->delete($vertragsbestandteil->getVertragsbestandteil_id());
|
||||
|
||||
|
||||
if(isError($retspecial) )
|
||||
{
|
||||
throw new Exception('error deleting vertragsbestandteil '
|
||||
. $vertragsbestandteil->getVertragsbestandteiltyp_kurzbz());
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
$gehaltsbestandteile = $vertragsbestandteil->getGehaltsbestandteile();
|
||||
@@ -320,76 +330,118 @@ class VertragsbestandteilLib
|
||||
{
|
||||
throw new Exception('error deleting vertragsbestandteil');
|
||||
}
|
||||
|
||||
|
||||
$vertragsbestandteil->afterDelete();
|
||||
}
|
||||
|
||||
protected function updateVertragsbestandteil(Vertragsbestandteil $vertragsbestandteil)
|
||||
{
|
||||
if($vertragsbestandteil->isDirty()) {
|
||||
if($vertragsbestandteil->isDirty()) {
|
||||
$vertragsbestandteil->setUpdatevon($this->loggedInUser)
|
||||
->setUpdateamum(strftime('%Y-%m-%d %H:%M:%S'));
|
||||
$vertragsbestandteil->beforePersist();
|
||||
$basedata = $vertragsbestandteil->baseToStdClass();
|
||||
if( count((array) $basedata) > 0 )
|
||||
if( count((array) $basedata) > 0 )
|
||||
{
|
||||
$ret = $this->VertragsbestandteilModel->update(
|
||||
$vertragsbestandteil->getVertragsbestandteil_id(),
|
||||
$vertragsbestandteil->getVertragsbestandteil_id(),
|
||||
$basedata);
|
||||
|
||||
if(isError($ret) )
|
||||
{
|
||||
throw new Exception('error updating vertragsbestandteil');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$specialisedData = $vertragsbestandteil->toStdClass();
|
||||
if( count((array) $specialisedData) > 0 )
|
||||
if( count((array) $specialisedData) > 0 )
|
||||
{
|
||||
$specialisedModel = VertragsbestandteilFactory::getVertragsbestandteilDBModel(
|
||||
$vertragsbestandteil->getVertragsbestandteiltyp_kurzbz());
|
||||
$retspecial = $specialisedModel->update(
|
||||
$vertragsbestandteil->getVertragsbestandteil_id(),
|
||||
$vertragsbestandteil->getVertragsbestandteil_id(),
|
||||
$specialisedData);
|
||||
|
||||
if(isError($retspecial) )
|
||||
{
|
||||
throw new Exception('error updating vertragsbestandteil '
|
||||
throw new Exception('error updating vertragsbestandteil '
|
||||
. $vertragsbestandteil->getVertragsbestandteiltyp_kurzbz());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
|
||||
try
|
||||
{
|
||||
$gehaltsbestandteile = $vertragsbestandteil->getGehaltsbestandteile();
|
||||
$this->GehaltsbestandteilLib->storeGehaltsbestandteile($gehaltsbestandteile);
|
||||
}
|
||||
catch(Exception $ex)
|
||||
}
|
||||
catch(Exception $ex)
|
||||
{
|
||||
throw new Exception('VertragsbestandteilLib updateVertragsbestandteil '
|
||||
. 'failed to store Gehaltsbestandteile. ' . $ex->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public function isOverlappingExistingDV(Dienstverhaeltnis $dv)
|
||||
|
||||
public function isOverlappingExistingDV(Dienstverhaeltnis $dv)
|
||||
{
|
||||
return $this->DienstverhaeltnisModel->isOverlappingExistingDV(
|
||||
$dv->getMitarbeiter_uid(),
|
||||
$dv->getOe_kurzbz(),
|
||||
$dv->getVon(),
|
||||
$dv->getMitarbeiter_uid(),
|
||||
$dv->getOe_kurzbz(),
|
||||
$dv->getVon(),
|
||||
$dv->getBis(),
|
||||
$dv->getDienstverhaeltnis_id()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
protected function hasOtherActiveDV(Dienstverhaeltnis $dv, $duedate)
|
||||
{
|
||||
$hasotheractivedv = false;
|
||||
$result = $this->DienstverhaeltnisModel->getDVByPersonUID($dv->getMitarbeiter_uid(), null, $duedate);
|
||||
$dvs = getData($result);
|
||||
foreach ($dvs as $tmpdv)
|
||||
{
|
||||
if(intval($tmpdv->dienstverhaeltnis_id) !== intval($dv->getDienstverhaeltnis_id()))
|
||||
{
|
||||
$hasotheractivedv = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $hasotheractivedv;
|
||||
}
|
||||
|
||||
/**
|
||||
* like endDienstverhaeltnis, but also sets aktiv flag to false
|
||||
*/
|
||||
public function deactivateDienstverhaeltnis(Dienstverhaeltnis $dv, $enddate, $deactivate)
|
||||
{
|
||||
$result = $this->endDienstverhaeltnis($dv, $enddate);
|
||||
if ( $result === true)
|
||||
{
|
||||
if (!$deactivate) return $result;
|
||||
|
||||
if(!$this->hasOtherActiveDV($dv, $enddate))
|
||||
{
|
||||
$result = $this->BenutzerModel->update(
|
||||
array('uid' => $dv->getMitarbeiter_uid()),
|
||||
array(
|
||||
'aktiv' => false,
|
||||
'updateaktivam' => date('Y-m-d'),
|
||||
'updateaktivvon' => $this->loggedInUser
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function endDienstverhaeltnis(Dienstverhaeltnis $dv, $enddate)
|
||||
{
|
||||
if( $dv->getBis() !== null && $dv->getBis() < $enddate )
|
||||
if( $dv->getBis() !== null && $dv->getBis() < $enddate )
|
||||
{
|
||||
return 'Dienstverhältnis ist bereits beendet.';
|
||||
}
|
||||
|
||||
|
||||
$this->CI->db->trans_begin();
|
||||
try
|
||||
{
|
||||
@@ -401,13 +453,13 @@ class VertragsbestandteilLib
|
||||
{
|
||||
$this->GehaltsbestandteilLib->endGehaltsbestandteil($gb, $enddate);
|
||||
}
|
||||
|
||||
|
||||
$vbs = $this->fetchVertragsbestandteile($dv->getDienstverhaeltnis_id());
|
||||
foreach ($vbs as $vb)
|
||||
{
|
||||
$this->endVertragsbestandteil($vb, $enddate);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$dv->setBis($enddate);
|
||||
$this->updateDienstverhaeltnis($dv);
|
||||
|
||||
@@ -428,23 +480,23 @@ class VertragsbestandteilLib
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public function endVertragsbestandteil(Vertragsbestandteil $vertragsbestandteil, $enddate)
|
||||
{
|
||||
if( $vertragsbestandteil->getBis() !== null && $vertragsbestandteil->getBis() < $enddate )
|
||||
if( $vertragsbestandteil->getBis() !== null && $vertragsbestandteil->getBis() < $enddate )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$vertragsbestandteil->setBis($enddate);
|
||||
$this->updateVertragsbestandteil($vertragsbestandteil);
|
||||
}
|
||||
|
||||
|
||||
protected function setUIDtoPGSQL() {
|
||||
$ret = $this->VertragsbestandteilModel
|
||||
->execReadOnlyQuery('SET LOCAL pv21.uid TO \''
|
||||
->execReadOnlyQuery('SET LOCAL pv21.uid TO \''
|
||||
. $this->loggedInUser . '\'');
|
||||
if(isError($ret))
|
||||
if(isError($ret))
|
||||
{
|
||||
throw new Exception('error setting uid to pgsql');
|
||||
}
|
||||
|
||||
@@ -11,4 +11,25 @@ class Bismeldestichtag_model extends DB_Model
|
||||
$this->dbTable = 'bis.tbl_bismeldestichtag';
|
||||
$this->pk = 'meldestichtag_id';
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets last Bismeldestichtag for a Studiensemester.
|
||||
* @param $studiensemester_kurzbz
|
||||
* @return object success or error
|
||||
*/
|
||||
public function getByStudiensemester($studiensemester_kurzbz)
|
||||
{
|
||||
$query = '
|
||||
SELECT
|
||||
meldestichtag
|
||||
FROM
|
||||
bis.tbl_bismeldestichtag
|
||||
JOIN public.tbl_studiensemester USING (studiensemester_kurzbz)
|
||||
WHERE
|
||||
studiensemester_kurzbz = ?
|
||||
ORDER BY meldestichtag DESC
|
||||
LIMIT 1';
|
||||
|
||||
return $this->execQuery($query, array($studiensemester_kurzbz));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ class Prestudentstatus_model extends DB_Model
|
||||
return $this->loadWhere($where);
|
||||
}
|
||||
|
||||
public function loadLastWithStgDetails($prestudent_id, $studiensemester_kurzbz = null)
|
||||
public function loadLastWithStgDetails($prestudent_id, $studiensemester_kurzbz = null, $max_date = null)
|
||||
{
|
||||
$this->load->config('studierendenantrag');
|
||||
|
||||
@@ -375,7 +375,8 @@ class Prestudentstatus_model extends DB_Model
|
||||
|
||||
$this->addLimit(1);
|
||||
|
||||
$this->db->where_in($this->dbTable . '.status_kurzbz', $this->config->item('antrag_prestudentstatus_whitelist'));
|
||||
if ($max_date)
|
||||
$this->db->where($this->dbTable . '.insertamum <', $max_date);
|
||||
|
||||
$whereArr = [
|
||||
$this->dbTable . '.prestudent_id' => $prestudent_id,
|
||||
|
||||
@@ -116,7 +116,13 @@ class Pruefung_model extends DB_Model
|
||||
$this->addJoin('public.tbl_person pers', 'person_id');
|
||||
$this->addJoin('public.tbl_benutzer b', 's.student_uid=b.uid');
|
||||
$this->addJoin('public.tbl_studiengang g', 'ps.studiengang_kz=g.studiengang_kz');
|
||||
$this->addJoin('public.tbl_prestudentstatus pss', 'pss.prestudent_id=ps.prestudent_id AND pss.studiensemester_kurzbz=le.studiensemester_kurzbz AND pss.status_kurzbz=get_rolle_prestudent(ps.prestudent_id, le.studiensemester_kurzbz)', 'LEFT');
|
||||
$this->addJoin(
|
||||
'public.tbl_prestudentstatus pss',
|
||||
'pss.prestudent_id=ps.prestudent_id
|
||||
AND pss.studiensemester_kurzbz=le.studiensemester_kurzbz
|
||||
AND pss.status_kurzbz=get_rolle_prestudent(ps.prestudent_id, le.studiensemester_kurzbz)',
|
||||
'LEFT'
|
||||
);
|
||||
$this->addJoin('lehre.tbl_studienplan plan', 'studienplan_id', 'LEFT');
|
||||
$this->addJoin('bis.tbl_orgform o', 'COALESCE(plan.orgform_kurzbz, pss.orgform_kurzbz, g.orgform_kurzbz)=o.orgform_kurzbz');
|
||||
$this->db->join('campus.tbl_studierendenantrag a', 'ps.prestudent_id=a.prestudent_id and a.typ = ?', 'LEFT', false);
|
||||
@@ -196,6 +202,7 @@ class Pruefung_model extends DB_Model
|
||||
$this->addSelect('a.studierendenantrag_id');
|
||||
$this->addSelect('a.typ');
|
||||
$this->addSelect('campus.get_status_studierendenantrag(a.studierendenantrag_id) status');
|
||||
$this->addSelect('pss.ausbildungssemester');
|
||||
|
||||
$this->addJoin('lehre.tbl_lehreinheit le', 'lehreinheit_id');
|
||||
$this->addJoin('lehre.tbl_lehrveranstaltung lv', 'lehrveranstaltung_id');
|
||||
@@ -204,12 +211,20 @@ class Pruefung_model extends DB_Model
|
||||
$this->addJoin('public.tbl_person pers', 'person_id');
|
||||
$this->addJoin('public.tbl_benutzer b', 's.student_uid=b.uid');
|
||||
$this->addJoin('public.tbl_studiengang g', 'ps.studiengang_kz=g.studiengang_kz');
|
||||
$this->addJoin('public.tbl_prestudentstatus pss', 'pss.prestudent_id=ps.prestudent_id AND pss.studiensemester_kurzbz=le.studiensemester_kurzbz AND pss.status_kurzbz=get_rolle_prestudent(ps.prestudent_id, le.studiensemester_kurzbz)', 'LEFT');
|
||||
$this->addJoin(
|
||||
'public.tbl_prestudentstatus pss',
|
||||
'pss.prestudent_id=ps.prestudent_id
|
||||
AND pss.studiensemester_kurzbz=le.studiensemester_kurzbz
|
||||
AND pss.status_kurzbz=get_rolle_prestudent(ps.prestudent_id, le.studiensemester_kurzbz)',
|
||||
'LEFT'
|
||||
);
|
||||
$this->addJoin('lehre.tbl_studienplan plan', 'studienplan_id', 'LEFT');
|
||||
$this->addJoin('bis.tbl_orgform o', 'COALESCE(plan.orgform_kurzbz, pss.orgform_kurzbz, g.orgform_kurzbz)=o.orgform_kurzbz');
|
||||
$this->addJoin('campus.tbl_studierendenantrag a', 'ps.prestudent_id=a.prestudent_id and a.typ=' . $this->escape(Studierendenantrag_model::TYP_WIEDERHOLUNG), 'LEFT');
|
||||
|
||||
$this->db->where_in("get_rolle_prestudent(ps.prestudent_id, null)", $this->config->item('antrag_prestudentstatus_whitelist'));
|
||||
$this->addJoin(
|
||||
'campus.tbl_studierendenantrag a',
|
||||
'ps.prestudent_id=a.prestudent_id and a.typ=' . $this->escape(Studierendenantrag_model::TYP_WIEDERHOLUNG),
|
||||
'LEFT'
|
||||
);
|
||||
|
||||
$this->db->where("g.aktiv", true);
|
||||
|
||||
@@ -267,6 +282,8 @@ class Pruefung_model extends DB_Model
|
||||
|
||||
$this->db->where("b.aktiv", true);
|
||||
|
||||
$this->db->where_in("get_rolle_prestudent(ps.prestudent_id, null)", $this->config->item('antrag_prestudentstatus_whitelist'));
|
||||
|
||||
if (is_array($status)) {
|
||||
if (in_array(null, $status)) {
|
||||
$status = array_filter($status);
|
||||
|
||||
@@ -46,6 +46,8 @@ class Studierendenantrag_model extends DB_Model
|
||||
$this->addSelect('datum_wiedereinstieg');
|
||||
$this->addSelect($this->dbTable . '.typ');
|
||||
$this->addSelect('st.studierendenantrag_statustyp_kurzbz as status');
|
||||
$this->addSelect('s.insertvon as status_insertvon');
|
||||
$this->addSelect('s.insertamum as status_insertamum');
|
||||
$this->addSelect('dms_id');
|
||||
$this->addSelect('st.bezeichnung[(' . $sql . ')] as statustyp');
|
||||
|
||||
@@ -54,7 +56,13 @@ class Studierendenantrag_model extends DB_Model
|
||||
$this->addJoin('public.tbl_person', 'person_id');
|
||||
$this->addJoin('public.tbl_studiengang stg', 'p.studiengang_kz=stg.studiengang_kz');
|
||||
$this->addJoin('public.tbl_studiensemester ss', 'studiensemester_kurzbz');
|
||||
$this->addJoin('public.tbl_prestudentstatus ps', 'ps.prestudent_id=p.prestudent_id AND ps.studiensemester_kurzbz=ss.studiensemester_kurzbz AND ps.status_kurzbz=get_rolle_prestudent(p.prestudent_id, ss.studiensemester_kurzbz)', 'LEFT');
|
||||
$this->addJoin(
|
||||
'public.tbl_prestudentstatus ps',
|
||||
'ps.prestudent_id=p.prestudent_id
|
||||
AND ps.studiensemester_kurzbz=ss.studiensemester_kurzbz
|
||||
AND ps.status_kurzbz=get_rolle_prestudent(p.prestudent_id, ss.studiensemester_kurzbz)',
|
||||
'LEFT'
|
||||
);
|
||||
$this->addJoin('lehre.tbl_studienplan plan', 'studienplan_id', 'LEFT');
|
||||
$this->addJoin('bis.tbl_orgform of', 'of.orgform_kurzbz=COALESCE(plan.orgform_kurzbz, ps.orgform_kurzbz, stg.orgform_kurzbz)');
|
||||
$this->addJoin(
|
||||
@@ -76,7 +84,9 @@ class Studierendenantrag_model extends DB_Model
|
||||
|
||||
public function loadActiveForStudiengaenge($studiengaenge)
|
||||
{
|
||||
// NOTE(chris): get language before changing things in the global db object because getUserLanguage() might use it and it should not have been tampered with
|
||||
// NOTE(chris): get language before changing things in the global
|
||||
// db object because getUserLanguage() might use it and it should
|
||||
// not have been tampered with
|
||||
$sql = "SELECT index FROM public.tbl_sprache WHERE sprache='" . getUserLanguage() . "' LIMIT 1";
|
||||
|
||||
$this->db->group_start();
|
||||
@@ -85,7 +95,8 @@ class Studierendenantrag_model extends DB_Model
|
||||
Studierendenantragstatus_model::STATUS_APPROVED,
|
||||
Studierendenantragstatus_model::STATUS_REJECTED,
|
||||
Studierendenantragstatus_model::STATUS_OBJECTION_DENIED,
|
||||
Studierendenantragstatus_model::STATUS_DEREGISTERED
|
||||
Studierendenantragstatus_model::STATUS_DEREGISTERED,
|
||||
Studierendenantragstatus_model::STATUS_PAUSE
|
||||
]);
|
||||
$this->db->or_group_start();
|
||||
$this->db->where('s.studierendenantrag_statustyp_kurzbz', Studierendenantragstatus_model::STATUS_APPROVED);
|
||||
@@ -133,12 +144,18 @@ class Studierendenantrag_model extends DB_Model
|
||||
$lang = 'SELECT index FROM public.tbl_sprache WHERE sprache=' . $this->escape(getUserLanguage());
|
||||
|
||||
$this->addSelect('*');
|
||||
$this->addSelect('campus.get_status_studierendenantrag(studierendenantrag_id) status');
|
||||
$this->addSelect($this->dbTable . '.grund AS grund');
|
||||
$this->addSelect('s.studierendenantrag_statustyp_kurzbz status');
|
||||
$this->addSelect('s.insertvon status_insertvon');
|
||||
$this->addSelect('t.bezeichnung[(' . $lang . ')] statustyp');
|
||||
|
||||
$this->addJoin(
|
||||
'campus.tbl_studierendenantrag_status s',
|
||||
'campus.get_status_id_studierendenantrag(' . $this->dbTable . '.studierendenantrag_id)=s.studierendenantrag_status_id'
|
||||
);
|
||||
$this->addJoin(
|
||||
'campus.tbl_studierendenantrag_statustyp t',
|
||||
'campus.get_status_studierendenantrag(studierendenantrag_id)=t.studierendenantrag_statustyp_kurzbz'
|
||||
's.studierendenantrag_statustyp_kurzbz=t.studierendenantrag_statustyp_kurzbz'
|
||||
);
|
||||
|
||||
if ($types && is_array($types)) {
|
||||
@@ -168,7 +185,11 @@ class Studierendenantrag_model extends DB_Model
|
||||
|
||||
$this->addJoin(
|
||||
'public.tbl_prestudentstatus s',
|
||||
$this->dbTable . '.prestudent_id=s.prestudent_id AND ' . $this->dbTable . '.studiensemester_kurzbz=s.studiensemester_kurzbz'
|
||||
$this->dbTable . '.prestudent_id=s.prestudent_id
|
||||
AND ' .
|
||||
$this->dbTable . '.studiensemester_kurzbz=s.studiensemester_kurzbz
|
||||
AND ' .
|
||||
$this->dbTable . '.insertamum > s.insertamum'
|
||||
);
|
||||
$this->addJoin('public.tbl_prestudent p', $this->dbTable . '.prestudent_id=p.prestudent_id');
|
||||
$this->addJoin('public.tbl_studiengang stg', 'studiengang_kz', 'LEFT');
|
||||
@@ -180,8 +201,6 @@ class Studierendenantrag_model extends DB_Model
|
||||
|
||||
$this->addLimit(1);
|
||||
|
||||
$this->db->where_in('s.status_kurzbz', $this->config->item('antrag_prestudentstatus_whitelist'));
|
||||
|
||||
return $this->loadWhere([
|
||||
$this->pk => $antrag_id
|
||||
]);
|
||||
@@ -233,20 +252,45 @@ class Studierendenantrag_model extends DB_Model
|
||||
$this->addSelect($this->dbTable . '.datum_wiedereinstieg');
|
||||
$this->addSelect($this->dbTable . '.grund');
|
||||
$this->addSelect($this->dbTable . '.dms_id');
|
||||
$this->addSelect("(SELECT count(1) FROM campus.tbl_studierendenantrag_status WHERE studierendenantrag_id = " . $this->dbTable . ".studierendenantrag_id AND studierendenantrag_statustyp_kurzbz = 'Genehmigt') AS isapproved", false);
|
||||
$this->addSelect('s.insertvon AS status_insertvon');
|
||||
$this->addSelect(
|
||||
"(SELECT count(1) FROM campus.tbl_studierendenantrag_status WHERE studierendenantrag_id = " .
|
||||
$this->dbTable .
|
||||
".studierendenantrag_id AND studierendenantrag_statustyp_kurzbz = 'Genehmigt') AS isapproved",
|
||||
false
|
||||
);
|
||||
|
||||
$this->addJoin('public.tbl_prestudent p', 'prestudent_id', 'RIGHT');
|
||||
$this->addJoin('public.tbl_studiengang stg', 'p.studiengang_kz=stg.studiengang_kz');
|
||||
$this->addJoin('public.tbl_prestudentstatus ps', 'ps.prestudent_id=p.prestudent_id AND ps.studiensemester_kurzbz=' . $this->dbTable . '.studiensemester_kurzbz AND ps.status_kurzbz=get_rolle_prestudent(p.prestudent_id, ' . $this->dbTable . '.studiensemester_kurzbz)', 'LEFT');
|
||||
$this->addJoin(
|
||||
'public.tbl_prestudentstatus ps',
|
||||
'ps.prestudent_id=p.prestudent_id AND ps.studiensemester_kurzbz=' .
|
||||
$this->dbTable .
|
||||
'.studiensemester_kurzbz AND ps.status_kurzbz=get_rolle_prestudent(p.prestudent_id, ' .
|
||||
$this->dbTable .
|
||||
'.studiensemester_kurzbz)',
|
||||
'LEFT'
|
||||
);
|
||||
$this->addJoin('lehre.tbl_studienplan plan', 'studienplan_id', 'LEFT');
|
||||
$this->addJoin('bis.tbl_orgform of', 'of.orgform_kurzbz=COALESCE(plan.orgform_kurzbz, ps.orgform_kurzbz, stg.orgform_kurzbz)');
|
||||
$this->addJoin(
|
||||
'campus.tbl_studierendenantrag_status s',
|
||||
'campus.get_status_id_studierendenantrag(' . $this->dbTable . '.studierendenantrag_id)=s.studierendenantrag_status_id',
|
||||
'LEFT'
|
||||
);
|
||||
$this->addJoin(
|
||||
'campus.tbl_studierendenantrag_statustyp st',
|
||||
'campus.get_status_studierendenantrag(studierendenantrag_id)=st.studierendenantrag_statustyp_kurzbz',
|
||||
's.studierendenantrag_statustyp_kurzbz=st.studierendenantrag_statustyp_kurzbz',
|
||||
'LEFT'
|
||||
);
|
||||
|
||||
$this->db->where("(SELECT status_kurzbz FROM public.tbl_prestudentstatus WHERE prestudent_id=p.prestudent_id AND status_kurzbz='Student' LIMIT 1) IS NOT NULL", null, false);
|
||||
$this->db->where("(
|
||||
SELECT status_kurzbz
|
||||
FROM public.tbl_prestudentstatus
|
||||
WHERE prestudent_id=p.prestudent_id
|
||||
AND status_kurzbz='Student'
|
||||
LIMIT 1
|
||||
) IS NOT NULL", null, false);
|
||||
|
||||
|
||||
return $this->loadWhere([
|
||||
@@ -287,4 +331,144 @@ class Studierendenantrag_model extends DB_Model
|
||||
|
||||
return $this->loadWhere($where);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the Prestudent has an active Unterbrechung between
|
||||
* the start of the given semester and the given enddate.
|
||||
* If the enddate is omitted the end of the given semester is used.
|
||||
*
|
||||
* @param integer $prestudent_id
|
||||
* @param string $studiensemester_kurzbz
|
||||
* @param string $enddate (optional)
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasRunningUnterbrechungBetween($prestudent_id, $studiensemester, $enddate = null)
|
||||
{
|
||||
$start = '(SELECT start FROM public.tbl_studiensemester WHERE studiensemester_kurzbz=' . $this->db->escape($studiensemester) . ')';
|
||||
$end = $enddate
|
||||
? $this->db->escape($enddate)
|
||||
: '(SELECT ende FROM public.tbl_studiensemester WHERE studiensemester_kurzbz=' . $this->db->escape($studiensemester) . ')';
|
||||
|
||||
$this->addJoin('public.tbl_studiensemester', 'studiensemester_kurzbz');
|
||||
$this->db->where([
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'typ' => Studierendenantrag_model::TYP_UNTERBRECHUNG,
|
||||
'campus.get_status_studierendenantrag(studierendenantrag_id) !=' => Studierendenantragstatus_model::STATUS_CANCELLED,
|
||||
'start < ' . $end => null,
|
||||
'datum_wiedereinstieg > ' . $start => null,
|
||||
]);
|
||||
return (boolean)$this->db->count_all_results($this->dbTable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets free semester slots for a new Unterbrechung.
|
||||
*
|
||||
* @param integer $prestudent_id
|
||||
* @param string $studiensemester_kurzbz (optional)
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
public function getFreeSlotsForUnterbrechung($prestudent_id, $studiensemester = null)
|
||||
{
|
||||
$max_starters = 2;
|
||||
$max_length = max(
|
||||
2,
|
||||
(integer)$this->config->item('unterbrecher_semester_max_length')
|
||||
);
|
||||
|
||||
|
||||
$subquery = '';
|
||||
if ($studiensemester)
|
||||
$subquery = 'SELECT start FROM public.tbl_studiensemester WHERE studiensemester_kurzbz=?';
|
||||
else
|
||||
$subquery = 'SELECT start FROM public.tbl_studiensemester WHERE studiensemester_kurzbz=public.get_stdsem_prestudent (?, null)';
|
||||
|
||||
$sql = "WITH numbered_sems AS (
|
||||
SELECT
|
||||
a.studienjahr_kurzbz AS studienjahr_kurzbz,
|
||||
a.studiensemester_kurzbz AS von,
|
||||
b.studiensemester_kurzbz AS bis,
|
||||
a.start AS start,
|
||||
b.start AS ende,
|
||||
ROW_NUMBER() OVER (
|
||||
PARTITION BY a.studiensemester_kurzbz
|
||||
ORDER BY b.start
|
||||
) AS row_number
|
||||
FROM public.tbl_studiensemester a
|
||||
LEFT JOIN public.tbl_studiensemester b ON (b.start > a.ende)
|
||||
),
|
||||
last_sems AS (
|
||||
SELECT *
|
||||
FROM numbered_sems
|
||||
WHERE numbered_sems.row_number <= ?
|
||||
)
|
||||
SELECT s.von, s.bis, s.start, s.ende, studierendenantrag_id, studienjahr_kurzbz
|
||||
FROM last_sems s
|
||||
LEFT JOIN (
|
||||
SELECT studierendenantrag_id, start, datum_wiedereinstieg AS ende
|
||||
FROM campus.tbl_studierendenantrag
|
||||
LEFT JOIN public.tbl_studiensemester USING(studiensemester_kurzbz)
|
||||
WHERE typ=?
|
||||
AND campus.get_status_studierendenantrag(studierendenantrag_id) != ?
|
||||
AND prestudent_id=?
|
||||
) a ON (s.start < a.ende AND s.ende > a.start)
|
||||
WHERE s.start >= (" . $subquery . ")
|
||||
ORDER BY s.start, s.ende
|
||||
LIMIT ?;";
|
||||
|
||||
return $this->execQuery($sql, [
|
||||
$max_length,
|
||||
self::TYP_UNTERBRECHUNG,
|
||||
Studierendenantragstatus_model::STATUS_CANCELLED,
|
||||
$prestudent_id,
|
||||
$studiensemester ?: $prestudent_id,
|
||||
$max_length * $max_starters
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if an Antrag is manually paused
|
||||
*
|
||||
* @param integer $antrag_id
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isManuallyPaused($antrag_id)
|
||||
{
|
||||
$this->addJoin(
|
||||
'campus.tbl_studierendenantrag_status s',
|
||||
'campus.get_status_id_studierendenantrag(' . $this->dbTable . '.studierendenantrag_id)=s.studierendenantrag_status_id'
|
||||
);
|
||||
|
||||
$this->db->where([
|
||||
's.studierendenantrag_id' => $antrag_id,
|
||||
's.studierendenantrag_statustyp_kurzbz' => Studierendenantragstatus_model::STATUS_PAUSE
|
||||
]);
|
||||
|
||||
$this->db->group_start();
|
||||
$this->db->where_not_in('s.insertvon', [
|
||||
Studierendenantragstatus_model::INSERTVON_DEREGISTERED,
|
||||
Studierendenantragstatus_model::INSERTVON_ABMELDUNGSTGL
|
||||
]);
|
||||
$this->db->or_group_start();
|
||||
$this->db->where('s.insertvon', Studierendenantragstatus_model::INSERTVON_ABMELDUNGSTGL);
|
||||
$this->db->where('1 !=', '(
|
||||
SELECT COUNT(*)%2
|
||||
FROM campus.tbl_studierendenantrag_status i
|
||||
WHERE i.studierendenantrag_id = s.studierendenantrag_id
|
||||
AND i.insertamum > (
|
||||
SELECT ii.insertamum
|
||||
FROM campus.tbl_studierendenantrag_status ii
|
||||
WHERE ii.studierendenantrag_id = s.studierendenantrag_id
|
||||
AND ii.insertvon <> ' . $this->escape(Studierendenantragstatus_model::INSERTVON_ABMELDUNGSTGL) . '
|
||||
ORDER BY ii.insertamum DESC
|
||||
LIMIT 1
|
||||
)
|
||||
)', false);
|
||||
$this->db->group_end();
|
||||
$this->db->group_end();
|
||||
|
||||
return hasData($this->load());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,10 @@ class Studierendenantragstatus_model extends DB_Model
|
||||
const STATUS_OBJECTED = 'Beeinsprucht';
|
||||
const STATUS_OBJECTION_DENIED = 'EinspruchAbgelehnt';
|
||||
const STATUS_DEREGISTERED = 'Abgemeldet';
|
||||
const STATUS_PAUSE = 'Pause';
|
||||
|
||||
const INSERTVON_ABMELDUNGSTGL = "AbmeldungStgl";
|
||||
const INSERTVON_DEREGISTERED = "Studienabbruch";
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@@ -49,4 +53,157 @@ class Studierendenantragstatus_model extends DB_Model
|
||||
|
||||
return $this->loadWhere($where);
|
||||
}
|
||||
|
||||
public function stopAntraegeForAbmeldungStgl($antrag_id)
|
||||
{
|
||||
$sql = 'INSERT INTO campus.tbl_studierendenantrag_status
|
||||
(studierendenantrag_id, studierendenantrag_statustyp_kurzbz, insertvon, insertamum)
|
||||
SELECT studierendenantrag_id, ?, ?, (
|
||||
SELECT insertamum
|
||||
FROM campus.tbl_studierendenantrag_status
|
||||
WHERE studierendenantrag_status_id = campus.get_status_id_studierendenantrag(?)
|
||||
)
|
||||
FROM campus.tbl_studierendenantrag
|
||||
WHERE prestudent_id = (
|
||||
SELECT prestudent_id
|
||||
FROM campus.tbl_studierendenantrag
|
||||
WHERE studierendenantrag_id = ?
|
||||
)
|
||||
AND studierendenantrag_id <> ?
|
||||
AND (
|
||||
(
|
||||
typ = ?
|
||||
AND campus.get_status_studierendenantrag(studierendenantrag_id) IN ?
|
||||
) OR (
|
||||
typ = ?
|
||||
AND campus.get_status_studierendenantrag(studierendenantrag_id) IN ?
|
||||
) OR (
|
||||
typ = ?
|
||||
AND campus.get_status_studierendenantrag(studierendenantrag_id) IN ?
|
||||
)
|
||||
)';
|
||||
|
||||
return $this->execQuery($sql, [
|
||||
self::STATUS_PAUSE,
|
||||
self::INSERTVON_ABMELDUNGSTGL,
|
||||
$antrag_id,
|
||||
$antrag_id,
|
||||
$antrag_id,
|
||||
Studierendenantrag_model::TYP_ABMELDUNG,
|
||||
[
|
||||
Studierendenantragstatus_model::STATUS_CREATED
|
||||
],
|
||||
Studierendenantrag_model::TYP_UNTERBRECHUNG,
|
||||
[
|
||||
Studierendenantragstatus_model::STATUS_CREATED
|
||||
],
|
||||
Studierendenantrag_model::TYP_WIEDERHOLUNG,
|
||||
[
|
||||
Studierendenantragstatus_model::STATUS_REQUESTSENT_1,
|
||||
Studierendenantragstatus_model::STATUS_REQUESTSENT_2,
|
||||
Studierendenantragstatus_model::STATUS_CREATED,
|
||||
Studierendenantragstatus_model::STATUS_LVSASSIGNED,
|
||||
Studierendenantragstatus_model::STATUS_PAUSE
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
public function resumeAntraegeForAbmeldungStgl($antrag_id)
|
||||
{
|
||||
$sql = 'INSERT INTO campus.tbl_studierendenantrag_status
|
||||
(studierendenantrag_id, studierendenantrag_statustyp_kurzbz, insertvon, insertamum)
|
||||
SELECT studierendenantrag_id, (
|
||||
SELECT studierendenantrag_statustyp_kurzbz
|
||||
FROM campus.tbl_studierendenantrag_status s
|
||||
WHERE s.studierendenantrag_id=a.studierendenantrag_id
|
||||
AND campus.get_status_id_studierendenantrag(a.studierendenantrag_id) <> studierendenantrag_status_id
|
||||
ORDER BY insertamum DESC
|
||||
LIMIT 1
|
||||
), ?, (
|
||||
SELECT insertamum
|
||||
FROM campus.tbl_studierendenantrag_status
|
||||
WHERE studierendenantrag_status_id = campus.get_status_id_studierendenantrag(?)
|
||||
)
|
||||
FROM campus.tbl_studierendenantrag a
|
||||
WHERE prestudent_id = (
|
||||
SELECT prestudent_id
|
||||
FROM campus.tbl_studierendenantrag
|
||||
WHERE studierendenantrag_id = ?
|
||||
)
|
||||
AND typ <> ?
|
||||
AND campus.get_status_studierendenantrag(studierendenantrag_id) = ?
|
||||
';
|
||||
|
||||
return $this->execQuery($sql, [
|
||||
self::INSERTVON_ABMELDUNGSTGL,
|
||||
$antrag_id,
|
||||
$antrag_id,
|
||||
Studierendenantrag_model::TYP_ABMELDUNG_STGL,
|
||||
Studierendenantragstatus_model::STATUS_PAUSE
|
||||
]);
|
||||
}
|
||||
|
||||
public function stopAntraegeForAbbruchBy($antrag_id)
|
||||
{
|
||||
$sql = 'INSERT INTO campus.tbl_studierendenantrag_status
|
||||
(studierendenantrag_id, studierendenantrag_statustyp_kurzbz, insertvon, insertamum)
|
||||
SELECT studierendenantrag_id, ?, ?, (
|
||||
SELECT insertamum
|
||||
FROM campus.tbl_studierendenantrag_status
|
||||
WHERE studierendenantrag_status_id = campus.get_status_id_studierendenantrag(?)
|
||||
)
|
||||
FROM campus.tbl_studierendenantrag
|
||||
WHERE prestudent_id = (
|
||||
SELECT prestudent_id
|
||||
FROM campus.tbl_studierendenantrag
|
||||
WHERE studierendenantrag_id = ?
|
||||
)
|
||||
AND studierendenantrag_id <> ?
|
||||
AND (
|
||||
(
|
||||
typ = ?
|
||||
AND campus.get_status_studierendenantrag(studierendenantrag_id) NOT IN ?
|
||||
) OR (
|
||||
typ = ?
|
||||
AND campus.get_status_studierendenantrag(studierendenantrag_id) NOT IN ?
|
||||
) OR (
|
||||
typ = ?
|
||||
AND campus.get_status_studierendenantrag(studierendenantrag_id) NOT IN ?
|
||||
) OR (
|
||||
typ = ?
|
||||
AND campus.get_status_studierendenantrag(studierendenantrag_id) NOT IN ?
|
||||
)
|
||||
)';
|
||||
|
||||
return $this->execQuery($sql, [
|
||||
self::STATUS_PAUSE,
|
||||
self::INSERTVON_DEREGISTERED,
|
||||
$antrag_id,
|
||||
$antrag_id,
|
||||
$antrag_id,
|
||||
Studierendenantrag_model::TYP_ABMELDUNG,
|
||||
[
|
||||
Studierendenantragstatus_model::STATUS_APPROVED,
|
||||
Studierendenantragstatus_model::STATUS_CANCELLED
|
||||
],
|
||||
Studierendenantrag_model::TYP_UNTERBRECHUNG,
|
||||
[
|
||||
Studierendenantragstatus_model::STATUS_APPROVED,
|
||||
Studierendenantragstatus_model::STATUS_CANCELLED,
|
||||
Studierendenantragstatus_model::STATUS_REMINDERSENT,
|
||||
Studierendenantragstatus_model::STATUS_REJECTED
|
||||
],
|
||||
Studierendenantrag_model::TYP_ABMELDUNG_STGL,
|
||||
[
|
||||
Studierendenantragstatus_model::STATUS_CANCELLED,
|
||||
Studierendenantragstatus_model::STATUS_DEREGISTERED,
|
||||
Studierendenantragstatus_model::STATUS_OBJECTION_DENIED
|
||||
],
|
||||
Studierendenantrag_model::TYP_WIEDERHOLUNG,
|
||||
[
|
||||
Studierendenantragstatus_model::STATUS_DEREGISTERED,
|
||||
Studierendenantragstatus_model::STATUS_APPROVED
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -610,7 +610,7 @@ class Studiengang_model extends DB_Model
|
||||
$this->addJoin('public.tbl_student stud', 'p.prestudent_id=stud.prestudent_id', 'LEFT');
|
||||
|
||||
$this->db->where_in($this->dbTable . '.studiengang_kz', $studiengang_kzs);
|
||||
$this->db->where_in('ps.status_kurzbz', $this->config->item('antrag_prestudentstatus_whitelist'));
|
||||
$this->db->where_in('ps.status_kurzbz', $this->config->item('antrag_prestudentstatus_whitelist_abmeldung'));
|
||||
$this->db->where($this->dbTable . ".aktiv", true);
|
||||
|
||||
if ($not_antrag_typ !== null && is_array($not_antrag_typ)) {
|
||||
|
||||
@@ -21,4 +21,26 @@ class Zeitaufzeichnung_model extends DB_Model
|
||||
|
||||
return $this->execQuery($qry);
|
||||
}
|
||||
|
||||
public function getFullInterval($uid, $fromDate, $toDate)
|
||||
{
|
||||
$qry = <<<EOL
|
||||
SELECT d.dates, z.*
|
||||
FROM
|
||||
(SELECT
|
||||
*, to_char ((ende-start),'HH24:MI') as diff,
|
||||
(SELECT (to_char(sum(ende-start),'DD')::integer)*24+to_char(sum(ende-start),'HH24')::integer || ':' || to_char(sum(ende-start),'MI')
|
||||
FROM campus.tbl_zeitaufzeichnung
|
||||
WHERE uid=? and start between ? AND ?) as summe
|
||||
FROM campus.tbl_zeitaufzeichnung
|
||||
WHERE uid=? AND (aktivitaet_kurzbz != 'DienstreiseMT' or aktivitaet_kurzbz is null) AND start between ? AND ?) as z
|
||||
|
||||
RIGHT JOIN (select generate_series ( ?::timestamp , ?::timestamp , '1 day'::interval) :: date as dates) d on date(z.ende) = d.dates
|
||||
|
||||
ORDER BY d.dates desc, z.start desc
|
||||
EOL;
|
||||
|
||||
|
||||
return $this->execQuery($qry, array($uid, $fromDate, $toDate, $uid, $fromDate, $toDate, $fromDate, $toDate));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ class Dienstverhaeltnis_model extends DB_Model
|
||||
$result = null;
|
||||
|
||||
$qry = "
|
||||
SELECT
|
||||
SELECT
|
||||
dv.dienstverhaeltnis_id,
|
||||
tbl_benutzer.uid,
|
||||
tbl_mitarbeiter.personalnummer,
|
||||
@@ -30,8 +30,8 @@ class Dienstverhaeltnis_model extends DB_Model
|
||||
org.oe_kurzbz,
|
||||
org.bezeichnung oe_bezeichnung,
|
||||
dv.von,
|
||||
dv.bis,
|
||||
dv.vertragsart_kurzbz,
|
||||
dv.bis,
|
||||
dv.vertragsart_kurzbz,
|
||||
dv.updateamum,
|
||||
dv.updatevon
|
||||
FROM tbl_mitarbeiter
|
||||
@@ -59,13 +59,13 @@ class Dienstverhaeltnis_model extends DB_Model
|
||||
";
|
||||
|
||||
return $this->execQuery($qry, $data);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function getDVByID($dvid) {
|
||||
$this->addSelect('hr.tbl_dienstverhaeltnis.*, public.tbl_organisationseinheit.bezeichnung as unternehmen');
|
||||
$this->addJoin('public.tbl_organisationseinheit', 'hr.tbl_dienstverhaeltnis.oe_kurzbz = public.tbl_organisationseinheit.oe_kurzbz');
|
||||
$result = $this->load($dvid);
|
||||
$result = $this->load($dvid);
|
||||
|
||||
if (hasData($result)) {
|
||||
return $result;
|
||||
@@ -81,7 +81,7 @@ class Dienstverhaeltnis_model extends DB_Model
|
||||
$datestring = $date->format("Y-m-d");
|
||||
|
||||
$qry = "
|
||||
SELECT
|
||||
SELECT
|
||||
dv.dienstverhaeltnis_id,
|
||||
tbl_benutzer.uid,
|
||||
tbl_mitarbeiter.personalnummer,
|
||||
@@ -115,26 +115,26 @@ class Dienstverhaeltnis_model extends DB_Model
|
||||
$params = array_merge($params, array($dvid, $dvid));
|
||||
$dvidclause = <<<EODVIDC
|
||||
AND (
|
||||
SELECT
|
||||
COUNT(*) AS karenzen
|
||||
FROM
|
||||
hr.tbl_vertragsbestandteil vb
|
||||
WHERE
|
||||
SELECT
|
||||
COUNT(*) AS karenzen
|
||||
FROM
|
||||
hr.tbl_vertragsbestandteil vb
|
||||
WHERE
|
||||
vb.dienstverhaeltnis_id = ?
|
||||
AND
|
||||
vb.vertragsbestandteiltyp_kurzbz = 'karenz'
|
||||
AND
|
||||
dv.von::date >= COALESCE(vb.von, '1970-01-01'::date)
|
||||
AND
|
||||
COALESCE(dv.bis::date, '2170-12-31'::date) <= COALESCE(vb.bis, '2170-12-31')
|
||||
AND
|
||||
vb.vertragsbestandteiltyp_kurzbz = 'karenz'
|
||||
AND
|
||||
dv.von::date >= COALESCE(vb.von, '1970-01-01'::date)
|
||||
AND
|
||||
COALESCE(dv.bis::date, '2170-12-31'::date) <= COALESCE(vb.bis, '2170-12-31')
|
||||
) = 0
|
||||
AND dv.dienstverhaeltnis_id != ?
|
||||
EODVIDC;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$query = <<<EOSQL
|
||||
SELECT
|
||||
SELECT
|
||||
count(*) AS dvcount
|
||||
FROM
|
||||
hr.tbl_dienstverhaeltnis dv
|
||||
@@ -142,35 +142,104 @@ EODVIDC;
|
||||
dv.mitarbeiter_uid = ?
|
||||
AND
|
||||
dv.oe_kurzbz = ?
|
||||
AND
|
||||
dv.vertragsart_kurzbz != 'werkvertrag'
|
||||
AND
|
||||
dv.vertragsart_kurzbz NOT IN ('werkvertrag', 'studentischehilfskr')
|
||||
AND
|
||||
?::date <= COALESCE(dv.bis, '2170-12-31'::date)
|
||||
AND
|
||||
COALESCE(?::date, '2170-12-31'::date) >= dv.von
|
||||
AND
|
||||
COALESCE(?::date, '2170-12-31'::date) >= dv.von
|
||||
AND (
|
||||
SELECT
|
||||
COUNT(*) AS karenzen
|
||||
FROM
|
||||
hr.tbl_vertragsbestandteil vb
|
||||
WHERE
|
||||
SELECT
|
||||
COUNT(*) AS karenzen
|
||||
FROM
|
||||
hr.tbl_vertragsbestandteil vb
|
||||
WHERE
|
||||
vb.dienstverhaeltnis_id = dv.dienstverhaeltnis_id
|
||||
AND
|
||||
vb.vertragsbestandteiltyp_kurzbz = 'karenz'
|
||||
AND
|
||||
?::date >= COALESCE(vb.von, '1970-01-01'::date)
|
||||
AND
|
||||
COALESCE(?::date, '2170-12-31'::date) <= COALESCE(vb.bis, '2170-12-31')
|
||||
) = 0
|
||||
AND
|
||||
vb.vertragsbestandteiltyp_kurzbz = 'karenz'
|
||||
AND
|
||||
?::date >= COALESCE(vb.von, '1970-01-01'::date)
|
||||
AND
|
||||
COALESCE(?::date, '2170-12-31'::date) <= COALESCE(vb.bis, '2170-12-31')
|
||||
) = 0
|
||||
{$dvidclause}
|
||||
EOSQL;
|
||||
|
||||
|
||||
$ret = $this->execReadOnlyQuery($query, $params);
|
||||
|
||||
|
||||
if( ($dvcount = getData($ret)) && ($dvcount[0]->dvcount > 0) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function getDVByPersonUIDOverlapping($uid, $oe_kurzbz=null, $beginn=null, $ende=null)
|
||||
{
|
||||
$result = null;
|
||||
|
||||
$qry = "
|
||||
SELECT
|
||||
dv.dienstverhaeltnis_id,
|
||||
tbl_benutzer.uid,
|
||||
tbl_mitarbeiter.personalnummer,
|
||||
tbl_mitarbeiter.kurzbz,
|
||||
tbl_mitarbeiter.lektor,
|
||||
tbl_mitarbeiter.fixangestellt,
|
||||
tbl_person.person_id,
|
||||
tbl_benutzer.alias,
|
||||
org.oe_kurzbz,
|
||||
org.bezeichnung oe_bezeichnung,
|
||||
dv.von,
|
||||
dv.bis,
|
||||
dv.vertragsart_kurzbz,
|
||||
dv.updateamum,
|
||||
dv.updatevon
|
||||
FROM tbl_mitarbeiter
|
||||
JOIN tbl_benutzer ON tbl_mitarbeiter.mitarbeiter_uid::text = tbl_benutzer.uid::text
|
||||
JOIN tbl_person USING (person_id)
|
||||
JOIN hr.tbl_dienstverhaeltnis dv ON(tbl_benutzer.uid::text = dv.mitarbeiter_uid::text)
|
||||
JOIN public.tbl_organisationseinheit org USING(oe_kurzbz)
|
||||
WHERE tbl_benutzer.uid=?";
|
||||
$data = array($uid);
|
||||
|
||||
if(!is_null($oe_kurzbz))
|
||||
{
|
||||
$qry.=" AND oe_kurzbz=?";
|
||||
$data[] = $oe_kurzbz;
|
||||
}
|
||||
|
||||
if (!is_null($beginn) && !is_null($ende))
|
||||
{
|
||||
$qry.=" AND (?,?) OVERLAPS (dv.von, COALESCE(dv.bis, '2999-12-31'))";
|
||||
$data[] = $beginn;
|
||||
$data[] = $ende;
|
||||
}
|
||||
|
||||
$qry .="
|
||||
ORDER BY dv.von desc
|
||||
";
|
||||
|
||||
return $this->execQuery($qry, $data);
|
||||
|
||||
}
|
||||
|
||||
public function fetchDienstverhaeltnisse($unternehmen, $stichtag=null, $mitarbeiteruid=null) {
|
||||
$where = "oe_kurzbz = " . $this->escape($unternehmen);
|
||||
if( !is_null($stichtag) )
|
||||
{
|
||||
$where .= " AND " . $this->escape($stichtag) . " BETWEEN COALESCE(von, '1970-01-01') AND COALESCE(bis, '2070-12-31')";
|
||||
}
|
||||
if( !is_null($mitarbeiteruid) )
|
||||
{
|
||||
$where .= " AND mitarbeiter_uid = " . $this->escape($mitarbeiteruid);
|
||||
}
|
||||
$res = $this->loadWhere($where);
|
||||
$dvs = array();
|
||||
if(hasData($res) )
|
||||
{
|
||||
$dvs = getData($res);
|
||||
}
|
||||
return $dvs;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
// NOTE(chris): For security reasons 404 will be displayed the same everywhere
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>404 Page Not Found</title>
|
||||
<style type="text/css">
|
||||
|
||||
::selection { background-color: #E13300; color: white; }
|
||||
::-moz-selection { background-color: #E13300; color: white; }
|
||||
|
||||
body {
|
||||
background-color: #fff;
|
||||
margin: 40px;
|
||||
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
||||
color: #4F5155;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #003399;
|
||||
background-color: transparent;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #444;
|
||||
background-color: transparent;
|
||||
border-bottom: 1px solid #D0D0D0;
|
||||
font-size: 19px;
|
||||
font-weight: normal;
|
||||
margin: 0 0 14px 0;
|
||||
padding: 14px 15px 10px 15px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||
font-size: 12px;
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #D0D0D0;
|
||||
color: #002166;
|
||||
display: block;
|
||||
margin: 14px 0 14px 0;
|
||||
padding: 12px 10px 12px 10px;
|
||||
}
|
||||
|
||||
#container {
|
||||
margin: 10px;
|
||||
border: 1px solid #D0D0D0;
|
||||
box-shadow: 0 0 8px #D0D0D0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 12px 15px 12px 15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<h1><?php echo $heading; ?></h1>
|
||||
<?php echo $message; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
global $g_result;
|
||||
|
||||
// NOTE(chris): remove p tags from CI_Exceptions::show_error() function
|
||||
$msg = substr($message, 3);
|
||||
$msg = substr($msg, 0, -4);
|
||||
$msg = explode('</p><p>', $msg);
|
||||
|
||||
$msgs = [];
|
||||
|
||||
$error = [
|
||||
'heading' => $heading
|
||||
];
|
||||
|
||||
/** NOTE(chris): extract Error Number and SQL
|
||||
* @see: DB_driver.php:692
|
||||
*/
|
||||
if (substr(current($msg), 0, 14) == 'Error Number: ') {
|
||||
$code = substr(array_shift($msg), 14);
|
||||
if ($code)
|
||||
$error['code'] = (int)$code;
|
||||
$msgs[] = array_shift($msg);
|
||||
$error['sql'] = array_shift($msg);
|
||||
}
|
||||
|
||||
/** NOTE(chris): extract Line Number and Filename
|
||||
* @see: DB_driver.php:1782
|
||||
* @see: DB_driver.php:1783
|
||||
*/
|
||||
if (count($msg) >= 2) {
|
||||
if (substr(end($msg), 0, 13) == 'Line Number: ' && substr(prev($msg), 0, 10) == 'Filename: ') {
|
||||
$error['line'] = (int)substr(array_pop($msg), 13);
|
||||
$error['filename'] = substr(array_pop($msg), 10);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($msg as $m)
|
||||
$msgs[] = $m;
|
||||
|
||||
|
||||
if (count($msgs) == 1)
|
||||
$error['message'] = current($msgs);
|
||||
else
|
||||
$error['messages'] = $msgs;
|
||||
|
||||
$g_result->addError($error, FHCAPI_Controller::ERROR_TYPE_DB);
|
||||
$g_result->setStatus(FHCAPI_Controller::STATUS_ERROR);
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
global $g_result;
|
||||
|
||||
$error = [
|
||||
'message' => $message,
|
||||
'class' => get_class($exception),
|
||||
'filename' => $exception->getFile(),
|
||||
'line' => $exception->getLine()
|
||||
];
|
||||
|
||||
if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === true) {
|
||||
$error['backtrace'] = [];
|
||||
foreach (debug_backtrace() as $err) {
|
||||
if (isset($err['file']) && strpos($err['file'], realpath(BASEPATH)) !== 0) {
|
||||
$error['backtrace'][] = [
|
||||
'file' => $err['file'],
|
||||
'line' => $err['line'],
|
||||
'function' => $err['function']
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$g_result->addError($error, FHCAPI_Controller::ERROR_TYPE_EXCEPTION);
|
||||
$g_result->setStatus(FHCAPI_Controller::STATUS_ERROR);
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
global $g_result;
|
||||
|
||||
// NOTE(chris): remove p tags from CI_Exceptions::show_error() function
|
||||
$msg = substr($message, 3);
|
||||
$msg = substr($msg, 0, -4);
|
||||
$msg = explode('</p><p>', $msg);
|
||||
|
||||
$error = [
|
||||
'heading' => $heading
|
||||
];
|
||||
if (count($msg) == 1)
|
||||
$error['message'] = current($msg);
|
||||
else
|
||||
$error['messages'] = $msg;
|
||||
|
||||
$g_result->addError($error, FHCAPI_Controller::ERROR_TYPE_GENERAL);
|
||||
$g_result->setStatus(FHCAPI_Controller::STATUS_ERROR);
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
global $g_result;
|
||||
|
||||
$error = [
|
||||
'message' => $message,
|
||||
'severity' => $severity,
|
||||
'filename' => $filepath,
|
||||
'line' => $line
|
||||
];
|
||||
|
||||
if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === true) {
|
||||
$error['backtrace'] = [];
|
||||
foreach (debug_backtrace() as $err) {
|
||||
if (isset($err['file']) && strpos($err['file'], realpath(BASEPATH)) !== 0) {
|
||||
$error['backtrace'][] = [
|
||||
'file' => $err['file'],
|
||||
'line' => $err['line'],
|
||||
'function' => $err['function']
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(chris): change type with severity
|
||||
$g_result->addError($error, 'php');
|
||||
|
||||
if (((E_ERROR | E_PARSE | E_COMPILE_ERROR | E_CORE_ERROR | E_USER_ERROR) & $severity) === $severity) {
|
||||
$g_result->setStatus('error');
|
||||
}
|
||||
@@ -11,6 +11,7 @@ $sitesettings = array(
|
||||
'customJSModules' => array('public/js/apps/lehre/Antrag.js'),
|
||||
'customCSSs' => array(
|
||||
'public/css/Fhc.css',
|
||||
'public/css/components/primevue.css',
|
||||
'vendor/vuejs/vuedatepicker_css/main.css'
|
||||
),
|
||||
'customJSs' => array(
|
||||
@@ -31,9 +32,9 @@ $this->load->view(
|
||||
<div class="fhc-container row">
|
||||
<div class="col-sm-8 mb-3">
|
||||
<studierendenantrag-antrag
|
||||
prestudent-id="<?= $prestudent_id; ?>"
|
||||
:prestudent-id="<?= $prestudent_id; ?>"
|
||||
antrag-type="<?= $antrag_type; ?>"
|
||||
studierendenantrag-id="<?= $studierendenantrag_id; ?>"
|
||||
:studierendenantrag-id="<?= $studierendenantrag_id ?: 'undefined'; ?>"
|
||||
v-model:info-array="infoArray"
|
||||
v-model:status-msg="status.msg"
|
||||
v-model:status-severity="status.severity"
|
||||
|
||||
@@ -20,7 +20,8 @@ $sitesettings = array(
|
||||
),
|
||||
'customJSModules' => array('public/js/apps/lehre/Antrag/Leitung.js'),
|
||||
'customCSSs' => array(
|
||||
'public/css/Fhc.css'
|
||||
'public/css/Fhc.css',
|
||||
'public/css/components/primevue.css',
|
||||
),
|
||||
'customJSs' => array(
|
||||
)
|
||||
|
||||
@@ -10,7 +10,8 @@ $sitesettings = array(
|
||||
),
|
||||
'customJSModules' => array('public/js/apps/lehre/Antrag/Student.js'),
|
||||
'customCSSs' => array(
|
||||
'public/css/Fhc.css'
|
||||
'public/css/Fhc.css',
|
||||
'public/css/components/primevue.css',
|
||||
),
|
||||
'customJSs' => array(
|
||||
)
|
||||
@@ -38,7 +39,10 @@ $this->load->view(
|
||||
<div class="alert alert-secondary">
|
||||
<p><?= $this->p->t('studierendenantrag', 'calltoaction_' . $type); ?></p>
|
||||
<hr>
|
||||
<a href="<?= site_url('lehre/Studierendenantrag/' . strtolower($type) . '/' . $prestudent_id); ?>" class="btn btn-outline-secondary">
|
||||
<a
|
||||
href="<?= site_url('lehre/Studierendenantrag/' . strtolower($type) . '/' . $prestudent_id); ?>"
|
||||
class="btn btn-outline-secondary"
|
||||
>
|
||||
<i class="fa fa-plus"></i> <?= $this->p->t('studierendenantrag', 'antrag_typ_' . $type); ?>
|
||||
</a>
|
||||
</div>
|
||||
@@ -63,7 +67,16 @@ $this->load->view(
|
||||
<tr>
|
||||
<td><?= $antrag->studierendenantrag_id; ?></td>
|
||||
<td><?= $this->p->t('studierendenantrag', 'antrag_typ_' . $antrag->typ); ?></td>
|
||||
<td><?= $antrag->status_bezeichnung; ?></td>
|
||||
<td>
|
||||
<?=
|
||||
(
|
||||
$antrag->status == Studierendenantragstatus_model::STATUS_PAUSE
|
||||
&& $antrag->status_insertvon == Studierendenantragstatus_model::INSERTVON_DEREGISTERED
|
||||
)
|
||||
? $this->p->t('studierendenantrag', 'status_stop')
|
||||
: $antrag->status_bezeichnung;
|
||||
?>
|
||||
</td>
|
||||
<td><?= $antrag->studiensemester_kurzbz; ?></td>
|
||||
<td><?= (new DateTime($antrag->datum))->format('d.m.Y'); ?></td>
|
||||
<td><?= $antrag->datum_wiedereinstieg ? (new DateTime($antrag->datum_wiedereinstieg))->format('d.m.Y') : ''; ?></td>
|
||||
@@ -74,15 +87,32 @@ $this->load->view(
|
||||
</a>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="modalgrund<?= $antrag->studierendenantrag_id; ?>" tabindex="-1" aria-labelledby="modalgrundLabel<?= $antrag->studierendenantrag_id; ?>" aria-hidden="true">
|
||||
<div
|
||||
class="modal fade"
|
||||
id="modalgrund<?= $antrag->studierendenantrag_id; ?>"
|
||||
tabindex="-1"
|
||||
aria-labelledby="modalgrundLabel<?= $antrag->studierendenantrag_id; ?>"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div class="modal-dialog modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalgrundLabel<?= $antrag->studierendenantrag_id; ?>"><?= $this->p->t('studierendenantrag', 'antrag_grund'); ?></h5>
|
||||
<h5
|
||||
class="modal-title"
|
||||
id="modalgrundLabel<?= $antrag->studierendenantrag_id; ?>"
|
||||
>
|
||||
<?= $this->p->t('studierendenantrag', 'antrag_grund'); ?>
|
||||
</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<textarea class="form-control" style="width: 100%; height: 250px;" readonly><?= $antrag->grund; ?></textarea>
|
||||
<textarea
|
||||
class="form-control"
|
||||
style="width: 100%; height: 250px;"
|
||||
readonly
|
||||
>
|
||||
<?= $antrag->grund; ?>
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -100,18 +130,78 @@ $this->load->view(
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?= site_url('lehre/Studierendenantrag/' . strtolower($antrag->typ) . '/' . $antrag->prestudent_id . '/' . $antrag->studierendenantrag_id); ?>"><i class="fa-solid fa-pen" title="<?= $this->p->t('studierendenantrag', 'btn_edit'); ?>"></i></a>
|
||||
<?php if ($antrag->typ != Studierendenantrag_model::TYP_WIEDERHOLUNG && in_array($antrag->status, [
|
||||
Studierendenantragstatus_model::STATUS_APPROVED,
|
||||
Studierendenantragstatus_model::STATUS_OBJECTED,
|
||||
Studierendenantragstatus_model::STATUS_OBJECTION_DENIED,
|
||||
Studierendenantragstatus_model::STATUS_REMINDERSENT
|
||||
])) { ?>
|
||||
<a class="ms-2" target="_blank" href="<?= base_url('cis/private/pdfExport.php?xml=Antrag' . $antrag->typ . '.xml.php&xsl=Antrag' . $antrag->typ . '&id=' . $antrag->studierendenantrag_id . '&uid=' . getAuthUID()); ?>"><i class="fa-solid fa-download" title="<?= $this->p->t('studierendenantrag', 'btn_download_antrag'); ?>"></i></a>
|
||||
<a
|
||||
href="<?= site_url('lehre/Studierendenantrag/' .
|
||||
strtolower($antrag->typ) .
|
||||
'/' .
|
||||
$antrag->prestudent_id .
|
||||
'/' .
|
||||
$antrag->studierendenantrag_id); ?>"
|
||||
>
|
||||
<i class="fa-solid fa-pen" title="<?= $this->p->t('studierendenantrag', 'btn_edit'); ?>"></i>
|
||||
</a>
|
||||
<?php
|
||||
$allowed = [];
|
||||
switch ($antrag->typ) {
|
||||
case Studierendenantrag_model::TYP_ABMELDUNG:
|
||||
$allowed = [
|
||||
Studierendenantragstatus_model::STATUS_APPROVED
|
||||
];
|
||||
break;
|
||||
case Studierendenantrag_model::TYP_ABMELDUNG_STGL:
|
||||
$allowed = [
|
||||
Studierendenantragstatus_model::STATUS_APPROVED,
|
||||
Studierendenantragstatus_model::STATUS_OBJECTED,
|
||||
Studierendenantragstatus_model::STATUS_OBJECTION_DENIED,
|
||||
Studierendenantragstatus_model::STATUS_DEREGISTERED
|
||||
];
|
||||
break;
|
||||
case Studierendenantrag_model::TYP_UNTERBRECHUNG:
|
||||
$allowed = [
|
||||
Studierendenantragstatus_model::STATUS_APPROVED,
|
||||
Studierendenantragstatus_model::STATUS_REMINDERSENT
|
||||
];
|
||||
break;
|
||||
case Studierendenantrag_model::TYP_WIEDERHOLUNG:
|
||||
$allowed = [
|
||||
Studierendenantragstatus_model::STATUS_DEREGISTERED
|
||||
];
|
||||
break;
|
||||
}
|
||||
if (in_array($antrag->status, $allowed)) { ?>
|
||||
<a
|
||||
class="ms-2"
|
||||
target="_blank"
|
||||
href="<?= base_url('cis/private/pdfExport.php?xml=Antrag' .
|
||||
$antrag->typ .
|
||||
'.xml.php&xsl=Antrag' .
|
||||
$antrag->typ .
|
||||
'&id=' .
|
||||
$antrag->studierendenantrag_id .
|
||||
'&uid=' .
|
||||
getAuthUID()); ?>"
|
||||
>
|
||||
<i
|
||||
class="fa-solid fa-download"
|
||||
title="<?= $this->p->t('studierendenantrag', 'btn_download_antrag'); ?>"
|
||||
>
|
||||
</i>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php if ($antrag->typ == Studierendenantrag_model::TYP_WIEDERHOLUNG && $antrag->status == Studierendenantragstatus_model::STATUS_APPROVED) { ?>
|
||||
<a class="ms-2" href="#modallv<?= $antrag->studierendenantrag_id; ?>" data-bs-toggle="modal"><?= $this->p->t('studierendenantrag', 'btn_show_lvs'); ?></a>
|
||||
<lv-popup id="modallv<?= $antrag->studierendenantrag_id; ?>" antrag-id = "<?= $antrag->studierendenantrag_id; ?>">
|
||||
<?php if ($antrag->typ == Studierendenantrag_model::TYP_WIEDERHOLUNG
|
||||
&& $antrag->status == Studierendenantragstatus_model::STATUS_APPROVED
|
||||
) { ?>
|
||||
<a
|
||||
class="ms-2"
|
||||
href="#modallv<?= $antrag->studierendenantrag_id; ?>"
|
||||
data-bs-toggle="modal"
|
||||
>
|
||||
<?= $this->p->t('studierendenantrag', 'btn_show_lvs'); ?>
|
||||
</a>
|
||||
<lv-popup
|
||||
id="modallv<?= $antrag->studierendenantrag_id; ?>"
|
||||
antrag-id = "<?= $antrag->studierendenantrag_id; ?>"
|
||||
>
|
||||
<?= $this->p->t('studierendenantrag', 'my_lvs'); ?>
|
||||
</lv-popup>
|
||||
<?php } ?>
|
||||
|
||||
@@ -14,6 +14,8 @@ $sitesettings = array(
|
||||
),
|
||||
'customJSModules' => array('public/js/apps/lehre/Antrag/Lvzuweisung.js'),
|
||||
'customCSSs' => array(
|
||||
'public/css/Fhc.css',
|
||||
'public/css/components/primevue.css',
|
||||
),
|
||||
'customJSs' => array(
|
||||
)
|
||||
@@ -30,7 +32,7 @@ $this->load->view(
|
||||
<h1 class="h2"><?= $this->p->t('studierendenantrag', 'title_lvzuweisen', ['name' => $antrag->name]);?></h1>
|
||||
</div>
|
||||
<div class="fhc-container row mt-3">
|
||||
<lv-zuweisung antrag-id="<?= $antrag_id; ?>" initial-status-code="<?= $antrag->status; ?>" initial-status-msg="<?= $antrag->statustyp; ?>"<?= ($antrag->status != Studierendenantragstatus_model::STATUS_CREATED && $antrag->status != Studierendenantragstatus_model::STATUS_LVSASSIGNED) ? ' disabled' : ''; ?>></lv-zuweisung>
|
||||
<lv-zuweisung :antrag-id="<?= $antrag_id; ?>" initial-status-code="<?= $antrag->status; ?>" initial-status-msg="<?= $antrag->statustyp; ?>"<?= ($antrag->status != Studierendenantragstatus_model::STATUS_CREATED && $antrag->status != Studierendenantragstatus_model::STATUS_LVSASSIGNED) ? ' disabled' : ''; ?>></lv-zuweisung>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
<?php
|
||||
$includesArray = array(
|
||||
'title' => 'Test Search',
|
||||
'jquery3' => true,
|
||||
'bootstrap5' => true,
|
||||
'fontawesome6' => true,
|
||||
'tablesorter2' => true,
|
||||
'tabulator5' => true,
|
||||
'primevue3' => true,
|
||||
'axios027' => true,
|
||||
'vue3' => true,
|
||||
'ajaxlib' => true,
|
||||
'jqueryui1' => true,
|
||||
'filtercomponent' => true,
|
||||
'navigationcomponent' => true,
|
||||
'phrases' => array(
|
||||
@@ -17,8 +16,8 @@
|
||||
'customCSSs' => array(
|
||||
'public/css/components/verticalsplit.css',
|
||||
'public/css/components/searchbar.css',
|
||||
'public/css/components/primevue.css',
|
||||
),
|
||||
'customJSs' => array('vendor/axios/axios/axios.min.js'),
|
||||
'customJSModules' => array('public/js/apps/TestSearch.js')
|
||||
);
|
||||
|
||||
@@ -40,17 +39,17 @@
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<searchbar :searchoptions="searchbaroptions" :searchfunction="searchfunction"></searchbar>
|
||||
<core-searchbar :searchoptions="searchbaroptions" :searchfunction="searchfunction"></core-searchbar>
|
||||
|
||||
<verticalsplit>
|
||||
<core-verticalsplit>
|
||||
<template #top>
|
||||
<searchbar :searchoptions="searchbaroptions" :searchfunction="searchfunctiondummy"></searchbar>
|
||||
<core-searchbar :searchoptions="searchbaroptions" :searchfunction="searchfunctiondummy"></core-searchbar>
|
||||
</template>
|
||||
<template #bottom>
|
||||
<!-- Filter component -->
|
||||
<core-filter-cmpt filter-type="LogsViewer" @nw-new-entry="newSideMenuEntryHandler"></core-filter-cmpt>
|
||||
</template>
|
||||
</verticalsplit>
|
||||
</core-verticalsplit>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -45,25 +45,22 @@ echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<link rel="stylesheet" href="../../../skin/tablesort.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../../../skin/style.css.php" type="text/css">
|
||||
<link rel="stylesheet" type="text/css" href="../../../skin/jquery-ui-1.9.2.custom.min.css">
|
||||
<script type="text/javascript" src="../../../vendor/jquery/jquery1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../../../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/jquery/sizzle/sizzle.js"></script>';
|
||||
<link rel="stylesheet" type="text/css" href="../../../skin/jquery-ui-1.9.2.custom.min.css">
|
||||
<script type="text/javascript" src="../../../vendor/jquery/jquery1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../../../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/jquery/sizzle/sizzle.js"></script>';
|
||||
|
||||
const MOODLE_ADDON_KURZBZ = 'moodle';
|
||||
|
||||
// Load Addons to get Moodle_Path
|
||||
$addon_obj = new addon();
|
||||
if ($addon_obj->loadAddons())
|
||||
|
||||
// include moodle addon config if active
|
||||
if ($addon_obj->checkActiveAddon(MOODLE_ADDON_KURZBZ) && file_exists('../../../addons/'.MOODLE_ADDON_KURZBZ.'/config.inc.php'))
|
||||
{
|
||||
if (count($addon_obj->result) > 0)
|
||||
{
|
||||
foreach ($addon_obj->result as $row)
|
||||
{
|
||||
if (file_exists('../../../addons/'.$row->kurzbz.'/config.inc.php'))
|
||||
include_once('../../../addons/'.$row->kurzbz.'/config.inc.php');
|
||||
}
|
||||
}
|
||||
include_once('../../../addons/'.MOODLE_ADDON_KURZBZ.'/config.inc.php');
|
||||
}
|
||||
|
||||
echo '
|
||||
@@ -117,6 +114,7 @@ echo '</SELECT>
|
||||
<input type="submit" value="'.$p->t("services/filtern").'" />
|
||||
</form>';
|
||||
|
||||
$servicekategorie_arr = $service->getKategorieArray();
|
||||
|
||||
if($oe_kurzbz!='')
|
||||
{
|
||||
@@ -134,6 +132,7 @@ echo '<table class="tablesorter" id="myTable">
|
||||
<th>'.$p->t("global/bezeichnung").'</th>
|
||||
<th>'.$p->t("services/leistung").'</th>
|
||||
<th>'.$p->t("services/design").'</th>
|
||||
<th>'.$p->t("services/kritikalitaet").'</th>
|
||||
<th>'.$p->t("services/details").'</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -159,6 +158,8 @@ foreach($service->result as $row)
|
||||
echo '<td><nobr><a href="../profile/index.php?uid='.$row->design_uid.'">',$design,'</a></nobr></td>';
|
||||
//echo '<td><nobr><a href="../profile/index.php?uid='.$row->betrieb_uid.'">',$betrieb,'</a></nobr></td>';
|
||||
//echo '<td><nobr><a href="../profile/index.php?uid='.$row->operativ_uid.'">',$operativ,'</a></nobr></td>';
|
||||
$title = (isset($servicekategorie_arr[$row->servicekategorie_kurzbz])?$servicekategorie_arr[$row->servicekategorie_kurzbz]:'');
|
||||
echo '<td><span title="'.$service->convert_html_chars($title).'">',$title,'</span></td>';
|
||||
echo '<td>'.($row->content_id!=''?'<a href="../../../cms/content.php?content_id='.$row->content_id.'">Details</a>':'');
|
||||
if (defined("ADDON_MOODLE_PATH"))
|
||||
echo ' '.($row->ext_id!=''?'<a href="'.ADDON_MOODLE_PATH.'course/view.php?id='.$row->ext_id.'" target="_blank">Beschreibung</a>':'');
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
$stsem = $_GET['stsem'];
|
||||
else
|
||||
die($p->t('anwesenheitsliste/studiensemesterIstUngueltig'));
|
||||
|
||||
|
||||
$covidhelper = new CovidHelper();
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
@@ -114,9 +114,6 @@ $covidhelper = new CovidHelper();
|
||||
|
||||
echo "</table>";
|
||||
|
||||
$qry = "SELECT *, tbl_lehreinheitgruppe.studiengang_kz, tbl_lehreinheitgruppe.semester FROM lehre.tbl_lehreinheit JOIN lehre.tbl_lehreinheitgruppe USING(lehreinheit_id) JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id)
|
||||
WHERE lehrveranstaltung_id='$lvid' AND studiensemester_kurzbz=".$db->db_add_param($stsem);
|
||||
|
||||
$qry = "SELECT *, tbl_lehreinheitgruppe.studiengang_kz, tbl_lehreinheitgruppe.semester ,tbl_lehreinheit.lehrform_kurzbz
|
||||
FROM lehre.tbl_lehreinheit
|
||||
JOIN lehre.tbl_lehreinheitgruppe USING(lehreinheit_id)
|
||||
@@ -213,7 +210,7 @@ $covidhelper = new CovidHelper();
|
||||
$covid_content = "<table border='0' cellspacing='0'><tr><td><h3>".$p->t('anwesenheitsliste/covidstatuslisten')."</h3></td></tr>".$covid_content."</table>";
|
||||
else
|
||||
$covid_content = ($covidhelper->isUdfDefined()) ? $p->t('anwesenheitsliste/keineStudentenVorhanden') : '';
|
||||
|
||||
|
||||
if($aw_content!='')
|
||||
$aw_content = "<table border='0' cellspacing='0'><tr><td><h3>".$p->t('anwesenheitsliste/anwesenheitslisten')."</h3></td></tr>".$aw_content."</table>";
|
||||
else
|
||||
@@ -241,9 +238,9 @@ $covidhelper = new CovidHelper();
|
||||
{
|
||||
$covid_content = '';
|
||||
}
|
||||
|
||||
|
||||
echo "<table cellpadding='0' cellspacing='0'>
|
||||
|
||||
|
||||
<tr>
|
||||
<td>$aw_content</td>
|
||||
<td class=\"covidstatus\">$covid_content</td>
|
||||
|
||||
@@ -102,6 +102,22 @@ $noten_obj->getAll();
|
||||
$sprachen = new sprache();
|
||||
$sprachen->getAll(true);
|
||||
|
||||
|
||||
$noten_array = array();
|
||||
$js_noten='';
|
||||
foreach ($noten_obj->result as $row)
|
||||
{
|
||||
$js_noten .= " noten_array['" . $row->note . "']='" . addslashes($row->bezeichnung) . "';\n";
|
||||
$noten_array[$row->note]['bezeichnung'] = $row->bezeichnung;
|
||||
$noten_array[$row->note]['positiv'] = $row->positiv;
|
||||
$noten_array[$row->note]['aktiv'] = $row->aktiv;
|
||||
$noten_array[$row->note]['lehre'] = $row->lehre;
|
||||
$noten_array[$row->note]['lkt_ueberschreibbar'] = $row->lkt_ueberschreibbar;
|
||||
$noten_array[$row->note]['anmerkung'] = $row->anmerkung;
|
||||
foreach ($sprachen->result as $s)
|
||||
$noten_array[$row->note]['bezeichnung_mehrsprachig'][$s->sprache] = $row->bezeichnung_mehrsprachig[$s->sprache];
|
||||
}
|
||||
|
||||
$errormsg = '';
|
||||
|
||||
// eingetragene lv-gesamtnoten freigeben
|
||||
@@ -326,19 +342,7 @@ echo '<!DOCTYPE HTML>
|
||||
var noten_array = Array();
|
||||
';
|
||||
|
||||
$noten_array = array();
|
||||
foreach ($noten_obj->result as $row)
|
||||
{
|
||||
echo " noten_array['" . $row->note . "']='" . addslashes($row->bezeichnung) . "';\n";
|
||||
$noten_array[$row->note]['bezeichnung'] = $row->bezeichnung;
|
||||
$noten_array[$row->note]['positiv'] = $row->positiv;
|
||||
$noten_array[$row->note]['aktiv'] = $row->aktiv;
|
||||
$noten_array[$row->note]['lehre'] = $row->lehre;
|
||||
$noten_array[$row->note]['lkt_ueberschreibbar'] = $row->lkt_ueberschreibbar;
|
||||
$noten_array[$row->note]['anmerkung'] = $row->anmerkung;
|
||||
foreach ($sprachen->result as $s)
|
||||
$noten_array[$row->note]['bezeichnung_mehrsprachig'][$s->sprache] = $row->bezeichnung_mehrsprachig[$s->sprache];
|
||||
}
|
||||
echo $js_noten;
|
||||
|
||||
?>
|
||||
|
||||
@@ -806,16 +810,16 @@ foreach ($noten_obj->result as $row)
|
||||
for(row in rows)
|
||||
{
|
||||
linenumber++;
|
||||
if( rows[row] == '' )
|
||||
if( rows[row] == '' )
|
||||
{
|
||||
//skip empty lines
|
||||
continue;
|
||||
}
|
||||
zeile = rows[row].split(" ");
|
||||
|
||||
|
||||
if( zeile.length < 2 )
|
||||
{
|
||||
alertMsg = alertMsg + "Zeile " + linenumber + ': '
|
||||
alertMsg = alertMsg + "Zeile " + linenumber + ': '
|
||||
+ 'Zu wenig Paramter - 2 erforderlich. '
|
||||
+ 'Die Zeile wurde uebersprungen.' + "\n\n";
|
||||
continue;
|
||||
@@ -917,36 +921,36 @@ foreach ($noten_obj->result as $row)
|
||||
for(row in rows)
|
||||
{
|
||||
linenumber++;
|
||||
if( rows[row] == '' )
|
||||
if( rows[row] == '' )
|
||||
{
|
||||
//skip empty lines
|
||||
continue;
|
||||
}
|
||||
zeile = rows[row].split(" ");
|
||||
|
||||
|
||||
if( zeile.length < 3 )
|
||||
{
|
||||
alertMsg = alertMsg + "Zeile " + linenumber + ': '
|
||||
alertMsg = alertMsg + "Zeile " + linenumber + ': '
|
||||
+ 'Zu wenig Paramter - 3 erforderlich. '
|
||||
+ 'Die Zeile wurde uebersprungen.' + "\n\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if( zeile[1] == '' && zeile[2] == '' )
|
||||
{
|
||||
// ignore lines just copied from excel
|
||||
// ignore lines just copied from excel
|
||||
continue;
|
||||
}
|
||||
|
||||
if( zeile[2] == '' )
|
||||
|
||||
if( zeile[2] == '' )
|
||||
{
|
||||
alertMsg = alertMsg + "Zeile " + linenumber + ': '
|
||||
+ "Die Note oder Punkte fehlen. "
|
||||
+ "Die Zeile wurde uebersprungen. \n\n";
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (CIS_GESAMTNOTE_PUNKTE == false)
|
||||
|
||||
if (CIS_GESAMTNOTE_PUNKTE == false)
|
||||
{
|
||||
// check for valid grades
|
||||
if (validGrades.indexOf(zeile[2]) === -1)
|
||||
@@ -958,7 +962,7 @@ foreach ($noten_obj->result as $row)
|
||||
}
|
||||
}
|
||||
|
||||
if( !zeile[1].match(/[0-9]{2}\.[0-9]{2}\.[0-9]{4}/) )
|
||||
if( !zeile[1].match(/[0-9]{2}\.[0-9]{2}\.[0-9]{4}/) )
|
||||
{
|
||||
alertMsg = alertMsg + "Zeile " + linenumber + ': '
|
||||
+ "Das Datum "+zeile[1]+" fehlt oder ist nicht zulaessig. "
|
||||
|
||||
@@ -251,7 +251,7 @@ else
|
||||
// deshalb wird hier versucht eine passende Lehreinheit zu ermitteln.
|
||||
$lehreinheit_id = getLehreinheit($db, $lvid, $student_uid, $stsem);
|
||||
|
||||
$response = savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note);
|
||||
$response = savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note, $punkte);
|
||||
echo $response;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -114,12 +114,15 @@ else
|
||||
$format_highlight->setFgColor(15);
|
||||
$format_highlight->setBorder(1);
|
||||
$format_highlight->setBorderColor('white');
|
||||
$format_highlight->setAlign('left');
|
||||
$format_highlight->setNumFormat(49);
|
||||
|
||||
$format_highlightright=& $workbook->addFormat();
|
||||
$format_highlightright->setFgColor(15);
|
||||
$format_highlightright->setBorder(1);
|
||||
$format_highlightright->setBorderColor('white');
|
||||
$format_highlightright->setAlign('right');
|
||||
$format_highlightright->setNumFormat(49);
|
||||
|
||||
$format_highlightright_date=& $workbook->addFormat();
|
||||
$format_highlightright_date->setFgColor(15);
|
||||
@@ -318,17 +321,23 @@ else
|
||||
|
||||
$worksheet->write($lines,1,$elem->uid);
|
||||
$worksheet->write($lines,2,$elem->nachname.$inc);
|
||||
$worksheet->write($lines,3,$elem->vorname);
|
||||
//wenn Wahlname vorhanden überschreibt dieser den Vornamen
|
||||
$worksheet->write($lines,3,$elem->wahlname);
|
||||
$worksheet->write($lines,4,'="'.$elem->semester.$elem->verband.$elem->gruppe.'"');
|
||||
$worksheet->write($lines,5,'="'.trim($elem->matrikelnr).'"',$format_highlight);
|
||||
if( NULL !== $elem->wahlname )
|
||||
{
|
||||
//wenn Wahlname vorhanden überschreibt dieser den Vornamen
|
||||
$worksheet->write($lines,3,$elem->wahlname);
|
||||
}
|
||||
else
|
||||
{
|
||||
$worksheet->write($lines,3,$elem->vorname);
|
||||
}
|
||||
$worksheet->write($lines,4,$elem->semester.$elem->verband.$elem->gruppe);
|
||||
$worksheet->write($lines,5,trim($elem->matrikelnr),$format_highlight);
|
||||
$worksheet->write($lines,6, $note, $format_highlightright);
|
||||
|
||||
// Nachprüfung
|
||||
if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN2)
|
||||
{
|
||||
$worksheet->write($lines,8, '="'.trim($elem->matrikelnr).'"', $format_highlight);
|
||||
$worksheet->write($lines,8, trim($elem->matrikelnr), $format_highlight);
|
||||
$pr = new Pruefung();
|
||||
$pr->getPruefungen($elem->uid, "Termin2", $lvid, $sem);
|
||||
$output2 = $pr->result;
|
||||
@@ -349,7 +358,7 @@ else
|
||||
// Nachprüfung
|
||||
if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3)
|
||||
{
|
||||
$worksheet->write($lines,12, '="'.trim($elem->matrikelnr).'"', $format_highlight);
|
||||
$worksheet->write($lines,12, trim($elem->matrikelnr), $format_highlight);
|
||||
$pr = new Pruefung();
|
||||
$pr->getPruefungen($elem->uid, "Termin3", $lvid, $sem);
|
||||
$output3 = $pr->result;
|
||||
|
||||
+11
-10
@@ -65,6 +65,11 @@ $xsl_stg_kz = 0;
|
||||
|
||||
$sign = false;
|
||||
|
||||
/* Signing on CIS disabled
|
||||
if(isset($_GET['sign']))
|
||||
$sign = true;
|
||||
*/
|
||||
|
||||
// Direkte uebergabe des Studienganges dessen Vorlage verwendet werden soll
|
||||
if (isset($_GET['xsl_stg_kz']))
|
||||
$xsl_stg_kz = $_GET['xsl_stg_kz'];
|
||||
@@ -298,22 +303,18 @@ if ((((isset($_GET["uid"]) && $user == $_GET["uid"])) || $rechte->isBerechtigt('
|
||||
|
||||
$dokument->setFilename($filename);
|
||||
|
||||
if (!$dokument->create($output))
|
||||
die($dokument->errormsg);
|
||||
|
||||
if ($sign === true)
|
||||
{
|
||||
if ($dokument->sign($user))
|
||||
{
|
||||
$dokument->output();
|
||||
}
|
||||
else
|
||||
if (!$dokument->sign($user))
|
||||
{
|
||||
echo $dokument->errormsg;
|
||||
}
|
||||
}
|
||||
else
|
||||
$dokument->output();
|
||||
|
||||
if (!$dokument->create($output))
|
||||
die($dokument->errormsg);
|
||||
|
||||
$dokument->output();
|
||||
$dokument->close();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -60,7 +60,7 @@ if (isset($_GET['uid']))
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($uid);
|
||||
|
||||
if ($rechte->isBerechtigt('admin') || (in_array($_GET['uid'], $untergebenen_arr)))
|
||||
if ($rechte->isBerechtigt('admin') || $rechte->isBerechtigt('mitarbeiter/zeitsperre') || (in_array($_GET['uid'], $untergebenen_arr)))
|
||||
{
|
||||
$uid = $_GET['uid'];
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ define('FAS_DOPPELTE_BUCHUNGSTYPEN_CHECK', serialize(
|
||||
'StudiengebuehrRestzahlung' => array('StudiengebuehrErhoeht', 'Studiengebuehr', 'StudiengebuehrRestzahlung'),
|
||||
'OEH' => array('OEH')
|
||||
))
|
||||
));
|
||||
);
|
||||
|
||||
// Spezialnoten die am Zeunigs und Diplomasupplement ignoriert werden
|
||||
define('ZEUGNISNOTE_NICHT_ANZEIGEN',serialize(array('iar', 'nz')));
|
||||
@@ -295,4 +295,13 @@ define ('DEFAULT_LEHRMODUS','regulaer');
|
||||
//Echter Dienstvertrag
|
||||
define ('DEFAULT_ECHTER_DIENSTVERTRAG',[103,110]);
|
||||
|
||||
//Buchungstypen die fix auf eine bestimmte Kostenstelle gebucht werden sollen
|
||||
//Buchungstyp => Studiengang_kz
|
||||
define('FAS_BUCHUNGSTYP_FIXE_KOSTENSTELLE', serialize(
|
||||
array(
|
||||
'Test_1' => 0,
|
||||
'Test_2' => 2
|
||||
)
|
||||
));
|
||||
|
||||
?>
|
||||
|
||||
@@ -141,7 +141,9 @@ foreach($addon_obj->result as $addon)
|
||||
<command id="menu-dokumente-accountinfoblatt:command" oncommand="PrintAccountInfoBlatt(event);"/>
|
||||
<command id="menu-dokumente-zutrittskarte:command" oncommand="PrintZutrittskarte();"/>
|
||||
<command id="menu-dokumente-antrag-abmeldung:command" oncommand="StudentPrintAntragAbmeldung(event);"/>
|
||||
<command id="menu-dokumente-antrag-abmeldungstgl:command" oncommand="StudentPrintAntragAbmeldungStgl(event);"/>
|
||||
<command id="menu-dokumente-antrag-unterbrechung:command" oncommand="StudentPrintAntragUnterbrechung(event);"/>
|
||||
<command id="menu-dokumente-antrag-wiederholung:command" oncommand="StudentPrintAntragWiederholung(event);"/>
|
||||
<command id="menu-dokumente-studienblatt:command" oncommand="PrintStudienblatt(event);"/>
|
||||
<command id="menu-dokumente-studienblatt_englisch:command" oncommand="PrintStudienblattEnglisch(event);"/>
|
||||
<command id="menu-dokumente-pruefungsprotokoll:command" oncommand="StudentAbschlusspruefungPrintPruefungsprotokollMultiple(event,'de');"/>
|
||||
@@ -518,6 +520,13 @@ foreach($addon_obj->result as $addon)
|
||||
command = "menu-dokumente-antrag-abmeldung:command"
|
||||
accesskey = "&menu-dokumente-antrag-abmeldung.accesskey;"
|
||||
/>
|
||||
<menuitem
|
||||
id = "menu-dokumente-antrag-abmeldungstgl"
|
||||
key = "menu-dokumente-antrag-abmeldungstgl:key"
|
||||
label = "&menu-dokumente-antrag-abmeldungstgl.label;"
|
||||
command = "menu-dokumente-antrag-abmeldungstgl:command"
|
||||
accesskey = "&menu-dokumente-antrag-abmeldungstgl.accesskey;"
|
||||
/>
|
||||
<menuitem
|
||||
id = "menu-dokumente-antrag-unterbrechung"
|
||||
key = "menu-dokumente-antrag-unterbrechung:key"
|
||||
@@ -525,6 +534,13 @@ foreach($addon_obj->result as $addon)
|
||||
command = "menu-dokumente-antrag-unterbrechung:command"
|
||||
accesskey = "&menu-dokumente-antrag-unterbrechung.accesskey;"
|
||||
/>
|
||||
<menuitem
|
||||
id = "menu-dokumente-antrag-wiederholung"
|
||||
key = "menu-dokumente-antrag-wiederholung:key"
|
||||
label = "&menu-dokumente-antrag-wiederholung.label;"
|
||||
command = "menu-dokumente-antrag-wiederholung:command"
|
||||
accesskey = "&menu-dokumente-antrag-wiederholung.accesskey;"
|
||||
/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menuseparator/>
|
||||
|
||||
@@ -280,7 +280,7 @@ if(!$error)
|
||||
|
||||
if($_POST['neu']!='true')
|
||||
{
|
||||
if(!$entwt->load($_POST['mitarbeiter_uid'],$_POST['studiengang_kz_old']))
|
||||
if(!$entwt->load($_POST['entwicklungsteam_id']))
|
||||
{
|
||||
$error = true;
|
||||
$return = false;
|
||||
@@ -291,12 +291,6 @@ if(!$error)
|
||||
else
|
||||
{
|
||||
|
||||
if($entwt->exists($_POST['mitarbeiter_uid'],$_POST['studiengang_kz']))
|
||||
{
|
||||
$error = true;
|
||||
$errormsg = 'Es existiert bereits ein Eintrag fuer diesen Studiengang';
|
||||
$return = false;
|
||||
}
|
||||
$entwt->new = true;
|
||||
$entwt->insertamum = date('Y-m-d H:i:s');
|
||||
$entwt->insertvon = $user;
|
||||
@@ -304,6 +298,7 @@ if(!$error)
|
||||
|
||||
if(!$error)
|
||||
{
|
||||
$entwt->entwicklungsteam_id= $_POST['entwicklungsteam_id'];
|
||||
$entwt->mitarbeiter_uid = $_POST['mitarbeiter_uid'];
|
||||
$entwt->studiengang_kz = $_POST['studiengang_kz'];
|
||||
$entwt->studiengang_kz_old = $_POST['studiengang_kz_old'];
|
||||
@@ -328,15 +323,17 @@ if(!$error)
|
||||
elseif(isset($_POST['type']) && $_POST['type']=='entwicklungsteamdelete')
|
||||
{
|
||||
//Loescht einen Entwicklungsteameintrag
|
||||
$entwicklungsteam_id = $_POST['entwicklungsteam_id'];
|
||||
|
||||
$entwt = new entwicklungsteam();
|
||||
if($entwt->delete($_POST['mitarbeiter_uid'],$_POST['studiengang_kz']))
|
||||
if($entwt->delete($entwicklungsteam_id))
|
||||
{
|
||||
$return = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$return = false;
|
||||
$errormsg = $entwt->errormsg;
|
||||
$errormsg = $entwt->errormsg;
|
||||
}
|
||||
}
|
||||
elseif(isset($_POST['type']) && $_POST['type']=='buchungsave')
|
||||
@@ -803,6 +800,7 @@ if(!$error)
|
||||
$errormsg = $konto->errormsg;
|
||||
}
|
||||
else
|
||||
|
||||
{
|
||||
$error = false;
|
||||
$return = true;
|
||||
|
||||
@@ -199,7 +199,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bisfunktion/rdf#sws" onclick="MitarbeiterTreeFunktionSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="mitarbeiter-funktion-treecol-bisverwendung_id" label="VerwendungID" flex="1" persist="hidden, width" hidden="true"
|
||||
<treecol id="mitarbeiter-funktion-treecol-bisverwendung_id" label="VerwendungID" flex="1" persist="hidden, width" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bisfunktion/rdf#bisverwendung_id" onclick="MitarbeiterTreeFunktionSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
@@ -286,15 +286,19 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/entwicklungsteam/rdf#studiengang" onclick="MitarbeiterTreeEntwicklungsteamSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="mitarbeiter-entwicklungsteam-treecol-entwicklungsteam_id" label="entwicklungsteam_id" flex="1" persist="hidden, width" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/entwicklungsteam/rdf#entwicklungsteam_id" onclick="MitarbeiterTreeEntwicklungteamSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="mitarbeiter-entwicklungsteam-treecol-besqual" label="Besondere Qualifikation" flex="1" persist="hidden, width" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/entwicklungsteam/rdf#besqual" onclick="MitarbeiterTreeEntwicklungteamSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="mitarbeiter-entwicklungsteam-treecol-beginn" label="Beginn" flex="1" persist="hidden, width" hidden="true"
|
||||
<treecol id="mitarbeiter-entwicklungsteam-treecol-beginn" label="Beginn" flex="1" persist="hidden, width" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/entwicklungsteam/rdf#beginn" onclick="MitarbeiterTreeEntwicklungsteamSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="mitarbeiter-entwicklungsteam-treecol-ende" label="Ende" flex="1" persist="hidden, width" hidden="true"
|
||||
<treecol id="mitarbeiter-entwicklungsteam-treecol-ende" label="Ende" flex="1" persist="hidden, width" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/entwicklungsteam/rdf#ende" onclick="MitarbeiterTreeEntwicklungsteamSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
@@ -318,6 +322,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/entwicklungsteam/rdf#studiengang" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/entwicklungsteam/rdf#entwicklungsteam_id" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/entwicklungsteam/rdf#besqual" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/entwicklungsteam/rdf#beginn" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/entwicklungsteam/rdf#ende" />
|
||||
@@ -345,6 +350,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<column flex="5"/>
|
||||
</columns>
|
||||
<rows>
|
||||
|
||||
<row>
|
||||
<label value="Studiengang" control="mitarbeiter-entwicklungsteam-detail-menulist-studiengang"/>
|
||||
<menulist id="mitarbeiter-entwicklungsteam-detail-menulist-studiengang" disabled="true"
|
||||
@@ -359,6 +365,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
</template>
|
||||
</menulist>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="Besondere Qualifikation" control="mitarbeiter-entwicklungsteam-detail-menulist-besqual"/>
|
||||
<menulist id="mitarbeiter-entwicklungsteam-detail-menulist-besqual" disabled="true"
|
||||
@@ -373,14 +380,17 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
</template>
|
||||
</menulist>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="Beginn" control="mitarbeiter-entwicklungsteam-detail-datum-beginn"/>
|
||||
<box id="mitarbeiter-entwicklungsteam-detail-datum-beginn" class="Datum" disabled="true"/>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="Ende" control="mitarbeiter-entwicklungsteam-detail-datum-ende"/>
|
||||
<box id="mitarbeiter-entwicklungsteam-detail-datum-ende" class="Datum" disabled="true"/>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<spacer />
|
||||
<button id="mitarbeiter-entwicklungsteam-detail-button-speichern" label="Speichern" disabled="true" oncommand="MitarbeiterEntwicklungsteamSpeichern()" />
|
||||
|
||||
@@ -39,6 +39,7 @@ var MitarbeiterFunktionTreeDatasource=null; // Datasource des Verwendungstrees
|
||||
var MitarbeiterFunktionSelectVerwendungID=null; // ID der Verwendung der Funktion die nach dem rebuild markiert werden soll
|
||||
var MitarbeiterFunktionSelectStudiengangID=null; // ID des Studiengangs der Funktion die nach dem rebuild markiert werden soll
|
||||
var MitarbeiterEntwicklungsteamTreeDatasource=null; // Datasource des Entwicklungsteamtrees
|
||||
var MitarbeiterEntwicklungsteamSelectEntwicklungsteamID=null; //ID Entwicklungsteameintrag
|
||||
var MitarbeiterEntwicklungsteamSelectMitarbeiterUID=null; // UID des Mitarbeiters des Entwicklugnsteams das nach dem rebuild markiert werden soll
|
||||
var MitarbeiterEntwicklungsteamSelectStudiengangID=null; // ID des Stg des Entwicklungsteams das nach dem rebuild markiert werden soll
|
||||
var MitarbeiterEntwicklungsteamDoubleRefresh=false; // Wenn auf einen Tree der eine leere Datasource enthaelt eine neue Datasource angehaengt wird, dann muss doppelt refresht werden
|
||||
@@ -685,6 +686,7 @@ function MitarbeiterAuswahl()
|
||||
|
||||
// **** ENTWICKLUNGSTEAM ****
|
||||
entwicklungsteamtree = document.getElementById('mitarbeiter-tree-entwicklungsteam');
|
||||
|
||||
url='<?php echo APP_ROOT;?>rdf/entwicklungsteam.rdf.php?mitarbeiter_uid='+uid+"&"+gettimestamp();
|
||||
|
||||
try
|
||||
@@ -1603,24 +1605,27 @@ function MitarbeiterEntwicklungsteamTreeSelect()
|
||||
var tree=document.getElementById('mitarbeiter-tree-entwicklungsteam');
|
||||
var items = tree.view.rowCount; //Anzahl der Zeilen ermitteln
|
||||
|
||||
//In der globalen Variable ist der zu selektierende Verwendung gespeichert
|
||||
if(MitarbeiterEntwicklungsteamSelectStudiengangID!=null)
|
||||
//In der globalen Variable ist der zu selektierende Entwicklungsteameintrag gespeichert
|
||||
if (MitarbeiterEntwicklungsteamSelectStudiengangID!=null)
|
||||
{
|
||||
for(var i=0;i<items;i++)
|
||||
{
|
||||
col = tree.columns ? tree.columns["mitarbeiter-entwicklungsteam-treecol-entwicklungsteam_id"] : "mitarbeiter-entwicklungsteam-treecol-entwicklungsteam_id";
|
||||
entwicklungsteam_id=tree.view.getCellText(i,col);
|
||||
col = tree.columns ? tree.columns["mitarbeiter-entwicklungsteam-treecol-mitarbeiter_uid"] : "mitarbeiter-entwicklungsteam-treecol-mitarbeiter_uid";
|
||||
mitarbeiter_uid=tree.view.getCellText(i,col);
|
||||
mitarbeiter_uid=tree.view.getCellText(i,col);
|
||||
col = tree.columns ? tree.columns["mitarbeiter-entwicklungsteam-treecol-studiengang_kz"] : "mitarbeiter-entwicklungsteam-treecol-studiengang_kz";
|
||||
studiengang_kz=tree.view.getCellText(i,col);
|
||||
|
||||
if(mitarbeiter_uid == MitarbeiterEntwicklungsteamSelectMitarbeiterUID && studiengang_kz==MitarbeiterEntwicklungsteamSelectStudiengangID)
|
||||
{
|
||||
//Zeile markieren
|
||||
tree.view.selection.select(i);
|
||||
//Sicherstellen, dass die Zeile im sichtbaren Bereich liegt
|
||||
tree.treeBoxObject.ensureRowIsVisible(i);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(entwicklungsteam_id == MitarbeiterEntwicklungsteamSelectEntwicklungsteamID && mitarbeiter_uid == MitarbeiterEntwicklungsteamSelectMitarbeiterUID && studiengang_kz==MitarbeiterEntwicklungsteamSelectStudiengangID)
|
||||
{
|
||||
//Zeile markieren
|
||||
tree.view.selection.select(i);
|
||||
//Sicherstellen, dass die Zeile im sichtbaren Bereich liegt
|
||||
tree.treeBoxObject.ensureRowIsVisible(i);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1673,20 +1678,21 @@ function MitarbeiterEntwicklungsteamSelect()
|
||||
if (tree.currentIndex==-1)
|
||||
return false;
|
||||
|
||||
var col = tree.columns ? tree.columns["mitarbeiter-entwicklungsteam-treecol-entwicklungsteam_id"] : "mitarbeiter-entwicklungsteam-treecol-entwicklungsteam_id";
|
||||
entwicklungsteam_id=tree.view.getCellText(tree.currentIndex,col);
|
||||
col = tree.columns ? tree.columns["mitarbeiter-entwicklungsteam-treecol-studiengang_kz"] : "mitarbeiter-entwicklungsteam-treecol-studiengang_kz";
|
||||
studiengang_kz=tree.view.getCellText(tree.currentIndex,col);
|
||||
|
||||
col = tree.columns ? tree.columns["mitarbeiter-entwicklungsteam-treecol-mitarbeiter_uid"] : "mitarbeiter-entwicklungsteam-treecol-mitarbeiter_uid";
|
||||
mitarbeiter_uid=tree.view.getCellText(tree.currentIndex,col);
|
||||
|
||||
var url = '<?php echo APP_ROOT ?>rdf/entwicklungsteam.rdf.php?studiengang_kz='+studiengang_kz+'&mitarbeiter_uid='+mitarbeiter_uid+'&'+gettimestamp();
|
||||
var url = '<?php echo APP_ROOT ?>rdf/entwicklungsteam.rdf.php?studiengang_kz='+studiengang_kz+'&mitarbeiter_uid='+mitarbeiter_uid+'&entwicklungsteam_id='+entwicklungsteam_id+'&'+gettimestamp();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].
|
||||
getService(Components.interfaces.nsIRDFService);
|
||||
|
||||
var dsource = rdfService.GetDataSourceBlocking(url);
|
||||
var dsource = rdfService.GetDataSourceBlocking(url);
|
||||
|
||||
var subject = rdfService.GetResource("http://www.technikum-wien.at/entwicklungsteam/" + mitarbeiter_uid+'/'+studiengang_kz);
|
||||
var subject = rdfService.GetResource("http://www.technikum-wien.at/entwicklungsteam/" + mitarbeiter_uid+'/'+studiengang_kz+'/'+entwicklungsteam_id);
|
||||
|
||||
var predicateNS = "http://www.technikum-wien.at/entwicklungsteam/rdf";
|
||||
|
||||
@@ -1743,6 +1749,7 @@ function MitarbeiterEntwicklungsteamSpeichern()
|
||||
req.add('type', 'entwicklungsteamsave');
|
||||
|
||||
req.add('neu', neu);
|
||||
req.add('entwicklungsteam_id', entwicklungsteam_id);
|
||||
req.add('studiengang_kz', studiengang_kz);
|
||||
req.add('studiengang_kz_old', studiengang_kz_old);
|
||||
req.add('besqualcode', besqualcode);
|
||||
@@ -1765,6 +1772,7 @@ function MitarbeiterEntwicklungsteamSpeichern()
|
||||
else
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
MitarbeiterEntwicklungsteamSelectEntwicklungsteamID = entwicklungsteam_id;
|
||||
MitarbeiterEntwicklungsteamSelectMitarbeiterUID = mitarbeiter_uid;
|
||||
MitarbeiterEntwicklungsteamSelectStudiengangID = studiengang_kz;
|
||||
MitarbeiterEntwicklungsteamDoubleRefresh=true;
|
||||
@@ -1788,11 +1796,8 @@ function MitarbeiterEntwicklungsteamLoeschen()
|
||||
return false;
|
||||
}
|
||||
|
||||
col = tree.columns ? tree.columns["mitarbeiter-entwicklungsteam-treecol-studiengang_kz"] : "mitarbeiter-entwicklungsteam-treecol-studiengang_kz";
|
||||
studiengang_kz=tree.view.getCellText(tree.currentIndex,col);
|
||||
|
||||
col = tree.columns ? tree.columns["mitarbeiter-entwicklungsteam-treecol-mitarbeiter_uid"] : "mitarbeiter-entwicklungsteam-treecol-mitarbeiter_uid";
|
||||
mitarbeiter_uid=tree.view.getCellText(tree.currentIndex,col);
|
||||
col = tree.columns ? tree.columns["mitarbeiter-entwicklungsteam-treecol-entwicklungsteam_id"] : "mitarbeiter-entwicklungsteam-treecol-entwicklungsteam_id";
|
||||
entwicklungsteam_id=tree.view.getCellText(tree.currentIndex,col);
|
||||
|
||||
if(confirm("Wollen Sie diesen Eintrag wirklich loeschen?"))
|
||||
{
|
||||
@@ -1800,9 +1805,7 @@ function MitarbeiterEntwicklungsteamLoeschen()
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
req.add('type', 'entwicklungsteamdelete');
|
||||
|
||||
req.add('studiengang_kz', studiengang_kz);
|
||||
req.add('mitarbeiter_uid', mitarbeiter_uid);
|
||||
req.add('entwicklungsteam_id', entwicklungsteam_id);
|
||||
|
||||
var response = req.executePOST();
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ require_once('../../include/Excel/excel.php');
|
||||
require_once('../../include/studiengang.class.php');
|
||||
require_once('../../include/studiensemester.class.php');
|
||||
require_once('../../include/mail.class.php');
|
||||
require_once('../../include/benutzerfunktion.class.php');
|
||||
require_once('../../include/organisationseinheit.class.php');
|
||||
|
||||
$stsem = new studiensemester();
|
||||
|
||||
@@ -96,12 +98,11 @@ $qry_stg = "SELECT distinct studiengang_kz, typ, kurzbz
|
||||
SELECT
|
||||
studiengang_kz
|
||||
FROM
|
||||
lehre.tbl_projektbetreuer, lehre.tbl_projektarbeit, lehre.tbl_lehreinheit, lehre.tbl_lehrveranstaltung
|
||||
lehre.tbl_projektbetreuer JOIN lehre.tbl_projektarbeit ON tbl_projektbetreuer.projektarbeit_id=tbl_projektarbeit.projektarbeit_id
|
||||
JOIN lehre.tbl_lehreinheit ON tbl_lehreinheit.lehreinheit_id = tbl_projektarbeit.lehreinheit_id
|
||||
JOIN lehre.tbl_lehrveranstaltung ON tbl_lehrveranstaltung.lehrveranstaltung_id = tbl_lehreinheit.lehrveranstaltung_id
|
||||
WHERE
|
||||
lehre.tbl_lehreinheit.studiensemester_kurzbz=".$db->db_add_param($semester_aktuell)." AND
|
||||
tbl_projektbetreuer.projektarbeit_id=tbl_projektarbeit.projektarbeit_id AND
|
||||
tbl_projektarbeit.lehreinheit_id = tbl_lehreinheit.lehreinheit_id AND
|
||||
tbl_lehreinheit.lehrveranstaltung_id = tbl_lehrveranstaltung.lehrveranstaltung_id
|
||||
lehre.tbl_lehreinheit.studiensemester_kurzbz=".$db->db_add_param($semester_aktuell)."
|
||||
) as foo
|
||||
JOIN public.tbl_studiengang USING (studiengang_kz)
|
||||
";
|
||||
@@ -124,6 +125,10 @@ $workbook->setCustomColor(10, 255, 186, 179);
|
||||
$format_colored =& $workbook->addFormat();
|
||||
$format_colored->setFgColor(10);
|
||||
|
||||
$workbook->setCustomColor(10, 238, 238, 0);
|
||||
$oe_colored =& $workbook->addFormat();
|
||||
$oe_colored->setFgColor(11);
|
||||
|
||||
$format_number_colored =& $workbook->addFormat();
|
||||
$format_number_colored->setNumFormat('0,0.00');
|
||||
//$format_number_colored->setNumFormat('0.00');
|
||||
@@ -185,6 +190,17 @@ if ($result_stg = $db->db_query($qry_stg))
|
||||
$gesamt->write($gesamtsheet_row, $i, "Gesamtstunden", $format_bold);
|
||||
$worksheet->write(2, ++$i, "Gesamtkosten", $format_bold);
|
||||
$gesamt->write($gesamtsheet_row, $i, "Gesamtkosten", $format_bold);
|
||||
|
||||
$worksheet->write(2, ++$i, "Gesamtstunden bestellt", $format_bold);
|
||||
$gesamt->write($gesamtsheet_row, $i, "Gesamtstunden bestellt", $format_bold);
|
||||
$worksheet->write(2, ++$i, "Gesamtkosten bestellt", $format_bold);
|
||||
$gesamt->write($gesamtsheet_row, $i, "Gesamtkosten bestellt", $format_bold);
|
||||
|
||||
$worksheet->write(2, ++$i, "Gesamtstunden erteilt", $format_bold);
|
||||
$gesamt->write($gesamtsheet_row, $i, "Gesamtstunden erteilt", $format_bold);
|
||||
$worksheet->write(2, ++$i, "Gesamtkosten erteilt", $format_bold);
|
||||
$gesamt->write($gesamtsheet_row, $i, "Gesamtkosten erteilt", $format_bold);
|
||||
|
||||
$worksheet->write(2, ++$i, "Gesamtstunden angenommen", $format_bold);
|
||||
$gesamt->write($gesamtsheet_row, $i, "Gesamtstunden angenommen", $format_bold);
|
||||
$worksheet->write(2, ++$i, "Gesamtkosten angenommen", $format_bold);
|
||||
@@ -209,7 +225,7 @@ if ($result_stg = $db->db_query($qry_stg))
|
||||
SELECT tbl_organisationseinheit.organisationseinheittyp_kurzbz || ' ' || tbl_organisationseinheit.bezeichnung
|
||||
FROM PUBLIC.tbl_benutzerfunktion
|
||||
JOIN PUBLIC.tbl_organisationseinheit USING (oe_kurzbz)
|
||||
WHERE funktion_kurzbz = 'oezuordnung'
|
||||
WHERE funktion_kurzbz = (CASE WHEN fixangestellt = true THEN 'kstzuordnung' ELSE 'oezuordnung' END)
|
||||
AND (
|
||||
datum_von IS NULL
|
||||
OR datum_von <= now()
|
||||
@@ -229,7 +245,7 @@ if ($result_stg = $db->db_query($qry_stg))
|
||||
WHERE oe_kurzbz IN (
|
||||
SELECT oe_kurzbz
|
||||
FROM PUBLIC.tbl_benutzerfunktion
|
||||
WHERE funktion_kurzbz = 'oezuordnung'
|
||||
WHERE funktion_kurzbz = (CASE WHEN fixangestellt = true THEN 'kstzuordnung' ELSE 'oezuordnung' END)
|
||||
AND (
|
||||
datum_von IS NULL
|
||||
OR datum_von <= now()
|
||||
@@ -262,26 +278,20 @@ if ($result_stg = $db->db_query($qry_stg))
|
||||
THEN 't'
|
||||
ELSE 'f'
|
||||
END AS geaendert,
|
||||
(SELECT
|
||||
vertragsstatus_kurzbz
|
||||
FROM
|
||||
lehre.tbl_vertrag_vertragsstatus
|
||||
WHERE
|
||||
vertrag_id = tbl_lehreinheitmitarbeiter.vertrag_id
|
||||
ORDER BY datum DESC
|
||||
LIMIT 1) as vertragsstatus
|
||||
FROM lehre.tbl_lehreinheit,
|
||||
lehre.tbl_lehreinheitmitarbeiter,
|
||||
PUBLIC.tbl_mitarbeiter,
|
||||
PUBLIC.tbl_benutzer,
|
||||
PUBLIC.tbl_person,
|
||||
lehre.tbl_lehrveranstaltung
|
||||
WHERE tbl_person.person_id = tbl_benutzer.person_id
|
||||
AND tbl_benutzer.uid = tbl_mitarbeiter.mitarbeiter_uid
|
||||
AND tbl_lehreinheitmitarbeiter.mitarbeiter_uid = tbl_mitarbeiter.mitarbeiter_uid
|
||||
AND tbl_lehreinheit.lehreinheit_id = tbl_lehreinheitmitarbeiter.lehreinheit_id
|
||||
AND tbl_lehrveranstaltung.lehrveranstaltung_id = tbl_lehreinheit.lehrveranstaltung_id
|
||||
AND studiengang_kz = ".$db->db_add_param($studiengang_kz)."
|
||||
(SELECT
|
||||
ARRAY_TO_STRING(ARRAY_AGG(vertragsstatus_kurzbz), ',')
|
||||
FROM
|
||||
lehre.tbl_vertrag_vertragsstatus
|
||||
WHERE
|
||||
vertrag_id = tbl_lehreinheitmitarbeiter.vertrag_id
|
||||
) as vertragsstatus
|
||||
FROM lehre.tbl_lehreinheit
|
||||
JOIN lehre.tbl_lehreinheitmitarbeiter ON tbl_lehreinheit.lehreinheit_id = tbl_lehreinheitmitarbeiter.lehreinheit_id
|
||||
JOIN PUBLIC.tbl_mitarbeiter ON tbl_lehreinheitmitarbeiter.mitarbeiter_uid = tbl_mitarbeiter.mitarbeiter_uid
|
||||
JOIN PUBLIC.tbl_benutzer ON tbl_benutzer.uid = tbl_mitarbeiter.mitarbeiter_uid
|
||||
JOIN PUBLIC.tbl_person ON tbl_person.person_id = tbl_benutzer.person_id
|
||||
JOIN lehre.tbl_lehrveranstaltung ON tbl_lehrveranstaltung.lehrveranstaltung_id = tbl_lehreinheit.lehrveranstaltung_id
|
||||
WHERE studiengang_kz = ".$db->db_add_param($studiengang_kz)."
|
||||
AND studiensemester_kurzbz = ".$db->db_add_param($semester_aktuell)."
|
||||
AND tbl_lehreinheitmitarbeiter.semesterstunden <> 0
|
||||
AND tbl_lehreinheitmitarbeiter.semesterstunden IS NOT NULL
|
||||
@@ -302,6 +312,7 @@ if ($result_stg = $db->db_query($qry_stg))
|
||||
$gesamtsheet_row++;
|
||||
while ($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$row->vertragsstatus = explode(',', $row->vertragsstatus);
|
||||
//Gesamtstunden und Kosten ermitteln
|
||||
if (array_key_exists($row->mitarbeiter_uid, $liste))
|
||||
{
|
||||
@@ -314,13 +325,43 @@ if ($result_stg = $db->db_query($qry_stg))
|
||||
$liste[$row->mitarbeiter_uid]['gesamtkosten'] =
|
||||
$liste[$row->mitarbeiter_uid]['gesamtkosten'] + ($row->semesterstunden * $row->stundensatz);
|
||||
|
||||
if (!isset($liste[$row->mitarbeiter_uid]['gesamtstunden_bestellt']))
|
||||
{
|
||||
$liste[$row->mitarbeiter_uid]['gesamtstunden_bestellt'] = 0;
|
||||
$liste[$row->mitarbeiter_uid]['gesamtkosten_bestellt'] = 0;
|
||||
}
|
||||
|
||||
if (!isset($liste[$row->mitarbeiter_uid]['gesamtstunden_erteilt']))
|
||||
{
|
||||
$liste[$row->mitarbeiter_uid]['gesamtstunden_erteilt'] = 0;
|
||||
$liste[$row->mitarbeiter_uid]['gesamtkosten_erteilt'] = 0;
|
||||
}
|
||||
|
||||
if (!isset($liste[$row->mitarbeiter_uid]['gesamtstunden_akzeptiert']))
|
||||
{
|
||||
$liste[$row->mitarbeiter_uid]['gesamtstunden_akzeptiert'] = 0;
|
||||
$liste[$row->mitarbeiter_uid]['gesamtkosten_akzeptiert'] = 0;
|
||||
}
|
||||
|
||||
if ($row->vertragsstatus == 'akzeptiert')
|
||||
if (in_array('bestellt', $row->vertragsstatus))
|
||||
{
|
||||
$liste[$row->mitarbeiter_uid]['gesamtstunden_bestellt'] =
|
||||
$liste[$row->mitarbeiter_uid]['gesamtstunden_bestellt'] + $row->semesterstunden;
|
||||
$liste[$row->mitarbeiter_uid]['gesamtkosten_bestellt'] =
|
||||
$liste[$row->mitarbeiter_uid]['gesamtkosten_bestellt']
|
||||
+ ($row->semesterstunden * $row->stundensatz);
|
||||
}
|
||||
|
||||
if (in_array('erteilt', $row->vertragsstatus))
|
||||
{
|
||||
$liste[$row->mitarbeiter_uid]['gesamtstunden_erteilt'] =
|
||||
$liste[$row->mitarbeiter_uid]['gesamtstunden_erteilt'] + $row->semesterstunden;
|
||||
$liste[$row->mitarbeiter_uid]['gesamtkosten_erteilt'] =
|
||||
$liste[$row->mitarbeiter_uid]['gesamtkosten_erteilt']
|
||||
+ ($row->semesterstunden * $row->stundensatz);
|
||||
}
|
||||
|
||||
if (in_array('akzeptiert', $row->vertragsstatus))
|
||||
{
|
||||
$liste[$row->mitarbeiter_uid]['gesamtstunden_akzeptiert'] =
|
||||
$liste[$row->mitarbeiter_uid]['gesamtstunden_akzeptiert'] + $row->semesterstunden;
|
||||
@@ -336,13 +377,43 @@ if ($result_stg = $db->db_query($qry_stg))
|
||||
$liste[$row->mitarbeiter_uid]['gesamtstunden'] = $row->semesterstunden;
|
||||
$liste[$row->mitarbeiter_uid]['gesamtkosten'] = $row->semesterstunden * $row->stundensatz;
|
||||
|
||||
if (!isset($liste[$row->mitarbeiter_uid]['gesamtstunden_bestellt']))
|
||||
{
|
||||
$liste[$row->mitarbeiter_uid]['gesamtstunden_bestellt'] = 0;
|
||||
$liste[$row->mitarbeiter_uid]['gesamtkosten_bestellt'] = 0;
|
||||
}
|
||||
|
||||
if (!isset($liste[$row->mitarbeiter_uid]['gesamtstunden_erteilt']))
|
||||
{
|
||||
$liste[$row->mitarbeiter_uid]['gesamtstunden_erteilt'] = 0;
|
||||
$liste[$row->mitarbeiter_uid]['gesamtkosten_erteilt'] = 0;
|
||||
}
|
||||
|
||||
if (!isset($liste[$row->mitarbeiter_uid]['gesamtstunden_akzeptiert']))
|
||||
{
|
||||
$liste[$row->mitarbeiter_uid]['gesamtstunden_akzeptiert'] = 0;
|
||||
$liste[$row->mitarbeiter_uid]['gesamtkosten_akzeptiert'] = 0;
|
||||
}
|
||||
|
||||
if ($row->vertragsstatus == 'akzeptiert')
|
||||
if (in_array('bestellt', $row->vertragsstatus))
|
||||
{
|
||||
$liste[$row->mitarbeiter_uid]['gesamtstunden_bestellt'] =
|
||||
$liste[$row->mitarbeiter_uid]['gesamtstunden_bestellt'] + $row->semesterstunden;
|
||||
$liste[$row->mitarbeiter_uid]['gesamtkosten_bestellt'] =
|
||||
$liste[$row->mitarbeiter_uid]['gesamtkosten_bestellt']
|
||||
+ ($row->semesterstunden * $row->stundensatz);
|
||||
}
|
||||
|
||||
if (in_array('erteilt', $row->vertragsstatus))
|
||||
{
|
||||
$liste[$row->mitarbeiter_uid]['gesamtstunden_erteilt'] =
|
||||
$liste[$row->mitarbeiter_uid]['gesamtstunden_erteilt'] + $row->semesterstunden;
|
||||
$liste[$row->mitarbeiter_uid]['gesamtkosten_erteilt'] =
|
||||
$liste[$row->mitarbeiter_uid]['gesamtkosten_erteilt']
|
||||
+ ($row->semesterstunden * $row->stundensatz);
|
||||
}
|
||||
|
||||
if (in_array('akzeptiert', $row->vertragsstatus))
|
||||
{
|
||||
$liste[$row->mitarbeiter_uid]['gesamtstunden_akzeptiert'] =
|
||||
$liste[$row->mitarbeiter_uid]['gesamtstunden_akzeptiert'] + $row->semesterstunden;
|
||||
@@ -356,8 +427,20 @@ if ($result_stg = $db->db_query($qry_stg))
|
||||
$liste[$row->mitarbeiter_uid]['vorname'] = $row->vorname;
|
||||
$liste[$row->mitarbeiter_uid]['nachname'] = $row->nachname;
|
||||
$liste[$row->mitarbeiter_uid]['fixangestellt'] = $row->fixangestellt;
|
||||
$liste[$row->mitarbeiter_uid]['oezuordnung'] = $row->oezuordnung;
|
||||
$liste[$row->mitarbeiter_uid]['department'] = $row->department;
|
||||
|
||||
if (is_null($row->oezuordnung))
|
||||
{
|
||||
$oeInfos = getOe($row->mitarbeiter_uid, $row->fixangestellt);
|
||||
$liste[$row->mitarbeiter_uid]['oezuordnung'] = $oeInfos['oezuordnung'];
|
||||
$liste[$row->mitarbeiter_uid]['department'] = $oeInfos['department'];
|
||||
$liste[$row->mitarbeiter_uid]['organisationgeaendert'] = $oeInfos['organisationgeaendert'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$liste[$row->mitarbeiter_uid]['oezuordnung'] = $row->oezuordnung;
|
||||
$liste[$row->mitarbeiter_uid]['department'] = $row->department;
|
||||
}
|
||||
|
||||
$liste[$row->mitarbeiter_uid]['betreuergesamtstunden'] = 0;
|
||||
$liste[$row->mitarbeiter_uid]['betreuergesamtkosten'] = 0;
|
||||
if ($row->geaendert == 't')
|
||||
@@ -375,7 +458,7 @@ if ($result_stg = $db->db_query($qry_stg))
|
||||
public.tbl_benutzerfunktion
|
||||
JOIN public.tbl_organisationseinheit USING (oe_kurzbz)
|
||||
WHERE
|
||||
funktion_kurzbz='oezuordnung'
|
||||
funktion_kurzbz = (CASE WHEN fixangestellt = true THEN 'kstzuordnung' ELSE 'oezuordnung' END)
|
||||
AND (datum_von IS NULL OR datum_von <= now())
|
||||
AND (datum_bis IS NULL OR datum_bis >= now())
|
||||
AND tbl_benutzerfunktion.uid = tbl_benutzer.uid
|
||||
@@ -390,7 +473,7 @@ if ($result_stg = $db->db_query($qry_stg))
|
||||
WHERE oe_kurzbz IN (
|
||||
SELECT oe_kurzbz
|
||||
FROM PUBLIC.tbl_benutzerfunktion
|
||||
WHERE funktion_kurzbz = 'oezuordnung'
|
||||
WHERE funktion_kurzbz = (CASE WHEN fixangestellt = true THEN 'kstzuordnung' ELSE 'oezuordnung' END)
|
||||
AND (
|
||||
datum_von IS NULL
|
||||
OR datum_von <= now()
|
||||
@@ -419,27 +502,23 @@ if ($result_stg = $db->db_query($qry_stg))
|
||||
WHERE meine_oes.organisationseinheittyp_kurzbz = 'Department'
|
||||
) AS department
|
||||
FROM
|
||||
lehre.tbl_projektbetreuer, public.tbl_person, public.tbl_benutzer,
|
||||
public.tbl_mitarbeiter, lehre.tbl_projektarbeit, lehre.tbl_lehreinheit,
|
||||
lehre.tbl_lehrveranstaltung
|
||||
lehre.tbl_projektbetreuer JOIN public.tbl_person ON tbl_projektbetreuer.person_id=tbl_person.person_id
|
||||
JOIN public.tbl_benutzer ON tbl_benutzer.person_id=tbl_person.person_id
|
||||
JOIN public.tbl_mitarbeiter ON tbl_mitarbeiter.mitarbeiter_uid=tbl_benutzer.uid
|
||||
JOIN lehre.tbl_projektarbeit ON tbl_projektarbeit.projektarbeit_id=tbl_projektbetreuer.projektarbeit_id
|
||||
JOIN lehre.tbl_lehreinheit ON tbl_lehreinheit.lehreinheit_id=tbl_projektarbeit.lehreinheit_id
|
||||
JOIN lehre.tbl_lehrveranstaltung ON tbl_lehrveranstaltung.lehrveranstaltung_id = tbl_lehreinheit.lehrveranstaltung_id
|
||||
WHERE
|
||||
tbl_projektbetreuer.person_id=tbl_person.person_id AND
|
||||
tbl_person.person_id=tbl_benutzer.person_id AND
|
||||
tbl_mitarbeiter.mitarbeiter_uid=tbl_benutzer.uid AND
|
||||
tbl_projektarbeit.projektarbeit_id=tbl_projektbetreuer.projektarbeit_id AND
|
||||
tbl_projektarbeit.lehreinheit_id=tbl_lehreinheit.lehreinheit_id AND
|
||||
tbl_lehreinheit.studiensemester_kurzbz=".$db->db_add_param($semester_aktuell)." AND
|
||||
tbl_lehreinheit.lehrveranstaltung_id = tbl_lehrveranstaltung.lehrveranstaltung_id AND
|
||||
tbl_lehrveranstaltung.studiengang_kz=".$db->db_add_param($studiengang_kz, FHC_INTEGER)." AND
|
||||
NOT EXISTS (SELECT
|
||||
mitarbeiter_uid
|
||||
FROM
|
||||
lehre.tbl_lehreinheitmitarbeiter, lehre.tbl_lehreinheit, lehre.tbl_lehrveranstaltung
|
||||
lehre.tbl_lehreinheitmitarbeiter JOIN lehre.tbl_lehreinheit ON tbl_lehreinheitmitarbeiter.lehreinheit_id=tbl_lehreinheit.lehreinheit_id
|
||||
JOIN lehre.tbl_lehrveranstaltung ON tbl_lehrveranstaltung.lehrveranstaltung_id=tbl_lehreinheit.lehrveranstaltung_id
|
||||
WHERE
|
||||
mitarbeiter_uid=tbl_benutzer.uid AND
|
||||
tbl_lehrveranstaltung.lehrveranstaltung_id=tbl_lehreinheit.lehrveranstaltung_id AND
|
||||
tbl_lehrveranstaltung.studiengang_kz=".$db->db_add_param($studiengang_kz, FHC_INTEGER)." AND
|
||||
tbl_lehreinheitmitarbeiter.lehreinheit_id=tbl_lehreinheit.lehreinheit_id AND
|
||||
tbl_lehreinheitmitarbeiter.semesterstunden<>0 AND
|
||||
tbl_lehreinheitmitarbeiter.semesterstunden is not null AND
|
||||
EXISTS (
|
||||
@@ -461,8 +540,20 @@ if ($result_stg = $db->db_query($qry_stg))
|
||||
$liste[$row->uid]['vorname'] = $row->vorname;
|
||||
$liste[$row->uid]['nachname'] = $row->nachname;
|
||||
$liste[$row->uid]['fixangestellt'] = $row->fixangestellt;
|
||||
$liste[$row->uid]['oezuordnung'] = $row->oezuordnung;
|
||||
$liste[$row->uid]['department'] = $row->department;
|
||||
|
||||
if (is_null($row->oezuordnung))
|
||||
{
|
||||
$oeInfos = getOe($row->uid, $row->fixangestellt);
|
||||
$liste[$row->uid]['oezuordnung'] = $oeInfos['oezuordnung'];
|
||||
$liste[$row->uid]['department'] = $oeInfos['department'];
|
||||
$liste[$row->uid]['organisationgeaendert'] = $oeInfos['organisationgeaendert'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$liste[$row->uid]['oezuordnung'] = $row->oezuordnung;
|
||||
$liste[$row->uid]['department'] = $row->department;
|
||||
}
|
||||
|
||||
$liste[$row->uid]['geaendert'] = false;
|
||||
$liste[$row->uid]['gesamtstunden'] = 0;
|
||||
$liste[$row->uid]['gesamtkosten'] = 0;
|
||||
@@ -488,32 +579,29 @@ if ($result_stg = $db->db_query($qry_stg))
|
||||
ELSE
|
||||
'f'
|
||||
END as geaendert,
|
||||
(
|
||||
SELECT
|
||||
vertragsstatus_kurzbz
|
||||
(SELECT
|
||||
ARRAY_TO_STRING(ARRAY_AGG(vertragsstatus_kurzbz), ',')
|
||||
FROM
|
||||
lehre.tbl_vertrag_vertragsstatus
|
||||
WHERE
|
||||
vertrag_id = tbl_projektbetreuer.vertrag_id
|
||||
ORDER BY datum DESC
|
||||
LIMIT 1
|
||||
) as vertragsstatus
|
||||
FROM lehre.tbl_projektbetreuer, lehre.tbl_lehreinheit, lehre.tbl_lehrveranstaltung,
|
||||
public.tbl_benutzer, lehre.tbl_projektarbeit, campus.vw_student
|
||||
FROM
|
||||
lehre.tbl_projektbetreuer JOIN public.tbl_benutzer ON tbl_projektbetreuer.person_id = tbl_benutzer.person_id
|
||||
JOIN lehre.tbl_projektarbeit ON tbl_projektarbeit.projektarbeit_id = tbl_projektbetreuer.projektarbeit_id
|
||||
JOIN lehre.tbl_lehreinheit ON tbl_lehreinheit.lehreinheit_id = tbl_projektarbeit.lehreinheit_id
|
||||
JOIN lehre.tbl_lehrveranstaltung ON tbl_lehreinheit.lehrveranstaltung_id = tbl_lehrveranstaltung.lehrveranstaltung_id
|
||||
JOIN campus.vw_student ON vw_student.uid = student_uid
|
||||
WHERE
|
||||
tbl_projektbetreuer.person_id = tbl_benutzer.person_id
|
||||
AND tbl_benutzer.uid = ".$db->db_add_param($uid)."
|
||||
AND tbl_projektarbeit.projektarbeit_id = tbl_projektbetreuer.projektarbeit_id
|
||||
AND student_uid = vw_student.uid
|
||||
AND tbl_lehreinheit.lehreinheit_id = tbl_projektarbeit.lehreinheit_id
|
||||
tbl_benutzer.uid = ".$db->db_add_param($uid)."
|
||||
AND tbl_lehreinheit.studiensemester_kurzbz=".$db->db_add_param($semester_aktuell)."
|
||||
AND tbl_lehreinheit.lehrveranstaltung_id = tbl_lehrveranstaltung.lehrveranstaltung_id
|
||||
AND tbl_lehrveranstaltung.studiengang_kz=".$db->db_add_param($studiengang_kz, FHC_INTEGER);
|
||||
|
||||
if ($result = $db->db_query($qry))
|
||||
{
|
||||
while ($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$row->vertragsstatus = explode(',', $row->vertragsstatus);
|
||||
$liste[$uid]['gesamtstunden'] = $liste[$uid]['gesamtstunden'] + $row->stunden;
|
||||
$liste[$uid]['gesamtkosten'] =
|
||||
$liste[$uid]['gesamtkosten'] + ($row->stunden * $row->stundensatz);
|
||||
@@ -524,13 +612,42 @@ if ($result_stg = $db->db_query($qry_stg))
|
||||
{
|
||||
$liste[$uid]['geaendert'] = true;
|
||||
}
|
||||
|
||||
if (!isset($liste[$uid]['gesamtstunden_bestellt']))
|
||||
{
|
||||
$liste[$uid]['gesamtstunden_bestellt'] = 0;
|
||||
$liste[$uid]['gesamtkosten_bestellt'] = 0;
|
||||
}
|
||||
|
||||
if (!isset($liste[$uid]['gesamtstunden_erteilt']))
|
||||
{
|
||||
$liste[$uid]['gesamtstunden_erteilt'] = 0;
|
||||
$liste[$uid]['gesamtkosten_erteilt'] = 0;
|
||||
}
|
||||
|
||||
if (!isset($liste[$uid]['gesamtstunden_akzeptiert']))
|
||||
{
|
||||
$liste[$uid]['gesamtstunden_akzeptiert'] = 0;
|
||||
$liste[$uid]['gesamtkosten_akzeptiert'] = 0;
|
||||
}
|
||||
|
||||
if ($row->vertragsstatus == 'akzeptiert')
|
||||
if (in_array('bestellt', $row->vertragsstatus))
|
||||
{
|
||||
$liste[$uid]['gesamtstunden_bestellt'] =
|
||||
$liste[$uid]['gesamtstunden_bestellt'] + $row->stunden;
|
||||
$liste[$uid]['gesamtkosten_bestellt'] =
|
||||
$liste[$uid]['gesamtkosten_bestellt'] + ($row->stunden * $row->stundensatz);
|
||||
}
|
||||
|
||||
if (in_array('erteilt', $row->vertragsstatus))
|
||||
{
|
||||
$liste[$uid]['gesamtstunden_erteilt'] =
|
||||
$liste[$uid]['gesamtstunden_erteilt'] + $row->stunden;
|
||||
$liste[$uid]['gesamtkosten_erteilt'] =
|
||||
$liste[$uid]['gesamtkosten_erteilt'] + ($row->stunden * $row->stundensatz);
|
||||
}
|
||||
|
||||
if (in_array('akzeptiert', $row->vertragsstatus))
|
||||
{
|
||||
$liste[$uid]['gesamtstunden_akzeptiert'] =
|
||||
$liste[$uid]['gesamtstunden_akzeptiert'] + $row->stunden;
|
||||
@@ -558,13 +675,20 @@ if ($result_stg = $db->db_query($qry_stg))
|
||||
if (isset($row['geaendert']) && $row['geaendert'] == true)
|
||||
{
|
||||
$format = $format_colored;
|
||||
$formatOE = $format_colored;
|
||||
$formatnb = $format_number_colored;
|
||||
}
|
||||
else
|
||||
{
|
||||
$format = $format_normal;
|
||||
$formatOE = $format_normal;
|
||||
$formatnb = $format_number;
|
||||
}
|
||||
|
||||
if(isset($row['organisationgeaendert']) && $row['organisationgeaendert'] === true)
|
||||
{
|
||||
$formatOE = $oe_colored;
|
||||
}
|
||||
//Studiengang
|
||||
$worksheet->write($zeile, $i, $studiengang->kuerzel, $format);
|
||||
$gesamt->write($gesamtsheet_row, $i, $studiengang->kuerzel, $format);
|
||||
@@ -584,11 +708,11 @@ if ($result_stg = $db->db_query($qry_stg))
|
||||
$worksheet->write($zeile, ++$i, $row['fixangestellt'], $format);
|
||||
$gesamt->write($gesamtsheet_row, $i, $row['fixangestellt'], $format);
|
||||
//OE-Zuordnung
|
||||
$worksheet->write($zeile, ++$i, $row['oezuordnung'], $format);
|
||||
$gesamt->write($gesamtsheet_row, $i, $row['oezuordnung'], $format);
|
||||
$worksheet->write($zeile, ++$i, $row['oezuordnung'], $formatOE);
|
||||
$gesamt->write($gesamtsheet_row, $i, $row['oezuordnung'], $formatOE);
|
||||
//Department der OE-Zuordnung
|
||||
$worksheet->write($zeile, ++$i, $row['department'], $format);
|
||||
$gesamt->write($gesamtsheet_row, $i, $row['department'], $format);
|
||||
$worksheet->write($zeile, ++$i, $row['department'], $formatOE);
|
||||
$gesamt->write($gesamtsheet_row, $i, $row['department'], $formatOE);
|
||||
//LVStunden
|
||||
$lvstunden = str_replace(', ', '.', $row['lvstunden']);
|
||||
$worksheet->write($zeile, ++$i, $lvstunden, $format);
|
||||
@@ -613,6 +737,25 @@ if ($result_stg = $db->db_query($qry_stg))
|
||||
$gesamtkosten_row = str_replace(', ', '.', $row['gesamtkosten']);
|
||||
$worksheet->writeNumber($zeile, ++$i, $gesamtkosten_row, $formatnb);
|
||||
$gesamt->writeNumber($gesamtsheet_row, $i, $gesamtkosten_row, $formatnb);
|
||||
|
||||
//Gesamtstunden bestellt
|
||||
$gesamtstunden_bestellt = str_replace(', ', '.', $row['gesamtstunden_bestellt']);
|
||||
$worksheet->write($zeile, ++$i, $gesamtstunden_bestellt, $formatnb);
|
||||
$gesamt->write($gesamtsheet_row, $i, $gesamtstunden_bestellt, $formatnb);
|
||||
//Gesamtkosten bestellt
|
||||
$gesamtkosten_bestellt_row = str_replace(', ', '.', $row['gesamtkosten_bestellt']);
|
||||
$worksheet->writeNumber($zeile, ++$i, $gesamtkosten_bestellt_row, $formatnb);
|
||||
$gesamt->writeNumber($gesamtsheet_row, $i, $gesamtkosten_bestellt_row, $formatnb);
|
||||
|
||||
//Gesamtstunden erteilt
|
||||
$gesamtstunden_erteilt = str_replace(', ', '.', $row['gesamtstunden_erteilt']);
|
||||
$worksheet->write($zeile, ++$i, $gesamtstunden_erteilt, $formatnb);
|
||||
$gesamt->write($gesamtsheet_row, $i, $gesamtstunden_erteilt, $formatnb);
|
||||
//Gesamtkosten erteilt
|
||||
$gesamtkosten_erteilt_row = str_replace(', ', '.', $row['gesamtkosten_erteilt']);
|
||||
$worksheet->writeNumber($zeile, ++$i, $gesamtkosten_erteilt_row, $formatnb);
|
||||
$gesamt->writeNumber($gesamtsheet_row, $i, $gesamtkosten_erteilt_row, $formatnb);
|
||||
|
||||
//Gesamtstunden akzeptiert
|
||||
$gesamtstunden_akzeptiert = str_replace(', ', '.', $row['gesamtstunden_akzeptiert']);
|
||||
$worksheet->write($zeile, ++$i, $gesamtstunden_akzeptiert, $formatnb);
|
||||
@@ -641,11 +784,31 @@ if ($result_stg = $db->db_query($qry_stg))
|
||||
else
|
||||
$liste_gesamt[$uid]['gesamtkosten'] = $row['gesamtkosten'];
|
||||
|
||||
if (isset($liste_gesamt[$uid]['gesamtstunden_bestellt']))
|
||||
$liste_gesamt[$uid]['gesamtstunden_bestellt'] += $row['gesamtstunden_bestellt'];
|
||||
else
|
||||
$liste_gesamt[$uid]['gesamtstunden_bestellt'] = $row['gesamtstunden_bestellt'];
|
||||
|
||||
if (isset($liste_gesamt[$uid]['gesamtkosten_bestellt']))
|
||||
$liste_gesamt[$uid]['gesamtkosten_bestellt'] += $row['gesamtkosten_bestellt'];
|
||||
else
|
||||
$liste_gesamt[$uid]['gesamtkosten_bestellt'] = $row['gesamtkosten_bestellt'];
|
||||
|
||||
if (isset($liste_gesamt[$uid]['gesamtstunden_erteilt']))
|
||||
$liste_gesamt[$uid]['gesamtstunden_erteilt'] += $row['gesamtstunden_erteilt'];
|
||||
else
|
||||
$liste_gesamt[$uid]['gesamtstunden_erteilt'] = $row['gesamtstunden_erteilt'];
|
||||
|
||||
if (isset($liste_gesamt[$uid]['gesamtkosten_erteilt']))
|
||||
$liste_gesamt[$uid]['gesamtkosten_erteilt'] += $row['gesamtkosten_erteilt'];
|
||||
else
|
||||
$liste_gesamt[$uid]['gesamtkosten_erteilt'] = $row['gesamtkosten_erteilt'];
|
||||
|
||||
if (isset($liste_gesamt[$uid]['gesamtstunden_akzeptiert']))
|
||||
$liste_gesamt[$uid]['gesamtstunden_akzeptiert'] += $row['gesamtstunden_akzeptiert'];
|
||||
else
|
||||
$liste_gesamt[$uid]['gesamtstunden_akzeptiert'] = $row['gesamtstunden_akzeptiert'];
|
||||
|
||||
|
||||
if (isset($liste_gesamt[$uid]['gesamtkosten_akzeptiert']))
|
||||
$liste_gesamt[$uid]['gesamtkosten_akzeptiert'] += $row['gesamtkosten_akzeptiert'];
|
||||
else
|
||||
@@ -745,3 +908,36 @@ if ($result_stg = $db->db_query($qry_stg))
|
||||
else
|
||||
echo "Fehler beim Versenden der Lehrauftragsliste";
|
||||
}
|
||||
|
||||
function getOe($mitarbeiter_uid, $fixangestellt)
|
||||
{
|
||||
$benutzerfunktion = new Benutzerfunktion();
|
||||
$oe = new Organisationseinheit();
|
||||
|
||||
$benutzerfunktion->getBenutzerFunktionByUid($mitarbeiter_uid, $fixangestellt === 'Ja' ? 'kstzuordnung' : 'oezuordnung', date('Y-m-d'));
|
||||
|
||||
if (isset($benutzerfunktion->result[0]))
|
||||
{
|
||||
array_multisort(array_column($benutzerfunktion->result, 'datum_von'), SORT_ASC, $benutzerfunktion->result);
|
||||
}
|
||||
else
|
||||
{
|
||||
$benutzerfunktion->getBenutzerFunktionByUid($mitarbeiter_uid, $fixangestellt === 'Ja' ? 'kstzuordnung' : 'oezuordnung', null, date('Y-m-d'));
|
||||
array_multisort(array_column($benutzerfunktion->result, 'datum_bis'), SORT_DESC, $benutzerfunktion->result);
|
||||
}
|
||||
|
||||
if (!isset($benutzerfunktion->result[0]))
|
||||
return array('oezuordnung' => '', 'department' => '', 'organisationgeaendert' => false);
|
||||
|
||||
$oe->load($benutzerfunktion->result[0]->oe_kurzbz);
|
||||
$oezuordnung = $oe->organisationseinheittyp_kurzbz . ' ' . $oe->bezeichnung;
|
||||
|
||||
$oe_parents = $oe->getParents_withOEType($oe->oe_kurzbz);
|
||||
|
||||
if (is_array($oe_parents))
|
||||
$department = ($oe_parents[array_search('Department', array_column($oe_parents, 'oe_typ_bezeichnung'))]->oe_bezeichnung);
|
||||
else
|
||||
$department = '';
|
||||
|
||||
return array('oezuordnung' => $oezuordnung, 'department' => $department, 'organisationgeaendert' => true);
|
||||
}
|
||||
@@ -74,7 +74,10 @@ require_once('../../include/reihungstest.class.php');
|
||||
require_once('../../include/studienplan.class.php');
|
||||
require_once('../../include/mobilitaet.class.php');
|
||||
require_once('../../include/studienordnung.class.php');
|
||||
require_once('../../include/mitarbeiter.class.php');
|
||||
require_once('../../include/bisverwendung.class.php');
|
||||
require_once('../../include/bismeldestichtag.class.php');
|
||||
require_once('../../include/stundensatz.class.php');
|
||||
|
||||
$user = get_uid();
|
||||
$db = new basis_db();
|
||||
@@ -2584,13 +2587,16 @@ if(!$error)
|
||||
}
|
||||
else
|
||||
{
|
||||
if(defined('FAS_BUCHUNGSTYP_FIXE_KOSTENSTELLE') && isset(unserialize(FAS_BUCHUNGSTYP_FIXE_KOSTENSTELLE)[$_POST['buchungstyp_kurzbz']]))
|
||||
$kostenstelle = unserialize(FAS_BUCHUNGSTYP_FIXE_KOSTENSTELLE)[$_POST['buchungstyp_kurzbz']];
|
||||
|
||||
foreach ($person_ids as $person_id)
|
||||
{
|
||||
if($person_id!='')
|
||||
{
|
||||
$buchung = new konto();
|
||||
$buchung->person_id = $person_id;
|
||||
$buchung->studiengang_kz = $_POST['studiengang_kz'];
|
||||
$buchung->studiengang_kz = isset($kostenstelle) ? $kostenstelle : $_POST['studiengang_kz'];
|
||||
$buchung->studiensemester_kurzbz = $_POST['studiensemester_kurzbz'];
|
||||
$buchung->buchungsnr_verweis='';
|
||||
$buchung->betrag = $_POST['betrag'];
|
||||
@@ -4651,6 +4657,7 @@ if(!$error)
|
||||
$errormsg = 'Fehlerhafte Parameteruebergabe';
|
||||
}
|
||||
}
|
||||
|
||||
elseif(isset($_POST['type']) && $_POST['type']=='getstundensatz')
|
||||
{
|
||||
if(isset($_POST['person_id']) && isset($_POST['studiensemester_kurzbz']))
|
||||
@@ -4658,33 +4665,87 @@ if(!$error)
|
||||
$studiensemester = new studiensemester();
|
||||
if ($studiensemester->load($_POST['studiensemester_kurzbz']))
|
||||
{
|
||||
$qry = "SELECT ss.stundensatz
|
||||
FROM hr.tbl_stundensatz ss
|
||||
JOIN public.tbl_mitarbeiter ON ss.uid = tbl_mitarbeiter.mitarbeiter_uid
|
||||
JOIN public.tbl_benutzer ON(tbl_benutzer.uid=tbl_mitarbeiter.mitarbeiter_uid)
|
||||
WHERE person_id=".$db->db_add_param($_POST['person_id'], FHC_INTEGER) ."
|
||||
AND stundensatztyp = ". $db->db_add_param('lehre') ."
|
||||
AND gueltig_von <= ". $db->db_add_param($studiensemester->ende) ."
|
||||
AND (gueltig_bis >= ". $db->db_add_param($studiensemester->start) ." OR gueltig_bis IS NULL)
|
||||
ORDER BY gueltig_bis DESC NULLS FIRST, gueltig_von DESC NULLS LAST LIMIT 1
|
||||
";
|
||||
if($result = $db->db_query($qry))
|
||||
if (defined('FAS_LV_LEKTORINNENZUTEILUNG_FIXANGESTELLT_STUNDENSATZ')
|
||||
&& !FAS_LV_LEKTORINNENZUTEILUNG_FIXANGESTELLT_STUNDENSATZ)
|
||||
{
|
||||
if($row = $db->db_fetch_object($result))
|
||||
// Mitarbeiter laden
|
||||
$qry = "
|
||||
SELECT
|
||||
mitarbeiter_uid, fixangestellt
|
||||
FROM
|
||||
public.tbl_mitarbeiter
|
||||
JOIN public.tbl_benutzer ON(tbl_benutzer.uid=tbl_mitarbeiter.mitarbeiter_uid)
|
||||
WHERE
|
||||
person_id=".$db->db_add_param($_POST['person_id'], FHC_INTEGER) ."
|
||||
ORDER BY tbl_mitarbeiter.insertamum DESC NULLS LAST LIMIT 1
|
||||
";
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
$data = $row->stundensatz;
|
||||
$return = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$data = '80.00';
|
||||
$return = true;
|
||||
if($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$uid = $row->mitarbeiter_uid;
|
||||
|
||||
if($db->db_parse_bool($row->fixangestellt)==true)
|
||||
{
|
||||
// Fixangestellte haben keinen Stundensatz
|
||||
$data = '';
|
||||
$return = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Stundensatz des Mitarbeiters laden
|
||||
$stundensatz = new stundensatz();
|
||||
if($stundensatz->getStundensatzDatum($uid, $studiensemester->start, $studiensemester->ende, 'lehre'))
|
||||
{
|
||||
$data = $stundensatz->stundensatz;
|
||||
$return = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Keine Stundensatz hinterlegt
|
||||
$data = '0.00';
|
||||
$return = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Kein Mitarbeiter gefunden, kein Stundensatz
|
||||
$data = '0.00';
|
||||
$return = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$return = false;
|
||||
$errormsg = 'Unbekannter Fehler';
|
||||
$qry = "SELECT ss.stundensatz
|
||||
FROM hr.tbl_stundensatz ss
|
||||
JOIN public.tbl_mitarbeiter ON ss.uid = tbl_mitarbeiter.mitarbeiter_uid
|
||||
JOIN public.tbl_benutzer ON(tbl_benutzer.uid=tbl_mitarbeiter.mitarbeiter_uid)
|
||||
WHERE person_id=".$db->db_add_param($_POST['person_id'], FHC_INTEGER) ."
|
||||
AND stundensatztyp = ". $db->db_add_param('lehre') ."
|
||||
AND gueltig_von <= ". $db->db_add_param($studiensemester->ende) ."
|
||||
AND (gueltig_bis >= ". $db->db_add_param($studiensemester->start) ." OR gueltig_bis IS NULL)
|
||||
ORDER BY gueltig_bis DESC NULLS FIRST, gueltig_von DESC NULLS LAST LIMIT 1
|
||||
";
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
if($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$data = $row->stundensatz;
|
||||
$return = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$data = '80.00';
|
||||
$return = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$return = false;
|
||||
$errormsg = 'Unbekannter Fehler';
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -4692,8 +4753,15 @@ if(!$error)
|
||||
$return = false;
|
||||
$errormsg = 'Fehler beim Laden des Studiensemesters';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$data = '20.00'.$_POST['studiensemester_kurzbz'];
|
||||
$return = true;
|
||||
}
|
||||
}
|
||||
|
||||
elseif(isset($_POST['type']) && $_POST['type']=='saveanrechnung')
|
||||
{
|
||||
$anrechnung = new anrechnung();
|
||||
|
||||
@@ -1658,7 +1658,7 @@ function StudentAuswahl()
|
||||
|
||||
var antragnotentree = document.getElementById('student-antragnoten-tree');
|
||||
|
||||
url='<?php echo APP_ROOT;?>index.ci.php/components/Antrag/Wiederholung/getLvsAsRdf/'+prestudent_id+"?"+gettimestamp();
|
||||
url='<?php echo APP_ROOT;?>index.ci.php/api/frontend/fas/studstatus/Wiederholung/getLvs/'+prestudent_id+"?"+gettimestamp();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -4764,7 +4764,7 @@ function StudentNotenMoveFromAntrag()
|
||||
var paramList= '';
|
||||
var i = 0;
|
||||
|
||||
var url = '<?php echo APP_ROOT ?>index.ci.php/components/Antrag/Wiederholung/moveLvsToZeugnis';
|
||||
var url = '<?php echo APP_ROOT ?>index.ci.php/api/frontend/fas/studstatus/Wiederholung/moveLvsToZeugnis';
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
for (var t = 0; t < numRanges; t++)
|
||||
@@ -6225,6 +6225,54 @@ function StudentPrintAntragAbmeldung(event)
|
||||
window.open('<?php echo APP_ROOT; ?>/content/pdfExport.php?xml=AntragAbmeldung.xml.php&xsl=AntragAbmeldung&uid='+student_uid+'&prestudent_id='+prestudent_id+'&output='+output,'AntragAbmeldung', 'height=200,width=350,left=0,top=0,hotkeys=0,resizable=yes,status=no,scrollbars=yes,toolbar=no,location=no,menubar=no,dependent=yes');
|
||||
}
|
||||
|
||||
function StudentPrintAntragAbmeldungStgl(event)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var tree = document.getElementById('student-tree');
|
||||
|
||||
|
||||
if (tree.currentIndex==-1)
|
||||
return alert('Bitte eine/n Studierende/n auswaehlen');
|
||||
|
||||
//Uids aller markierten Studenten holen
|
||||
var start = new Object();
|
||||
var end = new Object();
|
||||
var numRanges = tree.view.selection.getRangeCount();
|
||||
var prestudent_id= '';
|
||||
var student_uid= '';
|
||||
|
||||
for (var t = 0; t < numRanges; t++)
|
||||
{
|
||||
tree.view.selection.getRangeAt(t,start,end);
|
||||
for (var v = start.value; v <= end.value; v++)
|
||||
{
|
||||
var col = tree.columns ? tree.columns["student-treecol-prestudent_id"] : "student-treecol-prestudent_id";
|
||||
var prestudentId=tree.view.getCellText(v,col);
|
||||
prestudent_id += ';'+prestudentId;
|
||||
|
||||
col = tree.columns ? tree.columns["student-treecol-uid"] : "student-treecol-uid";
|
||||
var uid=tree.view.getCellText(v,col);
|
||||
student_uid += ';'+uid;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (event.shiftKey)
|
||||
{
|
||||
var output='odt';
|
||||
}
|
||||
else if (event.ctrlKey)
|
||||
{
|
||||
var output='doc';
|
||||
}
|
||||
else
|
||||
{
|
||||
var output='pdf';
|
||||
}
|
||||
|
||||
window.open('<?php echo APP_ROOT; ?>/content/pdfExport.php?xml=AntragAbmeldungStgl.xml.php&xsl=AntragAbmeldungStgl&uid='+student_uid+'&prestudent_id='+prestudent_id+'&output='+output,'AntragAbmeldung', 'height=200,width=350,left=0,top=0,hotkeys=0,resizable=yes,status=no,scrollbars=yes,toolbar=no,location=no,menubar=no,dependent=yes');
|
||||
}
|
||||
|
||||
function StudentPrintAntragUnterbrechung(event)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
@@ -6273,6 +6321,54 @@ function StudentPrintAntragUnterbrechung(event)
|
||||
window.open('<?php echo APP_ROOT; ?>/content/pdfExport.php?xml=AntragUnterbrechung.xml.php&xsl=AntragUnterbrechung&uid='+student_uid+'&prestudent_id='+prestudent_id+'&output='+output,'AntragUnterbrechung', 'height=200,width=350,left=0,top=0,hotkeys=0,resizable=yes,status=no,scrollbars=yes,toolbar=no,location=no,menubar=no,dependent=yes');
|
||||
}
|
||||
|
||||
function StudentPrintAntragWiederholung(event)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var tree = document.getElementById('student-tree');
|
||||
|
||||
|
||||
if (tree.currentIndex==-1)
|
||||
return alert('Bitte eine/n Studierende/n auswaehlen');
|
||||
|
||||
//Uids aller markierten Studenten holen
|
||||
var start = new Object();
|
||||
var end = new Object();
|
||||
var numRanges = tree.view.selection.getRangeCount();
|
||||
var prestudent_id= '';
|
||||
var student_uid= '';
|
||||
|
||||
for (var t = 0; t < numRanges; t++)
|
||||
{
|
||||
tree.view.selection.getRangeAt(t,start,end);
|
||||
for (var v = start.value; v <= end.value; v++)
|
||||
{
|
||||
var col = tree.columns ? tree.columns["student-treecol-prestudent_id"] : "student-treecol-prestudent_id";
|
||||
var prestudentId=tree.view.getCellText(v,col);
|
||||
prestudent_id += ';'+prestudentId;
|
||||
|
||||
col = tree.columns ? tree.columns["student-treecol-uid"] : "student-treecol-uid";
|
||||
var uid=tree.view.getCellText(v,col);
|
||||
student_uid += ';'+uid;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (event.shiftKey)
|
||||
{
|
||||
var output='odt';
|
||||
}
|
||||
else if (event.ctrlKey)
|
||||
{
|
||||
var output='doc';
|
||||
}
|
||||
else
|
||||
{
|
||||
var output='pdf';
|
||||
}
|
||||
|
||||
window.open('<?php echo APP_ROOT; ?>/content/pdfExport.php?xml=AntragWiederholung.xml.php&xsl=AntragWiederholung&uid='+student_uid+'&prestudent_id='+prestudent_id+'&output='+output,'AntragUnterbrechung', 'height=200,width=350,left=0,top=0,hotkeys=0,resizable=yes,status=no,scrollbars=yes,toolbar=no,location=no,menubar=no,dependent=yes');
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Erstellt den Ausbildungsvertrag fuer einen oder mehrere Studenten
|
||||
// ****
|
||||
|
||||
@@ -393,6 +393,7 @@ function StudentProjektarbeitAuswahl()
|
||||
anmerkung = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#anmerkung" ));
|
||||
gesamtstunden = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#gesamtstunden" ));
|
||||
final = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#final" ));
|
||||
var lehreinheit_stsem = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#lehreinheit_stsem" ));
|
||||
|
||||
var stg_kz = document.getElementById('student-detail-menulist-studiengang_kz').value;
|
||||
|
||||
@@ -440,6 +441,7 @@ function StudentProjektarbeitAuswahl()
|
||||
|
||||
//Werte setzen
|
||||
document.getElementById('student-projektarbeit-textbox-projektarbeit_id').value=projektarbeit_id;
|
||||
document.getElementById('student-projektarbeit-textbox-lehreinheit_stsem').value=lehreinheit_stsem;
|
||||
document.getElementById('student-projektarbeit-menulist-projekttyp').value=projekttyp_kurzbz;
|
||||
document.getElementById('student-projektarbeit-menulist-lehrveranstaltung').value=lehrveranstaltung_id;
|
||||
document.getElementById('student-projektarbeit-menulist-lehreinheit').value=lehreinheit_id;
|
||||
@@ -649,6 +651,8 @@ function StudentProjektarbeitNeu()
|
||||
|
||||
document.getElementById('student-projektarbeit-checkbox-neu').checked=true;
|
||||
document.getElementById('student-projektarbeit-textbox-projektarbeit_id').value='';
|
||||
document.getElementById('student-projektarbeit-textbox-lehreinheit_stsem').value='';
|
||||
|
||||
StudentProjektarbeitResetFields();
|
||||
StudentProjektarbeitDetailDisableFields(false);
|
||||
StudentProjektbetreuerDisableFields(true);
|
||||
@@ -872,6 +876,7 @@ function StudentProjektbetreuerAuswahl()
|
||||
name = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#name" ));
|
||||
punkte = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#punkte" ));
|
||||
stunden = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#stunden" ));
|
||||
|
||||
stundensatz = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#stundensatz" ));
|
||||
betreuerart_kurzbz = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#betreuerart_kurzbz" ));
|
||||
person_nachname = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#person_nachname" ));
|
||||
@@ -892,6 +897,16 @@ function StudentProjektbetreuerAuswahl()
|
||||
document.getElementById('student-projektbetreuer-textbox-person_id').value=person_id;
|
||||
document.getElementById('student-projektbetreuer-checkbox-neu').checked=false;
|
||||
|
||||
var lehreinheitstsem = document.getElementById('student-projektarbeit-textbox-lehreinheit_stsem').value;
|
||||
var default_stundensatz = StudentProjektbetreuerLoadStundensatz(person_id, lehreinheitstsem);
|
||||
|
||||
if (default_stundensatz != '')
|
||||
default_stundensatz = 'Stundensatz (Default '+default_stundensatz+'):';
|
||||
else
|
||||
default_stundensatz = 'Stundensatz';
|
||||
|
||||
document.getElementById('student-projektbetreuer-label-stundensatz').value= default_stundensatz;
|
||||
|
||||
var gesamtkosten = StudentProjektbetreuerGesamtkosten();
|
||||
|
||||
|
||||
@@ -1171,7 +1186,9 @@ function StudentProjektbetreuerDetailReset()
|
||||
document.getElementById('student-projektbetreuer-textbox-stunden').value='0.0';
|
||||
document.getElementById('student-projektbetreuer-menulist-betreuerart').value='Begutachter';
|
||||
}
|
||||
|
||||
document.getElementById('student-projektbetreuer-textbox-stundensatz').value='80.0';
|
||||
document.getElementById('student-projektbetreuer-label-stundensatz').value= 'Stundensatz (Default 80.0):';
|
||||
document.getElementById('student-projektbetreuer-menulist-person').value='';
|
||||
}
|
||||
|
||||
@@ -1358,16 +1375,16 @@ function StudentProjektbetreuerLoeschen()
|
||||
}
|
||||
}
|
||||
|
||||
function StudentProjektbetreuerLoadMitarbeiterDaten()
|
||||
function StudentProjektbetreuerLoadStundensatz(person_id, studiensemester)
|
||||
{
|
||||
person_id = MenulistGetSelectedValue('student-projektbetreuer-menulist-person');
|
||||
var stundensatz='';
|
||||
|
||||
var url = '<?php echo APP_ROOT ?>content/student/studentDBDML.php';
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
req.add('type', 'getstundensatz');
|
||||
req.add('person_id', person_id);
|
||||
req.add('studiensemester_kurzbz', getStudiensemester())
|
||||
req.add('studiensemester_kurzbz', studiensemester)
|
||||
|
||||
var response = req.executePOST();
|
||||
|
||||
@@ -1385,7 +1402,23 @@ function StudentProjektbetreuerLoadMitarbeiterDaten()
|
||||
stundensatz = val.dbdml_data
|
||||
}
|
||||
|
||||
document.getElementById('student-projektbetreuer-textbox-stundensatz').value=stundensatz;
|
||||
return stundensatz;
|
||||
}
|
||||
|
||||
function StudentProjektbetreuerLoadMitarbeiterDaten()
|
||||
{
|
||||
var person_id = MenulistGetSelectedValue('student-projektbetreuer-menulist-person');
|
||||
var lehreinheitstsem = document.getElementById('student-projektarbeit-textbox-lehreinheit_stsem').value;
|
||||
|
||||
var stundensatz = StudentProjektbetreuerLoadStundensatz(person_id, lehreinheitstsem);
|
||||
|
||||
if (stundensatz != '')
|
||||
default_stundensatz = 'Stundensatz (Default '+stundensatz+'):';
|
||||
else
|
||||
default_stundensatz = 'Stundensatz';
|
||||
|
||||
document.getElementById('student-projektbetreuer-label-stundensatz').value = default_stundensatz;
|
||||
document.getElementById('student-projektbetreuer-textbox-stundensatz').value = stundensatz;
|
||||
}
|
||||
|
||||
// ****
|
||||
|
||||
@@ -152,8 +152,8 @@ $is_hidden = (!defined('FAS_STUDIERENDE_PROJEKTARBEIT_VERTRAGSDETAILS_ANZEIGEN')
|
||||
</template>
|
||||
</tree>
|
||||
<vbox>
|
||||
<button id="student-projektarbeit-button-neu" label="Neu" oncommand="StudentProjektarbeitNeu();" disabled="true"/>
|
||||
<button id="student-projektarbeit-button-loeschen" label="Loeschen" oncommand="StudentProjektarbeitLoeschen();" disabled="true"/>
|
||||
<button id="student-projektarbeit-button-neu" label="Neue PA" oncommand="StudentProjektarbeitNeu();" disabled="true"/>
|
||||
<button id="student-projektarbeit-button-loeschen" label="PA Loeschen" oncommand="StudentProjektarbeitLoeschen();" disabled="true"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
<hbox>
|
||||
@@ -171,7 +171,11 @@ $is_hidden = (!defined('FAS_STUDIERENDE_PROJEKTARBEIT_VERTRAGSDETAILS_ANZEIGEN')
|
||||
<rows>
|
||||
<row>
|
||||
<label value="Projektarbeit ID" control="student-projektarbeit-textbox-projektarbeit_id"/>
|
||||
<hbox><textbox id="student-projektarbeit-textbox-projektarbeit_id" readonly="true" maxlength="16" size="16"/></hbox>
|
||||
<hbox>
|
||||
<textbox id="student-projektarbeit-textbox-projektarbeit_id" readonly="true" maxlength="16" size="16"/>
|
||||
<textbox id="student-projektarbeit-textbox-lehreinheit_stsem" hidden="true" readonly="true" maxlength="32" size="32"/>
|
||||
</hbox>
|
||||
|
||||
</row>
|
||||
<row>
|
||||
<label value="Titel" control="student-projektarbeit-textbox-titel"/>
|
||||
@@ -322,7 +326,7 @@ $is_hidden = (!defined('FAS_STUDIERENDE_PROJEKTARBEIT_VERTRAGSDETAILS_ANZEIGEN')
|
||||
<spacer />
|
||||
<hbox>
|
||||
<spacer flex="1" />
|
||||
<button id="student-projektarbeit-button-speichern" oncommand="StudentProjektarbeitSpeichern()" label="Speichern" disabled="true"/>
|
||||
<button id="student-projektarbeit-button-speichern" oncommand="StudentProjektarbeitSpeichern()" label="PA Speichern" disabled="true"/>
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
@@ -428,8 +432,8 @@ $is_hidden = (!defined('FAS_STUDIERENDE_PROJEKTARBEIT_VERTRAGSDETAILS_ANZEIGEN')
|
||||
</template>
|
||||
</tree>
|
||||
<vbox>
|
||||
<button id="student-projektbetreuer-button-neu" label="Neu" oncommand="StudentProjektbetreuerNeu();" disabled="true"/>
|
||||
<button id="student-projektbetreuer-button-loeschen" label="Loeschen" oncommand="StudentProjektbetreuerLoeschen();" disabled="true"/>
|
||||
<button id="student-projektbetreuer-button-neu" label="Neue Betreuung" oncommand="StudentProjektbetreuerNeu();" disabled="true"/>
|
||||
<button id="student-projektbetreuer-button-loeschen" label="Betreuung Loeschen" oncommand="StudentProjektbetreuerLoeschen();" disabled="true"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
<vbox hidden="true">
|
||||
@@ -523,7 +527,7 @@ $is_hidden = (!defined('FAS_STUDIERENDE_PROJEKTARBEIT_VERTRAGSDETAILS_ANZEIGEN')
|
||||
<textbox id="student-projektbetreuer-textbox-stunden" disabled="true" maxlength="8"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Stundensatz" control="student-projektbetreuer-textbox-stundensatz"/>
|
||||
<label id="student-projektbetreuer-label-stundensatz" value="Stundensatz: " control="student-projektbetreuer-textbox-stundensatz"/>
|
||||
<textbox id="student-projektbetreuer-textbox-stundensatz" disabled="true" maxlength="5"/>
|
||||
</row>
|
||||
<row hidden="true"><!-- Faktor wird nicht mehr benoetigt -->
|
||||
@@ -534,7 +538,7 @@ $is_hidden = (!defined('FAS_STUDIERENDE_PROJEKTARBEIT_VERTRAGSDETAILS_ANZEIGEN')
|
||||
<spacer />
|
||||
<hbox>
|
||||
<spacer flex="1" />
|
||||
<button id="student-projektbetreuer-button-speichern" label="Speichern" oncommand="StudentProjektbetreuerSpeichern()" />
|
||||
<button id="student-projektbetreuer-button-speichern" label="Betreuung Speichern" oncommand="StudentProjektbetreuerSpeichern()" />
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
|
||||
@@ -181,7 +181,7 @@ abstract class db extends basis
|
||||
if (!include(dirname(__FILE__).'/../application/config/'.CI_ENVIRONMENT.'/db_crypt.php')) return null;
|
||||
|
||||
// Array that will contains all the DB decryption password
|
||||
$decryptionPasswordsArray = array();
|
||||
$decryptionPasswordArray = array();
|
||||
// Array that will contains all the DB decryption password names
|
||||
$decryptionPasswordNamesArray = array();
|
||||
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013 fhcomplete.org
|
||||
*
|
||||
* 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: Manuela Thamer <manuela.thamer@technikum-wien.at>
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__). '/basis_db.class.php');
|
||||
require_once(dirname(__FILE__). '/sprache.class.php');
|
||||
require_once(dirname(__FILE__). '/functions.inc.php');
|
||||
|
||||
class besqualcode extends basis_db
|
||||
{
|
||||
//Objekt besqualcode
|
||||
public $result = array();
|
||||
|
||||
//Tabellenspalten
|
||||
public $besqualcode;
|
||||
public $besqualbez;
|
||||
|
||||
/**
|
||||
* Konstruktor - Laedt optional einen besqualcode
|
||||
* @param char $besqualcode Besqualcode der geladen werden soll.
|
||||
*/
|
||||
public function __construct($besqualcode = null)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
if($besqualcode != null)
|
||||
$this->load($besqualcode);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Liefert alle Lehrmodi aus der table tbl_besqualcode
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function getAll()
|
||||
{
|
||||
$qry = "SELECT * FROM bis.tbl_besqual";
|
||||
|
||||
if ($this->db_query($qry))
|
||||
{
|
||||
while ($row = $this->db_fetch_object())
|
||||
{
|
||||
$besqualcode = new besqualcode();
|
||||
|
||||
$besqualcode->besqualcode = $row->besqualcode;
|
||||
$besqualcode->besqualbez = $row->besqualbez;
|
||||
|
||||
$this->result[] = $besqualcode;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = "Fehler bei der Abfrage aufgetreten";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt einen besqualcode
|
||||
* @param char $besqualcode ID des Datensatzes der zu laden ist.
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function load($besqualcode)
|
||||
{
|
||||
$qry = "SELECT
|
||||
*
|
||||
FROM
|
||||
bis.tbl_besqual
|
||||
WHERE
|
||||
besqualcode=".$this->db_add_param($besqualcode).";";
|
||||
|
||||
if (!$this->db_query($qry))
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Lesen vom besqualcode';
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->besqualcode = $row->besqualcode;
|
||||
$this->besqualbez = $row->besqualbez;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Es ist kein besqualcode mit dieser ID vorhanden';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -16,8 +16,9 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>,
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>
|
||||
* Manuela Thamer <manuela.thamer@technikum-wien.at>
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
|
||||
@@ -27,7 +28,10 @@ class entwicklungsteam extends basis_db
|
||||
public $result = array();
|
||||
|
||||
//Tabellenspalten
|
||||
public $entwicklungsteam_id;
|
||||
public $mitarbeiter_uid;
|
||||
public $nachname;
|
||||
public $vorname;
|
||||
public $studiengang_kz;
|
||||
public $besqualcode;
|
||||
public $beginn;
|
||||
@@ -43,38 +47,40 @@ class entwicklungsteam extends basis_db
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
* @param mitarbeiter_uid ID des zu ladenden Datensatzes
|
||||
* @param entwicklungsteam_id ID des zu ladenden Datensatzes
|
||||
* studiengang_kz
|
||||
*/
|
||||
public function __construct($mitarbeiter_uid=null, $studiengang_kz=null)
|
||||
public function __construct($entwicklungsteam_id = null)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
if(!is_null($mitarbeiter_uid) && !is_null($studiengang_kz))
|
||||
$this->load($mitarbeiter_uid, $studiengang_kz);
|
||||
if(!is_null($entwicklungsteam_id))
|
||||
$this->load($entwicklungsteam_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt einen Datensatz
|
||||
* @param mitarbeiter_uid ID des zu ladenden Datensatzes
|
||||
* studiengang_kz
|
||||
* @param entwicklungsteam_id ID des zu ladenden Datensatzes
|
||||
*/
|
||||
public function load($mitarbeiter_uid, $studiengang_kz)
|
||||
public function load($entwicklungsteam_id)
|
||||
{
|
||||
if(!is_numeric($studiengang_kz) || $studiengang_kz == '')
|
||||
if(!is_numeric($entwicklungsteam_id))
|
||||
{
|
||||
$this->errormsg = 'studiengang_kz muss eine gueltige Zahl sein';
|
||||
$this->errormsg = 'entwicklungsteam_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
|
||||
//laden des Datensatzes
|
||||
$qry = "SELECT * FROM bis.tbl_entwicklungsteam JOIN bis.tbl_besqual USING(besqualcode)
|
||||
WHERE mitarbeiter_uid=".$this->db_add_param($mitarbeiter_uid)." AND studiengang_kz=".$this->db_add_param($studiengang_kz, FHC_INTEGER).";";
|
||||
WHERE entwicklungsteam_id=".$this->db_add_param($entwicklungsteam_id);
|
||||
|
||||
$qry.=";";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->entwicklungsteam_id = $row->entwicklungsteam_id;
|
||||
$this->mitarbeiter_uid = $row->mitarbeiter_uid;
|
||||
$this->studiengang_kz = $row->studiengang_kz;
|
||||
$this->besqualcode = $row->besqualcode;
|
||||
@@ -103,19 +109,19 @@ class entwicklungsteam extends basis_db
|
||||
|
||||
/**
|
||||
* Loescht einen Datensatz
|
||||
* @param bisverwendung_id ID des zu loeschenden Datensatzes
|
||||
* @param entwicklungsteam_id ID des zu loeschenden Datensatzes
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function delete($mitarbeiter_uid, $studiengang_kz)
|
||||
public function delete($entwicklungsteam_id)
|
||||
{
|
||||
if(!is_numeric($studiengang_kz) || $studiengang_kz == '')
|
||||
if(!is_numeric($entwicklungsteam_id))
|
||||
{
|
||||
$this->errormsg = 'studiengang_kz muss eine gueltige Zahl sein';
|
||||
$this->errormsg = 'entwicklungsteam_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry = "DELETE FROM bis.tbl_entwicklungsteam
|
||||
WHERE mitarbeiter_uid = ".$this->db_add_param($mitarbeiter_uid)." AND studiengang_kz=".$this->db_add_param($studiengang_kz, FHC_INTEGER).";";
|
||||
WHERE entwicklungsteam_id = ".$this->db_add_param($entwicklungsteam_id).";";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
@@ -148,7 +154,12 @@ class entwicklungsteam extends basis_db
|
||||
}
|
||||
if($this->besqualcode=='')
|
||||
{
|
||||
$this->errormsg = 'BesondereQualifikation muss eingetragen werden';
|
||||
$this->errormsg = 'Besondere Qualifikation muss eingetragen werden';
|
||||
return false;
|
||||
}
|
||||
if($this->ende != '' && $this->beginn > $this->ende)
|
||||
{
|
||||
$this->errormsg = 'Endedatum darf nicht vor Anfangsdatum liegen';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -160,7 +171,7 @@ class entwicklungsteam extends basis_db
|
||||
* andernfalls wird der Datensatz mit der ID in $akte_id aktualisiert
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function save($new=null)
|
||||
public function save($new = null)
|
||||
{
|
||||
if(!$this->validate())
|
||||
return false;
|
||||
@@ -181,7 +192,6 @@ class entwicklungsteam extends basis_db
|
||||
$this->db_add_param($this->updatevon).', '.
|
||||
$this->db_add_param($this->insertamum).', '.
|
||||
$this->db_add_param($this->insertvon).');';
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -196,7 +206,7 @@ class entwicklungsteam extends basis_db
|
||||
" ende=".$this->db_add_param($this->ende).",".
|
||||
" updateamum=".$this->db_add_param($this->updateamum).",".
|
||||
" updatevon=".$this->db_add_param($this->updatevon).
|
||||
" WHERE mitarbeiter_uid=".$this->db_add_param($this->mitarbeiter_uid)." AND studiengang_kz=".$this->db_add_param($this->studiengang_kz_old, FHC_INTEGER).";";
|
||||
" WHERE entwicklungsteam_id=".$this->db_add_param($this->entwicklungsteam_id).";";
|
||||
}
|
||||
|
||||
if($this->db_query($qry))
|
||||
@@ -215,7 +225,7 @@ class entwicklungsteam extends basis_db
|
||||
* @param $uid UID des Mitarbeiters
|
||||
* @return true wenn ok, false wenn Fehler
|
||||
*/
|
||||
public function getEntwicklungsteam($mitarbeiter_uid, $studiengang_kz=null)
|
||||
public function getEntwicklungsteam($mitarbeiter_uid, $studiengang_kz = null)
|
||||
{
|
||||
//laden des Datensatzes
|
||||
$qry = "SELECT * FROM bis.tbl_entwicklungsteam JOIN bis.tbl_besqual USING(besqualcode)
|
||||
@@ -232,6 +242,7 @@ class entwicklungsteam extends basis_db
|
||||
{
|
||||
$obj = new entwicklungsteam();
|
||||
|
||||
$obj->entwicklungsteam_id = $row->entwicklungsteam_id;
|
||||
$obj->mitarbeiter_uid = $row->mitarbeiter_uid;
|
||||
$obj->studiengang_kz = $row->studiengang_kz;
|
||||
$obj->besqualcode = $row->besqualcode;
|
||||
@@ -256,16 +267,15 @@ class entwicklungsteam extends basis_db
|
||||
}
|
||||
|
||||
/**
|
||||
* Preuft ob der Eintrag schon existiert
|
||||
* Prueft ob der Eintrag schon existiert
|
||||
*
|
||||
* @param $mitarbeiter_uid
|
||||
* @param $studiengang_kz
|
||||
* @param entwicklungsteam_id
|
||||
* @return true wenn vorhanden, false wenn nicht
|
||||
*/
|
||||
public function exists($mitarbeiter_uid,$studiengang_kz)
|
||||
public function exists($entwicklungsteam_id)
|
||||
{
|
||||
$qry = "SELECT count(*) as anzahl FROM bis.tbl_entwicklungsteam
|
||||
WHERE mitarbeiter_uid=".$this->db_add_param($mitarbeiter_uid)." AND studiengang_kz=".$this->db_add_param($studiengang_kz, FHC_INTEGER).";";
|
||||
WHERE entwicklungsteam_id=".$this->db_add_param($entwicklungsteam_id).";";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
@@ -288,5 +298,112 @@ class entwicklungsteam extends basis_db
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert alle Entwicklungsteameinträge
|
||||
* @param int $studiengang_kz Studiengangkennzeichen.
|
||||
* @param char $sort Parameter, nach dem sortiert werden soll.
|
||||
* @return alle Entwicklungsteameinträge
|
||||
*/
|
||||
public function getAll($studiengang_kz = null, $sort = null)
|
||||
{
|
||||
$qry = "SELECT e.*, p.nachname, p.vorname FROM bis.tbl_entwicklungsteam e
|
||||
JOIN public.tbl_benutzer b ON e.mitarbeiter_uid = b.uid
|
||||
JOIN public.tbl_person p ON b.person_id = p.person_id
|
||||
";
|
||||
if ($studiengang_kz != null)
|
||||
$qry .= " WHERE e.studiengang_kz = ".$this->db_add_param($studiengang_kz);
|
||||
|
||||
if ($sort != null)
|
||||
{
|
||||
$qry .= " ORDER BY ".$sort;
|
||||
}
|
||||
|
||||
$qry .= ";";
|
||||
|
||||
if ($this->db_query($qry))
|
||||
{
|
||||
while ($row = $this->db_fetch_object())
|
||||
{
|
||||
$obj = new entwicklungsteam();
|
||||
|
||||
$obj->entwicklungsteam_id = $row->entwicklungsteam_id;
|
||||
$obj->mitarbeiter_uid = $row->mitarbeiter_uid;
|
||||
$obj->nachname = $row->nachname;
|
||||
$obj->vorname = $row->vorname;
|
||||
$obj->studiengang_kz = $row->studiengang_kz;
|
||||
$obj->besqualcode = $row->besqualcode;
|
||||
$obj->beginn = $row->beginn;
|
||||
$obj->ende = $row->ende;
|
||||
$obj->insertamum = $row->insertamum;
|
||||
$obj->insertvon = $row->insertvon;
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->updatevon = $row->updatevon;
|
||||
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Entwicklungsteameinträge.';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Laedt alle Entwicklungsteameintraege eines Mitarbeiters für eine bestimmte Bisperiode
|
||||
* @param $uid UID des Mitarbeiters
|
||||
* @param $stichtag Stichtag im Format 'Y-m-d'
|
||||
* @return true wenn ok, false wenn Fehler
|
||||
*/
|
||||
public function getEntwicklungsteamBis($mitarbeiter_uid, $stichtag, $studiengang_kz = null)
|
||||
{
|
||||
$datetime = new DateTime($stichtag);
|
||||
$bismeldung_jahr = $datetime->format('Y');
|
||||
|
||||
//laden des Datensatzes
|
||||
$qry = "SELECT *
|
||||
FROM bis.tbl_entwicklungsteam
|
||||
JOIN bis.tbl_besqual USING(besqualcode)
|
||||
WHERE mitarbeiter_uid=".$this->db_add_param($mitarbeiter_uid)."
|
||||
AND (beginn is NULL OR beginn <= make_date(". $this->db_add_param($bismeldung_jahr). "::INTEGER, 12, 31))
|
||||
AND (ende is NULL OR ende >= make_date(". $this->db_add_param($bismeldung_jahr). "::INTEGER, 1, 1))";
|
||||
|
||||
if($studiengang_kz!=null)
|
||||
$qry.=" AND studiengang_kz=".$this->db_add_param($studiengang_kz);
|
||||
|
||||
$qry.=";";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object())
|
||||
{
|
||||
$obj = new entwicklungsteam();
|
||||
|
||||
$obj->entwicklungsteam_id = $row->entwicklungsteam_id;
|
||||
$obj->mitarbeiter_uid = $row->mitarbeiter_uid;
|
||||
$obj->studiengang_kz = $row->studiengang_kz;
|
||||
$obj->besqualcode = $row->besqualcode;
|
||||
$obj->beginn = $row->beginn;
|
||||
$obj->ende = $row->ende;
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->insertamum = $row->insertamum;
|
||||
$obj->insertvon = $row->insertvon;
|
||||
$obj->ext_id = $row->ext_id;
|
||||
$obj->besqual = $row->besqualbez;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler bei der Datenbankabfrage';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -184,13 +184,30 @@ class filter extends basis_db
|
||||
}
|
||||
|
||||
/**
|
||||
* Ausgabe des HTML Widgets
|
||||
* @param kurzbz des Datensatzes, der gefunden werden soll
|
||||
* Ausgabe des HTML Widgets. Parameter, die als GET übergeben werden, werden ausgelesen und vorselektiert
|
||||
* @param $kurzbz String Kurzbz des Datensatzes, der gefunden werden soll
|
||||
* @return boolean true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function getHtmlWidget($kurzbz)
|
||||
{
|
||||
$html='';
|
||||
// GET-Parameter parsen und in String rausschreiben
|
||||
parse_str($this->getVars(), $getParams);
|
||||
|
||||
foreach ($getParams AS $key=>$value)
|
||||
{
|
||||
// Vordefinierte Parameter entfernen
|
||||
if ($key == 'type' ||
|
||||
$key == 'statistik_kurzbz' ||
|
||||
$key == 'report_id' ||
|
||||
$key == 'putlog' ||
|
||||
$key == 'systemfilter_id' ||
|
||||
$key == 'debug')
|
||||
{
|
||||
unset($getParams[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($this->result as $filter)
|
||||
{
|
||||
if ($filter->kurzbz==$kurzbz)
|
||||
@@ -206,15 +223,58 @@ class filter extends basis_db
|
||||
$sql = str_replace('$user', $this->db_add_param($user), $filter->sql);
|
||||
$this->loadValues($sql, $filter->valuename, $filter->showvalue);
|
||||
foreach ($this->values as $value)
|
||||
$html.="\n\t\t\t\t".'<option value="'.$value->value.'">'.$value->text.'</option>';
|
||||
{
|
||||
// Wenn ein Attribut als GET-Parameter übergeben wurde, dann vorselektieren
|
||||
if (isset($getParams[$filter->kurzbz]))
|
||||
{
|
||||
//GET-Parameter aufsplitten
|
||||
$paramsArr = explode(',',$getParams[$filter->kurzbz]);
|
||||
//echo '<pre>', var_dump($value->value), '</pre>';
|
||||
//$value->value = preg_replace('/(.*?)\s*selected.*/im', '$1', $value->value);
|
||||
$value->value = preg_replace('/"\s*.*/im', '', $value->value);
|
||||
//echo '<pre>', var_dump($value->value), '</pre>';
|
||||
|
||||
if (in_array($value->value, $paramsArr))
|
||||
$html .= "\n\t\t\t\t".'<option value="'.$value->value.'" selected="selected">'.$value->text.'</option>';
|
||||
else
|
||||
{
|
||||
//$value->value = preg_replace('/(.*?)selected=.selected./', '$1', $value->value);
|
||||
//$value->value = preg_replace('/(.*?)\s*[selected=?selected?]/', '$1', $value->value);
|
||||
//$value->value = preg_replace('/(.*?)\s*selected="selected"\s*/', '${1}', $value->value);
|
||||
//$value->value = preg_replace('/^\s*selected=.*?selected.*?\s*/', ' ', $value->value);
|
||||
//$value->value = str_replace('selected=', '', $value->value);
|
||||
|
||||
//echo '<pre>', var_dump($value->value), '</pre>';
|
||||
$html .= "\n\t\t\t\t".'<option value="'.$value->value.'">'.$value->text.'</option>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//$value->value = str_replace('selected="selected', '', $value->value);
|
||||
$html .= "\n\t\t\t\t".'<option value="'.$value->value.'">'.$value->text.'</option>';
|
||||
}
|
||||
}
|
||||
$html.="\n\t\t\t</select>";
|
||||
break;
|
||||
case 'datepicker':
|
||||
$html .= '<input type="text" id="' . $filter->kurzbz . '" class="form-control" name="' . $filter->kurzbz . '">';
|
||||
$html .= '<input type="text" id="'.$filter->kurzbz.'" class="form-control" name="'.$filter->kurzbz.'"';
|
||||
if (isset($getParams[$filter->kurzbz]))
|
||||
{
|
||||
$html .= ' value="'.$getParams[$filter->kurzbz].'"';
|
||||
}
|
||||
$html .= ' >';
|
||||
$html .= '<script>';
|
||||
$html .= '$("#' . $filter->kurzbz . '").datepicker({ dateFormat: \'yy-mm-dd\' });';
|
||||
$html .= '</script>';
|
||||
break;
|
||||
case 'text':
|
||||
$html .= '<input type="text" id="'.$filter->kurzbz.'" class="form-control" name="'.$filter->kurzbz.'" '.$filter->htmlattr;
|
||||
if (isset($getParams[$filter->kurzbz]))
|
||||
{
|
||||
$html .= ' value="'.$getParams[$filter->kurzbz].'"';
|
||||
}
|
||||
$html .= '>';
|
||||
break;
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
@@ -1889,6 +1889,46 @@ class mitarbeiter extends benutzer
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Liefert alle Mitarbeiter*innen
|
||||
*
|
||||
* @param $filter
|
||||
* @return boolean
|
||||
*/
|
||||
public function getAll()
|
||||
{
|
||||
$qry = '
|
||||
SELECT
|
||||
ma.mitarbeiter_uid, p.nachname, p.vorname, b.alias
|
||||
FROM
|
||||
public.tbl_mitarbeiter ma
|
||||
JOIN public.tbl_benutzer b ON (mitarbeiter_uid=uid)
|
||||
JOIN public.tbl_person p USING(person_id)
|
||||
ORDER BY p.nachname
|
||||
';
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object())
|
||||
{
|
||||
$ma_obj = new mitarbeiter();
|
||||
|
||||
$ma_obj->nachname = $row->nachname;
|
||||
$ma_obj->vorname = $row->vorname;
|
||||
$ma_obj->mitarbeiter_uid = $row->mitarbeiter_uid;
|
||||
$ma_obj->alias = $row->alias;
|
||||
|
||||
$this->maData[] = $ma_obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generiert nächste freie Personalnummer anhand der sequence tbl_mitarbeiter_personalnummer_seq
|
||||
* @return string $personalnummer
|
||||
@@ -1947,6 +1987,5 @@ class mitarbeiter extends benutzer
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
+656
-655
File diff suppressed because it is too large
Load Diff
@@ -120,6 +120,7 @@ $menu=array
|
||||
'name'=>'Mitarbeiter','permissions'=>array('admin','mitarbeiter','support'),
|
||||
'Übersicht'=>array('name'=>'Übersicht', 'link'=>'personen/lektor_uebersicht.php', 'target'=>'main'),
|
||||
'Zeitsperren'=>array('name'=>'Zeitsperren/Urlaub', 'link'=>'personen/urlaubsverwaltung.php', 'target'=>'main','permissions'=>array('mitarbeiter/zeitsperre:begrenzt')),
|
||||
'Projektexport'=>array('name'=>'Projektexport', 'link'=>'personen/projektexport.php', 'target'=>'main','permissions'=>array('mitarbeiter/zeitsperre')),
|
||||
),
|
||||
'Betriebsmittel'=>array('name'=>'Betriebsmittel', 'link'=>'stammdaten/betriebsmittel_frameset.php', 'target'=>'main','permissions'=>array('basis/betriebsmittel')),
|
||||
'AnwesenheitslistenBarcode'=>array('name'=>'Anwesenheitslisten mit Barcodes', 'link'=>'personen/anwesenheitslisten_barcode.php', 'target'=>'main','permissions'=>array('basis/person')),
|
||||
|
||||
@@ -187,16 +187,16 @@ class zgv extends basis_db
|
||||
public function getAllDoktor($onlyAktiv = false)
|
||||
{
|
||||
$sprache = new sprache();
|
||||
$qry='SELECT *,'.$sprache->getSprachQuery('bezeichnung').' FROM bis.tbl_zgvdoktor;';
|
||||
|
||||
$qry='SELECT *,'.$sprache->getSprachQuery('bezeichnung').' FROM bis.tbl_zgvdoktor';
|
||||
|
||||
if ($onlyAktiv === true)
|
||||
{
|
||||
$qry .= " WHERE aktiv";
|
||||
}
|
||||
|
||||
|
||||
$qry .= " ORDER BY zgvdoktor_bez";
|
||||
|
||||
|
||||
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row= $this->db_fetch_object($result))
|
||||
|
||||
@@ -219,10 +219,18 @@
|
||||
<!ENTITY menu-dokumente-antrag-abmeldung.label "Abmeldung">
|
||||
<!ENTITY menu-dokumente-antrag-abmeldung.accesskey "A">
|
||||
|
||||
<!ENTITY menu-dokumente-antrag-abmeldungstgl.key "S">
|
||||
<!ENTITY menu-dokumente-antrag-abmeldungstgl.label "Abmeldung durch Stgl">
|
||||
<!ENTITY menu-dokumente-antrag-abmeldungstgl.accesskey "S">
|
||||
|
||||
<!ENTITY menu-dokumente-antrag-unterbrechung.key "U">
|
||||
<!ENTITY menu-dokumente-antrag-unterbrechung.label "Unterbrecher">
|
||||
<!ENTITY menu-dokumente-antrag-unterbrechung.accesskey "U">
|
||||
|
||||
<!ENTITY menu-dokumente-antrag-wiederholung.key "W">
|
||||
<!ENTITY menu-dokumente-antrag-wiederholung.label "Abmeldung durch Ablauf der Wiederholungsfrist">
|
||||
<!ENTITY menu-dokumente-antrag-wiederholung.accesskey "W">
|
||||
|
||||
<!ENTITY menu-dokumente-ausbildungsvertrag.key "A">
|
||||
<!ENTITY menu-dokumente-ausbildungsvertrag.label "Ausbildungsvertrag Deutsch">
|
||||
<!ENTITY menu-dokumente-ausbildungsvertrag.accesskey "A">
|
||||
|
||||
@@ -5,6 +5,7 @@ $this->phrasen['services/details']='Details';
|
||||
$this->phrasen['services/filtern']='Filtern';
|
||||
$this->phrasen['services/leistung']='Leistung';
|
||||
$this->phrasen['services/design']='Verantwortlich';
|
||||
$this->phrasen['services/kritikalitaet']='Kritikalität';
|
||||
$this->phrasen['services/betrieb']='Betrieb';
|
||||
$this->phrasen['services/operativ']='Operativ';
|
||||
?>
|
||||
|
||||
@@ -5,6 +5,7 @@ $this->phrasen['services/details']='Details';
|
||||
$this->phrasen['services/filtern']='Filter';
|
||||
$this->phrasen['services/leistung']='Service';
|
||||
$this->phrasen['services/design']='Design';
|
||||
$this->phrasen['services/kritikalitaet']='Criticality';
|
||||
$this->phrasen['services/betrieb']='Running';
|
||||
$this->phrasen['services/operativ']='Operating';
|
||||
?>
|
||||
?>
|
||||
|
||||
+81
-64
@@ -1,83 +1,100 @@
|
||||
.text-prewrap {
|
||||
.fhc-header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
.fhc-header > h1:first-child {
|
||||
font-size: calc(1.325rem + .9vw);
|
||||
}
|
||||
.fhc-header > :first-child > small {
|
||||
color: var(--bs-secondary);
|
||||
font-size: .65em;
|
||||
padding-inline-start: 1em;
|
||||
}
|
||||
|
||||
.fhc-alert.p-toast-center {
|
||||
width: 35rem;
|
||||
max-width: 100vw;
|
||||
}
|
||||
.fhc-alert.p-toast-top-right {
|
||||
max-width: calc(100vw - 40px);
|
||||
}
|
||||
.fhc-alert.p-toast-top-right .p-toast-detail,
|
||||
.fhc-alert.p-toast-center .p-toast-message-text .card {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.text-preline {
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
.accordion-button-primary {
|
||||
background-color: #e7f1ff;
|
||||
color: #0c63e4;
|
||||
}
|
||||
.accordion-button-primary:not(.collapsed) {
|
||||
background-color: #cfe2ff;
|
||||
color: #0a58ca;
|
||||
.text-prewrap {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.accordion-button-secondary {
|
||||
background-color: #f0f1f2;
|
||||
color: #616971;
|
||||
}
|
||||
.accordion-button-secondary:not(.collapsed) {
|
||||
background-color: #e2e3e5;
|
||||
color: #565e64;
|
||||
.btn-p-0 {
|
||||
padding: 0 .375rem;
|
||||
}
|
||||
|
||||
.accordion-button-success {
|
||||
background-color: #e8f3ee;
|
||||
color: #177a4c;
|
||||
}
|
||||
.accordion-button-success:not(.collapsed) {
|
||||
background-color: #d1e7dd;
|
||||
color: #146c43;
|
||||
.z-1 {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.accordion-button-info {
|
||||
background-color: #e7fafe;
|
||||
color: #0cb6d8;
|
||||
}
|
||||
.accordion-button-info:not(.collapsed) {
|
||||
background-color: #cff4fc;
|
||||
color: #0aa2c0;
|
||||
.input-group > .input-group-item {
|
||||
position: relative;
|
||||
flex: 1 1 auto;
|
||||
width: 1%;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.accordion-button-warning {
|
||||
background-color: #fff9e6;
|
||||
color: #e6ae06;
|
||||
}
|
||||
.accordion-button-warning:not(.collapsed) {
|
||||
background-color: #fff3cd;
|
||||
color: #cc9a06;
|
||||
.input-group > .input-group-item .form-control:focus,
|
||||
.input-group > .input-group-item .form-select:focus {
|
||||
z-index: 3;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.accordion-button-danger {
|
||||
background-color: #fcebec;
|
||||
color: #c6303e;
|
||||
}
|
||||
.accordion-button-danger:not(.collapsed) {
|
||||
background-color: #f8d7da;
|
||||
color: #b02a37;
|
||||
.input-group-lg > .input-group-item .form-control,
|
||||
.input-group-lg > .input-group-item .form-select {
|
||||
padding: 0.5rem 1rem;
|
||||
font-size: 1.25rem;
|
||||
border-radius: 0.3rem;
|
||||
}
|
||||
|
||||
.accordion-button-light {
|
||||
background-color: #fefeff;
|
||||
color: #dfe0e1;
|
||||
}
|
||||
.accordion-button-light:not(.collapsed) {
|
||||
background-color: #fefefe;
|
||||
color: #c6c7c8;
|
||||
|
||||
.input-group-sm > .input-group-item .form-control,
|
||||
.input-group-sm > .input-group-item .form-select {
|
||||
padding: 0.25rem 0.5rem;
|
||||
font-size: 0.875rem;
|
||||
border-radius: 0.2rem;
|
||||
}
|
||||
|
||||
.accordion-button-dark {
|
||||
background-color: #e9e9ea;
|
||||
color: #1e2125;
|
||||
}
|
||||
.accordion-button-dark:not(.collapsed) {
|
||||
background-color: #d3d3d4;
|
||||
color: #1a1e21;
|
||||
.input-group-lg > .input-group-item .form-select,
|
||||
.input-group-sm > .input-group-item .form-select {
|
||||
padding-right: 3rem;
|
||||
}
|
||||
|
||||
.tabulator-edit-list .tabulator-edit-list-item {
|
||||
background-color: white;
|
||||
.input-group:not(.has-validation) > .input-group-item:not(:last-child) .form-control,
|
||||
.input-group:not(.has-validation) > .input-group-item:not(:last-child) .form-select {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.input-group.has-validation > .input-group-item:nth-last-child(n+3) .form-control,
|
||||
.input-group.has-validation > .input-group-item:nth-last-child(n+3) .form-select {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.input-group > .input-group-item:not(:first-child) .form-control,
|
||||
.input-group > .input-group-item:not(:first-child) .form-select {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.form-control-color.is-invalid,
|
||||
.was-validated .form-control-color:invalid,
|
||||
.form-control-color.is-valid,
|
||||
.was-validated .form-control-color:valid {
|
||||
padding-right: .375rem;
|
||||
background-image: none;
|
||||
}
|
||||
.tabulator-edit-list .tabulator-edit-list-item:hover,
|
||||
.tabulator-edit-list .tabulator-edit-list-item.active {
|
||||
color: white;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
@import '../../vendor/olifolkerd/tabulator5/dist/css/tabulator_bootstrap5.min.css';
|
||||
@import '../../vendor/olifolkerd/tabulator5/dist/css/tabulator_simple.min.css';
|
||||
|
||||
/* Apply borders and background to Cell instead of the Row
|
||||
* otherwise frozen columns won't look good (columns behind
|
||||
@@ -38,3 +38,9 @@
|
||||
.tabulator .tabulator-col-resize-handle:last-of-type {
|
||||
z-index: 999999;
|
||||
}
|
||||
|
||||
.tabulator-cell .btn {
|
||||
padding: 0 .5rem;
|
||||
max-height: 22px;
|
||||
min-width: 30px;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,12 @@
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.tabulator{
|
||||
font-size:1rem;
|
||||
.tabulator {
|
||||
font-size: 1rem;
|
||||
}
|
||||
.tabulator-cell .btn {
|
||||
padding: 0 .375rem;
|
||||
font-size: .875rem;
|
||||
border-radius: .2rem;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
/*
|
||||
* To be moved outside
|
||||
*/
|
||||
.navbar.navbar-left-side ~ *,
|
||||
#content {
|
||||
position: inherit;
|
||||
margin: 0 0 0 250px;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
.nav-item.nav-link:focus {
|
||||
box-shadow: 0 0 0 .24rem rgba(13,110,253,.25);
|
||||
z-index: 1;
|
||||
outline: 0;
|
||||
position: relative;
|
||||
}
|
||||
.nav-item.nav-link:focus::after {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: -.5rem;
|
||||
right: -.5rem;
|
||||
top: calc(100% + 1px);
|
||||
background: white;
|
||||
height: .25rem;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,46 @@
|
||||
@import '../../../vendor/vuejs/vuedatepicker_css/main.css';
|
||||
:root {
|
||||
/*General*/
|
||||
--dp-font-family: var(--bs-body-font-family);
|
||||
--dp-border-radius: .25rem;
|
||||
--dp-cell-border-radius: .25rem; /*Specific border radius for the calendar cell*/
|
||||
|
||||
/*Sizing*/
|
||||
--dp-button-height: 2.1875rem; /*Size for buttons in overlays*/
|
||||
--dp-month-year-row-height: 2.1875rem; /*Height of the month-year select row*/
|
||||
--dp-month-year-row-button-size: 2.1875rem; /*Specific height for the next/previous buttons*/
|
||||
--dp-button-icon-height: 1.25rem; /*Icon sizing in buttons*/
|
||||
--dp-cell-size: 2.1875rem; /*Width and height of calendar cell*/
|
||||
--dp-cell-padding: .3125rem; /*Padding in the cell*/
|
||||
--dp-common-padding: .625rem; /*Common padding used*/
|
||||
--dp-input-icon-padding: 2.1875rem;
|
||||
--dp-input-padding: .375rem .75rem;
|
||||
--dp-action-buttons-padding: .125rem .3125rem; /*Adjust padding for the action buttons in action row*/
|
||||
--dp-row-margin: .3125rem 0; /*Adjust the spacing between rows in the calendar*/
|
||||
--dp-calendar-header-cell-padding: 0.5rem; /*Adjust padding in calendar header cells*/
|
||||
--dp-two-calendars-spacing: .625rem; /*Space between multiple calendars*/
|
||||
--dp-overlay-col-padding: .1875rem; /*Padding in the overlay column*/
|
||||
--dp-time-inc-dec-button-size: 2rem; /*Sizing for arrow buttons in the time picker*/
|
||||
--dp-menu-padding: .375rem .5rem; /*Menu padding*/
|
||||
}
|
||||
.dp__theme_light {
|
||||
--dp-text-color: var(--text-color);
|
||||
--dp-primary-color: var(--bs-primary);
|
||||
--dp-primary-disabled-color: rgba(var(--bs-primary-rgb), .65);
|
||||
--dp-primary-text-color: var(--primary-color-text);
|
||||
--dp-secondary-color: var(--bs-secondary);
|
||||
--dp-border-color: var(--bs-gray-400);
|
||||
--dp-menu-border-color: var(--bs-gray-400);
|
||||
--dp-border-color-hover: var(--bs-gray-400);
|
||||
--dp-icon-color: rgba(var(--bs-black-rgb), .5);
|
||||
--dp-hover-icon-color: rgba(var(--bs-black-rgb), .75);
|
||||
--dp-range-between-dates-text-color: var(--dp-hover-text-color, var(--text-color));
|
||||
}
|
||||
.dp__theme_light .form-control.is-invalid {
|
||||
--dp-border-color-hover: var(--bs-danger);
|
||||
}
|
||||
.dp__theme_light .form-control.is-valid {
|
||||
--dp-border-color-hover: var(--bs-success);
|
||||
}
|
||||
.form-control.is-invalid ~ .dp__clear_icon,
|
||||
.was-validated .form-control:invalid ~ .dp__clear_icon { margin-right: calc(1.5em + .75rem - 12px) }
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* 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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import search from "./search.js";
|
||||
import phrasen from "./phrasen.js";
|
||||
import navigation from "./navigation.js";
|
||||
import filter from "./filter.js";
|
||||
import studstatus from "./studstatus.js";
|
||||
|
||||
export default {
|
||||
search,
|
||||
phrasen,
|
||||
navigation,
|
||||
filter,
|
||||
studstatus
|
||||
};
|
||||
@@ -0,0 +1,89 @@
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* 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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export default {
|
||||
saveCustomFilter(wsParams) {
|
||||
return this.$fhcApi.post(
|
||||
'/api/frontend/v1/filter/saveCustomFilter',
|
||||
{
|
||||
filterUniqueId: wsParams.filterUniqueId,
|
||||
filterType: wsParams.filterType,
|
||||
customFilterName: wsParams.customFilterName
|
||||
}
|
||||
);
|
||||
},
|
||||
removeCustomFilter(wsParams) {
|
||||
return this.$fhcApi.post(
|
||||
'/api/frontend/v1/filter/removeCustomFilter',
|
||||
{
|
||||
filterUniqueId: wsParams.filterUniqueId,
|
||||
filterType: wsParams.filterType,
|
||||
filterId: wsParams.filterId
|
||||
}
|
||||
);
|
||||
},
|
||||
applyFilterFields(wsParams) {
|
||||
return this.$fhcApi.post(
|
||||
'/api/frontend/v1/filter/applyFilterFields',
|
||||
{
|
||||
filterUniqueId: wsParams.filterUniqueId,
|
||||
filterType: wsParams.filterType,
|
||||
filterFields: wsParams.filterFields
|
||||
}
|
||||
);
|
||||
},
|
||||
addFilterField(wsParams) {
|
||||
return this.$fhcApi.post(
|
||||
'/api/frontend/v1/filter/addFilterField',
|
||||
{
|
||||
filterUniqueId: wsParams.filterUniqueId,
|
||||
filterType: wsParams.filterType,
|
||||
filterField: wsParams.filterField
|
||||
}
|
||||
);
|
||||
},
|
||||
removeFilterField(wsParams) {
|
||||
return this.$fhcApi.post(
|
||||
'/api/frontend/v1/filter/removeFilterField',
|
||||
{
|
||||
filterUniqueId: wsParams.filterUniqueId,
|
||||
filterType: wsParams.filterType,
|
||||
filterField: wsParams.filterField
|
||||
}
|
||||
);
|
||||
},
|
||||
getFilterById(wsParams) {
|
||||
return this.$fhcApi.get(
|
||||
'/api/frontend/v1/filter/getFilter',
|
||||
{
|
||||
filterUniqueId: wsParams.filterUniqueId,
|
||||
filterType: wsParams.filterType,
|
||||
filterId: wsParams.filterId
|
||||
}
|
||||
);
|
||||
},
|
||||
getFilter(wsParams) {
|
||||
return this.$fhcApi.get(
|
||||
'/api/frontend/v1/filter/getFilter',
|
||||
{
|
||||
filterUniqueId: wsParams.filterUniqueId,
|
||||
filterType: wsParams.filterType
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* 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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export default {
|
||||
getHeader(navigation_page) {
|
||||
return this.$fhcApi.get(
|
||||
'/api/frontend/v1/navigation/header',
|
||||
{ navigation_page }
|
||||
);
|
||||
},
|
||||
getMenu: function(navigation_page) {
|
||||
return this.$fhcApi.get(
|
||||
'/api/frontend/v1/navigation/menu',
|
||||
{ navigation_page }
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* 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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export default {
|
||||
loadCategory(category) {
|
||||
return this.$fhcApi.get('/api/frontend/v1/phrasen/loadModule/' + category);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* 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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export default {
|
||||
search(searchsettings) {
|
||||
const url = '/api/frontend/v1/searchbar/search';
|
||||
return this.$fhcApi.post(url, searchsettings);
|
||||
},
|
||||
searchdummy(searchsettings) {
|
||||
const url = 'public/js/apps/api/dummyapi.php/Search';
|
||||
return this.$fhcApi.post(url, searchsettings);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,223 @@
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* 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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export default {
|
||||
abmeldung: {
|
||||
getDetails(antrag_id, prestudent_id) {
|
||||
const url = '/api/frontend/v1/studstatus/abmeldung/'
|
||||
+ (antrag_id !== undefined ? 'getDetailsForAntrag/' + antrag_id : 'getDetailsForNewAntrag/' + prestudent_id);
|
||||
return this.$fhcApi.get(url);
|
||||
},
|
||||
create(stdsem, prestudent_id, grund) {
|
||||
return this.$fhcApi.post('/api/frontend/v1/studstatus/abmeldung/createAntrag', {
|
||||
studiensemester: stdsem,
|
||||
prestudent_id,
|
||||
grund
|
||||
}, {
|
||||
errorHandling: 'strict'
|
||||
});
|
||||
},
|
||||
cancel(antrag_id) {
|
||||
if (!Array.isArray(antrag_id))
|
||||
return this.$fhcApi.post(
|
||||
'/api/frontend/v1/studstatus/abmeldung/cancelAntrag',
|
||||
{ antrag_id }
|
||||
);
|
||||
return Promise.allSettled(antrag_id.map(antrag => this.$fhcApi.post(
|
||||
'/api/frontend/v1/studstatus/abmeldung/cancelAntrag',
|
||||
{ antrag_id: antrag.studierendenantrag_id },
|
||||
{ errorHeader: '#' + antrag.studierendenantrag_id }
|
||||
)));
|
||||
}
|
||||
},
|
||||
unterbrechung: {
|
||||
getDetails(antrag_id, prestudent_id) {
|
||||
const url = '/api/frontend/v1/studstatus/unterbrechung/'
|
||||
+ (antrag_id !== undefined ? 'getDetailsForAntrag/' + antrag_id : 'getDetailsForNewAntrag/' + prestudent_id);
|
||||
return this.$fhcApi.get(url);
|
||||
},
|
||||
create(studiensemester, prestudent_id, grund, datum_wiedereinstieg, attachment) {
|
||||
return this.$fhcApi.post('/api/frontend/v1/studstatus/unterbrechung/createAntrag', {
|
||||
studiensemester,
|
||||
prestudent_id,
|
||||
grund,
|
||||
datum_wiedereinstieg,
|
||||
attachment
|
||||
}, {
|
||||
errorHandling: 'strict'
|
||||
});
|
||||
},
|
||||
cancel(antrag_id) {
|
||||
return this.$fhcApi.post('/api/frontend/v1/studstatus/unterbrechung/cancelAntrag', {
|
||||
antrag_id
|
||||
}, {
|
||||
errorHandling: 'strict'
|
||||
});
|
||||
}
|
||||
},
|
||||
wiederholung: {
|
||||
getDetails(prestudent_id) {
|
||||
const url = '/api/frontend/v1/studstatus/wiederholung/getDetailsForNewAntrag/' + prestudent_id;
|
||||
return this.$fhcApi.get(url)
|
||||
},
|
||||
getLvs(antrag_id) {
|
||||
const url = '/api/frontend/v1/studstatus/wiederholung/getLvs/' + antrag_id;
|
||||
return this.$fhcApi.get(url)
|
||||
},
|
||||
create(prestudent_id, studiensemester) {
|
||||
return this.$fhcApi.post('/api/frontend/v1/studstatus/wiederholung/createAntrag', {
|
||||
prestudent_id,
|
||||
studiensemester
|
||||
}, {
|
||||
errorHandling: 'strict'
|
||||
});
|
||||
},
|
||||
cancel(prestudent_id, studiensemester) {
|
||||
return this.$fhcApi.post('/api/frontend/v1/studstatus/wiederholung/cancelAntrag', {
|
||||
prestudent_id,
|
||||
studiensemester
|
||||
}, {
|
||||
errorHandling: 'strict'
|
||||
});
|
||||
},
|
||||
saveLvs(forbiddenLvs, mandatoryLvs) {
|
||||
return this.$fhcApi.post('/api/frontend/v1/studstatus/wiederholung/saveLvs', {
|
||||
forbiddenLvs,
|
||||
mandatoryLvs
|
||||
});
|
||||
}
|
||||
},
|
||||
leitung: {
|
||||
getStgs() {
|
||||
return this.$fhcApi.get('/api/frontend/v1/studstatus/leitung/getActiveStgs');
|
||||
},
|
||||
getAntraege(url, config, params) {
|
||||
return this.$fhcApi
|
||||
.get('/api/frontend/v1/studstatus/leitung/getAntraege/' + url)
|
||||
.then(res => res.data); // Return data for tabulator
|
||||
},
|
||||
getHistory(antrag_id) {
|
||||
return this.$fhcApi.get('/api/frontend/v1/studstatus/leitung/getHistory/' + antrag_id)
|
||||
},
|
||||
getPrestudents(query, signal) {
|
||||
return this.$fhcApi.post(
|
||||
'/api/frontend/v1/studstatus/leitung/getPrestudents',
|
||||
{ query },
|
||||
{
|
||||
signal: signal,
|
||||
timeout: 30000
|
||||
}
|
||||
);
|
||||
},
|
||||
approve(antrag) {
|
||||
if (!Array.isArray(antrag))
|
||||
return this.$fhcApi.post(
|
||||
'/api/frontend/v1/studstatus/leitung/approveAntrag',
|
||||
antrag
|
||||
);
|
||||
return Promise.allSettled(antrag.map(a => this.$fhcApi.post(
|
||||
'/api/frontend/v1/studstatus/leitung/approveAntrag',
|
||||
a,
|
||||
{ errorHeader: '#' + a.studierendenantrag_id }
|
||||
)));
|
||||
},
|
||||
reject(antrag) {
|
||||
if (!Array.isArray(antrag))
|
||||
return this.$fhcApi.post(
|
||||
'/api/frontend/v1/studstatus/leitung/rejectAntrag',
|
||||
antrag
|
||||
);
|
||||
return Promise.allSettled(antrag.map(a => this.$fhcApi.post(
|
||||
'/api/frontend/v1/studstatus/leitung/rejectAntrag',
|
||||
a,
|
||||
{ errorHeader: '#' + a.studierendenantrag_id }
|
||||
)));
|
||||
},
|
||||
reopen(antrag) {
|
||||
if (!Array.isArray(antrag))
|
||||
return this.$fhcApi.post(
|
||||
'/api/frontend/v1/studstatus/leitung/reopenAntrag',
|
||||
antrag
|
||||
);
|
||||
return Promise.allSettled(antrag.map(a => this.$fhcApi.post(
|
||||
'/api/frontend/v1/studstatus/leitung/reopenAntrag',
|
||||
a,
|
||||
{ errorHeader: '#' + a.studierendenantrag_id }
|
||||
)));
|
||||
},
|
||||
pause(antrag) {
|
||||
if (!Array.isArray(antrag))
|
||||
return this.$fhcApi.post(
|
||||
'/api/frontend/v1/studstatus/leitung/pauseAntrag',
|
||||
antrag
|
||||
);
|
||||
return Promise.allSettled(antrag.map(a => this.$fhcApi.post(
|
||||
'/api/frontend/v1/studstatus/leitung/pauseAntrag',
|
||||
a,
|
||||
{ errorHeader: '#' + a.studierendenantrag_id }
|
||||
)));
|
||||
},
|
||||
unpause(antrag) {
|
||||
if (!Array.isArray(antrag))
|
||||
return this.$fhcApi.post(
|
||||
'/api/frontend/v1/studstatus/leitung/unpauseAntrag',
|
||||
antrag
|
||||
);
|
||||
return Promise.allSettled(antrag.map(a => this.$fhcApi.post(
|
||||
'/api/frontend/v1/studstatus/leitung/unpauseAntrag',
|
||||
a,
|
||||
{ errorHeader: '#' + a.studierendenantrag_id }
|
||||
)));
|
||||
},
|
||||
object(antrag) {
|
||||
if (!Array.isArray(antrag))
|
||||
return this.$fhcApi.post(
|
||||
'/api/frontend/v1/studstatus/leitung/objectAntrag',
|
||||
antrag
|
||||
);
|
||||
return Promise.allSettled(antrag.map(a => this.$fhcApi.post(
|
||||
'/api/frontend/v1/studstatus/leitung/objectAntrag',
|
||||
a,
|
||||
{ errorHeader: '#' + a.studierendenantrag_id }
|
||||
)));
|
||||
},
|
||||
approveObjection(antrag) {
|
||||
if (!Array.isArray(antrag))
|
||||
return this.$fhcApi.post(
|
||||
'/api/frontend/v1/studstatus/leitung/approveObjection',
|
||||
antrag
|
||||
);
|
||||
return Promise.allSettled(antrag.map(a => this.$fhcApi.post(
|
||||
'/api/frontend/v1/studstatus/leitung/approveObjection',
|
||||
a,
|
||||
{ errorHeader: '#' + a.studierendenantrag_id }
|
||||
)));
|
||||
},
|
||||
denyObjection(antrag) {
|
||||
if (!Array.isArray(antrag))
|
||||
return this.$fhcApi.post(
|
||||
'/api/frontend/v1/studstatus/leitung/denyObjection',
|
||||
antrag
|
||||
);
|
||||
return Promise.allSettled(antrag.map(a => this.$fhcApi.post(
|
||||
'/api/frontend/v1/studstatus/leitung/denyObjection',
|
||||
a,
|
||||
{ errorHeader: '#' + a.studierendenantrag_id }
|
||||
)));
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -24,6 +24,8 @@ import {CoreRESTClient} from '../../RESTClient.js';
|
||||
import {CoreFetchCmpt} from '../../components/Fetch.js';
|
||||
import {BismeldestichtagAPIs} from './API.js';
|
||||
|
||||
import Phrasen from '../../plugin/Phrasen.js';
|
||||
|
||||
const bismeldestichtagApp = Vue.createApp({
|
||||
data: function() {
|
||||
return {
|
||||
@@ -187,4 +189,4 @@ const bismeldestichtagApp = Vue.createApp({
|
||||
}
|
||||
});
|
||||
|
||||
bismeldestichtagApp.mount('#main');
|
||||
bismeldestichtagApp.use(Phrasen).mount('#main');
|
||||
|
||||
@@ -21,6 +21,8 @@ import {LogsViewerTabulatorEventHandlers} from './TabulatorSetup.js';
|
||||
import {CoreFilterCmpt} from '../../components/filter/Filter.js';
|
||||
import {CoreNavigationCmpt} from '../../components/navigation/Navigation.js';
|
||||
|
||||
import Phrasen from '../../plugin/Phrasen.js';
|
||||
|
||||
const logsViewerApp = Vue.createApp({
|
||||
data: function() {
|
||||
return {
|
||||
@@ -40,5 +42,5 @@ const logsViewerApp = Vue.createApp({
|
||||
}
|
||||
});
|
||||
|
||||
logsViewerApp.mount('#main');
|
||||
logsViewerApp.use(Phrasen).mount('#main');
|
||||
|
||||
|
||||
+194
-194
@@ -1,195 +1,195 @@
|
||||
import {CoreFilterCmpt} from '../components/Filter.js';
|
||||
import {CoreNavigationCmpt} from '../components/Navigation.js';
|
||||
import verticalsplit from "../components/verticalsplit/verticalsplit.js";
|
||||
import searchbar from "../components/searchbar/searchbar.js";
|
||||
import fhcapifactory from "./api/fhcapifactory.js";
|
||||
import {CoreFilterCmpt} from '../components/filter/Filter.js';
|
||||
import {CoreNavigationCmpt} from '../components/navigation/Navigation.js';
|
||||
import CoreVerticalsplit from "../components/verticalsplit/verticalsplit.js";
|
||||
import CoreSearchbar from "../components/searchbar/searchbar.js";
|
||||
import FhcApi from "../plugin/FhcApi.js";
|
||||
|
||||
Vue.$fhcapi = fhcapifactory;
|
||||
|
||||
Vue.createApp({
|
||||
"data": function() {
|
||||
return {
|
||||
"title": "Test Search",
|
||||
"appSideMenuEntries": {},
|
||||
"searchbaroptions": {
|
||||
"types": [
|
||||
"person",
|
||||
"raum",
|
||||
"mitarbeiter",
|
||||
"student",
|
||||
"prestudent",
|
||||
"document",
|
||||
"cms",
|
||||
"organisationunit"
|
||||
],
|
||||
"actions": {
|
||||
"person": {
|
||||
"defaultaction": {
|
||||
"type": "link",
|
||||
"action": function(data) {
|
||||
//alert('person defaultaction ' + JSON.stringify(data));
|
||||
//window.location.href = data.profil;
|
||||
return data.profil;
|
||||
}
|
||||
},
|
||||
"childactions": [
|
||||
{
|
||||
"label": "testchildaction1",
|
||||
"icon": "fas fa-check-circle",
|
||||
"type": "function",
|
||||
"action": function(data) {
|
||||
alert('person testchildaction 01 ' + JSON.stringify(data));
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "testchildaction2",
|
||||
"icon": "fas fa-file-csv",
|
||||
"type": "function",
|
||||
"action": function(data) {
|
||||
alert('person testchildaction 02 ' + JSON.stringify(data));
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"raum": {
|
||||
"defaultaction": {
|
||||
"type": "function",
|
||||
"action": function(data) {
|
||||
alert('raum defaultaction ' + JSON.stringify(data));
|
||||
}
|
||||
},
|
||||
"childactions": [
|
||||
{
|
||||
"label": "Rauminformation",
|
||||
"icon": "fas fa-info-circle",
|
||||
"type": "link",
|
||||
"action": function(data) {
|
||||
return data.infolink;
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Raumreservierung",
|
||||
"icon": "fas fa-bookmark",
|
||||
"type": "link",
|
||||
"action": function(data) {
|
||||
return data.booklink;
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"employee": {
|
||||
"defaultaction": {
|
||||
"type": "function",
|
||||
"action": function(data) {
|
||||
alert('employee defaultaction ' + JSON.stringify(data));
|
||||
}
|
||||
},
|
||||
"childactions": [
|
||||
{
|
||||
"label": "testchildaction1",
|
||||
"icon": "fas fa-address-book",
|
||||
"type": "function",
|
||||
"action": function(data) {
|
||||
alert('employee testchildaction 01 ' + JSON.stringify(data));
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "testchildaction2",
|
||||
"icon": "fas fa-user-slash",
|
||||
"type": "function",
|
||||
"action": function(data) {
|
||||
alert('employee testchildaction 02 ' + JSON.stringify(data));
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "testchildaction3",
|
||||
"icon": "fas fa-bell",
|
||||
"type": "function",
|
||||
"action": function(data) {
|
||||
alert('employee testchildaction 03 ' + JSON.stringify(data));
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "testchildaction4",
|
||||
"icon": "fas fa-calculator",
|
||||
"type": "function",
|
||||
"action": function(data) {
|
||||
alert('employee testchildaction 04 ' + JSON.stringify(data));
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"organisationunit": {
|
||||
"defaultaction": {
|
||||
"type": "function",
|
||||
"action": function(data) {
|
||||
alert('organisationunit defaultaction ' + JSON.stringify(data));
|
||||
}
|
||||
},
|
||||
"childactions": []
|
||||
}
|
||||
}
|
||||
},
|
||||
"searchbaroptions2": {
|
||||
"types": [
|
||||
"raum",
|
||||
"organisationunit"
|
||||
],
|
||||
"actions": {
|
||||
"raum": {
|
||||
"defaultaction": {
|
||||
"type": "function",
|
||||
"action": function(data) {
|
||||
alert('raum defaultaction ' + JSON.stringify(data));
|
||||
}
|
||||
},
|
||||
"childactions": [
|
||||
{
|
||||
"label": "Rauminformation",
|
||||
"icon": "fas fa-info-circle",
|
||||
"type": "link",
|
||||
"action": function(data) {
|
||||
return data.infolink;
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Raumreservierung",
|
||||
"icon": "fas fa-bookmark",
|
||||
"type": "link",
|
||||
"action": function(data) {
|
||||
return data.booklink;
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"organisationunit": {
|
||||
"defaultaction": {
|
||||
"type": "function",
|
||||
"action": function(data) {
|
||||
alert('organisationunit defaultaction ' + JSON.stringify(data));
|
||||
}
|
||||
},
|
||||
"childactions": []
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
"components": {
|
||||
"CoreNavigationCmpt": CoreNavigationCmpt,
|
||||
"CoreFilterCmpt": CoreFilterCmpt,
|
||||
"verticalsplit": verticalsplit,
|
||||
"searchbar": searchbar
|
||||
},
|
||||
"methods": {
|
||||
"newSideMenuEntryHandler": function(payload) {
|
||||
this.appSideMenuEntries = payload;
|
||||
},
|
||||
"searchfunction": function(searchsettings) {
|
||||
return Vue.$fhcapi.Search.search(searchsettings);
|
||||
},
|
||||
"searchfunctiondummy": function(searchsettings) {
|
||||
return Vue.$fhcapi.Search.searchdummy(searchsettings);
|
||||
}
|
||||
}
|
||||
}).mount('#main');
|
||||
const app = Vue.createApp({
|
||||
components: {
|
||||
CoreNavigationCmpt,
|
||||
CoreFilterCmpt,
|
||||
CoreVerticalsplit,
|
||||
CoreSearchbar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: "Test Search",
|
||||
appSideMenuEntries: {},
|
||||
searchbaroptions: {
|
||||
types: [
|
||||
"person",
|
||||
"raum",
|
||||
"mitarbeiter",
|
||||
"student",
|
||||
"prestudent",
|
||||
"document",
|
||||
"cms",
|
||||
"organisationunit"
|
||||
],
|
||||
actions: {
|
||||
person: {
|
||||
defaultaction: {
|
||||
type: "link",
|
||||
action(data) {
|
||||
//alert('person defaultaction ' + JSON.stringify(data));
|
||||
//window.location.href = data.profil;
|
||||
return data.profil;
|
||||
}
|
||||
},
|
||||
childactions: [
|
||||
{
|
||||
label: "testchildaction1",
|
||||
icon: "fas fa-check-circle",
|
||||
type: "function",
|
||||
action(data) {
|
||||
alert('person testchildaction 01 ' + JSON.stringify(data));
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "testchildaction2",
|
||||
icon: "fas fa-file-csv",
|
||||
type: "function",
|
||||
action(data) {
|
||||
alert('person testchildaction 02 ' + JSON.stringify(data));
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
raum: {
|
||||
defaultaction: {
|
||||
type: "function",
|
||||
action(data) {
|
||||
alert('raum defaultaction ' + JSON.stringify(data));
|
||||
}
|
||||
},
|
||||
childactions: [
|
||||
{
|
||||
label: "Rauminformation",
|
||||
icon: "fas fa-info-circle",
|
||||
type: "link",
|
||||
action(data) {
|
||||
return data.infolink;
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Raumreservierung",
|
||||
icon: "fas fa-bookmark",
|
||||
type: "link",
|
||||
action(data) {
|
||||
return data.booklink;
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
employee: {
|
||||
defaultaction: {
|
||||
type: "function",
|
||||
action(data) {
|
||||
alert('employee defaultaction ' + JSON.stringify(data));
|
||||
}
|
||||
},
|
||||
childactions: [
|
||||
{
|
||||
label: "testchildaction1",
|
||||
icon: "fas fa-address-book",
|
||||
type: "function",
|
||||
action(data) {
|
||||
alert('employee testchildaction 01 ' + JSON.stringify(data));
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "testchildaction2",
|
||||
icon: "fas fa-user-slash",
|
||||
type: "function",
|
||||
action(data) {
|
||||
alert('employee testchildaction 02 ' + JSON.stringify(data));
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "testchildaction3",
|
||||
icon: "fas fa-bell",
|
||||
type: "function",
|
||||
action(data) {
|
||||
alert('employee testchildaction 03 ' + JSON.stringify(data));
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "testchildaction4",
|
||||
icon: "fas fa-calculator",
|
||||
type: "function",
|
||||
action(data) {
|
||||
alert('employee testchildaction 04 ' + JSON.stringify(data));
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
organisationunit: {
|
||||
defaultaction: {
|
||||
type: "function",
|
||||
action(data) {
|
||||
alert('organisationunit defaultaction ' + JSON.stringify(data));
|
||||
}
|
||||
},
|
||||
childactions: []
|
||||
}
|
||||
}
|
||||
},
|
||||
searchbaroptions2: {
|
||||
types: [
|
||||
"raum",
|
||||
"organisationunit"
|
||||
],
|
||||
actions: {
|
||||
raum: {
|
||||
defaultaction: {
|
||||
type: "function",
|
||||
action(data) {
|
||||
alert('raum defaultaction ' + JSON.stringify(data));
|
||||
}
|
||||
},
|
||||
childactions: [
|
||||
{
|
||||
label: "Rauminformation",
|
||||
icon: "fas fa-info-circle",
|
||||
type: "link",
|
||||
action(data) {
|
||||
return data.infolink;
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Raumreservierung",
|
||||
icon: "fas fa-bookmark",
|
||||
type: "link",
|
||||
action(data) {
|
||||
return data.booklink;
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
organisationunit: {
|
||||
defaultaction: {
|
||||
type: "function",
|
||||
action(data) {
|
||||
alert('organisationunit defaultaction ' + JSON.stringify(data));
|
||||
}
|
||||
},
|
||||
childactions: []
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
newSideMenuEntryHandler(payload) {
|
||||
this.appSideMenuEntries = payload;
|
||||
},
|
||||
searchfunction(searchsettings) {
|
||||
return this.$fhcApi.factory.search.search(searchsettings);
|
||||
},
|
||||
searchfunctiondummy(searchsettings) {
|
||||
return this.$fhcApi.factory.search.searchdummy(searchsettings);
|
||||
}
|
||||
}
|
||||
});
|
||||
app.use(FhcApi)
|
||||
app.mount('#main');
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import StudierendenantragAntrag from "../../components/Studierendenantrag/Antrag.js";
|
||||
import StudierendenantragStatus from "../../components/Studierendenantrag/Status.js";
|
||||
import StudierendenantragInfoblock from "../../components/Studierendenantrag/Infoblock.js";
|
||||
import VueDatePicker from "../../components/vueDatepicker.js.php";
|
||||
import Phrasen from '../../plugin/Phrasen.js';
|
||||
|
||||
const app = Vue.createApp({
|
||||
components: {
|
||||
VueDatePicker,
|
||||
StudierendenantragAntrag,
|
||||
StudierendenantragStatus,
|
||||
StudierendenantragInfoblock
|
||||
|
||||
@@ -99,8 +99,10 @@ export const CoreFetchCmpt = {
|
||||
*
|
||||
*/
|
||||
errorHandler: function(error) {
|
||||
if (error.response.data.retval)
|
||||
if (error.response?.data?.retval)
|
||||
this.setError(error.response.data.retval);
|
||||
else if (error.data?.message)
|
||||
this.setError(error.data.message);
|
||||
else
|
||||
this.setError(error.message);
|
||||
},
|
||||
|
||||
@@ -9,7 +9,8 @@ export default {
|
||||
$registerToForm: component => {
|
||||
if (this.inputs.indexOf(component) < 0)
|
||||
this.inputs.push(component);
|
||||
}
|
||||
},
|
||||
$clearValidationForName: this.clearValidationForName
|
||||
};
|
||||
},
|
||||
props: {
|
||||
@@ -40,9 +41,34 @@ export default {
|
||||
|
||||
return a;
|
||||
}, {});
|
||||
},
|
||||
factory() {
|
||||
const factory = Object.create(Object.getPrototypeOf(this.$fhcApi.factory), Object.getOwnPropertyDescriptors(this.$fhcApi.factory));
|
||||
factory.$fhcApi = {
|
||||
get: this.get,
|
||||
post: this.post,
|
||||
_defaultErrorHandlers: this.$fhcApi._defaultErrorHandlers
|
||||
};
|
||||
return factory;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
get(...args) {
|
||||
if (typeof args[0] == 'object' && args[0].clearValidation && args[0].setFeedback)
|
||||
args[0] = this;
|
||||
else
|
||||
args.unshift(this);
|
||||
|
||||
return this.$fhcApi.get(...args);
|
||||
},
|
||||
post(...args) {
|
||||
if (typeof args[0] == 'object' && args[0].clearValidation && args[0].setFeedback)
|
||||
args[0] = this;
|
||||
else
|
||||
args.unshift(this);
|
||||
|
||||
return this.$fhcApi.post(...args);
|
||||
},
|
||||
_sendFeedbackToInput(inputs, feedback, valid) {
|
||||
if (inputs.length) {
|
||||
inputs.forEach(input => input.setFeedback(valid, feedback));
|
||||
@@ -128,6 +154,10 @@ export default {
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
clearValidationForName(name) {
|
||||
(this.sortedInputs[name.split('.')[0] + name.split('.').slice(1).map(p => `[${p}]`).join("")] || this.sortedInputs['_default'] || [])
|
||||
.forEach(input => input.clearValidation());
|
||||
}
|
||||
},
|
||||
template: `
|
||||
|
||||
@@ -7,9 +7,16 @@ export default {
|
||||
components: {
|
||||
FhcFragment
|
||||
},
|
||||
inject: [
|
||||
'$registerToForm'
|
||||
],
|
||||
inject: {
|
||||
registerToForm: {
|
||||
from: '$registerToForm',
|
||||
default: null
|
||||
},
|
||||
clearValidationForName: {
|
||||
from: '$clearValidationForName',
|
||||
default: null
|
||||
}
|
||||
},
|
||||
props: {
|
||||
bsFeedback: Boolean,
|
||||
noAutoClass: Boolean,
|
||||
@@ -22,7 +29,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
valid: undefined,
|
||||
feedback: []
|
||||
feedback: [],
|
||||
modelValueDummy: undefined
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -31,8 +39,9 @@ export default {
|
||||
return true;
|
||||
if (this.containerClass)
|
||||
return true;
|
||||
if (this.autoContainerClass)
|
||||
return true;
|
||||
for (const prop in this.autoContainerClass)
|
||||
if (Object.hasOwn(this.autoContainerClass, prop))
|
||||
return true;
|
||||
return false;
|
||||
},
|
||||
acc() {
|
||||
@@ -111,13 +120,19 @@ export default {
|
||||
if (!c.includes('form-check-input') && !c.includes('btn-check'))
|
||||
classes.push('form-check-input');
|
||||
break;
|
||||
case 'color':
|
||||
if (!c.includes('form-control-color'))
|
||||
classes.push('form-control-color');
|
||||
if (!c.includes('form-control'))
|
||||
classes.push('form-control');
|
||||
break;
|
||||
case 'autocomplete':
|
||||
case 'datepicker':
|
||||
classes.push('p-0');
|
||||
classes.push('border-0');
|
||||
case 'color':
|
||||
if (!c.includes('form-control-color'))
|
||||
classes.push('form-control-color');
|
||||
if (!c.includes('form-control'))
|
||||
classes.push('form-control');
|
||||
break;
|
||||
case 'text':
|
||||
case 'number':
|
||||
case 'password':
|
||||
@@ -145,9 +160,13 @@ export default {
|
||||
},
|
||||
modelValueCmp: {
|
||||
get() {
|
||||
if (this.$attrs.modelValue === undefined)
|
||||
return this.modelValueDummy;
|
||||
return this.$attrs.modelValue;
|
||||
},
|
||||
set(v) {
|
||||
if (this.$attrs.modelValue === undefined)
|
||||
this.modelValueDummy = v;
|
||||
this.$emit('update:modelValue', v);
|
||||
}
|
||||
},
|
||||
@@ -171,12 +190,26 @@ export default {
|
||||
this.valid = undefined;
|
||||
this.feedback = [];
|
||||
},
|
||||
clearValidationForThisName() {
|
||||
if (this.valid === undefined)
|
||||
return;
|
||||
if (this.clearValidationForName && this.name)
|
||||
this.clearValidationForName(this.name);
|
||||
else
|
||||
this.clearValidation();
|
||||
},
|
||||
setFeedback(valid, feedback) {
|
||||
if (!feedback)
|
||||
feedback = [];
|
||||
if (!Array.isArray(feedback))
|
||||
feedback = [feedback];
|
||||
this.valid = valid;
|
||||
// NOTE(chris): On a list of radios/checkboxes only add the feedback message to the last item
|
||||
if (this.name && (this.lcType == 'radio' || this.lcType == 'checkbox')) {
|
||||
const selector = 'input[type="' + this.lcType + '"][name="' + this.name + '"]';
|
||||
if ([...this.$el.parentNode.querySelectorAll(selector)].pop() != this.$refs.input)
|
||||
return;
|
||||
}
|
||||
this.feedback = feedback;
|
||||
},
|
||||
_loadComponents() {
|
||||
@@ -198,19 +231,20 @@ export default {
|
||||
this._loadComponents();
|
||||
},
|
||||
mounted() {
|
||||
if (this.$registerToForm)
|
||||
this.$registerToForm(this);
|
||||
if (this.registerToForm)
|
||||
this.registerToForm(this);
|
||||
},
|
||||
template: `
|
||||
<component :is="!hasContainer ? 'FhcFragment' : 'div'" class="position-relative" :class="autoContainerClass">
|
||||
<label v-if="$attrs.label && lcType != 'radio' && lcType != 'checkbox'" :for="idCmp">{{$attrs.label}}</label>
|
||||
<input v-if="tag == 'input'" :type="lcType" v-model="modelValueCmp" v-bind="$attrs" :id="idCmp" :name="name" :class="validationClass" :modelValue="undefined" @input="clearValidation(); $emit('input', $event)">
|
||||
<textarea v-else-if="tag == 'textarea'" v-model="modelValueCmp" v-bind="$attrs" :id="idCmp" :name="name" :class="validationClass" :modelValue="undefined" @input="clearValidation(); $emit('input', $event)"></textarea>
|
||||
<select v-else-if="tag == 'select'" v-model="modelValueCmp" v-bind="$attrs" :id="idCmp" :name="name" :class="validationClass" :modelValue="undefined" @input="clearValidation(); $emit('input', $event)">
|
||||
<input v-if="tag == 'input'" :type="lcType" ref="input" v-model="modelValueCmp" v-bind="$attrs" :id="idCmp" :name="name" :class="validationClass" :modelValue="undefined" @input="clearValidationForThisName(); $emit('input', $event)">
|
||||
<textarea v-else-if="tag == 'textarea'" ref="input" v-model="modelValueCmp" v-bind="$attrs" :id="idCmp" :name="name" :class="validationClass" :modelValue="undefined" @input="clearValidationForThisName(); $emit('input', $event)"></textarea>
|
||||
<select v-else-if="tag == 'select'" ref="input" v-model="modelValueCmp" v-bind="$attrs" :id="idCmp" :name="name" :class="validationClass" :modelValue="undefined" @input="clearValidationForThisName(); $emit('input', $event)">
|
||||
<slot></slot>
|
||||
</select>
|
||||
<component
|
||||
v-else-if="tag == 'VueDatePicker'"
|
||||
ref="input"
|
||||
:is="tag"
|
||||
:type="type"
|
||||
v-model="modelValueCmp"
|
||||
@@ -220,26 +254,25 @@ export default {
|
||||
:class="validationClass"
|
||||
:input-class-name=
|
||||
"[...Object.entries({'form-control': !noAutoClass, 'is-valid': valid === true, 'is-invalid': valid === false}).reduce((a,[k,v]) => {if(v) a.push(k);return a}, []), ...($attrs['input-class-name'] ? $attrs['input-class-name'].split(' ') : [])].join(' ')"
|
||||
@update:model-value="clearValidation"
|
||||
@update:model-value="clearValidationForThisName"
|
||||
>
|
||||
<slot></slot>
|
||||
</component>
|
||||
<component
|
||||
v-else-if="tag == 'PvAutocomplete'"
|
||||
:is="tag"
|
||||
:type="type"
|
||||
ref="input"
|
||||
v-model="modelValueCmp"
|
||||
v-bind="$attrs"
|
||||
:id="idCmp"
|
||||
:input-props="{name}"
|
||||
:class="validationClass"
|
||||
:input-class="[...Object.entries({'form-control': !noAutoClass, 'is-valid': valid === true, 'is-invalid': valid === false}).reduce((a,[k,v]) => {if(v) a.push(k);return a}, []), ...($attrs['input-class'] ? $attrs['input-class'].split(' ') : [])].join(' ')"
|
||||
@update:model-value="clearValidation"
|
||||
@update:model-value="clearValidationForThisName"
|
||||
>
|
||||
<slot></slot>
|
||||
</component>
|
||||
<component
|
||||
v-else-if="tag == 'UploadDms'"
|
||||
ref="input"
|
||||
:is="tag"
|
||||
:type="type"
|
||||
v-model="modelValueCmp"
|
||||
@@ -249,12 +282,13 @@ export default {
|
||||
:class="validationClass"
|
||||
:input-class="validationClass"
|
||||
:no-list="inputGroup"
|
||||
@update:model-value="clearValidation"
|
||||
@update:model-value="clearValidationForThisName"
|
||||
>
|
||||
<slot></slot>
|
||||
</component>
|
||||
<component
|
||||
v-else
|
||||
ref="input"
|
||||
:is="tag"
|
||||
:type="type"
|
||||
v-model="modelValueCmp"
|
||||
@@ -262,7 +296,7 @@ export default {
|
||||
:id="idCmp"
|
||||
:name="name"
|
||||
:class="validationClass"
|
||||
@update:model-value="clearValidation"
|
||||
@update:model-value="clearValidationForThisName"
|
||||
>
|
||||
<slot></slot>
|
||||
</component>
|
||||
|
||||
@@ -53,29 +53,29 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
modelValue(n) {
|
||||
if (n instanceof FileList)
|
||||
return this.$refs.upload.files = n;
|
||||
|
||||
const dt = new DataTransfer();
|
||||
const dms = [];
|
||||
for (var file of n) {
|
||||
if (file instanceof File) {
|
||||
dt.items.add(file);
|
||||
} else {
|
||||
const dmsFile = new File([JSON.stringify(file)], file.name, {
|
||||
type: 'application/x.fhc-dms+json'
|
||||
});
|
||||
dt.items.add(dmsFile);
|
||||
}
|
||||
if (n instanceof FileList)
|
||||
return this.$refs.upload.files = n;
|
||||
|
||||
const dt = new DataTransfer();
|
||||
const dms = [];
|
||||
for (var file of n) {
|
||||
if (file instanceof File) {
|
||||
dt.items.add(file);
|
||||
} else {
|
||||
const dmsFile = new File([JSON.stringify(file)], file.name, {
|
||||
type: 'application/x.fhc-dms+json'
|
||||
});
|
||||
dt.items.add(dmsFile);
|
||||
}
|
||||
this.$emit('update:modelValue', dt.files);
|
||||
},
|
||||
}
|
||||
this.$emit('update:modelValue', dt.files);
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="form-upload-dms">
|
||||
<input ref="upload" class="form-control" :class="inputClass" :id="id" :name="name" :multiple="multiple" type="file" @change="addFiles">
|
||||
<ul v-if="modelValue.length && multiple && !noList" class="list-unstyled m-0">
|
||||
<li v-for="(file, index) in modelValue" :key="index" class="d-flex mx-1 mt-1 align-items-center">
|
||||
<li v-for="(file, index) in modelValue" :key="index" class="d-flex mx-1 mt-1 align-items-start">
|
||||
<span class="col-auto"><i class="fa fa-file me-1"></i></span>
|
||||
<span class="col">{{ file.name }}</span>
|
||||
<button class="col-auto btn btn-outline-secondary btn-p-0" @click="removeFile(index)">
|
||||
|
||||
@@ -1,26 +1,29 @@
|
||||
const FEEDBACK_DEFAULT = {
|
||||
success: [],
|
||||
danger: []
|
||||
};
|
||||
export default {
|
||||
inject: [
|
||||
'$registerToForm'
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
feedback: FEEDBACK_DEFAULT
|
||||
feedback: {
|
||||
success: [],
|
||||
danger: []
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
clearValidation() {
|
||||
this.feedback = FEEDBACK_DEFAULT;
|
||||
this.feedback = {
|
||||
success: [],
|
||||
danger: []
|
||||
};
|
||||
},
|
||||
setFeedback(valid, feedback) {
|
||||
if (!feedback)
|
||||
feedback = [];
|
||||
if (!Array.isArray(feedback))
|
||||
feedback = [feedback];
|
||||
this.feedback[valid ? 'success' : 'danger'] = feedback;
|
||||
const ts = Date.now();
|
||||
this.feedback[valid ? 'success' : 'danger'] = feedback.map(msg => [msg, ts]);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -29,7 +32,7 @@ export default {
|
||||
},
|
||||
template: `
|
||||
<template v-for="(arr, key) in feedback" :key="key">
|
||||
<div v-for="msg in arr" :key="msg" class="alert alert-dismissible fade show" :class="'alert-' + key" role="alert">
|
||||
<div v-for="[msg, ts] in arr" :key="ts + msg" class="alert alert-dismissible fade show" :class="'alert-' + key" role="alert">
|
||||
{{msg}}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
export default {
|
||||
render() {
|
||||
return (this.$slots && this.$slots.default) ? this.$slots.default() : null;
|
||||
}
|
||||
};
|
||||
@@ -1,10 +1,16 @@
|
||||
import {CoreFetchCmpt} from '../../Fetch.js';
|
||||
import CoreForm from '../../Form/Form.js';
|
||||
import FormValidation from '../../Form/Validation.js';
|
||||
import FormInput from '../../Form/Input.js';
|
||||
|
||||
var _uuid = 0;
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CoreFetchCmpt
|
||||
CoreFetchCmpt,
|
||||
CoreForm,
|
||||
FormValidation,
|
||||
FormInput
|
||||
},
|
||||
emits: [
|
||||
'setInfos',
|
||||
@@ -18,9 +24,8 @@ export default {
|
||||
return {
|
||||
data: null,
|
||||
saving: false,
|
||||
errors: {
|
||||
grund: [],
|
||||
default: []
|
||||
formData: {
|
||||
grund: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -29,36 +34,32 @@ export default {
|
||||
switch (this.data.status)
|
||||
{
|
||||
case 'Erstellt': return 'info';
|
||||
case 'Pause':
|
||||
case 'Zurueckgezogen': return 'danger';
|
||||
case 'Genehmigt': return 'success';
|
||||
default: return 'info';
|
||||
default: return 'warning';
|
||||
}
|
||||
},
|
||||
loadUrl() {
|
||||
if (this.studierendenantragId)
|
||||
return '/components/Antrag/Abmeldung/getDetailsForAntrag/'+
|
||||
this.studierendenantragId;
|
||||
return '/components/Antrag/Abmeldung/getDetailsForNewAntrag/' +
|
||||
this.prestudentId;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
load() {
|
||||
return axios.get(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
this.loadUrl
|
||||
).then(
|
||||
result => {
|
||||
this.data = result.data.retval;
|
||||
return this.$fhcApi.factory
|
||||
.studstatus.abmeldung.getDetails(this.studierendenantragId, this.prestudentId)
|
||||
.then(result => {
|
||||
this.data = result.data;
|
||||
if (this.data.status) {
|
||||
const msg = (this.data.status == 'Pause' && this.data.status_insertvon == "Studienabbruch") ? Vue.computed(() => {
|
||||
let status = this.$p.t('studierendenantrag/status_stop');
|
||||
return this.$p.t('studierendenantrag', 'status_x', {status});
|
||||
}) : Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp}));
|
||||
this.$emit("setStatus", {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp})),
|
||||
msg,
|
||||
severity: this.statusSeverity
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
createAntrag() {
|
||||
bootstrap.Modal.getOrCreateInstance(this.$refs.modal).hide();
|
||||
@@ -67,52 +68,39 @@ export default {
|
||||
severity: 'warning'
|
||||
});
|
||||
this.saving = true;
|
||||
for(var k in this.errors)
|
||||
this.errors[k] = [];
|
||||
axios.post(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Abmeldung/createAntrag/', {
|
||||
studiensemester: this.data.studiensemester_kurzbz,
|
||||
prestudent_id: this.data.prestudent_id,
|
||||
grund: this.$refs.grund.value
|
||||
}
|
||||
).then(
|
||||
result => {
|
||||
if (result.data.error)
|
||||
{
|
||||
for (var k in result.data.retval)
|
||||
{
|
||||
if (this.errors[k] !== undefined)
|
||||
this.errors[k].push(result.data.retval[k]);
|
||||
else
|
||||
this.errors.default.push(result.data.retval[k]);
|
||||
}
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_error')})),
|
||||
severity: 'danger'
|
||||
|
||||
this.$refs.form.clearValidation();
|
||||
this.$refs.form.factory
|
||||
.studstatus.abmeldung.create(
|
||||
this.data.studiensemester_kurzbz,
|
||||
this.data.prestudent_id,
|
||||
this.formData.grund
|
||||
)
|
||||
.then(result => {
|
||||
if (result.data === true)
|
||||
document.location += "";
|
||||
|
||||
this.data = result.data;
|
||||
if (this.data.status)
|
||||
this.$emit("setStatus", {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp})),
|
||||
severity: this.statusSeverity
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
if (result.data.retval === true)
|
||||
document.location += "";
|
||||
this.data = result.data.retval;
|
||||
if (this.data.status) {
|
||||
this.$emit("setStatus", {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp})),
|
||||
severity: this.statusSeverity
|
||||
});
|
||||
}
|
||||
else
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_open')})),
|
||||
severity:'success'
|
||||
});
|
||||
}
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_open')})),
|
||||
severity:'success'
|
||||
});
|
||||
this.saving = false;
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(error => {
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_error')})),
|
||||
severity: 'danger'
|
||||
});
|
||||
this.saving = false;
|
||||
this.$fhcAlert.handleSystemError(error);
|
||||
});
|
||||
},
|
||||
cancelAntrag() {
|
||||
this.$emit('setStatus', {
|
||||
@@ -120,51 +108,37 @@ export default {
|
||||
severity: 'warning'
|
||||
});
|
||||
this.saving = true;
|
||||
for(var k in this.errors)
|
||||
this.errors[k] = [];
|
||||
axios.post(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Abmeldung/cancelAntrag/', {
|
||||
antrag_id: this.data.studierendenantrag_id
|
||||
}
|
||||
).then(
|
||||
result => {
|
||||
if (result.data.error)
|
||||
{
|
||||
for (var k in result.data.retval)
|
||||
{
|
||||
if (this.errors[k] !== undefined)
|
||||
this.errors[k].push(result.data.retval[k]);
|
||||
else
|
||||
this.errors.default.push(result.data.retval[k]);
|
||||
}
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_error')})),
|
||||
severity:'danger'
|
||||
|
||||
this.$refs.form.clearValidation();
|
||||
this.$refs.form.factory
|
||||
.studstatus.abmeldung.cancel(
|
||||
this.data.studierendenantrag_id
|
||||
)
|
||||
.then(result => {
|
||||
if (Number.isInteger(result.data))
|
||||
document.location = document.location.replace(/abmeldung\/([0-9]*)\/[0-9]*[\/]?$/, 'abmeldung/$1') + "/" + result.data;
|
||||
|
||||
this.data = result.data;
|
||||
if (this.data.status)
|
||||
this.$emit("setStatus", {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp})),
|
||||
severity: this.statusSeverity
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Number.isInteger(result.data.retval)) {
|
||||
document.location = document.location.replace(/abmeldung\/([0-9]*)\/[0-9]*[\/]?$/, 'abmeldung/$1') + "/" + result.data.retval;
|
||||
}
|
||||
this.data = result.data.retval;
|
||||
if (this.data.status) {
|
||||
this.$emit("setStatus", {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp})),
|
||||
severity: this.statusSeverity
|
||||
});
|
||||
}
|
||||
else
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_cancelled')})),
|
||||
severity: 'danger'
|
||||
});
|
||||
}
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_cancelled')})),
|
||||
severity: 'danger'
|
||||
});
|
||||
this.saving = false;
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(error => {
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_error')})),
|
||||
severity: 'danger'
|
||||
});
|
||||
this.saving = false;
|
||||
this.$fhcAlert.handleSystemError(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -173,10 +147,9 @@ export default {
|
||||
template: `
|
||||
<div class="studierendenantrag-form-abmeldung">
|
||||
<core-fetch-cmpt :api-function="load">
|
||||
<div class="row">
|
||||
<core-form ref="form" class="row">
|
||||
<div class="col-12">
|
||||
<div v-for="error in errors.default" class="alert alert-danger" role="alert" v-html="error">
|
||||
</div>
|
||||
<form-validation></form-validation>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>{{$p.t('lehre', 'studiengang')}}</th>
|
||||
@@ -213,19 +186,16 @@ export default {
|
||||
<pre>{{data.grund}}</pre>
|
||||
</div>
|
||||
<div v-else class="col-sm-6 mb-3">
|
||||
<label :for="'studierendenantrag-form-abmeldung-' + uuid + '-grund'" class="form-label">Grund:</label>
|
||||
<textarea
|
||||
class="form-control"
|
||||
:class="{'is-invalid': errors.grund.length}"
|
||||
:id="'studierendenantrag-form-abmeldung-' + uuid + '-grund'"
|
||||
<form-input
|
||||
type="textarea"
|
||||
label="Grund:"
|
||||
v-model="formData.grund"
|
||||
name="grund"
|
||||
rows="5"
|
||||
:disabled="saving"
|
||||
ref="grund"
|
||||
required
|
||||
></textarea>
|
||||
<div v-if="errors.grund.length" class="invalid-feedback">
|
||||
{{errors.grund.join(".")}}
|
||||
</div>
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="col-12 text-end">
|
||||
<button
|
||||
@@ -280,13 +250,13 @@ export default {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</core-form>
|
||||
|
||||
<template v-slot:error="{errorMessage}">
|
||||
<div class="alert alert-danger m-0" role="alert">
|
||||
{{ errorMessage }}
|
||||
</div>
|
||||
</template>
|
||||
</core-fetch-cmpt>
|
||||
</div>
|
||||
`
|
||||
</div>`
|
||||
}
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
import {CoreFetchCmpt} from '../../Fetch.js';
|
||||
import CoreForm from '../../Form/Form.js';
|
||||
import FormValidation from '../../Form/Validation.js';
|
||||
import FormInput from '../../Form/Input.js';
|
||||
|
||||
var _uuid = 0;
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CoreFetchCmpt
|
||||
CoreFetchCmpt,
|
||||
CoreForm,
|
||||
FormValidation,
|
||||
FormInput
|
||||
},
|
||||
emits: [
|
||||
'setInfos',
|
||||
@@ -18,9 +24,8 @@ export default {
|
||||
return {
|
||||
data: null,
|
||||
saving: false,
|
||||
errors: {
|
||||
grund: [],
|
||||
default: []
|
||||
formData: {
|
||||
grund: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -29,37 +34,32 @@ export default {
|
||||
switch (this.data?.status)
|
||||
{
|
||||
case 'Erstellt': return 'info';
|
||||
case 'Genehmigt':
|
||||
case 'Pause':
|
||||
case 'Zurueckgezogen': return 'danger';
|
||||
case 'EinspruchAbgelehnt':
|
||||
case 'Abgemeldet': return 'success';
|
||||
default: return 'info';
|
||||
default: return 'warning';
|
||||
}
|
||||
},
|
||||
loadUrl() {
|
||||
if (this.studierendenantragId)
|
||||
return '/components/Antrag/Abmeldung/getDetailsForAntrag/'+
|
||||
this.studierendenantragId;
|
||||
return '/components/Antrag/Abmeldung/getDetailsForNewAntrag/' +
|
||||
this.prestudentId;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
load() {
|
||||
return axios.get(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
this.loadUrl
|
||||
).then(
|
||||
result => {
|
||||
this.data = result.data.retval;
|
||||
return this.$fhcApi.factory
|
||||
.studstatus.abmeldung.getDetails(this.studierendenantragId, this.prestudentId)
|
||||
.then(result => {
|
||||
this.data = result.data;
|
||||
if (this.data.status) {
|
||||
const msg = (this.data.status == 'Pause' && this.data.status_insertvon == "Studienabbruch") ? Vue.computed(() => {
|
||||
let status = this.$p.t('studierendenantrag/status_stop');
|
||||
return this.$p.t('studierendenantrag', 'status_x', {status});
|
||||
}) : Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp}));
|
||||
this.$emit("setStatus", {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp})),
|
||||
msg,
|
||||
severity: this.statusSeverity
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
createAntrag() {
|
||||
bootstrap.Modal.getOrCreateInstance(this.$refs.modal).hide();
|
||||
@@ -68,63 +68,44 @@ export default {
|
||||
severity: 'warning'
|
||||
});
|
||||
this.saving = true;
|
||||
for(var k in this.errors)
|
||||
this.errors[k] = [];
|
||||
axios.post(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Abmeldung/createAntrag/', {
|
||||
studiensemester: this.data.studiensemester_kurzbz,
|
||||
prestudent_id: this.data.prestudent_id,
|
||||
grund: this.$refs.grund.value
|
||||
}
|
||||
).then(
|
||||
result => {
|
||||
if (result.data.error)
|
||||
{
|
||||
for (var k in result.data.retval)
|
||||
{
|
||||
if (this.errors[k] !== undefined)
|
||||
this.errors[k].push(result.data.retval[k]);
|
||||
else
|
||||
this.errors.default.push(result.data.retval[k]);
|
||||
}
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_error')})),
|
||||
severity: 'danger'
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
if (result.data.retval === true)
|
||||
document.location += "";
|
||||
this.data = result.data.retval;
|
||||
if (this.data.status) {
|
||||
this.$emit("setStatus", {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp})),
|
||||
severity: this.statusSeverity
|
||||
});
|
||||
}
|
||||
else
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_open')})),
|
||||
severity:'success'
|
||||
});
|
||||
}
|
||||
this.saving = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
appendDropDownText(event){
|
||||
let templateText = this.$refs.grund;
|
||||
|
||||
if(event.target.value)
|
||||
{
|
||||
let templateT= this.$p.t('studierendenantrag', event.target.value);
|
||||
templateText.value = templateT;
|
||||
}
|
||||
else
|
||||
templateText.value = '';
|
||||
this.$refs.form.clearValidation();
|
||||
this.$refs.form.factory
|
||||
.studstatus.abmeldung.create(
|
||||
this.data.studiensemester_kurzbz,
|
||||
this.data.prestudent_id,
|
||||
this.formData.grund
|
||||
)
|
||||
.then(result => {
|
||||
if (result.data === true)
|
||||
document.location += "";
|
||||
|
||||
this.data = result.data;
|
||||
if (this.data.status)
|
||||
this.$emit("setStatus", {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp})),
|
||||
severity: this.statusSeverity
|
||||
});
|
||||
else
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_open')})),
|
||||
severity:'success'
|
||||
});
|
||||
this.saving = false;
|
||||
})
|
||||
.catch(error => {
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_error')})),
|
||||
severity: 'danger'
|
||||
});
|
||||
this.saving = false;
|
||||
this.$fhcAlert.handleSystemError(error);
|
||||
});
|
||||
},
|
||||
appendDropDownText(event) {
|
||||
this.formData.grund = event.target.value
|
||||
? this.$p.t('studierendenantrag', event.target.value)
|
||||
: '';
|
||||
},
|
||||
},
|
||||
created() {
|
||||
@@ -133,8 +114,9 @@ export default {
|
||||
template: `
|
||||
<div class="studierendenantrag-form-abmeldung">
|
||||
<core-fetch-cmpt :api-function="load">
|
||||
<div class="row">
|
||||
<core-form ref="form" class="row">
|
||||
<div class="col-12">
|
||||
<form-validation></form-validation>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>{{$p.t('lehre', 'studiengang')}}</th>
|
||||
@@ -175,8 +157,7 @@ export default {
|
||||
<div v-else class="col-sm-6 mb-3">
|
||||
<label :for="'studierendenantrag-form-abmeldung-' + uuid + '-grund'" class="form-label">Grund:</label>
|
||||
<div class="mb-2">
|
||||
<select name="grundAv" @change="appendDropDownText
|
||||
($event)">
|
||||
<select name="grundAv" class="form-select" @change="appendDropDownText">
|
||||
<option value="" > --- bitte auswählen, sofern zutreffend ---- </option>
|
||||
<option value="textLong_NichtantrittStudium">{{$p.t('studierendenantrag', 'dropdown_NichtantrittStudium')}}
|
||||
</option>
|
||||
@@ -193,19 +174,17 @@ export default {
|
||||
<option value="textLong_MissingZgv">{{$p.t('studierendenantrag', 'dropdown_MissingZgv')}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<textarea
|
||||
class="form-control"
|
||||
:class="{'is-invalid': errors.grund.length}"
|
||||
</div>
|
||||
<form-input
|
||||
type="textarea"
|
||||
v-model="formData.grund"
|
||||
name="grund"
|
||||
:id="'studierendenantrag-form-abmeldung-' + uuid + '-grund'"
|
||||
rows="5"
|
||||
:disabled="saving"
|
||||
ref="grund"
|
||||
required
|
||||
></textarea>
|
||||
<div v-if="errors.grund.length" class="invalid-feedback">
|
||||
{{errors.grund.join(".")}}
|
||||
</div>
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
<div class="col-12 text-end">
|
||||
@@ -251,7 +230,7 @@ export default {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</core-form>
|
||||
|
||||
<template v-slot:error="{errorMessage}">
|
||||
<div class="alert alert-danger m-0" role="alert">
|
||||
@@ -259,6 +238,5 @@ export default {
|
||||
</div>
|
||||
</template>
|
||||
</core-fetch-cmpt>
|
||||
</div>
|
||||
`
|
||||
</div>`
|
||||
}
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
import {CoreFetchCmpt} from '../../Fetch.js';
|
||||
import VueDatepicker from '../../vueDatepicker.js.php';
|
||||
import CoreForm from '../../Form/Form.js';
|
||||
import FormValidation from '../../Form/Validation.js';
|
||||
import FormInput from '../../Form/Input.js';
|
||||
|
||||
var _uuid = 0;
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CoreFetchCmpt,
|
||||
VueDatepicker
|
||||
CoreForm,
|
||||
FormValidation,
|
||||
FormInput
|
||||
},
|
||||
emits: [
|
||||
'setInfos',
|
||||
@@ -20,12 +23,7 @@ export default {
|
||||
return {
|
||||
data: null,
|
||||
saving: false,
|
||||
errors: {
|
||||
grund: [],
|
||||
studiensemester: [],
|
||||
datum_wiedereinstieg: [],
|
||||
default: []
|
||||
},
|
||||
attachment: [],
|
||||
stsem: null,
|
||||
currentWiedereinstieg: '',
|
||||
siteUrl: FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
@@ -37,18 +35,14 @@ export default {
|
||||
switch (this.data.status)
|
||||
{
|
||||
case 'Erstellt': return 'info';
|
||||
case 'Genehmigt': return 'success';
|
||||
case 'Zurueckgezogen': return 'danger';
|
||||
default: return 'info';
|
||||
case 'Pause':
|
||||
case 'Zurueckgezogen':
|
||||
case 'Abgelehnt': return 'danger';
|
||||
case 'Genehmigt':
|
||||
case 'EmailVersandt': return 'success';
|
||||
default: return 'warning';
|
||||
}
|
||||
},
|
||||
loadUrl() {
|
||||
if (this.studierendenantragId)
|
||||
return '/components/Antrag/Unterbrechung/getDetailsForAntrag/'+
|
||||
this.studierendenantragId;
|
||||
return '/components/Antrag/Unterbrechung/getDetailsForNewAntrag/' +
|
||||
this.prestudentId;
|
||||
},
|
||||
datumWsFormatted() {
|
||||
let datumUnformatted = '';
|
||||
|
||||
@@ -62,26 +56,40 @@ export default {
|
||||
return datumUnformatted;
|
||||
let datum = new Date(datumUnformatted);
|
||||
return datum.toLocaleDateString();
|
||||
},
|
||||
semesterOffsets() {
|
||||
if (!this.data || !this.data.studiensemester)
|
||||
return [];
|
||||
return Object.values(this.data.studiensemester)
|
||||
.filter(el => !el.disabled)
|
||||
.map(el => el.studiensemester_kurzbz);
|
||||
},
|
||||
semester() {
|
||||
if (!this.stsem)
|
||||
return '';
|
||||
return this.data.semester + this.semesterOffsets.indexOf(this.stsem);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
load() {
|
||||
return axios.get(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
this.loadUrl
|
||||
).then(
|
||||
result => {
|
||||
this.data = result.data.retval;
|
||||
if (this.data.status) {
|
||||
this.$emit("setStatus", {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp})),
|
||||
severity: this.statusSeverity
|
||||
});
|
||||
return this.$fhcApi.factory
|
||||
.studstatus.unterbrechung.getDetails(this.studierendenantragId, this.prestudentId)
|
||||
.then(
|
||||
result => {
|
||||
this.data = result.data;
|
||||
if (this.data.status) {
|
||||
const msg = (this.data.status == 'Pause' && this.data.status_insertvon == "Studienabbruch") ? Vue.computed(() => {
|
||||
let status = this.$p.t('studierendenantrag/status_stop');
|
||||
return this.$p.t('studierendenantrag', 'status_x', {status});
|
||||
}) : Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp}));
|
||||
this.$emit("setStatus", {
|
||||
msg,
|
||||
severity: this.statusSeverity
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
);
|
||||
);
|
||||
},
|
||||
createAntrag() {
|
||||
this.$emit('setStatus', {
|
||||
@@ -89,63 +97,41 @@ export default {
|
||||
severity: 'warning'
|
||||
});
|
||||
this.saving = true;
|
||||
for(var k in this.errors)
|
||||
this.errors[k] = [];
|
||||
|
||||
var formData = new FormData();
|
||||
var attachment = this.$refs.attachment;
|
||||
formData.append("attachment", attachment.files[0]);
|
||||
formData.append("studiensemester", this.stsem !== null && this.data.studiensemester[this.stsem].studiensemester_kurzbz);
|
||||
formData.append("prestudent_id", this.data.prestudent_id);
|
||||
formData.append("grund", this.$refs.grund.value);
|
||||
formData.append("datum_wiedereinstieg", this.stsem !== null && this.currentWiedereinstieg);
|
||||
this.$refs.form.clearValidation();
|
||||
this.$refs.form.factory
|
||||
.studstatus.unterbrechung.create(
|
||||
this.stsem !== null && this.data.studiensemester[this.stsem].studiensemester_kurzbz,
|
||||
this.data.prestudent_id,
|
||||
this.data.grund,
|
||||
this.stsem !== null && this.currentWiedereinstieg,
|
||||
this.attachment
|
||||
)
|
||||
.then(result => {
|
||||
if (Number.isInteger(result.data))
|
||||
document.location += "/" + result.data;
|
||||
|
||||
axios.post(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Unterbrechung/createAntrag/',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
).then(
|
||||
result => {
|
||||
if (result.data.error)
|
||||
{
|
||||
for (var k in result.data.retval)
|
||||
{
|
||||
if (this.errors[k] !== undefined)
|
||||
this.errors[k].push(result.data.retval[k]);
|
||||
else
|
||||
this.errors.default.push(result.data.retval[k]);
|
||||
}
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_error')})),
|
||||
severity: 'danger'
|
||||
this.data = result.data;
|
||||
if (this.data.status)
|
||||
this.$emit("setStatus", {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp})),
|
||||
severity: this.statusSeverity
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Number.isInteger(result.data.retval))
|
||||
document.location += "/" + result.data.retval;
|
||||
this.data = result.data.retval;
|
||||
if (this.data.status) {
|
||||
this.$emit("setStatus", {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp})),
|
||||
severity: this.statusSeverity
|
||||
});
|
||||
}
|
||||
else
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_created')})),
|
||||
severity: 'info'
|
||||
});
|
||||
}
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_created')})),
|
||||
severity: 'info'
|
||||
});
|
||||
this.saving = false;
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(error => {
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_error')})),
|
||||
severity: 'danger'
|
||||
});
|
||||
this.saving = false;
|
||||
this.$fhcAlert.handleSystemError(error);
|
||||
});
|
||||
},
|
||||
cancelAntrag() {
|
||||
this.$emit('setStatus', {
|
||||
@@ -153,63 +139,45 @@ export default {
|
||||
severity: 'warning'
|
||||
});
|
||||
this.saving = true;
|
||||
for(var k in this.errors)
|
||||
this.errors[k] = [];
|
||||
axios.post(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Unterbrechung/cancelAntrag/', {
|
||||
antrag_id: this.data.studierendenantrag_id
|
||||
}
|
||||
).then(
|
||||
result => {
|
||||
if (result.data.error)
|
||||
{
|
||||
for (var k in result.data.retval)
|
||||
{
|
||||
if (this.errors[k] !== undefined)
|
||||
this.errors[k].push(result.data.retval[k]);
|
||||
else
|
||||
this.errors.default.push(result.data.retval[k]);
|
||||
}
|
||||
|
||||
this.$refs.form.clearValidation();
|
||||
this.$refs.form.factory
|
||||
.studstatus.unterbrechung.cancel(
|
||||
this.data.studierendenantrag_id
|
||||
)
|
||||
.then(result => {
|
||||
if (Number.isInteger(result.data))
|
||||
document.location = document.location.replace(/unterbrechung\/([0-9]*)\/[0-9]*[\/]?$/, 'unterbrechung/$1') + "/" + result.data;
|
||||
|
||||
this.data = result.data;
|
||||
if (this.data.status)
|
||||
this.$emit("setStatus", {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp})),
|
||||
severity: this.statusSeverity
|
||||
});
|
||||
else
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_error')})),
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_cancelled')})),
|
||||
severity: 'danger'
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Number.isInteger(result.data.retval)) {
|
||||
document.location = document.location.replace(/unterbrechung\/([0-9]*)\/[0-9]*[\/]?$/, 'unterbrechung/$1') + "/" + result.data.retval;
|
||||
}
|
||||
this.data = result.data.retval;
|
||||
if (this.data.status) {
|
||||
this.$emit("setStatus", {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp})),
|
||||
severity: this.statusSeverity
|
||||
});
|
||||
}
|
||||
else
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_cancelled')})),
|
||||
severity: 'danger'
|
||||
});
|
||||
}
|
||||
this.saving = false;
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(error => {
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_error')})),
|
||||
severity: 'danger'
|
||||
});
|
||||
this.saving = false;
|
||||
this.$fhcAlert.handleSystemError(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.uuid = _uuid++;
|
||||
},
|
||||
template: `
|
||||
<div class="studierendenantrag-form-unterbrechung">
|
||||
<core-fetch-cmpt :api-function="load">
|
||||
<div class="row">
|
||||
<core-form ref="form" class="row">
|
||||
<div class="col-12">
|
||||
<div v-for="error in errors.default" class="alert alert-danger" role="alert" v-html="error">
|
||||
</div>
|
||||
<form-validation></form-validation>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>{{$p.t('lehre', 'studiengang')}}</th>
|
||||
@@ -235,99 +203,105 @@ export default {
|
||||
<tr>
|
||||
<th>{{$p.t('lehre', 'semester')}}</th>
|
||||
<td align="right" v-if="data.studierendenantrag_id">{{data.semester}}</td>
|
||||
<td align="right" v-else>{{stsem === null ? '' : data.studiensemester[stsem].semester}}</td>
|
||||
<td align="right" v-else>{{semester}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 mb-3">
|
||||
<label :for="'studierendenantrag-form-abmeldung-' + uuid + '-stsem'" class="form-label">
|
||||
{{$p.t('lehre', 'studiensemester')}}
|
||||
</label>
|
||||
<div v-if="data.studierendenantrag_id">
|
||||
{{data.studiensemester_kurzbz}}
|
||||
</div>
|
||||
<div v-else>
|
||||
<select
|
||||
class="form-select"
|
||||
:class="{'is-invalid': errors.studiensemester.length}"
|
||||
v-model="stsem"
|
||||
required
|
||||
:id="'studierendenantrag-form-abmeldung-' + uuid + '-stsem'"
|
||||
@input="currentWiedereinstieg = ''"
|
||||
>
|
||||
<option v-for="(stsem, index) in data.studiensemester" :key="index" :value="index">
|
||||
{{stsem.studiensemester_kurzbz}}
|
||||
</option>
|
||||
</select>
|
||||
<div v-if="errors.studiensemester.length" class="invalid-feedback">
|
||||
{{errors.studiensemester.join(".")}}
|
||||
<label class="form-label">
|
||||
{{$p.t('lehre', 'studiensemester')}}
|
||||
</label>
|
||||
<div>
|
||||
{{data.studiensemester_kurzbz}}
|
||||
</div>
|
||||
</div>
|
||||
<form-input
|
||||
v-else
|
||||
type="select"
|
||||
v-model="stsem"
|
||||
name="studiensemester"
|
||||
:label="$p.t('lehre', 'studiensemester')"
|
||||
required
|
||||
@input="currentWiedereinstieg = ''"
|
||||
>
|
||||
<option v-for="(stsem, index) in data.studiensemester" :key="index" :value="index" :disabled="stsem.disabled">
|
||||
{{stsem.studiensemester_kurzbz}}
|
||||
</option>
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="col-sm-6 mb-3">
|
||||
<label class="form-label">
|
||||
{{$p.t('studierendenantrag', 'antrag_datum_wiedereinstieg')}}
|
||||
</label>
|
||||
|
||||
<div v-if="data.studierendenantrag_id">
|
||||
{{datumWsFormatted}}
|
||||
</div>
|
||||
<div v-else-if="stsem === null">
|
||||
<select class="form-select" disabled>
|
||||
<option selected>{{$p.t('ui/select_studiensemester')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div v-else>
|
||||
<select v-model="currentWiedereinstieg" class="form-select">
|
||||
<option v-for="sem in data.studiensemester[stsem].wiedereinstieg" :key="sem.studiensemester_kurzbz" :value="sem.start">
|
||||
{{sem.studiensemester_kurzbz}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div v-if="errors.datum_wiedereinstieg.length" class="invalid-feedback d-block">
|
||||
{{errors.datum_wiedereinstieg.join(".")}}
|
||||
<label class="form-label">
|
||||
{{$p.t('studierendenantrag', 'antrag_datum_wiedereinstieg')}}
|
||||
</label>
|
||||
<div>
|
||||
{{datumWsFormatted}}
|
||||
</div>
|
||||
</div>
|
||||
<form-input
|
||||
v-else-if="stsem === null"
|
||||
type="select"
|
||||
:label="$p.t('studierendenantrag', 'antrag_datum_wiedereinstieg')"
|
||||
modelValue=""
|
||||
name="datum_wiedereinstieg"
|
||||
disabled
|
||||
>
|
||||
<template #default>
|
||||
<option value="" selected disabled hidden>{{$p.t('ui/select_studiensemester')}}</option>
|
||||
</template>
|
||||
</form-input>
|
||||
<form-input
|
||||
v-else
|
||||
type="select"
|
||||
:label="$p.t('studierendenantrag', 'antrag_datum_wiedereinstieg')"
|
||||
v-model="currentWiedereinstieg"
|
||||
name="datum_wiedereinstieg"
|
||||
>
|
||||
<option v-for="sem in data.studiensemester[stsem].wiedereinstieg" :key="sem.studiensemester_kurzbz" :value="sem.start" :disabled="sem.disabled">
|
||||
{{sem.studiensemester_kurzbz}}
|
||||
</option>
|
||||
</form-input>
|
||||
</div>
|
||||
<div v-if="data.studierendenantrag_id" class="mb-3">
|
||||
<h5>{{$p.t('studierendenantrag', 'antrag_grund')}}:</h5>
|
||||
<textarea class="form-control" rows="5" readonly>{{data.grund}}</textarea>
|
||||
</div>
|
||||
<div v-else class="col-sm-6 mb-3">
|
||||
<label :for="'studierendenantrag-form-abmeldung-' + uuid + '-grund'" class="form-label">Grund:</label>
|
||||
<textarea
|
||||
class="form-control"
|
||||
:class="{'is-invalid': errors.grund.length}"
|
||||
:id="'studierendenantrag-form-abmeldung-' + uuid + '-grund'"
|
||||
<div class="col-sm-6 mb-3">
|
||||
<form-input
|
||||
v-if="data.studierendenantrag_id"
|
||||
type="textarea"
|
||||
:label="$p.t('studierendenantrag', 'antrag_grund') + ':'"
|
||||
v-model="data.grund"
|
||||
name="grund"
|
||||
rows="5"
|
||||
:disabled="saving"
|
||||
readonly
|
||||
>
|
||||
</form-input>
|
||||
<form-input
|
||||
v-else
|
||||
ref="grund"
|
||||
type="textarea"
|
||||
:label="$p.t('studierendenantrag', 'antrag_grund') + ':'"
|
||||
v-model="data.grund"
|
||||
name="grund"
|
||||
:disabled="saving"
|
||||
rows="5"
|
||||
required
|
||||
></textarea>
|
||||
<div v-if="errors.grund.length" class="invalid-feedback">
|
||||
{{errors.grund.join(".")}}
|
||||
</div>
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="col-12 mb-3">
|
||||
|
||||
<div v-if="data.studierendenantrag_id">
|
||||
<a v-if="data.dms_id" target="_blank" :href="siteUrl + '/lehre/Antrag/Attachment/Show/' + data.dms_id"> {{$p.t('studierendenantrag', 'antrag_dateianhaenge')}} </a>
|
||||
<span v-else>{{$p.t('studierendenantrag', 'no_attachments')}}</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<label
|
||||
:for="'studierendenantrag-form-abmeldung-' + uuid + '-attachment'"
|
||||
class="form-label">
|
||||
{{$p.t('studierendenantrag', 'antrag_dateianhaenge')}}
|
||||
</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="file"
|
||||
ref="attachment"
|
||||
:id="'studierendenantrag-form-abmeldung-' + uuid + '-attachment'"
|
||||
name="attachment">
|
||||
</div>
|
||||
<form-input
|
||||
v-else
|
||||
ref="attachment"
|
||||
type="uploadfile"
|
||||
:label="$p.t('studierendenantrag', 'antrag_dateianhaenge')"
|
||||
v-model="attachment"
|
||||
name="attachment"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="col-12 text-end">
|
||||
<button
|
||||
@@ -349,13 +323,12 @@ export default {
|
||||
{{$p.t('studierendenantrag', 'btn_cancel')}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</core-form>
|
||||
<template v-slot:error="{errorMessage}">
|
||||
<div class="alert alert-danger m-0" role="alert">
|
||||
{{ errorMessage }}
|
||||
</div>
|
||||
</template>
|
||||
</core-fetch-cmpt>
|
||||
</div>
|
||||
`
|
||||
</div>`
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import {CoreFetchCmpt} from '../../Fetch.js';
|
||||
import VueDatepicker from '../../vueDatepicker.js.php';
|
||||
import CoreForm from '../../Form/Form.js';
|
||||
import FormValidation from '../../Form/Validation.js';
|
||||
|
||||
var _uuid = 0;
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CoreFetchCmpt,
|
||||
VueDatepicker
|
||||
CoreForm,
|
||||
FormValidation
|
||||
},
|
||||
emits: [
|
||||
'setInfos',
|
||||
@@ -22,12 +23,6 @@ export default {
|
||||
return {
|
||||
data: null,
|
||||
saving: false,
|
||||
errors: {
|
||||
grund: [],
|
||||
default: []
|
||||
},
|
||||
siteUrl: FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router,
|
||||
infos: []
|
||||
}
|
||||
},
|
||||
@@ -35,17 +30,16 @@ export default {
|
||||
statusSeverity() {
|
||||
switch (this.data.status)
|
||||
{
|
||||
case 'Erstellt': return 'info';
|
||||
case 'Offen':
|
||||
case 'Erstellt':
|
||||
case 'ErsteAufforderungVersandt': return 'info';
|
||||
case 'Genehmigt': return 'success';
|
||||
case 'Pause':
|
||||
case 'Verzichtet':
|
||||
case 'Abgemeldet': return 'danger';
|
||||
default: return 'info';
|
||||
default: return 'warning';
|
||||
}
|
||||
},
|
||||
loadUrl() {
|
||||
return '/components/Antrag/Wiederholung/getDetailsForNewAntrag/' +
|
||||
this.prestudentId;
|
||||
},
|
||||
datumPruefungFormatted() {
|
||||
if(!this.data.pruefungsdatum)
|
||||
return '';
|
||||
@@ -55,25 +49,27 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
load() {
|
||||
return axios.get(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
this.loadUrl
|
||||
).then(
|
||||
result => {
|
||||
this.data = result.data.retval;
|
||||
return this.$fhcApi.factory
|
||||
.studstatus.wiederholung.getDetails(
|
||||
this.prestudentId
|
||||
)
|
||||
.then(result => {
|
||||
this.data = result.data;
|
||||
if (!this.data.status || this.data.status == 'ErsteAufforderungVersandt' || this.data.status == 'ZweiteAufforderungVersandt') {
|
||||
this.data.status = 'Offen';
|
||||
this.data.statustyp = this.$p.t('studierendenantrag', 'status_open');
|
||||
}
|
||||
this.$emit('update:status', this.data.status);
|
||||
const msg = (this.data.status == 'Pause' && this.data.status_insertvon == "Studienabbruch") ? Vue.computed(() => {
|
||||
let status = this.$p.t('studierendenantrag/status_stop');
|
||||
return this.$p.t('studierendenantrag', 'status_x', {status});
|
||||
}) : Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp}));
|
||||
this.$emit("setStatus", {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp})),
|
||||
msg,
|
||||
severity: this.statusSeverity
|
||||
});
|
||||
return result;
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
createAntrag() {
|
||||
this.createAntragWithStatus(true);
|
||||
@@ -82,7 +78,7 @@ export default {
|
||||
this.createAntragWithStatus(false);
|
||||
},
|
||||
createAntragWithStatus(repeat) {
|
||||
let func = repeat ? 'createAntrag' : 'cancelAntrag';
|
||||
let func = repeat ? 'create' : 'cancel';
|
||||
let nextState = repeat ? 'Erstellt' : 'Verzichtet';
|
||||
|
||||
this.$emit('setStatus', {
|
||||
@@ -90,54 +86,36 @@ export default {
|
||||
severity: 'warning'
|
||||
});
|
||||
this.saving = true;
|
||||
for(var k in this.errors)
|
||||
this.errors[k] = [];
|
||||
|
||||
axios.post(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Wiederholung/' + func + '/',
|
||||
{
|
||||
prestudent_id: this.data.prestudent_id,
|
||||
studiensemester: this.data.studiensemester_kurzbz
|
||||
}
|
||||
).then(
|
||||
result => {
|
||||
if (result.data.error)
|
||||
{
|
||||
for (var k in result.data.retval)
|
||||
{
|
||||
if (this.errors[k] !== undefined)
|
||||
this.errors[k].push(result.data.retval[k]);
|
||||
else
|
||||
this.errors.default.push(result.data.retval[k]);
|
||||
}
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_error')})),
|
||||
severity: 'danger'
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
if (result.data.retval === true)
|
||||
document.location += "";
|
||||
this.data = result.data.retval;
|
||||
if (!this.data.status)
|
||||
this.data.status = nextState;
|
||||
this.$emit('update:status', this.data.status);
|
||||
this.$emit("setStatus", {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp})),
|
||||
severity: this.statusSeverity
|
||||
});
|
||||
}
|
||||
this.$refs.form.factory
|
||||
.studstatus.wiederholung[func](
|
||||
this.data.prestudent_id,
|
||||
this.data.studiensemester_kurzbz
|
||||
)
|
||||
.then(result => {
|
||||
if (result.data === true)
|
||||
document.location += "";
|
||||
|
||||
this.data = result.data;
|
||||
if (!this.data.status)
|
||||
this.data.status = nextState;
|
||||
this.$emit('update:status', this.data.status);
|
||||
this.$emit("setStatus", {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.data.statustyp})),
|
||||
severity: this.statusSeverity
|
||||
});
|
||||
this.saving = false;
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(error => {
|
||||
this.$emit('setStatus', {
|
||||
msg: Vue.computed(() => this.$p.t('studierendenantrag', 'status_x', {status: this.$p.t('studierendenantrag', 'status_error')})),
|
||||
severity: 'danger'
|
||||
});
|
||||
this.saving = false;
|
||||
this.$fhcAlert.handleSystemError(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.uuid = _uuid++;
|
||||
},
|
||||
mounted() {
|
||||
this.infos = [...Array(5).keys()].map(n => ({
|
||||
body: Vue.computed(() => this.$p.t('studierendenantrag', 'infotext_Wiederholung_' + n))
|
||||
@@ -147,10 +125,9 @@ export default {
|
||||
template: `
|
||||
<div class="studierendenantrag-form-wiederholung">
|
||||
<core-fetch-cmpt :api-function="load">
|
||||
<div class="row">
|
||||
<core-form ref="form" class="row">
|
||||
<div class="col-12">
|
||||
<div v-for="error in errors.default" class="alert alert-danger" role="alert" v-html="error">
|
||||
</div>
|
||||
<form-validation></form-validation>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>{{$p.t('lehre', 'studiengang')}}</th>
|
||||
@@ -199,7 +176,7 @@ export default {
|
||||
{{$p.t('studierendenantrag/antrag_Wiederholung_button_no')}}
|
||||
</button>-->
|
||||
</div>
|
||||
</div>
|
||||
</core-form>
|
||||
<template v-slot:error="{errorMessage}">
|
||||
<div class="alert alert-danger m-0" role="alert">
|
||||
{{ errorMessage }}
|
||||
|
||||
@@ -39,15 +39,10 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
loadFilter() {
|
||||
axios.get(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Leitung/getActiveStgs'
|
||||
).then(result => {
|
||||
this.stgs = result.data.retval;
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
this.$fhcApi.factory
|
||||
.studstatus.leitung.getStgs()
|
||||
.then(result => this.stgs = result.data)
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
changeFilter(filter) {
|
||||
this.filter = filter || undefined;
|
||||
@@ -103,21 +98,9 @@ export default {
|
||||
}
|
||||
} else {
|
||||
this.$refs.loader.show();
|
||||
axios
|
||||
.all(
|
||||
oks.map(
|
||||
antrag => axios.post(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Leitung/approve' + antrag.typ,
|
||||
{
|
||||
studierendenantrag_id: antrag.studierendenantrag_id
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
.then(this.showValidation)
|
||||
.catch(this.showError);
|
||||
this.$fhcApi.factory
|
||||
.studstatus.leitung.approve(oks)
|
||||
.then(this.showResults);
|
||||
}
|
||||
},
|
||||
actionReject(evt, gruende) {
|
||||
@@ -147,61 +130,38 @@ export default {
|
||||
.catch(() => {});
|
||||
} else {
|
||||
this.$refs.loader.show();
|
||||
axios
|
||||
.all(
|
||||
gruende.map(
|
||||
antrag => axios.post(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Leitung/reject' + antrag.typ,
|
||||
{
|
||||
studierendenantrag_id: antrag.studierendenantrag_id,
|
||||
grund: antrag.grund
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
.then(this.showValidation)
|
||||
.catch(this.showError);
|
||||
this.$fhcApi.factory
|
||||
.studstatus.leitung.reject(gruende)
|
||||
.then(this.showResults);
|
||||
}
|
||||
},
|
||||
actionReopen(evt) {
|
||||
var antraege = evt || this.selectedData;
|
||||
this.$refs.loader.show();
|
||||
axios
|
||||
.all(
|
||||
antraege.map(
|
||||
antrag => axios.post(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Leitung/reopenAntrag/',
|
||||
{
|
||||
studierendenantrag_id: antrag.studierendenantrag_id
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
.then(this.showValidation)
|
||||
.catch(this.showError);
|
||||
this.$fhcApi.factory
|
||||
.studstatus.leitung.reopen(gruende)
|
||||
.then(this.showResults);
|
||||
},
|
||||
actionPause(evt) {
|
||||
var antraege = evt || this.selectedData;
|
||||
this.$refs.loader.show();
|
||||
this.$fhcApi.factory
|
||||
.studstatus.leitung.pause(antraege)
|
||||
.then(this.showResults);
|
||||
},
|
||||
actionUnpause(evt) {
|
||||
var antraege = evt || this.selectedData;
|
||||
this.$refs.loader.show();
|
||||
this.$fhcApi.factory
|
||||
.studstatus.leitung.unpause(antraege)
|
||||
.then(this.showResults);
|
||||
},
|
||||
actionObject(evt) {
|
||||
var antraege = evt || this.selectedData;
|
||||
this.$refs.loader.show();
|
||||
axios
|
||||
.all(
|
||||
antraege.map(
|
||||
antrag => axios.post(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Leitung/objectAntrag/',
|
||||
{
|
||||
studierendenantrag_id: antrag.studierendenantrag_id
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
.then(this.showValidation)
|
||||
.catch(this.showError);
|
||||
this.$fhcApi.factory
|
||||
.studstatus.leitung.object(antraege)
|
||||
.then(this.showResults);
|
||||
},
|
||||
actionoObjectionDeny(evt, gruende) {
|
||||
var antraege = evt || this.selectedData;
|
||||
@@ -229,84 +189,31 @@ export default {
|
||||
.catch(() => {});
|
||||
} else {
|
||||
this.$refs.loader.show();
|
||||
axios
|
||||
.all(
|
||||
gruende.map(
|
||||
antrag => axios.post(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Leitung/objectionDeny/',
|
||||
{
|
||||
studierendenantrag_id: antrag.studierendenantrag_id,
|
||||
grund: antrag.grund
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
.then(this.showValidation)
|
||||
.catch(this.showError);
|
||||
this.$fhcApi.factory
|
||||
.studstatus.leitung.denyObjection(gruende)
|
||||
.then(this.showResults);
|
||||
}
|
||||
},
|
||||
actionObjectionApprove(evt, gruende) {
|
||||
var antraege = evt || this.selectedData;
|
||||
this.$refs.loader.show();
|
||||
axios
|
||||
.all(
|
||||
antraege.map(
|
||||
antrag => axios.post(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Leitung/objectionApprove/',
|
||||
{
|
||||
studierendenantrag_id: antrag.studierendenantrag_id
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
.then(this.showValidation)
|
||||
.catch(this.showError);
|
||||
this.$fhcApi.factory
|
||||
.studstatus.leitung.approveObjection(antraege)
|
||||
.then(this.showResults);
|
||||
},
|
||||
actionCancel(evt) {
|
||||
var antraege = evt || this.selectedData;
|
||||
this.$refs.loader.show();
|
||||
axios
|
||||
.all(
|
||||
antraege.map(
|
||||
antrag => axios.post(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Abmeldung/cancelAntrag/',
|
||||
{
|
||||
antrag_id: antrag.studierendenantrag_id
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
.then(this.showValidation)
|
||||
.catch(this.showError);
|
||||
this.$fhcApi.factory
|
||||
.studstatus.abmeldung.cancel(antraege)
|
||||
.then(this.showResults);
|
||||
},
|
||||
showValidation(results) {
|
||||
var errors = results.filter(res => res.data.error);
|
||||
showResults(results) {
|
||||
let fulfilled = results.filter(res => res.status == 'fulfilled');
|
||||
this.$refs.loader.hide();
|
||||
if (errors.length) {
|
||||
let errorMsg = errors.map(
|
||||
error =>
|
||||
'Antrag ' +
|
||||
JSON.parse(error.config.data).studierendenantrag_id +
|
||||
'\n' +
|
||||
Object.values(error.data.retval).join('\n')
|
||||
).join('\n');
|
||||
|
||||
BsAlert.popup(errorMsg, {dialogClass: 'alert alert-danger'});
|
||||
}
|
||||
this.reload();
|
||||
},
|
||||
showError(error) {
|
||||
this.$refs.loader.hide();
|
||||
let msg = error.response.data;
|
||||
if (msg.replace(/^\s+/, '').substr(0, 9) == '<!DOCTYPE' || msg.replace(/^\s+/, '').substr(0, 4).toLowerCase() == '<div')
|
||||
msg = error.message;
|
||||
BsAlert.popup(msg, {dialogClass: 'alert alert-danger'});
|
||||
//fulfilled.forEach(a => this.$fhcAlert.alertDefault('success', '#' + a.value.data, 'Approved, ...'));
|
||||
if (fulfilled.length)
|
||||
this.reload();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -347,6 +254,8 @@ export default {
|
||||
@action:objectionDeny="actionoObjectionDeny"
|
||||
@action:objectionApprove="actionObjectionApprove"
|
||||
@action:cancel="actionCancel"
|
||||
@action:pause="actionPause"
|
||||
@action:unpause="actionUnpause"
|
||||
@reload="reload"
|
||||
>
|
||||
</leitung-table>
|
||||
|
||||
@@ -35,28 +35,32 @@ export default {
|
||||
});
|
||||
},
|
||||
loadData(evt) {
|
||||
if (this.abortController)
|
||||
this.abortController.abort();
|
||||
if( evt.query.length < 2 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.abortController instanceof AbortController
|
||||
&& this.abortController.signal.aborted === false)
|
||||
{
|
||||
this.abortController.abort();
|
||||
}
|
||||
this.abortController = new AbortController();
|
||||
|
||||
axios.post(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Abmeldung/getStudiengaengeAssistenz/',
|
||||
evt,
|
||||
{
|
||||
signal: this.abortController.signal
|
||||
}
|
||||
).then(
|
||||
result => {
|
||||
if (result.data.error) {
|
||||
BsAlert.popup(result.data.retval, {dialogClass: 'alert alert-danger'});
|
||||
} else {
|
||||
this.data = result.data.retval;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
).catch(() => {});
|
||||
this.$fhcApi.factory
|
||||
.studstatus.leitung.getPrestudents(evt.query, this.abortController.signal)
|
||||
.then(result => {
|
||||
this.data = result.data;
|
||||
this.abortController = null;
|
||||
})
|
||||
.catch(error => {
|
||||
if (this.abortController instanceof AbortController
|
||||
&& this.abortController.signal.aborted === false)
|
||||
{
|
||||
this.abortController.abort();
|
||||
}
|
||||
this.$fhcAlert.handleSystemError(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
template: `
|
||||
@@ -79,15 +83,20 @@ export default {
|
||||
class="w-100"
|
||||
v-model="student"
|
||||
:suggestions="data"
|
||||
optionLabel = "name"
|
||||
option-label = "name"
|
||||
@complete="loadData"
|
||||
inputId="newAntragModalAutoComplete"
|
||||
input-id="newAntragModalAutoComplete"
|
||||
dropdown
|
||||
dropdown-mode="current"
|
||||
>
|
||||
<template #option="slotProps">
|
||||
<div :title="slotProps.option.prestudent_id">
|
||||
{{slotProps.option.name}}
|
||||
{{slotProps.option.name}}
|
||||
</div>
|
||||
</template>
|
||||
<template #empty>
|
||||
<div class="text-muted px-3 py-2">
|
||||
{{ $p.t('ui/keineEintraegeGefunden') }}
|
||||
</div>
|
||||
</template>
|
||||
</auto-complete>
|
||||
|
||||
@@ -36,21 +36,17 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
setlvs(param) {
|
||||
if(param.error) {
|
||||
this.$refs.fetchCompt.error = true;
|
||||
this.$refs.fetchCompt.errorMessage = param.retval;
|
||||
} else {
|
||||
this.repeat_last = !!param.retval.repeat_last;
|
||||
if (this.repeat_last) {
|
||||
delete param.retval.repeat_last;
|
||||
}
|
||||
this.lvs = param.retval;
|
||||
this.repeat_last = !!param.repeat_last;
|
||||
if (this.repeat_last) {
|
||||
delete param.repeat_last;
|
||||
}
|
||||
this.lvs = param;
|
||||
},
|
||||
loadlvs() {
|
||||
if (!this.antragId)
|
||||
return new Promise(() => {});
|
||||
return axios.get(FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + '/components/Antrag/Wiederholung/getLvs/' + this.antragId);
|
||||
return this.$fhcApi.factory
|
||||
.studstatus.wiederholung.getLvs(this.antragId);
|
||||
},
|
||||
submit(result) {
|
||||
this.result = [result, this.check];
|
||||
|
||||
@@ -25,13 +25,12 @@ export default {
|
||||
'action:object',
|
||||
'action:objectionDeny',
|
||||
'action:objectionApprove',
|
||||
'action:cancel'
|
||||
'action:cancel',
|
||||
'action:pause',
|
||||
'action:unpause'
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
ajaxUrl: FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Leitung/getAntraege/',
|
||||
table: null,
|
||||
lastHistoryClickedId: null,
|
||||
historyData: [],
|
||||
@@ -40,7 +39,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
reload(stg) {
|
||||
this.table.setData(this.ajaxUrl + (stg || ''));
|
||||
this.table.setData('/' + (stg || ''));
|
||||
},
|
||||
download() {
|
||||
this.table.download("csv", "data.csv", {
|
||||
@@ -51,14 +50,35 @@ export default {
|
||||
getHistory() {
|
||||
if (this.lastHistoryClickedId === null)
|
||||
return null;
|
||||
return axios.get(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Leitung/getHistory/' +
|
||||
this.lastHistoryClickedId
|
||||
).then(res => {
|
||||
this.historyData = res.data.retval.sort((a, b) => a.insertamum > b.insertamum);
|
||||
});
|
||||
return this.$fhcApi.factory
|
||||
.studstatus.leitung.getHistory(this.lastHistoryClickedId)
|
||||
.then(res => {
|
||||
this.historyData = res.data.sort((a, b) => a.insertamum > b.insertamum);
|
||||
})
|
||||
.catch(this.$fhcApi.handleSystemError);
|
||||
},
|
||||
getHistoryStatus(data, index) {
|
||||
if (data.insertvon == 'Studienabbruch')
|
||||
return this.$p.t('studierendenantrag/status_stop');
|
||||
if (index > 0 && this.historyData[index-1].studierendenantrag_statustyp_kurzbz == 'Pause') {
|
||||
if (index > 1 && this.historyData[index-2].studierendenantrag_statustyp_kurzbz != 'Pause') {
|
||||
// NOTE(chris): this is a AbmeldungStgl Pause right after a manual Pause
|
||||
if (data.studierendenantrag_statustyp_kurzbz == 'Pause')
|
||||
return data.typ;
|
||||
// NOTE(chris): this is a manual Pause resumed
|
||||
else
|
||||
return data.typ + ' (' + this.$p.t('studierendenantrag/status_unpaused') + ')';
|
||||
}
|
||||
// NOTE(chris): a series of pause stati always starts with a manual and alternate afterwards
|
||||
let i = 2;
|
||||
while (index-i > 0 && this.historyData[index-i].studierendenantrag_statustyp_kurzbz == 'Pause') i++;
|
||||
if (data.studierendenantrag_statustyp_kurzbz == 'Pause')
|
||||
i++;
|
||||
return i%2
|
||||
? data.typ
|
||||
: data.typ + ' (' + this.$p.t('studierendenantrag/status_unpaused') + ')';
|
||||
}
|
||||
return data.typ;
|
||||
},
|
||||
showHistoryGrund(grund) {
|
||||
this.$refs.modalGrund.$el.addEventListener(
|
||||
@@ -89,9 +109,10 @@ export default {
|
||||
this.table = new Tabulator(this.$refs.table, {
|
||||
placeholder:"Keine zu bearbeitenden Datensätze",
|
||||
movableColumns: true,
|
||||
maxHeight: '50vh',
|
||||
height: '65vh',
|
||||
layout: "fitDataFill",
|
||||
ajaxURL: this.ajaxUrl + (this.filter || ''),
|
||||
ajaxURL: '/' + (this.filter || ''),
|
||||
ajaxRequestFunc: this.$fhcApi.factory.studstatus.leitung.getAntraege,
|
||||
persistence: { // NOTE(chris): do not store column titles
|
||||
sort: true, //persist column sorting
|
||||
filter: true, //persist filters
|
||||
@@ -153,9 +174,13 @@ export default {
|
||||
autocomplete: true,
|
||||
},
|
||||
formatter: (cell, formatterParams, onRendered) => {
|
||||
let data = cell.getData();
|
||||
let status = cell.getValue();
|
||||
if (data.status_insertvon == 'Studienabbruch' && data.status == 'Pause')
|
||||
status = this.$p.t('studierendenantrag/status_stop');
|
||||
let link = document.createElement('a');
|
||||
link.href = "#";
|
||||
link.innerHTML = cell.getValue();
|
||||
link.innerHTML = status;
|
||||
link.addEventListener('click', e => {
|
||||
e.preventDefault();
|
||||
this.lastHistoryClickedId = cell.getData().studierendenantrag_id;
|
||||
@@ -176,7 +201,7 @@ export default {
|
||||
}, {
|
||||
field: 'name',
|
||||
title: this.$p.t('global', 'name'),
|
||||
mutator: (value, data) => (data.vorname + ' ' + data.nachname).replace(/^\s*(.*)\s*$/, '$1'),
|
||||
mutator: (value, data) => (data.nachname + ' ' + data.vorname).replace(/^\s*(.*)\s*$/, '$1'),
|
||||
headerFilter: 'input'
|
||||
}, {
|
||||
field: 'datum',
|
||||
@@ -234,7 +259,22 @@ export default {
|
||||
|
||||
container.className = "d-flex gap-2";
|
||||
|
||||
if ((data.typ == 'Abmeldung' || data.typ == 'AbmeldungStgl' || data.typ == 'Unterbrechung') && (data.status == 'Genehmigt' || data.status == 'Beeinsprucht' || data.status == 'EinspruchAbgelehnt' || data.status == 'EmailVersandt')) {
|
||||
let allowed_status_for_download = [];
|
||||
switch (data.typ) {
|
||||
case 'Abmeldung':
|
||||
allowed_status_for_download = ['Genehmigt'];
|
||||
break;
|
||||
case 'AbmeldungStgl':
|
||||
allowed_status_for_download = ['Genehmigt', 'Beeinsprucht', 'EinspruchAbgelehnt', 'Abgemeldet'];
|
||||
break;
|
||||
case 'Unterbrechung':
|
||||
allowed_status_for_download = ['Genehmigt', 'EmailVersandt'];
|
||||
break;
|
||||
case 'Wiederholung':
|
||||
allowed_status_for_download = ['Abgemeldet'];
|
||||
break;
|
||||
}
|
||||
if (allowed_status_for_download.includes(data.status)) {
|
||||
// NOTE(chris): Download PDF
|
||||
let button = document.createElement('a');
|
||||
// NOTE(chris): phrasen in attribues don't work if they are not preloaded
|
||||
@@ -246,6 +286,56 @@ export default {
|
||||
'content/pdfExport.php?xml=Antrag' + data.typ + '.xml.php&xsl=Antrag' + data.typ + '&id=' + data.studierendenantrag_id + '&output=pdf';
|
||||
container.append(button);
|
||||
}
|
||||
|
||||
if (data.typ == 'Wiederholung' && (data.status == 'ErsteAufforderungVersandt' || data.status == 'ZweiteAufforderungVersandt')) {
|
||||
// NOTE(chris): Pause
|
||||
let button = document.createElement('button');
|
||||
let icon = document.createElement('i');
|
||||
let span = document.createElement('span');
|
||||
|
||||
icon.className = "fa-solid fa-pause";
|
||||
icon.setAttribute('aria-hidden', true);
|
||||
icon.setAttribute('title', this.$p.t('studierendenantrag', 'btn_pause'));
|
||||
|
||||
span.className = "fa-sr-only";
|
||||
span.append(this.$p.t('studierendenantrag', 'btn_pause'));
|
||||
|
||||
button.append(icon);
|
||||
button.append(span);
|
||||
button.className = "btn btn-outline-secondary";
|
||||
button.addEventListener('click', () => this.$emit('action:pause', [cell.getData()]));
|
||||
container.append(button);
|
||||
}
|
||||
|
||||
let canUnpause = data.status == 'Pause' && !['AbmeldungStgl', 'Studienabbruch'].includes(data.status_insertvon);
|
||||
if (!canUnpause && data.status == 'Pause' && data.status_insertvon == 'AbmeldungStgl') {
|
||||
canUnpause = cell.getTable().getData().filter(row =>
|
||||
row.prestudent_id == data.prestudent_id
|
||||
&& row.typ == 'AbmeldungStgl'
|
||||
&& row.status == 'Zurueckgezogen'
|
||||
&& row.status_insertamum == data.status_insertamum
|
||||
).length;
|
||||
}
|
||||
if (canUnpause) {
|
||||
// NOTE(chris): Unpause
|
||||
let button = document.createElement('button');
|
||||
let icon = document.createElement('i');
|
||||
let span = document.createElement('span');
|
||||
|
||||
icon.className = "fa-solid fa-play";
|
||||
icon.setAttribute('aria-hidden', true);
|
||||
icon.setAttribute('title', this.$p.t('studierendenantrag', 'btn_unpause'));
|
||||
|
||||
span.className = "fa-sr-only";
|
||||
span.append(this.$p.t('studierendenantrag', 'btn_unpause'));
|
||||
|
||||
button.append(icon);
|
||||
button.append(span);
|
||||
button.className = "btn btn-outline-secondary";
|
||||
button.addEventListener('click', () => this.$emit('action:unpause', [cell.getData()]));
|
||||
container.append(button);
|
||||
}
|
||||
|
||||
if (data.typ == 'AbmeldungStgl' && data.status == 'Genehmigt') {
|
||||
// NOTE(chris): Object
|
||||
let button = document.createElement('button');
|
||||
@@ -377,10 +467,10 @@ export default {
|
||||
<template #title>{{$p.t('studierendenantrag', 'title_history', {id: lastHistoryClickedId})}}</template>
|
||||
<core-fetch-cmpt ref="historyLoader" :api-function="getHistory">
|
||||
<table v-if="historyData.length" class="table">
|
||||
<tr v-for="status in historyData" :key="status.studierendenantrag_status_id">
|
||||
<tr v-for="(status, index) in historyData" :key="status.studierendenantrag_status_id">
|
||||
<td>{{(new Date(status.insertamum)).toLocaleString()}}</td>
|
||||
<td>{{status.insertvon}}</td>
|
||||
<td>{{status.typ}}</td>
|
||||
<td>{{getHistoryStatus(status, index)}}</td>
|
||||
<td>
|
||||
<a v-if="status.grund" href="#modal-grund" data-bs-toggle="modal" @click="showHistoryGrund(status.grund)">
|
||||
{{$p.t('studierendenantrag', 'antrag_grund')}}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user