Files
lelong/resources/views/lelong/senarailelongpc.blade.php
T
2023-12-11 11:51:32 +08:00

332 lines
18 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 Lelongan
</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 Belum Mula ( {{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">
Sedang Lelong ( {{sizeof($arraydetails1)}}/{{sizeof($lelongAll)}} )
</a>
</li>
<li class="nav-item">
<a class="nav-link" id="jana-pemenang-tab" data-toggle="tab" href="#jana-pemenang" role="tab" aria-controls="jana-pemenang" aria-selected="false">
Lelong Jana Pemenang ( {{sizeof($arraydetails2)}}/{{sizeof($lelongAll)}} )
</a>
</li>
<li class="nav-item">
<a class="nav-link" id="scan-masuk-tab" data-toggle="tab" href="#scan-masuk" role="tab" aria-controls="scan-masuk" aria-selected="false">
Lelong Selesai ( {{sizeof($arraydetails3)}}/{{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>Bil</th>
<th>Batch Lelong</th>
<th>Tarikh Lelong</th>
<th>Fasa</th>
<th>Cawangan</th>
<th>Harga Emas Asas</th>
<th>Tempoh</th>
<th>Caj Lelong</th>
<th>Status</th>
<th>Tindakan</th>
</tr>
</thead>
<tbody>
@foreach($arraydetails0 as $lelong)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$lelong->id}}</td>
<td style="white-space: nowrap;">{{$lelong->tarikh_lelong}}</td>
<td>{{$lelong->fasa}}</td>
<td>
@foreach($lelong->cawangan as $cawangan)
<div class="row m-1 justify-content-center">
<span class="badge badge-pill badge-info text-white" style="font-size:100%">{{$cawangan->caw_name}}</span>
</div>
@endforeach
</td>
<td>{{$lelong->harga_emas_asas}}</td>
<td>{{$lelong->jbg}}</td>
<td>{{$lelong->cajlelong}}</td>
<td><span class="badge badge-pill badge-info">LELONG BELUM MULA</span></td>
<td style="white-space: nowrap;">
{{-- <a class="btn m-1 btn-warning confirmrefresh" href="{{ route('lelong.kemaskinidata',$lelong->id) }}" data-toggle="tooltip" data-placement="top" title="Kemaskini Lelong"><i class="fas fa-sync-alt"></i></a> --}}
@if($lelong->tagujrah == '0')
<a class="btn m-1 btn-primary" href="{{ route('jananotis.showlelongpc',$lelong->id) }}" data-toggle="tooltip" data-placement="top" title="Butiran Lelong"><i class="far fa-edit"></i></a>
@elseif($lelong->tagujrah == '1')
<a class="btn m-1 btn-success" href="{{ route('jananotis.showlelongpc',$lelong->id) }}" data-toggle="tooltip" data-placement="top" title="Butiran Lelong"><i class="far fa-edit"></i></a>
@endif
</td>
</tr>
@endforeach
</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>Bil</th>
<th>Batch Lelong</th>
<th>Tarikh Lelong</th>
<th>Fasa</th>
<th>Cawangan</th>
<th>Masa Mula Lelong</th>
<th>Masa Tamat Lelong</th>
<th>Harga Emas Asas</th>
<th>Tempoh</th>
<th>Caj Lelong</th>
<th>Status</th>
</tr>
</thead>
<tbody>
@foreach($arraydetails1 as $lelong)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$lelong->id}}</td>
<td style="white-space: nowrap;">{{$lelong->tarikh_lelong}}</td>
<td>{{$lelong->fasa}}</td>
<td>
@foreach($lelong->cawangan as $cawangan)
<div class="row m-1 justify-content-center">
<span class="badge badge-pill badge-info text-white" style="font-size:100%">{{$cawangan->caw_name}}</span>
</div>
@endforeach
</td>
<td>{{$lelong->masamula_lelong}}</td>
<td>{{$lelong->masatamat_lelong}}</td>
<td>{{$lelong->harga_emas_asas}}</td>
<td>{{$lelong->jbg}}</td>
<td>{{$lelong->cajlelong}}</td>
<td><span class="badge badge-pill badge-warning">LELONGAN SEDANG BERLANGSUNG</span></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<div class="tab-pane fade" id="jana-pemenang" role="tabpanel" aria-labelledby="jana-pemenang-tab">
<div style="overflow-x: auto;">
<table class="table table-bordered text-center" id="lelong-selesai">
<thead class="bg-primary text-white">
<tr>
<th>Bil</th>
<th>Batch Lelong</th>
<th>Tarikh Lelong</th>
<th>Fasa</th>
<th>Cawangan</th>
<th>Masa Tamat Lelong</th>
<th>Harga Emas Asas</th>
<th>Tempoh</th>
<th>Caj Lelong</th>
<th>Status</th>
</tr>
</thead>
<tbody>
@foreach($arraydetails2 as $data)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$lelong->id}}</td>
<td style="white-space: nowrap;">{{$lelong->tarikh_lelong}}</td>
<td>{{$lelong->fasa}}</td>
<td>
@foreach($lelong->cawangan as $cawangan)
<div class="row m-1 justify-content-center">
<span class="badge badge-pill badge-info text-white" style="font-size:100%">{{$cawangan->caw_name}}</span>
</div>
@endforeach
</td>
<td>{{$lelong->masatamat_lelong}}</td>
<td>{{$lelong->harga_emas_asas}}</td>
<td>{{$lelong->jbg}}</td>
<td>{{$lelong->cajlelong}}</td>
<td><span class="badge badge-pill badge-dark">LELONG JANA PEMENANGAN</span></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<div class="tab-pane fade" id="scan-masuk" role="tabpanel" aria-labelledby="scan-masuk-tab">
<div style="overflow-x: auto;">
<table class="table table-bordered text-center" id="lelong-jana-pemenang">
<thead class="bg-primary text-white">
<tr>
<th>Bil</th>
<th>Batch Lelong</th>
<th>Tarikh Lelong</th>
<th>Fasa</th>
<th>Cawangan</th>
<th>Masa Mula Lelong</th>
<th>Masa Tamat Lelong</th>
<th>Harga Emas Asas</th>
<th>Tempoh</th>
<th>Caj Lelong</th>
<th>Status</th>
<th>Tindakan</th>
</tr>
</thead>
<tbody>
@foreach($arraydetails3 as $lelong)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$lelong->id}}</td>
<td style="white-space: nowrap;">{{$lelong->tarikh_lelong}}</td>
<td>{{$lelong->fasa}}</td>
<td>
@foreach($lelong->cawangan as $cawangan)
<div class="row m-1 justify-content-center">
<span class="badge badge-pill badge-info text-white" style="font-size:100%">{{$cawangan->caw_name}}</span>
</div>
@endforeach
</td>
<td>{{$lelong->masamula_lelong}}</td>
<td>{{$lelong->masatamat_lelong}}</td>
<td>{{$lelong->harga_emas_asas}}</td>
<td>{{$lelong->jbg}}</td>
<td>{{$lelong->cajlelong}}</td>
<td><span class="badge badge-pill badge-success">LELONG SELESAI</span></td>
<td style="white-space: nowrap;">
{{-- <a class="btn m-1 btn-info" href="{{ route('lelong.showsimulasi',$lelong->id) }}" data-toggle="tooltip" data-placement="top" title="Lihat Simulasi"><i class="far fa-edit"></i></a> --}}
<a class="btn m-1 btn-warning" href="{{ route('jananotis.showlelongpcdone',$lelong->id) }}" data-toggle="tooltip" data-placement="top" title="Lihat Senarai Lelong Selesai"><i class="far fa-calendar"></i></a>
</td>
</tr>
@endforeach
</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