|
@@ -4,16 +4,33 @@ import { mapActions, mapState } from 'pinia'
|
|
|
import { ConcernementsStore } from '@stores/concernements'
|
|
|
|
|
|
export default {
|
|
|
- props: ['entite'],
|
|
|
+ props: ['entite', 'eid'],
|
|
|
data() {
|
|
|
return {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapState(ConcernementsStore,['opened_concernement']),
|
|
|
- ...mapState(ConcernementsStore,['ct_concernement']),
|
|
|
- ...mapState(ConcernementsStore,['ct_entite']),
|
|
|
-
|
|
|
+ ...mapState(ConcernementsStore,['opened_concernement',
|
|
|
+ 'ct_concernement',
|
|
|
+ '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: {
|
|
|
|
|
@@ -29,7 +46,7 @@ export default {
|
|
|
<div v-html="entite.action"/>
|
|
|
</section>
|
|
|
<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"/>
|
|
|
</section>
|
|
|
<!-- SOURCES (experiences vecues) -->
|
|
@@ -41,7 +58,7 @@ export default {
|
|
|
:key="index"
|
|
|
class="source">
|
|
|
<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"/>
|
|
|
</section>
|
|
|
|