diff --git a/application/controllers/api/frontend/v1/notiz/NotizPerson.php b/application/controllers/api/frontend/v1/notiz/NotizPerson.php
index 7f0645bc6..a047129d7 100644
--- a/application/controllers/api/frontend/v1/notiz/NotizPerson.php
+++ b/application/controllers/api/frontend/v1/notiz/NotizPerson.php
@@ -24,6 +24,7 @@ class NotizPerson extends Notiz_Controller
//Load Models
$this->load->model('person/Benutzer_model', 'BenutzerModel');
$this->load->model('crm/Student_model', 'StudentModel');
+ $this->load->model('crm/Prestudent_model', 'PrestudentModel');
//Permission checks for allowed Oes
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);
}
- $this->_checkIfBerechtigungForOneUidExists($person_id, $allowedStgs);
+ $this->_checkIfBerechtigungForOnePrestudentExists($person_id, $allowedStgs);
}
if ( $this->router->method == 'updateNotiz')
@@ -59,7 +60,7 @@ class NotizPerson extends Notiz_Controller
$person_id = current($data)->person_id;
$allowedStgs = $this->permissionlib->getSTG_isEntitledFor('assistenz') ?: [];
- $this->_checkIfBerechtigungForOneUidExists($person_id, $allowedStgs);
+ $this->_checkIfBerechtigungForOnePrestudentExists($person_id, $allowedStgs);
}
if ($this->router->method == 'deleteNotiz' )
@@ -78,7 +79,7 @@ class NotizPerson extends Notiz_Controller
}
$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
- private function _checkIfBerechtigungForOneUidExists($person_id, $allowedStgs)
+ private function _checkIfBerechtigungForOnePrestudentExists($person_id, $allowedStgs)
{
- //get all studentUids of person_id
- $result = $this->BenutzerModel->loadWhere(['person_id' => $person_id]);
+ $result = $this->PrestudentModel->loadWhere(['person_id' => $person_id]);
$data = $this->getDataOrTerminateWithError($result);
$checkarray = [];
foreach ($data as $item)
{
- //check if isStudent
- $result = $this->StudentModel->isStudent($item->uid);
-
- $isStudent = $this->getDataOrTerminateWithError($result);
- if($isStudent)
+ if(in_array($item->studiengang_kz, $allowedStgs))
{
- $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->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;
- }
+ $this->terminateWithError($this->p->t('ui', 'error_keineBerechtigungStg'), self::ERROR_TYPE_GENERAL);
}
}
diff --git a/content/student/studentdetailoverlay.xul.php b/content/student/studentdetailoverlay.xul.php
index 36740d209..c3bf8c191 100644
--- a/content/student/studentdetailoverlay.xul.php
+++ b/content/student/studentdetailoverlay.xul.php
@@ -798,6 +798,10 @@ echo '';
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#updatevon" />
+
+
@@ -823,6 +827,7 @@ echo '';
+
diff --git a/include/prestudent.class.php b/include/prestudent.class.php
index 7317572ba..7cff1da3b 100644
--- a/include/prestudent.class.php
+++ b/include/prestudent.class.php
@@ -705,6 +705,7 @@ class prestudent extends person
$rolle->studienplan_bezeichnung = $row->studienplan_bezeichnung;
$rolle->bestaetigtam = $row->bestaetigtam;
$rolle->bestaetigtvon = $row->bestaetigtvon;
+ $rolle->fgm = $row->fgm;
$rolle->anmerkung_status = $row->anmerkung;
$rolle->bewerbung_abgeschicktamum = $row->bewerbung_abgeschicktamum;
$rolle->rt_stufe = $row->rt_stufe;
diff --git a/public/js/components/Vertraege/Vertragsverwaltung.js b/public/js/components/Vertraege/Vertragsverwaltung.js
index a3e52261a..afde796b2 100644
--- a/public/js/components/Vertraege/Vertragsverwaltung.js
+++ b/public/js/components/Vertraege/Vertragsverwaltung.js
@@ -71,7 +71,6 @@ export default {
:mitarbeiter_uid="this.mitarbeiter_uid"
typeHeader="mitarbeiter"
:domain="config.domain"
- fotoEditable
@redirectToLeitung="handleSelection"
>
{{tile_MaUid}}
diff --git a/public/js/components/filter/Filter.js b/public/js/components/filter/Filter.js
index 7bfc1aebb..3f0edb672 100644
--- a/public/js/components/filter/Filter.js
+++ b/public/js/components/filter/Filter.js
@@ -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;
if (this.idField) {
@@ -358,7 +358,7 @@ export const CoreFilterCmpt = {
}
},
_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.setData(this.filteredData);
this._setHeaderFilter()
diff --git a/rdf/prestudentrolle.rdf.php b/rdf/prestudentrolle.rdf.php
index 0a6caf05c..1c64ba15d 100644
--- a/rdf/prestudentrolle.rdf.php
+++ b/rdf/prestudentrolle.rdf.php
@@ -143,6 +143,7 @@ foreach($ps->result as $row)
updatevon.']]>
+ fgm.']]>
';