Files
lelong/resources/views/serahan/senarailelongbayaran.blade.php
2022-11-23 00:45:41 +08:00

111 lines
4.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
<h4> Senarai Lelong </h4>
<table class="table table-striped table-xl text-center" id="senarailelongonline" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th>No</th>
<th>Batch Lelong</th>
<th>Cawangan</th>
<th>Fasa</th>
<th>Tarikh Lelong</th>
<th>Status Lelong</th>
<th class="text-center">Tindakan</th>
</tr>
</thead>
<tbody>
@foreach($arrayinfo as $data)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{ $data['info']['lelong_id'] }}</td>
<td align = 'left'>
@foreach($data['detailsinfo'] as $details)
<span class="m-2">{{$details['caw_name']}}</span><br>
@endforeach
</td>
<td>{{ $data['info']['fasa'] }}</td>
<td>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $data['info']['tarikh_lelong'] );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>
@if($data['info']['sts_lelong'] == 3)
<button class="btn btn-success btn-sm" disabled>LELONG SELESAI</button>
@endif
</td>
<td><a href=" {{ route('pembayaran.kaunterpembayaran', ['lelong_id'=>$data['info']['lelong_id']]) }} " data-toggle="tooltip" data-placement="top" title="Butiran Bidaan"><i class="far fa-edit"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
<script>
//Enable tooltips everywhere
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
var tablesenarailelongonline = $('#senarailelongonline').DataTable({
"columnDefs": [
{
"targets": 0,
"orderable": false
},
{
"targets": 3,
"orderable": false
}
],
order: [[1, 'asc']],
"info": false,
"lengthChange": false,
"pageLength": 15,
dom: 'Bfrtip',
// buttons: [
// {
// className: 'btn btn-outline-success pl-4 pr-4 btn-sm addcaw',
// text: '<i class="fas fa-plus" id="test"></i>',
// titleAttr: 'Tambah Cawangan',
// action: function ( e, dt, node, config ) {
// // alert( 'Button activated' );
// // console.log('hye');
// $('#myModal').modal("show");
// $('#myModal').on('shown.bs.modal', function () {
// $('#rolename').trigger('focus')
// })
// }
// },
// {
// 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();
// }
// }
// ]
});
// $('.addcaw').tooltip();
// $('.export').tooltip();
// // $( '.dt-buttons').addClass('btn-group');
// $( '.addcaw').removeClass('dt-button');
// $( '.export').removeClass('dt-button');
</script>
@endsection