mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-12 09:39:28 +00:00
Merge remote-tracking branch 'origin/feature-25562/PV21_Datenbankstruktur_fuer_Vertraege_und_Gehaelter' into feature-25562/PV21_Datenbankstruktur_fuer_Vertraege_und_Gehaelter
This commit is contained in:
@@ -123,6 +123,8 @@ class AntragLib
|
||||
*/
|
||||
public function approveAbmeldung($studierendenantrag_ids, $insertvon)
|
||||
{
|
||||
$this->_ci->load->model('crm/Student_model', 'StudentModel');
|
||||
|
||||
$errors = [];
|
||||
foreach ($studierendenantrag_ids as $studierendenantrag_id) {
|
||||
$result = $this->_ci->StudierendenantragModel->load($studierendenantrag_id);
|
||||
@@ -251,10 +253,9 @@ class AntragLib
|
||||
$vorname = '';
|
||||
$nachname = $name;
|
||||
}
|
||||
$res = $this->_ci->KontaktModel->getZustellKontakt($prestudent->person_id, ['email']);
|
||||
$res = $this->_ci->StudentModel->loadWhere(['prestudent_id' => $antrag->prestudent_id]);
|
||||
if (hasData($res)) {
|
||||
$kontakt = current(getData($res));
|
||||
$email = $kontakt->kontakt;
|
||||
$email = $this->_ci->StudentModel->getEmailFH(current(getData($res))->student_uid);
|
||||
$vorlage = $antrag->typ == Studierendenantrag_model::TYP_ABMELDUNG ? 'Student' : 'Stgl';
|
||||
|
||||
// NOTE(chris): Sancho mail
|
||||
@@ -335,6 +336,8 @@ class AntragLib
|
||||
$res = $this->_ci->PrestudentModel->load($antrag->prestudent_id);
|
||||
|
||||
if (hasData($res)) {
|
||||
$this->_ci->load->model('crm/Student_model', 'StudentModel');
|
||||
|
||||
$prestudent = current(getData($res));
|
||||
$res = $this->_ci->PersonModel->load($prestudent->person_id);
|
||||
if (hasData($res)) {
|
||||
@@ -345,10 +348,10 @@ class AntragLib
|
||||
} else {
|
||||
$name = $this->_ci->p->t('person', 'studentIn');
|
||||
}
|
||||
$res = $this->_ci->KontaktModel->getZustellKontakt($prestudent->person_id, ['email']);
|
||||
|
||||
$res = $this->_ci->StudentModel->loadWhere(['prestudent_id' => $antrag->prestudent_id]);
|
||||
if (hasData($res)) {
|
||||
$kontakt = current(getData($res));
|
||||
$email = $kontakt->kontakt;
|
||||
$email = $this->_ci->StudentModel->getEmailFH(current(getData($res))->student_uid);
|
||||
|
||||
$res = $this->_ci->StudierendenantragModel->getStgAndSem($antrag->studierendenantrag_id);
|
||||
$stg = '';
|
||||
@@ -432,6 +435,7 @@ class AntragLib
|
||||
public function approveUnterbrechung($studierendenantrag_ids, $insertvon)
|
||||
{
|
||||
$this->_ci->load->model('person/Kontakt_model', 'KontaktModel');
|
||||
$this->_ci->load->model('crm/Student_model', 'StudentModel');
|
||||
|
||||
$errors = [];
|
||||
|
||||
@@ -609,6 +613,7 @@ class AntragLib
|
||||
public function rejectUnterbrechung($studierendenantrag_ids, $insertvon, $grund)
|
||||
{
|
||||
$this->_ci->load->model('person/Kontakt_model', 'KontaktModel');
|
||||
$this->_ci->load->model('crm/Student_model', 'StudentModel');
|
||||
|
||||
$errors = [];
|
||||
|
||||
@@ -755,7 +760,7 @@ class AntragLib
|
||||
}
|
||||
}
|
||||
|
||||
$res = $this->_ci->KontaktModel->getZustellKontakt($person_id, ['email']);
|
||||
$res = $this->_ci->StudentModel->loadWhere(['prestudent_id' => $antrag->prestudent_id]);
|
||||
if (isError($res)) {
|
||||
$errors['email'] = getError($res);
|
||||
} else {
|
||||
@@ -764,7 +769,7 @@ class AntragLib
|
||||
if (!$res) {
|
||||
$errors['email'] = $this->_ci->p->t('studierendenantrag', 'error_no_email', ['person_id' => $person_id]);
|
||||
} else {
|
||||
$result['email'] = current($res)->kontakt;
|
||||
$result['email'] = $this->_ci->StudentModel->getEmailFH(current($res)->student_uid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1517,6 +1522,8 @@ class AntragLib
|
||||
|
||||
public function approveWiederholung($antrag_id, $insertvon)
|
||||
{
|
||||
$this->_ci->load->model('crm/Student_model', 'StudentModel');
|
||||
|
||||
$result = $this->_ci->StudierendenantragstatusModel->insert([
|
||||
'studierendenantrag_id' => $antrag_id,
|
||||
'studierendenantrag_statustyp_kurzbz' => Studierendenantragstatus_model::STATUS_APPROVED,
|
||||
@@ -1571,10 +1578,10 @@ class AntragLib
|
||||
$mitarbeiter = getData($result);
|
||||
}
|
||||
|
||||
$result = $this->_ci->StudentModel->loadWhere(['prestudent_id'=> $antrag->prestudent_id]);
|
||||
$result = $this->_ci->StudentModel->loadWhere(['prestudent_id'=> $prestudent_id]);
|
||||
if (hasData($result)) {
|
||||
$student = current(getData($result));
|
||||
$student_uid = $student->student_uid;
|
||||
$studentObj = current(getData($result));
|
||||
$student_uid = $studentObj->student_uid;
|
||||
}
|
||||
else
|
||||
$student_uid = '';
|
||||
@@ -1596,10 +1603,8 @@ class AntragLib
|
||||
))
|
||||
return error($this->_ci->p->t('studierendenantrag', 'error_mail_to', ['email' => $email]));
|
||||
|
||||
$result = $this->_ci->KontaktModel->getZustellKontakt($person->person_id, ['email']);
|
||||
if (hasData($result)) {
|
||||
$kontakt = current(getData($result));
|
||||
$email = $kontakt->kontakt;
|
||||
if ($student_uid) {
|
||||
$email = $this->_ci->StudentModel->getEmailFH($student_uid);
|
||||
|
||||
$sem_not_allowed = $sem_to_repeat = '';
|
||||
$list_not_allowed = $list_to_repeat = $this->_ci->p->t('studierendenantrag', 'mail_part_error_no_lvs');
|
||||
@@ -1609,7 +1614,7 @@ class AntragLib
|
||||
$lvs = getData($result);
|
||||
foreach ($lvs as $sem => $lv_list) {
|
||||
$lvs_filtered = array_filter($lv_list, function ($el) {
|
||||
return $el->antrag_zugelassen;
|
||||
return property_exists($el, 'antrag_zugelassen') && $el->antrag_zugelassen;
|
||||
});
|
||||
if (substr($sem, 0, 1) == '1') {
|
||||
$sem_not_allowed = substr($sem, 1);
|
||||
|
||||
@@ -84,7 +84,7 @@ class Student_model extends DB_Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the FH-Email for a student (not the private kontakt emailt)
|
||||
* Get the FH-Email for a student (not the private kontakt email)
|
||||
* @param $student_uid
|
||||
* @return string
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,7 @@ class Studierendenantrag_model extends DB_Model
|
||||
{
|
||||
$sql = "SELECT index FROM public.tbl_sprache WHERE sprache='" . getUserLanguage() . "' LIMIT 1";
|
||||
|
||||
$this->addSelect('stg.bezeichnung');
|
||||
$this->addSelect('UPPER(stg.typ) || UPPER(stg.kurzbz) || \' \' || stg.bezeichnung AS bezeichnung');
|
||||
$this->addSelect('bezeichnung_mehrsprachig[(' . $sql . ')] AS orgform', false);
|
||||
$this->addSelect('s.studierendenantrag_id');
|
||||
$this->addSelect('matrikelnr');
|
||||
|
||||
@@ -228,6 +228,21 @@ $( document ).ready(function()
|
||||
</script>
|
||||
';
|
||||
|
||||
echo <<<EOSBJS
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
const scrollDiv = document.createElement('div');
|
||||
scrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';
|
||||
document.body.appendChild(scrollDiv);
|
||||
const scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
|
||||
document.body.removeChild(scrollDiv);
|
||||
var marginright = Math.max((20 - scrollbarWidth), 0);
|
||||
document.body.style.setProperty('width', 'calc(100% - ' + marginright + 'px)');
|
||||
});
|
||||
</script>
|
||||
|
||||
EOSBJS;
|
||||
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
@@ -1578,7 +1593,7 @@ if ($projekt->getProjekteMitarbeiter($user, true))
|
||||
<td '.$style.' align="right"><b>'.$tagessaldo.$erstr.'</b><br>'.date('H:i', ($pausesumme-3600)).'</td>
|
||||
<td '.$style.' colspan="3" align="right">';
|
||||
if ($tag > $sperrdatum)
|
||||
echo '<a href="?von_datum='.$datum->formatDatum($tag,'d.m.Y').'&bis_datum='.$datum->formatDatum($tag,'d.m.Y').'" class="item"><-</a>';
|
||||
echo '<a href="?von_datum='.$datum->formatDatum($tag,'d.m.Y').'&bis_datum='.$datum->formatDatum($tag,'d.m.Y').'" class="item">←</a>';
|
||||
|
||||
echo '</td></tr>';
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ export default {
|
||||
<select ref="stg_select" class="form-select" @input="$emit('input', $event)">
|
||||
<option value="">{{$p.t('global', 'alle')}}</option>
|
||||
<option v-for="stg in stgs" :key="stg.studiengang_kz" :value="stg.studiengang_kz">
|
||||
{{stg.bezeichnung}} ({{stg.orgform}})
|
||||
{{stg.bezeichnung}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -57,7 +57,7 @@ if (!$db->db_query($query) || !$db->db_num_rows())
|
||||
<antraege>
|
||||
<?php while($row = $db->db_fetch_object()) { ?>
|
||||
<antrag>
|
||||
<name><![CDATA[<?= trim($row->vorname . $row->nachname); ?>]]></name>
|
||||
<name><![CDATA[<?= trim($row->vorname . ' ' . $row->nachname); ?>]]></name>
|
||||
<studiengang><![CDATA[<?= $row->bezeichnung; ?>]]></studiengang>
|
||||
<organisationsform><![CDATA[<?= $row->bezeichnung_mehrsprachig; ?>]]></organisationsform>
|
||||
<personenkz><![CDATA[<?= $row->matrikelnr; ?>]]></personenkz>
|
||||
|
||||
@@ -57,7 +57,7 @@ if (!$db->db_query($query) || !$db->db_num_rows())
|
||||
<antraege>
|
||||
<?php while($row = $db->db_fetch_object()) { ?>
|
||||
<antrag>
|
||||
<name><![CDATA[<?= trim($row->vorname . $row->nachname); ?>]]></name>
|
||||
<name><![CDATA[<?= trim($row->vorname . ' ' . $row->nachname); ?>]]></name>
|
||||
<studiengang><![CDATA[<?= $row->bezeichnung; ?>]]></studiengang>
|
||||
<organisationsform><![CDATA[<?= $row->bezeichnung_mehrsprachig; ?>]]></organisationsform>
|
||||
<personenkz><![CDATA[<?= $row->matrikelnr; ?>]]></personenkz>
|
||||
|
||||
@@ -58,7 +58,7 @@ if (!$db->db_query($query) || !$db->db_num_rows())
|
||||
<antraege>
|
||||
<?php while($row = $db->db_fetch_object()) { ?>
|
||||
<antrag>
|
||||
<name><![CDATA[<?= trim($row->vorname . $row->nachname); ?>]]></name>
|
||||
<name><![CDATA[<?= trim($row->vorname . ' ' . $row->nachname); ?>]]></name>
|
||||
<studiengang><![CDATA[<?= $row->bezeichnung; ?>]]></studiengang>
|
||||
<organisationsform><![CDATA[<?= $row->bezeichnung_mehrsprachig; ?>]]></organisationsform>
|
||||
<personenkz><![CDATA[<?= $row->matrikelnr; ?>]]></personenkz>
|
||||
|
||||
Reference in New Issue
Block a user