163 lines
7.1 KiB
PHP
163 lines
7.1 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
|
|
<table class="table table-striped table-xl text-center" id="senarailelongtaklaku" style="width:100%">
|
|
<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 class="text-center">Tindakan</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($arraydetails as $data)
|
|
<tr>
|
|
<td>{{$loop->iteration}}</td>
|
|
<td>{{ $data['laporan']['lelong_id'] }}</td>
|
|
<td>@php
|
|
$myDateTime = DateTime::createFromFormat('Y-m-d', $data['laporan']['tarikh_lelong'] );
|
|
$t_lelong = $myDateTime->format('d-m-Y');
|
|
echo($t_lelong);
|
|
@endphp</td>
|
|
<td>{{$data['laporan']['fasa']}}</td>
|
|
<td align = 'left'>
|
|
@foreach($data['details'] as $details)
|
|
<span class="m-2">{{$details['caw_name']}}</span><br>
|
|
@endforeach
|
|
</td>
|
|
<td> @if($data['laporan']['masatamat_lelong'] == 0)
|
|
{{$data['laporan']['masatamat_lelong']}}
|
|
@else
|
|
@php
|
|
$myDateTime = DateTime::createFromFormat('H:i:s', $data['laporan']['masatamat_lelong'] );
|
|
$masa_lelong = $myDateTime->format('h:i: a');
|
|
echo($masa_lelong);
|
|
|
|
@endphp
|
|
|
|
@endif
|
|
</td>
|
|
|
|
<td>{{$data['laporan']['harga_emas_asas']}}</td>
|
|
<td>{{$data['laporan']['jbg']}}</td>
|
|
<td>{{$data['laporan']['cajlelong']}}</td>
|
|
|
|
<td class="text-center">
|
|
@hasrole('pengurus-cawangan-khas')
|
|
@if($data['laporan']['sts_lelong'] == 0)
|
|
<a href="{{ route('lelonghargajual.kemaskinidata',$data['laporan']['lelong_id']) }}" data-toggle="tooltip" data-placement="top" title="Kemaskini Data" style="margin-right:40px"><i class="fas fa-sync-alt"></i></a>
|
|
<a href="{{ route('lelonghargajual.showlelongkhas',$data['laporan']['lelong_id']) }}" data-toggle="tooltip" data-placement="top" title="Lihat Senarai Lelong" style="margin-right:40px" ><i class="far fa-edit"></i></a>
|
|
{{-- <a href="{{ route('lelonghargajual.showsimulasikhas',$data['laporan']['lelong_id']) }}" data-toggle="tooltip" data-placement="top" title="Lihat Simulasi" style="margin-right:40px" ><i class="far fa-edit"></i></a> --}}
|
|
{{-- <a class="confirmdel" href="{{ route('lelonghargajual.delete',$data['laporan']['lelong_id']) }}" data-toggle="tooltip" data-placement="top" title="Padam" ><i class="far fa-trash-alt"></i></a> --}}
|
|
@elseif($data['laporan']['sts_lelong'] == 1)
|
|
<button class="btn btn-warning btn-sm" disabled>LELONGAN SEDANG DIJALANKAN</button>
|
|
@elseif($data['laporan']['sts_lelong'] == 2)
|
|
<button class="btn btn-info btn-sm" disabled>JANA PEMENANG</button>
|
|
@elseif($data['laporan']['sts_lelong'] == 3)
|
|
<button class="btn btn-success btn-sm" disabled>LELONG SELESAI</button>
|
|
<a href="{{ route('lelong.exportDataByCawangan', $data['laporan']['lelong_id']) }}" class="btn btn-primary btn-sm">EXPORT <i class="fas fa-file-export"></i></a>
|
|
@endif
|
|
@endhasrole
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script>
|
|
//Enable tooltips everywhere
|
|
$(function () {
|
|
$('[data-toggle="tooltip"]').tooltip()
|
|
})
|
|
$('a.confirmdel').confirm({
|
|
title: 'Confirmation',
|
|
content: 'Anda pasti?',
|
|
type: 'orange',
|
|
typeAnimated: true,
|
|
buttons: {
|
|
Delete: {
|
|
btnClass: 'btn-warning',
|
|
action: function () {
|
|
location.href = this.$target.attr('href');
|
|
}
|
|
},
|
|
Batal: {
|
|
btnClass: 'btn-default',
|
|
action: function () {}
|
|
}
|
|
}
|
|
});
|
|
|
|
var tablelelong = $('#tablelelong').DataTable({
|
|
"columnDefs": [
|
|
{
|
|
"targets": 0,
|
|
"orderable": false
|
|
},
|
|
{
|
|
"targets": 7,
|
|
"orderable": false
|
|
}
|
|
],
|
|
order: [[1, 'asc']],
|
|
// "ordering": false,
|
|
"info": false,
|
|
"lengthChange": false,
|
|
"pageLength": 99999999,
|
|
dom: 'Bfrtip',
|
|
// buttons: [
|
|
// // 'copy', 'excel', 'pdf'
|
|
// // { text: 'copy', className: 'btn btn-primary' },
|
|
// // {
|
|
// // className: 'btn btn-outline-success pl-4 pr-4 btn-sm addsim',
|
|
// // text: '<i class="fas fa-plus" id="test"></i>',
|
|
// // titleAttr: 'Tambah Simulasi',
|
|
// // action: function ( e, dt, node, config ) {
|
|
// // alert( 'Button activated' );
|
|
// // }
|
|
// // },
|
|
// {
|
|
// 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();
|
|
// }
|
|
// }
|
|
// ]
|
|
});
|
|
|
|
$('.addsim').tooltip();
|
|
$('.export').tooltip();
|
|
// $( '.dt-buttons').addClass('btn-group');
|
|
$( '.addsim').removeClass('dt-button');
|
|
$( '.export').removeClass('dt-button');
|
|
|
|
function selectall(cb) {
|
|
tablelelong.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
|
|
$(this).prop('checked', cb.checked);
|
|
})
|
|
}
|
|
</script>
|
|
@endsection |