store filters in url query
This commit is contained in:
parent
bfee56564c
commit
99107f4583
4 changed files with 31 additions and 12 deletions
|
@ -5,7 +5,7 @@
|
|||
<Table
|
||||
:columns="['cid', 'name']"
|
||||
:items="loadedBoxes"
|
||||
:keyName="'item_uid'"
|
||||
:keyName="'cid'"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,27 +3,26 @@
|
|||
<div class="row" v-if="layout === 'table'">
|
||||
<div class="col-xl-8 offset-xl-2">
|
||||
<Table
|
||||
:columns="['iid', 'item_uid', 'bezeichnung', 'container']"
|
||||
:columns="['uid', 'description', 'box']"
|
||||
:items="loadedItems"
|
||||
:keyName="'item_uid'"
|
||||
:keyName="'uid'"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<Cards
|
||||
v-if="layout === 'cards'"
|
||||
:columns="['iid', 'item_uid', 'bezeichnung', 'container']"
|
||||
:columns="['uid', 'description', 'box']"
|
||||
:items="loadedItems"
|
||||
:keyName="'item_uid'"
|
||||
:keyName="'uid'"
|
||||
v-slot="{ item }"
|
||||
>
|
||||
<img
|
||||
:src="`https://c3lf.de/api/1/thumbs/${item.file}`"
|
||||
alt="item"
|
||||
class="card-img-top img-fluid"
|
||||
>
|
||||
<div class="card-body">
|
||||
<h6 class="card-title">{{ item.bezeichnung }}</h6>
|
||||
<h6 class="card-subtitle text-secondary">uid: {{ item.item_uid }} box: {{ item.container }}</h6>
|
||||
<h6 class="card-title">{{ item.description }}</h6>
|
||||
<h6 class="card-subtitle text-secondary">uid: {{ item.uid }} box: {{ item.box }}</h6>
|
||||
</div>
|
||||
</Cards>
|
||||
</div>
|
||||
|
@ -33,10 +32,13 @@
|
|||
import Table from '@/components/Table';
|
||||
import Cards from '@/components/Cards';
|
||||
import { mapState } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'Items',
|
||||
components: { Table, Cards },
|
||||
computed: mapState(['loadedItems', 'layout']),
|
||||
methods: {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue