When editing a adventure, prepopulate preview images with images from backend.

This commit is contained in:
2019-03-04 00:20:09 +01:00
parent 2387abfc9f
commit 86a358734b
2 changed files with 25 additions and 2 deletions

View File

@@ -33,7 +33,7 @@
</div>
<form-element-upload @newFiles="setFiles"></form-element-upload>
<form-element-upload @newFiles="setFiles" :adventureId="adventureId"></form-element-upload>
<!-- <div class="form-button-wrapper form-button-wrapper--align-left">
@@ -76,6 +76,7 @@ export default {
},
data() {
return {
adventureId: undefined,
title: undefined,
dateStart: undefined,
dateEnd: undefined,
@@ -97,6 +98,7 @@ export default {
console.log('formData', formData)
if (formData) {
this.adventureId = formData.id;
this.title = formData.title;
this.dateStart = dateToDayMonthYearDashed(formData.dateStart);
this.dateEnd = dateToDayMonthYearDashed(formData.dateEnd);