-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c65215
commit b59700f
Showing
14 changed files
with
175 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,70 @@ | ||
<template> | ||
<div id="app-graphs"> | ||
<div class="graph__tabs"> | ||
<router-link :to="{ name: 'PieChart' }">Koláčový</router-link> | ||
<router-link :to="{ name: 'AxisChart' }">Sloupcový</router-link> | ||
<div> | ||
<router-link :to="{ name: 'PieChart' }">Koláčový</router-link> | ||
<router-link :to="{ name: 'AxisChart' }">Sloupcový</router-link> | ||
</div> | ||
<div> | ||
<span v-if="documentFilters.active" class="chart-filter-warning" @click.stop="toggleModal"> | ||
<font-awesome-icon :icon="['far', 'exclamation-triangle']" /> | ||
filtry z dokumentu jsou aktivní | ||
</span> | ||
</div> | ||
</div> | ||
<router-view :current-file="currentFile"></router-view> | ||
<router-view :current-file="currentFile" @data-are-filtered="documentFilterActive"></router-view> | ||
<Modal v-if="modalVisible"> | ||
<div class="modal-body w-400"> | ||
<h3>Aktivní filtry</h3> | ||
<ul class="modal-body__option-list"> | ||
<li v-for="filter in Object.keys(documentFilters.filters)" :key="filter"> | ||
{{ filter }}: {{ documentFilters.filters[filter].values.join(', ') }} | ||
</li> | ||
</ul> | ||
<button class="button__primary" @click.prevent="toggleModal">Zavřít</button> | ||
</div> | ||
</Modal> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import Modal from '@/components/Modal' | ||
export default { | ||
name: 'chart-page', | ||
components: { | ||
Modal | ||
}, | ||
props: { | ||
currentFile: { | ||
type: String, | ||
default: null | ||
}, | ||
}, | ||
data () { | ||
return { | ||
documentFilters: { | ||
active: false, | ||
filters: {} | ||
}, | ||
modalVisible: false | ||
} | ||
}, | ||
methods: { | ||
documentFilterActive ({ active, filters }) { | ||
console.log(Object.keys(filters).length) | ||
if (Object.keys(filters).length > 0) { | ||
this.documentFilters.active = active | ||
this.documentFilters.filters = filters | ||
} | ||
}, | ||
toggleModal () { | ||
this.modalVisible = !this.modalVisible | ||
} | ||
} | ||
} | ||
</script> |
Oops, something went wrong.