mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Merge branch 'feature-55978/infocenter_electronic_onboarding_filter' into demo
This commit is contained in:
@@ -22,6 +22,7 @@ class InfoCenter extends Auth_Controller
|
||||
const REIHUNGSTESTABSOLVIERT_PAGE = 'reihungstestAbsolviert';
|
||||
const ABGEWIESEN_PAGE = 'abgewiesen';
|
||||
const AUFGENOMMEN_PAGE = 'aufgenommen';
|
||||
const ONBOARDING_PAGE = 'onboarding';
|
||||
const SHOW_DETAILS_PAGE = 'showDetails';
|
||||
const SHOW_ZGV_DETAILS_PAGE = 'showZGVDetails';
|
||||
const ZGV_UBERPRUEFUNG_PAGE = 'ZGVUeberpruefung';
|
||||
@@ -116,6 +117,7 @@ class InfoCenter extends Auth_Controller
|
||||
'index' => 'infocenter:r',
|
||||
'freigegeben' => 'infocenter:r',
|
||||
'abgewiesen' => 'infocenter:r',
|
||||
'onboarding' => 'infocenter:r',
|
||||
'aufgenommen' => 'infocenter:r',
|
||||
'reihungstestAbsolviert' => 'infocenter:r',
|
||||
'showDetails' => 'infocenter:r',
|
||||
@@ -230,6 +232,13 @@ class InfoCenter extends Auth_Controller
|
||||
|
||||
$this->load->view('system/infocenter/infocenterAbgewiesen.php');
|
||||
}
|
||||
|
||||
public function onboarding()
|
||||
{
|
||||
$this->_setNavigationMenu(self::ONBOARDING_PAGE); // define the navigation menu for this page
|
||||
|
||||
$this->load->view('system/infocenter/onboarding.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* Aufgenommene page of the InfoCenter tool
|
||||
@@ -1552,6 +1561,7 @@ class InfoCenter extends Auth_Controller
|
||||
$reihungstestAbsolviertLink = site_url(self::INFOCENTER_URI.'/'.self::REIHUNGSTESTABSOLVIERT_PAGE);
|
||||
$abgewiesenLink = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE);
|
||||
$aufgenommenLink = site_url(self::INFOCENTER_URI.'/'.self::AUFGENOMMEN_PAGE);
|
||||
$onboardingLink = site_url(self::INFOCENTER_URI.'/'.self::ONBOARDING_PAGE);
|
||||
|
||||
$currentFilterId = $this->input->get(self::FILTER_ID);
|
||||
if (isset($currentFilterId))
|
||||
@@ -1560,6 +1570,7 @@ class InfoCenter extends Auth_Controller
|
||||
$reihungstestAbsolviertLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId;
|
||||
$abgewiesenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId;
|
||||
$aufgenommenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId;
|
||||
$onboardingLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId;
|
||||
}
|
||||
|
||||
$this->navigationlib->setSessionMenu(
|
||||
@@ -1623,6 +1634,18 @@ class InfoCenter extends Auth_Controller
|
||||
'', // target
|
||||
40 // sort
|
||||
),
|
||||
'ohnePrestudent' => $this->navigationlib->oneLevel(
|
||||
'Electronic Onboarding', // description
|
||||
$onboardingLink, // link
|
||||
null, // children
|
||||
'users', // icon
|
||||
null, // subscriptDescription
|
||||
false, // expand
|
||||
null, // subscriptLinkClass
|
||||
null, // subscriptLinkValue
|
||||
'', // target
|
||||
50 // sort
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -1649,6 +1672,8 @@ class InfoCenter extends Auth_Controller
|
||||
$link = site_url(self::ZGV_UEBERPRUEFUNG_URI);
|
||||
if ($origin_page === self::ABGEWIESEN_PAGE)
|
||||
$link = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE);
|
||||
if ($origin_page === self::ONBOARDING_PAGE)
|
||||
$link = site_url(self::INFOCENTER_URI.'/'.self::ONBOARDING_PAGE);
|
||||
|
||||
if ($origin_page === self::AUFGENOMMEN_PAGE)
|
||||
$link = site_url(self::INFOCENTER_URI.'/'.self::AUFGENOMMEN_PAGE);
|
||||
@@ -1690,6 +1715,7 @@ class InfoCenter extends Auth_Controller
|
||||
$freigegebenLink = site_url(self::INFOCENTER_URI.'/'.self::FREIGEGEBEN_PAGE);
|
||||
$absolviertLink = site_url(self::INFOCENTER_URI.'/'.self::REIHUNGSTESTABSOLVIERT_PAGE);
|
||||
$abgewiesenLink = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE);
|
||||
$onboardingLink = site_url(self::INFOCENTER_URI.'/'.self::ONBOARDING_PAGE);
|
||||
$prevFilterId = $this->input->get(self::PREV_FILTER_ID);
|
||||
if (isset($prevFilterId))
|
||||
{
|
||||
@@ -1766,6 +1792,24 @@ class InfoCenter extends Auth_Controller
|
||||
)
|
||||
);
|
||||
}
|
||||
if($page == self::ONBOARDING_PAGE)
|
||||
{
|
||||
$this->navigationlib->setSessionElementMenu(
|
||||
'onboarding',
|
||||
$this->navigationlib->oneLevel(
|
||||
'Electronic Onboarding', // description
|
||||
$onboardingLink, // link
|
||||
null, // children
|
||||
'users', // icon
|
||||
null, // subscriptDescription
|
||||
false, // expand
|
||||
null, // subscriptLinkClass
|
||||
null, // subscriptLinkValue
|
||||
'', // target
|
||||
50 // sort
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
array(
|
||||
'title' => 'Info Center',
|
||||
'jquery3' => true,
|
||||
'jqueryui1' => true,
|
||||
'jquerycheckboxes1' => true,
|
||||
'bootstrap3' => true,
|
||||
'fontawesome4' => true,
|
||||
'sbadmintemplate3' => true,
|
||||
'tablesorter2' => true,
|
||||
'ajaxlib' => true,
|
||||
'filterwidget' => true,
|
||||
'navigationwidget' => true,
|
||||
'dialoglib' => true,
|
||||
'phrases' => array(
|
||||
'person' => array('vorname', 'nachname'),
|
||||
'ui' => array('bitteEintragWaehlen')
|
||||
),
|
||||
'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/infocenter/infocenterPersonDataset.css'),
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js')
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
<div id="wrapper">
|
||||
|
||||
<?php echo $this->widgetlib->widget('NavigationWidget'); ?>
|
||||
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header">
|
||||
Electronic Onboarding
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<?php $this->load->view('system/infocenter/onboardingData.php'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('templates/FHC-Footer'); ?>
|
||||
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
|
||||
$APP = '\'infocenter\'';
|
||||
$KENNZEICHEN = '\'eobRegistrierungsId\'';
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
p.person_id AS "PersonId",
|
||||
p.vorname AS "Vorname",
|
||||
p.nachname AS "Nachname",
|
||||
pl.zeitpunkt AS "LockDate",
|
||||
pl.lockuser AS "LockUser",
|
||||
rueck.datum_bis AS "HoldDate",
|
||||
rueck.bezeichnung AS "Rueckstellgrund"
|
||||
FROM public.tbl_person p
|
||||
JOIN tbl_kennzeichen ON p.person_id = tbl_kennzeichen.person_id AND kennzeichentyp_kurzbz = '. $KENNZEICHEN .'
|
||||
LEFT JOIN (
|
||||
SELECT tpl.person_id,
|
||||
tpl.zeitpunkt,
|
||||
sp.nachname AS lockuser
|
||||
FROM system.tbl_person_lock tpl
|
||||
JOIN public.tbl_benutzer sb USING (uid)
|
||||
JOIN public.tbl_person sp ON sb.person_id = sp.person_id
|
||||
WHERE tpl.app = '.$APP.'
|
||||
) pl ON p.person_id = pl.person_id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
tbl_rueckstellung.person_id,
|
||||
tbl_rueckstellung.datum_bis,
|
||||
tbl_rueckstellung.status_kurzbz,
|
||||
array_to_json(bezeichnung_mehrsprachig::varchar[])->>0 as bezeichnung
|
||||
FROM public.tbl_rueckstellung
|
||||
JOIN public.tbl_rueckstellung_status USING(status_kurzbz)
|
||||
JOIN public.tbl_person sp ON tbl_rueckstellung.person_id = sp.person_id
|
||||
WHERE tbl_rueckstellung.rueckstellung_id =
|
||||
(
|
||||
SELECT srueck.rueckstellung_id
|
||||
FROM public.tbl_rueckstellung srueck
|
||||
WHERE srueck.person_id = tbl_rueckstellung.person_id
|
||||
AND datum_bis >= NOW()
|
||||
ORDER BY srueck.datum_bis DESC LIMIT 1
|
||||
)
|
||||
) rueck ON rueck.person_id = p.person_id
|
||||
WHERE p.person_id NOT IN (SELECT person_id FROM public.tbl_prestudent)';
|
||||
|
||||
$filterWidgetArray = array(
|
||||
'query' => $query,
|
||||
'app' => InfoCenter::APP,
|
||||
'datasetName' => 'onboarding',
|
||||
'filter_id' => $this->input->get('filter_id'),
|
||||
'requiredPermissions' => 'infocenter',
|
||||
'datasetRepresentation' => 'tablesorter',
|
||||
'checkboxes' => 'PersonId',
|
||||
'additionalColumns' => array('Details'),
|
||||
'columnsAliases' => array(
|
||||
'PersonId',
|
||||
ucfirst($this->p->t('person', 'vorname')) ,
|
||||
ucfirst($this->p->t('person', 'nachname')),
|
||||
ucfirst($this->p->t('global', 'sperrdatum')),
|
||||
ucfirst($this->p->t('global', 'gesperrtVon')),
|
||||
ucfirst($this->p->t('infocenter', 'rueckstelldatum')),
|
||||
ucfirst($this->p->t('infocenter', 'rueckstellgrund')),
|
||||
),
|
||||
|
||||
'formatRow' => function($datasetRaw) {
|
||||
/* NOTE: Dont use $this here for PHP Version compatibility */
|
||||
$datasetRaw->{'Details'} = sprintf(
|
||||
'<a href="%s?person_id=%s&origin_page=%s&fhc_controller_id=%s&prev_filter_id=%s">Details</a>',
|
||||
site_url('system/infocenter/InfoCenter/showDetails'),
|
||||
$datasetRaw->{'PersonId'},
|
||||
'onboarding',
|
||||
(isset($_GET['fhc_controller_id']) ? $_GET['fhc_controller_id'] : ''),
|
||||
(isset($_GET['filter_id']) ? $_GET['filter_id'] : '')
|
||||
);
|
||||
|
||||
if ($datasetRaw->{'LockDate'} == null)
|
||||
{
|
||||
$datasetRaw->{'LockDate'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'LockUser'} == null)
|
||||
{
|
||||
$datasetRaw->{'LockUser'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'HoldDate'} == null)
|
||||
{
|
||||
$datasetRaw->{'HoldDate'} = '-';
|
||||
}
|
||||
else
|
||||
{
|
||||
$datasetRaw->{'HoldDate'} = date_format(date_create($datasetRaw->{'HoldDate'}), 'Y-m-d H:i');
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'Rueckstellgrund'} === null)
|
||||
{
|
||||
$datasetRaw->{'Rueckstellgrund'} = '-';
|
||||
}
|
||||
|
||||
return $datasetRaw;
|
||||
},
|
||||
|
||||
'markRow' => function($datasetRaw) {
|
||||
|
||||
if ($datasetRaw->LockDate != null)
|
||||
{
|
||||
return FilterWidget::DEFAULT_MARK_ROW_CLASS;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
);
|
||||
|
||||
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
|
||||
?>
|
||||
@@ -529,6 +529,29 @@ $filters = array(
|
||||
',
|
||||
'oe_kurzbz' => null,
|
||||
),
|
||||
array(
|
||||
'app' => 'infocenter',
|
||||
'dataset_name' => 'onboarding',
|
||||
'filter_kurzbz' => 'InfoCenterOnboarding',
|
||||
'description' => '{Alle}',
|
||||
'sort' => 1,
|
||||
'default_filter' => true,
|
||||
'filter' => '
|
||||
{
|
||||
"name": "Electronic Onboarding - Alle",
|
||||
"columns": [
|
||||
{"name": "PersonId"},
|
||||
{"name": "Vorname"},
|
||||
{"name": "Nachname"},
|
||||
{"name": "LockUser"},
|
||||
{"name": "HoldDate"},
|
||||
{"name": "Rueckstellgrund"}
|
||||
],
|
||||
"filters": []
|
||||
}
|
||||
',
|
||||
'oe_kurzbz' => null,
|
||||
),
|
||||
array(
|
||||
'app' => 'infocenter',
|
||||
'dataset_name' => 'aufgenommen',
|
||||
|
||||
Reference in New Issue
Block a user