193 lines
11 KiB
PHP
193 lines
11 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">
|
|
<a href="{{ route('marhun.senarailelongterimaserah') }}" class="header-style-icon">
|
|
<i class="fas fa-arrow-left"></i>
|
|
</a>
|
|
<div class="header-style-title">
|
|
Terima/Serah Marhun, Batch Lelong: {{ $lelong_id}}
|
|
</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
|
|
{{-- <a href="{{route('marhun.senarailelongterimaserah')}}" class="btn mb-2 btn-secondary">Kembali</a> --}}
|
|
<ul class="nav mb-2 nav-tabs" id="myTab" role="tablist">
|
|
<li class="nav-item">
|
|
<a class="nav-link active" id="belum-diterima-tab" data-toggle="tab" href="#belum-diterima" role="tab" aria-controls="belum-diterima" aria-selected="true">Belum Diterima</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" id="sedang-dinilai-tab" data-toggle="tab" href="#sedang-dinilai" role="tab" aria-controls="sedang-dinilai" aria-selected="false">Sedang Dinilai</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" id="sudah-serah-tab" data-toggle="tab" href="#sudah-serah" role="tab" aria-controls="sudah-serah" aria-selected="false">Sudah Serah</a>
|
|
</li>
|
|
</ul>
|
|
<div class="tab-content" id="myTabContent">
|
|
<div class="tab-pane fade show active" id="belum-diterima" role="tabpanel" aria-labelledby="belum-diterima-tab">
|
|
<form action="{{ route('marhun.terimamarhun') }}" method="POST">
|
|
@csrf
|
|
<input type="hidden" name="scanKeluar_id" value="{{ json_encode($senaraiScanKeluar->pluck('id')->toArray()) }}">
|
|
<table class='table table-bordered table-hover' id='table-belum-diterima'>
|
|
<thead class="bg-primary text-white">
|
|
<tr>
|
|
<th>Bil</th>
|
|
<th>No Rujukan</th>
|
|
<th>Tarikh/Masa Scan Keluar</th>
|
|
<th class="text-center">Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($senaraiScanKeluar as $index)
|
|
<tr>
|
|
<td>{{$loop->iteration}}</td>
|
|
<td>{{$index->norujukan}}</td>
|
|
<td>{{$index->scan_keluar}}</td>
|
|
<td class="text-center"><span class="badge badge-danger">Belum Terima</span></td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
@if ($senaraiScanKeluar->isNotEmpty())
|
|
<div class="d-flex mt-2 justify-content-end">
|
|
<button type="submit" class="btn btn-primary btn-sm">Terima Marhun</button>
|
|
</div>
|
|
@endif
|
|
</form>
|
|
|
|
</div>
|
|
<div class="tab-pane fade" id="sedang-dinilai" role="tabpanel" aria-labelledby="sedang-dinilai-tab">
|
|
<form action="{{ route('marhun.serahmarhun') }}" method="POST">
|
|
@csrf
|
|
<div style="overflow-x: auto;">
|
|
<table class='table table-bordered table-hover' id='table-sedang-dinilai'>
|
|
<thead class="bg-primary text-white">
|
|
<tr>
|
|
<th class="text-center"><input type="checkbox" id="checkall"></th>
|
|
<th class="text-center">Bil</th>
|
|
<th>No Rujukan</th>
|
|
<th>Tarikh/Masa Scan Keluar</th>
|
|
<th>Tarikh/Masa Terima Marhun</th>
|
|
<th class="text-center">Status</th>
|
|
<th class="text-center">Tindakan</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse($sedangDinilai as $index)
|
|
<tr>
|
|
<td class="text-center"><input type="checkbox" class="checkbox" name="sedangDinilai_id[]" value="{{$index->id}}"></td>
|
|
<td class="text-center">{{$loop->iteration}}</td>
|
|
<td>{{$index->norujukan}}</td>
|
|
<td>{{$index->scan_keluar}}</td>
|
|
<td>{{$index->terima_marhun}}</td>
|
|
<td class="text-center"><span class="badge badge-warning">Sedang Dinilai</span></td>
|
|
<td class="text-center"><a class="btn btn-primary btn-sm" href="{{route('marhun.show',[$index->lelongbid_id, $index->lelong_id])}}" data-toggle="tooltip" data-placement="top" title="Semak Marhun"><i class="far fa-edit"></i></a></td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="99" class="text-center">No Data</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="d-flex mt-2 justify-content-end">
|
|
<button type="submit" class="btn btn-primary btn-sm" disabled id="button-serah">Serah Marhun</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="tab-pane fade" id="sudah-serah" role="tabpanel" aria-labelledby="sudah-serah-tab">
|
|
<div class="mb-2"> <a href="{{ route('marhun.cetakterimaserahmarhun', $lelong_id) }}" class="btn btn-primary btn-sm">Laporan Serahan Marhun Penilai</a><br></div>
|
|
<div style="overflow-x: auto;">
|
|
<table class="table table-bordered" id="table-sudah-serah" style="width: 100%;">
|
|
<thead class="bg-primary text-white">
|
|
<tr>
|
|
<th class="text-center">Bil</th>
|
|
<th>No Rujukan</th>
|
|
<th>Tarikh/Masa Scan Keluar</th>
|
|
<th>Tarikh/Masa Terima Marhun</th>
|
|
<th>Tarikh/Masa Serah Marhun</th>
|
|
<th class="text-center">Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($sudahSerah as $index)
|
|
<tr>
|
|
<td class="text-center">{{$loop->iteration}}</td>
|
|
<td>{{$index->norujukan}}</td>
|
|
<td>{{$index->scan_keluar}}</td>
|
|
<td>{{$index->terima_marhun}}</td>
|
|
<td>{{$index->serah_marhun}}</td>
|
|
<td class="text-center"><span class="badge badge-success">Sudah Serah</span></td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
$(function() {
|
|
$('[data-toggle="tooltip"]').tooltip()
|
|
});
|
|
|
|
$(document).ready(function() {
|
|
$("#checkall").change(function() {
|
|
var checked = $(this).is(':checked');
|
|
if (checked) {
|
|
$(".checkbox").each(function() {
|
|
$(this).prop("checked", true);
|
|
$('#button-serah').removeAttr('disabled');
|
|
});
|
|
} else {
|
|
$(".checkbox").each(function() {
|
|
$(this).prop("checked", false);
|
|
$('#button-serah').attr('disabled', true);
|
|
});
|
|
}
|
|
});
|
|
|
|
$(".checkbox").click(function() {
|
|
if ($(".checkbox").length == $(".checkbox:checked").length) {
|
|
$("#checkall").prop("checked", true);
|
|
} else {
|
|
$("#checkall").prop("checked", false);
|
|
}
|
|
|
|
if ($(this).is(':checked')) {
|
|
$('#button-serah').removeAttr('disabled');
|
|
} else if ($(".checkbox:checked").length == 0) {
|
|
$('#button-serah').attr('disabled', true);
|
|
}
|
|
});
|
|
|
|
});
|
|
var tableBelumDiterima = $('#table-belum-diterima').DataTable({
|
|
"pageLength": 100,
|
|
});
|
|
var tableSudahSerah = $('#table-sudah-serah').DataTable({
|
|
"pageLength": 100,
|
|
});
|
|
</script>
|
|
|
|
@endsection |