Browse Source

[192-webreport] Added indication to selected ids in IDsList

Evgeni 4 years ago
parent
commit
e84075404b
1 changed files with 11 additions and 2 deletions
  1. 11 2
      report-viewer/src/components/IDsList.vue

+ 11 - 2
report-viewer/src/components/IDsList.vue

@@ -4,7 +4,9 @@
 <template>
 <template>
   <div class="container">
   <div class="container">
     <div class="column-list">
     <div class="column-list">
-      <p v-for="(id, index) in ids" :key="index" @click="$emit('idSent', [id])">
+      <p v-for="(id, index) in ids" :key="index"
+         :class="{'selected' : !store.state.anonymous.has(id) && store.state.anonymous.size !== 0 }"
+         @click="$emit('idSent', [id])">
         {{ id }}
         {{ id }}
       </p>
       </p>
     </div>
     </div>
@@ -14,6 +16,7 @@
 
 
 <script>
 <script>
 import {defineComponent} from "vue";
 import {defineComponent} from "vue";
+import store from "@/store/store.ts"
 
 
 export default defineComponent({
 export default defineComponent({
   name: "IDsList",
   name: "IDsList",
@@ -27,7 +30,8 @@ export default defineComponent({
     // eslint-disable-next-line vue/no-setup-props-destructure
     // eslint-disable-next-line vue/no-setup-props-destructure
     const savedIds = props.ids
     const savedIds = props.ids
     return {
     return {
-      savedIds
+      savedIds,
+      store
     }
     }
   }
   }
 })
 })
@@ -64,10 +68,15 @@ button:hover {
   width: 100%;
   width: 100%;
   font-weight: bold;
   font-weight: bold;
   margin: 0;
   margin: 0;
+  border-radius: 10px;
 }
 }
 
 
 .column-list > p:hover {
 .column-list > p:hover {
   background: var(--primary-color-dark);
   background: var(--primary-color-dark);
   cursor: pointer;
   cursor: pointer;
 }
 }
+
+.selected {
+  background: var(--primary-color-dark);
+}
 </style>
 </style>