update tangguh lelong list display

This commit is contained in:
Nur Izzati Zulkifli
2022-06-18 21:59:00 +08:00
parent 2e4bfd6c3c
commit bd2c7dbb27
5 changed files with 15 additions and 26 deletions
+2 -2
View File
@@ -897,10 +897,10 @@ class MarhunController extends Controller
->first();
$tangguhlelong[$index1]['details'] = $tanguhlel;
$tangguhlelong[$index1]['nama_caw'] = $getkodcaw;
// $tangguhlelong[$index1]['nama_caw'] = $getkodcaw;
}
return view('pengesahan.senaraitangguhlelong',compact('tangguhlelong','id', 'caw_code', 'getkodcaw'));
return view('pengesahan.senaraitangguhlelong',compact('tangguhlelong','id', 'caw_code'));
}
public function lelbidmarhun($id, $norujukan, $tangguhlelong_id)
@@ -379,6 +379,7 @@ class TangguhLelongController extends Controller
// dd($id);
$tangguhlelong = TangguhLelong::join('lelong', 'tangguhlelong.lelong_id', '=', 'lelong.id')
->where('tangguhlelong.lelong_id', $lelong_id)
->where('tangguhlelong.norujukan', 'like', "%$caw_code%")
->whereNotNull('tangguhlelong.tarikhtangguh')
->select('tangguhlelong.id as tangguhlelong_id',
@@ -397,21 +398,21 @@ class TangguhLelongController extends Controller
)
->get();
//dd($tangguhlelong);
foreach($tangguhlelong as $index1=>$tanguhlel)
{
$getkodcaw = LelongBid::join('cawangan', 'lelongbid.kodcaw', '=', 'cawangan.caw_code')
->where('lelong_id', $lelong_id)
->where('kodcaw', $caw_code)
->select('cawangan.caw_name','cawangan.caw_code')
->first();
$tangguhlelong[$index1]['details'] = $tanguhlel;
$tangguhlelong[$index1]['nama_caw'] = $getkodcaw;
//$tangguhlelong[$index1]['nama_caw'] = $getkodcaw;
}
return view('tangguhlelong.listtangguh',compact('tangguhlelong','lelong_id', 'caw_code', 'getkodcaw'));
// dd($tangguhlelong);
return view('tangguhlelong.listtangguh',compact('tangguhlelong','lelong_id', 'caw_code'));
}
+1
View File
@@ -17,6 +17,7 @@ class LogUser extends Model
'date',
'username',
'nama_user',
'norujukan',
'nota'
];
@@ -11,15 +11,6 @@
</div>
@endif
<div class="container">
<div class="row mb-2">
<div class="col-md-12 mx-auto card p-4" style="margin-top:2%; margin-bottom:2%;">
<p> <b>Tarikh Lelong : </b> {{ $tangguhlelong[0]['tarikh_lelong'] }}</p>
<p> <b>Nama Cawangan : </b>{{ $getkodcaw->caw_name }}</p>
<p> <b>JBG : </b>{{ $tangguhlelong[0]['jbg'] }}</p>
</div>
</div>
</div>
<form id="exportform" action="" method="POST">
<input type="hidden" name="type" value="User">
<table class="table table-striped table-xl text-center" id="tablelelong" style="width:100%">
@@ -11,15 +11,7 @@
</div>
@endif
<div class="container">
<div class="row mb-2">
<div class="col-md-12 mx-auto card p-4" style="margin-top:2%; margin-bottom:2%;">
<p> <b>Tarikh Lelong : </b> {{ $tangguhlelong[0]['tarikh_lelong'] }}</p>
<p> <b>Nama Cawangan : </b>{{ $getkodcaw->caw_name }}</p>
<p> <b>JBG : </b>{{ $tangguhlelong[0]['jbg'] }}</p>
</div>
</div>
</div>
<form id="exportform" action="" method="POST">
<input type="hidden" name="type" value="User">
<table class="table table-striped table-xl text-center" id="tablelelong" style="width:100%">
@@ -33,8 +25,11 @@
</tr>
</thead>
<tbody>
@foreach ($tangguhlelong as $tangguhlel)
@if(empty($tangguhlel))
<tr>
</tr>
@else
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $tangguhlel->tarikhtangguh }}</td>
@@ -44,6 +39,7 @@
<a href="{{ route('pengesahan.lelbidmarhun', [ $lelong_id, $tangguhlel->norujukan, 'tangguhlelong_id'=>$tangguhlel['details']['tangguhlelong_id'] ]) }}" data-toggle="tooltip" data-placement="top" title="Butiran" class="text-center" ><i class="far fa-edit"></i></a>
</td>
</tr>
@endif
@endforeach
</tbody>
</table>