stash
This commit is contained in:
parent
6248a7ef2f
commit
0b46fb152c
3 changed files with 93 additions and 0 deletions
|
|
@ -26,6 +26,25 @@
|
|||
<label for="quantity" class="form-label">Quantity</label>
|
||||
{{ item.owned_quantity }}
|
||||
</div>
|
||||
<!-- TODO -->
|
||||
<!--div class="mb-3">
|
||||
<label for="image" class="form-label">Image</label>
|
||||
<input type="text" class="form-control" id="image" name="image"
|
||||
placeholder="Enter image" v-model="item.image">
|
||||
</div-->
|
||||
<div class="mb-3">
|
||||
<label for="image" class="form-label">Image</label>
|
||||
<div>
|
||||
<img v-for="file in files" :key="file.id" :alt="file.name"
|
||||
:src="'https://toolshed.j3d1.de'+file.name" class="img-thumbnail border-info">
|
||||
<!-- TODO replace dirty hack with proper solution -->
|
||||
</div>
|
||||
<div>
|
||||
<authenticated-image v-for="file in files" :key="file.id" :src="file.name"
|
||||
:owner="file.owner"></authenticated-image>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
|
|
@ -50,14 +69,21 @@
|
|||
import * as BIcons from "bootstrap-icons-vue";
|
||||
import BaseLayout from "@/components/BaseLayout.vue";
|
||||
import {mapActions, mapGetters} from "vuex";
|
||||
import AuthenticatedImage from "@/components/AuthenticatedImage.vue";
|
||||
|
||||
export default {
|
||||
name: "InventoryDetail",
|
||||
components: {
|
||||
AuthenticatedImage,
|
||||
PropertyField, TagField,
|
||||
BaseLayout,
|
||||
...BIcons
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
files: []
|
||||
}
|
||||
},
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
|
|
@ -75,6 +101,14 @@ export default {
|
|||
},
|
||||
async mounted() {
|
||||
await this.fetchInventoryItems()
|
||||
console.log(this.id, typeof this.id)
|
||||
const files = await this.fetchFilesByItem({id: this.id})
|
||||
this.files = files.map(file => {
|
||||
return {
|
||||
...file,
|
||||
owner: this.item.owner
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue