diff --git a/public/js/components/Cis/Profil/MitarbeiterProfil.js b/public/js/components/Cis/Profil/MitarbeiterProfil.js index 52c9dfb24..a899b0050 100755 --- a/public/js/components/Cis/Profil/MitarbeiterProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterProfil.js @@ -142,6 +142,12 @@ export default { }, methods: { + betriebsmittelTableBuilt: function () { + this.$refs.betriebsmittelTable.tabulator.setData(this.data.mittel); + }, + funktionenTableBuilt: function () { + this.$refs.funktionenTable.tabulator.setData(this.data.funktionen); + }, hideEditProfilModal: function () { //? checks the editModal component property result, if the user made a successful request or not if (this.$refs.editModal.result) { @@ -234,16 +240,6 @@ export default { this.data.profilUpdates?.sort(this.sortProfilUpdates); }, - mounted() { - this.$refs.betriebsmittelTable.tabulator.on("tableBuilt", () => { - this.$refs.betriebsmittelTable.tabulator.setData(this.data.mittel); - }); - - this.$refs.funktionenTable.tabulator.on("tableBuilt", () => { - this.$refs.funktionenTable.tabulator.setData(this.data.funktionen); - }); - }, - template: /*html*/ `
@@ -405,14 +401,14 @@ export default { - +
- +
diff --git a/public/js/components/Cis/Profil/MitarbeiterViewProfil.js b/public/js/components/Cis/Profil/MitarbeiterViewProfil.js index 0c9d451f4..6e4b504f6 100755 --- a/public/js/components/Cis/Profil/MitarbeiterViewProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterViewProfil.js @@ -86,7 +86,11 @@ export default { //? this is the prop passed to the dynamic component with the custom data of the view props: ["data"], - methods: {}, + methods: { + funktionenTableBuilt: function () { + this.$refs.funktionenTable.tabulator.setData(this.data.funktionen); + }, + }, computed: { personEmails() { @@ -128,12 +132,6 @@ export default { }, }, - mounted() { - this.$refs.funktionenTable.tabulator.on("tableBuilt", () => { - this.$refs.funktionenTable.tabulator.setData(this.data.funktionen); - }); - }, - template: /*html*/ `
@@ -228,7 +226,7 @@ export default {
- +
diff --git a/public/js/components/Cis/Profil/StudentProfil.js b/public/js/components/Cis/Profil/StudentProfil.js index 51699cdd4..059742c69 100755 --- a/public/js/components/Cis/Profil/StudentProfil.js +++ b/public/js/components/Cis/Profil/StudentProfil.js @@ -85,6 +85,14 @@ export default { editData: Object, }, methods: { + betriebsmittelTableBuilt: function () { + this.$refs.betriebsmittelTable.tabulator.setData(this.data.mittel); + }, + zutrittsgruppenTableBuilt: function () { + this.$refs.zutrittsgruppenTable.tabulator.setData( + this.data.zuttritsgruppen + ); + }, fetchProfilUpdates: function () { Vue.$fhcapi.ProfilUpdate.selectProfilRequest().then((res) => { if (!res.error) { @@ -175,17 +183,7 @@ export default { this.data.profilUpdates?.sort(this.sortProfilUpdates); }, - mounted() { - this.$refs.betriebsmittelTable.tabulator.on("tableBuilt", () => { - this.$refs.betriebsmittelTable.tabulator.setData(this.data.mittel); - }); - - this.$refs.zutrittsgruppenTable.tabulator.on("tableBuilt", () => { - this.$refs.zutrittsgruppenTable.tabulator.setData( - this.data.zuttritsgruppen - ); - }); - }, + template: /*html*/ ` @@ -350,11 +348,11 @@ export default {
- +
- +
diff --git a/public/js/components/filter/Filter.js b/public/js/components/filter/Filter.js index a0cac4828..047a3d0ec 100755 --- a/public/js/components/filter/Filter.js +++ b/public/js/components/filter/Filter.js @@ -38,7 +38,8 @@ export const CoreFilterCmpt = { }, emits: [ 'nwNewEntry', - 'click:new' + 'click:new', + 'tableBuilt' ], props: { onNwNewEntry: Function, // NOTE(chris): Hack to get the nwNewEntry listener into $props @@ -223,7 +224,7 @@ export const CoreFilterCmpt = { for (let evt of this.tabulatorEvents) this.tabulator.on(evt.event, evt.handler); } - this.tabulator.on('tableBuilt', () => this.tableBuilt = true); + this.tabulator.on('tableBuilt', () => {this.tableBuilt = true; this.$emit('tableBuilt');}); this.tabulator.on("rowSelectionChanged", data => { this.selectedData = data; });