update tab lelongan sms/slps dalam bayaran atas talian
This commit is contained in:
@@ -39,11 +39,14 @@ class AccountController extends Controller
|
||||
$user = Auth::user();
|
||||
|
||||
$arrayinfo = [];
|
||||
$arraysms = [];
|
||||
$arraysls = [];
|
||||
$tarikh_semasa = date('Y-m-d', strtotime(now()));
|
||||
|
||||
$senarai = Lelong::join('cawangan_lelong','lelong.id','=','cawangan_lelong.lelong_id')
|
||||
->select('lelong_id','tarikh_lelong','lelong.fasa','sts_lelong')
|
||||
->distinct()
|
||||
->orderBy('lelong_id')
|
||||
->orderBy('tarikh_lelong', 'DESC')
|
||||
->where('lelong.sts_lelong', 3)
|
||||
->get()
|
||||
->toArray();
|
||||
@@ -58,11 +61,18 @@ class AccountController extends Controller
|
||||
->orderBy('lelong_id')
|
||||
->get()
|
||||
->toArray();
|
||||
|
||||
if($details['tarikh_lelong'] == $tarikh_semasa)
|
||||
{
|
||||
array_push($arraysms,['detail'=>$details, 'detailsinfo'=>$detailsinfo]);
|
||||
} else {
|
||||
array_push($arraysls,['detail'=>$details, 'detailsinfo'=>$detailsinfo]);
|
||||
}
|
||||
|
||||
array_push($arrayinfo,['detail'=>$details, 'detailsinfo'=>$detailsinfo]);
|
||||
// array_push($arrayinfo,['detail'=>$details, 'detailsinfo'=>$detailsinfo]);
|
||||
}
|
||||
|
||||
return view('account.senarailelongan',compact('senarai','arrayinfo'));
|
||||
return view('account.senarailelongan',compact('arraysms','arraysls','senarai','arrayinfo'));
|
||||
}
|
||||
|
||||
public function listbayaranonline($lelong_id, $kodcaw)
|
||||
|
||||
@@ -18,8 +18,22 @@
|
||||
<p>{{ $message }}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<table class="table text-center table-bordered" id="senarailelongan" style="width:100%">
|
||||
<ul class="nav mb-2 nav-tabs" id="myTab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="sedang-lelong-tab" data-toggle="tab" href="#sedang-lelong" role="tab" aria-controls="sedang-lelong" aria-selected="false">
|
||||
Lelongan Semasa
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="selesai-lelong-tab" data-toggle="tab" href="#selesai-lelong" role="tab" aria-controls="selesai-lelong" aria-selected="false">
|
||||
Lelongan Selesai
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content" style="overflow-x: auto;" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="sedang-lelong" role="tabpanel" aria-labelledby="sedang-lelong-tab">
|
||||
<div style="overflow-x: auto;">
|
||||
<table class="table table-bordered text-center" id="tablestatussedanglelong" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>No</th>
|
||||
@@ -31,7 +45,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($arrayinfo as $data)
|
||||
@forelse($arraysms as $data)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $data['detail']['lelong_id']}}</td>
|
||||
@@ -42,8 +56,8 @@
|
||||
@endphp</td>
|
||||
<td align='left'>
|
||||
@foreach($data['detailsinfo'] as $details)
|
||||
<a class="btn m-1 btn-primary" href=" {{ route('account.listbayaranonline', ['lelong_id'=>$data['detail']['lelong_id'], 'kodcaw'=>$details['caw_code']]) }} " data-toggle="tooltip" data-placement="top" title="Butiran Bidaan"><i class="far fa-edit"></i></a>
|
||||
<span class="m-2">{{ $details['caw_name']}}
|
||||
<a class="btn btn-primary btn-sm" href=" {{ route('account.listbayaranonline', ['lelong_id'=>$data['detail']['lelong_id'], 'kodcaw'=>$details['caw_code']]) }} " data-toggle="tooltip" data-placement="top" title="Butiran Bidaan"><i class="far fa-edit"></i></a>
|
||||
<span class="m-2">{{ $details['caw_name']}}<br>
|
||||
</span><br>
|
||||
@endforeach
|
||||
</td>
|
||||
@@ -54,10 +68,54 @@
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@empty
|
||||
<td colspan="6">No Data Available</td>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="selesai-lelong" role="tabpanel" aria-labelledby="selesai-lelong-tab">
|
||||
<div style="overflow-x: auto;">
|
||||
<table class="table table-bordered text-center" id="tablestatussedanglelong" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Batch Lelong</th>
|
||||
<th>Tarikh Lelong</th>
|
||||
<th>Cawangan</th>
|
||||
<th>Fasa</th>
|
||||
<th>Status Lelong</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($arraysls as $data)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $data['detail']['lelong_id']}}</td>
|
||||
<td>@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $data['detail']['tarikh_lelong'] );
|
||||
$t_lelong = $myDateTime->format('d-m-Y');
|
||||
echo($t_lelong);
|
||||
@endphp</td>
|
||||
<td align='left'>
|
||||
@foreach($data['detailsinfo'] as $details)
|
||||
<a class="btn-sm btn-primary" href=" {{ route('account.listbayaranonline', ['lelong_id'=>$data['detail']['lelong_id'], 'kodcaw'=>$details['caw_code']]) }} " data-toggle="tooltip" data-placement="top" title="Butiran Bidaan"><i class="far fa-edit"></i></a>
|
||||
<span class="m-2">{{ $details['caw_name']}}<br>
|
||||
</span><br>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>{{ $data['detail']['fasa'] }}</td>
|
||||
<td>
|
||||
@if($data['detail']['sts_lelong'] == 3)
|
||||
<button class="btn btn-success btn-sm" disabled>LELONG SELESAI</button>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -67,47 +125,46 @@
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
|
||||
var tablesenarailelongan = $('#senarailelongan').DataTable({
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 4,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
order: [[0, '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();
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
});
|
||||
var tablestatussedanglelong = $('#tablestatussedanglelong').DataTable({
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 7,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
order: [[1, 'asc']],
|
||||
// "ordering": false,
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 15,
|
||||
dom: 'Bfrtip',
|
||||
|
||||
});
|
||||
|
||||
var tablestatusselesailelong = $('#tablestatusselesailelong').DataTable({
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": true
|
||||
},
|
||||
{
|
||||
"targets": 7,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
order: [[1, 'asc']],
|
||||
// "ordering": false,
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 3,
|
||||
dom: 'Bfrtip',
|
||||
|
||||
});
|
||||
|
||||
|
||||
// $('.addcaw').tooltip();
|
||||
// $('.export').tooltip();
|
||||
|
||||
Reference in New Issue
Block a user