diff --git a/resources/js/Jetstream/Modal.vue b/resources/js/Jetstream/Modal.vue index 5b7a002c..f658322e 100644 --- a/resources/js/Jetstream/Modal.vue +++ b/resources/js/Jetstream/Modal.vue @@ -48,6 +48,50 @@ diff --git a/resources/js/Shared/ManageAuthor.vue b/resources/js/Shared/ManageAuthor.vue index 2cc4d13b..2791c5b8 100644 --- a/resources/js/Shared/ManageAuthor.vue +++ b/resources/js/Shared/ManageAuthor.vue @@ -1474,17 +1474,22 @@ export default { * Handles success/error states and UI updates */ deleteAuthor() { - this.authorsForm.delete(route("author.delete", this.project.id), { - preserveScroll: true, - preserveState: true, - onSuccess: () => { + axios + .delete(route("author.delete", this.project.id), { + data: { + authors: this.authorsForm.authors, + }, + headers: { + Accept: "application/json", + }, + }) + .then(() => { router.reload({ only: ["project"] }); this.loadInitial(); this.authorsForm.reset(); this.closeDeleteConfirm(); - }, - onError: (err) => console.error(err), - }); + }) + .catch((err) => console.error(err)); }, /** diff --git a/resources/js/Shared/ManageCitation.vue b/resources/js/Shared/ManageCitation.vue index 41407d54..b52f4f3d 100644 --- a/resources/js/Shared/ManageCitation.vue +++ b/resources/js/Shared/ManageCitation.vue @@ -968,19 +968,21 @@ export default { * Execute delete request to backend API */ deleteCitation() { - this.citationsForm.delete( - route("citation.delete", this.project.id), - { - preserveScroll: true, - preserveState: true, - onSuccess: () => { - router.reload({ only: ["project"] }); - this.loadInitial(); - this.closeDeleteConfirm(); + axios + .delete(route("citation.delete", this.project.id), { + data: { + citations: this.citationsForm.citations, }, - onError: (err) => console.error(err), - } - ); + headers: { + Accept: "application/json", + }, + }) + .then(() => { + router.reload({ only: ["project"] }); + this.loadInitial(); + this.closeDeleteConfirm(); + }) + .catch((err) => console.error(err)); }, // =============================================================================