This commit is contained in:
@ -5,17 +5,29 @@
|
||||
<form @submit.prevent="submitForm()">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<input type="radio" id="false" :value="false" v-model="profile.visible" class="mr-2"/>
|
||||
<input
|
||||
type="radio"
|
||||
id="false"
|
||||
:value="false"
|
||||
v-model="profile.visible"
|
||||
class="mr-2"
|
||||
/>
|
||||
<label for="false" class="m-2 fw-bold"> Nicht öffentlich</label>
|
||||
</div>
|
||||
<div class="col">
|
||||
<input type="radio" id="true" :value="true" v-model="profile.visible" />
|
||||
<input
|
||||
type="radio"
|
||||
id="true"
|
||||
:value="true"
|
||||
v-model="profile.visible"
|
||||
/>
|
||||
<label for="true" class="m-2 fw-bold"> Öffentlich</label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="visibilityHelp" class="form-text">
|
||||
Erst wenn du dein Profil Öffentlich stellst, können andere Genoss:innen darauf zugreifen oder es in der Suche finden.
|
||||
</div>
|
||||
Erst wenn du dein Profil Öffentlich stellst, können andere Genoss:innen
|
||||
darauf zugreifen oder es in der Suche finden.
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6 col-xs-12">
|
||||
<label for="nickname" class="form-label fw-bold">Nickname:</label>
|
||||
@ -82,16 +94,16 @@
|
||||
></auto-complete>
|
||||
|
||||
<div class="col-12 col-xs-12">
|
||||
<label for="availability" class="form-label fw-bold"
|
||||
>Ich bin für Anfragen verfügbar:</label
|
||||
>
|
||||
<textarea
|
||||
class="form-control"
|
||||
id="availability"
|
||||
rows="3"
|
||||
v-model="profile.availability"
|
||||
></textarea>
|
||||
</div>
|
||||
<label for="availability" class="form-label fw-bold"
|
||||
>Ich bin für Anfragen verfügbar:</label
|
||||
>
|
||||
<textarea
|
||||
class="form-control"
|
||||
id="availability"
|
||||
rows="3"
|
||||
v-model="profile.availability"
|
||||
></textarea>
|
||||
</div>
|
||||
|
||||
<auto-complete
|
||||
type="contacttype"
|
||||
@ -130,7 +142,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-outline-success mb-4 mt-4 col-12">Speichern</button>
|
||||
<button type="submit" class="btn btn-outline-success mb-4 mt-4 col-12">
|
||||
Speichern
|
||||
</button>
|
||||
<div
|
||||
class="alert alert-danger mb-4 mt-4"
|
||||
role="alert"
|
||||
@ -183,9 +197,7 @@ export default {
|
||||
async created() {
|
||||
try {
|
||||
const userProfile = await axios.get(
|
||||
`${this.apiUrl}/users/${localStorage.getItem(
|
||||
"user_id"
|
||||
)}/profile`,
|
||||
`${this.apiUrl}/users/${localStorage.getItem("user_id")}/profile`,
|
||||
{
|
||||
headers: { Authorization: `Bearer ${localStorage.getItem("token")}` },
|
||||
}
|
||||
@ -199,9 +211,7 @@ export default {
|
||||
async submitForm() {
|
||||
try {
|
||||
const formSubmitResult = await axios.post(
|
||||
`${this.apiUrl}/users/${localStorage.getItem(
|
||||
"user_id"
|
||||
)}/profile`,
|
||||
`${this.apiUrl}/users/${localStorage.getItem("user_id")}/profile`,
|
||||
this.profile,
|
||||
{
|
||||
headers: {
|
||||
@ -220,7 +230,7 @@ export default {
|
||||
console.error(error);
|
||||
this.showErrorMessage = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user