Mercurial > gemma
view client/src/components/importoverview/Filters.vue @ 3333:d5dbfba9faae
clinet: pdf-template: fix positioning of diagramlegend (FairwayAvailability,AvailableFairwayDepth)
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Mon, 20 May 2019 16:54:52 +0200 |
parents | 3473f3b72e21 |
children |
line wrap: on
line source
<template> <div> <button @click="setFilter('pending')" :class="'mr-1 btn btn-xs btn-' + (this.pending ? 'secondary' : 'light')" > <translate>pending</translate> </button> <button @click="setFilter('failed')" :class="'mr-1 btn btn-xs btn-' + (this.failed ? 'secondary' : 'light')" > <translate>failed</translate> </button> <button @click="setFilter('accepted')" :class="'mr-1 btn btn-xs btn-' + (this.accepted ? 'secondary' : 'light')" > <translate>accepted</translate> </button> <button @click="setFilter('declined')" :class="'mr-1 btn btn-xs btn-' + (this.declined ? 'secondary' : 'light')" > <translate>declined</translate> </button> <button @click="setFilter('warning')" :class="'btn btn-xs btn-' + (this.warning ? 'secondary' : 'light')" > <translate>warning</translate> </button> </div> </template> <script> /* This is Free Software under GNU Affero General Public License v >= 3.0 * without warranty, see README.md and license for details. * * SPDX-License-Identifier: AGPL-3.0-or-later * License-Filename: LICENSES/AGPL-3.0.txt * * Copyright (C) 2018 by via donau * – Österreichische Wasserstraßen-Gesellschaft mbH * Software engineering by Intevation GmbH * * Author(s): * Thomas Junk <thomas.junk@intevation.de> */ import { mapState } from "vuex"; export default { name: "importfilters", methods: { setFilter(name) { if (this.loading) return; this.$store.commit("imports/toggleFilter", name); } }, computed: { ...mapState("imports", [ "pending", "failed", "accepted", "warning", "declined" ]) } }; </script>