Compare commits

...

3 Commits

Author SHA1 Message Date
Harald Bamberger 2e5e7afb4d slot end tag 2026-05-19 17:11:51 +02:00
Harald Bamberger 981c97173e add padding to export icon link 2026-05-19 16:51:24 +02:00
ma0068 f1714db09e add ExcelExport of FAS to StudentList, add slot additional to Filtercomponent 2026-03-19 15:00:51 +01:00
3 changed files with 70 additions and 3 deletions
@@ -195,7 +195,15 @@ export default {
},
{
event: 'dataLoaded',
handler: data => this.count = data.length
handler: data => {
if (Array.isArray(data)) {
this.count = data.length;
this.allPrestudents = data.map(item => item.prestudent_id);
} else {
this.count = 0;
this.allPrestudents = [];
}
}
},
{
event: 'dataFiltered',
@@ -237,7 +245,8 @@ export default {
dragSource: [],
oldScrollUrl: '',
oldScrollLeft: 0,
oldScrollTop: 0
oldScrollTop: 0,
allPrestudents: []
}
},
computed: {
@@ -274,6 +283,7 @@ export default {
};
});
},
//TODO(Manu) check: replace download or additional entry?
downloadConfig() {
return {
csv: {
@@ -291,6 +301,21 @@ export default {
.replace(/\//g, '_');
return "StudentList_" + today + ".csv";
},
selectedPrestudents() {
if (this.selected && this.selected.length > 0) {
return this.selected.map(item => item.prestudent_id);
} else {
// fallback whole list of prestudents
return this.allPrestudents || [];
}
},
linkXLS(){
return FHC_JS_DATA_STORAGE_OBJECT.app_root
+ 'content/statistik/studentenexportextended.xls.php?'
+ '&studiensemester_kurzbz=' + this.currentSemester
+ '&data=' + this.selectedPrestudents.join(";");
},
},
created: function() {
if(this.tagsEnabled) {
@@ -600,7 +625,7 @@ export default {
// TODO(chris): focusin, focusout, keydown and tabindex should be in the filter component
// TODO(chris): filter component column chooser has no accessibilty features
template: `
<div class="stv-list h-100 pt-3">
<div class="stv-list h-100 pt-3">
<div
class="tabulator-container d-flex flex-column h-100"
:class="{'has-filter': filter.length}"
@@ -627,6 +652,27 @@ export default {
@headerFilterOn="handleHeaderFilter"
>
<!--
<template #actions>
<div>
<button
class="btn btn-outline-success sm mb-1"
:title="'Export ' + selectedPrestudents.length + ' prestudent(s) to Excel'"
>
<i class="fas fa-file-excel fa-xl"></i>
</button>
</div>
</template>
-->
<template #additional>
<div class="pe-2">
<a :href="linkXLS" target="_blank">
<i class="fas fa-file-excel fa-xl text-success" :title="$p.t('stv', 'text_exportXLS', { count: selectedPrestudents.length })"></i>
</a>
</div>
</template>
<template #actions>
<core-tag ref="tagComponent"
v-if="tagsEnabled"
+1
View File
@@ -723,6 +723,7 @@ export const CoreFilterCmpt = {
<span class="fa-solid fa-xl fa-table-columns"></span>
</a>
<table-download class="btn btn-link px-0 fhc-text" :tabulator="tabulator" :config="download"></table-download>
<slot name="additional"></slot>
</div>
</div>
+20
View File
@@ -57195,6 +57195,26 @@ I have been informed that I am under no obligation to consent to the transmissio
)
)
),
array(
'app' => 'core',
'category' => 'stv',
'phrase' => 'text_exportXLS',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => '{count} Prestudent(Innen) als Excel exportieren',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Export {count} prestudent(s) to Excel',
'description' => '',
'insertvon' => 'system'
)
)
),
);