diff --git a/public/css/components/Profil.css b/public/css/components/Profil.css index 66b52439c..2ae004c9f 100644 --- a/public/css/components/Profil.css +++ b/public/css/components/Profil.css @@ -20,6 +20,10 @@ } +.tabulator-col{ + justify-content:center !important; +} + .tabulator-responsive-collapse{ padding:0 !important; } diff --git a/public/js/components/Cis/Profil/MitarbeiterProfil.js b/public/js/components/Cis/Profil/MitarbeiterProfil.js index 27b6bb9b1..0db26f157 100644 --- a/public/js/components/Cis/Profil/MitarbeiterProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterProfil.js @@ -1,7 +1,10 @@ import fhcapifactory from "../../../apps/api/fhcapifactory.js"; import { CoreFilterCmpt } from "../../../components/filter/Filter.js"; - +let customEvents = [{event: "headerClick", handler:function(e,column){ + console.log(e); + console.log(column); +}}] export default { @@ -11,9 +14,9 @@ export default { data() { return { - + showCollapsedColumn: true, funktionen_table_options: { - height:400, + height:300, layout:"fitColumns", responsiveLayout:"collapse", responsiveLayoutCollapseUseFormatters:false, @@ -29,14 +32,15 @@ export default { ], columns: [ //? option when wanting to hide the collapsed list - /* + { - title: "", - field: "", + title: "", + field: "collapse", headerSort: false, + headerFilter:false, formatter:"responsiveCollapse", maxWidth:20, - }, */ + }, { title: "Bezeichnung", field: "Bezeichnung", headerFilter: true,minWidth:200, }, { title: "Organisationseinheit", @@ -115,7 +119,8 @@ export default { return { Allgemein: { - + + View:"MitarbeiterIn", Username: this.data.username, Anrede: this.data.anrede, Titel: this.data.titel, @@ -159,10 +164,48 @@ export default { this.$refs.funktionenTable.tabulator.on('tableBuilt', () => { - this.$refs.funktionenTable.tabulator.setData(this.data.funktionen); + this.$refs.funktionenTable.tabulator.setData(this.data.funktionen); + }) + + + this.$refs.funktionenTable.tabulator.on("headerClick", function(e, column){ + this.showCollapsedColumn = !this.showCollapsedColumn; + + if(column._column.field == "collapse"){ + //* changes the icon that shows or hides all the collapsed columns + if(this.showCollapsedColumn){ + document.getElementById("collapseIcon").classList.replace("fa-angle-up","fa-angle-down"); + }else{ + document.getElementById("collapseIcon").classList.replace("fa-angle-down","fa-angle-up"); + } + + //* changes the icon for every collapsed column to open or closed + [...document.getElementsByClassName("tabulator-responsive-collapse-toggle")].forEach(ele => { + if(this.showCollapsedColumn){ + ele.classList.replace("close","open"); + + }else{ + ele.classList.replace("open","close"); + } + }); + + //* hides or shows the collapsed columns + [...document.getElementsByClassName("tabulator-responsive-collapse")].forEach(ele => { + if(this.showCollapsedColumn){ + ele.style.display="" + + }else{ + ele.style.display="none" + } + + }); + + } + + }); }, @@ -177,10 +220,10 @@ export default {
-
+

- @@ -207,7 +250,7 @@ export default {

-
+
@@ -254,7 +297,7 @@ export default { -
+
@@ -264,20 +307,20 @@ export default { -
+
- -
-
MitarbeiterIn
-
+ -
-
{{bez}}
-
{{wert?wert:"-"}}
+
+
{{wert}}
+
@@ -291,7 +334,7 @@ export default { -
+
@@ -368,7 +411,7 @@ export default {
-
+

Sollten Ihre Daten nicht mehr aktuell sein, klicken Sie bitte hier

@@ -381,12 +424,12 @@ export default {
-
- +
+
-
+
@@ -414,7 +457,7 @@ export default { -
+
Zeitwuensche @@ -426,7 +469,7 @@ export default { -
+
diff --git a/public/js/components/Cis/Profil/MitarbeiterViewProfil.js b/public/js/components/Cis/Profil/MitarbeiterViewProfil.js index 9e04c2c34..370a77a40 100644 --- a/public/js/components/Cis/Profil/MitarbeiterViewProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterViewProfil.js @@ -85,6 +85,7 @@ export default { return { Allgemein: { + View:"MitarbeiterIn", Username: this.data.username, Anrede: this.data.anrede, Titel: this.data.titel, @@ -205,14 +206,15 @@ export default {
- -
-
MitarbeiterIn
-
+ -
-
{{bez}}
-
{{wert?wert:"-"}}
+
+ +
{{wert}}
+
diff --git a/public/js/components/Cis/Profil/StudentProfil.js b/public/js/components/Cis/Profil/StudentProfil.js index 147ab5d34..0eaf820d4 100644 --- a/public/js/components/Cis/Profil/StudentProfil.js +++ b/public/js/components/Cis/Profil/StudentProfil.js @@ -73,7 +73,7 @@ export default { return { Allgemein: { - + View:"StudentIn", Username: this.data.username, Matrikelnummer: this.data.matrikelnummer, Anrede: this.data.anrede, @@ -226,14 +226,16 @@ export default {
- -
-
StudentIn
-
+ -
-
{{bez}}
-
{{wert?wert:"-"}}
+
+ + +
{{wert}}
+
@@ -325,7 +327,7 @@ export default { -
+

Sollten Ihre Daten nicht mehr aktuell sein, klicken Sie bitte hier

diff --git a/public/js/components/Cis/Profil/StudentViewProfil.js b/public/js/components/Cis/Profil/StudentViewProfil.js index 216ddcbfd..2834fdbcd 100644 --- a/public/js/components/Cis/Profil/StudentViewProfil.js +++ b/public/js/components/Cis/Profil/StudentViewProfil.js @@ -39,6 +39,7 @@ export default { return { Allgemein: { + View:"StudentIn", Username: this.data.username, Matrikelnummer: this.data.matrikelnummer, Anrede: this.data.anrede, @@ -161,14 +162,16 @@ export default {
- -
-
StudentIn
-
+ + -
-
{{bez}}
-
{{wert?wert:"-"}}
+
+ +
{{wert}}
+