update
This commit is contained in:
@@ -180,6 +180,18 @@
|
||||
<a href="{{ route('mikro.expertise', ['periksa' => $row['id'], 'return_to' => 'dashboard']) }}" class="btn btn-sm btn-primary">
|
||||
Expertise
|
||||
</a>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm btn-danger btn-ews-cancel"
|
||||
data-id="{{ $row['id'] }}"
|
||||
data-reques="{{ $row['reques'] }}"
|
||||
data-nmpasien="{{ $row['nmpasien'] }}"
|
||||
data-daftar="{{ $row['daftar'] }}"
|
||||
data-nofoto="{{ $row['nofoto'] }}"
|
||||
data-status="{{ $row['status'] }}"
|
||||
>
|
||||
Batalkan
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@@ -356,6 +368,46 @@ $(document).ready(function() {
|
||||
$(".btnubahfoto").click(function() {
|
||||
$('#modalupdatefoto').modal('show');
|
||||
});
|
||||
$(document).on('click', '.btn-ews-cancel', function () {
|
||||
var button = $(this);
|
||||
var id = button.data('id');
|
||||
var reques = button.data('reques') || '-';
|
||||
var nmpasien = button.data('nmpasien') || '-';
|
||||
var daftar = button.data('daftar') || '-';
|
||||
var nofoto = button.data('nofoto') || '-';
|
||||
var statusAwal = button.data('status') || '-';
|
||||
|
||||
swal({
|
||||
title: 'Konfirmasi Pembatalan',
|
||||
text: 'Apakah anda yakin merubah status untuk pemeriksaan ' + reques + ' untuk nama ' + nmpasien + ' yang di order pada ' + daftar + ' dengan accession number ' + nofoto + ' dengan status awal ' + statusAwal + ' ?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#d33',
|
||||
confirmButtonText: 'Ya, batalkan',
|
||||
cancelButtonText: 'Tidak'
|
||||
}, function(isConfirm) {
|
||||
if (!isConfirm) {
|
||||
return;
|
||||
}
|
||||
|
||||
$.post('{{ url("dashboard/early-warning") }}/' + id + '/cancel', { _token: '{{ csrf_token() }}' }, function (data) {
|
||||
swal({
|
||||
title: data.status || 'Sukses',
|
||||
text: data.message || 'Status berhasil diperbarui.',
|
||||
type: 'success',
|
||||
}, function () {
|
||||
window.location.reload();
|
||||
});
|
||||
}).fail(function (xhr) {
|
||||
var response = xhr.responseJSON || {};
|
||||
swal({
|
||||
title: response.status || 'Gagal',
|
||||
text: response.message || 'Tidak dapat memperbarui status pemeriksaan.',
|
||||
type: 'error',
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
$("#btnsimpanfoto").click(function(){
|
||||
var filegambar = document.getElementById('upload_file');
|
||||
$('#modalupdatefoto').modal('hide');
|
||||
|
||||
Reference in New Issue
Block a user