mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
use phrasen in stv list
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import {CoreFilterCmpt} from "../../filter/Filter.js";
|
||||
import ListNew from './List/New.js';
|
||||
|
||||
import { capitalize } from '../../../helpers/StringHelpers.js';
|
||||
|
||||
|
||||
export default {
|
||||
name: "ListPrestudents",
|
||||
@@ -165,7 +167,85 @@ export default {
|
||||
currentEndpointRawUrl: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$p.user_language.value'(n, o) {
|
||||
if (n !== o && o !== undefined && this.$refs.table.tableBuilt) {
|
||||
this.translateTabulator();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
translateTabulator() {
|
||||
let cm = this.$refs.table.tabulator.columnManager;
|
||||
this.$p
|
||||
.loadCategory(['global', 'person', 'lehre', 'ui', 'profilUpdate', 'admission', 'stv'])
|
||||
.then(() => {
|
||||
const translations = {
|
||||
uid: capitalize(this.$p.t('person/uid')),
|
||||
titelpre: capitalize(this.$p.t('person/titelpre')),
|
||||
nachname: capitalize(this.$p.t('person/nachname')),
|
||||
vorname: capitalize(this.$p.t('person/vorname')),
|
||||
wahlname: capitalize(this.$p.t('person/wahlname')),
|
||||
vornamen: capitalize(this.$p.t('person/vornamen')),
|
||||
titelpost: capitalize(this.$p.t('person/titelpost')),
|
||||
ersatzkennzeichen: capitalize(this.$p.t('person/ersatzkennzeichen')),
|
||||
gebdatum: capitalize(this.$p.t('person/geburtsdatum')),
|
||||
geschlecht: capitalize(this.$p.t('person/geschlecht')),
|
||||
semester: capitalize(this.$p.t('lehre/sem')),
|
||||
verband: capitalize(this.$p.t('lehre/verb')),
|
||||
gruppe: capitalize(this.$p.t('lehre/grp')),
|
||||
studiengang: capitalize(this.$p.t('lehre/studiengang')),
|
||||
studiengang_kz: capitalize(this.$p.t('lehre/studiengang_kz')),
|
||||
matrikelnr: capitalize(this.$p.t('person/personenkennzeichen')),
|
||||
person_id: capitalize(this.$p.t('person/person_id')),
|
||||
status: capitalize(this.$p.t('global/status')),
|
||||
status_datum: capitalize(this.$p.t('profilUpdate/statusDate')),
|
||||
status_bestaetigung: capitalize(this.$p.t('global/status_bestaetigung')),
|
||||
mail_privat: capitalize(this.$p.t('person/email_private')),
|
||||
mail_intern: capitalize(this.$p.t('person/email_intern')),
|
||||
anmerkungen: capitalize(this.$p.t('stv/notes_person')),
|
||||
anmerkung: capitalize(this.$p.t('stv/notes_prestudent')),
|
||||
orgform_kurzbz: capitalize(this.$p.t('lehre/orgform')),
|
||||
aufmerksamdurch_kurzbz: capitalize(this.$p.t('person/aufmerksamDurch')),
|
||||
punkte: capitalize(this.$p.t('admission/gesamtpunkte')),
|
||||
aufnahmegruppe_kurzbz: capitalize(this.$p.t('stv/aufnahmegruppe_kurzbz')),
|
||||
dual: capitalize(this.$p.t('lehre/dual_short')),
|
||||
matr_nr: capitalize(this.$p.t('person/matrikelnummer')),
|
||||
studienplan_bezeichnung: capitalize(this.$p.t('lehre/studienplan')),
|
||||
prestudent_id: capitalize(this.$p.t('ui/prestudent_id')),
|
||||
priorisierung_relativ: capitalize(this.$p.t('lehre/prioritaet')),
|
||||
mentor: capitalize(this.$p.t('stv/mentor')),
|
||||
bnaktiv: capitalize(this.$p.t('person/aktiv'))
|
||||
};
|
||||
|
||||
/** NOTE(chris):
|
||||
* use this approach because updateDefinition
|
||||
* on the Tabulator columns is way slower and
|
||||
* freezes up the GUI.
|
||||
*/
|
||||
// Overwrite definition for column show/hide
|
||||
this.$refs.table.tabulator.getColumns().forEach(col => {
|
||||
const trans = translations[col.getField()];
|
||||
if (!trans)
|
||||
return;
|
||||
col.getDefinition().title = trans;
|
||||
});
|
||||
// Overwrite node in dom
|
||||
this.$refs.table.tabulator.element
|
||||
.querySelectorAll('.tabulator-col[tabulator-field]')
|
||||
.forEach(el => {
|
||||
const field = el.getAttribute('tabulator-field');
|
||||
if (!translations[field])
|
||||
return;
|
||||
|
||||
const title = el.querySelector('.tabulator-col-title');
|
||||
if (!title)
|
||||
return;
|
||||
|
||||
title.innerText = translations[field];
|
||||
});
|
||||
});
|
||||
},
|
||||
reload() {
|
||||
this.$refs.table.reloadTable();
|
||||
},
|
||||
@@ -327,6 +407,7 @@ export default {
|
||||
*/`
|
||||
:new-btn-label="$p.t('stv/action_new')"
|
||||
@click:new="actionNewPrestudent"
|
||||
@table-built="translateTabulator"
|
||||
>
|
||||
<template #filter>
|
||||
<div class="card">
|
||||
|
||||
@@ -2502,6 +2502,46 @@ $phrases = array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'person',
|
||||
'phrase' => 'email_private',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'EMail (Privat)',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'email (private)',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'person',
|
||||
'phrase' => 'email_intern',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'EMail (Intern)',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'email (intern)',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'person',
|
||||
@@ -3084,6 +3124,26 @@ $phrases = array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'lehre',
|
||||
'phrase' => 'orgform',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'OrgForm',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'orgform',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'lehre',
|
||||
@@ -3124,6 +3184,26 @@ $phrases = array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'lehre',
|
||||
'phrase' => 'grp',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Grp.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'grp.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'lehre',
|
||||
@@ -3464,6 +3544,26 @@ $phrases = array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'lehre',
|
||||
'phrase' => 'sem',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Sem.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'sem.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'lehre',
|
||||
@@ -3586,6 +3686,66 @@ $phrases = array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'lehre',
|
||||
'phrase' => 'studiengang_kz',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Studiengang KZ',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Study program no',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'lehre',
|
||||
'phrase' => 'verb',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Verb.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'assoc.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'lehre',
|
||||
'phrase' => 'dual_short',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Dual',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'dual',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
//********************** INFOCENTER/infocenter
|
||||
array(
|
||||
'app' => 'infocenter',
|
||||
@@ -6221,6 +6381,26 @@ The invoice will be sent to you again. <u><strong>The amount is only to be trans
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'global',
|
||||
'phrase' => 'status_bestaetigung',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Status Bestätigung',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Status confirmation',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'global',
|
||||
@@ -38480,6 +38660,86 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'stv',
|
||||
'phrase' => 'notes_person',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Anmerkungen',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'notes',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'stv',
|
||||
'phrase' => 'notes_prestudent',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Anmerkung Pre',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'note Pre',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'stv',
|
||||
'phrase' => 'aufnahmegruppe_kurzbz',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Aufnahmegruppe',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'admission group',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'stv',
|
||||
'phrase' => 'mentor',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Mentor',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'mentor',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'stv',
|
||||
|
||||
Reference in New Issue
Block a user