add admin panel for boxes
This commit is contained in:
parent
fe9795d147
commit
c2e73afb35
8 changed files with 84 additions and 16 deletions
36
web/src/components/AddBoxModal.vue
Normal file
36
web/src/components/AddBoxModal.vue
Normal file
|
@ -0,0 +1,36 @@
|
|||
<template>
|
||||
<div>
|
||||
<Modal v-if="isModal" title="Add Box" @close="$emit('close')">
|
||||
<template #body>
|
||||
<div>
|
||||
<input type="text" class="form-control" placeholder="Box Name" v-model="box_name">
|
||||
</div>
|
||||
</template>
|
||||
<template #buttons>
|
||||
<button type="button" class="btn btn-secondary" @click="$emit('close')">Cancel</button>
|
||||
<button type="button" class="btn btn-success" @click="createBox({name: box_name})">Create</button>
|
||||
</template>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Modal from '@/components/Modal';
|
||||
import {mapActions} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'AddBoxModal',
|
||||
components: {Modal},
|
||||
props: ['isModal'],
|
||||
data: () => ({
|
||||
box_name: '',
|
||||
}),
|
||||
methods: {
|
||||
...mapActions(['createBox']),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<Modal v-if="isModal" title="Add Item" @close="$emit('close')">
|
||||
<Modal v-if="isModal" title="Add Ticket" @close="$emit('close')">
|
||||
<template #body>
|
||||
<div>
|
||||
<input type="text" class="form-control" placeholder="Sender" v-model="ticket.sender">
|
||||
|
|
|
@ -24,14 +24,16 @@
|
|||
>
|
||||
</div>
|
||||
</th>
|
||||
<th></th>
|
||||
<th>
|
||||
<slot name="header_actions"/>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in internalItems" :key="item[keyName]" @click="$emit('itemActivated', item)">
|
||||
<td v-for="(column, index) in columns" :key="index">{{ item[column] }}</td>
|
||||
<td>
|
||||
<slot v-bind:item="item"/>
|
||||
<slot v-bind:item="item" name="actions"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue