This commit is contained in:
@@ -1,14 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-flex xs12 md12>
|
<v-flex xs12 md12>
|
||||||
<div>
|
<div>
|
||||||
<v-toolbar flat color="white">
|
<v-toolbar flat>
|
||||||
<v-toolbar-title>Widgets</v-toolbar-title>
|
<v-toolbar-title>
|
||||||
|
<v-icon large color="primary">fa-splotch</v-icon>Widgets
|
||||||
|
</v-toolbar-title>
|
||||||
<v-divider class="mx-2" inset vertical></v-divider>
|
<v-divider class="mx-2" inset vertical></v-divider>
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<v-dialog v-model="dialog" max-width="500px">
|
<v-dialog v-model="dialog" max-width="500px">
|
||||||
<v-btn slot="activator" icon large dark class="mb-2">
|
<v-btn slot="activator" icon large dark class="mb-2">
|
||||||
<v-icon large color="secondary">fa-plus-circle</v-icon>
|
<v-icon large color="secondary">fa-plus-circle</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
|
<v-btn slot="activator" icon large dark class="mb-2">
|
||||||
|
<v-icon large color="secondary">fa-ellipsis-v</v-icon>
|
||||||
|
</v-btn>
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-card-title>
|
<v-card-title>
|
||||||
<span class="headline">{{ formTitle }}</span>
|
<span class="headline">{{ formTitle }}</span>
|
||||||
@@ -26,7 +31,7 @@
|
|||||||
<v-text-field v-model="editedItem.dollarAmount" label="Price"></v-text-field>
|
<v-text-field v-model="editedItem.dollarAmount" label="Price"></v-text-field>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
<v-flex xs12 sm6 md4>
|
<v-flex xs12 sm6 md4>
|
||||||
<v-text-field v-model="editedItem.active" label="Active"></v-text-field>
|
<v-checkbox v-model="editedItem.active" label="Active"></v-checkbox>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
<v-flex xs12 sm6 md4>
|
<v-flex xs12 sm6 md4>
|
||||||
<v-text-field v-model="editedItem.roles" label="Roles"></v-text-field>
|
<v-text-field v-model="editedItem.roles" label="Roles"></v-text-field>
|
||||||
@@ -40,10 +45,10 @@
|
|||||||
<v-card-actions>
|
<v-card-actions>
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<v-btn icon large dark @click="close">
|
<v-btn icon large dark @click="close">
|
||||||
<v-icon large color="secondary">fa-ban</v-icon>
|
<v-icon large class="mr-5" color="secondary">fa-ban</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<v-btn icon large dark @click="save">
|
<v-btn icon large dark @click="save">
|
||||||
<v-icon large color="secondary">fa-save</v-icon>
|
<v-icon large class="mr-3" color="secondary">fa-save</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
</v-card>
|
</v-card>
|
||||||
@@ -183,9 +188,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
deleteItem(item) {
|
deleteItem(item) {
|
||||||
const index = this.desserts.indexOf(item);
|
const index = this.Items.indexOf(item);
|
||||||
confirm("Are you sure you want to delete this item?") &&
|
confirm("Are you sure you want to delete this item?") &&
|
||||||
this.desserts.splice(index, 1);
|
this.Items.splice(index, 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
@@ -198,9 +203,9 @@ export default {
|
|||||||
|
|
||||||
save() {
|
save() {
|
||||||
if (this.editedIndex > -1) {
|
if (this.editedIndex > -1) {
|
||||||
Object.assign(this.desserts[this.editedIndex], this.editedItem);
|
Object.assign(this.Items[this.editedIndex], this.editedItem);
|
||||||
} else {
|
} else {
|
||||||
this.desserts.push(this.editedItem);
|
this.Items.push(this.editedItem);
|
||||||
}
|
}
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user