mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-26 00:54:27 +00:00
makes the send button in the profil update popup disabled instead of not showing it
This commit is contained in:
@@ -38,11 +38,10 @@ const app = Vue.createApp({
|
||||
|
||||
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";
|
||||
return url + "getProfilUpdateWithPermission";
|
||||
} else {
|
||||
return url + "getProfilUpdates/pending";
|
||||
return url + "getProfilUpdateWithPermission/pending";
|
||||
}
|
||||
},
|
||||
ajaxResponse: function (url, params, response) {
|
||||
|
||||
@@ -43,6 +43,7 @@ export default {
|
||||
|
||||
methods: {
|
||||
async submitProfilChange() {
|
||||
//? check if data is valid before making a request
|
||||
if (this.topic && this.profilUpdate) {
|
||||
if (this.profilUpdate.files) {
|
||||
const fileIDs = await this.uploadFiles(this.profilUpdate.files);
|
||||
@@ -179,7 +180,7 @@ export default {
|
||||
<template v-slot:footer>
|
||||
|
||||
<button class="btn btn-outline-danger " @click="hide">Abbrechen</button>
|
||||
<button v-if="profilUpdate" @click="submitProfilChange" role="button" class="btn btn-primary">Senden</button>
|
||||
<button :disabled="!profilUpdate" @click="submitProfilChange" role="button" class="btn btn-primary">Senden</button>
|
||||
</template>
|
||||
<!-- end of optional footer -->
|
||||
</bs-modal>`,
|
||||
|
||||
@@ -158,6 +158,9 @@ export default {
|
||||
},
|
||||
|
||||
created(){
|
||||
|
||||
//? sorts the profil Updates: pending -> accepted -> rejected
|
||||
this.data.profilUpdates?.sort(this.sortProfilUpdates);
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
Reference in New Issue
Block a user