128 lines
5.2 KiB
PHP
128 lines
5.2 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<div class="container-fluid">
|
|
<div class="row ">
|
|
<div class="col-md-11 mx-auto card p-4">
|
|
|
|
@if ($message = Session::get('success'))
|
|
<div class="alert alert-success">
|
|
<p>{{ $message }}</p>
|
|
</div>
|
|
@endif
|
|
<form id="exportform" action="" method="POST">
|
|
<input type="hidden" name="type" value="User">
|
|
<table class="table table-striped table-xl text-center" id="tablelelong" style="width:100%">
|
|
<thead class="bg-primary text-white">
|
|
<tr>
|
|
<th>No</th>
|
|
<th>Batch Lelong</th>
|
|
<th>Cawangan</th>
|
|
<th>Tarikh Lelong</th>
|
|
<th>Harga Emas Asas</th>
|
|
<th>Tempoh</th>
|
|
<th>Caj Lelong</th>
|
|
<th>Status Lelong</th>
|
|
<th class="text-center">Pengesahan</th>
|
|
<th class="text-center">Telah Sah</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($arrayinfo as $lel)
|
|
<tr>
|
|
<td>{{$loop->iteration}}</td>
|
|
<td>{{ $lel['info']['lelong_id'] }}</td>
|
|
<td align = 'left'>
|
|
@foreach($lel['detailsinfo'] as $details)
|
|
<span class="m-2">{{$details['caw_name']}}</span><br>
|
|
@endforeach
|
|
</td>
|
|
<td> @php
|
|
$myDateTime = DateTime::createFromFormat('Y-m-d', $lel['info']['tarikh_lelong']);
|
|
$datez = $myDateTime->format('d-m-Y');
|
|
echo($datez);
|
|
|
|
@endphp</td>
|
|
<td>{{ number_format($lel['info']['harga_emas_asas'], 2, '.', ',')}}</td>
|
|
<td>{{ $lel['info']['jbg'] }}</td>
|
|
<td>{{ $lel['info']['cajlelong'] }}</td>
|
|
<td>
|
|
@if($lel['info']['sts_lelong'] == 0)
|
|
<button class="btn btn-warning btn-sm" disabled>LELONG BELUM BERMULA</button>
|
|
@endif
|
|
</td>
|
|
<td>
|
|
<a href="{{ route('pengesahan.perubahanmutumarhun', ['id'=>$lel['info']['lelong_id']]) }}" data-toggle="tooltip" data-placement="top" title="Butiran" class="text-center" ><i class="far fa-edit"></i></a>
|
|
</td>
|
|
<td>
|
|
<a href="{{ route('pengesahan.listperubahanmutumarhun', ['id'=>$lel['info']['lelong_id']]) }}" data-toggle="tooltip" data-placement="top" title="Butiran" class="text-center" ><i class="far fa-user"></i></a>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<script>
|
|
//Enable tooltips everywhere
|
|
$(function () {
|
|
$('[data-toggle="tooltip"]').tooltip()
|
|
})
|
|
|
|
var tablelelong = $('#tablelelong').DataTable( {
|
|
"columnDefs": [
|
|
{
|
|
"targets": 0,
|
|
"orderable": false
|
|
},
|
|
{
|
|
"targets": 7,
|
|
"orderable": false
|
|
}
|
|
],
|
|
order: [[1, 'asc']],
|
|
// "ordering": false,
|
|
"info": false,
|
|
"lengthChange": false,
|
|
"pageLength": 15,
|
|
dom: 'Bfrtip',
|
|
// buttons: [
|
|
// // 'copy', 'excel', 'pdf'
|
|
// // { text: 'copy', className: 'btn btn-primary' },
|
|
// {
|
|
// className: 'btn btn-outline-success pl-4 pr-4 btn-sm addsim',
|
|
// text: '<i class="fas fa-plus" id="test"></i>',
|
|
// titleAttr: 'Tambah Simulasi',
|
|
// action: function ( e, dt, node, config ) {
|
|
// alert( 'Button activated' );
|
|
// }
|
|
// },
|
|
// {
|
|
// className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
|
|
// titleAttr: 'Export to CSV',
|
|
// text: '<i class="fas fa-download"></i>',
|
|
// action: function ( e, dt, node, config ) {
|
|
// $("#exportform").submit();
|
|
// }
|
|
// }
|
|
// ]
|
|
});
|
|
|
|
$('.addsim').tooltip();
|
|
$('.export').tooltip();
|
|
// $( '.dt-buttons').addClass('btn-group');
|
|
$( '.addsim').removeClass('dt-button');
|
|
$( '.export').removeClass('dt-button');
|
|
|
|
function selectall(cb) {
|
|
tablelelong.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
|
|
$(this).prop('checked', cb.checked);
|
|
})
|
|
}
|
|
</script>
|
|
|
|
@endsection
|