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>
|
<template>
|
||||||
<div>
|
<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
|
<InputPhoto
|
||||||
:model="item"
|
:model="item"
|
||||||
field="file"
|
field="file"
|
||||||
|
|
|
@ -65,7 +65,7 @@ const store = new Vuex.Store({
|
||||||
router.push({path: `/${slug}/${view}`});
|
router.push({path: `/${slug}/${view}`});
|
||||||
},
|
},
|
||||||
replaceLoadedItems(state, newItems) {
|
replaceLoadedItems(state, newItems) {
|
||||||
state.loadedItems = newItems.map(e => ({...e, uid: e.item_uid}));
|
state.loadedItems = newItems;
|
||||||
},
|
},
|
||||||
setLayout(state, layout) {
|
setLayout(state, layout) {
|
||||||
state.layout = layout;
|
state.layout = layout;
|
||||||
|
@ -74,7 +74,7 @@ const store = new Vuex.Store({
|
||||||
state.loadedBoxes = loadedBoxes;
|
state.loadedBoxes = loadedBoxes;
|
||||||
},
|
},
|
||||||
updateItem(state, updatedItem) {
|
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);
|
Object.assign(item, updatedItem);
|
||||||
},
|
},
|
||||||
removeItem(state, item) {
|
removeItem(state, item) {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xl-8 offset-xl-2">
|
<div class="col-xl-8 offset-xl-2">
|
||||||
<Table
|
<Table
|
||||||
:columns="['cid', 'name']"
|
:columns="['cid', 'name','itemCount']"
|
||||||
:items="loadedBoxes"
|
:items="loadedBoxes"
|
||||||
:keyName="'cid'"
|
:keyName="'cid'"
|
||||||
v-slot="{ item }"
|
v-slot="{ item }"
|
||||||
|
@ -12,8 +12,8 @@
|
||||||
<button class="btn btn-secondary" @click.stop="showBoxContent(item.name)" >
|
<button class="btn btn-secondary" @click.stop="showBoxContent(item.name)" >
|
||||||
<!--font-awesome-icon icon="archive"/--> content
|
<!--font-awesome-icon icon="archive"/--> content
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-danger" @click.stop="" >
|
<button class="btn btn-danger" @click.stop="" title="delete">
|
||||||
<font-awesome-icon icon="trash"/> delete
|
<font-awesome-icon icon="trash"/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</Table>
|
</Table>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<template #body>
|
<template #body>
|
||||||
<EditItem
|
<EditItem
|
||||||
:item="editingItem"
|
:item="editingItem"
|
||||||
badge="item_uid"
|
badge="uid"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
|
|
Loading…
Reference in a new issue