300 lines
12 KiB
PHP
300 lines
12 KiB
PHP
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||
|
<title>AdminLTE 3 | Dashboard 2</title>
|
||
|
|
||
|
<!-- Google Font: Source Sans Pro -->
|
||
|
<link rel="stylesheet"
|
||
|
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
|
||
|
|
||
|
<!-- Font Awesome Icons -->
|
||
|
<link rel="stylesheet" href="{{ asset('backend/plugins/fontawesome-free/css/all.min.css') }}">
|
||
|
<!-- overlayScrollbars -->
|
||
|
<link rel="stylesheet" href="{{ asset('backend/plugins/overlayScrollbars/css/OverlayScrollbars.min.css') }}">
|
||
|
|
||
|
<!-- DataTables -->
|
||
|
<link rel="stylesheet" href="{{ asset('backend/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css') }}">
|
||
|
<link rel="stylesheet"
|
||
|
href="{{ asset('backend/plugins/datatables-responsive/css/responsive.bootstrap4.min.css') }}">
|
||
|
<link rel="stylesheet" href="{{ asset('backend/plugins/datatables-buttons/css/buttons.bootstrap4.min.css') }}">
|
||
|
|
||
|
<!-- Theme style -->
|
||
|
<link rel="stylesheet" href="{{ asset('backend/dist/css/adminlte.min.css') }}">
|
||
|
|
||
|
<!-- Toastr Notification -->
|
||
|
<link rel="stylesheet" href="{{ asset('backend/plugins/toastr/toastr.min.css') }}">
|
||
|
|
||
|
<!-- Sweetalert -->
|
||
|
<link rel="stylesheet" href="{{ asset('backend/plugins/sweetalert2/sweetalert2.min.css') }}">
|
||
|
|
||
|
|
||
|
</head>
|
||
|
|
||
|
<body class="hold-transition dark-mode sidebar-mini layout-fixed layout-navbar-fixed layout-footer-fixed">
|
||
|
<div class="wrapper">
|
||
|
|
||
|
<!-- Preloader -->
|
||
|
<div class="preloader flex-column justify-content-center align-items-center">
|
||
|
<img class="animation__wobble" src="{{ asset('backend/dist/img/AdminLTELogo.png') }}" alt="AdminLTELogo"
|
||
|
height="60" width="60">
|
||
|
</div>
|
||
|
|
||
|
<!-- Navbar -->
|
||
|
@include('backend.layouts.navbar')
|
||
|
<!-- /.navbar -->
|
||
|
|
||
|
<!-- Main Sidebar Container -->
|
||
|
@include('backend.layouts.sidebar')
|
||
|
|
||
|
<!-- Content Wrapper. Contains page content -->
|
||
|
@yield('content')
|
||
|
<!-- /.content-wrapper -->
|
||
|
|
||
|
<!-- Control Sidebar -->
|
||
|
<aside class="control-sidebar control-sidebar-dark">
|
||
|
<!-- Control sidebar content goes here -->
|
||
|
</aside>
|
||
|
<!-- /.control-sidebar -->
|
||
|
|
||
|
<!-- Main Footer -->
|
||
|
<footer class="main-footer">
|
||
|
<strong>Copyright © 2014-2021 <a href="https://adminlte.io">AdminLTE.io</a>.</strong>
|
||
|
All rights reserved.
|
||
|
<div class="float-right d-none d-sm-inline-block">
|
||
|
<b>Version</b> 3.2.0
|
||
|
</div>
|
||
|
</footer>
|
||
|
</div>
|
||
|
<!-- ./wrapper -->
|
||
|
|
||
|
<!-- REQUIRED SCRIPTS -->
|
||
|
<!-- jQuery -->
|
||
|
<script src="{{ asset('backend/plugins/jquery/jquery.min.js') }}"></script>
|
||
|
<!-- Bootstrap -->
|
||
|
<script src="{{ asset('backend/plugins/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
|
||
|
<!-- overlayScrollbars -->
|
||
|
<script src="{{ asset('backend/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js') }}"></script>
|
||
|
<!-- AdminLTE App -->
|
||
|
<script src="{{ asset('backend/dist/js/adminlte.js') }}"></script>
|
||
|
|
||
|
<!-- PAGE PLUGINS -->
|
||
|
<!-- jQuery Mapael -->
|
||
|
<script src="{{ asset('backend/plugins/jquery-mousewheel/jquery.mousewheel.js') }}"></script>
|
||
|
<script src="{{ asset('backend/plugins/raphael/raphael.min.js') }}"></script>
|
||
|
<script src="{{ asset('backend/plugins/jquery-mapael/jquery.mapael.min.js') }}"></script>
|
||
|
<script src="{{ asset('backend/plugins/jquery-mapael/maps/usa_states.min.js') }}"></script>
|
||
|
<!-- ChartJS -->
|
||
|
<script src="{{ asset('backend/plugins/chart.js/Chart.min.js') }}"></script>
|
||
|
|
||
|
<!-- AdminLTE for demo purposes -->
|
||
|
<script src="{{ asset('backend/dist/js/demo.js') }}"></script>
|
||
|
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
|
||
|
<script src="{{ asset('backend/dist/js/pages/dashboard2.js') }}"></script>
|
||
|
|
||
|
<!-- DataTables & Plugins -->
|
||
|
<script src="{{ asset('backend/plugins/datatables/jquery.dataTables.min.js') }}"></script>
|
||
|
<script src="{{ asset('backend/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js') }}"></script>
|
||
|
<script src="{{ asset('backend/plugins/datatables-responsive/js/dataTables.responsive.min.js') }}"></script>
|
||
|
<script src="{{ asset('backend/plugins/datatables-responsive/js/responsive.bootstrap4.min.js') }}"></script>
|
||
|
<script src="{{ asset('backend/plugins/datatables-buttons/js/dataTables.buttons.min.js') }}"></script>
|
||
|
<script src="{{ asset('backend/plugins/datatables-buttons/js/buttons.bootstrap4.min.js') }}"></script>
|
||
|
<script src="{{ asset('backend/plugins/jszip/jszip.min.js') }}"></script>
|
||
|
<script src="{{ asset('backend/plugins/pdfmake/pdfmake.min.js') }}"></script>
|
||
|
<script src="{{ asset('backend/plugins/pdfmake/vfs_fonts.js') }}"></script>
|
||
|
<script src="{{ asset('backend/plugins/datatables-buttons/js/buttons.html5.min.js') }}"></script>
|
||
|
<script src="{{ asset('backend/plugins/datatables-buttons/js/buttons.print.min.js') }}"></script>
|
||
|
<script src="{{ asset('backend/plugins/datatables-buttons/js/buttons.colVis.min.js') }}"></script>
|
||
|
|
||
|
<!-- Toastr & SweetAlert2 -->
|
||
|
<script src="{{ asset('backend/plugins/toastr/toastr.min.js') }}"></script>
|
||
|
<script src="{{ asset('backend/plugins/sweetalert2/sweetalert2.min.js') }}"></script>
|
||
|
|
||
|
@yield('script')
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<script>
|
||
|
@if (Session::has('message'))
|
||
|
var type = "{{ Session::get('alert-type', 'info') }}"
|
||
|
switch (type) {
|
||
|
case 'info':
|
||
|
toastr.info("{{ Session::get('message') }}");
|
||
|
break;
|
||
|
case 'warning':
|
||
|
toastr.warning("{{ Session::get('message') }}");
|
||
|
break;
|
||
|
case 'success':
|
||
|
toastr.success("{{ Session::get('message') }}");
|
||
|
break;
|
||
|
case 'error':
|
||
|
toastr.error("{{ Session::get('message') }}");
|
||
|
break;
|
||
|
}
|
||
|
@endif
|
||
|
</script>
|
||
|
|
||
|
<script>
|
||
|
$(document).on("click", "#delete", function(e) {
|
||
|
e.preventDefault();
|
||
|
var link = $(this).attr("href");
|
||
|
Swal({
|
||
|
title: "Are you sure?",
|
||
|
text: "You will not be able to recover this imaginary file!",
|
||
|
icon: "warning",
|
||
|
buttons: true,
|
||
|
dangerMode: true,
|
||
|
}).then((willDelete) => {
|
||
|
if (willDelete.value) {
|
||
|
window.location.href = link;
|
||
|
} else {
|
||
|
Swal("Cancelled", "Your imaginary file is safe :)", "error");
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
</script>
|
||
|
|
||
|
{{--
|
||
|
<script>
|
||
|
$(document).on('click', '.delete-btn', function(event) {
|
||
|
event.preventDefault();
|
||
|
|
||
|
// console.log('hello');
|
||
|
// debugger;
|
||
|
const url = $(this).attr('href');
|
||
|
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, {
|
||
|
type: 'Delete',
|
||
|
headers: {
|
||
|
'X-CSRF-TOKEN': $(meta[name = 'csrf-token']).attr('content'),
|
||
|
}.done(function(response) {
|
||
|
if (response) {
|
||
|
toastr.success(response.message);
|
||
|
window.location.reload();
|
||
|
}
|
||
|
}).fail(function() {
|
||
|
console.log('Failed!');
|
||
|
})
|
||
|
})
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
</script> --}}
|
||
|
|
||
|
{{-- <script>
|
||
|
$(document).on('click', '.delete-btn', function(event) {
|
||
|
event.preventDefault();
|
||
|
|
||
|
const url = $(this).attr('href');
|
||
|
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
||
|
|
||
|
console.log('URL:', url);
|
||
|
console.log('CSRF Token:', csrfToken);
|
||
|
|
||
|
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': csrfToken
|
||
|
},
|
||
|
success: function(response) {
|
||
|
console.log('Response:', response);
|
||
|
if (response.success) {
|
||
|
toastr.success(response.message);
|
||
|
window.location.reload();
|
||
|
} else {
|
||
|
console.error('Deletion failed:', response.message);
|
||
|
toastr.error(response.message);
|
||
|
}
|
||
|
},
|
||
|
error: function(jqXHR, textStatus, errorThrown) {
|
||
|
console.error('AJAX Error:', textStatus, errorThrown);
|
||
|
toastr.error('Failed to delete the item.');
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
</script> --}}
|
||
|
|
||
|
<script>
|
||
|
$(document).on('click', '.delete-btn', function(event) {
|
||
|
event.preventDefault();
|
||
|
|
||
|
const url = $(this).attr('href');
|
||
|
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
||
|
|
||
|
console.log(url);
|
||
|
|
||
|
console.log('Delete URL:', url);
|
||
|
console.log('CSRF Token:', csrfToken);
|
||
|
|
||
|
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': csrfToken
|
||
|
},
|
||
|
success: function(response) {
|
||
|
console.log('Server Response:', response);
|
||
|
if (response) {
|
||
|
toastr.success(response.message);
|
||
|
window.location.reload();
|
||
|
} else {
|
||
|
toastr.error('Deletion failed: ' + response.message);
|
||
|
}
|
||
|
},
|
||
|
error: function(jqXHR, textStatus, errorThrown) {
|
||
|
console.error('AJAX Error:', textStatus, errorThrown);
|
||
|
console.error('Response Text:', jqXHR.responseText);
|
||
|
toastr.error('Failed to delete the item. Please try again.');
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
</script>
|
||
|
|
||
|
<!-- Language Switcher -->
|
||
|
<ul class="language-switcher">
|
||
|
<li><a href="{{ route('setLocale', ['locale' => 'en']) }}">English</a></li>
|
||
|
<li><a href="{{ route('setLocale', ['locale' => 'np']) }}">नेपाली</a></li>
|
||
|
</ul>
|
||
|
|
||
|
</body>
|
||
|
|
||
|
</html>
|