mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 00:24:35 +00:00
- rueckstellgruende umbenannt
- sort in der tabelle hinzugefuegt - anzeige angepasst
This commit is contained in:
@@ -21,7 +21,7 @@ class Rueckstellung extends Auth_Controller
|
||||
|
||||
$this->load->model('crm/Rueckstellung_model', 'RueckstellungModel');
|
||||
$this->load->model('crm/RueckstellungStatus_model', 'RueckstellungStatusModel');
|
||||
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
$this->_setAuthUID(); // sets property uid
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
@@ -36,7 +36,17 @@ class Rueckstellung extends Auth_Controller
|
||||
$this->terminateWithJsonError($this->_ci->p->t('ui', 'fehlerBeimLesen'));
|
||||
|
||||
if (hasData($rueckstellung))
|
||||
$result = getData($rueckstellung)[0];
|
||||
{
|
||||
$rueckstellung = getData($rueckstellung)[0];
|
||||
$fullName = getData($this->_ci->PersonModel->getFullName($rueckstellung->insertvon));
|
||||
|
||||
$result = array(
|
||||
'von' => $fullName,
|
||||
'bezeichnung' => $rueckstellung->bezeichnung,
|
||||
'bis' => $rueckstellung->datum_bis
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$this->outputJsonSuccess($result);
|
||||
}
|
||||
@@ -77,6 +87,7 @@ class Rueckstellung extends Auth_Controller
|
||||
|
||||
public function getStatus($aktiv = true)
|
||||
{
|
||||
$this->_ci->RueckstellungStatusModel->addOrder('sort');
|
||||
$result = $this->_ci->RueckstellungStatusModel->loadWhere(array('aktiv' => $aktiv));
|
||||
|
||||
if (isError($result))
|
||||
|
||||
@@ -305,7 +305,16 @@
|
||||
AND person_id = p.person_id
|
||||
ORDER BY datum_bis DESC
|
||||
LIMIT 1
|
||||
) AS "OnholdDate"
|
||||
) AS "OnholdDate",
|
||||
(
|
||||
SELECT array_to_json(bezeichnung_mehrsprachig::varchar[])->>0
|
||||
FROM public.tbl_rueckstellung
|
||||
JOIN public.tbl_rueckstellung_status USING (status_kurzbz)
|
||||
WHERE datum_bis >= NOW()
|
||||
AND person_id = p.person_id
|
||||
ORDER BY datum_bis DESC
|
||||
LIMIT 1
|
||||
) AS "Rueckstellgrund"
|
||||
FROM public.tbl_person p
|
||||
LEFT JOIN (
|
||||
SELECT tpl.person_id,
|
||||
@@ -381,7 +390,8 @@
|
||||
'ZGV Gruppe MA',
|
||||
'InfoCenter Mitarbeiter',
|
||||
ucfirst($this->p->t('global', 'parkdatum')),
|
||||
ucfirst($this->p->t('global', 'rueckstelldatum'))
|
||||
ucfirst($this->p->t('infocenter', 'rueckstelldatum')),
|
||||
ucfirst($this->p->t('infocenter', 'rueckstellgrund')),
|
||||
),
|
||||
'formatRow' => function($datasetRaw) {
|
||||
|
||||
@@ -494,6 +504,11 @@
|
||||
{
|
||||
$datasetRaw->{'InfoCenterMitarbeiter'} = 'Ja';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'Rueckstellgrund'} === null)
|
||||
{
|
||||
$datasetRaw->{'Rueckstellgrund'} = '-';
|
||||
}
|
||||
|
||||
return $datasetRaw;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user