mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 08:52:21 +00:00
Bug: Studierenden-Ansicht: Abmeldung bearbeiten bei mehrfachen Abmeldungen
This commit is contained in:
@@ -57,13 +57,17 @@ class Abmeldung extends FHC_Controller
|
||||
}
|
||||
elseif ($result == -1)
|
||||
{
|
||||
$result = $this->antraglib->getDetailsForLastAntrag($prestudent_id, Studierendenantrag_model::TYP_ABMELDUNG);
|
||||
$result = $this->antraglib->getDetailsForLastAntrag($prestudent_id, [Studierendenantrag_model::TYP_ABMELDUNG, Studierendenantrag_model::TYP_ABMELDUNG_STGL]);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
|
||||
$data = getData($result);
|
||||
$data->canCancel = (boolean)$this->antraglib->isEntitledToCancelAntrag($data->studierendenantrag_id);
|
||||
|
||||
$data->canCancel = (
|
||||
$data->status == Studierendenantragstatus_model::STATUS_CREATED &&
|
||||
$this->antraglib->isEntitledToCancelAntrag($data->studierendenantrag_id)
|
||||
);
|
||||
|
||||
return $this->outputJsonSuccess($data);
|
||||
}
|
||||
@@ -87,7 +91,7 @@ class Abmeldung extends FHC_Controller
|
||||
|
||||
$data = getData($result);
|
||||
|
||||
if ($data->typ !== Studierendenantrag_model::TYP_ABMELDUNG_STGL)
|
||||
if ($data->typ !== Studierendenantrag_model::TYP_ABMELDUNG_STGL && $data->typ !== Studierendenantrag_model::TYP_ABMELDUNG)
|
||||
return show_404();
|
||||
|
||||
$this->outputJsonSuccess($data);
|
||||
|
||||
Reference in New Issue
Block a user