<div class="table-responsive">
	<table class="table table-bordered">
		<tr>
			<td align="center" colspan="2">
				<strong>INFORMASI RIWAYAT REFILL</strong>
			</td>
		</tr>
		<tr>
			<th width="50%">ID</th>
			<td>{{ $target->id }}</td>
		</tr>
		<tr>
			<th width="50%">ID PESANAN</th>
			<td>{{ $target->order_id }}</td>
		</tr>
		<tr>
			<th width="50%">ID REFILL PENYEDIA</th>
			<td>{{ $target->provider_refill_id }}</td>
		</tr>
		<tr>
			<th width="50%">TANGGAL/WAKTU</th>
			<td>
				{{ \Carbon\Carbon::parse($target->created_at)->translatedFormat('d F Y - H:i') }}
				({{ \Carbon\Carbon::parse($target->created_at)->diffForHumans() }})
			</td>
		</tr>
		<tr>
			<th width="50%">DIPERBARUI</th>
			<td>
				{{ \Carbon\Carbon::parse($target->updated_at)->translatedFormat('d F Y - H:i') }}
				({{ \Carbon\Carbon::parse($target->updated_at)->diffForHumans() }})
			</td>
		</tr>
		<tr>
			<th>PENGGUNA</th>
			<td>
				@if ($target->user == true)
				{{$target->user->username }} ({{$target->user->full_name }})
				@endif
			</td>
		</tr>
		<tr>
			<th>LAYANAN</th>
			<td>{{ $target->service == true ? $target->service->name : '' }}</td>
		</tr>
		<tr>
			<th>TARGET</th>
			<td>
                @if ($target->order == true)
                <div class="input-group">
                    <input type="text" class="form-control" value="{!! $target->order->target !!}" id="data-{{ $target->id }}" readonly>
                    <div class="input-group-append">
                        <button class="btn btn-dark" type="button" onclick="copy('data-{{ $target->id }}')"><i class="fa fa-copy fa-fw"></i> Salin</button>
                    </div>
                </div>
                @else
                
                @endif
            </td>
		</tr>
		<tr>
			<th>STATUS</th>
			<td>{!! status($target->status) !!}</td>
		</tr>
	</table>
</div>
<script>
function copyInput() {
  	var copyText = document.getElementById("serial_number");
  	copyText.select();
  	document.execCommand("copy");
	Command: toastr["success"]("Teks disalin!", "Berhasil")
}
</script>