Merge pull request #455 from WDI-Ideas/sayli

Sayli
This commit is contained in:
Sayli Raut
2024-08-16 12:36:35 +05:30
committed by GitHub
2 changed files with 12 additions and 7 deletions

View File

@@ -41,7 +41,7 @@ $(document).ready(function () {
$.ajax({
url: base_url + '/manage_update_notifications/',
url: base_url + '/manage_update_notifications',
type: 'POST',
data: formData,
processData: false,
@@ -51,13 +51,15 @@ $(document).ready(function () {
toastr.success('Notification Updated Successfully');
setTimeout(function () {
window.location.href =
"{{ route('manage.notification') }}";
base_url + '/manage-notification';
}, 2000);
} else {
toastr.error('Something Went Wrong');
setTimeout(function () {
window.location.href =
"{{ route('manage.notification') }}";
base_url + '/manage-notification';
}, 2000);
}
$('#update_notification').attr('disabled', false);

View File

@@ -64,18 +64,21 @@ $(document).ready(function() {
$('#sub_admin_delete').val(id);
});
let base_url = url_path;
$('.admin_delete').on('click', function() {
var id = $('#sub_admin_delete').val();
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
$.ajax({
url: base_url + '/manage_delete_notifications/' + id,
type: 'POST',
data: {
_token: '{{ csrf_token() }}'
},
success: function(result) {
location.reload();