Merge branch 'studvw_2025-12_rc3' into demo-cis40

This commit is contained in:
Harald Bamberger
2025-12-10 15:36:30 +01:00
29 changed files with 951 additions and 426 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ class Pub extends Auth_Controller
{ {
parent::__construct( parent::__construct(
array( array(
'bild' => ['basis/cis:r'] 'bild' => ['basis/cis:r', 'assistenz:r']
) )
); );
} }
@@ -32,6 +32,10 @@ class Studentenverwaltung extends Auth_Controller
'student/keine_studstatuspruefung' => $this->permissionlib->isBerechtigt('student/keine_studstatuspruefung'), 'student/keine_studstatuspruefung' => $this->permissionlib->isBerechtigt('student/keine_studstatuspruefung'),
'lehre/reihungstestAufsicht' => $this->permissionlib->isBerechtigt('lehre/reihungstestAufsicht'), 'lehre/reihungstestAufsicht' => $this->permissionlib->isBerechtigt('lehre/reihungstestAufsicht'),
'system/change_outputformat' => $this->permissionlib->getOE_isEntitledFor('system/change_outputformat'), 'system/change_outputformat' => $this->permissionlib->getOE_isEntitledFor('system/change_outputformat'),
'student/editBakkZgv' => $this->permissionlib->isBerechtigt('student/editBakkZgv'),
'student/editMakkZgv' => $this->permissionlib->isBerechtigt('student/editMakkZgv'),
'student/editDokZgv' => $this->permissionlib->isBerechtigt('student/editDokZgv'),
'student/editBismelden' => $this->permissionlib->isBerechtigt('student/editBismelden')
], ],
'variables' => [ 'variables' => [
'semester_aktuell' => $this->variablelib->getVar('semester_aktuell') 'semester_aktuell' => $this->variablelib->getVar('semester_aktuell')
@@ -1,6 +1,5 @@
<?php <?php
if (!defined('BASEPATH')) exit('No direct script access allowed'); if (!defined('BASEPATH')) exit('No direct script access allowed');
class Messages extends FHCAPI_Controller class Messages extends FHCAPI_Controller
@@ -39,7 +38,7 @@ class Messages extends FHCAPI_Controller
// Load language phrases // Load language phrases
$this->loadPhrases([ $this->loadPhrases([
'ui' 'ui', 'messages'
]); ]);
} }
@@ -156,19 +155,6 @@ class Messages extends FHCAPI_Controller
$this->terminateWithSuccess($data); $this->terminateWithSuccess($data);
} }
/* public function getNameOfDefaultRecipient($id, $type_id)
{
$id = ($type_id != 'person_id') ? $this->_getPersonId($id, $type_id) : $id;
$this->load->model('person/Person_model', 'PersonModel');
$result = $this->PersonModel->load($id);
$data = $this->getDataOrTerminateWithError($result);
$name = current($data);
$this->terminateWithSuccess($name->vorname . " " . $name->nachname );
}*/
public function getNameOfDefaultRecipients($type_id) public function getNameOfDefaultRecipients($type_id)
{ {
$ids = $this->input->post('ids'); $ids = $this->input->post('ids');
@@ -178,7 +164,8 @@ class Messages extends FHCAPI_Controller
$recipients = []; $recipients = [];
if (empty($ids)) { if (empty($ids)) {
throw new InvalidArgumentException("Keine ID(s) übergeben.");
throw new InvalidArgumentException($this->p->t('ui', 'errorMissingOrInvalidParameters', ['parameter'=> 'Id(s)']), self::ERROR_TYPE_GENERAL);
} }
$this->load->model('person/Person_model', 'PersonModel'); $this->load->model('person/Person_model', 'PersonModel');
@@ -253,6 +240,10 @@ class Messages extends FHCAPI_Controller
} }
} }
if (!is_array($ids)) {
$ids = [$ids];
}
foreach ($ids as $id) foreach ($ids as $id)
{ {
$receiversPersonId = $typeId == "person_id" ? $id : $this->_getPersonId($id, $typeId); $receiversPersonId = $typeId == "person_id" ? $id : $this->_getPersonId($id, $typeId);
@@ -283,7 +274,7 @@ class Messages extends FHCAPI_Controller
} }
else else
{ {
$this->terminateWithError("type_id " . $typeId . " not valid", self::ERROR_TYPE_GENERAL); $this->terminateWithError($this->p->t('messages', 'error_missingLogic', ['type'=> $typeId]), self::ERROR_TYPE_GENERAL);
} }
$result =$this->messagelib->sendMessageUser($receiversPersonId, $subject, $bodyParsed, $benutzer->person_id, null, $relationmessage_id); $result =$this->messagelib->sendMessageUser($receiversPersonId, $subject, $bodyParsed, $benutzer->person_id, null, $relationmessage_id);
@@ -302,7 +293,7 @@ class Messages extends FHCAPI_Controller
unset($_POST['data']); unset($_POST['data']);
} }
else else
$this->terminateWithError("Textbody missing ", self::ERROR_TYPE_GENERAL); $this->terminateWithError($this->p->t('messages', 'errorMissingOrInvalidParameters', ['parameter'=> "Textbody"]), self::ERROR_TYPE_GENERAL);
if (isset($_POST['ids'])) if (isset($_POST['ids']))
{ {
@@ -314,7 +305,7 @@ class Messages extends FHCAPI_Controller
unset($_POST['ids']); unset($_POST['ids']);
} }
else else
$this->terminateWithError("IDs missing ", self::ERROR_TYPE_GENERAL); $this->terminateWithError($this->p->t('ui', 'errorMissingOrInvalidParameters', ['parameter'=> 'Id(s)']), self::ERROR_TYPE_GENERAL);
$bodyParsed = []; $bodyParsed = [];
@@ -343,7 +334,7 @@ class Messages extends FHCAPI_Controller
} }
break; break;
default: default:
$this->terminateWithError("MESSAGES::getPreviewText logic for type_id " . $type_id . " not defined yet", self::ERROR_TYPE_GENERAL); $this->terminateWithError($this->p->t('messages', 'error_missingLogic', ['type'=> $type_id]), self::ERROR_TYPE_GENERAL);
break; break;
} }
} }
@@ -353,7 +344,9 @@ class Messages extends FHCAPI_Controller
public function getReplyData($messageId) public function getReplyData($messageId)
{ {
//TODO(Manu) validation of messageId: if number if (!is_numeric($messageId)) {
$this->terminateWithError($this->p->t('ui', 'error_valueNotNumeric', ['value'=> 'Message ID']), self::ERROR_TYPE_GENERAL);
}
$this->MessageModel->addSelect('public.tbl_msg_message.*'); $this->MessageModel->addSelect('public.tbl_msg_message.*');
$this->MessageModel->addSelect('r.*'); $this->MessageModel->addSelect('r.*');
@@ -376,7 +369,6 @@ class Messages extends FHCAPI_Controller
$replyBody = $this->_getReplyBody($body, $dataMessage[0]->nachname, $dataMessage[0]->vorname, $dataMessage[0]->insertamum); $replyBody = $this->_getReplyBody($body, $dataMessage[0]->nachname, $dataMessage[0]->vorname, $dataMessage[0]->insertamum);
$dataMessage[0]->replyBody = $replyBody; $dataMessage[0]->replyBody = $replyBody;
$dataMessage[0]->rest = "Help Manu";
$dataMessage[0]->replySubject = $prefix . $subject; $dataMessage[0]->replySubject = $prefix . $subject;
$this->terminateWithSuccess($dataMessage); $this->terminateWithSuccess($dataMessage);
@@ -424,6 +416,11 @@ class Messages extends FHCAPI_Controller
['prestudent_id' => $id] ['prestudent_id' => $id]
); );
} }
else
{
$this->terminateWithError($this->p->t('messages', 'error_missingLogic', ['type'=> $typeId]), self::ERROR_TYPE_GENERAL);
}
$data = $this->getDataOrTerminateWithError($result); $data = $this->getDataOrTerminateWithError($result);
$person = current($data); $person = current($data);
@@ -431,50 +428,6 @@ class Messages extends FHCAPI_Controller
$this->terminateWithSuccess($person->person_id); $this->terminateWithSuccess($person->person_id);
} }
public function getUid($typeId)
{
if (!$typeId)
{
$this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Type ID']), self::ERROR_TYPE_GENERAL);
}
elseif ($typeId == 'person_id')
{
$this->load->model('person/Benutzer_model', 'BenutzerModel');
$result = $this->BenutzerModel->loadWhere(
['person_id' => $id]
);
}
elseif($typeId == 'prestudent_id')
{
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$result = $this->PrestudentModel->loadWhere(
['prestudent_id' => $id]
);
$data = $this->getDataOrTerminateWithError($result);
$person = current($data);
$person_id = $person->person_id;
$this->load->model('person/Benutzer_model', 'BenutzerModel');
$result = $this->BenutzerModel->loadWhere(
['person_id' => $person_id]
);
}
elseif($typeId == 'uid' || $typeId == 'mitarbeiter_uid')
{
$this->terminateWithSuccess($id);
}
else
{
$this->terminateWithError("MESSAGES::getUID logic for type_id " . $typeId . " not defined yet", self::ERROR_TYPE_GENERAL);
}
$data = $this->getDataOrTerminateWithError($result);
$benutzer = current($data);
$this->terminateWithSuccess($benutzer->uid);
}
public function getUids($typeId) public function getUids($typeId)
{ {
$ids = $this->input->post('ids'); $ids = $this->input->post('ids');
@@ -527,13 +480,9 @@ class Messages extends FHCAPI_Controller
} }
else else
{ {
$this->terminateWithError("MESSAGES::getUID logic for type_id " . $typeId . " not defined yet", self::ERROR_TYPE_GENERAL); $this->terminateWithError($this->p->t('messages', 'error_missingLogic', ['type'=> $typeId]), self::ERROR_TYPE_GENERAL);
} }
//$data = $this->getDataOrTerminateWithError($resultBenutzer);
//$benutzer = current($data);
$this->terminateWithSuccess($benutzerIds); $this->terminateWithSuccess($benutzerIds);
} }
@@ -553,11 +502,16 @@ class Messages extends FHCAPI_Controller
['prestudent_id' => $id] ['prestudent_id' => $id]
); );
} }
else
{
$this->terminateWithError($this->p->t('messages', 'error_missingLogic', ['type'=> $typeId]), self::ERROR_TYPE_GENERAL);
}
$data = $this->getDataOrTerminateWithError($result); $data = $this->getDataOrTerminateWithError($result);
if (count($data) < 1) if (count($data) < 1)
{ {
$this->terminateWithError('Error: Messages API no person_id found.'); $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Person ID']), self::ERROR_TYPE_GENERAL);
} }
$person = current($data); $person = current($data);
@@ -566,7 +520,6 @@ class Messages extends FHCAPI_Controller
private function _getPrestudentIdFromUid($uid) private function _getPrestudentIdFromUid($uid)
{ {
// $this->terminateWithError($uid, self::ERROR_TYPE_GENERAL);
$this->load->model('crm/Student_model', 'StudentModel'); $this->load->model('crm/Student_model', 'StudentModel');
$result = $this->StudentModel->loadWhere( $result = $this->StudentModel->loadWhere(
['student_uid' => $uid] ['student_uid' => $uid]
@@ -575,7 +528,7 @@ class Messages extends FHCAPI_Controller
$data = $this->getDataOrTerminateWithError($result); $data = $this->getDataOrTerminateWithError($result);
if (count($data) < 1) if (count($data) < 1)
{ {
$this->terminateWithError('Error: Messages API no prestudent_id found.'); $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Prestudent ID']), self::ERROR_TYPE_GENERAL);
} }
$student = current($data); $student = current($data);
@@ -0,0 +1,69 @@
<?php
/**
* FH-Complete
*
* @package FHC-API
* @author FHC-Team
* @copyright Copyright (c) 2016, fhcomplete.org
* @license GPLv3
* @link http://fhcomplete.org
* @since Version 1.0
* @filesource
*/
// ------------------------------------------------------------------------
if (! defined('BASEPATH')) exit('No direct script access allowed');
class Studienplan extends FHCAPI_Controller
{
public function __construct()
{
// TODO(chris): access!
parent::__construct([
'getBySemester' => self::PERM_LOGGED
]);
}
public function getBySemester()
{
$this->load->model('organisation/Studienplan_model', 'StudienplanModel');
$studiengang_kz = $this->input->get('studiengang_kz');
$studiensemester_kurzbz = $this->input->get('studiensemester_kurzbz');
$ausbildungssemester = $this->input->get('ausbildungssemester') ?: null;
$orgform_kurzbz = $this->input->get('orgform_kurzbz') ?: null;
if (!$studiengang_kz || !is_numeric($studiengang_kz))
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Studiengangskennzahl']), self::ERROR_TYPE_GENERAL);
if (!$studiensemester_kurzbz)
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Studiensemester']), self::ERROR_TYPE_GENERAL);
if (isset($ausbildungssemester) && !is_numeric($ausbildungssemester))
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Ausbildungssemester']), self::ERROR_TYPE_GENERAL);
//~ $this->load->library('form_validation');
//~ $this->form_validation->set_rules('studiengang_kz', 'StudiengangKz', 'required|numeric');
//~ $this->form_validation->set_rules('studiensemester_kurzbz', 'StudiensemesterKurbz', 'required');
//~ $this->form_validation->set_rules('ausbildungssemester', 'Ausbildungssemester', 'numeric');
//~ if (!$this->form_validation->run())
//~ {
//~ $this->addMeta('fail2', 'fail2');
//~ return $this->terminateWithValidationErrors($this->form_validation->error_array());
//~ }
$this->addMeta('stg_kz', $studiengang_kz);
$this->addMeta('sem', $studiensemester_kurzbz);
$this->addMeta('sem2', $ausbildungssemester);
$this->addMeta('org', $orgform_kurzbz);
$result = $this->StudienplanModel->getStudienplaeneBySemester($studiengang_kz, $studiensemester_kurzbz, $ausbildungssemester, $orgform_kurzbz);
if (isError($result)) $this->terminateWithError(getError($result), self::ERROR_TYPE_DB);
$this->terminateWithSuccess(hasData($result) ? getData($result) : []);
}
}
@@ -331,7 +331,10 @@ class Config extends FHCAPI_Controller
]; ];
$result['status'] = [ $result['status'] = [
'title' => 'Status', 'title' => 'Status',
'component' => absoluteJsImportUrl('public/js/components/Stv/Studentenverwaltung/Details/MultiStatus.js') 'component' => absoluteJsImportUrl('public/js/components/Stv/Studentenverwaltung/Details/MultiStatus.js'),
'config' => [
'showStatusVorruecken' => defined('STATUS_VORRUECKEN_ANZEIGEN') ? STATUS_VORRUECKEN_ANZEIGEN : true,
]
]; ];
$result['documents'] = [ $result['documents'] = [
'title' => $this->p->t('stv', 'tab_documents'), 'title' => $this->p->t('stv', 'tab_documents'),
@@ -1341,6 +1341,7 @@ class Status extends FHCAPI_Controller
'updateamum' => date('c'), 'updateamum' => date('c'),
'updatevon' => $authUID 'updatevon' => $authUID
]; ];
$nullableFields = ['statusgrund_id', 'anmerkung', 'rt_stufe'];
foreach ([ foreach ([
'orgform_kurzbz', 'orgform_kurzbz',
'anmerkung', 'anmerkung',
@@ -1349,8 +1350,17 @@ class Status extends FHCAPI_Controller
'rt_stufe', 'rt_stufe',
'statusgrund_id' 'statusgrund_id'
] as $key) ] as $key)
if ($this->input->post($key)) {
if (in_array($key, $nullableFields))
{
$updateData[$key] = ($this->input->post($key) === '') ? null : $this->input->post($key);
}
else if ($this->input->post($key))
{
$updateData[$key] = $this->input->post($key); $updateData[$key] = $this->input->post($key);
}
}
if ($this->input->post('bestaetigtam')) { if ($this->input->post('bestaetigtam')) {
$updateData['bestaetigtam'] = $this->input->post('bestaetigtam'); $updateData['bestaetigtam'] = $this->input->post('bestaetigtam');
@@ -37,7 +37,7 @@ class Student extends FHCAPI_Controller
'get' => ['admin:r', 'assistenz:r'], 'get' => ['admin:r', 'assistenz:r'],
'save' => ['admin:rw', 'assistenz:rw'], 'save' => ['admin:rw', 'assistenz:rw'],
'saveStudent' => ['admin:rw', 'assistenz:rw'], 'saveStudent' => ['admin:rw', 'assistenz:rw'],
'check' => ['admin:rw', 'assistenz:rw'], 'getPerson' => ['admin:rw', 'assistenz:rw'],
'add' => ['admin:rw', 'assistenz:rw'] // TODO(chris): extra permissions 'add' => ['admin:rw', 'assistenz:rw'] // TODO(chris): extra permissions
]); ]);
@@ -245,7 +245,6 @@ class Student extends FHCAPI_Controller
$person_id = $person ? current($person)->person_id : null; $person_id = $person ? current($person)->person_id : null;
$array_allowed_props_lehrverband = ['verband', 'semester', 'gruppe']; $array_allowed_props_lehrverband = ['verband', 'semester', 'gruppe'];
$update_lehrverband = array(); $update_lehrverband = array();
foreach ($array_allowed_props_lehrverband as $prop) { foreach ($array_allowed_props_lehrverband as $prop) {
@@ -462,7 +461,7 @@ class Student extends FHCAPI_Controller
return $this->save($student->prestudent_id, $studiensemester_kurzbz); return $this->save($student->prestudent_id, $studiensemester_kurzbz);
} }
public function check() public function getPerson()
{ {
$this->load->library('form_validation'); $this->load->library('form_validation');
@@ -480,21 +479,55 @@ class Student extends FHCAPI_Controller
$this->load->model('person/Person_model', 'PersonModel'); $this->load->model('person/Person_model', 'PersonModel');
$this->PersonModel->addSelect(
'person_id, vorname, nachname, vornamen, wahlname, gebdatum, staatsbuergerschaft, geburtsnation, sprache, anrede,
titelpost, titelpre, gebort, gebzeit, homepage, geschlecht, matr_nr,
aktiv, unruly, tbl_geschlecht.bezeichnung_mehrsprachig AS geschlecht_bezeichnung'
);
$this->PersonModel->addJoin('public.tbl_geschlecht', 'geschlecht');
if ($gebdatum) if ($gebdatum)
$this->PersonModel->db->where('gebdatum', (new DateTime($gebdatum))->format('Y-m-d')); $this->PersonModel->db->where('gebdatum', (new DateTime($gebdatum))->format('Y-m-d'));
if ($vorname && $nachname) { if ($vorname && $nachname) {
$this->PersonModel->db->or_group_start(); $this->PersonModel->db->or_group_start();
$this->PersonModel->db->where('LOWER(nachname)', 'LOWER(' . $this->PersonModel->db->escape($nachname) . ')', false); $this->PersonModel->db->where('LOWER(nachname)', 'LOWER(' . $this->PersonModel->db->escape(trim($nachname)) . ')', false);
$this->PersonModel->db->where('LOWER(vorname)', 'LOWER(' . $this->PersonModel->db->escape($vorname) . ')', false); $this->PersonModel->db->where('LOWER(vorname)', 'LOWER(' . $this->PersonModel->db->escape(trim($vorname)) . ')', false);
$this->PersonModel->db->group_end(); $this->PersonModel->db->group_end();
} elseif ($nachname) { } elseif ($nachname) {
$this->PersonModel->db->or_where('LOWER(nachname)', 'LOWER(' . $this->PersonModel->escape($nachname) . ')', false); $this->PersonModel->db->or_where('LOWER(nachname)', 'LOWER(' . $this->PersonModel->escape(trim($nachname)) . ')', false);
} }
$result = $this->PersonModel->load(); $result = $this->PersonModel->load();
$data = $this->getDataOrTerminateWithError($result); $data = $this->getDataOrTerminateWithError($result);
$this->load->model('person/Adresse_model', 'AdresseModel');
$this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
foreach ($data as $person)
{
// get adresses
$langIdx = $this->_getLanguageIndex() - 1;
$person->geschlecht_bezeichnung = isset($person->geschlecht_bezeichnung[$langIdx]) ? $person->geschlecht_bezeichnung[$langIdx] : '';
// get Adresse
$this->AdresseModel->addOrder('heimatadresse', 'DESC');
$this->AdresseModel->addOrder('zustelladresse', 'DESC');
$this->AdresseModel->addOrder('adresse_id', 'DESC');
$result = $this->AdresseModel->loadWhere(['person_id' => $person->person_id]);
$adressen = $this->getDataOrTerminateWithError($result);
$person->adressen = $adressen;
// get status
$result = $this->PrestudentstatusModel->getLastStatusPerson($person->person_id);
$status = $this->getDataOrTerminateWithError($result);
$person->status = $status;
}
$this->terminateWithSuccess($data); $this->terminateWithSuccess($data);
} }
@@ -508,65 +541,46 @@ class Student extends FHCAPI_Controller
$_POST['ausbildungssemester'] = 0; $_POST['ausbildungssemester'] = 0;
} }
$this->load->library('form_validation'); $this->_validate();
$this->form_validation->set_rules('nachname', 'Nachname', 'callback_requiredIfNotPersonId', [ $this->load->model('crm/Student_model', 'StudentModel');
'requiredIfNotPersonId' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('person', 'nachname')])
]);
$this->form_validation->set_rules('geschlecht', 'Geschlecht', 'callback_requiredIfNotPersonId', [
'requiredIfNotPersonId' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('person', 'geschlecht')])
]);
$this->form_validation->set_rules('gebdatum', 'Geburtsdatum', ['isValidDate', function($value) { return isValidDate($value); }], [
'isValidDate' => $this->p->t('ui', 'error_invalid_date')
]);
$this->form_validation->set_rules('address[func]', 'Address', 'required|integer|less_than[2]|greater_than[-2]');
$this->form_validation->set_rules('address[plz]', 'PLZ', 'callback_requiredIfAddressFunc', [
'requiredIfAddressFunc' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('person', 'plz')])
]);
$this->form_validation->set_rules('address[gemeinde]', 'Gemeinde', 'callback_requiredIfAddressFunc', [
'requiredIfAddressFunc' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('person', 'gemeinde')])
]);
$this->form_validation->set_rules('address[ort]', 'Ort', 'callback_requiredIfAddressFunc', [
'requiredIfAddressFunc' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('person', 'ort')])
]);
$this->form_validation->set_rules('address[address]', 'Adresse', 'callback_requiredIfAddressFunc', [
'requiredIfAddressFunc' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('person', 'adresse')])
]);
$this->form_validation->set_rules('email', 'E-Mail', 'valid_email');
$this->form_validation->set_rules('studiengang_kz', 'Studiengang', 'callback_requiredIfStudentFunc', [
'requiredIfStudentFunc' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('lehre', 'studiengang')])
]);
$this->form_validation->set_rules('studiensemester_kurzbz', 'Studiensemester', 'callback_requiredIfStudentFunc', [
'requiredIfStudentFunc' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('lehre', 'studiensemester')])
]);
$this->form_validation->set_rules('ausbildungssemester', 'Ausbildungssemester', 'callback_requiredIfStudentFunc|integer|less_than[9]|greater_than[-1]', [
'requiredIfStudentFunc' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('lehre', 'ausbildungssemester')])
]);
// TODO(chris): validate studienplan with studiengang, semester and orgform?
// TODO(chris): validate person_id, studiengang_kz, studiensemester_kurzbz, orgform_kurzbz, nation, gemeinde, ort, geschlecht?
if (!$this->form_validation->run())
$this->terminateWithValidationErrors($this->form_validation->error_array());
// TODO(chris): This should be in a library
$this->load->model('crm/Prestudent_model', 'PrestudentModel'); $this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel'); $this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
$this->load->model('organisation/Lehrverband_model', 'LehrverbandModel');
$this->load->model('education/Studentlehrverband_model', 'StudentlehrverbandModel');
$this->db->trans_start(); $this->load->library('PrestudentLib');
$result = $this->addInteressent(); $errors = [];
$person_id = null;
$this->db->trans_complete(); $this->db->trans_begin();
if ($this->db->trans_status() === FALSE) $result = $this->_addPerson();
$this->terminateWithError('TODO(chris): TEXT', self::ERROR_TYPE_GENERAL); if (isError($result)) $errors[] = getError($result);
$data = $this->getDataOrTerminateWithError($result); if (hasData($result))
{
$person_id = getData($result);
$result = $this->_addAdresse($person_id);
if (isError($result)) $errors[] = getError($result);
$result = $this->_addKontakt($person_id);
if (isError($result)) $errors[] = getError($result);
if (!$this->input->post('personOnly')) $result = $this->_addFirstPrestudentstatus($person_id);
if (isError($result)) $errors[] = getError($result);
}
$this->terminateWithSuccess($data); if ($this->db->trans_status() === FALSE || !isEmptyArray($errors))
{
$this->db->trans_rollback();
$this->terminateWithError(isEmptyArray($errors) ? $this->p->t('stv', 'error_add_student') : $errors);
}
$this->db->trans_commit();
$this->terminateWithSuccess($person_id);
} }
protected function addInteressent() private function _addPerson()
{ {
// Person anlegen wenn nötig // Person anlegen wenn nötig
$person_id = $this->input->post('person_id'); $person_id = $this->input->post('person_id');
@@ -595,19 +609,25 @@ class Student extends FHCAPI_Controller
if ($this->input->post('geschlecht')) if ($this->input->post('geschlecht'))
$data['geschlecht'] = $this->input->post('geschlecht'); $data['geschlecht'] = $this->input->post('geschlecht');
if ($this->input->post('gebdatum')) if ($this->input->post('gebdatum'))
$data['gebdatum'] = (new DateTime($this->input->post('datum_obj')))->format('Y-m-d'); $data['gebdatum'] = (new DateTime($this->input->post('gebdatum')))->format('Y-m-d');
if ($this->input->post('geburtsnation')) if ($this->input->post('geburtsnation'))
$data['geburtsnation'] = $this->input->post('geburtsnation'); $data['geburtsnation'] = $this->input->post('geburtsnation');
if ($this->input->post('staatsbuergerschaft')) if ($this->input->post('staatsbuergerschaft'))
$data['staatsbuergerschaft'] = $this->input->post('staatsbuergerschaft'); $data['staatsbuergerschaft'] = $this->input->post('staatsbuergerschaft');
$result = $this->PersonModel->insert($data); return $this->PersonModel->insert($data);
$person_id = $this->getDataOrTerminateWithError($result);
} }
// Addresse anlegen return success($person_id);
$anlegen = $this->input->post('address[func]'); }
if ($anlegen) {
private function _addAdresse($person_id)
{
// Addresse anlegen?
$anlegen = $this->input->post('address[checked]');
if ($anlegen === true)
{
// Adresse laden
$this->load->model('person/Adresse_model', 'AdresseModel'); $this->load->model('person/Adresse_model', 'AdresseModel');
$data = [ $data = [
@@ -619,52 +639,45 @@ class Student extends FHCAPI_Controller
'typ' => 'h', 'typ' => 'h',
'zustelladresse' => true, 'zustelladresse' => true,
]; ];
if ($anlegen < 0) { // Überschreiben
$this->AdresseModel->addSelect('adresse_id'); $this->AdresseModel->addSelect('adresse_id');
$this->AdresseModel->addJoin('public.tbl_adressentyp', 'typ = adressentyp_kurzbz');
$this->AdresseModel->addOrder('zustelladresse', 'DESC');
$this->AdresseModel->addOrder('sort');
$result = $this->AdresseModel->loadWhere([ $result = $this->AdresseModel->loadWhere([
'person_id' => $person_id 'person_id' => $person_id
]); ]);
$address = $this->getDataOrTerminateWithError($result);
if ($address) {
$address = current($address);
$data['updateamum'] = date('c'); if (isError($result)) return $result;
$data['updatevon'] = getAuthUID();
// wenn neue Adresse, heimatadresse setzen
if (!hasData($result)) $data['heimatadresse'] = true;
$result = $this->AdresseModel->update($address->adresse_id, $data);
$this->getDataOrTerminateWithError($result);
} else {
//Wenn keine Adrese vorhanden ist dann eine neue Anlegen
$anlegen = 1;
$data['heimatadresse'] = true;
}
}
if ($anlegen > 0) {
$data['person_id'] = $person_id; $data['person_id'] = $person_id;
$data['insertamum'] = date('c'); $data['insertamum'] = date('c');
$data['insertvon'] = getAuthUID(); $data['insertvon'] = getAuthUID();
if (!isset($data['heimatadresse']))
$data['heimatadresse'] = !$this->input->post('person_id');
$result = $this->AdresseModel->insert($data); return $this->AdresseModel->insert($data);
$this->getDataOrTerminateWithError($result);
}
} }
return success(null);
}
private function _addKontakt($person_id)
{
// Kontaktdaten // Kontaktdaten
$kontaktdaten = []; $kontaktdaten = [];
foreach (['email', 'telefon', 'mobil'] as $k) {
foreach (['email', 'telefon', 'mobil'] as $k)
{
$v = $this->input->post($k); $v = $this->input->post($k);
if ($v) if ($v)
$kontaktdaten[$k] = $v; $kontaktdaten[$k] = $v;
} }
if (count($kontaktdaten)) {
if (count($kontaktdaten))
{
$this->load->model('person/Kontakt_model', 'KontaktModel'); $this->load->model('person/Kontakt_model', 'KontaktModel');
foreach ($kontaktdaten as $typ => $kontakt) { foreach ($kontaktdaten as $typ => $kontakt)
{
$data = [ $data = [
'person_id' => $person_id, 'person_id' => $person_id,
'kontakttyp' => $typ, 'kontakttyp' => $typ,
@@ -674,87 +687,70 @@ class Student extends FHCAPI_Controller
'insertvon' => getAuthUID() 'insertvon' => getAuthUID()
]; ];
$result = $this->KontaktModel->insert($data); $result = $this->KontaktModel->insert($data);
$this->getDataOrTerminateWithError($result); if (isError($result)) return $result;
} }
} }
return success(null);
}
$personOnly = $anlegen = $this->input->post('personOnly'); private function _addFirstPrestudentstatus($person_id)
{
// Prestudent anlegen
if (!$personOnly) // Anmerkung with Ausbildungsart
$studiengang_kz = $this->input->post('studiengang_kz');
$studiensemester_kurzbz = $this->input->post('studiensemester_kurzbz');
$ausbildungsart = $this->input->post('ausbildungsart');
$anmerkung = $this->input->post('anmerkungen');
$foerderrelevant = null;
if ($ausbildungsart)
$anmerkung .= ' Ausbildungsart:' . $ausbildungsart;
// Incomings und ausserordentliche sind bei Meldung nicht förderrelevant
$incoming = $this->input->post('incoming');
if ($incoming || substr($studiengang_kz, 0, 1) == '9')
$foerderrelevant = false;
// Prestudent speichern
$result = $this->prestudentlib->setPrestudent(
$person_id,
$studiengang_kz,
$this->input->post('letzteausbildung'),
$anmerkung,
$foerderrelevant
);
if (isError($result)) return $result;
if (!hasData($result)) return error('Error when adding prestudent');
$prestudent_id = getData($result);
// wenn Incoming, Incoming Daten hinzufügen
if ($incoming)
{ {
// Prestudent anlegen $statusResult = $this->prestudentlib->setFirstIncoming(
$data = [ $prestudent_id,
'aufmerksamdurch_kurzbz' => 'k.A.', $studiengang_kz,
'person_id' => $person_id, $studiensemester_kurzbz,
'studiengang_kz' => $this->input->post('studiengang_kz'), $this->input->post('orgform_kurzbz'),
'ausbildungcode' => $this->input->post('letzteausbildung'), $this->input->post('studienplan_id')
'anmerkung' => $this->input->post('anmerkungen'), );
'reihungstestangetreten' => false,
'bismelden' => true
];
$ausbildungsart = $this->input->post('ausbildungsart');
if ($ausbildungsart)
$data['anmerkung'] .= ' Ausbildungsart:' . $ausbildungsart;
// Incomings und ausserordentliche sind bei Meldung nicht förderrelevant
$incoming = $this->input->post('incoming');
if ($incoming || substr($data['studiengang_kz'], 0, 1) == '9')
$data['foerderrelevant'] = false;
// Wenn die Person schon im System erfasst ist, dann die ZGV des Datensatzes uebernehmen
$this->PrestudentModel->addOrder('zgvmas_code');
$this->PrestudentModel->addOrder('zgv_code', 'DESC');
$this->PrestudentModel->addLimit(1);
$result = $this->PrestudentModel->loadWhere([
'person_id' => $person_id
]);
$prestudent = $this->getDataOrTerminateWithError($result);
if ($prestudent) {
$prestudent = current($prestudent);
if ($prestudent->zgv_code) {
$data['zgv_code'] = $prestudent->zgv_code;
$data['zgvort'] = $prestudent->zgvort;
$data['zgvdatum'] = $prestudent->zgvdatum;
$data['zgvmas_code'] = $prestudent->zgvmas_code;
$data['zgvmaort'] = $prestudent->zgvmaort;
$data['zgvmadatum'] = $prestudent->zgvmadatum;
}
}
// Prestudent speichern
$result = $this->PrestudentModel->insert($data);
$prestudent_id = $this->getDataOrTerminateWithError($result);
// Prestudent Rolle Anlegen
$data = [
'prestudent_id' => $prestudent_id,
'status_kurzbz' => $incoming ? 'Incoming' : 'Interessent',
'studiensemester_kurzbz' => $this->input->post('studiensemester_kurzbz'),
'ausbildungssemester' => $this->input->post('ausbildungssemester') ?: 0,
'orgform_kurzbz' => $this->input->post('orgform_kurzbz') ?: null,
'studienplan_id' => $this->input->post('studienplan_id') ?: null,
'datum' => date('Y-m-d'),
'insertamum' => date('c'),
'insertvon' => getAuthUID()
];
$result = $this->PrestudentstatusModel->insert($data);
$this->getDataOrTerminateWithError($result);
if ($incoming) {
// TODO(chris): IMPLEMENT!
//Matrikelnummer und UID generieren
//Benutzerdatensatz anlegen
//Studentendatensatz anlegen
//StudentLehrverband anlegen
}
} }
// TODO(chris): DEBUG else
/*$result = $this->PrestudentModel->loadWhere([ {
'pestudent_id' => 1 // Prestudent Rolle Anlegen
]); $statusResult = $this->prestudentlib->setFirstStatus(
if (isError($result)) { $prestudent_id,
return $result; $this->PrestudentstatusModel::STATUS_INTERESSENT,
}*/ $studiensemester_kurzbz,
$this->input->post('ausbildungssemester'),
$this->input->post('orgform_kurzbz'),
$this->input->post('studienplan_id')
);
}
if (!hasData($statusResult)) return error('error when adding status');
if (isError($statusResult)) return $statusResult;
return success($person_id); return success($prestudent_id);
} }
public function requiredIfNotPersonId($value) public function requiredIfNotPersonId($value)
@@ -766,20 +762,84 @@ class Student extends FHCAPI_Controller
public function requiredIfAddressFunc($value) public function requiredIfAddressFunc($value)
{ {
if (!$_POST['address']['func'] || $_POST['address']['func'] == 0) if (!isset($_POST['address']['checked']) || !$_POST['address']['checked'])
return true; return true;
return !!$value; return !!$value;
} }
public function requiredIfStudentFunc($value) public function requiredIfStudentFunc($value)
{ {
if ($_POST['personOnly']) if (isset($_POST['personOnly']) && $_POST['personOnly'])
return true; return true;
return !!$value; return !!$value;
} }
public function isValidDate($value) public function requiredIfStudentAndNotIncomingFunc($value)
{ {
return isValidDate($value); if ((isset($_POST['incoming']) && $_POST['incoming']) || $this->requiredIfStudentFunc($value))
return true;
return !!$value;
}
/**
* Validates input data. Terminates with validation errors, if invalid.
*/
private function _validate()
{
$this->load->library('form_validation');
$this->form_validation->set_rules('nachname', 'Nachname', 'callback_requiredIfNotPersonId', [
'requiredIfNotPersonId' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('person', 'nachname')])
]);
$this->form_validation->set_rules('geschlecht', 'Geschlecht', 'callback_requiredIfNotPersonId', [
'requiredIfNotPersonId' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('person', 'geschlecht')])
]);
$this->form_validation->set_rules('gebdatum', 'Geburtsdatum', ['isValidDate', function($value) { return isValidDate($value); }], [
'isValidDate' => $this->p->t('ui', 'error_invalid_date')
]);
//$this->form_validation->set_rules('address[checked]', 'Address', 'required');
$this->form_validation->set_rules('address[plz]', 'PLZ', 'callback_requiredIfAddressFunc', [
'requiredIfAddressFunc' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('person', 'plz')])
]);
$this->form_validation->set_rules('address[gemeinde]', 'Gemeinde', 'callback_requiredIfAddressFunc', [
'requiredIfAddressFunc' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('person', 'gemeinde')])
]);
$this->form_validation->set_rules('address[ort]', 'Ort', 'callback_requiredIfAddressFunc', [
'requiredIfAddressFunc' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('person', 'ort')])
]);
$this->form_validation->set_rules('address[address]', 'Adresse', 'callback_requiredIfAddressFunc', [
'requiredIfAddressFunc' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('person', 'adresse')])
]);
$this->form_validation->set_rules('email', 'E-Mail', 'valid_email');
$this->form_validation->set_rules('studiengang_kz', 'Studiengang', 'callback_requiredIfStudentFunc', [
'requiredIfStudentFunc' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('lehre', 'studiengang')])
]);
$this->form_validation->set_rules('studiensemester_kurzbz', 'Studiensemester', 'callback_requiredIfStudentFunc', [
'requiredIfStudentFunc' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('lehre', 'studiensemester')])
]);
$this->form_validation->set_rules(
'ausbildungssemester',
'Ausbildungssemester',
'callback_requiredIfStudentAndNotIncomingFunc|integer|less_than[9]|greater_than[-1]',
[
'requiredIfStudentAndNotIncomingFunc' =>
$this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('lehre', 'ausbildungssemester')]),
]
);
// TODO(chris): validate studienplan with studiengang, semester and orgform?
// TODO(chris): validate person_id, studiengang_kz, studiensemester_kurzbz, orgform_kurzbz, nation, gemeinde, ort, geschlecht?
if (!$this->form_validation->run())
$this->terminateWithValidationErrors($this->form_validation->error_array());
}
private function _getLanguageIndex()
{
$this->load->model('system/Sprache_model', 'SpracheModel');
$this->SpracheModel->addSelect('index');
$result = $this->SpracheModel->loadWhere(array('sprache' => getUserLanguage()));
$this->addMeta('lang', getUserLanguage());
return hasData($result) ? getData($result)[0]->index : 1;
} }
} }
+232
View File
@@ -35,6 +35,89 @@ class PrestudentLib
$this->_ci->load->model('organisation/Studiengang_model', 'StudiengangModel'); $this->_ci->load->model('organisation/Studiengang_model', 'StudiengangModel');
} }
/**
* Sets initial prestudent entry, no status yet.
* @return object success or error
*/
public function setPrestudent(
$person_id,
$studiengang_kz,
$ausbildungscode,
$anmerkung,
$foerderrelevant
)
{
// Prestudent anlegen
$data = [
'aufmerksamdurch_kurzbz' => 'k.A.',
'person_id' => $person_id,
'studiengang_kz' => $studiengang_kz,
'ausbildungcode' => $ausbildungscode,
'anmerkung' => $anmerkung,
'reihungstestangetreten' => false,
'bismelden' => true,
'foerderrelevant' => $foerderrelevant,
'insertamum' => date('c'),
'insertvon' => getAuthUID()
];
// Wenn die Person schon im System erfasst ist, dann die ZGV des Datensatzes uebernehmen
$this->_ci->PrestudentModel->addSelect('public.tbl_prestudent.*, public.tbl_person.vorname, public.tbl_person.nachname');
$this->_ci->PrestudentModel->addJoin('public.tbl_person', 'person_id');
$this->_ci->PrestudentModel->addOrder('zgvmas_code');
$this->_ci->PrestudentModel->addOrder('zgv_code', 'DESC');
$this->_ci->PrestudentModel->addLimit(1);
$result = $this->_ci->PrestudentModel->loadWhere([
'person_id' => $person_id
]);
if (isError($result)) return $result;
if (hasData($result)) {
$prestudent = getData($result)[0];
if ($prestudent->zgv_code) {
$data['zgv_code'] = $prestudent->zgv_code;
$data['zgvort'] = $prestudent->zgvort;
$data['zgvdatum'] = $prestudent->zgvdatum;
$data['zgvmas_code'] = $prestudent->zgvmas_code;
$data['zgvmaort'] = $prestudent->zgvmaort;
$data['zgvmadatum'] = $prestudent->zgvmadatum;
}
}
// Prestudent speichern
return $this->_ci->PrestudentModel->insert($data);
}
/**
* Sets first status of a prestudent.!
* @return object success or error
*/
public function setFirstStatus(
$prestudent_id,
$status_kurzbz,
$studiensemester_kurzbz,
$ausbildungssemester = null,
$orgform_kurzbz = null,
$studienplan_id = null
)
{
// Prestudent Rolle Anlegen
$data = [
'prestudent_id' => $prestudent_id,
'status_kurzbz' => $status_kurzbz,
'studiensemester_kurzbz' => $studiensemester_kurzbz,
'ausbildungssemester' => $ausbildungssemester ?: 0,
'orgform_kurzbz' => $orgform_kurzbz ?: null,
'studienplan_id' => $studienplan_id ?: null,
'datum' => date('Y-m-d'),
'insertamum' => date('c'),
'insertvon' => getAuthUID()
];
return $this->_ci->PrestudentstatusModel->insert($data);
}
public function setAbbrecher( public function setAbbrecher(
$prestudent_id, $prestudent_id,
$studiensemester_kurzbz, $studiensemester_kurzbz,
@@ -889,6 +972,155 @@ class PrestudentLib
); );
} }
/**
* Creates an incoming, saves necessary data for an incoming.
* @param $prestudent_id existing prestudent, for which incoming entry is created
* @param $studiengang_kz Studiengang assigned to incoming
* @param $studiensemester_kurzbz start semester for incoming
* @return object success if incoming successfully saved, or error
*/
public function setFirstIncoming($prestudent_id, $studiengang_kz, $studiensemester_kurzbz, $orgform_kurzbz, $studienplan_id)
{
// Verband and Ausbildungssemester for incoming
$authUID = getAuthUID();
$incomingVerband = 'I';
$incomingAusbildungssemester = '0';
// get prestudent
$this->_ci->PrestudentModel->addJoin('public.tbl_person p', 'person_id');
$this->_ci->PrestudentModel->addJoin('public.tbl_studiengang stg', 'studiengang_kz');
$result = $this->_ci->PrestudentModel->load($prestudent_id);
if (isError($result)) return $result;
if (!hasData($result)) return error('No prestudent');
$student_data = getData($result)[0];
$result = $this->setFirstStatus(
$prestudent_id,
$this->_ci->PrestudentstatusModel::STATUS_INCOMING,
$studiensemester_kurzbz,
$incomingAusbildungssemester,
$orgform_kurzbz,
$studienplan_id
);
if (isError($result)) return $result;
if (!hasData($result)) return error('Error when adding prestudentstatus');
// generate Personenkennzeichen
$result = $this->_ci->StudentModel->generateMatrikelnummer2($studiengang_kz, $studiensemester_kurzbz);
if (isError($result)) return $result;
if (!hasData($result)) return error('No personenkennzeichen could be generated');
$personenkennzeichen = getData($result);
$jahr = mb_substr($personenkennzeichen, 0, 2);
$stg = mb_substr($personenkennzeichen, 3, 4);
$nachname_clean = mb_strtolower(sanitizeProblemChars($student_data->nachname));
$vorname_clean = mb_strtolower(sanitizeProblemChars($student_data->vorname));
$nachname_clean = str_replace(' ','_', $nachname_clean);
$vorname_clean = str_replace(' ','_', $vorname_clean);
// get Studiengang data
$result = $this->_ci->StudiengangModel->load(ltrim($stg, '0'));
if (isError($result)) return $result;
if (!hasData($result)) return error('No Studiengang');
$stgObj = getData($result)[0];
// gernerate uid
$result = $this->_ci->StudentModel->generateUID($stgObj->kurzbz, $jahr, $stgObj->typ, $personenkennzeichen, $vorname_clean, $nachname_clean);
if (isError($result)) return $result;
if (!hasData($result)) return error("UID could not be generated");
$uid = getData($result);
//Benutzerdatensatz anlegen
$benutzer = [
'uid' => $uid,
'person_id' => $student_data->person_id,
'aktiv' => true,
'aktivierungscode' => $this->_ci->BenutzerModel->generateActivationkey()
];
// Generate Alias
$alias = '';
if (!defined('GENERATE_ALIAS_STUDENT') || GENERATE_ALIAS_STUDENT === true)
{
$result = $this->_ci->BenutzerModel->generateAliasFromName($student_data->vorname, $student_data->nachname);
if (isError($result))
return $result;
$alias = getData($result);
}
$benutzer['alias'] = $alias;
$benutzer['insertamum'] = date('Y-m-d H:i:s');
$benutzer['insertvon'] = $authUID;
$result = $this->_ci->BenutzerModel->insert($benutzer);
if (isError($result)) return $result;
// Studentendatensatz anlegen
$student = [
'student_uid' => $uid,
'matrikelnr' => $personenkennzeichen,
'prestudent_id' => $prestudent_id,
'studiengang_kz' => $studiengang_kz,
'semester' => $incomingAusbildungssemester,
'verband' => $incomingVerband,
'gruppe' => ' '
];
$result = $this->_ci->LehrverbandModel->loadWhere([
'studiengang_kz' => $student['studiengang_kz'],
'semester' => $student['semester'],
'verband' => $student['verband'],
'gruppe' => $student['gruppe']
]);
if (isError($result)) return $result;
if (!hasData($result))
{
// Add Lehrverband if it does not exist
$result = $this->_ci->LehrverbandModel->insert([
'studiengang_kz' => $student_data->studiengang_kz,
'semester' => $student['semester'],
'verband' => $student['verband'],
'gruppe' => $student['gruppe'],
'bezeichnung' => 'Incoming',
'aktiv' => true
]);
if (isError($result)) return $result;
}
// add student
$student['insertamum'] = date('Y-m-d H:i:s');
$student['insertvon'] = $authUID;
$result = $this->_ci->StudentModel->insert($student);
if (isError($result)) return $result;
// Add Studentlehrverband
$result = $this->_ci->StudentlehrverbandModel->insert([
'student_uid' => $uid,
'studiensemester_kurzbz' => $studiensemester_kurzbz,
'studiengang_kz' => $student_data->studiengang_kz,
'semester' => $incomingAusbildungssemester,
'verband' => $incomingVerband,
'gruppe' => ' ',
'insertamum' => date('Y-m-d H:i:s'),
'insertvon' => $authUID
]);
if (isError($result))
return $result;
return success($prestudent_id);
}
protected function setBasic($authUID, $now, $status_kurzbz, $prestudent_id, $studiensemester_kurzbz, $ausbildungssemester, $statusgrund_id = null) protected function setBasic($authUID, $now, $status_kurzbz, $prestudent_id, $studiensemester_kurzbz, $ausbildungssemester, $statusgrund_id = null)
{ {
$result = $this->_ci->PrestudentstatusModel->getLastStatus($prestudent_id); $result = $this->_ci->PrestudentstatusModel->getLastStatus($prestudent_id);
@@ -290,7 +290,11 @@ class Prestudentstatus_model extends DB_Model
*/ */
public function getLastStatusPerson($person_id, $studiensemester_kurzbz = null) public function getLastStatusPerson($person_id, $studiensemester_kurzbz = null)
{ {
$query = 'SELECT * $query = 'SELECT p.*, ps.*, s.*,
stg.kurzbz AS studiengang_kurzbz, stg.kurzbzlang AS studiengang_kurzbzlang,
UPPER(typ::varchar(1) || kurzbz) AS studiengang_kuerzel,
stg.typ AS studiengang_typ, stg.bezeichnung AS studiengang_bezeichnung, stg.english AS studiengang_bezeichnung_english,
stg.orgform_kurzbz AS studiengang_orgform
FROM public.tbl_prestudent p FROM public.tbl_prestudent p
JOIN ( JOIN (
SELECT DISTINCT ON(prestudent_id) * SELECT DISTINCT ON(prestudent_id) *
@@ -298,7 +302,8 @@ class Prestudentstatus_model extends DB_Model
WHERE prestudent_id IN (SELECT prestudent_id FROM public.tbl_prestudent WHERE person_id = ?) WHERE prestudent_id IN (SELECT prestudent_id FROM public.tbl_prestudent WHERE person_id = ?)
ORDER BY prestudent_id, datum desc, insertamum desc ORDER BY prestudent_id, datum desc, insertamum desc
) ps USING(prestudent_id) ) ps USING(prestudent_id)
JOIN public.tbl_status USING(status_kurzbz)'; JOIN public.tbl_status s USING(status_kurzbz)
JOIN public.tbl_studiengang stg USING (studiengang_kz)';
$parametersArray = array($person_id); $parametersArray = array($person_id);
+1 -1
View File
@@ -169,7 +169,7 @@ class Student_model extends DB_Model
$max = 0; $max = 0;
if ($matrikelnrres && hasData($matrikelnrres)) { if ($matrikelnrres && hasData($matrikelnrres)) {
$max = mb_substr($matrikelnrres->retval[0]->matrikelnr, 7); $max = mb_substr(getData($matrikelnrres)[0]->matrikelnr, 7);
if (!is_numeric($max)) { if (!is_numeric($max)) {
$max = (int)$max; $max = (int)$max;
} }
+4
View File
@@ -360,4 +360,8 @@ define('SANCHO_MAIL_HEADER_IMG', 'sancho_header_DEFAULT.jpg');
// footer image for eigene Mails // footer image for eigene Mails
define('SANCHO_MAIL_FOOTER_IMG', 'sancho_footer_DEFAULT.jpg'); define('SANCHO_MAIL_FOOTER_IMG', 'sancho_footer_DEFAULT.jpg');
// Gibt an, ob in der StudVW der Status vorgerueckt werden kann
define('STATUS_VORRUECKEN_ANZEIGEN', true);
?> ?>
+1
View File
@@ -407,6 +407,7 @@ html {
background-color: var(--fhc-background); background-color: var(--fhc-background);
border-color: var(--fhc-border); border-color: var(--fhc-border);
padding: var(--fhc-cis-main-py) var(--fhc-cis-main-px); padding: var(--fhc-cis-main-py) var(--fhc-cis-main-px);
min-width: 0; /* fix flex-grow with tabulator exceeding width */
} }
#cis-main .fa-arrow-up-right-from-square { #cis-main .fa-arrow-up-right-from-square {
@@ -58,13 +58,6 @@ export default {
url: 'api/frontend/v1/messages/messages/getPersonId/' + params.id + '/' + params.type_id url: 'api/frontend/v1/messages/messages/getPersonId/' + params.id + '/' + params.type_id
}; };
}, },
/* getUid(ids, type_id){
return {
method: 'post',
url: 'api/frontend/v1/messages/messages/getUids/' + type_id,
params: {ids}
};
},*/
getDataVorlage(vorlage_kurzbz){ getDataVorlage(vorlage_kurzbz){
return { return {
method: 'get', method: 'get',
@@ -91,20 +84,6 @@ export default {
url: 'api/frontend/v1/messages/messages/getReplyData/' + messageId url: 'api/frontend/v1/messages/messages/getReplyData/' + messageId
}; };
}, },
/* sendMessageFromModalContext(id, params) {
return {
method: 'post',
url: 'api/frontend/v1/messages/messages/sendMessage/' + id,
params
};
}, */
sendMessageFromModalContext(type_id, params) {
return {
method: 'post',
url: 'api/frontend/v1/messages/messages/sendMessage/' + type_id,
params
};
},
sendMessage(type_id, params) { sendMessage(type_id, params) {
return { return {
method: 'post', method: 'post',
+11
View File
@@ -0,0 +1,11 @@
export default {
getStudienplaeneBySemester(studiengang_kz, studiensemester_kurzbz, ausbildungssemester, orgform_kurzbz)
{
return {
method: 'get',
url: 'api/frontend/v1/organisation/studienplan/getBySemester',
params: { studiengang_kz, studiensemester_kurzbz, ausbildungssemester, orgform_kurzbz },
};
}
}
+11
View File
@@ -0,0 +1,11 @@
export default {
getAll(order = null, start = null)
{
return {
method: 'get',
url: 'api/frontend/v1/organisation/studiensemester/getAll',
params: { order, start }
};
}
}
+2 -2
View File
@@ -60,10 +60,10 @@ export default {
url: 'api/frontend/v1/stv/students/' + relative_path url: 'api/frontend/v1/stv/students/' + relative_path
}; };
}, },
check(params) { getPerson(params) {
return { return {
method: 'post', method: 'post',
url: 'api/frontend/v1/stv/student/check', url: 'api/frontend/v1/stv/student/getPerson',
params params
}; };
}, },
@@ -4,6 +4,8 @@ import FormInput from '../../../Form/Input.js';
import ListBox from "../../../../../../index.ci.php/public/js/components/primevue/listbox/listbox.esm.min.js"; import ListBox from "../../../../../../index.ci.php/public/js/components/primevue/listbox/listbox.esm.min.js";
import DropdownComponent from "../../../VorlagenDropdown/VorlagenDropdown.js"; import DropdownComponent from "../../../VorlagenDropdown/VorlagenDropdown.js";
import ApiMessages from '../../../../api/factory/messages/messages.js';
export default { export default {
name: "ModalNewMessages", name: "ModalNewMessages",
components: { components: {
@@ -14,10 +16,6 @@ export default {
ListBox ListBox
}, },
props: { props: {
endpoint: {
type: Object,
required: true
},
typeId: String, typeId: String,
id: { id: {
type: Array, type: Array,
@@ -58,7 +56,6 @@ export default {
previewText: null, previewText: null,
previewBody: "", previewBody: "",
replyData: null, replyData: null,
} }
}, },
methods: { methods: {
@@ -117,7 +114,7 @@ export default {
data.append('ids', JSON.stringify(this.id)); data.append('ids', JSON.stringify(this.id));
return this.$refs.formMessage return this.$refs.formMessage
.call(this.endpoint.sendMessageFromModalContext(this.typeId, data)) .call(ApiMessages.sendMessage(this.typeId, data))
.then(response => { .then(response => {
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSent')); this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSent'));
this.hideModal('modalNewMessage'); this.hideModal('modalNewMessage');
@@ -134,7 +131,7 @@ export default {
}, },
getDataVorlage(vorlage_kurzbz){ getDataVorlage(vorlage_kurzbz){
return this.$api return this.$api
.call(this.endpoint.getDataVorlage(vorlage_kurzbz)) .call(ApiMessages.getDataVorlage(vorlage_kurzbz))
.then(response => { .then(response => {
this.formData.body = response.data.text; this.formData.body = response.data.text;
this.formData.subject = response.data.subject; this.formData.subject = response.data.subject;
@@ -146,14 +143,13 @@ export default {
data.append('ids', JSON.stringify(this.id)); data.append('ids', JSON.stringify(this.id));
return this.$api return this.$api
.call(this.endpoint.getPreviewText( .call(ApiMessages.getPreviewText(
this.typeId, data)) this.typeId, data))
.then(response => { .then(response => {
const previews = response.data; const previews = response.data;
this.previewText = previews[this.defaultRecipient]; this.previewText = previews[this.defaultRecipient];
}).catch(this.$fhcAlert.handleSystemError) }).catch(this.$fhcAlert.handleSystemError)
.finally(() => { .finally(() => {
//this.resetForm();
//closeModal //closeModal
//closewindwo //closewindwo
}); });
@@ -168,7 +164,7 @@ export default {
this.editor.save(); this.editor.save();
} else { } else {
console.error("Editor instance is not available."); console.error(this.$p.t('messages', 'errorEditorNotAvailable'));
} }
}, },
resetForm(){ resetForm(){
@@ -177,6 +173,7 @@ export default {
body: null, body: null,
subject: null, subject: null,
}; };
this.$emit('resetMessageId'); this.$emit('resetMessageId');
if (this.editor) { if (this.editor) {
@@ -230,7 +227,7 @@ export default {
if (!newMessageId) return; if (!newMessageId) return;
try { try {
const result = await this.$api.call(this.endpoint.getReplyData(newMessageId)); const result = await this.$api.call(ApiMessages.getReplyData(newMessageId));
this.replyData = result.data; this.replyData = result.data;
if (this.replyData.length > 0) { if (this.replyData.length > 0) {
@@ -247,7 +244,7 @@ export default {
created(){ created(){
if(this.typeId == 'person_id' || this.typeId == 'mitarbeiter_uid'){ if(this.typeId == 'person_id' || this.typeId == 'mitarbeiter_uid'){
this.$api this.$api
.call(this.endpoint.getMessageVarsPerson(this.id, this.typeId)) .call(ApiMessages.getMessageVarsPerson(this.id, this.typeId))
.then(result => { .then(result => {
this.fieldsPerson = result.data; this.fieldsPerson = result.data;
const person = this.fieldsPerson[0]; const person = this.fieldsPerson[0];
@@ -261,7 +258,7 @@ export default {
if(this.typeId == 'prestudent_id' || this.typeId == 'uid'){ if(this.typeId == 'prestudent_id' || this.typeId == 'uid'){
this.$api this.$api
.call(this.endpoint.getMsgVarsPrestudent(this.id, this.typeId)) .call(ApiMessages.getMsgVarsPrestudent(this.id, this.typeId))
.then(result => { .then(result => {
this.fieldsPrestudent = result.data; this.fieldsPrestudent = result.data;
const prestudent = this.fieldsPrestudent[0]; const prestudent = this.fieldsPrestudent[0];
@@ -274,7 +271,7 @@ export default {
} }
this.$api this.$api
.call(this.endpoint.getMsgVarsLoggedInUser()) .call(ApiMessages.getMsgVarsLoggedInUser())
.then(result => { .then(result => {
this.fieldsUser = result.data; this.fieldsUser = result.data;
const user = this.fieldsUser; const user = this.fieldsUser;
@@ -286,7 +283,7 @@ export default {
.catch(this.$fhcAlert.handleSystemError); .catch(this.$fhcAlert.handleSystemError);
this.$api this.$api
.call(this.endpoint.getNameOfDefaultRecipients(this.id, this.typeId)) .call(ApiMessages.getNameOfDefaultRecipients(this.id, this.typeId))
.then(result => { .then(result => {
this.defaultRecipients = result.data; this.defaultRecipients = result.data;
this.defaultRecipientString = Object.values(this.defaultRecipients).join("; "); this.defaultRecipientString = Object.values(this.defaultRecipients).join("; ");
@@ -297,7 +294,7 @@ export default {
//case of reply //case of reply
if(this.messageId) { if(this.messageId) {
this.$api this.$api
.call(this.endpoint.getReplyData(this.messageId)) .call(ApiMessages.getReplyData(this.messageId))
.then(result => { .then(result => {
this.replyData = result.data; this.replyData = result.data;
this.formData.subject = this.replyData[0].replySubject; this.formData.subject = this.replyData[0].replySubject;
@@ -13,12 +13,6 @@ export default {
DropdownComponent, DropdownComponent,
}, },
props: { props: {
/*
endpoint: {
type: Object,
required: true
},
*/
openMode: String, openMode: String,
typeId: String, typeId: String,
id: { id: {
@@ -113,7 +107,6 @@ export default {
if(this.openMode == "inSamePage" && this.id.length == 1 ){ if(this.openMode == "inSamePage" && this.id.length == 1 ){
this.$emit('reloadTable'); this.$emit('reloadTable');
} }
this.resetForm();
} }
); );
}, },
@@ -126,10 +119,14 @@ export default {
}).catch(this.$fhcAlert.handleSystemError); }).catch(this.$fhcAlert.handleSystemError);
}, },
getPreviewText(){ getPreviewText(){
console.log("subj" + this.formData.subject);
const data = new FormData(); const data = new FormData();
data.append('data', JSON.stringify(this.formData.body)); data.append('data', JSON.stringify(this.formData.body));
data.append('ids', JSON.stringify(this.id)); data.append('ids', JSON.stringify(this.id));
console.log("subj" + this.formData.subject);
return this.$api return this.$api
.call(ApiMessages.getPreviewText( .call(ApiMessages.getPreviewText(
this.typeId, data)) this.typeId, data))
@@ -150,7 +147,7 @@ export default {
this.editor.save(); this.editor.save();
} else { } else {
console.error("Editor instance is not available."); console.error(this.$p.t('messages', 'errorEditorNotAvailable'));
} }
}, },
resetForm(){ resetForm(){
@@ -182,14 +179,28 @@ export default {
this.isVisible = false; this.isVisible = false;
}, },
showTemplate(){ showTemplate(){
if (this.openMode == "inSamePage") if (this.openMode == "inSamePage") {
this.isVisible = true; this.isVisible = true;
//to enable send newMessage after sentMessage
this.messageSent = false;
}
}, },
showPreview(){ showPreview(){
this.getPreviewText().then(() => { this.getPreviewText().then(() => {
this.previewBody = this.previewText; this.previewBody = this.previewText;
}); });
}, },
loadReplyData(messageId){
this.$api
.call(ApiMessages.getReplyData(messageId))
.then(result => {
this.replyData = result.data;
this.formData.subject = this.replyData[0].replySubject;
this.formData.body = this.replyData[0].replyBody;
this.formData.relationmessage_id = messageId;
})
.catch(this.$fhcAlert.handleSystemError);
}
}, },
watch: { watch: {
'formData.body': { 'formData.body': {
@@ -216,14 +227,12 @@ export default {
const missingparamsmsgs = []; const missingparamsmsgs = [];
if(!this.typeId) if(!this.typeId)
{ {
// TODO(bh) Phrase missingparamsmsgs.push(this.$p.t('messages', 'errorMissingOrInvalidParameterRecipientTypeId'));
missingparamsmsgs.push('Fehlender oder ungültiger Parameter Empfänger-Id-Typ.');
} }
if(!this.id || this.id.length < 1) if(!this.id || this.id.length < 1)
{ {
// TODO(bh) Phrase missingparamsmsgs.push(this.$p.t('messages', 'errorMissingOrInvalidParameterRecipientIds'));
missingparamsmsgs.push('Fehlender oder ungültiger Parameter Empfänger-Id(s).');
} }
if(missingparamsmsgs.length > 0) if(missingparamsmsgs.length > 0)
@@ -283,7 +292,8 @@ export default {
//case of reply //case of reply
if(this.messageId != null) { if(this.messageId != null) {
this.$api this.loadReplyData(this.messageId);
/* this.$api
.call(ApiMessages.getReplyData(this.messageId)) .call(ApiMessages.getReplyData(this.messageId))
.then(result => { .then(result => {
this.replyData = result.data; this.replyData = result.data;
@@ -291,7 +301,7 @@ export default {
this.formData.body = this.replyData[0].replyBody; this.formData.body = this.replyData[0].replyBody;
this.formData.relationmessage_id = this.messageId; this.formData.relationmessage_id = this.messageId;
}) })
.catch(this.$fhcAlert.handleSystemError); .catch(this.$fhcAlert.handleSystemError);*/
} }
}, },
@@ -305,7 +315,7 @@ export default {
<div class="messages-detail-newmessage-newdiv"> <div class="messages-detail-newmessage-newdiv">
<!--new page--> <!--new page-->
<div v-if="!messageSent" class="overflow-auto m-3"> <div v-if="!messageSent" ref="divNewMessage" class="overflow-auto m-3">
<h4>{{ $p.t('messages', 'neueNachricht') }}</h4> <h4>{{ $p.t('messages', 'neueNachricht') }}</h4>
<div class="row"> <div class="row">
@@ -1,6 +1,8 @@
import {CoreFilterCmpt} from "../../filter/Filter.js"; import {CoreFilterCmpt} from "../../filter/Filter.js";
import FormForm from '../../Form/Form.js'; import FormForm from '../../Form/Form.js';
import ApiMessages from "../../../api/factory/messages/messages.js"
export default { export default {
name: "TableMessages", name: "TableMessages",
components: { components: {
@@ -13,10 +15,6 @@ export default {
}, },
}, },
props: { props: {
endpoint: {
type: Object,
required: true
},
typeId: String, typeId: String,
id: { id: {
type: Array, type: Array,
@@ -281,7 +279,7 @@ export default {
}, },
deleteMessage(message_id){ deleteMessage(message_id){
return this.$api return this.$api
.call(this.endpoint.deleteMessage(message_id)) .call(ApiMessages.deleteMessage(message_id))
.then(response => { .then(response => {
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successDelete')); this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successDelete'));
}).catch(this.$fhcAlert.handleSystemError) }).catch(this.$fhcAlert.handleSystemError)
@@ -347,7 +345,7 @@ export default {
}, },
loadAjaxCall(url, config, params){ loadAjaxCall(url, config, params){
return this.$api.call( return this.$api.call(
this.endpoint.getMessages(params) ApiMessages.getMessages(params)
); );
} }
}, },
@@ -378,7 +376,7 @@ export default {
type_id: this.typeId type_id: this.typeId
}; };
this.$api this.$api
.call(this.endpoint.getPersonId(params)) .call(ApiMessages.getPersonId(params))
.then(result => { .then(result => {
this.personId = result.data; this.personId = result.data;
}) })
+11 -11
View File
@@ -14,10 +14,6 @@ export default {
} }
}, },
props: { props: {
endpoint: {
type: Object,
required: true
},
typeId: { typeId: {
type: String, type: String,
required: true, required: true,
@@ -74,18 +70,25 @@ export default {
handleMessage(id, typeId, messageId){ handleMessage(id, typeId, messageId){
this.messageId = messageId; this.messageId = messageId;
if (this.openMode == "window") { if (this.openMode == "window") {
//this.$refs['newMsgForm'].submit();
this.openInNewWindow(id, typeId, messageId); this.openInNewWindow(id, typeId, messageId);
} }
else if (this.openMode == "newTab"){ else if (this.openMode == "newTab"){
//this.$refs['newMsgForm'].submit();
this.openInNewTab(id, typeId, messageId); this.openInNewTab(id, typeId, messageId);
} }
else if (this.openMode == "modal"){ else if (this.openMode == "modal"){
if(!messageId)
this.$refs.modalMsg.resetForm();
this.$refs.modalMsg.show(); this.$refs.modalMsg.show();
} }
else if (this.openMode == "inSamePage"){ else if (this.openMode == "inSamePage"){
console.log("in same Page");
this.isVisibleDiv = true; this.isVisibleDiv = true;
if(messageId)
this.$refs.templateNewDivMessage.loadReplyData(messageId);
else
this.$refs.templateNewDivMessage.resetForm();
this.$refs.templateNewDivMessage.showTemplate();
} }
else else
console.log("no valid openMode"); console.log("no valid openMode");
@@ -156,7 +159,6 @@ export default {
:type-id="typeId" :type-id="typeId"
:id="id" :id="id"
:message-id="messageId" :message-id="messageId"
:endpoint="endpoint"
:openMode="openMode" :openMode="openMode"
@reloadTable="reloadTable" @reloadTable="reloadTable"
@resetMessageId="resetMessageId" @resetMessageId="resetMessageId"
@@ -164,13 +166,12 @@ export default {
</message-modal> </message-modal>
<!--in same page--> <!--in same page-->
<div v-if="isVisibleDiv" class="overflow-auto m-3" style="max-height: 500px; border: 1px solid #ccc;"> <div v-show="isVisibleDiv" class="overflow-auto m-3" style="max-height: 500px; border: 1px solid #ccc;">
<form-only <form-only
ref="templateNewMessage" ref="templateNewDivMessage"
:type-id="typeId" :type-id="typeId"
:id="id" :id="id"
:message-id="messageId" :message-id="messageId"
:endpoint="endpoint"
:openMode="openMode" :openMode="openMode"
@reloadTable="reloadTable" @reloadTable="reloadTable"
> >
@@ -182,7 +183,6 @@ export default {
ref="templateTableMessage" ref="templateTableMessage"
:type-id="typeId" :type-id="typeId"
:id="id" :id="id"
:endpoint="endpoint"
:messageLayout="messageLayout" :messageLayout="messageLayout"
:openMode="openMode" :openMode="openMode"
@newMessage="handleMessage" @newMessage="handleMessage"
@@ -84,7 +84,12 @@ export default {
configShowAufnahmegruppen: this.config.showAufnahmegruppen, configShowAufnahmegruppen: this.config.showAufnahmegruppen,
configAllowUebernahmePunkte: this.config.allowUebernahmePunkte, configAllowUebernahmePunkte: this.config.allowUebernahmePunkte,
configUseReihungstestPunkte: this.config.useReihungstestPunkte, configUseReihungstestPunkte: this.config.useReihungstestPunkte,
appConfig: Vue.computed(() => this.appconfig) appConfig: Vue.computed(() => this.appconfig),
hasZGVBakkPermission: this.permissions['student/editBakkZgv'],
hasZGVMasterPermission: this.permissions['student/editMakkZgv'],
hasZGVDoctorPermission: this.permissions['student/editDokZgv'],
hasBismeldenPermission: this.permissions['student/editBismelden'],
} }
}, },
data() { data() {
@@ -155,7 +160,7 @@ export default {
extraItems.push({ extraItems.push({
link: FHC_JS_DATA_STORAGE_OBJECT.app_root link: FHC_JS_DATA_STORAGE_OBJECT.app_root
+ 'content/statistik/notenspiegel.php?type=xls' + 'content/statistik/notenspiegel.php?typ=xls'
+ '&studiengang_kz=' + studiengang_kz + '&studiengang_kz=' + studiengang_kz
+ '&semester=' + semester + '&semester=' + semester
+ '&studiensemester=' + this.studiensemesterKurzbz + '&studiensemester=' + this.studiensemesterKurzbz
@@ -173,7 +178,7 @@ export default {
}); });
extraItems.push({ extraItems.push({
link: FHC_JS_DATA_STORAGE_OBJECT.app_root link: FHC_JS_DATA_STORAGE_OBJECT.app_root
+ 'content/statistik/notenspiegel.php?type=html' + 'content/statistik/notenspiegel.php?typ=html'
+ '&studiengang_kz=' + studiengang_kz + '&studiengang_kz=' + studiengang_kz
+ '&semester=' + semester + '&semester=' + semester
+ '&studiensemester=' + this.studiensemesterKurzbz + '&studiensemester=' + this.studiensemesterKurzbz
@@ -438,11 +438,9 @@ export default {
if (this.stgInfo.typ === 'b') { if (this.stgInfo.typ === 'b') {
this.formData.pruefungstyp_kurzbz = 'Bachelor'; this.formData.pruefungstyp_kurzbz = 'Bachelor';
this.formData.protokoll = this.$p.t('abschlusspruefung', 'pruefungsnotizenMaster');
} }
if (this.stgInfo.typ === 'd' || this.stgInfo === 'm') { if (this.stgInfo.typ === 'd' || this.stgInfo === 'm') {
this.formData.pruefungstyp_kurzbz = 'Diplom'; this.formData.pruefungstyp_kurzbz = 'Diplom';
this.formData.protokoll = this.$p.t('abschlusspruefung', 'pruefungsnotizenMaster');
} }
if (this.stgInfo.typ === 'lg') { if (this.stgInfo.typ === 'lg') {
this.formData.pruefungstyp_kurzbz = 'lgabschluss'; this.formData.pruefungstyp_kurzbz = 'lgabschluss';
@@ -1,5 +1,5 @@
import CoreMessages from "../../../Messages/Messages.js"; import CoreMessages from "../../../Messages/Messages.js";
import ApiMessages from "../../../../api/factory/messages/messages.js"; //import ApiMessages from "../../../../api/factory/messages/messages.js";
export default { export default {
name: "TabMessages", name: "TabMessages",
@@ -11,7 +11,7 @@ export default {
}, },
data(){ data(){
return { return {
endpoint: ApiMessages //endpoint: ApiMessages
}; };
}, },
computed: { computed: {
@@ -36,7 +36,6 @@ export default {
<template v-if="prestudent_ids"> <template v-if="prestudent_ids">
<core-messages <core-messages
ref="formc" ref="formc"
:endpoint="endpoint"
type-id="prestudent_id" type-id="prestudent_id"
:id="prestudent_ids" :id="prestudent_ids"
messageLayout="twoColumnsTableLeft" messageLayout="twoColumnsTableLeft"
@@ -48,7 +47,6 @@ export default {
<template v-else > <template v-else >
<core-messages <core-messages
ref="formc" ref="formc"
:endpoint="endpoint"
type-id="person_id" type-id="person_id"
:id="person_ids" :id="person_ids"
messageLayout="twoColumnsTableLeft" messageLayout="twoColumnsTableLeft"
@@ -7,10 +7,14 @@ export default {
}, },
props: { props: {
modelValue: Object, modelValue: Object,
config: {
type: Object,
default: {}
}
}, },
template: ` template: `
<div class="stv-details-multistatus h-100"> <div class="stv-details-multistatus h-100">
<tbl-multi-status :model-value="modelValue"></tbl-multi-status> <tbl-multi-status :model-value="modelValue" :config="config"></tbl-multi-status>
</div> </div>
` `
} }
@@ -30,6 +30,22 @@ export default {
from: 'hasAdminPermission', from: 'hasAdminPermission',
default: false default: false
}, },
hasZGVBakkPermission: {
from: 'hasZGVBakkPermission',
default: false
},
hasZGVMasterPermission: {
from: 'hasZGVMasterPermission',
default: false
},
hasZGVDoctorPermission: {
from: 'hasZGVDoctorPermission',
default: false
},
hasBismeldenPermission: {
from: 'hasBismeldenPermission',
default: false
},
currentSemester: { currentSemester: {
from: 'currentSemester', from: 'currentSemester',
required: true required: true
@@ -106,7 +122,7 @@ export default {
}, },
methods: { methods: {
loadPrestudent() { async loadPrestudent() {
return this.$api return this.$api
.call(ApiStvPrestudent.get(this.modelValue.prestudent_id, this.currentSemester)) .call(ApiStvPrestudent.get(this.modelValue.prestudent_id, this.currentSemester))
.then(result => result.data) .then(result => result.data)
@@ -154,8 +170,8 @@ export default {
) )
}, },
}, },
created() { async created() {
this.loadPrestudent(); await this.loadPrestudent();
this.$api this.$api
.call(ApiStvPrestudent.getBezeichnungZGV()) .call(ApiStvPrestudent.getBezeichnungZGV())
.then(result => result.data) .then(result => result.data)
@@ -273,6 +289,7 @@ export default {
dropdown dropdown
name="zgv_code" name="zgv_code"
@complete="filterZgvs" @complete="filterZgvs"
:disabled="!hasZGVBakkPermission"
> >
<template #option="slotProps"> <template #option="slotProps">
<div <div
@@ -291,6 +308,7 @@ export default {
type="text" type="text"
v-model="data.zgvort" v-model="data.zgvort"
name="zgvort" name="zgvort"
:disabled="!hasZGVBakkPermission"
> >
</form-input> </form-input>
<form-input <form-input
@@ -307,6 +325,7 @@ export default {
format="dd.MM.yyyy" format="dd.MM.yyyy"
preview-format="dd.MM.yyyy" preview-format="dd.MM.yyyy"
:teleport="true" :teleport="true"
:disabled="!hasZGVBakkPermission"
> >
</form-input> </form-input>
<form-input <form-input
@@ -316,6 +335,7 @@ export default {
type="select" type="select"
v-model="data.zgvnation" v-model="data.zgvnation"
name="zgvnation" name="zgvnation"
:disabled="!hasZGVBakkPermission"
> >
<!-- TODO(chris): gesperrte nationen können nicht ausgewählt werden! Um das zu realisieren müsste man ein pseudo select machen --> <!-- TODO(chris): gesperrte nationen können nicht ausgewählt werden! Um das zu realisieren müsste man ein pseudo select machen -->
<option value="">&nbsp;</option> <option value="">&nbsp;</option>
@@ -336,6 +356,7 @@ export default {
dropdown dropdown
name="zgvmas_code" name="zgvmas_code"
@complete="filterMasterZgvs" @complete="filterMasterZgvs"
:disabled="!hasZGVMasterPermission"
> >
<template #option="slotProps"> <template #option="slotProps">
<div <div
@@ -354,6 +375,7 @@ export default {
type="text" type="text"
v-model="data.zgvmaort" v-model="data.zgvmaort"
name="zgvmaort" name="zgvmaort"
:disabled="!hasZGVMasterPermission"
> >
</form-input> </form-input>
<form-input <form-input
@@ -370,6 +392,7 @@ export default {
format="dd.MM.yyyy" format="dd.MM.yyyy"
preview-format="dd.MM.yyyy" preview-format="dd.MM.yyyy"
:teleport="true" :teleport="true"
:disabled="!hasZGVMasterPermission"
> >
</form-input> </form-input>
<form-input <form-input
@@ -379,6 +402,7 @@ export default {
type="select" type="select"
v-model="data.zgvmanation" v-model="data.zgvmanation"
name="zgvmanation" name="zgvmanation"
:disabled="!hasZGVMasterPermission"
> >
<!-- TODO(chris): gesperrte nationen können nicht ausgewählt werden! Um das zu realisieren müsste man ein pseudo select machen --> <!-- TODO(chris): gesperrte nationen können nicht ausgewählt werden! Um das zu realisieren müsste man ein pseudo select machen -->
<option value="">&nbsp;</option> <option value="">&nbsp;</option>
@@ -400,6 +424,7 @@ export default {
dropdown dropdown
name="zgvdoktor_code" name="zgvdoktor_code"
@complete="filterDoktorZgvs" @complete="filterDoktorZgvs"
:disabled="!hasZGVDoctorPermission"
> >
<template #option="slotProps"> <template #option="slotProps">
<div <div
@@ -418,6 +443,7 @@ export default {
type="text" type="text"
v-model="data.zgvdoktorort" v-model="data.zgvdoktorort"
name="zgvdoktorort" name="zgvdoktorort"
:disabled="!hasZGVDoctorPermission"
> >
</form-input> </form-input>
<form-input <form-input
@@ -434,6 +460,7 @@ export default {
format="dd.MM.yyyy" format="dd.MM.yyyy"
preview-format="dd.MM.yyyy" preview-format="dd.MM.yyyy"
:teleport="true" :teleport="true"
:disabled="!hasZGVDoctorPermission"
> >
</form-input> </form-input>
<form-input <form-input
@@ -443,6 +470,7 @@ export default {
type="select" type="select"
v-model="data.zgvdoktornation" v-model="data.zgvdoktornation"
name="zgvdoktornation" name="zgvdoktornation"
:disabled="!hasZGVDoctorPermission"
> >
<!-- TODO(chris): gesperrte nationen können nicht ausgewählt werden! Um das zu realisieren müsste man ein pseudo select machen --> <!-- TODO(chris): gesperrte nationen können nicht ausgewählt werden! Um das zu realisieren müsste man ein pseudo select machen -->
<option value="">&nbsp;</option> <option value="">&nbsp;</option>
@@ -459,6 +487,7 @@ export default {
type="checkbox" type="checkbox"
v-model="data.zgv_erfuellt" v-model="data.zgv_erfuellt"
name="zgv_erfuellt" name="zgv_erfuellt"
:disabled="!hasZGVBakkPermission"
> >
</form-input> </form-input>
</div> </div>
@@ -470,6 +499,7 @@ export default {
type="checkbox" type="checkbox"
v-model="data.zgvmas_erfuellt" v-model="data.zgvmas_erfuellt"
name="zgvmas_erfuellt" name="zgvmas_erfuellt"
:disabled="!hasZGVMasterPermission"
> >
</form-input> </form-input>
</div> </div>
@@ -481,6 +511,7 @@ export default {
type="checkbox" type="checkbox"
v-model="data.zgvdoktor_erfuellt" v-model="data.zgvdoktor_erfuellt"
name="zgvdoktor_erfuellt" name="zgvdoktor_erfuellt"
:disabled="!hasZGVDoctorPermission"
> >
</form-input> </form-input>
</div> </div>
@@ -601,6 +632,7 @@ export default {
type="checkbox" type="checkbox"
v-model="data.bismelden" v-model="data.bismelden"
name="bismelden" name="bismelden"
:disabled="!hasBismeldenPermission"
> >
</form-input> </form-input>
</div> </div>
@@ -51,7 +51,8 @@ export default{
} }
}, },
props: { props: {
modelValue: Object modelValue: Object,
config: Object,
}, },
data() { data() {
return { return {
@@ -175,15 +176,18 @@ export default{
const data = cell.getData(); const data = cell.getData();
let button = document.createElement('button'); let button = document.createElement('button');
button.className = 'btn btn-outline-secondary btn-action'; if (this.config?.showStatusVorruecken !== false)
button.innerHTML = '<i class="fa fa-forward"></i>'; {
button.title = this.$p.t('ui', 'btn_statusVorruecken'); button.className = 'btn btn-outline-secondary btn-action';
button.addEventListener('click', () => button.innerHTML = '<i class="fa fa-forward"></i>';
this.actionAdvanceStatus(data.status_kurzbz, data.studiensemester_kurzbz, data.ausbildungssemester) button.title = this.$p.t('ui', 'btn_statusVorruecken');
); button.addEventListener('click', () =>
if (!['Student', 'Diplomand', 'Unterbrecher'].includes(data.status_kurzbz)) this.actionAdvanceStatus(data.status_kurzbz, data.studiensemester_kurzbz, data.ausbildungssemester)
button.disabled = true; );
container.append(button); if (!['Student', 'Diplomand', 'Unterbrecher'].includes(data.status_kurzbz))
button.disabled = true;
container.append(button);
}
button = document.createElement('button'); button = document.createElement('button');
button.className = 'btn btn-outline-secondary btn-action'; button.className = 'btn btn-outline-secondary btn-action';
@@ -381,7 +381,6 @@ export default {
return false; return false;
}, },
actionNewPerson() { actionNewPerson() {
this.$refs.newPersonModal.reset();
this.$refs.newPersonModal.open(); this.$refs.newPersonModal.open();
}, },
actionKontaktdatenBearbeiten() { actionKontaktdatenBearbeiten() {
@@ -6,13 +6,18 @@ import FormInput from '../../../Form/Input.js';
import accessibility from '../../../../directives/accessibility.js'; import accessibility from '../../../../directives/accessibility.js';
import ApiStvStudents from '../../../../api/factory/stv/students.js'; import ApiStvStudents from '../../../../api/factory/stv/students.js';
import ApiStvAddress from '../../../../api/factory/stv/kontakt/address.js';
import ApiStudiensemester from '../../../../api/factory/studiensemester.js';
import ApiStudienplan from '../../../../api/factory/studienplan.js';
var _uuid = 0; var _uuid = 0;
const FORMDATA_DEFAULT = { const FORMDATA_DEFAULT = {
address: { address: {
func: 1, checked: true,
nation: 'A' nation: 'A'
}, },
vorname: '',
nachname: '',
geburtsnation: 'A', geburtsnation: 'A',
staatsbuergerschaft: 'A', staatsbuergerschaft: 'A',
ausbildungssemester: 1, ausbildungssemester: 1,
@@ -42,7 +47,7 @@ export default {
data() { data() {
return { return {
places: [], places: [],
formData: FORMDATA_DEFAULT, formData: null,
suggestions: {}, suggestions: {},
person: null, person: null,
semester: [], semester: [],
@@ -60,7 +65,7 @@ export default {
return this.formData; return this.formData;
}, },
orte() { orte() {
return this.places.filter(ort => ort.name == this.formData.address.gemeinde); return this.places.filter(ort => ort.name == this.formData?.address.gemeinde);
}, },
gemeinden() { gemeinden() {
return Object.values(this.places.reduce((res,place) => { return Object.values(this.places.reduce((res,place) => {
@@ -70,7 +75,7 @@ export default {
}, },
formDataStg: { formDataStg: {
get() { get() {
return this.formData.studiengang_kz !== undefined ? this.formData.studiengang_kz : this.studiengangKz; return this.formData?.studiengang_kz !== undefined ? this.formData?.studiengang_kz : this.studiengangKz;
}, },
set(v) { set(v) {
this.formData.studiengang_kz = v; this.formData.studiengang_kz = v;
@@ -78,7 +83,7 @@ export default {
}, },
formDataSem: { formDataSem: {
get() { get() {
return this.formData.studiensemester_kurzbz !== undefined ? this.formData.studiensemester_kurzbz : this.studiensemesterKurzbz; return this.formData?.studiensemester_kurzbz !== undefined ? this.formData?.studiensemester_kurzbz : this.studiensemesterKurzbz;
}, },
set(v) { set(v) {
this.formData.studiensemester_kurzbz = v; this.formData.studiensemester_kurzbz = v;
@@ -98,10 +103,10 @@ export default {
this.$refs.modal.show(); this.$refs.modal.show();
}, },
reset() { reset() {
this.formData = FORMDATA_DEFAULT; this.formData = JSON.parse(JSON.stringify(FORMDATA_DEFAULT));
this.person = null; this.person = null;
this.suggestions = []; this.suggestions = [];
this.$refs.form.clearValidation(); if (this.$refs.form) this.$refs.form.clearValidation();
}, },
loadSuggestions() { loadSuggestions() {
if (this.abortController.suggestions) if (this.abortController.suggestions)
@@ -112,10 +117,10 @@ export default {
this.abortController.suggestions = new AbortController(); this.abortController.suggestions = new AbortController();
this.$api this.$api
.call(ApiStvStudents.check({ .call(ApiStvStudents.getPerson({
vorname: this.formData.vorname, vorname: this.formData?.vorname,
nachname: this.formData.nachname, nachname: this.formData?.nachname,
gebdatum: this.formData.gebdatum gebdatum: this.formData?.gebdatum
}), { }), {
signal: this.abortController.suggestions.signal signal: this.abortController.suggestions.signal
}) })
@@ -134,41 +139,40 @@ export default {
loadPlaces() { loadPlaces() {
if (this.abortController.places) if (this.abortController.places)
this.abortController.places.abort(); this.abortController.places.abort();
if (this.formData.address.nation != 'A' || !this.formData.address.plz) if (this.formData?.address?.nation != 'A' || !this?.formData?.address?.plz)
return; return;
this.abortController.places = new AbortController(); this.abortController.places = new AbortController();
this.$refs.form this.$refs.form.call(
.get( ApiStvAddress.getPlaces(this.formData?.address.plz)
'api/frontend/v1/stv/address/getPlaces/' + this.formData.address.plz, //~ undefined,
undefined, //~ {
{ //~ signal: this.abortController.places.signal
signal: this.abortController.places.signal //~ }
} )
) .then(result => {
.then(result => { this.places = result.data
this.places = result.data })
}) .catch(error => {
.catch(error => { if (error.code != "ERR_CANCELED")
if (error.code != "ERR_CANCELED") window.setTimeout(this.loadPlaces, 100);
window.setTimeout(this.loadPlaces, 100); else
else this.$fhcAlert.handleSystemError(error);
this.$fhcAlert.handleSystemError(error); });
});
}, },
loadStudienplaene() { loadStudienplaene() {
if (this.formDataStg) if (this.formDataStg) {
CoreRESTClient this.$api
.post('components/stv/studienplan/get', { .call(ApiStudienplan.getStudienplaeneBySemester(
studiengang_kz: this.formDataStg, this.formDataStg,
studiensemester_kurzbz: this.formDataSem, this.formDataSem,
ausbildungssemester: this.formData.ausbildungssemester, this.formData?.ausbildungssemester,
orgform_kurzbz: this.formData.orgform_kurzbz this.formData?.orgform_kurzbz
}) ))
.then(result => CoreRESTClient.getData(result.data) || []) .then(result => result.data || [])
.then(result => { .then(result => {
this.studienplaene = result; this.studienplaene = result;
if (this.formData.studienplan_id !== '' && !this.studienplaene.filter(plan => plan.studienplan_id == this.formData.studienplan_id).length) if (this.formData?.studienplan_id !== '' && !this.studienplaene.filter(plan => plan.studienplan_id == this.formData?.studienplan_id).length)
this.formData.studienplan_id = ''; this.formData.studienplan_id = '';
}) })
.catch(error => { .catch(error => {
@@ -179,12 +183,13 @@ export default {
if (error.code != "ERR_CANCELED") if (error.code != "ERR_CANCELED")
window.setTimeout(this.loadStudienplaene, 100); window.setTimeout(this.loadStudienplaene, 100);
}) })
}
}, },
changeAddressNation(e) { changeAddressNation(e) {
if (this.formData['geburtsnation'] == this.formData['address']['nation']) if (this.formData.geburtsnation == this.formData?.address.nation)
this.formData['geburtsnation'] = e.target.value; this.formData.geburtsnation = e.target.value;
if (this.formData['staatsbuergerschaft'] == this.formData['address']['nation']) if (this.formData.staatsbuergerschaft == this.formData?.address.nation)
this.formData['staatsbuergerschaft'] = e.target.value; this.formData.staatsbuergerschaft = e.target.value;
this.loadPlaces(); this.loadPlaces();
}, },
send(e) { send(e) {
@@ -213,29 +218,38 @@ export default {
setPerson(suggestion) setPerson(suggestion)
{ {
this.person = suggestion; this.person = suggestion;
this.formData.address.func = -1; this.formData.address.checked = false;
},
dateFormatter(val)
{
if (!val)
return '';
let date = new Date(val);
return date.toLocaleDateString('de-AT', {
"day": "2-digit",
"month": "2-digit",
"year": "numeric"
});
} }
}, },
created() { created() {
this.uuid = _uuid++; this.uuid = _uuid++;
CoreRESTClient this.reset();
.get('components/stv/Studiensemester') this.$api.call(ApiStudiensemester.getAll())
.then(result => CoreRESTClient.getData(result.data) || []) .then(result => result.data || [])
.then(result => { .then(result => {
this.semester = result; this.semester = result;
}) })
.catch(this.$fhcAlert.handleSystemError); .catch(this.$fhcAlert.handleSystemError);
}, },
template: ` template: `
<fhc-form ref="form" class="stv-list-new" @submit.prevent="send"> <fhc-form ref="form" class="stv-list-new" @submit.prevent="send">
<bs-modal ref="modal" dialog-class="modal-lg modal-dialog-scrollable" @hidden-bs-modal="reset"> <bs-modal ref="modal" dialog-class="modal-lg modal-dialog-scrollable" style="min-height: 500px" @hidden-bs-modal="reset">
<template #title> <template #title>
{{ personOnly ? $p.t('person', 'personAnlegen') : $p.t('lehre', 'interessentAnlegen') }} {{ personOnly ? $p.t('person', 'personAnlegen') : $p.t('lehre', 'interessentAnlegen') }}
</template> </template>
<template #default> <template #default>
<form-validation></form-validation>
<template v-if="person === null"> <template v-if="person === null">
<div class="row"> <div class="row">
<div class="col-sm-4 mb-3"> <div class="col-sm-4 mb-3">
@@ -278,13 +292,22 @@ export default {
no-today no-today
:enable-time-picker="false" :enable-time-picker="false"
format="dd.MM.yyyy" format="dd.MM.yyyy"
:teleport="true"
> >
</form-input> </form-input>
</div> </div>
</div> </div>
<!-- TODO(chris): more details --> <table class="table caption-top table-striped table-hover" >
<table class="table caption-top table-striped table-hover">
<caption>{{ $p.t('person', 'personExistiertPruefung') }}</caption> <caption>{{ $p.t('person', 'personExistiertPruefung') }}</caption>
<thead v-if="suggestions?.length">
<th>{{ $p.t('person', 'nachname') }}</th>
<th>{{ $p.t('person', 'vorname') }}</th>
<th>{{ $p.t('person', 'weitereVornamen') }}</th>
<th>{{ $p.t('person', 'geburtsdatum') }}</th>
<th>{{ $p.t('person', 'geschlecht') }}</th>
<th>{{ $p.t('person', 'adresse') }}</th>
<th>Status</th>
</thead>
<tbody> <tbody>
<tr <tr
v-for="(suggestion, index) in suggestions" v-for="(suggestion, index) in suggestions"
@@ -293,8 +316,21 @@ export default {
@click="(index == 2) ? suggestions.shift() : setPerson(suggestion)" @click="(index == 2) ? suggestions.shift() : setPerson(suggestion)"
v-accessibility:tab.vertical v-accessibility:tab.vertical
> >
<td>{{suggestion.vorname + ' ' + suggestion.nachname}}</td> <td>{{ suggestion.nachname }}</td>
<td></td> <td>{{ suggestion.vorname }}</td>
<td>{{ suggestion.vornamen }}</td>
<td>{{ dateFormatter(suggestion.gebdatum) }}</td>
<td>{{ suggestion.geschlecht_bezeichnung }}</td>
<td>
<div v-for="adresse in suggestion.adressen">
{{ (adresse.plz ?? '') + (adresse.plz && adresse.ort ? ' ' : '') + (adresse.ort ?? '') + (adresse.ort && adresse.strasse ? ', ' : '') + (adresse.strasse ?? '') }}
</div>
</td>
<td>
<div v-for="status in suggestion.status">
{{ status.status_kurzbz + " " + status.studiengang_kuerzel }}
</div>
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -422,19 +458,18 @@ export default {
<div class="row"> <div class="row">
<div class="col-sm-6 mb-3"> <div class="col-sm-6 mb-3">
<form-input <form-input
type="select" :label="$p.t('person', 'adresseHinzufuegen')"
id="stv-list-new-address-func" type="checkbox"
name="address[func]" id="stv-new-adresse"
v-model="formData['address']['func']" name="adresseChecked"
v-model="formData['address']['checked']"
value="true"
> >
<option value="-1" v-if="person">{{ $p.t('person', 'bestehendeAdresseUeberschreiben') }}</option>
<option value="1">{{ $p.t('person', 'adresseHinzufuegen') }}</option>
<option value="0">{{ $p.t('person', 'adresseNichtAnlegen') }}</option>
</form-input> </form-input>
</div> </div>
</div> </div>
<fieldset v-if="formData['address']['checked']">
<fieldset v-if="formData['address']['func'] != 0"> <hr>
<legend>Adresse</legend> <legend>Adresse</legend>
<div class="row"> <div class="row">
<div class="col-sm-4 mb-3"> <div class="col-sm-4 mb-3">
@@ -519,6 +554,7 @@ export default {
</form-input> </form-input>
</div> </div>
</div> </div>
<hr>
</fieldset> </fieldset>
<div class="row"> <div class="row">
@@ -644,7 +680,7 @@ export default {
name="ausbildungssemester" name="ausbildungssemester"
v-model="formData['ausbildungssemester']" v-model="formData['ausbildungssemester']"
:disabled="formData['incoming']" :disabled="formData['incoming']"
@input="loadStudienplaene" @change="loadStudienplaene"
> >
<option v-for="sem in Array.from({length:8}).map((u,i) => i+1)" :key="sem" :value="sem">{{sem}}. Semester</option> <option v-for="sem in Array.from({length:8}).map((u,i) => i+1)" :key="sem" :value="sem">{{sem}}. Semester</option>
</form-input> </form-input>
@@ -658,7 +694,7 @@ export default {
id="stv-list-new-orgform_kurzbz" id="stv-list-new-orgform_kurzbz"
name="orgform_kurzbz" name="orgform_kurzbz"
v-model="formData['orgform_kurzbz']" v-model="formData['orgform_kurzbz']"
@input="loadStudienplaene" @change="loadStudienplaene"
> >
<option value="">-- keine Auswahl --</option> <option value="">-- keine Auswahl --</option>
<option v-for="orgform in lists.orgforms" :key="orgform.orgform_kurzbz" :value="orgform.orgform_kurzbz">{{orgform.bezeichnung}}</option> <option v-for="orgform in lists.orgforms" :key="orgform.orgform_kurzbz" :value="orgform.orgform_kurzbz">{{orgform.bezeichnung}}</option>
@@ -679,7 +715,7 @@ export default {
</div> </div>
<div class="row"> <div class="row">
<div class="col-10 mb-3"> <div class="col-10 mb-3">
<div class="form-check"> <div>
<form-input <form-input
label="Incoming" label="Incoming"
type="checkbox" type="checkbox"
@@ -696,7 +732,7 @@ export default {
</template> </template>
</template> </template>
<template #footer> <template #footer>
<button v-if="person !== null" type="button" class="btn btn-secondary" @click="person = null; formData.address.func = 1;"><i class="fa fa-chevron-left"></i>{{ $p.t('ui', 'zurueck') }}</button> <button v-if="person !== null" type="button" class="btn btn-secondary" @click="person = null; formData.address.checked = true;"><i class="fa fa-chevron-left"></i>{{ $p.t('ui', 'zurueck') }}</button>
<button type="submit" class="btn btn-primary">{{ person === null || personOnly ? $p.t('person', 'personAnlegen') : $p.t('lehre', 'interessentAnlegen') }}</button> <button type="submit" class="btn btn-primary">{{ person === null || personOnly ? $p.t('person', 'personAnlegen') : $p.t('lehre', 'interessentAnlegen') }}</button>
</template> </template>
</bs-modal> </bs-modal>
+103 -1
View File
@@ -38928,7 +38928,7 @@ array(
'phrases' => array( 'phrases' => array(
array( array(
'sprache' => 'German', 'sprache' => 'German',
'text' => 'Anzahl angezeigter vergangender Studiensemester', 'text' => 'Anzahl angezeigter vergangener Studiensemester',
'description' => '', 'description' => '',
'insertvon' => 'system' 'insertvon' => 'system'
), ),
@@ -52330,6 +52330,108 @@ I have been informed that I am under no obligation to consent to the transmissio
) )
), ),
// ### Personen zusammenlegen Phrasen END // ### Personen zusammenlegen Phrasen END
// ### Refactor Messages START
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'errorMissingOrInvalidParameterRecipientTypeId',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Fehlender oder ungültiger Parameter Type_ID Empfänger',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Missing or invalid parameter type ID Recipient',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'errorMissingOrInvalidParameterRecipientIds',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Fehlende(r) oder ungültige(r) Parameter Empfänger-Id(s)',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Missing or invalid parameter(s) Recipient ID(s)',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'errorMissingOrInvalidParameters',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Fehlende(r) oder ungültige(r) Parameter {parameter}',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Missing or invalid parameter(s) {parameter}',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'messages',
'phrase' => 'errorEditorNotAvailable',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Editor-Instanz nicht verfügbar.',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Editor instance is not available.',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'messages',
'phrase' => 'error_missingLogic',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Logik für Type ID {type} nicht implementiert.',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'logic for type ID {type} not implemented.',
'description' => '',
'insertvon' => 'system'
)
)
),
// ### Refactor Messages END
); );