only use uid instead of item_uid
This commit is contained in:
parent
df43159acf
commit
af4e7dc241
4 changed files with 7 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<h6>Editing Item <span class="badge badge-secondary">#{{ item.item_uid }}</span></h6>
|
||||
<h6>Editing Item <span class="badge badge-secondary">#{{ item.uid }}</span></h6>
|
||||
<InputPhoto
|
||||
:model="item"
|
||||
field="file"
|
||||
|
|
|
@ -65,7 +65,7 @@ const store = new Vuex.Store({
|
|||
router.push({path: `/${slug}/${view}`});
|
||||
},
|
||||
replaceLoadedItems(state, newItems) {
|
||||
state.loadedItems = newItems.map(e => ({...e, uid: e.item_uid}));
|
||||
state.loadedItems = newItems;
|
||||
},
|
||||
setLayout(state, layout) {
|
||||
state.layout = layout;
|
||||
|
@ -74,7 +74,7 @@ const store = new Vuex.Store({
|
|||
state.loadedBoxes = loadedBoxes;
|
||||
},
|
||||
updateItem(state, updatedItem) {
|
||||
const item = state.loadedItems.filter(({ item_uid }) => item_uid === updatedItem.item_uid)[0];
|
||||
const item = state.loadedItems.filter(({ uid }) => uid === updatedItem.uid)[0];
|
||||
Object.assign(item, updatedItem);
|
||||
},
|
||||
removeItem(state, item) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="row">
|
||||
<div class="col-xl-8 offset-xl-2">
|
||||
<Table
|
||||
:columns="['cid', 'name']"
|
||||
:columns="['cid', 'name','itemCount']"
|
||||
:items="loadedBoxes"
|
||||
:keyName="'cid'"
|
||||
v-slot="{ item }"
|
||||
|
@ -12,8 +12,8 @@
|
|||
<button class="btn btn-secondary" @click.stop="showBoxContent(item.name)" >
|
||||
<!--font-awesome-icon icon="archive"/--> content
|
||||
</button>
|
||||
<button class="btn btn-danger" @click.stop="" >
|
||||
<font-awesome-icon icon="trash"/> delete
|
||||
<button class="btn btn-danger" @click.stop="" title="delete">
|
||||
<font-awesome-icon icon="trash"/>
|
||||
</button>
|
||||
</div>
|
||||
</Table>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<template #body>
|
||||
<EditItem
|
||||
:item="editingItem"
|
||||
badge="item_uid"
|
||||
badge="uid"
|
||||
/>
|
||||
</template>
|
||||
<template #buttons>
|
||||
|
|
Loading…
Reference in a new issue