Browse Source

admin front: puiisance dagir: updating besoin reponse confidentialite

bach 5 months ago
parent
commit
3eb9403817

+ 1 - 0
src/api/gql/concernement.fragment.gql

@@ -75,6 +75,7 @@ fragment ConcernementFields on Concernement {
     index
     confidentialite
     reponses {
+      confidentialite
       can_update
       author
       avec

+ 21 - 14
src/assets/main.scss

@@ -538,7 +538,10 @@ div.loading{
               max-height: 1px;
               transition: all 0.7s ease-in-out;
               li.reponse{
-                padding:0.5em 0 0;
+                padding:0 0 1em;
+                margin:0 0 1em;
+                // border-bottom: #aaa 1px solid;
+                background: linear-gradient(#aaa 0 0) bottom/ 60% 1px no-repeat;
                 &:last-of-type{
                   padding: 0.5em 0 1em;
                 } 
@@ -561,20 +564,24 @@ div.loading{
                   p{margin:0;}
                 }
 
+                section.editable{
+                  margin: 0 0 0.5em;
+                }
               }
             }
-            a.contribute-link{
-              display: flex;
-              flex-direction: row;
-              justify-content: flex-end;
-              align-items:flex-end;
-              font-weight: 100;
-              font-size: 0.882em;
-              margin-top: 0.5em;
-              svg{
-                width:1em; height:1em; margin-right: 0.5em;
-              }
-            }
+            // a.contribute-link{
+            //   display: flex;
+            //   flex-direction: row;
+            //   justify-content: flex-end;
+            //   align-items:flex-end;
+            //   font-weight: 100;
+            //   font-size: 0.882em;
+            //   margin-top: 0.5em;
+            //   svg{
+            //     width:1em; height:1em; margin-right: 0.5em;
+            //   }
+            // }
+
             &.opened{
               ul.reponses{
                 max-height: 1000px;
@@ -582,8 +589,8 @@ div.loading{
             }
 
             padding-bottom: 0.5em;
-            border-bottom: #aaa 1px solid;
             margin-bottom: 1em;
+            border-bottom: #aaa 1px solid;
           }
         }
 

+ 18 - 0
src/components/contents/PuissanceAgir.vue

@@ -336,6 +336,24 @@ export default {
                 :path="hover_elmt && hover_elmt.type === 'reponse' && hover_elmt.id === reponse.id ? rhombus_path : rhombusoutline_path"
                  />
                 Ressource</label>
+
+              <SelectEditable 
+                v-if="reponse.can_update"
+                label="Confidentialité"
+                :value="reponse.confidentialite"
+                :options="{
+                  'confidentialite_prive': 'privé',
+                  'confidentialite_interne': 'interne',
+                  'confidentialite_public': 'public'
+                }"
+                :data="{
+                  entitytype: 'node',
+                  bundle: 'reponse',
+                  nid: reponse.id,
+                  field: 'field_confidentialite'
+                }"
+                v-on:updated="reloadBesoins" />
+                
               <section v-if="reponse.qui || reponse.can_update">
                 <label for="reponse-qui">Qui</label>
                 <!-- <p name="reponse-qui" v-html="reponse.qui" /> -->

+ 1 - 0
src/stores/concernements.js

@@ -436,6 +436,7 @@ export const ConcernementsStore = defineStore({
                 qui
                 quoi
                 can_update
+                confidentialite
               }
             }
           }