make indentation consistent
This commit is contained in:
parent
d52575aa42
commit
9f63414ba2
27 changed files with 858 additions and 804 deletions
|
@ -22,17 +22,17 @@
|
|||
v-slot="{ item }"
|
||||
@itemActivated="openLightboxModalWith($event)"
|
||||
>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-success" @click.stop="markItemReturned(item)" title="returned">
|
||||
<font-awesome-icon icon="check"/>
|
||||
</button>
|
||||
<button class="btn btn-secondary" @click.stop="openEditingModalWith(item)" title="edit">
|
||||
<font-awesome-icon icon="edit"/>
|
||||
</button>
|
||||
<button class="btn btn-danger" @click.stop="deleteItem(item)" title="delete">
|
||||
<font-awesome-icon icon="trash"/>
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-success" @click.stop="markItemReturned(item)" title="returned">
|
||||
<font-awesome-icon icon="check"/>
|
||||
</button>
|
||||
<button class="btn btn-secondary" @click.stop="openEditingModalWith(item)" title="edit">
|
||||
<font-awesome-icon icon="edit"/>
|
||||
</button>
|
||||
<button class="btn btn-danger" @click.stop="deleteItem(item)" title="delete">
|
||||
<font-awesome-icon icon="trash"/>
|
||||
</button>
|
||||
</div>
|
||||
</Table>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -53,14 +53,14 @@
|
|||
<h6 class="card-subtitle text-secondary">uid: {{ item.uid }} box: {{ item.box }}</h6>
|
||||
<div class="row mx-auto mt-2">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-outline-success" @click.stop="markItemReturned(item)" title="returned">
|
||||
<font-awesome-icon icon="check"/>
|
||||
</button>
|
||||
<button class="btn btn-outline-secondary" @click.stop="openEditingModalWith(item)" title="edit">
|
||||
<font-awesome-icon icon="edit"/>
|
||||
</button>
|
||||
<button class="btn btn-outline-success" @click.stop="markItemReturned(item)" title="returned">
|
||||
<font-awesome-icon icon="check"/>
|
||||
</button>
|
||||
<button class="btn btn-outline-secondary" @click.stop="openEditingModalWith(item)" title="edit">
|
||||
<font-awesome-icon icon="edit"/>
|
||||
</button>
|
||||
<button class="btn btn-outline-danger" @click.stop="deleteItem(item)" title="delete">
|
||||
<font-awesome-icon icon="trash"/>
|
||||
<font-awesome-icon icon="trash"/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -79,33 +79,33 @@ import config from '../config';
|
|||
import Lightbox from '../components/Lightbox';
|
||||
|
||||
export default {
|
||||
name: 'Items',
|
||||
data: () => ({
|
||||
lightboxItem: null,
|
||||
editingItem: null,
|
||||
baseUrl: config.service.url,
|
||||
}),
|
||||
components: {Lightbox, Table, Cards, Modal, EditItem },
|
||||
computed: mapState(['loadedItems', 'layout']),
|
||||
methods: {
|
||||
...mapActions(['deleteItem','markItemReturned']),
|
||||
openLightboxModalWith(item) { // Opens the editing modal with a copy of the selected item.
|
||||
this.lightboxItem = { ...item };
|
||||
},
|
||||
closeLightboxModal() { // Closes the editing modal and discards the edited copy of the item.
|
||||
this.lightboxItem = null;
|
||||
},
|
||||
openEditingModalWith(item) {
|
||||
this.editingItem = item;
|
||||
},
|
||||
closeEditingModal() {
|
||||
this.editingItem = null;
|
||||
},
|
||||
saveEditingItem() { // Saves the edited copy of the item.
|
||||
this.$store.dispatch('updateItem', this.editingItem);
|
||||
this.closeEditingModal();
|
||||
name: 'Items',
|
||||
data: () => ({
|
||||
lightboxItem: null,
|
||||
editingItem: null,
|
||||
baseUrl: config.service.url,
|
||||
}),
|
||||
components: {Lightbox, Table, Cards, Modal, EditItem},
|
||||
computed: mapState(['loadedItems', 'layout']),
|
||||
methods: {
|
||||
...mapActions(['deleteItem', 'markItemReturned']),
|
||||
openLightboxModalWith(item) { // Opens the editing modal with a copy of the selected item.
|
||||
this.lightboxItem = {...item};
|
||||
},
|
||||
closeLightboxModal() { // Closes the editing modal and discards the edited copy of the item.
|
||||
this.lightboxItem = null;
|
||||
},
|
||||
openEditingModalWith(item) {
|
||||
this.editingItem = item;
|
||||
},
|
||||
closeEditingModal() {
|
||||
this.editingItem = null;
|
||||
},
|
||||
saveEditingItem() { // Saves the edited copy of the item.
|
||||
this.$store.dispatch('updateItem', this.editingItem);
|
||||
this.closeEditingModal();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue