diff --git a/src/assets/main.scss b/src/assets/main.scss index 3c886d6..e66907a 100644 --- a/src/assets/main.scss +++ b/src/assets/main.scss @@ -99,7 +99,7 @@ body{ font-size: 0.882em; padding: 0 0 1em 0; } - header{ + >header{ display: flex; height: 8rem; flex-direction: column; @@ -125,6 +125,71 @@ body{ font-weight: 300; } + // PUISSANCE D'AGIR + section.content-besoins{ + ul, li{ + padding:0; margin:0; + list-style: none; + } + li.besoin{ + position: relative; + label.mdi:before{ + font-size: 0.8em; + padding-right: 0.2em; + + } + label.mdi:hover:before, + label.mdi.hover:before{ + color:#01ffe2; + } + span.open-btn{ + position: absolute; + right:0; top:0; + cursor: pointer; + } + >header{ + padding: 0 0 0 0; + >label{ + padding:0.5em 0 0.5em 0; + cursor: pointer; + } + h4.besoin-description{ + font-weight: 400; + font-size: 1.2em; + padding: 0.5em 0; + } + a.contribute-link{ + display: block; + text-align: right; + font-weight: 100; + font-size: 0.882em; + } + } + ul.reponses{ + overflow: hidden; + max-height: 1px; + transition: all 0.7s ease-in-out; + li.reponse{ + padding:1em 0; + section{ + padding:0; + label{ padding: 0 0 0 0; } + p{margin: 0 0 1em 0;} + } + + } + } + &.opened{ + ul.reponses{ + max-height: 1000px; + } + } + + padding-bottom: 0.5em; + border-bottom: #aaa 1px solid; + margin-bottom: 1em; + } + } } } @@ -139,8 +204,7 @@ body{ background-color: white; padding: 1em; border-radius: 3px; - // min-width: 10em; - // max-width: 30em; + max-width: 30em; .concernement-map-popup{ ul.icons{ display: flex; @@ -154,7 +218,7 @@ body{ } } } - h1{ + h1, div{ font-size: 1em; font-weight: 400; } diff --git a/src/components/ConcernementMapItem.vue b/src/components/ConcernementMapItem.vue index f3f809b..bce8d7f 100644 --- a/src/components/ConcernementMapItem.vue +++ b/src/components/ConcernementMapItem.vue @@ -212,7 +212,7 @@ export default { this.salientPoints.push(farest) } } - console.log(`this.salientPoints ${this.concernement.id}`, this.salientPoints); + // console.log(`this.salientPoints ${this.concernement.id}`, this.salientPoints); }, initCanvasMap (){ // console.log(`ConcernementsMapItem ${this.concernement.id} initCanvasMap`); @@ -375,6 +375,7 @@ export default { this.body_parts.push(Matter.Bodies.circle(rx, ry, 0.8, { item_type: 'reponse', + field: res_fields[f], id: this.concernement.besoins[i].reponses[j].id, bid: this.concernement.besoins[i].id, cid: this.concernement.id, diff --git a/src/components/ConcernementMapPopup.vue b/src/components/ConcernementMapPopup.vue index 521d539..f6f949e 100644 --- a/src/components/ConcernementMapPopup.vue +++ b/src/components/ConcernementMapPopup.vue @@ -13,19 +13,25 @@ export default { dom: null, type: null, concernement: null, - entite: null + entite: null, + besoin: null, + reponse: null } }, created () { - // console.log(`popup created type: ${this.infos.type}`); + // console.log(`popup created type: ${this.infos.type}`, this.infos); if (this.infos.type === 'concernement') { this.concernement = this.concernementsByID[this.infos.id]; } else if(this.infos.type === 'entite') { this.entite = this.allEntitesById[this.infos.id]; } else if (this.infos.type === 'besoin') { - + this.besoin = this.allBesoinsById[this.infos.id]; } else if (this.infos.type === 'reponse') { - + for (let i = 0; i < this.allBesoinsById[this.infos.bid].reponses.length; i++) { + if (this.allBesoinsById[this.infos.bid].reponses[i].id === this.infos.id) { + this.reponse = this.allBesoinsById[this.infos.bid].reponses[i][this.infos.field]; + } + } } }, mounted () { @@ -36,7 +42,8 @@ export default { computed: { ...mapState(ConcernementsStore,['concernements']), ...mapState(ConcernementsStore,['concernementsByID']), - ...mapState(ConcernementsStore,['allEntitesById']) + ...mapState(ConcernementsStore,['allEntitesById']), + ...mapState(ConcernementsStore,['allBesoinsById']) }, watch: { infos: { @@ -112,10 +119,10 @@ export default {