diff --git a/application/controllers/api/frontend/v1/Abgabe.php b/application/controllers/api/frontend/v1/Abgabe.php index b9b382af0..d80a98ced 100644 --- a/application/controllers/api/frontend/v1/Abgabe.php +++ b/application/controllers/api/frontend/v1/Abgabe.php @@ -854,6 +854,16 @@ class Abgabe extends FHCAPI_Controller $existingPaabgabeArr = getData($existingResult); if(count($existingPaabgabeArr) > 0) $existingPaabgabe = $existingPaabgabeArr[0]; + if($existingPaabgabe->note !== null || $existingPaabgabe->abgabedatum !== null) { + // check if a change of paabgabetyp is being attempted -> not allowed at this point + if($paabgabetyp_kurzbz !== $existingPaabgabe->paabgabetyp_kurzbz) { + $this->terminateWithError($this->p->t('abgabetool', 'c4abgabetypAendernNichtErlaubt')); + } + + + // check if a change of deadline aka datum is being attempted -> should not be allowed at this point? + } + $result = $this->PaabgabeModel->update( $paabgabe_id, array( diff --git a/public/js/components/Cis/Abgabetool/AbgabeMitarbeiterDetail.js b/public/js/components/Cis/Abgabetool/AbgabeMitarbeiterDetail.js index fb564ad98..ee25abec5 100644 --- a/public/js/components/Cis/Abgabetool/AbgabeMitarbeiterDetail.js +++ b/public/js/components/Cis/Abgabetool/AbgabeMitarbeiterDetail.js @@ -817,7 +817,7 @@ export const AbgabeMitarbeiterDetail = {