scinote-web/app/javascript/vue/protocol/mixins/components/delete.js
artoscinote b00968fd55
Implement basic checklist functionality [SCI-6786] (#4073)
* Implement protocol status bar functionality [SCI-6760]

* Inline edit interactions, checklist name edit improvements [SCI-6786]
2022-05-05 12:56:31 +02:00

27 lines
514 B
JavaScript

export default {
data() {
return {
confirmingDelete: false
};
},
methods: {
showDeleteModal() {
this.confirmingDelete = true;
},
closeDeleteModal() {
this.confirmingDelete = false;
},
deleteComponent() {
$.ajax({
url: this.element.attributes.orderable.urls.delete_url,
type: 'DELETE',
success: (result) => {
this.$emit(
'component:delete',
result.data
);
}
});
}
}
};