diff --git a/application/controllers/api/frontend/v1/stv/Prestudent.php b/application/controllers/api/frontend/v1/stv/Prestudent.php
index 4d0aa5fe1..7dc607d1a 100644
--- a/application/controllers/api/frontend/v1/stv/Prestudent.php
+++ b/application/controllers/api/frontend/v1/stv/Prestudent.php
@@ -138,13 +138,24 @@ class Prestudent extends FHCAPI_Controller
{
$val = $this->input->post($prop, true);
- if ($val !== null || $prop === 'foerderrelevant') {
+ if ($val !== null) {
+ if(in_array($prop, ['dual', 'bismelden', 'foerderrelevant']))
+ {
+ $val = boolval($val);
+ }
+ elseif (
+ $val === ''
+ && in_array($prop, ['zgvnation', 'zgvmanation', 'zgvdoktornation', 'berufstaetigkeit_code', 'ausbildungcode'])
+ )
+ {
+ $val = null;
+ }
$update_prestudent[$prop] = $val;
}
// allowed to be null, but has to be in postparameter
if (
- in_array($prop, ['zgvdatum', 'zgvmadatum', 'zgvdoktordatum', 'zgv_code', 'zgvmas_code', 'zgvdoktor_code'])
+ in_array($prop, ['foerderrelevant', 'zgvdatum', 'zgvmadatum', 'zgvdoktordatum', 'zgv_code', 'zgvmas_code', 'zgvdoktor_code'])
&& !isset($update_prestudent[$prop])
&& array_key_exists($prop, $_POST)
)
diff --git a/application/controllers/api/frontend/v1/stv/Status.php b/application/controllers/api/frontend/v1/stv/Status.php
index 665fb620f..dc48a47ff 100644
--- a/application/controllers/api/frontend/v1/stv/Status.php
+++ b/application/controllers/api/frontend/v1/stv/Status.php
@@ -286,11 +286,11 @@ class Status extends FHCAPI_Controller
]);
$this->form_validation->set_rules('_default', '', [
- ['meldestichtag_not_exceeded', function () use ($datum, $isBerechtigtNoStudstatusCheck) {
+ ['meldestichtag_not_exceeded', function () use ($datum_string, $isBerechtigtNoStudstatusCheck) {
if ($isBerechtigtNoStudstatusCheck)
return true; // Skip if access right says so
- $result = $this->prestudentstatuschecklib->checkIfMeldestichtagErreicht($datum);
+ $result = $this->prestudentstatuschecklib->checkIfMeldestichtagErreicht($datum_string);
return !$this->getDataOrTerminateWithError($result);
}],
@@ -733,8 +733,9 @@ class Status extends FHCAPI_Controller
);
$result = $this->prestudentstatuschecklib->checkIfMeldestichtagErreicht($oldstatus->datum);
+ $isMeldestichtagErreicht = $this->getDataOrTerminateWithError($result);
- if (!$this->getDataOrTerminateWithError($result))
+ if ($isMeldestichtagErreicht)
$this->terminateWithError(
$this->p->t('lehre', 'error_dataVorMeldestichtag'),
self::ERROR_TYPE_GENERAL,
diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Prestudent.js b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent.js
index 3fa43e624..dc645dadc 100644
--- a/public/js/components/Stv/Studentenverwaltung/Details/Prestudent.js
+++ b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent.js
@@ -318,6 +318,7 @@ export default {
name="zgvnation"
>
+
@@ -380,6 +381,7 @@ export default {
name="zgvmanation"
>
+
@@ -443,6 +445,7 @@ export default {
name="zgvdoktornation"
>
+
@@ -504,6 +507,7 @@ export default {
v-model="data.berufstaetigkeit_code"
name="berufstaetigkeit_code"
>
+
+
diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Status/Modal.js b/public/js/components/Stv/Studentenverwaltung/Details/Status/Modal.js
index edbd3b6ea..8b0252be8 100644
--- a/public/js/components/Stv/Studentenverwaltung/Details/Status/Modal.js
+++ b/public/js/components/Stv/Studentenverwaltung/Details/Status/Modal.js
@@ -205,7 +205,7 @@ export default{
];*/
},
template: `
-
+
{{ $p.t('lehre', statusNew ? 'status_new' : 'status_edit', prestudent) }}