'Delete function code refactor'

This commit is contained in:
Burak Civan
2021-05-21 14:34:05 +03:00
parent dbbad60b6e
commit fc12930471
3 changed files with 14 additions and 21 deletions

View File

@ -155,6 +155,18 @@ export default {
this.onFailError(error)
}, this);
},
onDeleteEvent(event, form_list, event_id) {
form_list.forEach(function (item, index) {
if (item.id == event_id) {
form_list.splice(index, 1);
return;
}
}, this);
this.component = "";
this.onSuccessDelete(event);
},
onFailError(error) {
this.error_field_name = error.response.data.errors;
}