menace / maintient #2205
This commit is contained in:
parent
4cd2d78e07
commit
0bb60fe21e
@ -27,6 +27,7 @@ fragment ConcernementFields on Concernement {
|
|||||||
name
|
name
|
||||||
}
|
}
|
||||||
entites {
|
entites {
|
||||||
|
menacemaintien
|
||||||
entite {
|
entite {
|
||||||
title
|
title
|
||||||
id
|
id
|
||||||
|
@ -4,16 +4,33 @@ import { mapActions, mapState } from 'pinia'
|
|||||||
import { ConcernementsStore } from '@stores/concernements'
|
import { ConcernementsStore } from '@stores/concernements'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: ['entite'],
|
props: ['entite', 'eid'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(ConcernementsStore,['opened_concernement']),
|
...mapState(ConcernementsStore,['opened_concernement',
|
||||||
...mapState(ConcernementsStore,['ct_concernement']),
|
'ct_concernement',
|
||||||
...mapState(ConcernementsStore,['ct_entite']),
|
'ct_entite']),
|
||||||
|
field_menace_maintien_label (){
|
||||||
|
let str;
|
||||||
|
if (this.opened_concernement.entites_byid[this.eid].menacemaintien < 0) {
|
||||||
|
str = this.ct_entite.field_menace_maintien.description.replace('/maintient', '')
|
||||||
|
} else {
|
||||||
|
str = this.ct_entite.field_menace_maintien.description.replace('menace/', '')
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
},
|
||||||
|
field_sources_label () {
|
||||||
|
let str;
|
||||||
|
if (this.opened_concernement.entites_byid[this.eid].menacemaintien < 0) {
|
||||||
|
str = this.ct_entite.field_sources.description.replace('/ ce maintient', '')
|
||||||
|
} else {
|
||||||
|
str = this.ct_entite.field_sources.description.replace('cette menace /', '')
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
@ -29,7 +46,7 @@ export default {
|
|||||||
<div v-html="entite.action"/>
|
<div v-html="entite.action"/>
|
||||||
</section>
|
</section>
|
||||||
<section class="menace-maintien">
|
<section class="menace-maintien">
|
||||||
<label v-if="ct_entite">{{ ct_entite.field_menace_maintien.description }}</label>
|
<label v-if="ct_entite">{{ field_menace_maintien_label }}</label>
|
||||||
<div v-html="entite.menacemaintien"/>
|
<div v-html="entite.menacemaintien"/>
|
||||||
</section>
|
</section>
|
||||||
<!-- SOURCES (experiences vecues) -->
|
<!-- SOURCES (experiences vecues) -->
|
||||||
@ -41,7 +58,7 @@ export default {
|
|||||||
:key="index"
|
:key="index"
|
||||||
class="source">
|
class="source">
|
||||||
<section class="description">
|
<section class="description">
|
||||||
<label v-if="ct_entite"> {{ ct_entite.field_sources.description }}</label>
|
<label v-if="ct_entite"> {{ field_sources_label }}</label>
|
||||||
<div v-html="source.description"/>
|
<div v-html="source.description"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ export default {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- entite -->
|
<!-- entite -->
|
||||||
<Entite v-if="entite" :entite="entite"/>
|
<Entite v-if="entite" :entite="entite" :eid="eid"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user