mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Merge remote-tracking branch 'origin/feature-15314/infocenter_abgewiesen_von_nicht_abgeschickten' into feature/infocenter_anpassungen
This commit is contained in:
@@ -742,7 +742,7 @@ class InfoCenter extends Auth_Controller
|
||||
|
||||
if (hasData($lastStatus) && hasData($statusgrresult))
|
||||
{
|
||||
//check if still Interessent
|
||||
//check if still Interessent, Bewerber or Wartender
|
||||
if ($lastStatus->retval[0]->status_kurzbz === self::INTERESSENTSTATUS
|
||||
|| $lastStatus->retval[0]->status_kurzbz === self::BEWERBERSTATUS
|
||||
|| $lastStatus->retval[0]->status_kurzbz === self::WARTENDER)
|
||||
@@ -2142,17 +2142,18 @@ class InfoCenter extends Auth_Controller
|
||||
{
|
||||
$statusgrund = $this->input->post('statusgrund');
|
||||
$studiengang = $this->input->post('studiengang');
|
||||
$abgeschickt = $this->input->post('abgeschickt');
|
||||
$personen = $this->input->post('personen');
|
||||
$studienSemester = $this->variablelib->getVar('infocenter_studiensemester');
|
||||
|
||||
if ($statusgrund === 'null' || $studiengang === 'null' || empty($personen))
|
||||
$this->terminateWithJsonError("Bitte Statusgrund, Studiengang und Personen auswählen.");
|
||||
if ($statusgrund === 'null' || $studiengang === 'null' || $abgeschickt === 'null' || empty($personen))
|
||||
$this->terminateWithJsonError("Bitte füllen Sie alle Felder aus");
|
||||
|
||||
foreach($personen as $person)
|
||||
{
|
||||
$prestudent = $this->PrestudentModel->getPrestudentByStudiengangAndPerson($studiengang, $person, $studienSemester);
|
||||
$prestudent = $this->PrestudentModel->getPrestudentByStudiengangAndPerson($studiengang, $person, $studienSemester, $abgeschickt);
|
||||
|
||||
if(!hasData($prestudent))
|
||||
if (!hasData($prestudent))
|
||||
continue;
|
||||
|
||||
$prestudentData = getData($prestudent);
|
||||
|
||||
@@ -611,7 +611,7 @@ class Prestudent_model extends DB_Model
|
||||
));
|
||||
}
|
||||
|
||||
public function getPrestudentByStudiengangAndPerson($studiengang, $person, $studienSemester)
|
||||
public function getPrestudentByStudiengangAndPerson($studiengang, $person, $studienSemester, $abgeschickt)
|
||||
{
|
||||
$query = "SELECT ps.prestudent_id
|
||||
FROM public.tbl_prestudentstatus pss
|
||||
@@ -621,7 +621,17 @@ class Prestudent_model extends DB_Model
|
||||
WHERE ps.person_id = ?
|
||||
AND UPPER((sg.typ || sg.kurzbz) || ':' || sp.orgform_kurzbz) = ?
|
||||
AND pss.studiensemester_kurzbz = ?
|
||||
";
|
||||
AND";
|
||||
|
||||
if ($abgeschickt === 'true')
|
||||
$query .= " EXISTS";
|
||||
else
|
||||
$query .= " NOT EXISTS";
|
||||
|
||||
$query .= " (SELECT 1 FROM public.tbl_prestudentstatus spss
|
||||
JOIN public.tbl_prestudent sps USING(prestudent_id)
|
||||
WHERE sps.prestudent_id = ps.prestudent_id
|
||||
AND spss.bewerbung_abgeschicktamum IS NOT NULL)";
|
||||
|
||||
return $this->execQuery($query, array($person, $studiengang, $studienSemester));
|
||||
}
|
||||
|
||||
@@ -49,6 +49,11 @@ var InfocenterPersonDataset = {
|
||||
'<select class="form-control auswahlAbsageStg" style="width:auto; float:left;">' +
|
||||
'<option value="null" selected="selected"> Studiengang </option>' +
|
||||
'</select>' +
|
||||
'<select class="form-control auswahlAbsageAbgeschickt" style="width:auto; float:left;">' +
|
||||
'<option value="null" selected="selected"> Bewerbung abgeschickt? </option>' +
|
||||
'<option value="true"> Ja </option>' +
|
||||
'<option value="false"> Nein </option>' +
|
||||
'</select>' +
|
||||
'<button class="btn btn-default auswahlAbsageBtn" style="float:left"> Absage </button>';
|
||||
|
||||
InfocenterPersonDataset.getAbsageData();
|
||||
@@ -327,6 +332,7 @@ var InfocenterPersonDataset = {
|
||||
|
||||
var statusgrund = $('.absgstatusgrund').val();
|
||||
var studiengang = $('.auswahlAbsageStg').val();
|
||||
var abgeschickt = $('.auswahlAbsageAbgeschickt').val();
|
||||
|
||||
var personen = [];
|
||||
|
||||
@@ -340,7 +346,8 @@ var InfocenterPersonDataset = {
|
||||
{
|
||||
'statusgrund': statusgrund,
|
||||
'studiengang': studiengang,
|
||||
'personen' : personen
|
||||
'personen' : personen,
|
||||
'abgeschickt' : abgeschickt
|
||||
},
|
||||
{
|
||||
successCallback: function(data, textStatus, jqXHR) {
|
||||
|
||||
Reference in New Issue
Block a user