v1.5.20 - Removed event_end & Updated Migration

Updated Delete of multiple event
Started on deletion of single event & multiple-event edit
Removed userevent $key variable
Updated multipdf
Fixed web.php
This commit is contained in:
Anders
2021-05-04 12:32:24 +02:00
parent c617012187
commit 6cc43257b7
11 changed files with 138 additions and 92 deletions
@@ -28,7 +28,7 @@
@csrf
@method("delete")
<button name="signup" value="{{ $event->user_id }}" class="w-100 nostyle" onclick="return confirm('Are you sure you want to delete?');" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
<button name="signup" value="{{ $event->user_id }}" class="w-100 nostyle" onclick="delete_userevent();" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
</form>
</td>
</tr>
@@ -46,5 +46,43 @@
]
});
});
function delete_userevent() {
var token = $("input[name='_token']").val();
Swal.fire({
title: 'Er du sikker?',
text: "Dette kan ikke blive ændret tilbage!",
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Slet Menuplanen',
cancelButtonText: 'Annuller'
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "POST",
url: "menu-plans/"+id,
data:{'_token':token, _method: 'DELETE'},
success: function () {
$('#table_id').DataTable().row($('#row_'+id)[0]).remove().draw();
Swal.fire(
'Menuplanen er slettet!',
'',
'success'
)
return false;
},
error:function (data) {
console.log(data);
}
});
}
})
return false;
}
</script>
@endsection