143 lines
5.7 KiB
PHP
143 lines
5.7 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<div class="container">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-8">
|
|
@if ($message = Session::get('success'))
|
|
<div class="alert alert-success">
|
|
<p>{{ $message }}</p>
|
|
</div>
|
|
@endif
|
|
<form action="{{ route('pembida.sah',$user->id) }}" method="GET" id="formpengguna">
|
|
@csrf
|
|
<div class="form-row">
|
|
<div class="form-group col-md-6">
|
|
<label for="inputEmail4">Nama</label>
|
|
<input type="text" value="{{$user->name}}" class="form-control" name="name" id="name" readonly>
|
|
</div>
|
|
<div class="form-group col-md-6">
|
|
<label for="inputPassword4">Email</label>
|
|
<input type="email" value="{{$user->email}}" class="form-control" name="email" id="email" readonly>
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-6">
|
|
<label for="inputPassword4">Number Phone</label>
|
|
<input type="text" value="{{$user->notelbimbit}}" class="form-control" name="notelbimbit" id="notelbimbit" readonly>
|
|
</div>
|
|
<div class="form-group col-md-6">
|
|
<label for="inputPassword4">Identity Card/Passport Number</label>
|
|
<input type="text" value="{{$user->nokp}}" class="form-control" name="nokp" id="nokp" readonly>
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<h4 class="col-md-3">Identity Card/Passport Picture</h4>
|
|
<div class="form-group col-md-9">
|
|
@foreach ($files as $file)
|
|
<div class=".col-6 .col-sm-4 form-check form-check-inline">
|
|
<?php
|
|
// $picic = imagecreatefromstring($file['ic64']);
|
|
// header('Content-type: image/'.$file['file_type']);
|
|
?>
|
|
<img src="data:image/png;base64, {{ $file['filename'] }}" alt="Image Preview" style="width:350px; height:250px"/>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
<div class="text-right pt-4">
|
|
<input type="hidden" name="userid" value="{{$user->id}}">
|
|
<a href="{{url('pembida/senaraipembida')}}" class="btn btn-primary">Kembali</a>
|
|
<button type="button" class="btn btn-success" onclick="confirm()">Sah</button>
|
|
<button type="button" class="btn btn-danger" data-user_id="{{$user->id}}" onclick="reject(this)">Tolak</button>
|
|
</div>
|
|
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div class="modal fade" tabindex="-1" id="modaltolak">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title">New Connection</h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<form action="{{ route('pembida.reject') }}" method="POST" id="formtolakpembida">
|
|
@csrf
|
|
<input type="hidden" name="user_id" id="user_id" value="" />
|
|
<div class="form-row">
|
|
<div class="form-group col-md-12">
|
|
<label for="caw_name">Nota</label>
|
|
<input type="text" class="form-control" name="nota" id="nota" >
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
|
|
<button type="button" class="btn btn-primary" onclick="simpantolak()">Simpan</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
|
|
function simpantolak() {
|
|
$('#modaltolak').modal('hide');
|
|
$("#formtolakpembida").submit();
|
|
}
|
|
function reject(e) {
|
|
var userid= $(e).data('user_id');
|
|
// console.log(userid);
|
|
$('#user_id').val(userid);
|
|
$('#modaltolak').modal('show');
|
|
}
|
|
function confirm() {
|
|
$.confirm({
|
|
title: 'Confirmation',
|
|
content: 'Anda pasti?',
|
|
type: 'green',
|
|
typeAnimated: true,
|
|
buttons: {
|
|
Sah: {
|
|
btnClass: 'btn-success',
|
|
action: function () {
|
|
$("#formpengguna").submit();
|
|
}
|
|
},
|
|
Batal: {
|
|
btnClass: 'btn-default',
|
|
action: function () {}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
// function reject() {
|
|
// $.reject({
|
|
// title: 'Confirmation',
|
|
// content: 'Anda pasti?',
|
|
// type: 'green',
|
|
// typeAnimated: true,
|
|
// buttons: {
|
|
// Sah: {
|
|
// btnClass: 'btn-success',
|
|
// action: function () {
|
|
// $("#formpengguna").submit();
|
|
// }
|
|
// },
|
|
// Batal: {
|
|
// btnClass: 'btn-default',
|
|
// action: function () {}
|
|
// }
|
|
// }
|
|
// });
|
|
// }
|
|
|
|
</script>
|
|
@endsection
|