diff --git a/application/config/navigation.php b/application/config/navigation.php index d415e9332..033a65f86 100644 --- a/application/config/navigation.php +++ b/application/config/navigation.php @@ -245,3 +245,14 @@ $config['navigation_menu']['lehre/lehrauftrag/LehrauftragErteilen/*'] = array( 'requiredPermissions' => array('lehre/lehrauftrag_erteilen:r') ) ); + +$config['navigation_menu']['system/issues/Issues/*'] = array( + 'fehlerzustaendigkeiten' => array( + 'link' => site_url('system/issues/IssuesZustaendigkeiten'), + 'description' => 'Fehler Zuständigkeiten', + 'icon' => 'cogs', + 'sort' => 100, + 'target' => '_blank', + 'requiredPermissions' => array('admin:rw') + ) +); diff --git a/application/controllers/system/issues/Issues.php b/application/controllers/system/issues/Issues.php index e0103cfec..da92c251c 100644 --- a/application/controllers/system/issues/Issues.php +++ b/application/controllers/system/issues/Issues.php @@ -6,7 +6,7 @@ class Issues extends Auth_Controller { private $_uid; - const FUNKTION_KURZBZ = 'ass'; // // user having this funktion can see issues for oes assigned with this funktion + const FUNKTION_KURZBZ = 'ass'; // user having this funktion can see issues for oes assigned with this funktion const BERECHTIGUNG_KURZBZ = 'system/issues_verwalten'; // user having this permission can see issues for oes assigned with this permission public function __construct() @@ -39,6 +39,7 @@ class Issues extends Auth_Controller ); $this->_setAuthUID(); // sets property uid + $this->setControllerId(); // sets the controller id } public function index() @@ -127,7 +128,7 @@ class Issues extends Auth_Controller { $all_funktionen_oe_kurzbz[$benutzerfunktion->oe_kurzbz][] = $benutzerfunktion->funktion_kurzbz; - // separate oes for the funktion needed for displaying issues + // separate oes for the additional funktion which enables displaying issues if ($benutzerfunktion->funktion_kurzbz == self::FUNKTION_KURZBZ) { $oe_kurzbz_for_funktion[] = $benutzerfunktion->oe_kurzbz; @@ -153,7 +154,9 @@ class Issues extends Auth_Controller } // add oes for which there is the "manage issues" Berechtigung - if (!$oe_kurzbz_berechtigt = $this->permissionlib->getOE_isEntitledFor(self::BERECHTIGUNG_KURZBZ)) + $oe_kurzbz_berechtigt = $this->permissionlib->getOE_isEntitledFor(self::BERECHTIGUNG_KURZBZ); + + if (!$oe_kurzbz_berechtigt) show_error('No permission or error when checking permissions'); $all_oe_kurzbz_berechtigt = array_unique(array_merge($oe_kurzbz_for_funktion, $oe_kurzbz_berechtigt)); diff --git a/application/controllers/system/issues/IssuesZustaendigkeiten.php b/application/controllers/system/issues/IssuesZustaendigkeiten.php new file mode 100644 index 000000000..fd3e6192a --- /dev/null +++ b/application/controllers/system/issues/IssuesZustaendigkeiten.php @@ -0,0 +1,217 @@ + 'admin:r', + 'getApps' => 'admin:r', + 'getFehlercodes' => 'admin:r', + 'getNonAssignedZustaendigkeiten' => 'admin:r', + 'addZustaendigkeit' => 'admin:rw', + 'deleteZustaendigkeit' => 'admin:rw' + ) + ); + + // Load libraries + $this->load->library('IssuesLib'); + $this->load->library('WidgetLib'); + + // Load models + $this->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel'); + $this->load->model('system/Fehler_model', 'FehlerModel'); + $this->load->model('system/Fehler_model', 'FehlerModel'); + $this->load->model('system/Fehlerzustaendigkeiten_model', 'FehlerzustaendigkeitenModel'); + + $this->loadPhrases( + array( + 'global', + 'ui', + 'filter', + 'lehre', + 'person', + 'fehlermonitoring' + ) + ); + + $this->_setAuthUID(); // sets property uid + $this->setControllerId(); // sets the controller id + } + + public function index() + { + $this->load->view("system/issues/issuesZustaendigkeiten.php"); + } + + /** + * Loads all Apps to which Fehler exist. + */ + public function getApps() + { + $this->FehlerModel->addDistinct(); + $this->FehlerModel->addSelect('app'); + $this->FehlerModel->addOrder('app'); + + $appRes = $this->FehlerModel->load(); + + $this->outputJson($appRes); + } + + /** + * Gets all fehlercodes, optionally by app. + */ + public function getFehlercodes() + { + $app = $this->input->get('app'); + + //$this->FehlerModel->addSelect('fehlercode, fehler_kurzbz, fehlertext, fehlertyp_kurzbz'); + $this->FehlerModel->addOrder('fehlercode'); + + $fehlerRes = isset($app) ? $this->FehlerModel->loadWhere(array('app' => $app)) : $this->FehlerModel->load(); + + $this->outputJson($fehlerRes); + } + + /** + * Gets all Mitarbeiter, Organisationseinheiten, Funktionen not assigned to a Fehler yet. + */ + public function getNonAssignedZustaendigkeiten() + { + $fehlercode = $this->input->get('fehlercode'); + + $mitarbeiterRes = $this->FehlerzustaendigkeitenModel->getNonAssignedMitarbeiter($fehlercode); + + if (isError($mitarbeiterRes)) + { + $this->outputJsonError(getError($mitarbeiterRes)); + return; + } + + $this->OrganisationseinheitModel->addSelect('oe_kurzbz, bezeichnung, organisationseinheittyp_kurzbz'); + $this->OrganisationseinheitModel->addOrder('organisationseinheittyp_kurzbz, bezeichnung'); + $oeRes = $this->OrganisationseinheitModel->loadWhere(array('aktiv' => true)); + + if (isError($oeRes)) + { + $this->outputJsonError(getError($oeRes)); + return; + } + + $oe_funktionen = array(); + + if (hasData($oeRes)) + { + $oes = getData($oeRes); + + foreach ($oes as $oe) + { + $oe->funktionen = array(); + $funktionRes = $this->FehlerzustaendigkeitenModel->getNonAssignedFunktionen($fehlercode, $oe->oe_kurzbz); + + if (isError($funktionRes)) + { + $this->outputJsonError(getError($oeRes)); + return; + } + + $funktionData = getData($funktionRes); + $oe->funktionen = $funktionData; + $oe_funktionen[] = $oe; + } + } + + if (isError($funktionRes)) + { + $this->outputJsonError(getError($funktionRes)); + return; + } + + $result = array( + 'mitarbeiter' => getData($mitarbeiterRes), + 'oe_funktionen' => $oe_funktionen + ); + + $this->outputJsonSuccess($result); + } + + /** + * Adds a Zuständigkeit after performing error checks. + */ + public function addZustaendigkeit() + { + $fehlercode = $this->input->post('fehlercode'); + $mitarbeiter_person_id = $this->input->post('mitarbeiter_person_id'); + $oe_kurzbz = $this->input->post('oe_kurzbz'); + $funktion_kurzbz = $this->input->post('funktion_kurzbz'); + + if (isEmptyString($fehlercode)) + $this->outputJsonError($this->p->t('fehlermonitoring', 'fehlercodeFehlt')); + elseif (isEmptyString($mitarbeiter_person_id) && isEmptyString($oe_kurzbz)) + $this->outputJsonError($this->p->t('fehlermonitoring', 'mitarbeiterUndOeFehlt')); + elseif (!isEmptyString($mitarbeiter_person_id) && !isEmptyString($oe_kurzbz)) + $this->outputJsonError($this->p->t('fehlermonitoring', 'nurOeOderMitarbeiterSetzen')); + elseif (isset($mitarbeiter_person_id) && !is_numeric($mitarbeiter_person_id)) + $this->outputJsonError($this->p->t('fehlermonitoring', 'ungueltigeMitarbeiterId')); + else + { + $data = array( + 'fehlercode' => $fehlercode + ); + + if (!isEmptyString($mitarbeiter_person_id)) + $data['person_id'] = $mitarbeiter_person_id; + + if (!isEmptyString($oe_kurzbz)) + $data['oe_kurzbz'] = $oe_kurzbz; + + if (!isEmptyString($funktion_kurzbz)) + $data['funktion_kurzbz'] = $funktion_kurzbz; + + $zustaendigkeitExistsRes = $this->FehlerzustaendigkeitenModel->loadWhere($data); + + if (isError($zustaendigkeitExistsRes)) + $this->outputJsonError(getError($zustaendigkeitExistsRes)); + elseif (hasData($zustaendigkeitExistsRes)) + $this->outputJsonError($this->p->t('fehlermonitoring', 'zustaendigkeitExistiert')); + else + { + $data['insertvon'] = $this->_uid; + + $this->outputJson($this->FehlerzustaendigkeitenModel->insert($data)); + } + } + } + + /** + * Deletes a Zuständigkeit. + */ + public function deleteZustaendigkeit() + { + $fehlerzustaendigkeiten_id = $this->input->post('fehlerzustaendigkeiten_id'); + + // check if Id correctly passed + if (!isset($fehlerzustaendigkeiten_id) || !is_numeric($fehlerzustaendigkeiten_id)) + { + $this->outputJsonError($this->p->t('fehlermonitoring', 'ungueltigeZustaendigkeitenId')); + return; + } + + $this->outputJson($this->FehlerzustaendigkeitenModel->delete($fehlerzustaendigkeiten_id)); + } + + /** + * Retrieve the UID of the logged user and checks if it is valid + */ + private function _setAuthUID() + { + $this->_uid = getAuthUID(); + + if (!$this->_uid) show_error('User authentification failed'); + } +} diff --git a/application/models/system/Fehlerzustaendigkeiten_model.php b/application/models/system/Fehlerzustaendigkeiten_model.php new file mode 100644 index 000000000..9277f3609 --- /dev/null +++ b/application/models/system/Fehlerzustaendigkeiten_model.php @@ -0,0 +1,58 @@ +dbTable = 'system.tbl_fehler_zustaendigkeiten'; + $this->pk = 'fehlerzustaendigkeiten_id'; + } + + /** + * Gets active Mitarbeiter not assigned to a Fehler. + * @param $fehlercode + * @return object + */ + public function getNonAssignedMitarbeiter($fehlercode) + { + $query = "SELECT person_id, ben.uid, vorname, nachname, titelpre, titelpost, personalnummer + FROM public.tbl_mitarbeiter + JOIN public.tbl_benutzer ben ON tbl_mitarbeiter.mitarbeiter_uid = ben.uid + JOIN public.tbl_person pers USING (person_id) + WHERE ben.aktiv + AND NOT EXISTS ( + SELECT 1 FROM system.tbl_fehler_zustaendigkeiten + WHERE person_id = pers.person_id + AND fehlercode = ? + ) + ORDER BY nachname, vorname, uid"; + + return $this->execReadOnlyQuery($query, array($fehlercode)); + } + + /** + * Gets Funktionen not assigned to a Fehler (over an organisational unit). + * @param $fehlercode + * @param $oe_kurzbz + * @return object + */ + public function getNonAssignedFunktionen($fehlercode, $oe_kurzbz) + { + $query = "SELECT funktion_kurzbz, beschreibung + FROM public.tbl_funktion funk + WHERE aktiv + AND NOT EXISTS ( + SELECT 1 FROM system.tbl_fehler_zustaendigkeiten + WHERE funktion_kurzbz = funk.funktion_kurzbz + AND fehlercode = ? + AND oe_kurzbz = ? + ) + ORDER BY beschreibung"; + + return $this->execReadOnlyQuery($query, array($fehlercode, $oe_kurzbz)); + } +} diff --git a/application/views/system/issues/issuesData.php b/application/views/system/issues/issuesData.php index c9a1d3828..a3b011531 100644 --- a/application/views/system/issues/issuesData.php +++ b/application/views/system/issues/issuesData.php @@ -1,7 +1,9 @@ 'issues', 'filter_id' => $this->input->get('filter_id'), 'tableUniqueId' => 'issues', - 'requiredPermissions' => 'admin', + 'requiredPermissions' => 'system/issues_verwalten', 'datasetRepresentation' => 'tablesorter', 'checkboxes' => 'issue_id', 'columnsAliases' => array( @@ -132,7 +149,9 @@ $filterWidgetArray = array( ucfirst($this->p->t('fehlermonitoring', 'statuscode')), ucfirst($this->p->t('person', 'vorname')), ucfirst($this->p->t('person', 'nachname')), - ucfirst($this->p->t('fehlermonitoring', 'hauptzustaendig')) + ucfirst($this->p->t('fehlermonitoring', 'hauptzustaendig')), + ucfirst($this->p->t('fehlermonitoring', 'zustaendigePersonen')), + ucfirst($this->p->t('fehlermonitoring', 'zustaendigeOrganisationseinheiten')) ), 'formatRow' => function($datasetRaw) { @@ -171,6 +190,18 @@ $filterWidgetArray = array( $datasetRaw->{'Verarbeitet von'} = '-'; } + if ($datasetRaw->{'Person Zuständigkeiten'} == null) + { + $datasetRaw->{'Person Zuständigkeiten'} = '-'; + } + + if ($datasetRaw->{'Organisationseinheit Zuständigkeiten'} == null) + { + $datasetRaw->{'Organisationseinheit Zuständigkeiten'} = '-'; + } + + + return $datasetRaw; }, 'markRow' => function($datasetRaw) { diff --git a/application/views/system/issues/issuesZustaendigkeiten.php b/application/views/system/issues/issuesZustaendigkeiten.php new file mode 100644 index 000000000..c22eaaee5 --- /dev/null +++ b/application/views/system/issues/issuesZustaendigkeiten.php @@ -0,0 +1,168 @@ +load->view( + 'templates/FHC-Header', + array( + 'title' => 'Fehler Zuständigkeiten', + 'jquery' => true, + 'jqueryui' => true, + 'jquerycheckboxes' => true, + 'bootstrap' => true, + 'fontawesome' => true, + 'sbadmintemplate' => true, + 'tablesorter' => true, + 'ajaxlib' => true, + 'filterwidget' => true, + 'navigationwidget' => true, + 'dialoglib' => true, + 'phrases' => array( + 'ui', + 'fehlermonitoring' + ), + 'customCSSs' => array('public/css/issues/issuesZustaendigkeiten.css', 'public/css/sbadmin2/tablesort_bootstrap.css'), + 'customJSs' => array('public/js/issues/issuesZustaendigkeiten.js', 'public/js/bootstrapper.js') + ) +); +?> + + +
+ + widgetlib->widget('NavigationWidget'); ?> + +
+
+
+
+ +
+
+
+
+
+ + + + + + +
+ + + + + +
+
+
+
+
+ + + + + + + +
+ + + + + p->t('fehlermonitoring', 'oder') ?> +
+ +
+ + + + + +
+
+
+
+
+
+ +
+
+
+ load->view('system/issues/issuesZustaendigkeitenData.php'); ?> +
+ +
+
+ +
+ + +load->view('templates/FHC-Footer'); ?> diff --git a/application/views/system/issues/issuesZustaendigkeitenData.php b/application/views/system/issues/issuesZustaendigkeitenData.php new file mode 100644 index 000000000..d4cedd192 --- /dev/null +++ b/application/views/system/issues/issuesZustaendigkeitenData.php @@ -0,0 +1,84 @@ + $query, + 'app' => 'core', + 'datasetName' => 'fehlerZustaendigkeiten', + 'filter_id' => $this->input->get('filter_id'), + 'tableUniqueId' => 'issuesZustaendigkeiten', + 'requiredPermissions' => 'admin', + 'datasetRepresentation' => 'tablesorter', + 'additionalColumns' => array('Delete'), + 'columnsAliases' => array( + 'ID', + ucfirst($this->p->t('fehlermonitoring', 'fehlercode')), + ucfirst($this->p->t('fehlermonitoring', 'fehlercodeExtern')), + ucfirst($this->p->t('fehlermonitoring', 'fehlerkurzbz')), + ucfirst($this->p->t('fehlermonitoring', 'fehlertext')), + ucfirst($this->p->t('fehlermonitoring', 'fehlertyp')), + 'app', + 'PersonId', + ucfirst($this->p->t('person', 'vorname')), + ucfirst($this->p->t('person', 'nachname')), + ucfirst($this->p->t('fehlermonitoring', 'oeKurzbz')), + ucfirst($this->p->t('fehlermonitoring', 'oeBezeichnung')), + ucfirst($this->p->t('fehlermonitoring', 'funktionKurzbz')), + ucfirst($this->p->t('fehlermonitoring', 'funktionBeschreibung')) + ), + 'formatRow' => function($datasetRaw) { + + $datasetRaw->{'Delete'} = + ""; + + if ($datasetRaw->{'person_id'} == null) + { + $datasetRaw->{'person_id'} = '-'; + } + + if ($datasetRaw->{'vorname'} == null) + { + $datasetRaw->{'vorname'} = '-'; + } + + if ($datasetRaw->{'nachname'} == null) + { + $datasetRaw->{'nachname'} = '-'; + } + + if ($datasetRaw->{'oe_kurzbz'} == null) + { + $datasetRaw->{'oe_kurzbz'} = '-'; + } + + if ($datasetRaw->{'oe_bezeichnung'} == null) + { + $datasetRaw->{'oe_bezeichnung'} = '-'; + } + + if ($datasetRaw->{'funktion_kurzbz'} == null) + { + $datasetRaw->{'funktion_kurzbz'} = '-'; + } + + if ($datasetRaw->{'funktion_beschreibung'} == null) + { + $datasetRaw->{'funktion_beschreibung'} = '-'; + } + + return $datasetRaw; + } +); + +echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray); diff --git a/public/css/issues/issuesZustaendigkeiten.css b/public/css/issues/issuesZustaendigkeiten.css new file mode 100644 index 000000000..456049f3e --- /dev/null +++ b/public/css/issues/issuesZustaendigkeiten.css @@ -0,0 +1,13 @@ +td.tableCellNoRightBorder { + border-right: 0 !important; +} + +td.tableCellNoLeftBorder { + border-left: 0 !important; +} + +#fehlercodeInfoCell { + vertical-align: middle; + font-size: 1.2em; + cursor: pointer; +} diff --git a/public/js/issues/issuesZustaendigkeiten.js b/public/js/issues/issuesZustaendigkeiten.js new file mode 100644 index 000000000..605868295 --- /dev/null +++ b/public/js/issues/issuesZustaendigkeiten.js @@ -0,0 +1,451 @@ +/** + * Javascript file for Issues Zuständigkeiten assignment page + */ + +const FEHLERAPP_DROPDOWN_ID = "fehlerappSelect"; +const FEHLERCODE_DROPDOWN_ID = "fehlercodeSelect"; +const MITARBEITER_AUTOCOMPLETE_ID = "mitarbeiterSelect"; +const MITARBEITER_HIDDENFIELD_ID = "mitarbeiter_person_id"; +const ORGANISATIONSEINHEIT_DROPDOWN_ID = "oeSelect"; +const FUNKTION_DROPDOWN_ID = "funktionSelect"; + +var IssuesZustaendigkeiten = { + + fehlercodesArr: [], // for saving received fehlercodes + oefunktionen: [], // for saving assigned oes and their funktionen + + getApps: function() + { + FHC_AjaxClient.ajaxCallGet( + 'system/issues/IssuesZustaendigkeiten/getApps', + null, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.hasData(data)) + { + // save loaded apps + let apps = FHC_AjaxClient.getData(data); + + // fill dropdown with apps + IssuesZustaendigkeiten._fillDropdown( + FEHLERAPP_DROPDOWN_ID, + "app", + apps, + null, + false, + "core" + ); + + // Initiate getting of fehlercodes with apps + IssuesZustaendigkeiten.getFehlercodes($("#"+FEHLERAPP_DROPDOWN_ID).val()); + } + }, + errorCallback: function(jqXHR, textStatus, errorThrown) { + FHC_DialogLib.alertError(textStatus); + } + } + ); + }, + getFehlercodes: function(app) + { + FHC_AjaxClient.ajaxCallGet( + 'system/issues/IssuesZustaendigkeiten/getFehlercodes', + { + app: app + }, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.hasData(data)) + { + let fehlerCodesData = FHC_AjaxClient.getData(data); + + // save fehlercodes data for displaying info later + IssuesZustaendigkeiten.fehlercodesArr = fehlerCodesData; + + // display fehlercodes in dropdown + let fehlerCodes = []; + + for (let i = 0; i < fehlerCodesData.length; i++) + { + let code = fehlerCodesData[i]; + + fehlerCodes.push( + { + fehlercode: code.fehlercode, + fullFehlerBezeichnung: code.fehlercode + (!code.fehler_kurzbz ? '' : ' - ' + code.fehler_kurzbz) + } + ); + } + + IssuesZustaendigkeiten._fillDropdown( + FEHLERCODE_DROPDOWN_ID, + "fehlercode", + fehlerCodes, + "fullFehlerBezeichnung" + ); + + // initiate call for getting Zuständigkeiten + IssuesZustaendigkeiten.getNonAssignedZustaendigkeiten($("#"+FEHLERCODE_DROPDOWN_ID).val()); + } + }, + errorCallback: function(jqXHR, textStatus, errorThrown) { + FHC_DialogLib.alertError(textStatus); + } + } + ); + }, + getNonAssignedZustaendigkeiten: function(fehlercode) + { + FHC_AjaxClient.ajaxCallGet( + 'system/issues/IssuesZustaendigkeiten/getNonAssignedZustaendigkeiten', + { + fehlercode: fehlercode + }, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.hasData(data)) + { + // save loaded data + let zustaendigkeitenData = FHC_AjaxClient.getData(data); + // save in object to display correct funktionen when oe is changed + IssuesZustaendigkeiten.oe_funktionen = zustaendigkeitenData.oe_funktionen; + + let zustaendigkeiten = []; + + for (let i = 0; i < zustaendigkeitenData.oe_funktionen.length; i++) + { + let zustaendigkeit = zustaendigkeitenData.oe_funktionen[i]; + + zustaendigkeiten.push( + { + oe_kurzbz: zustaendigkeit.oe_kurzbz, + fullOeBezeichnung: zustaendigkeit.organisationseinheittyp_kurzbz + ' ' + zustaendigkeit.bezeichnung + } + ); + } + + // fill oe dropdown with data + IssuesZustaendigkeiten._fillDropdown( + "oeSelect", + "oe_kurzbz", + zustaendigkeiten, + "fullOeBezeichnung", + true + ); + + // fill funktion dropdown with data + IssuesZustaendigkeiten._fillFunktionDropdown(); + + // save Mitarbeiter data for autocomplete field in array + let autocompleteMitarbeiterArr = []; + + for (let i = 0; i < zustaendigkeitenData.mitarbeiter.length; i++) + { + let ma = zustaendigkeitenData.mitarbeiter[i]; + + autocompleteMitarbeiterArr.push( + { + vorname: ma.vorname, + nachname: ma.nachname, + uid: ma.uid, + label: ma.nachname + " " + ma.vorname + " (" + ma.uid + ")", + id: ma.person_id + } + ); + } + + // callback for searching source mitarbeiter array correctly + let sourceCallback = function(request, response) + { + // case insensitive matcher + var matcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), "i"); + + // match vorname nachname OR nachname vorname OR uid + response($.grep(autocompleteMitarbeiterArr, function (value) { + return matcher.test(value.nachname + ' '+value.vorname + ' ' + value.nachname) + || matcher.test(value.uid); + })); + } + + // fill autocomplete field with mitarbeiter data + IssuesZustaendigkeiten._fillAutocomplete( + MITARBEITER_AUTOCOMPLETE_ID, + MITARBEITER_HIDDENFIELD_ID, + sourceCallback + ); + + // set events on delete buttons + $(".deleteBtn").click( + function() + { + IssuesZustaendigkeiten.deleteZustaendigkeit($(this).prop("id")); + } + ) + } + }, + errorCallback: function(jqXHR, textStatus, errorThrown) { + FHC_DialogLib.alertError(textStatus); + } + } + ); + + }, + addZustaendigkeit: function(data) + { + FHC_AjaxClient.ajaxCallPost( + 'system/issues/IssuesZustaendigkeiten/addZustaendigkeit', + data, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.hasData(data)) + { + // show message, reset input fields and reload data after Zuständigkeit added + FHC_DialogLib.alertSuccess(FHC_PhrasesLib.t('fehlermonitoring', 'zustaendigkeitGespeichert')) + IssuesZustaendigkeiten._emptyInputFields(); + FHC_FilterWidget.reloadDataset(); + } + else + { + // show error if no data + let errorMsg = FHC_PhrasesLib.t('fehlermonitoring', 'zustaendigkeitGespeichertFehler'); + if (FHC_AjaxClient.isError(data)) + errorMsg += ": "+FHC_AjaxClient.getError(data); + FHC_DialogLib.alertError(errorMsg); + } + }, + errorCallback: function(jqXHR, textStatus, errorThrown) { + FHC_DialogLib.alertError(textStatus); + } + } + ); + }, + deleteZustaendigkeit: function(fehlerzustaendigkeiten_id) + { + FHC_AjaxClient.ajaxCallPost( + 'system/issues/IssuesZustaendigkeiten/deleteZustaendigkeit', + { + fehlerzustaendigkeiten_id: fehlerzustaendigkeiten_id + }, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.hasData(data)) + { + FHC_DialogLib.alertSuccess(FHC_PhrasesLib.t('fehlermonitoring', 'zustaendigkeitGeloescht')) + // reload dataset to see change + FHC_FilterWidget.reloadDataset(); + } + else + { + FHC_DialogLib.alertError(FHC_PhrasesLib.t('fehlermonitoring', 'zustaendigkeitGeloeschtFehler')); + } + }, + errorCallback: function(jqXHR, textStatus, errorThrown) { + FHC_DialogLib.alertError(textStatus); + } + } + ); + }, + _fillFunktionDropdown: function() + { + let funktionen = []; + let oe_kurzbz = $("#"+ORGANISATIONSEINHEIT_DROPDOWN_ID).val(); + + // get funktionen for selected oe (saved in js object) + for (let i = 0; i < IssuesZustaendigkeiten.oe_funktionen.length; i++) + { + let oe_funktion = IssuesZustaendigkeiten.oe_funktionen[i]; + + if (oe_funktion.oe_kurzbz === oe_kurzbz) + { + funktionen = oe_funktion.funktionen + break; + } + } + + IssuesZustaendigkeiten._fillDropdown( + "funktionSelect", + "funktion_kurzbz", + funktionen, + "beschreibung", + true + ); + }, + _fillDropdown: function(dropdownId, valueName, data, textName, includeNoSelectionOption, defaultValue) + { + // by default, displayed text in dropdown is the value + if (!textName) + textName = valueName; + + // clear dropdown + $("#"+dropdownId).empty(); + + // optionally include default "no selection" value + if (includeNoSelectionOption === true) + $("#"+dropdownId).append(""); + + // fill dropdown with values + for (let i = 0; i < data.length; i++) + { + let val = data[i]; + + // the value selected by default + let selected = val === defaultValue ? " selected" : ""; + + // append option + $("#"+dropdownId).append(""); + } + }, + _fillAutocomplete: function(autocompleteId, idFieldId, source) + { + // jQuery ui autocomplete for employees + $("#"+autocompleteId).autocomplete( + { + // custom matcher + source: source, + autoFocus: true, + select: function(event, ui) + { + // when autocmplete entry selected, display label text in autocomplete, fill hidden value field + $("#"+autocompleteId).val(ui.item.label); + $("#"+idFieldId).val(ui.item.id); + return false; + } + } + ); + }, + _toggleFieldDisability: function() + { + let oeDropdownEl = $("#"+ORGANISATIONSEINHEIT_DROPDOWN_ID); + let funktionDropdownEl = $("#"+FUNKTION_DROPDOWN_ID); + let maAutocompleteEl = $("#"+MITARBEITER_AUTOCOMPLETE_ID); + let maHiddenEl = $("#"+MITARBEITER_HIDDENFIELD_ID); + + // if Mitarbeiter is entered + if (maAutocompleteEl.val().length > 0) + { + // disable oe and funktion input + oeDropdownEl.prop('disabled', true); + oeDropdownEl.val(''); + funktionDropdownEl.prop('disabled', true); + } + else + { + // otherwise enable oe input if Mitarbeiter input empty + oeDropdownEl.prop('disabled', false); + } + + // if oe is entered + if (oeDropdownEl.val().length > 0) + { + // disable Mitarbeiter input + maAutocompleteEl.prop('disabled', true); + maAutocompleteEl.val(''); + maHiddenEl.val(''); + + // enable funktion input + funktionDropdownEl.prop('disabled', false); + IssuesZustaendigkeiten._fillFunktionDropdown(); + } + else + { + // otherwise enable mitarbeiter input + maAutocompleteEl.prop('disabled', false); + + // disable funktion input + funktionDropdownEl.prop('disabled', true); + } + }, + _emptyInputFields: function() + { + // clear all input fields + $("#"+MITARBEITER_AUTOCOMPLETE_ID).val(''); + $("#"+MITARBEITER_HIDDENFIELD_ID).val(''); + $("#"+ORGANISATIONSEINHEIT_DROPDOWN_ID).val(''); + $("#"+FUNKTION_DROPDOWN_ID).val(''); + } +}; + +/** + * When JQuery is up + */ +$(document).ready(function() { + + // initiate cascade of getting data, first apps + IssuesZustaendigkeiten.getApps(); + + // get new fehlercodes each time app is changed + $("#"+FEHLERAPP_DROPDOWN_ID).change( + function() + { + IssuesZustaendigkeiten.getFehlercodes($(this).val()); + } + ); + + // get new zustaendigkeiten every time Fehlercode is changed + $("#"+FEHLERCODE_DROPDOWN_ID).change( + function() + { + IssuesZustaendigkeiten.getNonAssignedZustaendigkeiten($(this).val()); + } + ); + + // set events for disabling input fields + $("#"+MITARBEITER_AUTOCOMPLETE_ID).keyup(IssuesZustaendigkeiten._toggleFieldDisability); + $("#"+ORGANISATIONSEINHEIT_DROPDOWN_ID).change(IssuesZustaendigkeiten._toggleFieldDisability); + + // set event for adding a new Zuständigkeit + $("#assignZustaendigkeit").click( + function() + { + let data = { + fehlercode: $("#"+FEHLERCODE_DROPDOWN_ID).val() + } + + let mitarbeiter_person_id = $("#"+MITARBEITER_HIDDENFIELD_ID).val(); + let oe_kurzbz = $("#"+ORGANISATIONSEINHEIT_DROPDOWN_ID).val(); + + // if person id set, send it, otherwise oe_kurzbz + if (mitarbeiter_person_id.length > 0) + data.mitarbeiter_person_id = mitarbeiter_person_id; + else if (oe_kurzbz.length > 0) + { + data.oe_kurzbz = oe_kurzbz + data.funktion_kurzbz = $("#"+FUNKTION_DROPDOWN_ID).val(); + } + + IssuesZustaendigkeiten.addZustaendigkeit(data); + } + ) + + // set event for showing info modal + $("#fehlercodeInfoCell").click( + function() + { + let fehlercode = $("#"+FEHLERCODE_DROPDOWN_ID).val(); + let fehlercodeData = {}; + + for (let i = 0; i < IssuesZustaendigkeiten.fehlercodesArr.length; i++) + { + let fc = IssuesZustaendigkeiten.fehlercodesArr[i]; + + if (fc.fehlercode === fehlercode) + { + fehlercodeData = fc; + break; + } + } + + if (!fehlercodeData) + return; + + $("#fehlerInfoLabel").text(fehlercodeData.fehlercode + " - " + fehlercodeData.fehler_kurzbz); + $("#fehlercodeInfo").text(fehlercodeData.fehlercode); + $("#fehlerkurzbzInfo").text(fehlercodeData.fehler_kurzbz); + $("#fehlertypInfo").text(fehlercodeData.fehlertyp_kurzbz); + $("#fehlercodeExternInfo").text(fehlercodeData.fehlercode_extern ? fehlercodeData.fehlercode_extern : '-'); + $("#fehlertextInfo").text(fehlercodeData.fehlertext); + + $("#fehlerInfo").modal("show"); + } + ) +}); diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index fa1a15940..b8c55c2d1 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -6126,6 +6126,28 @@ if ($result = $db->db_query("SELECT * FROM pg_class WHERE relname='idx_webservic } } +// ADD COLUMN insertamum to system.tbl_fehler_zustaendigkeiten +if(!@$db->db_query("SELECT insertamum FROM system.tbl_fehler_zustaendigkeiten LIMIT 1")) +{ + $qry = "ALTER TABLE system.tbl_fehler_zustaendigkeiten ADD COLUMN insertamum timestamp DEFAULT now();"; + + if(!$db->db_query($qry)) + echo 'system.tbl_fehler_zustaendigkeiten '.$db->db_last_error().'
'; + else + echo '
Spalte insertamum in system.tbl_fehler_zustaendigkeiten hinzugefügt'; +} + +// ADD COLUMN insertvon to system.tbl_fehler_zustaendigkeiten +if(!@$db->db_query("SELECT insertvon FROM system.tbl_fehler_zustaendigkeiten LIMIT 1")) +{ + $qry = "ALTER TABLE system.tbl_fehler_zustaendigkeiten ADD COLUMN insertvon varchar(32);"; + + if(!$db->db_query($qry)) + echo 'system.tbl_fehler_zustaendigkeiten '.$db->db_last_error().'
'; + else + echo '
Spalte insertvon in system.tbl_fehler_zustaendigkeiten hinzugefügt'; +} + // Insert postive Zeitsperre 'Zeitverfuegbarkeit' to tbl_zeitsperretyp if($result = @$db->db_query("SELECT 1 FROM campus.tbl_zeitsperretyp WHERE zeitsperretyp_kurzbz = 'ZVerfueg';")) { @@ -6422,7 +6444,7 @@ $tabellen=array( "system.tbl_extensions" => array("extension_id","name","version","description","license","url","core_version","dependencies","enabled"), "system.tbl_fehler" => array("fehlercode","fehler_kurzbz","fehlercode_extern","fehlertext","fehlertyp_kurzbz","app"), "system.tbl_fehlertyp" => array("fehlertyp_kurzbz","bezeichnung_mehrsprachig"), - "system.tbl_fehler_zustaendigkeiten" => array("fehlerzustaendigkeiten_id","fehlercode","person_id","oe_kurzbz","funktion_kurzbz"), + "system.tbl_fehler_zustaendigkeiten" => array("fehlerzustaendigkeiten_id","fehlercode","person_id","oe_kurzbz","funktion_kurzbz", "insertamum", "insertvon"), "system.tbl_issue" => array("issue_id","fehlercode","fehlercode_extern","inhalt","inhalt_extern","person_id","oe_kurzbz","datum","verarbeitetvon","verarbeitetamum","status_kurzbz","behebung_parameter","insertvon","insertamum","updatevon","updateamum"), "system.tbl_issue_status" => array("status_kurzbz","bezeichnung_mehrsprachig"), "system.tbl_log" => array("log_id","person_id","zeitpunkt","app","oe_kurzbz","logtype_kurzbz","logdata","insertvon","taetigkeit_kurzbz"), diff --git a/system/filtersupdate.php b/system/filtersupdate.php index 05cfc0d38..203e96701 100644 --- a/system/filtersupdate.php +++ b/system/filtersupdate.php @@ -926,7 +926,9 @@ $filters = array( {"name": "Vorname"}, {"name": "Nachname"}, {"name": "PersonId"}, - {"name": "Fehlerstatus"} + {"name": "Fehlerstatus"}, + {"name": "Person Zuständigkeiten"}, + {"name": "Organisationseinheit Zuständigkeiten"} ], "filters": [ { @@ -960,7 +962,9 @@ $filters = array( {"name": "Vorname"}, {"name": "Nachname"}, {"name": "PersonId"}, - {"name": "Fehlerstatus"} + {"name": "Fehlerstatus"}, + {"name": "Person Zuständigkeiten"}, + {"name": "Organisationseinheit Zuständigkeiten"} ], "filters": [ { @@ -1082,6 +1086,29 @@ $filters = array( } ', 'oe_kurzbz' => null, + ), + array( + 'app' => 'core', + 'dataset_name' => 'fehlerZustaendigkeiten', + 'filter_kurzbz' => 'fehlerZustaendigkeiten', + 'description' => '{Fehler Zustaendigkeiten}', + 'sort' => 1, + 'default_filter' => true, + 'filter' => ' + { + "name": "Fehler Zuständigkeiten", + "columns": [ + {"name": "fehlercode"}, + {"name": "person_id"}, + {"name": "vorname"}, + {"name": "nachname"}, + {"name": "oe_bezeichnung"}, + {"name": "funktion_beschreibung"} + ], + "filters": [] + } + ', + 'oe_kurzbz' => null ) ); diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index d7be2d115..ccba62ff0 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -14352,6 +14352,506 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'fehlerZustaendigkeiten', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Fehler Zuständigkeiten", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Error Responsibilities", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'zustaendigerMitarbeiter', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Mitarbeiter", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Employee", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'oder', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "oder", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "or", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'organisationseinheit', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Organisationseinheit", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Organisational Unit", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'funktion', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Funktion", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Function", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'zustaendigkeitZuweisen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Zuständigkeit zuweisen", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Assign Responsibility", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'fehlerkurzbz', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Fehler Kurzbezeichnung", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Error short name", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'fehlertext', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Fehlertext", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Error text", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'oeKurzbz', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Organisationseinheit Kurzbezeichung", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Organisational Unit Short Name", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'oeBezeichnung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Organisationseinheit", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Organisational Unit", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'funktionKurzbz', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Funktion Kurzbezeichnung", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Function Short Name", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'funktionBeschreibung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Funktion Beschreibung", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Function Description", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'fehlercodeFehlt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Fehlercode fehlt", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Error code missing", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'mitarbeiterUndOeFehlt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Mitarbeiter oder Organisationseinheit müssen gesetzt sein", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Employee or organisational unit must be set", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'nurOeOderMitarbeiterSetzen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Mitarbeiter und Organisationseinheit dürfen nicht gleichzeitig gesetzt sein", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Employee and organisational unit cannot be both set", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'ungueltigeMitarbeiterId', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Mitarbeiter person Id ist ungültig", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Employee Id is invalid", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'zustaendigkeitExistiert', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Zuständigkeit existiert bereits", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Assignment already exists", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'ungueltigeZustaendigkeitenId', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Ungültige Zuständigkeiten Id", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Invalid assignement id", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'zustaendigkeitGespeichert', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Zuständigkeit gespeichert", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Assignment saved", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'zustaendigkeitGespeichertFehler', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Fehler beim Speichern der Zuständigkeit", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Error when saving assignment", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'zustaendigkeitGeloescht', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Zuständigkeit gelöscht", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Assignment deleted", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'zustaendigkeitGeloeschtFehler', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Fehler beim Löschen der Zuständigkeit", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Assignment deleted", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'keineAuswahl', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "keine Auswahl", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "no selection", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'zustaendigePersonen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "zuständige Personen", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "responsible persons", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'zustaendigeOrganisationseinheiten', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "zuständige Organisationseinheiten", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "responsible organisation units", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'ui',