From cfb4c5ad74516306144ecbcf8704f24132531aed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Fri, 26 Jan 2018 12:44:26 +0100 Subject: [PATCH] =?UTF-8?q?Filter=20f=C3=BCr=20Infocenter=20angepasst?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/infocenter/InfoCenter.php | 10 +++--- .../system/infocenter/infocenterData.php | 32 ++++++++++++------- application/widgets/FilterWidget.php | 2 +- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 54c697950..1d0b25b3f 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -3,13 +3,13 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); /** - * Also shows aufnahme-related data for a person and its prestudents, enables document and zgv checks, - * displays and saves Notizen for a person, logs aufnahme-related actions for a person + * Also shows infocenter-related data for a person and its prestudents, enables document and zgv checks, + * displays and saves Notizen for a person, logs infocenter-related actions for a person */ class InfoCenter extends VileSci_Controller { // App and Verarbeitungstaetigkeit name for logging - const APP = 'aufnahme'; + const APP = 'infocenter'; const TAETIGKEIT = 'bewerbung'; // URL prefix for this controller @@ -374,7 +374,7 @@ class InfoCenter extends VileSci_Controller */ private function _setNavigationMenuArray() { - $filtersSent = $this->FiltersModel->getFilterList('aufnahme', 'PersonActions', '%InfoCenterSentApplication%'); + $filtersSent = $this->FiltersModel->getFilterList('infocenter', 'PersonActions', '%InfoCenterSentApplication%'); if (hasData($filtersSent)) { for ($filtersCounter = 0; $filtersCounter < count($filtersSent->retval); $filtersCounter++) @@ -385,7 +385,7 @@ class InfoCenter extends VileSci_Controller } } - $filtersNotSent = $this->FiltersModel->getFilterList('aufnahme', 'PersonActions', '%InfoCenterNotSentApplication%'); + $filtersNotSent = $this->FiltersModel->getFilterList('infocenter', 'PersonActions', '%InfoCenterNotSentApplication%'); if (hasData($filtersNotSent)) { for ($filtersCounter = 0; $filtersCounter < count($filtersNotSent->retval); $filtersCounter++) diff --git a/application/views/system/infocenter/infocenterData.php b/application/views/system/infocenter/infocenterData.php index d307529ea..53e274866 100644 --- a/application/views/system/infocenter/infocenterData.php +++ b/application/views/system/infocenter/infocenterData.php @@ -31,9 +31,8 @@ JOIN public.tbl_studiengang USING(studiengang_kz) WHERE pss.status_kurzbz = \'Interessent\' AND pss.bestaetigtam IS NULL - AND pss.bestaetigtvon IS NULL AND ps.person_id = p.person_id - AND tbl_studiengang.typ in(\'b\', \'m\') + AND tbl_studiengang.typ in(\'b\') ORDER BY pss.datum DESC, pss.insertamum DESC, pss.ext_id DESC LIMIT 1 ) AS "Studiensemester", @@ -44,13 +43,24 @@ INNER JOIN public.tbl_prestudent ps USING(prestudent_id) JOIN public.tbl_studiengang USING(studiengang_kz) WHERE pss.status_kurzbz = \'Interessent\' - AND pss.bestaetigtam IS NULL - AND pss.bestaetigtvon IS NULL + AND pss.bewerbung_abgeschicktamum IS NOT NULL AND ps.person_id = p.person_id - AND tbl_studiengang.typ in(\'b\', \'m\') + AND tbl_studiengang.typ in(\'b\') ORDER BY pss.datum DESC, pss.insertamum DESC, pss.ext_id DESC LIMIT 1 - ) AS "SendDate" + ) AS "SendDate", + ( + SELECT count(*) + FROM + public.tbl_prestudentstatus pss + INNER JOIN public.tbl_prestudent ps USING(prestudent_id) + JOIN public.tbl_studiengang USING(studiengang_kz) + WHERE pss.status_kurzbz = \'Interessent\' + AND pss.bewerbung_abgeschicktamum IS NOT NULL + AND ps.person_id = p.person_id + AND tbl_studiengang.typ in(\'b\') + LIMIT 1 + ) AS "AnzahlAbgeschickt" FROM public.tbl_person p WHERE EXISTS( @@ -60,7 +70,7 @@ JOIN public.tbl_studiengang USING(studiengang_kz) WHERE person_id=p.person_id - AND tbl_studiengang.typ in(\'b\', \'m\') + AND tbl_studiengang.typ in(\'b\') AND \'Interessent\' = (SELECT status_kurzbz FROM public.tbl_prestudentstatus WHERE prestudent_id=tbl_prestudent.prestudent_id ORDER BY datum DESC, insertamum DESC, ext_id DESC @@ -75,7 +85,6 @@ prestudent_id = tbl_prestudent.prestudent_id AND status_kurzbz = \'Interessent\' AND bestaetigtam IS NULL - AND bestaetigtvon IS NULL AND studiensemester_kurzbz IN ( SELECT studiensemester_kurzbz FROM public.tbl_studiensemester @@ -87,6 +96,7 @@ ', 'hideHeader' => true, 'hideSave' => true, + 'checkboxes' => array('PersonId'), 'additionalColumns' => array('Details'), 'formatRaw' => function($fieldName, $fieldValue, $datasetRaw) { @@ -103,7 +113,7 @@ if ($fieldName == 'SendDate') { - if ($datasetRaw->{$fieldName} == '1970.01.01 01:00:00') + if ($datasetRaw->{$fieldName} == '01.01.1970 01:00:00') { $datasetRaw->{$fieldName} = 'Not sent'; } @@ -111,7 +121,7 @@ if ($fieldName == 'LastAction') { - if ($datasetRaw->{$fieldName} == '1970.01.01 01:00:00') + if ($datasetRaw->{$fieldName} == '01.01.1970 01:00:00') { $datasetRaw->{$fieldName} = 'Not logged'; } @@ -137,7 +147,7 @@ } else { - $filterWidgetArray['app'] = 'aufnahme'; + $filterWidgetArray['app'] = 'infocenter'; $filterWidgetArray['datasetName'] = 'PersonActions'; $filterWidgetArray['filterKurzbz'] = 'InfoCenterNotSentApplicationAll'; } diff --git a/application/widgets/FilterWidget.php b/application/widgets/FilterWidget.php index 86e529302..ab6d9ba6b 100644 --- a/application/widgets/FilterWidget.php +++ b/application/widgets/FilterWidget.php @@ -57,7 +57,7 @@ class FilterWidget extends Widget const OPT_DAYS = 'days'; const OPT_MONTHS = 'months'; - const DEFAULT_DATE_FORMAT = 'Y.m.d H:i:s'; + const DEFAULT_DATE_FORMAT = 'd.m.Y H:i:s'; private $app; private $query;