add admin panel for boxes
This commit is contained in:
parent
fe9795d147
commit
c2e73afb35
8 changed files with 84 additions and 16 deletions
|
@ -11,6 +11,9 @@
|
|||
<li class="nav-item">
|
||||
<router-link class="nav-link" :to="{name: 'events'}" active-class="active">Events</router-link>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<router-link class="nav-link" :to="{name: 'admin_boxes'}" active-class="active">Boxes</router-link>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<router-link class="nav-link" :to="{name: 'users'}" active-class="active">Access Control</router-link>
|
||||
</li>
|
||||
|
|
|
@ -3,28 +3,38 @@
|
|||
:columns="['cid', 'name','itemCount']"
|
||||
:items="loadedBoxes"
|
||||
:keyName="'cid'"
|
||||
v-slot="{ item }"
|
||||
>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-secondary" @click.stop="showBoxContent(item.name)">
|
||||
<!--font-awesome-icon icon="archive"/--> content
|
||||
<template v-slot:header_actions>
|
||||
<button class="btn btn-success" @click.prevent="openAddBoxModal">
|
||||
<font-awesome-icon icon="plus"/>
|
||||
Create Box
|
||||
</button>
|
||||
<button class="btn btn-danger" @click.stop="" title="delete">
|
||||
<font-awesome-icon icon="trash"/>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:actions="{ item }">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-secondary" @click.stop="showBoxContent(item.name)">
|
||||
<!--font-awesome-icon icon="archive"/--> content
|
||||
</button>
|
||||
<button class="btn btn-danger" @click.stop="" title="delete">
|
||||
<font-awesome-icon icon="trash"/>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapActions, mapState} from 'vuex';
|
||||
import {mapActions, mapMutations, mapState} from 'vuex';
|
||||
import Table from '@/components/Table';
|
||||
|
||||
export default {
|
||||
name: 'Boxes',
|
||||
components: {Table},
|
||||
computed: mapState(['loadedBoxes', 'layout']),
|
||||
methods: mapActions(['showBoxContent']),
|
||||
methods: {
|
||||
...mapActions(['showBoxContent']),
|
||||
...mapMutations(['openAddBoxModal'])
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue