leave user employee module setup
This commit is contained in:
@ -4,21 +4,7 @@
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box d-sm-flex align-items-center justify-content-between">
|
||||
<h4 class="mb-sm-0">{{ $title }}</h4>
|
||||
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="javascript: void(0);">Dashboards</a></li>
|
||||
<li class="breadcrumb-item active">{{ $title }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
<!-- end page title -->
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
|
@ -84,8 +84,9 @@
|
||||
<a href="{{ route('leave.edit', $leave->leave_id) }}"
|
||||
class="link-success fs-15 edit-item-btn"><i class="ri-edit-2-line"></i></a>
|
||||
|
||||
<a href="{{ route('leave.destroy', $leave->leave_id) }}" data-id="{{ $leave->leave_id }}"
|
||||
class="link-danger fs-15 remove-item-btn"><i class="ri-delete-bin-line"></i></a>
|
||||
<a href="javascript:void(0);" data-link="{{ route('leave.destroy', $leave->leave_id) }}"
|
||||
data-id="{{ $leave->leave_id }}" class="link-danger fs-15 remove-item-btn"><i
|
||||
class="ri-delete-bin-line"></i></a>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
@ -98,48 +99,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--end row-->
|
||||
</div>
|
||||
<!--end row-->
|
||||
</div>
|
||||
<!-- container-fluid -->
|
||||
</div>
|
||||
<!-- container-fluid -->
|
||||
@include('leave::partials.view')
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$('.remove-item-btn').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
let url = $(this).attr('href');
|
||||
let id = $(this).data('id');
|
||||
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: "You won't be able to revert this!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, delete it!'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'DELETE',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success: function(response) {
|
||||
location.reload();
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
Reference in New Issue
Block a user