added samples to flagcollection and linked material in thematique

This commit is contained in:
2021-03-18 21:58:59 +01:00
parent 406d215a04
commit 50f76ff0cd
8 changed files with 2556 additions and 44 deletions

View File

@@ -6,5 +6,12 @@ fragment MateriauFields on Materiau {
style_minicard{
url
}
}
samples{
showroom{
name
id
}
location
}
}

View File

@@ -1,7 +1,9 @@
fragment MateriauFields on Materiau {
id
title
short_description
reference
body
note{
id
contenu
@@ -68,16 +70,6 @@ fragment MateriauFields on Materiau {
family_name
}
}
attachments {
description
file{
fid
filename
url
filesize
}
}
body
samples{
showroom{
name

View File

@@ -14,6 +14,13 @@ fragment ThematiqueFields on Thematique {
url
style_cardmedium_url
style_hd_url
}
samples{
showroom{
name
id
}
location
}
}
images {

View File

@@ -7,6 +7,20 @@
<span v-if="item.reference" class="ref">{{ item.reference }}</span>
</header>
<nav class="tools">
<section class="tool samples" v-if="item.samples && item.samples.length">
<span class="btn mdi mdi-beaker-outline"/>
<div class="tool-content">
<span class="label">{{ $t("materio.Samples") }}</span>
<ul>
<li
v-for="sample in item.samples"
:key="sample.showroom.id"
>
<span class="showroom">{{ sample.showroom.name }}</span>: {{ sample.location }}
</li>
</ul>
</div>
</section>
<section class="tool flags">
<span
class="mdi unflag"

View File

@@ -7,7 +7,7 @@
<li v-if="flagcolls" v-for="coll in flagcolls" :key="coll.id">
<h5
:flagcollid="coll.id"
@click.prevent="onOpenFlagColl"
@click.prevent="onOpenFlagColl(coll.id)"
>{{ coll.name }} <span class="length">({{ coll.items.length }})</span></h5>
<div class="actions">
<span
@@ -133,8 +133,8 @@ export default {
this.is_deleting_folder = false
}
},
onOpenFlagColl (e) {
const flagcollid = e.target.getAttribute('flagcollid');
onOpenFlagColl (flagcollid) {
// const flagcollid = e.target.getAttribute('flagcollid');
console.log("UserFlags onOpenFlagColl", flagcollid);
this.openFlagColl(flagcollid)
.then(() => {