Skip to content

Commit

Permalink
fix issue no #32
Browse files Browse the repository at this point in the history
  • Loading branch information
gheorghelupu17 committed Jun 25, 2023
1 parent 56f6c4d commit 6bd30c5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
30 changes: 14 additions & 16 deletions resources/js/Components/modals/ModalAction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
triggerModalClasses: String,
title: String,
body: String,
deleteRoute: String,
actionRoute: String,
id: [String, Number],
data: [Object, Array]
});
Expand All @@ -86,21 +86,19 @@
const open = ref(false);
/** Delete action. */
const deleteData = () => {
const action = () => {
/** Initialize inertia from Object. */
// const form = useForm({ ...props.data });
// form.delete(props.deleteRoute, {
// preserveScroll: true,
// onSuccess: () => {
// open.value = false
// },
// onError: () => {
// open.value = true
// },
// onFinish: () => {
// open.value = false
// }
// });
const form = useForm({});
form.delete(props.actionRoute, {
onSuccess: () => {
open.value = false
},
onError: () => {
open.value = true
},
onFinish: () => {
open.value = false
}
});
};
</script>
1 change: 1 addition & 0 deletions routes/organizations.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
/* Admin Ong routes. */
Route::prefix('ong')->middleware('auth')->group(function () {
Route::get('organizatie', [OrganizationController::class, 'edit'])->name('admin.ong.edit');
Route::delete('organizatie/remove-cover-image', [OrganizationController::class, 'removeCoverImage'])->name('organization.remove_cover_image');
Route::put('organizatie/update/{organization}', [OrganizationController::class, 'update'])->name('admin.ong.update');
});

0 comments on commit 6bd30c5

Please sign in to comment.