Files
lelong/resources/views/marhun/senarailelongmarhun.blade.php
T
2022-11-21 21:24:30 +08:00

124 lines
4.9 KiB
PHP

@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col mx-auto p-4">
<div class="card">
<div class="card-header header-style">
<a href="{{ route('marhun.senarailelongmarhun') }}" class="header-style-icon">
<i class="fas fa-arrow-left"></i>
</a>
<div class="header-style-title">
Senarai Lelongan Marhun
</div>
</div>
<div class="card-body">
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<table class='table table-bordered table-hover' id="senarailelongonline" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th>No</th>
{{-- <th>Cawangan</th> --}}
<th>Batch Lelong</th>
<th>Tarikh Lelong</th>
<th>Fasa</th>
<th>Status Lelong</th>
<th class="text-center">Tindakan</th>
</tr>
</thead>
<tbody>
@foreach($arrayinfo as $lel)
<tr>
<td>{{$loop->iteration}}</td>
{{-- <td>
@foreach($lel['detailsinfo'] as $details)
<span class="m-2">{{$details['caw_name']}}</span><br>
@endforeach
</td> --}}
<td>{{ $lel['info']['lelong_id']}}</td>
<td>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $lel['info']['tarikh_lelong'] );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>{{ $lel['info']['fasa']}}</td>
<td>
@if($lel['info']['sts_lelong'] == 0)
<button class="btn btn-warning btn-sm" disabled>LELONG BELUM BERMULA</button>
@endif
</td>
<td><a class="confirmrefresh btn m-1 btn-warning" href="{{ route('marhun.exportmarhundetails', ['lelong_id'=>$lel['info']['lelong_id']]) }}" data-toggle="tooltip" data-placement="top" title="Muat Turun Senarai Marhun" style="margin-right:40px" ><i class="fas fa-download"></i></a>
<a class="btn m-1 btn-primary" href=" {{ route('marhun.senaraimarhun', ['lelong_id'=>$lel['info']['lelong_id']]) }} " data-toggle="tooltip" data-placement="top" title="Senarai Lelong Marhun" ><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