Issues GUI: added phrases

This commit is contained in:
KarpAlex
2021-10-25 19:14:59 +02:00
parent b0b49f7a41
commit 8cc5be2c40
5 changed files with 470 additions and 41 deletions
@@ -23,18 +23,21 @@ class Issues extends Auth_Controller
$this->load->library('PermissionLib');
$this->load->library('WidgetLib');
// Load models
$this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel');
$this->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel');
$this->loadPhrases(
array(
'global',
'ui',
'filter'
'filter',
'lehre',
'person',
'fehlermonitoring'
)
);
// Load models
$this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel');
$this->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel');
$this->_setAuthUID(); // sets property uid
}
+4 -3
View File
@@ -15,10 +15,11 @@ $this->load->view(
'navigationwidget' => true,
'dialoglib' => true,
'phrases' => array(
'ui' => array('bitteEintragWaehlen')
'ui',
'fehlermonitoring'
),
'customCSSs' => array('public/css/issues/issuesDataset.css', 'public/css/sbadmin2/tablesort_bootstrap.css'),
'customJSs' => array('public/js/issues/issuesDataset.js', 'public/js/bootstrapper.js')
'customJSs' => array('public/js/issues/issuesDataset.js', 'public/js/bootstrapper.js'),
)
);
?>
@@ -33,7 +34,7 @@ $this->load->view(
<div class="row">
<div class="col-lg-12">
<h3 class="page-header">
Fehler Monitoring
<?php echo $this->p->t('fehlermonitoring', 'fehlerMonitoring') ?>
</h3>
</div>
</div>
+18 -17
View File
@@ -4,11 +4,12 @@ $PERSON_ID = getAuthPersonId();
$ALL_FUNKTIONEN_OE_KURZBZ = "('" . implode("','", array_keys($all_funktionen_oe_kurzbz)) . "')";
$ALL_OE_KURZBZ_BERECHTIGT = "('" . implode("','", $all_oe_kurzbz_berechtigt) . "')";
$RELEVANT_PRESTUDENT_STATUS = "('Aufgenommener', 'Student', 'Incoming', 'Diplomand', 'Abbrecher', 'Unterbrecher', 'Absolvent')";
$LANGUAGE_INDEX = getUserLanguage() == 'German' ? '1' : '2';
// get issues for the oes of the uid or for the persons (students, oe-zuordnung) of the oes
$query = "SELECT issue_id, fehlercode AS \"Fehlercode\", iss.fehlercode_extern AS \"Fehlercode extern\", datum AS \"Datum\",
inhalt AS \"Inhalt\", inhalt_extern AS \"Inhalt extern\", iss.person_id AS \"PersonId\", iss.oe_kurzbz AS \"OE\",
ftyp.bezeichnung_mehrsprachig[1] AS \"Fehlertyp\", stat.bezeichnung_mehrsprachig[1] AS \"Fehlerstatus\",
ftyp.bezeichnung_mehrsprachig[".$LANGUAGE_INDEX."] AS \"Fehlertyp\", stat.bezeichnung_mehrsprachig[".$LANGUAGE_INDEX."] AS \"Fehlerstatus\",
verarbeitetvon AS \"Verarbeitet von\",verarbeitetamum AS \"Verarbeitet am\", fr.app AS \"Applikation\",
fr.fehlertyp_kurzbz as \"Fehlertypcode\", iss.status_kurzbz AS \"Statuscode\",
pers.vorname AS \"Vorname\", pers.nachname AS \"Nachname\"
@@ -17,7 +18,7 @@ $query = "SELECT issue_id, fehlercode AS \"Fehlercode\", iss.fehlercode_extern A
JOIN system.tbl_fehlertyp ftyp USING (fehlertyp_kurzbz)
JOIN system.tbl_issue_status stat USING (status_kurzbz)
LEFT JOIN public.tbl_person pers ON iss.person_id = pers.person_id
WHERE EXISTS (
WHERE EXISTS (
SELECT 1 FROM system.tbl_fehler_zustaendigkeiten zst
WHERE fehlercode = iss.fehlercode
AND (
@@ -92,22 +93,22 @@ $filterWidgetArray = array(
'checkboxes' => 'issue_id',
'columnsAliases' => array(
'ID',
'Fehlercode',
'Fehlercode extern',
'Datum',
'Inhalt',
'Inhalt extern',
ucfirst($this->p->t('fehlermonitoring', 'fehlercode')),
ucfirst($this->p->t('fehlermonitoring', 'fehlercodeExtern')),
ucfirst($this->p->t('global', 'datum')),
ucfirst($this->p->t('fehlermonitoring', 'inhalt')),
ucfirst($this->p->t('fehlermonitoring', 'inhaltExtern')),
'PersonId',
'OE',
'Fehlertyp',
'Fehlerstatus',
'Verarbeitet von',
'Verarbeitet am',
'Applikation',
'Fehlertypcode',
'Statuscode',
'Vorname',
'Nachname'
ucfirst($this->p->t('lehre', 'organisationseinheit')),
ucfirst($this->p->t('fehlermonitoring', 'fehlertyp')),
ucfirst($this->p->t('fehlermonitoring', 'fehlerstatus')),
ucfirst($this->p->t('fehlermonitoring', 'verarbeitetVon')),
ucfirst($this->p->t('fehlermonitoring', 'verarbeitetAm')),
ucfirst($this->p->t('global', 'applikation')),
ucfirst($this->p->t('fehlermonitoring', 'fehlertypcode')),
ucfirst($this->p->t('fehlermonitoring', 'statuscode')),
ucfirst($this->p->t('person', 'vorname')),
ucfirst($this->p->t('person', 'nachname'))
),
'formatRow' => function($datasetRaw) {
+19 -16
View File
@@ -11,21 +11,21 @@ var IssuesDataset = {
{
let auswahlStatus =
'<div class="input-group">' +
'<select class="form-control d-inline auswahlStatus">' +
'<option value="resolved"> Behoben </option>' +
'<option value="inProgress"> in Bearbeitung </option>' +
'<option value="new"> Neu </option>' +
'</select>' +
'<span class="input-group-btn">' +
'<button class="btn btn-default setStatus">Status für Ausgew&auml;hlte setzen</button>' +
'</span>' +
'<select class="form-control d-inline auswahlStatus">' +
'<option value="resolved">'+FHC_PhrasesLib.t("fehlermonitoring", "behoben")+'</option>' +
'<option value="inProgress">'+FHC_PhrasesLib.t("fehlermonitoring", "inBearbeitung")+'</option>' +
'<option value="new">'+FHC_PhrasesLib.t("ui", "neu")+'</option>' +
'</select>' +
'<span class="input-group-btn">' +
'<button class="btn btn-default setStatus">'+FHC_PhrasesLib.t("fehlermonitoring", "statusFuerAusgewaehlteSetzen")+'</button>' +
'</span>' +
'</div>';
let selectAllHtml =
'<a href="javascript:void(0)" class="selectAll">' +
'<i class="fa fa-check"></i>&nbsp;Alle</a>&nbsp;&nbsp;' +
'<i class="fa fa-check"></i>&nbsp;'+FHC_PhrasesLib.t("ui", "alle")+'</a>&nbsp;&nbsp;' +
'<a href="javascript:void(0)" class="unselectAll">' +
'<i class="fa fa-times"></i>&nbsp;Keinen</a>&nbsp;&nbsp;&nbsp;&nbsp;';
'<i class="fa fa-times"></i>&nbsp;'+FHC_PhrasesLib.t("ui", "keinen")+'</a>&nbsp;&nbsp;&nbsp;&nbsp;';
let issuescount = 0;
@@ -42,7 +42,7 @@ var IssuesDataset = {
if (issuescount > 0)
{
var countHtml = issuescount + " Fehler";
var countHtml = issuescount + " "+FHC_PhrasesLib.t("fehlermonitoring", "meldungen");
// Count Records after Filtering
$("#filterTableDataset").bind("filterEnd", function() {
@@ -86,10 +86,10 @@ var IssuesDataset = {
let issue_ids_sel = $("#filterTableDataset input:checked[name=issue_id\\[\\]]");
if(status_kurzbz.length <= 0)
return FHC_DialogLib.alertInfo("Bitte wählen Sie den Status aus.");
return FHC_DialogLib.alertInfo(FHC_PhrasesLib.t("fehlermonitoring", "bitteStatusWaehlen"));
if(issue_ids_sel.length <= 0)
return FHC_DialogLib.alertInfo("Bitte wählen Sie die Fehler aus.");
return FHC_DialogLib.alertInfo(FHC_PhrasesLib.t("fehlermonitoring", "bitteFehlerWaehlen"));
let issue_ids = [];
@@ -107,17 +107,20 @@ var IssuesDataset = {
{
successCallback: function(data, textStatus, jqXHR) {
if (FHC_AjaxClient.isError(data))
FHC_DialogLib.alertError("Fehler beim Status &Auml;ndern: " + FHC_AjaxClient.getError(data));
FHC_DialogLib.alertError(
FHC_PhrasesLib.t("fehlermonitoring", "statusAendernFehler") + ": "
+ FHC_AjaxClient.getError(data)
);
else if (FHC_AjaxClient.hasData(data))
{
FHC_FilterWidget.reloadDataset();
FHC_DialogLib.alertSuccess(FHC_AjaxClient.getData(data));
}
else
FHC_DialogLib.alertError("Unbekannter Fehler beim Status &Auml;ndern");
FHC_DialogLib.alertError(FHC_PhrasesLib.t("fehlermonitoring", "statusAendernUnbekannterFehler"));
},
errorCallback: function(jqXHR, textStatus, errorThrown) {
FHC_DialogLib.alertError("Fehler beim Status &Auml;ndern: " + textStatus);
FHC_DialogLib.alertError(FHC_PhrasesLib.t("fehlermonitoring", "statusAendernFehler") + ": " + textStatus);
}
}
);
+421
View File
@@ -13072,6 +13072,427 @@ array(
'insertvon' => 'system'
)
)
),
//******************* Issue/Fehler Monitoring
array(
'app' => 'core',
'category' => 'fehlermonitoring',
'phrase' => 'fehlerMonitoring',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Fehler Monitoring",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Error Monitoring",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'keinen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Keinen",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "None",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'fehlermonitoring',
'phrase' => 'statusFuerAusgewaehlteSetzen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Status für Ausgewählte setzen",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Set state for selected",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'fehlermonitoring',
'phrase' => 'meldungen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Meldungen",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "messages",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'fehlermonitoring',
'phrase' => 'behoben',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Behoben",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Resolved",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'fehlermonitoring',
'phrase' => 'inBearbeitung',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "In Bearbeitung",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "In progress",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'fehlermonitoring',
'phrase' => 'inhalt',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Inhalt",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Content",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'fehlermonitoring',
'phrase' => 'inhaltExtern',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Inhalt extern",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "External content",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'fehlermonitoring',
'phrase' => 'fehlerstatus',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Fehlerstatus",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Error state",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'fehlermonitoring',
'phrase' => 'fehlercode',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Fehlercode",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Error code",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'fehlermonitoring',
'phrase' => 'fehlercodeExtern',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Fehlercode extern",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "External error code",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'fehlermonitoring',
'phrase' => 'fehlertyp',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Fehlertyp",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Error type",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'fehlermonitoring',
'phrase' => 'verarbeitetVon',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Verarbeitet von",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Processed by",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'fehlermonitoring',
'phrase' => 'verarbeitetAm',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Verarbeitet am",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Processed on",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'global',
'phrase' => 'applikation',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Applikation",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "application",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'fehlermonitoring',
'phrase' => 'fehlertypcode',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Fehlertypcode",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Error type code",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'fehlermonitoring',
'phrase' => 'statuscode',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Statuscode",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "State code",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'fehlermonitoring',
'phrase' => 'bitteStatusWaehlen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Bitte wählen Sie den Status aus.",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Please select the state.",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'fehlermonitoring',
'phrase' => 'bitteFehlerWaehlen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Bitte wählen Sie die Fehler aus.",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Please select the errors.",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'fehlermonitoring',
'phrase' => 'statusAendernFehler',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Fehler beim Status Ändern",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Error when changing state",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'fehlermonitoring',
'phrase' => 'statusAendernUnbekannterFehler',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Unbekannter Fehler beim Status Ändern",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Unknown error when changing state",
'description' => '',
'insertvon' => 'system'
)
)
)
);