mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-26 17:14:28 +00:00
Merge branch 'master' into feature-68598/Rollup_lets_try_it_again
This commit is contained in:
@@ -24,6 +24,7 @@ class NotizPerson extends Notiz_Controller
|
|||||||
//Load Models
|
//Load Models
|
||||||
$this->load->model('person/Benutzer_model', 'BenutzerModel');
|
$this->load->model('person/Benutzer_model', 'BenutzerModel');
|
||||||
$this->load->model('crm/Student_model', 'StudentModel');
|
$this->load->model('crm/Student_model', 'StudentModel');
|
||||||
|
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||||
|
|
||||||
//Permission checks for allowed Oes
|
//Permission checks for allowed Oes
|
||||||
if ($this->router->method == 'addNewNotiz')
|
if ($this->router->method == 'addNewNotiz')
|
||||||
@@ -38,7 +39,7 @@ class NotizPerson extends Notiz_Controller
|
|||||||
{
|
{
|
||||||
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Person ID']), self::ERROR_TYPE_GENERAL);
|
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Person ID']), self::ERROR_TYPE_GENERAL);
|
||||||
}
|
}
|
||||||
$this->_checkIfBerechtigungForOneUidExists($person_id, $allowedStgs);
|
$this->_checkIfBerechtigungForOnePrestudentExists($person_id, $allowedStgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $this->router->method == 'updateNotiz')
|
if ( $this->router->method == 'updateNotiz')
|
||||||
@@ -59,7 +60,7 @@ class NotizPerson extends Notiz_Controller
|
|||||||
$person_id = current($data)->person_id;
|
$person_id = current($data)->person_id;
|
||||||
|
|
||||||
$allowedStgs = $this->permissionlib->getSTG_isEntitledFor('assistenz') ?: [];
|
$allowedStgs = $this->permissionlib->getSTG_isEntitledFor('assistenz') ?: [];
|
||||||
$this->_checkIfBerechtigungForOneUidExists($person_id, $allowedStgs);
|
$this->_checkIfBerechtigungForOnePrestudentExists($person_id, $allowedStgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->router->method == 'deleteNotiz' )
|
if ($this->router->method == 'deleteNotiz' )
|
||||||
@@ -78,7 +79,7 @@ class NotizPerson extends Notiz_Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
$allowedStgs = $this->permissionlib->getSTG_isEntitledFor('assistenz') ?: [];
|
$allowedStgs = $this->permissionlib->getSTG_isEntitledFor('assistenz') ?: [];
|
||||||
$this->_checkIfBerechtigungForOneUidExists($person_id, $allowedStgs);
|
$this->_checkIfBerechtigungForOnePrestudentExists($person_id, $allowedStgs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,44 +100,20 @@ class NotizPerson extends Notiz_Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
//stv: if person has permission of one studiengang of person -> permission to add/update/delete Note
|
//stv: if person has permission of one studiengang of person -> permission to add/update/delete Note
|
||||||
private function _checkIfBerechtigungForOneUidExists($person_id, $allowedStgs)
|
private function _checkIfBerechtigungForOnePrestudentExists($person_id, $allowedStgs)
|
||||||
{
|
{
|
||||||
//get all studentUids of person_id
|
$result = $this->PrestudentModel->loadWhere(['person_id' => $person_id]);
|
||||||
$result = $this->BenutzerModel->loadWhere(['person_id' => $person_id]);
|
|
||||||
$data = $this->getDataOrTerminateWithError($result);
|
$data = $this->getDataOrTerminateWithError($result);
|
||||||
|
|
||||||
$checkarray = [];
|
$checkarray = [];
|
||||||
foreach ($data as $item)
|
foreach ($data as $item)
|
||||||
{
|
{
|
||||||
//check if isStudent
|
if(in_array($item->studiengang_kz, $allowedStgs))
|
||||||
$result = $this->StudentModel->isStudent($item->uid);
|
|
||||||
|
|
||||||
$isStudent = $this->getDataOrTerminateWithError($result);
|
|
||||||
if($isStudent)
|
|
||||||
{
|
{
|
||||||
$checkarray[] = $this->_checkAllowedStgsFromUid($item->uid, $allowedStgs);
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!in_array(1, $checkarray))
|
|
||||||
return $this->terminateWithError($this->p->t('ui', 'error_keineBerechtigungStg'), self::ERROR_TYPE_GENERAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
private function _checkAllowedStgsFromUid($student_uid, $allowedStgs)
|
$this->terminateWithError($this->p->t('ui', 'error_keineBerechtigungStg'), self::ERROR_TYPE_GENERAL);
|
||||||
{
|
|
||||||
$this->load->model('crm/Student_model', 'StudentModel');
|
|
||||||
$result = $this->StudentModel->loadWhere(['student_uid' => $student_uid]);
|
|
||||||
|
|
||||||
$data = $this->getDataOrTerminateWithError($result);
|
|
||||||
$studiengang_kz = current($data)->studiengang_kz;
|
|
||||||
|
|
||||||
if (!in_array($studiengang_kz, $allowedStgs))
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -798,6 +798,10 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
|||||||
class="sortDirectionIndicator"
|
class="sortDirectionIndicator"
|
||||||
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#updatevon" />
|
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#updatevon" />
|
||||||
<splitter class="tree-splitter"/>
|
<splitter class="tree-splitter"/>
|
||||||
|
<treecol id="student-prestudent-tree-rolle-fgm" label="FGM" flex="1" hidden="true" persist="hidden, width, ordinal"
|
||||||
|
class="sortDirectionIndicator"
|
||||||
|
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#fgm" />
|
||||||
|
<splitter class="tree-splitter"/>
|
||||||
</treecols>
|
</treecols>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -823,6 +827,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
|||||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/prestudentrolle/rdf#aktiv rdf:http://www.technikum-wien.at/prestudentrolle/rdf#stichtagsaktiv" label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#insertvon"/>
|
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/prestudentrolle/rdf#aktiv rdf:http://www.technikum-wien.at/prestudentrolle/rdf#stichtagsaktiv" label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#insertvon"/>
|
||||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/prestudentrolle/rdf#aktiv rdf:http://www.technikum-wien.at/prestudentrolle/rdf#stichtagsaktiv" label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#updateamum"/>
|
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/prestudentrolle/rdf#aktiv rdf:http://www.technikum-wien.at/prestudentrolle/rdf#stichtagsaktiv" label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#updateamum"/>
|
||||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/prestudentrolle/rdf#aktiv rdf:http://www.technikum-wien.at/prestudentrolle/rdf#stichtagsaktiv" label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#updatevon"/>
|
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/prestudentrolle/rdf#aktiv rdf:http://www.technikum-wien.at/prestudentrolle/rdf#stichtagsaktiv" label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#updatevon"/>
|
||||||
|
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/prestudentrolle/rdf#aktiv rdf:http://www.technikum-wien.at/prestudentrolle/rdf#stichtagsaktiv" label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#fgm"/>
|
||||||
</treerow>
|
</treerow>
|
||||||
</treeitem>
|
</treeitem>
|
||||||
</treechildren>
|
</treechildren>
|
||||||
|
|||||||
@@ -705,6 +705,7 @@ class prestudent extends person
|
|||||||
$rolle->studienplan_bezeichnung = $row->studienplan_bezeichnung;
|
$rolle->studienplan_bezeichnung = $row->studienplan_bezeichnung;
|
||||||
$rolle->bestaetigtam = $row->bestaetigtam;
|
$rolle->bestaetigtam = $row->bestaetigtam;
|
||||||
$rolle->bestaetigtvon = $row->bestaetigtvon;
|
$rolle->bestaetigtvon = $row->bestaetigtvon;
|
||||||
|
$rolle->fgm = $row->fgm;
|
||||||
$rolle->anmerkung_status = $row->anmerkung;
|
$rolle->anmerkung_status = $row->anmerkung;
|
||||||
$rolle->bewerbung_abgeschicktamum = $row->bewerbung_abgeschicktamum;
|
$rolle->bewerbung_abgeschicktamum = $row->bewerbung_abgeschicktamum;
|
||||||
$rolle->rt_stufe = $row->rt_stufe;
|
$rolle->rt_stufe = $row->rt_stufe;
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ export default {
|
|||||||
:mitarbeiter_uid="this.mitarbeiter_uid"
|
:mitarbeiter_uid="this.mitarbeiter_uid"
|
||||||
typeHeader="mitarbeiter"
|
typeHeader="mitarbeiter"
|
||||||
:domain="config.domain"
|
:domain="config.domain"
|
||||||
fotoEditable
|
|
||||||
@redirectToLeitung="handleSelection"
|
@redirectToLeitung="handleSelection"
|
||||||
>
|
>
|
||||||
<template #uid>{{tile_MaUid}}</template>
|
<template #uid>{{tile_MaUid}}</template>
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ export const CoreFilterCmpt = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tabulatorOptions.selectable || (tabulatorOptions.columns && tabulatorOptions.columns.filter(el => el.formatter == 'rowSelection').length))
|
if (tabulatorOptions.selectable || tabulatorOptions.selectableRows || (tabulatorOptions.columns && tabulatorOptions.columns.filter(el => el.formatter == 'rowSelection').length))
|
||||||
this.tabulatorHasSelector = true;
|
this.tabulatorHasSelector = true;
|
||||||
|
|
||||||
if (this.idField) {
|
if (this.idField) {
|
||||||
@@ -358,7 +358,7 @@ export const CoreFilterCmpt = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
_updateTabulator() {
|
_updateTabulator() {
|
||||||
this.tabulatorHasSelector = this.tabulatorOptions.selectable || this.filteredColumns.filter(el => el.formatter == 'rowSelection').length;
|
this.tabulatorHasSelector = this.tabulatorOptions.selectable || this.tabulatorOptions.selectableRows || this.filteredColumns.filter(el => el.formatter == 'rowSelection').length;
|
||||||
this.tabulator.setColumns(this.filteredColumns);
|
this.tabulator.setColumns(this.filteredColumns);
|
||||||
this.tabulator.setData(this.filteredData);
|
this.tabulator.setData(this.filteredData);
|
||||||
this._setHeaderFilter()
|
this._setHeaderFilter()
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ foreach($ps->result as $row)
|
|||||||
<ROLLE:updatevon><![CDATA['.$row->updatevon.']]></ROLLE:updatevon>
|
<ROLLE:updatevon><![CDATA['.$row->updatevon.']]></ROLLE:updatevon>
|
||||||
<ROLLE:stichtagsaktiv><![CDATA['.$stichtagsaktiv.']]></ROLLE:stichtagsaktiv>
|
<ROLLE:stichtagsaktiv><![CDATA['.$stichtagsaktiv.']]></ROLLE:stichtagsaktiv>
|
||||||
<ROLLE:aktiv><![CDATA['.$aktiv.']]></ROLLE:aktiv>
|
<ROLLE:aktiv><![CDATA['.$aktiv.']]></ROLLE:aktiv>
|
||||||
|
<ROLLE:fgm><![CDATA['.$row->fgm.']]></ROLLE:fgm>
|
||||||
</RDF:Description>
|
</RDF:Description>
|
||||||
</RDF:li>
|
</RDF:li>
|
||||||
';
|
';
|
||||||
|
|||||||
Reference in New Issue
Block a user