Merge branch 'master' into feature-78257/StudVW_Und_Tags_Finetuning

This commit is contained in:
Harald Bamberger
2026-08-11 18:00:17 +02:00
24 changed files with 507 additions and 95 deletions
@@ -197,3 +197,11 @@ $config['unterbrechung_enabled'] = true;
*/
$config['wiederholung_enabled'] = true;
/**
* Modal with Infotext of TLC
* if true, there will be shown an info modal in the studentsView after the first button ABMELDUNG
*
* @var boolean
*/
$config['showInfoModalAbmeldung'] = true;
+2 -2
View File
@@ -22,10 +22,10 @@ if (!defined('BASEPATH')) exit('No direct script access allowed');
$config['root'] = [
'stg' => [
'semester' => [
/*'group',
'group',
'verband' => [
'group'
]*/
]
],
'orgform'
]
@@ -756,6 +756,8 @@ class Students extends FHCAPI_Controller
'studiensemester_kurzbz' => $studiensemester_kurzbz
));
$studiensemester_kurzbz = $this->getStudiensemesterKurzbz($studiensemester_kurzbz);
$this->load->library('SearchLib', [ 'config' => 'searchstv' ]);
$this->load->library('form_validation');
@@ -14,11 +14,11 @@ class Mylv extends Auth_Controller
public function __construct()
{
parent::__construct([
'Student' => ['student/anrechnung_beantragen:r','user:r'], // TODO(chris): permissions?
'Studiensemester' => ['student/anrechnung_beantragen:r','user:r'], // TODO(chris): permissions?
'Lvs' => ['student/anrechnung_beantragen:r','user:r'], // TODO(chris): permissions?
'Info' => ['student/anrechnung_beantragen:r','user:r'], // TODO(chris): permissions?
'Pruefungen' => ['student/anrechnung_beantragen:r','user:r'] // TODO(chris): permissions?
'Student' => self::PERM_LOGGED,
'Studiensemester' => self::PERM_LOGGED,
'Lvs' => self::PERM_LOGGED,
'Info' => self::PERM_LOGGED,
'Pruefungen' => self::PERM_LOGGED
]);
}
+1 -1
View File
@@ -125,7 +125,7 @@ class AntragJob extends JOB_Controller
$stgLeitungen[$leitung->uid]['stgs'][] = $antrag->studiengang_kz;
}
$result = $this->StudierendenantragModel->getStgAndSem($antrag->studierendenantrag_id);
$result = $this->StudierendenantragModel->getStgAndDetails($antrag->studierendenantrag_id);
if (isError($result))
{
$this->logError(getError($result));
@@ -25,7 +25,8 @@ class Studierendenantrag extends FHC_Controller
// Load language phrases
$this->loadPhrases([
'studierendenantrag'
'studierendenantrag',
'ui'
]);
$this->load->config('studierendenantrag');
+1 -1
View File
@@ -37,7 +37,7 @@ class TagLib
$this->_ci->load->library('PermissionLib');
$this->_ci->load->library('PrestudentLib');
$batchUser = $this->_ci->config->item('userAutomatedTags');
$this->batchUser = $this->_ci->config->item('userAutomatedTags');
}
public function updateAutomatedTags($paramsTag)
+8 -11
View File
@@ -320,16 +320,9 @@ class StudentListLib
* @param string studiensemester_kurzbz
*
*/
protected function addSelectAndJoinForTagsIfConfigured($studiensemester_kurzbz)
{
protected function addSelectAndJoinForTagsIfConfigured($studiensemester_kurzbz)
{
if (defined('STV_TAGS_ENABLED') && STV_TAGS_ENABLED) {
$this->_ci->load->model('system/Sprache_model', 'SpracheModel');
$this->_ci->SpracheModel->addSelect('index');
$result = $this->_ci->SpracheModel->loadWhere(array('sprache' => getUserLanguage()));
$language = hasData($result) ? getData($result)[0]->index : 1;
$index_bezeichnung_mehrsprachig = $language - 1;
$this->_ci->load->config('stv');
$tags = $this->_ci->config->item('stv_prestudent_tags');
@@ -351,7 +344,11 @@ class StudentListLib
SELECT DISTINCT ON (n.notiz_id)
n.notiz_id AS id,
nt.typ_kurzbz,
array_to_json(nt.bezeichnung_mehrsprachig)->>". $index_bezeichnung_mehrsprachig . " AS beschreibung,
nt.bezeichnung_mehrsprachig[(
SELECT index
FROM tbl_sprache
WHERE sprache=" . $this->_ci->PrestudentModel->escape(getUserLanguage()) . "
)] AS beschreibung,
n.text AS notiz,
nt.style,
n.erledigt AS done,
@@ -387,7 +384,7 @@ class StudentListLib
$this->addSelect('tag_data_agg.tags');
$this->addJoin($subQueryTag, 'tag_data_agg.prestudent_id = tbl_prestudent.prestudent_id', 'LEFT');
}
}
}
/**
* Get alias of a table or select statement
@@ -188,6 +188,7 @@ class Studierendenantrag_model extends DB_Model
* Get the studiengang and ausbildungssemester the student was in
* for the studiensemester the antrag was committed for
*
*
* @param integer $antrag_id
*
* @return stdClass
@@ -242,6 +243,28 @@ class Studierendenantrag_model extends DB_Model
);
}
/**
* Get the studiengang and the studienplan the student is in
*
* @param integer $antrag_id
*
* @return stdClass
*/
public function getStgAndDetails($antrag_id)
{
$this->addSelect('p.studiengang_kz');
$this->addSelect('stg.orgform_kurzbz');
$this->addSelect('stg.bezeichnung');
$this->addJoin('public.tbl_prestudent p', 'prestudent_id');
$this->addJoin('public.tbl_studiengang stg', 'studiengang_kz');
$this->addLimit(1);
return $this->load(
$antrag_id
);
}
public function getStgEmail($antrag_id)
{
$this->addJoin('public.tbl_prestudent p', 'prestudent_id');
+1 -1
View File
@@ -56,7 +56,7 @@ $configArray = [
<router-view
default-semester="<?= $variables['semester_aktuell']; ?>"
active-addons="<?= defined('ACTIVE_ADDONS') ? ACTIVE_ADDONS : ''; ?>"
stv-root="<?= site_url('Studentenverwaltung'); ?>"
stv-root="<?= site_url('studvw'); ?>"
cis-root="<?= CIS_ROOT; ?>"
avatar-url="<?= site_url('Cis/Pub/bild/person/' . getAuthPersonId()); ?>"
logout-url="<?= site_url('Cis/Auth/logout'); ?>"
+74 -10
View File
@@ -30,6 +30,12 @@ if(defined('CIS4')){
}
?>
<?php
$config = $this->load->config('studierendenantrag');
$showInfoModalAbmeldung = $this->config->item('showInfoModalAbmeldung');
?>
<div id="wrapper">
<div class="fhc-header">
@@ -43,17 +49,75 @@ if(defined('CIS4')){
<h4><?= $array['bezeichnungStg']; ?> (<?= $array['bezeichnungOrgform']; ?>)</h4>
<?php foreach ($array['allowedNewTypes'] as $type) { ?>
<div class="alert alert-secondary">
<p><?= $this->p->t('studierendenantrag', 'calltoaction_' . $type); ?></p>
<hr>
<a
href="<?= site_url('lehre/Studierendenantrag/' . strtolower($type) . '/' . $prestudent_id); ?>"
class="btn btn-outline-secondary"
>
<i class="fa fa-plus"></i> <?= $this->p->t('studierendenantrag', 'antrag_typ_' . $type); ?>
</a>
<p><?= $this->p->t('studierendenantrag', 'calltoaction_' . $type); ?></p>
<hr>
<?php
if($type == 'Abmeldung' && $showInfoModalAbmeldung){
$href = "#modalinfo" . $prestudent_id;
}
else
$href = site_url('lehre/Studierendenantrag/' . strtolower($type) . '/' . $prestudent_id);
?>
<a
href="<?= $href ?>"
class="btn btn-outline-secondary"
<?php if($type == 'Abmeldung' && $showInfoModalAbmeldung): ?>
data-bs-toggle="modal"
<?php endif; ?>
>
<i class="fa fa-plus"></i> <?= $this->p->t('studierendenantrag', 'antrag_typ_' . $type); ?>
</a>
<!-- Modal -->
<div
class="modal fade"
id="modalinfo<?= $prestudent_id; ?>"
tabindex="-1"
aria-labelledby="modalinfoLabel<?= $prestudent_id; ?>"
aria-hidden="true"
>
<div class="modal-dialog modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5
class="modal-title"
id="modalinfoLabel<?= $prestudent_id; ?>"
> <?= $this->p->t('studierendenantrag', 'info_consultation'); ?>
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<?php
$hrefUnterbrechung = site_url('lehre/Studierendenantrag/unterbrechung/' . $prestudent_id);
?>
<div class="modal-body">
<div
class="form-control"
style="width: 100%; height: 250px;overflow:auto; white-space: normal;"
><?= $this->p->t('studierendenantrag', 'modalHinweistext_Abmeldung', ['linkUnterbrechung' => $hrefUnterbrechung] ); ?>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-primary" data-bs-dismiss="modal"><?= $this->p->t('ui', 'cancel'); ?></button>
<a
href="<?= site_url('lehre/Studierendenantrag/abmeldung/' . $prestudent_id); ?>"
class="btn btn-outline-primary"
> <?= $this->p->t('studierendenantrag', 'link_Abmeldung'); ?>
</a>
</div>
</div>
</div>
</div>
</div>
<?php } ?>
<?php } ?>
<table class="table">
<thead>
@@ -205,7 +269,7 @@ if(defined('CIS4')){
</a>
<lv-popup
id="modallv<?= $antrag->studierendenantrag_id; ?>"
antrag-id = "<?= $antrag->studierendenantrag_id; ?>"
:antrag-id = "<?= $antrag->studierendenantrag_id; ?>"
>
<?= $this->p->t('studierendenantrag', 'my_lvs'); ?>
</lv-popup>
+4 -4
View File
@@ -109,9 +109,9 @@
"type": "package",
"package": {
"name": "fortawesome/font-awesome6",
"version": "6.1.1",
"version": "6.7.2",
"dist": {
"url": "https://github.com/FortAwesome/Font-Awesome/archive/refs/tags/6.1.1.zip",
"url": "https://github.com/FortAwesome/Font-Awesome/archive/refs/tags/6.7.2.zip",
"type": "zip"
}
}
@@ -468,7 +468,7 @@
"fgelinas/timepicker": "0.3.3",
"fortawesome/font-awesome4": "4.7.*",
"fortawesome/font-awesome6": "6.1.*",
"fortawesome/font-awesome6": "6.7.*",
"fzaninotto/faker": "1.*",
"firebase/php-jwt": "^6.0",
@@ -496,7 +496,7 @@
"netcarver/textile": "3.7.*",
"nicolaskruchten/pivottable": "2.23.0",
"npm-asset/primevue": "3.29.1",
"npm-asset/primeicons": "5.0.0",
"npm-asset/primeicons": "6.0.1",
"olifolkerd/tabulator4": "4.9.*",
"olifolkerd/tabulator5": "5.5.*",
Generated
+5 -5
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "869cbc35bd1ba90ab90934fcb41b0f51",
"content-hash": "bc21de2a48b960781c1ed028c4b8d7b9",
"packages": [
{
"name": "afarkas/html5shiv",
@@ -960,10 +960,10 @@
},
{
"name": "fortawesome/font-awesome6",
"version": "6.1.1",
"version": "6.7.2",
"dist": {
"type": "zip",
"url": "https://github.com/FortAwesome/Font-Awesome/archive/refs/tags/6.1.1.zip"
"url": "https://github.com/FortAwesome/Font-Awesome/archive/refs/tags/6.7.2.zip"
},
"type": "library"
},
@@ -1565,10 +1565,10 @@
},
{
"name": "npm-asset/primeicons",
"version": "5.0.0",
"version": "6.0.1",
"dist": {
"type": "tar",
"url": "https://registry.npmjs.org/primeicons/-/primeicons-5.0.0.tgz"
"url": "https://registry.npmjs.org/primeicons/-/primeicons-6.0.1.tgz"
},
"type": "npm-asset",
"license": [
@@ -82,6 +82,9 @@ export default {
hasTileGammaSlot() {
return !!this.$slots.titleGammaTile
},
hasTileDeltaSlot() {
return !!this.$slots.titleDeltaTile
},
hasTileUIDSlot() {
return !!this.$slots.uid
},
@@ -497,6 +500,13 @@ export default {
<div class="px-2" style="min-width: 100px;">
<slot name="issues"></slot>
</div>
<div v-if="hasTileDeltaSlot" class="px-2" style="border-left: 1px solid #EEE">
<h4 class="mb-1 text-center"><slot name="titleDeltaTile"></slot></h4>
<h6 class="text-muted d-flex align-items-center justify-content-center flex-wrap gap-1">
<pv-skeleton v-if="isLoading" width="4rem"></pv-skeleton>
<slot v-else name="valueDeltaTile"></slot>
</h6>
</div>
<div v-if="hasTileGammaSlot" class="px-2" style="border-left: 1px solid #EEE">
<h4 class="mb-1 text-center"><slot name="titleGammaTile"></slot></h4>
<h6 class="text-muted d-flex align-items-center justify-content-center flex-wrap gap-1">
@@ -617,6 +627,13 @@ export default {
<div class="px-2" style="min-width: 100px;">
<slot name="issues"></slot>
</div>
<div v-if="hasTileDeltaSlot" class="px-2" style="border-left: 1px solid #EEE">
<h4 class="mb-1 text-center"><slot name="titleDeltaTile"></slot></h4>
<h6 class="text-muted d-flex align-items-center justify-content-center flex-wrap gap-1">
<pv-skeleton v-if="isLoading" width="4rem"></pv-skeleton>
<slot v-else name="valueDeltaTile"></slot>
</h6>
</div>
<div v-if="hasTileGammaSlot" class="px-2" style="border-left: 1px solid #EEE">
<h4 class="mb-1 text-center"><slot name="titleGammaTile"></slot></h4>
<h6 class="text-muted d-flex align-items-center justify-content-center flex-wrap gap-1">
@@ -49,10 +49,13 @@ export default {
permissionLehrveranstaltung: this.permissions['lehre/lehrveranstaltung'],
permissionGruppenEntfernen: this.permissions['lv-plan/gruppenentfernen'],
permissionLektorEntfernen: this.permissions['lv-plan/lektorentfernen'],
language: Vue.computed(() => this.$p.user_language),
isMobile: false,
}
},
data() {
return {
sidebarCollapsed: false,
appconfig:{},
configEndpoints: ApiLvConfig,
selected: [],
@@ -89,8 +89,9 @@ export default {
hasZGVMasterPermission: this.permissions['student/editMakkZgv'],
hasZGVDoctorPermission: this.permissions['student/editDokZgv'],
hasBismeldenPermission: this.permissions['student/editBismelden'],
authUid: this.authUid
authUid: this.authUid,
language: Vue.computed(() => this.$p.user_language),
isMobile: false,
}
},
data() {
@@ -218,6 +219,28 @@ export default {
return extraItems;
},
appMenuBisItems() {
const extraItems = [];
if (this.studiengangKz !== undefined) {
const studiengang_kz = String(this.studiengangKz);
extraItems.push({
link: FHC_JS_DATA_STORAGE_OBJECT.app_root
+ 'vilesci/bis/studentenmeldung.php?'
+ 'stg_kz=' + studiengang_kz,
description: 'stv/bis_stud_meldung'
});
extraItems.push({
link: FHC_JS_DATA_STORAGE_OBJECT.app_root
+ 'system/checkStudenten.php?'
+ 'stg_kz=' + studiengang_kz,
description: 'stv/bis_stud_plausicheck'
});
}
return extraItems;
},
linkRt(){
return FHC_JS_DATA_STORAGE_OBJECT.app_root + '/vilesci/stammdaten/reihungstestverwaltung.php'
},
@@ -291,6 +314,11 @@ export default {
sidebarCollapsed(newVal) {
if(newVal) this.$refs.hSplit.collapseLeft()
else this.$refs.hSplit.showBoth()
},
studiengangKz(newVal, oldVal) {
if (newVal !== oldVal) {
this.$refs.stvList.clearSelection();
}
}
},
methods: {
@@ -403,6 +431,9 @@ export default {
showAlertNoGroupChosen(){
this.$fhcAlert.alertError(this.$p.t('ui', 'alert_chooseGroupSem'));
},
showAlertNoDegreeProgramChosen(){
this.$fhcAlert.alertError(this.$p.t('ui', 'alert_chooseDegreeProgram'));
},
showMenu(refName) {
bootstrap.Dropdown.getOrCreateInstance(this.$refs[refName]).show();
},
@@ -615,13 +646,13 @@ export default {
</li>
</ul>
</li>
<li :class="{ dropend: appMenuExtraItems.length }"
@mouseenter="appMenuExtraItems.length && showMenu('lvPlanungToggle')"
@mouseleave="appMenuExtraItems.length && hideMenu('lvPlanungToggle')"
<li :class="{ dropend: appMenuLvPlanungItems.length }"
@mouseenter="appMenuLvPlanungItems.length && showMenu('lvPlanungToggle')"
@mouseleave="appMenuLvPlanungItems.length && hideMenu('lvPlanungToggle')"
>
<a
ref="lvPlanungToggle"
v-if="appMenuExtraItems.length"
v-if="appMenuLvPlanungItems.length"
class="dropdown-toggle"
href="#"
role="button"
@@ -638,7 +669,7 @@ export default {
>
{{ $p.t('stv/lvplanung') }}
</a>
<ul v-if="appMenuExtraItems.length" class="dropdown-menu p-0">
<ul v-if="appMenuLvPlanungItems.length" class="dropdown-menu p-0">
<li
v-for="(item, key) in appMenuLvPlanungItems"
:key="key"
@@ -665,6 +696,42 @@ export default {
{{ $p.t('stv/studienverlauf') }}
</a>
</li>
<li :class="{ dropend: appMenuBisItems.length }"
@mouseenter="appMenuBisItems.length && showMenu('bisToggle')"
@mouseleave="appMenuBisItems.length && hideMenu('bisToggle')"
>
<a
ref="bisToggle"
v-if="appMenuBisItems.length"
class="dropdown-toggle"
href="#"
role="button"
data-bs-toggle="dropdown"
aria-expanded="false"
data-bs-popper-config='{"strategy":"fixed"}'
>
{{ $p.t('stv/bis_stud') }}
</a>
<a
v-else
href="#"
@click.prevent="showAlertNoDegreeProgramChosen"
>
{{ $p.t('stv/bis_stud') }}
</a>
<ul v-if="appMenuBisItems.length" class="dropdown-menu p-0">
<li
v-for="(item, key) in appMenuBisItems"
:key="key"
>
<a class="dropdown-item" :href="item.link" target="_blank">
{{ $p.t(item.description) }}
</a>
</li>
</ul>
</li>
</app-menu>
</div>
</aside>
@@ -63,6 +63,14 @@ export default {
let tile = this.students[0].matrikelnr != null ? this.students[0].matrikelnr : '-';
return tile;
},
tile_PrestdId(){
let tile = this.students[0].prestudent_id != null ? this.students[0].prestudent_id : '-';
return tile;
},
tile_UID(){
let tile = this.students[0].uid != null ? this.students[0].uid : '-';
return tile;
},
},
watch: {
'$p.user_language.value'(n, o) {
@@ -143,13 +151,15 @@ export default {
fotoEditable
:isLoading="isLoading"
>
<template #uid>{{students[0].uid}}</template>
<template #titleAlphaTile>PersID</template>
<template #valueAlphaTile>{{tile_PersId}}</template>
<template #titleBetaTile>MatrNr</template>
<template #valueBetaTile>{{tile_MatrNr}}</template>
<template #titleGammaTile>PersKz</template>
<template #valueGammaTile>{{tile_PersKz}}</template>
<template #uid>{{tile_UID}}</template>
<template #titleAlphaTile>PrestdID</template>
<template #valueAlphaTile>{{tile_PrestdId}}</template>
<template #titleBetaTile>PersID</template>
<template #valueBetaTile>{{tile_PersId}}</template>
<template #titleGammaTile>MatrNr</template>
<template #valueGammaTile>{{tile_MatrNr}}</template>
<template #titleDeltaTile>PersKz</template>
<template #valueDeltaTile>{{tile_PersKz}}</template>
</fhc-header>
<fhc-tabs
v-if="students.length == 1"
@@ -402,7 +402,7 @@ export default {
name="foto"
@actionbutton-clicked="sendInfomail"
>
<img alt="No Image" :src="noImageSrc" class="w-100">
<img alt="No Image" :src="noImageSrc" />
</form-input>
<form-input
v-if="!config.hiddenFields.includes('anmerkung')"
@@ -31,6 +31,11 @@ export default {
teacherLoaded: false,
};
},
computed: {
gradeListLink() {
return this.$api.getUri('/person/gradelist/index/' + this.modelValue.uid);
}
},
methods: {
reload() {
this.$refs.zeugnis.$refs.table.reloadTable();
@@ -69,13 +74,21 @@ export default {
const savedPath = window.localStorage.getItem(LOCAL_STORAGE_ID);
this.stdsem = savedPath || '';
},
template: `
template: /* html */`
<div class="stv-details-noten d-flex flex-column overflow-hidden">
<div class="mb-3">
<select class="form-select" v-model="stdsem" @input="saveStdsem">
<option value="">{{ $p.t('ui/current_semester') }}</option>
<option value="true">{{ $p.t('ui/all_semester') }}</option>
</select>
<div class="d-flex justify-content-between my-2">
<div>
<select class="form-select" v-model="stdsem" @input="saveStdsem">
<option value="">{{ $p.t('ui/current_semester') }}</option>
<option value="true">{{ $p.t('ui/all_semester') }}</option>
</select>
</div>
<div>
<a :href="gradeListLink" target="_blank">
{{ $p.t('stv/grades_gradelist') }}
<i class="fa-solid fa-arrow-up-right-from-square"></i>
</a>
</div>
</div>
<div class="row">
<div class="col-8">
@@ -746,6 +746,7 @@ export default {
}
this.isLoading = false;
this.$reloadList();
},
showModal(){
this.$refs.modalLocked.open();
+23 -19
View File
@@ -107,7 +107,6 @@ export const CoreFilterCmpt = {
default: [],
},
},
inject: ["language"],
data: function () {
return {
uuid: 0,
@@ -215,23 +214,9 @@ export const CoreFilterCmpt = {
fieldIdsForVisibilty() {
if (!this.tableBuilt) return [];
const localizedColumnTitles = this.tabulator.getLang().columns;
const isTabulatorLocalized = !!this.$props.tabulatorOptions.locale;
return this.tabulator
.getColumns()
.filter((col) => {
let def = col.getDefinition();
let title =
isTabulatorLocalized && localizedColumnTitles[def.field]
? localizedColumnTitles[def.field]
: def.title;
return (
!def.frozen &&
title &&
def.formatter != "responsiveCollapse"
);
})
.map((col) => col.getField());
return this.$props.tabulatorOptions?.columns
?.filter((column) => column.formatter !== "responsiveCollapse")
.map((column) => column.field) ?? [];
},
idExtra() {
if (!this.uuid) return "";
@@ -261,6 +246,9 @@ export const CoreFilterCmpt = {
...{ title: filterTitles[el.name] },
}));
},
language() {
return this.$p.user_language;
},
},
watch: {
"language.value": {
@@ -931,7 +919,23 @@ export const CoreFilterCmpt = {
if (!this.tableBuilt) {
return {};
} else if (this.tabulator.options.locale) {
return this.tabulator.getLang().columns;
let result = this.tabulator.getLang().columns;
const columnFieldTitlePairs = this.tabulator
.getColumns()
.map((column) => {
const definition = column.getDefinition();
return [definition.field, definition.title];
});
columnFieldTitlePairs.forEach((fieldTitlePair) => {
if (
fieldTitlePair[0]?.length &&
fieldTitlePair[1]?.length &&
!(fieldTitlePair[0] in result)
) {
result[fieldTitlePair[0]] = fieldTitlePair[1];
}
});
return result;
}
return this.tabulator.getColumns().reduce((res, col) => {
res[col.getField()] = col.getDefinition().title;
@@ -34,6 +34,7 @@ export default {
presetInfo: null,
newPreset: null,
newPresetName: "",
presetIndexBeingApplied: null,
};
},
computed: {
@@ -161,6 +162,9 @@ export default {
},
},
methods: {
getPresetIndex() {
return this.presetIndexBeingApplied;
},
async showPresetInfo(preset) {
let shouldUpdatePresetInfo;
if (!this.presetInfo) {
@@ -393,14 +397,22 @@ export default {
this.fetchCustomUserTabulatorPresets();
}
},
async applyPreset(preset) {
preset = this.syncPresetWithConfig(preset);
window.localStorage["tabulatorPreset-" + this.$props.presetsId] =
preset.id ? "custom:" + preset.id : "general:" + preset.name;
async applyPreset(preset, index) {
this.presetIndexBeingApplied = index;
this.$props.tabulator.modules.tablePresets.applyPreset(preset);
this.$emit("tablePresetApplied", { preset });
// workaround for updating DOM and displaying preset-loading spinner
// conventional use of $nextTick ineffective
setTimeout(() => {
preset = this.syncPresetWithConfig(preset);
window.localStorage["tabulatorPreset-" + this.$props.presetsId] =
preset.id ? "custom:" + preset.id : "general:" + preset.name;
this.$props.tabulator.modules.tablePresets.applyPreset(preset);
this.$emit("tablePresetApplied", { preset });
this.presetIndexBeingApplied = null;
}, 50);
},
async fetchCustomUserTabulatorPresets() {
let tabulatorPresetsResponse = await this.$api.call(
@@ -453,7 +465,7 @@ export default {
if (!preset) return;
this.applyPreset(preset);
this.applyPreset(preset, null);
},
},
async created() {
@@ -467,8 +479,19 @@ export default {
<div class="card-header">{{ $p.t("tabulator_presets/table_presets") }}</div>
<div class="card-body d-flex flex-column">
<div class="d-flex flex-row gap-1 justify-content-start flex-wrap">
<div v-for="preset in allPresets" class="d-flex flex-column gap-1 mb-2">
<div @click="applyPreset(preset)" class="btn btn-dark py-1 px-2">{{ preset.name }}</div>
<div v-for="(preset, index) in allPresets" class="d-flex flex-column gap-1 mb-2">
<div @click="applyPreset(preset, index)" class="position-relative btn btn-dark py-1 px-2">
<span :class="{'opacity-0': getPresetIndex() === index}">{{ preset.name }}</span>
<div
v-if="getPresetIndex() === index"
class="position-absolute d-flex flex-row align-items-center justify-content-center"
style="inset:0;"
>
<div class="spinner-border spinner-border-sm" role="status" style>
<span class="visually-hidden">Loading...</span>
</div>
</div>
</div>
<div class="d-flex flex-row justify-content-center">
<div class="d-flex flex-row gap-2 px-3">
<span @click="showPresetInfo(preset)" type="button" class="fa-solid fa-circle-info"></span>
@@ -34,10 +34,21 @@ export default class TablePresetsModule extends Module {
if (preset.headerFilters) {
Object.entries(preset.headerFilters).forEach(
([columnField, filterValue]) => {
this.table.setHeaderFilterValue(
columnField,
filterValue,
);
this.table.setHeaderFilterValue(columnField, filterValue);
// double checking if filter inputs are filled in due to issues with custom header filters
const headerFilterInputElement =
this.table.columnManager.columns
.find((column) => column.field === columnField)
?.element.querySelector(
".tabulator-header-filter input",
);
if (
headerFilterInputElement &&
headerFilterInputElement.value !== filterValue
) {
headerFilterInputElement.value = filterValue;
}
},
);
}
+168
View File
@@ -41556,6 +41556,26 @@ array(
)
),
// grades
array(
'app' => 'core',
'category' => 'stv',
'phrase' => 'grades_gradelist',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Studienverlauf',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Grade list',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'stv',
@@ -62183,6 +62203,154 @@ I have been informed that I am under no obligation to consent to the transmissio
)
)
),
// StudVw legacy Bis Links begin
array(
'app' => 'core',
'category' => 'stv',
'phrase' => 'bis_stud',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'BIS (Studierende)',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'BIS (Students)',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'stv',
'phrase' => 'bis_stud_meldung',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Meldung generieren (Studierende)',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Generate Report (Students)',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'stv',
'phrase' => 'bis_stud_plausicheck',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Plausibilitätsprüfung (Studierende)',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Plausibility Check (Students)',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'alert_chooseDegreeProgram',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Bitte einen Studiengang auswählen!',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Please select a degree program!',
'description' => '',
'insertvon' => 'system'
)
)
),
// StudVw legacy Bis Links ende
array(
'app' => 'core',
'category' => 'studierendenantrag',
'phrase' => 'link_Abmeldung',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Weiter zur Abmeldung',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Continue to De-registration',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'studierendenantrag',
'phrase' => 'modalHinweistext_Abmeldung',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Bevor du deine Abmeldung abschließt, möchten wir dir gerne ein Gespräch anbieten. Vielleicht gibt es Fragen, Unsicherheiten oder Herausforderungen, bei denen wir dich unterstützen können.<br>
<br>Du kannst dich jederzeit unverbindlich an deine Studiengangsassistenz, Studiengangsleitung oder das <a href='https://cis.technikum-wien.at/cis.php/CisVue/Cms/content/9248' target='_blank'>Student Support Team</a> wenden. Ein Gespräch ist natürlich freiwillig – manchmal hilft es aber, gemeinsam Optionen zu besprechen, zum Beispiel auch eine vorübergehende
<a href={linkUnterbrechung} target='_blank'>Studienunterbrechung</a>.
<br><br>Wenn du deine Abmeldung fortsetzen möchtest, kannst du das selbstverständlich tun.",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Before you finalize your deregistration, we would like to offer you a consultation. Perhaps you have questions, uncertainties, or challenges that we can help you with. <br>
<br>You can contact your program assistant, program director, or the <a href='https://cis.technikum-wien.at/cis.php/CisVue/Cms/content/9248' target='_blank'>Student Support Team</a> at any time without obligation. A consultation is, of course, voluntary; however, sometimes it helps to discuss options together, such as a
<a href={linkUnterbrechung} target='_blank'>temporary break</a> from your studies.
<br><br>If you wish to proceed with your deregistration, you can, of course, do so.",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'studierendenantrag',
'phrase' => 'info_consultation',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Hinweis Beratungsgespräch',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Note Consultation',
'description' => '',
'insertvon' => 'system'
)
)
),
);