168 lines
6.5 KiB
PHP
168 lines
6.5 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">
|
|
|
|
<div class="header-style-title">
|
|
Permohonan Tangguh Lelong
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
{{-- <h3 class="pt-3">Permohonan Tangguh Lelong</h3> --}}
|
|
@if ($message = Session::get('success'))
|
|
<div class="alert alert-success">
|
|
<p>{{ $message }}</p>
|
|
</div>
|
|
@endif
|
|
<form id="exportform" action="" method="POST">
|
|
<input type="hidden" name="type" value="User">
|
|
<table class="table text-center table-bordered" id="tablelelong" style="width:100%">
|
|
<thead class="bg-primary text-white">
|
|
<tr>
|
|
<th>No</th>
|
|
<th>Batch Lelong</th>
|
|
<th>Tarikh Lelong</th>
|
|
<th>Fasa</th>
|
|
|
|
<th>Tempoh</th>
|
|
|
|
<th>Status Lelong</th>
|
|
<th class="text-center">Tindakan</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
@foreach ($arrayinfo 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>{{ $lel['info']['fasa']}}</td>
|
|
|
|
|
|
<td>{{$lel['info']['jbg']}}</td>
|
|
|
|
<td>
|
|
@if($lel['info']['sts_lelong'] == 0)
|
|
<button class="btn btn-primary btn-sm" disabled>LELONG BELUM BERMULA</button>
|
|
@elseif($lel['info']['sts_lelong'] == 1)
|
|
<button class="btn btn-warning btn-sm" disabled>LELONG BERMULA</button>
|
|
@elseif($lel['info']['sts_lelong'] == 2)
|
|
<button class="btn btn-warning btn-sm" disabled>LELONG SELESAI</button>
|
|
@elseif($lel['info']['sts_lelong'] == 3)
|
|
<button class="btn btn-warning btn-sm" disabled>LELONG SELESAI</button>
|
|
@endif
|
|
</td>
|
|
@php
|
|
$datetime1 = new DateTime($lel['info']['tarikh_lelong']);
|
|
$datetime2 = new DateTime($currentdate);
|
|
$interval = $datetime1->diff($datetime2);
|
|
$days = $interval->format('%a');
|
|
@endphp
|
|
|
|
<td>
|
|
|
|
@if($lel['info']['sts_lelong'] == 0 && $days >= 2)
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
<a class="btn m-1 btn-primary" href="{{ route('tangguhlelong.carian', $lel['info']['lelong_id']) }}" title="Carian"><i class="far fa-edit"></i></a>
|
|
|
|
</div>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
</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
|