senarai tangguh lelong
This commit is contained in:
@@ -46,12 +46,12 @@ class MarhunController extends Controller
|
||||
$user = Auth::user();
|
||||
|
||||
$caw = Cawangan::where('caw_code','=',$user->kodcaw)->first();
|
||||
$lelongbid = LelongBid::where('caw_id','=',$caw->id)->get();
|
||||
|
||||
$lelongid = LelongBid::select('lelong_id')->where('caw_id','=',$caw->id)->groupBy('lelong_id')->get();
|
||||
$lelong = Lelong::whereIn('id', $lelongid)->get();
|
||||
$lelongbid = LelongBid::where('lelong_id', '=', $lelong_id)
|
||||
->where('caw_id','=', $caw->id)
|
||||
->get();
|
||||
|
||||
return view('marhun.senaraimarhun',compact('lelongbid','lelong'));
|
||||
return view('marhun.senaraimarhun',compact('lelongbid','lelong_id'));
|
||||
}
|
||||
|
||||
public function kemaskini(Request $request)
|
||||
@@ -414,6 +414,34 @@ class MarhunController extends Controller
|
||||
return redirect()->route('pengesahan.perubahanmutumarhun')
|
||||
->with('success','Pengesahan Padam Marhun Telah Berjaya');
|
||||
}
|
||||
|
||||
public function senarailelong()
|
||||
{
|
||||
$lelong = Lelong::where('sts_lelong', 0)
|
||||
->get();
|
||||
|
||||
return view('pengesahan.senarailelong',compact('lelong'));
|
||||
}
|
||||
|
||||
public function senaraitangguhlelong($id)
|
||||
{
|
||||
$tangguhlelong = TangguhLelong::join('lelongbid', 'tangguhlelong.lelongbid_id', '=', 'lelongbid.id')
|
||||
->where('tangguhlelong.lelong_id', $id)
|
||||
->get();
|
||||
|
||||
return view('pengesahan.senaraitangguhlelong',compact('tangguhlelong','id'));
|
||||
|
||||
}
|
||||
|
||||
public function lelbidmarhun($id)
|
||||
{
|
||||
$marhuns = LelongBidMarhun::join('tangguhlelong', 'lelongbidmarhun.lelongbid_id', '=', 'tangguhlelong.lelongbid_id')
|
||||
->where('tangguhlelong.lelong_id', $id)
|
||||
->get();
|
||||
|
||||
return view('pengesahan.lelbidmarhun',compact('marhuns'));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -120,8 +120,8 @@
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="list-unstyled collapse {{ (request()->is('pengesahan/*')) ? 'show' : '' }}" id="pengesahanSubmenu" >
|
||||
<li class="{{ (request()->is('pengesahan/senaraitangguhlelong/*') || request()->is('pengesahan/senaraitangguhlelong') ) ? 'active' : '' }}">
|
||||
<a href="{{url('pengesahan/senaraitangguhlelong')}}">Senarai Tangguh Lelong</a>
|
||||
<li class="{{ (request()->is('pengesahan/senarailelong/*') || request()->is('pengesahan/senarailelong') ) ? 'active' : '' }}">
|
||||
<a href="{{url('pengesahan/senarailelong')}}">Senarai Tangguh Lelong</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</table>
|
||||
</form>
|
||||
<div class="modal-footer" style="margin-top:2%;">
|
||||
<a href="{{ route('marhun.senarailelongmarhun') }}" style="width:7%;" class="btn btn-primary">Kembali</a>
|
||||
<a href="{{ route('marhun.senaraimarhun', $lelongbid) }}" style="width:7%;" class="btn btn-primary">Kembali</a>
|
||||
<a href="{{ route('marhun.semak', $lelongbid) }}" style="width:7%;" class="btn btn-success">Semak</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
@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
|
||||
<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%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Marhun</th>
|
||||
<th>Karat</th>
|
||||
<th>Berat</th>
|
||||
<th>Harga (RM)</th>
|
||||
<th>Nilai Marhun</th>
|
||||
<th>Harga Asas</th>
|
||||
<th>Nota</th>
|
||||
<th>Status</th>
|
||||
<th class="text-center">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($marhuns as $marhun)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $marhun->norujukan }}</td>
|
||||
<td>{{ $marhun->marhun }}</td>
|
||||
<td>{{ $marhun->karat }}</td>
|
||||
<td>{{ $marhun->berat }}</td>
|
||||
<td>{{ $marhun->harga }}</td>
|
||||
<td>{{ $marhun->n_marhun }}</td>
|
||||
<td>{{ $marhun->hargaasas }}</td>
|
||||
<td>{{ $marhun->nota }}</td>
|
||||
<td></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
//Enable tooltips everywhere
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
|
||||
var tablelelong = $('#tablelelong').DataTable( {
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 9,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 10,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
order: [[1, 'asc']],
|
||||
// "ordering": false,
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 15,
|
||||
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
|
||||
@@ -0,0 +1,104 @@
|
||||
@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
|
||||
<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%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th><input type="checkbox" aria-label="Checkbox for following text input" onclick="selectall(this)"></th>
|
||||
<th>Tarikh Lelong</th>
|
||||
<th>Harga Emas Asas</th>
|
||||
<th>JBG</th>
|
||||
<th>Caj Lelong</th>
|
||||
<th class="text-center">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($lelong as $lel)
|
||||
<tr>
|
||||
<td><input type="checkbox" aria-label="Checkbox for following text input" name="checkboxdata[]" value="{{ $lel->id }}"></td>
|
||||
<td>{{ $lel->tarikh_lelong }}</td>
|
||||
<td>{{ $lel->harga_emas_asas }}</td>
|
||||
<td>{{ $lel->jbg }}</td>
|
||||
<td>{{ $lel->cajlelong }}</td>
|
||||
<td>
|
||||
<a href="{{ route('pengesahan.senaraitangguhlelong',$lel->id) }}" data-toggle="tooltip" data-placement="top" title="Butiran" class="text-center" ><i class="far fa-edit"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
//Enable tooltips everywhere
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
|
||||
var tablelelong = $('#tablelelong').DataTable( {
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 5,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
order: [[1, 'asc']],
|
||||
// "ordering": false,
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 15,
|
||||
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
|
||||
@@ -0,0 +1,106 @@
|
||||
@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
|
||||
<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%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Kod Cawangan</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Tarikh Tangguh</th>
|
||||
<th class="text-center">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($tangguhlelong as $tangguhlel)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $tangguhlel->kodcaw }}</td>
|
||||
<td>{{ $tangguhlel->norujukan }}</td>
|
||||
<td>{{ $tangguhlel->tarikhtangguh }}</td>
|
||||
<td>
|
||||
<a href="{{ route('pengesahan.lelbidmarhun',$id) }}" data-toggle="tooltip" data-placement="top" title="Butiran" class="text-center" ><i class="far fa-edit"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="modal-footer" style="margin-top:2%;">
|
||||
<a href="{{ route('pengesahan.senarailelong') }}" class="btn btn-primary">Kembali</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
//Enable tooltips everywhere
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
|
||||
var tablelelong = $('#tablelelong').DataTable( {
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 4,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
order: [[1, 'asc']],
|
||||
// "ordering": false,
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 15,
|
||||
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
|
||||
+3
-1
@@ -152,7 +152,9 @@ Route::group(['middleware' => ['permission:pengesahan'],'prefix'=>'pengesahan'],
|
||||
Route::get('/mutumarhun/{pengesahan_id}/{norujukan}',['as'=>'pengesahan.mutumarhun','uses'=>'MarhunController@mutumarhun']);
|
||||
Route::post('/terimaperubahan',['as'=>'pengesahan.terimaperubahan','uses'=>'MarhunController@terimaperubahan']);
|
||||
Route::post('/pcdelete',['as'=>'pengesahan.pcdelete','uses'=>'MarhunController@pcdelete']);
|
||||
Route::post('/senaraitangguhlelong',['as'=>'pengesahan.senaraitangguhlelong','uses'=>'MarhunController@senaraitangguhlelong']);
|
||||
Route::get('/senarailelong',['as'=>'pengesahan.senarailelong','uses'=>'MarhunController@senarailelong']);
|
||||
Route::get('/senaraitangguhlelong/{id}',['as'=>'pengesahan.senaraitangguhlelong','uses'=>'MarhunController@senaraitangguhlelong']);
|
||||
Route::get('/lelbidmarhun/{id}',['as'=>'pengesahan.lelbidmarhun','uses'=>'MarhunController@lelbidmarhun']);
|
||||
});
|
||||
//Operasi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user