Files
lelong/resources/views/marhun/terimaserahmarhun.blade.php
T
2022-11-21 21:24:30 +08:00

151 lines
9.0 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.senarailelongscan') }}" class="header-style-icon">
<i class="fas fa-arrow-left"></i>
</a>
<div class="header-style-title">
Terima/Serah Marhun
</div>
</div>
<div class="card-body">
@if ($message = Session::get('success'))
<div class="alert mt-2 alert-success">
<p>{{ $message }}</p>
</div>
@elseif ($message = Session::get('failed'))
<div class="alert mt-2 alert-danger">
<p>{{ $message }}</p>
</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
<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>Status</th>
</tr>
</thead>
<tbody>
@foreach($senaraiScanKeluar as $index)
<input type="hidden" name="scanKeluar_id[]" value="{{$index->id}}">
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$index->norujukan}}</td>
<td>{{$index->scan_keluar}}</td>
<td><span class="badge badge-pill badge-danger">Belum Terima</span></td>
</tr>
@endforeach
</tbody>
</table>
<div class="d-flex mt-2 justify-content-end">
<button type="submit" class="btn btn-primary">Terima Marhun</button>
</div>
</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
<input type="hidden" name="test" value="essds">
<table class='table table-bordered table-hover' id='table-sedang-dinilai'>
<thead class="bg-primary text-white">
<tr>
<th>Bil</th>
<th>No Rujukan</th>
<th>Tarikh/Masa Scan Keluar</th>
<th>Tarikh/Masa Terima Marhun</th>
<th>Status</th>
</tr>
</thead>
<tbody>
@foreach($sedangDinilai as $index)
<input type="hidden" name="sedangDinilai_id[]" value="{{$index->id}}">
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$index->norujukan}}</td>
<td>{{$index->scan_keluar}}</td>
<td>{{$index->terima_marhun}}</td>
@if (isset($index['sdhdisemak']['status_semak']))
@if(($index['sdhdisemak']['status_semak']) == 1)
<td><span class="badge badge-pill badge-success">Telah Dinilai</span></td>
@else
<td><a href="{{route('marhun.show',[$index->lelongbid_id, $index->lelong_id])}}"><span class="badge badge-pill badge-warning">Sedang Dinilai</span></a></td>
@endif
@else
<td><a href="{{route('marhun.show',[$index->lelongbid_id, $index->lelong_id])}}"><span class="badge badge-pill badge-warning">Sedang Dinilai</span></a></td>
@endif
</tr>
@endforeach
</tbody>
</table>
<div class="d-flex mt-2 justify-content-end">
<button type="submit" class="btn btn-primary">Serah Marhun</button>
</div>
</form>
</div>
<div class="tab-pane fade" id="sudah-serah" role="tabpanel" aria-labelledby="sudah-serah-tab">
<div style="text-align: left;"> <a href="{{ route('marhun.cetakterimaserahmarhun', $lelong_id) }}" class="btn btn-info">Laporan Serahan Marhun Penilai</a><br></div>
<table class="table table-bordered table-hover" id="table-sudah-serah" style="width: 100%;">
<thead class="bg-primary text-white">
<tr>
<th>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>Status</th>
</tr>
</thead>
<tbody>
@foreach($sudahSerah as $index)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$index->norujukan}}</td>
<td>{{$index->scan_keluar}}</td>
<td>{{$index->terima_marhun}}</td>
<td>{{$index->serah_marhun}}</td>
<td><span class="badge badge-pill badge-success">Sudah Serah</span></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
// var tableBelumDiterima = $('#table-belum-diterima').DataTable({});
// var tableSedangDinilai = $('#table-sedang-dinilai').DataTable({});
// var tableSudahSerah = $('#table-sudah-serah').DataTable({});
</script>
@endsection