248 lines
13 KiB
PHP
248 lines
13 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<div class="container-fluid">
|
|
<div class="row ">
|
|
<div class="col">
|
|
<div class="card">
|
|
<div class="card-header header-style">
|
|
<div class="header-style-title">
|
|
Senarai Batch Lelongan (Scan Barcode Keluar Marhun Kepada Pembida)
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
@if ($message = Session::get('success'))
|
|
<div class="alert mt-2 alert-success">
|
|
{{ $message }}
|
|
</div>
|
|
@elseif ($message = Session::get('failed'))
|
|
<div class="alert mt-2 alert-danger">
|
|
{{ $message }}
|
|
</div>
|
|
@endif
|
|
|
|
<ul class="nav mb-2 nav-tabs" id="myTab" role="tablist">
|
|
<li class="nav-item">
|
|
<a class="nav-link active" id="scan-keluar-tab" data-toggle="tab" href="#scan-keluar" role="tab" aria-controls="scan-keluar" aria-selected="false">
|
|
Lelong Hari Ini ( {{sizeof($arraydetails0)}}/{{sizeof($lelongAll)}} )
|
|
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" id="sedang-lelong-tab" data-toggle="tab" href="#sedang-lelong" role="tab" aria-controls="sedang-lelong" aria-selected="false">
|
|
Lelong Selesai ( {{sizeof($arraydetails1)}}/{{sizeof($lelongAll)}} )
|
|
|
|
</a>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<div class="tab-content" style="overflow-x: auto;" id="myTabContent">
|
|
<div class="tab-pane fade show active" id="scan-keluar" role="tabpanel" aria-labelledby="scan-keluar-tab">
|
|
<div style="overflow-x: auto;">
|
|
<table class="table table-bordered text-center" id="lelong-belum">
|
|
<thead class="bg-primary text-white">
|
|
<tr>
|
|
<th>No</th>
|
|
<th>Batch Lelong</th>
|
|
<th>Tarikh Lelong</th>
|
|
<th>Nama Pembida</th>
|
|
<th>Status Lelong</th>
|
|
<th>Tindakan</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse($arraydetails0 as $lel)
|
|
<tr>
|
|
<td>{{$loop->iteration}}</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 style='white-space:nowrap;' align = 'left'>
|
|
{{-- @if(!empty($listwinner)) --}}
|
|
@foreach($lel['listwinner'] as $winner)
|
|
<a class="btn m-1 btn-info" href=" {{ route('marhun.scanbarcodejualbycust', ['lelong_id'=>$lel['info']['lelong_id'], 'userid'=>$winner['details']['id']]) }} " data-toggle="tooltip" data-placement="top" title="Butiran Bidaan"><i class="far fa-edit"></i></a>
|
|
{{ $winner['details']['name']}}<br>
|
|
@endforeach
|
|
{{-- @endif --}}
|
|
</td>
|
|
<td>
|
|
@if($lel['info']['sts_lelong'] == 3)
|
|
<button class="btn btn-success btn-sm" disabled>LELONG SELESAI</button>
|
|
@endif
|
|
</td>
|
|
<td>
|
|
@if($lel['info']['sts_lelong'] == 3)
|
|
<a class="btn m-1 btn-warning" href="{{ route('marhun.exportmarhundetailspembida', ['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-info" href=" {{ route('marhun.scanbarcodejual', ['lelong_id'=>$lel['info']['lelong_id']]) }} " data-toggle="tooltip" data-placement="top" title="Serahan Kepada Pembida"><i class="far fa-edit"></i></a> --}}
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="6">No Data</td>
|
|
</tr>
|
|
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="tab-pane fade" id="sedang-lelong" role="tabpanel" aria-labelledby="sedang-keluar-tab">
|
|
<div style="overflow-x: auto;">
|
|
|
|
<table class="table table-bordered text-center" id="lelong-sedang">
|
|
<thead class="bg-primary text-white">
|
|
<tr>
|
|
<th>No</th>
|
|
<th>Batch Lelong</th>
|
|
<th>Tarikh Lelong</th>
|
|
<th>Nama Pembida</th>
|
|
<th>Status Lelong</th>
|
|
<th>Tindakan</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse($arraydetails1 as $lel)
|
|
<tr>
|
|
<td>{{$loop->iteration}}</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 style='white-space:nowrap;' align = 'left'>
|
|
{{-- @if(!empty($listwinner)) --}}
|
|
@foreach($lel['listwinner'] as $winner)
|
|
<a class="btn m-1 btn-info" href=" {{ route('marhun.scanbarcodejualbycust', ['lelong_id'=>$lel['info']['lelong_id'], 'userid'=>$winner['details']['id']]) }} " data-toggle="tooltip" data-placement="top" title="Butiran Bidaan"><i class="far fa-edit"></i></a>
|
|
{{ $winner['details']['name']}}<br>
|
|
@endforeach
|
|
{{-- @endif --}}
|
|
</td>
|
|
<td>
|
|
@if($lel['info']['sts_lelong'] == 3)
|
|
<button class="btn btn-success btn-sm" disabled>LELONG SELESAI</button>
|
|
@endif
|
|
</td>
|
|
<td>
|
|
@if($lel['info']['sts_lelong'] == 3)
|
|
<a class="btn m-1 btn-warning" href="{{ route('marhun.exportmarhundetailspembida', ['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-info" href=" {{ route('marhun.scanbarcodejual', ['lelong_id'=>$lel['info']['lelong_id']]) }} " data-toggle="tooltip" data-placement="top" title="Serahan Kepada Pembida"><i class="far fa-edit"></i></a> --}}
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="6">No Data</td>
|
|
</tr>
|
|
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
//Enable tooltips everywhere
|
|
$(function() {
|
|
$('[data-toggle="tooltip"]').tooltip()
|
|
})
|
|
|
|
$('a.confirmdel').confirm({
|
|
title: 'Padam Simulasi',
|
|
content: 'Adakah anda pasti? Tindakan ini tidak dapat dikembalikan.',
|
|
icon: 'fa fa-exclamation-triangle',
|
|
type: 'red',
|
|
boxWidth: '500px',
|
|
useBootstrap: false,
|
|
typeAnimated: true,
|
|
buttons: {
|
|
|
|
Batal: {
|
|
btnClass: 'btn-default',
|
|
action: function() {}
|
|
},
|
|
Padam: {
|
|
btnClass: 'btn-red',
|
|
action: function() {
|
|
location.href = this.$target.attr('href');
|
|
$.dialog({
|
|
icon: 'fa fa-spinner fa-spin',
|
|
title: 'Dalam Proses !',
|
|
content: 'Halaman akan dikemaskini selepas proses selesai.',
|
|
closeIcon: false,
|
|
boxWidth: '500px',
|
|
useBootstrap: false,
|
|
});
|
|
}
|
|
},
|
|
}
|
|
});
|
|
$('a.confirmrefresh').confirm({
|
|
title: 'Kemaskini Simulasi',
|
|
content: 'Adakah anda pasti? Tindakan ini tidak dapat dikembalikan.',
|
|
icon: 'fa fa-exclamation-triangle',
|
|
type: 'orange',
|
|
boxWidth: '500px',
|
|
useBootstrap: false,
|
|
typeAnimated: true,
|
|
buttons: {
|
|
Batal: {
|
|
btnClass: 'btn-default',
|
|
action: function() {}
|
|
|
|
},
|
|
Kemaskini: {
|
|
btnClass: 'btn-orange',
|
|
action: function() {
|
|
location.href = this.$target.attr('href');
|
|
$.dialog({
|
|
icon: 'fa fa-spinner fa-spin',
|
|
title: 'Dalam Proses !',
|
|
content: 'Halaman akan dikemaskini selepas proses selesai.',
|
|
closeIcon: false,
|
|
boxWidth: '500px',
|
|
useBootstrap: false,
|
|
});
|
|
}
|
|
},
|
|
}
|
|
});
|
|
|
|
$('.addsim').tooltip();
|
|
$('.export').tooltip();
|
|
// $( '.dt-buttons').addClass('btn-group');
|
|
$('.addsim').removeClass('dt-button');
|
|
$('.export').removeClass('dt-button');
|
|
|
|
var tableLelongSemasa = $('#lelong-semasa').DataTable({
|
|
"pageLength": 100,
|
|
});
|
|
var tableLelongSedang = $('#lelong-sedang').DataTable({
|
|
"pageLength": 100,
|
|
});
|
|
var tableLelongBelum = $('#lelong-belum').DataTable({
|
|
"pageLength": 100,
|
|
});
|
|
var tableLelongJanaPemenang = $('#lelong-jana-pemenang').DataTable({
|
|
"pageLength": 100,
|
|
});
|
|
var tableLelongSelesai = $('#lelong-selesai').DataTable({
|
|
"pageLength": 100,
|
|
});
|
|
</script>
|
|
|
|
@endsection |