aboutsummaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-03-21 21:18:09 +0100
committerMateja <mail@matejamaric.com>2021-03-21 21:18:09 +0100
commit3d4617bac822b54c04eb2f19509aa77e8c7a3bfd (patch)
tree2796660b11b5f7e898a0e732d17c2a6751edfac9 /resources
parentce6dbf4d6f1340a02899faa3c4984b3493270ce8 (diff)
downloadyota-laravel-3d4617bac822b54c04eb2f19509aa77e8c7a3bfd.tar.gz
yota-laravel-3d4617bac822b54c04eb2f19509aa77e8c7a3bfd.zip
Add descriptions to activities call sign filter.
Diffstat (limited to 'resources')
-rw-r--r--resources/js/components/activities.vue2
-rw-r--r--resources/js/components/call-sign-filter.vue13
2 files changed, 14 insertions, 1 deletions
diff --git a/resources/js/components/activities.vue b/resources/js/components/activities.vue
index dd22c7f..1b1057c 100644
--- a/resources/js/components/activities.vue
+++ b/resources/js/components/activities.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <call-sign-filter @sign-changed="filterChanged()"></call-sign-filter>
+ <call-sign-filter :showDescriptions="true" @sign-changed="filterChanged()"></call-sign-filter>
<div class="table-responsive mt-2">
<table class="table table-striped table-bordered" style="white-space:nowrap;">
diff --git a/resources/js/components/call-sign-filter.vue b/resources/js/components/call-sign-filter.vue
index 16eaae8..0ba8b4d 100644
--- a/resources/js/components/call-sign-filter.vue
+++ b/resources/js/components/call-sign-filter.vue
@@ -5,11 +5,18 @@
<option value="all">All</option>
<option v-for="option in options" :key="option.id" :value="option.sign" v-text="option.sign"></option>
</select>
+
+ <div class="card mb-3" v-if="showDescriptions && (selected !== 'all')">
+ <div class="card-body pb-1">
+ <div class="card-text" v-html="description"></div>
+ </div>
+ </div>
</div>
</template>
<script>
export default {
+ props: ['showDescriptions'],
mounted() {
this.$store.dispatch('pullSigns');
},
@@ -25,6 +32,12 @@ export default {
},
options() {
return this.$store.getters.getSigns;
+ },
+ description() {
+ for (let i = 0; i < this.options.length; i++)
+ if (this.options[i].sign === this.selected)
+ return this.options[i].description;
+ return '';
}
}
}