update(Profil Profilbild): first version of the profilbild upload endpoint

This commit is contained in:
SimonGschnell
2025-06-26 15:21:09 +02:00
parent cbc9a87a47
commit 9610ca55f7
4 changed files with 200 additions and 1 deletions
@@ -1,4 +1,5 @@
import ApiProfil from '../../../../api/factory/profil.js';
import ImageUpload from '../../Profil/ProfilModal/EditProfilComponents/ImageUpload.js';
export default {
props: {
@@ -17,6 +18,9 @@ export default {
default: true
}
},
components:{
ImageUpload,
},
data() {
return {
FotoSperre: this.data.foto_sperre,
@@ -25,6 +29,9 @@ export default {
emits: ["showEditProfilModal"],
methods: {
showModal(){
this.$refs.imageUpload.show();
},
sperre_foto_function() {
//TODO: refactor
if (!this.data) {
@@ -66,6 +73,7 @@ export default {
template: /*html*/ `
<div class="card h-100">
<image-upload ref="imageUpload" titel="test"></image-upload>
<div class="card-header">
<div class="row">
<div v-if="editable" @click="$emit('showEditProfilModal','Personen_Informationen')" class="col-auto" type="button">
@@ -88,7 +96,7 @@ export default {
<div v-if="editable" role="button" @click.prevent="sperre_foto_function" class="image-lock">
<i :class="{'fa':true, ...(FotoSperre?{'fa-lock':true}:{'fa-lock-open':true})} "></i>
</div>
<div v-if="!fotoStatus" role="button" @click.prevent="" class="image-upload">
<div v-if="!fotoStatus" role="button" @click.prevent="showModal" class="image-upload">
<i class="fa fa-upload"></i>
</div>
</div>