add direct link from box view to items filtered by box
This commit is contained in:
parent
372d773ec4
commit
90b9d63bb5
4 changed files with 24 additions and 4 deletions
|
@ -4,7 +4,11 @@
|
|||
<div class="col-xl-8 offset-xl-2">
|
||||
<Table
|
||||
:columns="['cid', 'name']"
|
||||
:actions="['enlarge']"
|
||||
:actions="[
|
||||
{name:'enlarge'},
|
||||
{name:'content', fun: (item,action) => showBoxContent(item.name)},
|
||||
{name:'delete'},
|
||||
]"
|
||||
:items="loadedBoxes"
|
||||
:keyName="'cid'"
|
||||
/>
|
||||
|
@ -14,12 +18,14 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex';
|
||||
import {mapActions, mapState} from 'vuex';
|
||||
import Table from '@/components/Table';
|
||||
|
||||
export default {
|
||||
name: 'Boxes',
|
||||
components: {Table},
|
||||
computed: mapState(['loadedBoxes', 'layout']),
|
||||
methods: mapActions(['showBoxContent']),
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -16,7 +16,10 @@
|
|||
<div class="col-xl-8 offset-xl-2">
|
||||
<Table
|
||||
:columns="['uid', 'description', 'box']"
|
||||
:actions="['enlarge', 'delete']"
|
||||
:actions="[
|
||||
{name: 'enlarge'},
|
||||
{name: 'delete'}
|
||||
]"
|
||||
:items="loadedItems"
|
||||
:keyName="'uid'"
|
||||
@itemActivated="openModalWith($event)"
|
||||
|
@ -26,7 +29,9 @@
|
|||
<Cards
|
||||
v-if="layout === 'cards'"
|
||||
:columns="['uid', 'description', 'box']"
|
||||
:actions="['delete']"
|
||||
:actions="[
|
||||
{name: 'delete'}
|
||||
]"
|
||||
:items="loadedItems"
|
||||
:keyName="'uid'"
|
||||
v-slot="{ item }"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue