diff --git a/src/components/ItemComponents/EditItemForm.vue b/src/components/ItemComponents/EditItemForm.vue index 1f8466df00d7c1deada1c6ee4a67a45a95a76ad6..a6d7bf2f2abbab1e2a7ac6e646d9706b9923c19f 100644 --- a/src/components/ItemComponents/EditItemForm.vue +++ b/src/components/ItemComponents/EditItemForm.vue @@ -383,7 +383,8 @@ export default { for (let i = 0; i <= this.updatedItem.selectedCommunities.length; i++) { if ( - this.updatedItem.selectedCommunityId == this.updatedItem.selectedCommunities[i] + this.updatedItem.selectedCommunityId == + this.updatedItem.selectedCommunities[i] ) { const index = this.updatedItem.selectedCommunities.indexOf( this.updatedItem.selectedCommunityId @@ -396,7 +397,9 @@ export default { } if (!alreadyInGroupList) { - this.updatedItem.selectedCommunities.push(this.updatedItem.selectedCommunityId); + this.updatedItem.selectedCommunities.push( + this.updatedItem.selectedCommunityId + ); this.communityErrorMessage = ""; } }, diff --git a/src/components/ItemComponents/NewItemForm.vue b/src/components/ItemComponents/NewItemForm.vue index e49e41ca6b80fe3a1cfe85fd341509715ae0fda3..2fd16fe3b736db08e26b37a8a8880ae8e89ae407 100644 --- a/src/components/ItemComponents/NewItemForm.vue +++ b/src/components/ItemComponents/NewItemForm.vue @@ -202,7 +202,8 @@ <Button :text="'Velg bilde'" @click="$refs.file.click()" /> <div v-for="image in item.images" :key="image" class="m-2"> - <img :src="image" class="w-2/5 inline" alt="Bilde av gjenstanden" /> <!-- @click="removeImage(image)" --> + <img :src="image" class="w-2/5 inline" alt="Bilde av gjenstanden" /> + <!-- @click="removeImage(image)" --> </div> </div> @@ -373,10 +374,10 @@ export default { fileReader.onloadend = async function () { const res = fileReader.result; const id = await postNewImageCommunity(res); - + const API_URL = process.env.VUE_APP_BASEURL; that.item.imagesToSend.push(API_URL + "images/" + id); - that.item.images.push(API_URL + "images/" + id) + that.item.images.push(API_URL + "images/" + id); }; fileReader.readAsArrayBuffer(image); }, @@ -413,7 +414,6 @@ export default { } } this.item.images = newImages; - }, }, beforeMount() {