mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 17:02:19 +00:00
new workflow Terminate of Studierendenantrag
- DB Update for new studierendenantrag_statustyp with studierendenantrag_statustyp_kurzbz = 'Storniert' - new permission student/studierendenantrag - possibility to set status to Terminated in case of new permission
This commit is contained in:
@@ -45,7 +45,8 @@ class Leitung extends FHCAPI_Controller
|
||||
'unpauseAntrag' => ['student/antragfreigabe:w', 'student/studierendenantrag:w'],
|
||||
'objectAntrag' => ['student/antragfreigabe:w', 'student/studierendenantrag:w'],
|
||||
'approveObjection' => ['student/antragfreigabe:w', 'student/studierendenantrag:w'],
|
||||
'denyObjection' => ['student/antragfreigabe:w', 'student/studierendenantrag:w']
|
||||
'denyObjection' => ['student/antragfreigabe:w', 'student/studierendenantrag:w'],
|
||||
'terminateAntrag' => ['student/antragstornieren:w']
|
||||
]);
|
||||
|
||||
// Libraries
|
||||
@@ -426,4 +427,37 @@ class Leitung extends FHCAPI_Controller
|
||||
|
||||
return $this->terminateWithSuccess($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function terminateAntrag()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'studierendenantrag_id',
|
||||
'Studierenden Antrag',
|
||||
[
|
||||
'required',
|
||||
['isEntitledToTerminateAntrag', [$this->antraglib, 'isEntitledToTerminateAntrag']],
|
||||
['antragCanBeTerminated', [$this->antraglib, 'antragCanBeTerminated']]
|
||||
],
|
||||
[
|
||||
'isEntitledToUnpauseAntrag' => $this->p->t('studierendenantrag', 'error_no_right'),
|
||||
'antragCanBeTerminated' => $this->p->t(
|
||||
'studierendenantrag',
|
||||
'error_not_terminated',
|
||||
['id' => $this->input->post('studierendenantrag_id')]
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
|
||||
|
||||
$result = $this->antraglib->terminateAntrag($studierendenantrag_id, getAuthUID());
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess($studierendenantrag_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,9 +86,12 @@ class Studierendenantrag extends FHC_Controller
|
||||
|
||||
$stgA = $this->permissionlib->getSTG_isEntitledFor('student/studierendenantrag') ?: [];
|
||||
|
||||
$permissionTerminateAntrag = $this->permissionlib->isBerechtigt('student/antragstornieren');
|
||||
|
||||
$this->load->view('lehre/Antrag/Leitung/List', [
|
||||
'stgA' => $stgA,
|
||||
'stgL' => $stgL
|
||||
'stgL' => $stgL,
|
||||
'permissionTerminateAntrag' => $permissionTerminateAntrag
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user