added linked materials in modalCard

This commit is contained in:
2021-01-20 12:09:22 +01:00
parent a3dd424289
commit 37f199416f
14 changed files with 382 additions and 46 deletions

View File

@@ -36,7 +36,7 @@
</div>
</section>
</nav>
<section class="samples">
<!-- <section class="samples">
<h3>{{ $t("materio.Samples") }}</h3>
<ul>
<li
@@ -46,8 +46,11 @@
<span class="showroom">{{ sample.showroom.name }}</span>: {{ sample.location }}
</li>
</ul>
</section>
</section> -->
<section class="body" v-html="material.body"/>
<section class="linked-materials">
<LinkedMaterialCard v-for="m in material.linked_materials" v-bind:key="m.id" :item="m"/>
</section>
</section>
<section class="col col-left images" v-switcher>
<figure
@@ -79,6 +82,9 @@
<script>
import { mapState, mapActions } from 'vuex'
import LinkedMaterialCard from 'vuejs/components/Content/LinkedMaterialCard'
import cardMixins from 'vuejs/components/cardMixins'
import { MGQ } from 'vuejs/api/graphql-axios'
@@ -90,6 +96,9 @@ export default {
name: "ModalCard",
props: ['item'],
mixins: [cardMixins],
components: {
LinkedMaterialCard
},
data() {
return {
material: null,
@@ -126,7 +135,7 @@ export default {
MGQ.post('', { query: print(ast)
})
.then(({ data:{data:{materiau}}}) => {
console.log('loadMaterial', materiau )
console.log('loadMaterial material loaded', materiau )
this.material = materiau
this.loading = false
// delay the lazyload to let the card the time to update dom