mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 09:52:22 +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);
|
||||
|
||||
@@ -1204,8 +1204,12 @@ class AntragLib
|
||||
$where = [
|
||||
'prestudent_id' => $prestudent_id
|
||||
];
|
||||
if ($typ)
|
||||
$where['typ'] = $typ;
|
||||
if ($typ) {
|
||||
if (is_array($typ))
|
||||
$this->_ci->StudierendenantragModel->db->where_in('typ', $typ);
|
||||
else
|
||||
$where['typ'] = $typ;
|
||||
}
|
||||
$result = $this->_ci->StudierendenantragModel->loadWithStatusWhere($where);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
|
||||
Reference in New Issue
Block a user