1222604703
- User moderate actions - Don't show closed reports on the main reports dashboard - User links should link to the user's local (or shadowed) profile *inside* Admin FE so a moderator can do a more "full spectrum" analysis of the situation
66 lines
1.3 KiB
Vue
66 lines
1.3 KiB
Vue
<template>
|
|
<el-select
|
|
v-model="filter"
|
|
:placeholder="$t('reportsFilter.inputPlaceholder')"
|
|
clearable
|
|
class="select-field"
|
|
value-key="value"
|
|
@change="toggleFilters">
|
|
<el-option
|
|
v-for="item in options"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value">{{ item.label }}</el-option>
|
|
</el-select>
|
|
</template>
|
|
|
|
<script>
|
|
import i18n from '@/lang'
|
|
|
|
export default {
|
|
data() {
|
|
return {
|
|
filter: 'open',
|
|
options: [
|
|
{
|
|
value: 'open',
|
|
label: i18n.t('reportsFilter.open')
|
|
},
|
|
{
|
|
value: 'closed',
|
|
label: i18n.t('reportsFilter.closed')
|
|
},
|
|
{
|
|
value: 'resolved',
|
|
label: i18n.t('reportsFilter.resolved')
|
|
}
|
|
]
|
|
}
|
|
},
|
|
created() {
|
|
this.$store.dispatch('SetFilter', this.$data.filter)
|
|
},
|
|
methods: {
|
|
toggleFilters() {
|
|
this.$store.dispatch('SetFilter', this.$data.filter)
|
|
this.$store.dispatch('ClearFetchedReports')
|
|
this.$store.dispatch('FetchReports')
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style rel='stylesheet/scss' lang='scss' scoped>
|
|
.select-field {
|
|
width: 350px;
|
|
}
|
|
@media
|
|
only screen and (max-width: 760px),
|
|
(min-device-width: 768px) and (max-device-width: 1024px) {
|
|
.select-field {
|
|
width: 100%;
|
|
margin-bottom: 5px;
|
|
}
|
|
}
|
|
</style>
|