Assistenten koennen nur Profil Aenderungen von Studenten ansehen deren Organisationseinheit in den Berechtigung des Assistenten vorhanden sind (und kleiner sessionStorage fix der einen String zu Boolean converted)

This commit is contained in:
SimonGschnell
2024-02-08 11:48:14 +01:00
parent fa1871a059
commit 89bc5a5d9d
2 changed files with 41 additions and 16 deletions
+19 -14
View File
@@ -29,7 +29,22 @@ const app = Vue.createApp({
data() {
return {
showAll: false,
profil_updates_table_options: {
ajaxURL:
FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
`/Cis/ProfilUpdate/`,
ajaxURLGenerator: (url, config, params) => {
//? this function needs to be an array function in order to access the this properties of the Vue component
console.log("showAll printed here:", this.showAll);
if (this.showAll) {
return url + "getProfilUpdates";
} else {
return url + "getProfilUpdates/pending";
}
},
ajaxResponse: function (url, params, response) {
//url - the URL of the request
//params - the parameters passed with the request
@@ -118,19 +133,7 @@ const app = Vue.createApp({
}
return menu;
},
ajaxURL:
FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
`/Cis/ProfilUpdate/`,
ajaxURLGenerator: (url, config, params) => {
//? this function needs to be an array function in order to access the this properties of the Vue component
if (this.showAll) {
return url + "getProfilUpdates";
} else {
return url + "getProfilUpdates/pending";
}
},
height: 600,
layout: "fitColumns",
@@ -241,7 +244,9 @@ const app = Vue.createApp({
},
mounted() {
if (!(sessionStorage.getItem("showAll") === null)) {
this.showAll = JSON.parse(sessionStorage.getItem("showAll"));
//? converting string into a boolean: https://sentry.io/answers/how-can-i-convert-a-string-to-a-boolean-in-javascript/
this.showAll = sessionStorage.getItem("showAll")==="true";
}
},
template: `