Merge branch 'faiqahzaman'

This commit is contained in:
Azfar Arsyad
2022-03-01 15:17:39 +08:00
7 changed files with 110 additions and 8 deletions
+2 -2
View File
@@ -446,12 +446,12 @@ class LelongController extends Controller
$lelongbid = LelongBid::where('lelong_id','=',$id)->get();
foreach($lelongbid as $bid)
{
$highestprice = LelongBidder::where('lelongbid_id','=',139)->orderBy('lelongbidder.hargabida','DESC' )->first();
$highestprice = LelongBidder::where('lelongbid_id','=',$bid->id)->orderBy('lelongbidder.hargabida','DESC' )->first();
// dd($highestprice->hargabida);
if($highestprice)
{
// foreach($highestprice as $price){
$bidders = LelongBidder::where('lelongbid_id','=',139)->where('hargabida','=',$highestprice->hargabida)->orderBy('masa_bidaan','ASC' )->get();
$bidders = LelongBidder::where('lelongbid_id','=',$bid->id)->where('hargabida','=',$highestprice->hargabida)->orderBy('masa_bidaan','ASC' )->get();
// dd($bidders);
$count = 0;
foreach($bidders as $bidder)
+8 -1
View File
@@ -126,7 +126,14 @@ class MarhunController extends Controller
}
public function senarailelongmarhun(Request $request){
$senarai = CawanganLelong::join('lelong', 'cawangan_lelong.lelong_id', '=', 'lelong.id')
->join('cawangan','cawangan_lelong.caw_id', '=', 'cawangan.id')
->get();
return view('marhun.senarailelongmarhun',compact('senarai'));
}
}
+2 -2
View File
@@ -42,8 +42,8 @@
@endhasrole
@hasrole('khazanah')
<li class="{{ (request()->is('marhun/senaraimarhun') || request()->is('marhun/senaraimarhun/*')) ? 'active' : '' }}">
<a href="{{url('marhun/senaraimarhun')}}">Marhun</a>
<li class="{{ (request()->is('marhun/senarailelongmarhun') || request()->is('marhun/senarailelongmarhun/*')) ? 'active' : '' }}">
<a href="{{url('marhun/senarailelongmarhun')}}">Marhun</a>
</li>
@endhasrole
@hasrole('teller')
@@ -38,6 +38,9 @@
@endforeach
</tbody>
</table>
<div class="modal-footer" style="margin-top:2%;">
<a href="{{ route('lelong.senarailelong') }}" class="btn btn-primary">Kembali</a>
</div>
</div>
</div>
</div>
@@ -0,0 +1,88 @@
@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="senarailelongonline" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th>No</th>
<th>Tarikh Lelong</th>
<th>Status Lelong</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
@foreach($senarai as $data)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{ $data->tarikh_lelong }}</td>
<td>{{ $data->sts_lelong }}</td>
<td><a href=" {{ route('marhun.senaraimarhun', ['lelong_id'=>$data['lelong_id']]) }} "><i class="far fa-edit"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
<script>
var tablesenarailelongonline = $('#senarailelongonline').DataTable({
"columnDefs": [
{
"targets": 0,
"orderable": false
},
{
"targets": 3,
"orderable": false
}
],
order: [[1, 'asc']],
"info": false,
"lengthChange": false,
"pageLength": 15,
dom: 'Bfrtip',
// buttons: [
// {
// className: 'btn btn-outline-success pl-4 pr-4 btn-sm addcaw',
// text: '<i class="fas fa-plus" id="test"></i>',
// titleAttr: 'Tambah Cawangan',
// action: function ( e, dt, node, config ) {
// // alert( 'Button activated' );
// // console.log('hye');
// $('#myModal').modal("show");
// $('#myModal').on('shown.bs.modal', function () {
// $('#rolename').trigger('focus')
// })
// }
// },
// {
// 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();
// }
// }
// ]
});
// $('.addcaw').tooltip();
// $('.export').tooltip();
// // $( '.dt-buttons').addClass('btn-group');
// $( '.addcaw').removeClass('dt-button');
// $( '.export').removeClass('dt-button');
</script>
@endsection
@@ -38,6 +38,9 @@
</table>
</form>
<div class="modal-footer" style="margin-top:2%;">
<a href="{{ route('marhun.senarailelongmarhun') }}" class="btn btn-primary">Kembali</a>
</div>
</div>
</div>
+4 -3
View File
@@ -89,7 +89,6 @@ Route::group(['prefix'=>'lelong'], function () {
Route::get('/senaraimarhun/{lelongid}/{cawid}', ['as'=>'lelong.senaraimarhun','uses'=>'LelongController@senaraimarhun']);
Route::post('/deletemarhun', ['as'=>'lelong.deletemarhun','uses'=>'LelongController@deletemarhun']);
});
Route::group(['middleware' => ['permission:pengesahanpembayaranpc']], function () {
@@ -116,9 +115,10 @@ Route::group(['prefix'=>'lelong'], function () {
//Khazanah
Route::group(['middleware' => ['permission:semakanmarhun','permission:kemaskinimarhun'],'prefix'=>'marhun'], function () {
Route::get('/senaraimarhun',['as'=>'marhun.senaraimarhun','uses'=>'MarhunController@index']);
Route::get('/senarailelongmarhun',['as'=>'marhun.senarailelongmarhun','uses'=>'MarhunController@senarailelongmarhun']);
Route::get('/senaraimarhun/{lelong_id}',['as'=>'marhun.senaraimarhun','uses'=>'MarhunController@index']);
Route::get('/marhun/{id}',['as'=>'marhun.show','uses'=>'MarhunController@show']);
Route::get('/deletemarhun/{id}',['as'=>'marhun.delete','uses'=>'MarhunController@delete']);
@@ -128,6 +128,7 @@ Route::group(['middleware' => ['permission:semakanmarhun','permission:kemaskinim
});
//Khazanah
Route::group(['middleware' => ['permission:pengesahanpembida'],'prefix'=>'pembida'], function () {
Route::get('/senaraipembida',['as'=>'pembida.senaraipembida','uses'=>'PembidaController@index']);