add save for edit

parent 74d54b46
......@@ -88,14 +88,24 @@ export default {
methods: {
save() {
console.log('save vp ', this.vp.uuid);
API.post('/viewpoints/addtoCollection', {
collection: this.collection.uuid,
vp: this.vp
}).then(() => {
console.log('VP added to collection ', this.collection.uuid);
});
this.$emit('reload', false);
this.$q.notify({ message: 'Viewpoint Added', position: 'center' });
if (this.action === 'Add') {
API.post('/viewpoints/addtoCollection', {
collection: this.collection.uuid,
vp: this.vp
}).then(() => {
console.log('VP added to collection ', this.collection.uuid);
});
this.$emit('reload', false);
this.$q.notify({ message: 'Viewpoint Added', position: 'center' });
} else if (this.action === 'Edit') {
console.log('save changes for vp');
API.post('/viewpoints/vpsave', {
vp: this.vp
}).then(() => {
this.$emit('reload', false);
this.$q.notify({ message: 'Viewpoint Changed', position: 'center' });
});
}
}
}
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment