2021-08-02 19:06:41 +02:00
|
|
|
<!-- SPDX-License-Identifier: AGPL-3.0-or-later -->
|
2021-06-07 17:41:25 +02:00
|
|
|
<template>
|
2021-07-26 17:10:28 +02:00
|
|
|
<div v-if="profile" class="container">
|
2021-08-15 20:35:15 +02:00
|
|
|
<h1>
|
|
|
|
{{profile.nickname}}
|
|
|
|
<span v-if="profile.pronouns">({{profile.pronouns}})</span>
|
|
|
|
</h1>
|
2021-07-26 17:10:28 +02:00
|
|
|
<p><label class="fw-bold">Vorstellung: </label> {{profile.freetext}}</p>
|
|
|
|
<p><label class="fw-bold">Ehrentamtliche Arbeit: </label> {{profile.volunteerwork}}</p>
|
|
|
|
<p><label class="fw-bold">Verfügbarkeit: </label> {{profile.availability}}</p>
|
2021-08-15 20:35:15 +02:00
|
|
|
<h3>Das kann ich:</h3>
|
2021-07-26 17:10:28 +02:00
|
|
|
<profile-list
|
|
|
|
:values="profile.skills"
|
|
|
|
type="skill"
|
|
|
|
></profile-list>
|
2021-08-15 20:35:15 +02:00
|
|
|
<h3>Das suche ich:</h3>
|
2021-07-26 17:10:28 +02:00
|
|
|
<profile-list
|
|
|
|
:values="profile.searchtopics"
|
|
|
|
type="skill"
|
|
|
|
></profile-list>
|
|
|
|
<h3>Meine Kontaktmöglichkeiten:</h3>
|
|
|
|
<profile-list
|
|
|
|
:values="profile.contacts"
|
|
|
|
type="contacttype"
|
|
|
|
></profile-list>
|
|
|
|
<h3>Ich Spreche Folgende Sprachen:</h3>
|
|
|
|
<profile-list
|
|
|
|
:values="profile.languages"
|
|
|
|
type="language"
|
|
|
|
></profile-list>
|
|
|
|
<h3>Meine Location:</h3>
|
|
|
|
{{profile.address.city}} ({{profile.address.postcode}}), {{profile.address.country}}
|
|
|
|
</div>
|
2021-06-07 17:41:25 +02:00
|
|
|
</template>
|
|
|
|
<script>
|
2021-07-26 17:10:28 +02:00
|
|
|
import ProfileList from "@/components/ProfileList";
|
|
|
|
|
2021-06-07 17:41:25 +02:00
|
|
|
export default {
|
2021-07-26 17:10:28 +02:00
|
|
|
name: "profileView",
|
|
|
|
components: {
|
|
|
|
ProfileList,
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
profile: null
|
|
|
|
};
|
|
|
|
},
|
|
|
|
async created() {
|
|
|
|
try {
|
|
|
|
const userProfile = await this.axios.get(
|
2021-07-28 21:52:12 +02:00
|
|
|
`${this.apiUrl}/users/${this.$route.params.memberId}/profile`,
|
2021-07-26 17:10:28 +02:00
|
|
|
{
|
|
|
|
headers: { Authorization: `Bearer ${localStorage.getItem("token")}` },
|
|
|
|
}
|
|
|
|
);
|
|
|
|
this.profile = userProfile.data.profile;
|
|
|
|
} catch (error) {
|
|
|
|
console.error(error);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
};
|
2021-07-28 21:52:12 +02:00
|
|
|
</script>
|