@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user