update pemilihan team hanya surveyor atau penilai dan update form foto menggunakan camera
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
{{-- @section('breadcrumbs')
|
||||
{{ Breadcrumbs::render('penilaian') }}
|
||||
@endsection --}}
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render('otorisator.'. strtolower($header)) }}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
@@ -86,6 +86,42 @@
|
||||
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script>
|
||||
function otorisator(){
|
||||
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!'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax(`permohonan/${data}`, {
|
||||
type: 'POST'
|
||||
}).then((response) => {
|
||||
swal.fire('eddited!', 'Pelaporan has been edited.', 'success').then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
}).catch((error) => {
|
||||
console.error('Error:', error);
|
||||
Swal.fire('Error!', 'An error occurred while file.', 'error');
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="module">
|
||||
const element = document.querySelector('#permohonan-table');
|
||||
const searchInput = document.getElementById('search');
|
||||
@@ -142,6 +178,12 @@
|
||||
title: 'Status',
|
||||
render: (item, data) => {
|
||||
return `<div class="flex flex-nowrap justify-center">
|
||||
|
||||
<a class="btn btn-sm btn-icon btn-clear btn-success " onclick="otorisator(${data.id})">
|
||||
<i class="ki-filled ki-check-squared"></i>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="btn btn-sm btn-icon btn-clear btn-warning " href="otorisator/show/${data.id}">
|
||||
<i class="ki-outline ki-eye"></i>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user