Merge branch 'atie' into 'main'

update home online jurulelong, add tab pc, dan account sah sag cdm

See merge request online-sistem1/lelong!417
This commit is contained in:
Nur Izzati Zulkifli
2023-03-19 04:55:06 +00:00
6 changed files with 150 additions and 49 deletions
+19 -1
View File
@@ -407,8 +407,26 @@ class AccountController extends Controller
{ {
$getresit[$index1]['resit64'] = 'data:image/' . $resit['file_type'] . ';base64' . base64_encode($resit['filename']); $getresit[$index1]['resit64'] = 'data:image/' . $resit['file_type'] . ';base64' . base64_encode($resit['filename']);
} }
if($saggroupbyid['status_payment_opt'] = '3'){
$fileresit = FileResit::where('lelong_id', $lelong_id)
->where('user_id', $user_id)
->where('kodcaw', $caw_code)
// ->where('photo_type', '=', '2')
->get();
// dd($fileresit);
foreach ($fileresit as $index => $itemresit) {
// dd($itemresit);
if (isset($itemresit)) {
$itemresit->fileresit_filename = true;
$itemresit->fileresit_id = $itemresit->id;
}
$fileresit[$index]['itemresit'] = $itemresit->fileresit_id;
}
}
return view('account.sahsagonline', compact('senaraisag', 'lelong_id', 'user_id', 'total_payment', 'caw_code', 'userdetails', 'getresit')); return view('account.sahsagonline', compact('senaraisag', 'lelong_id', 'user_id', 'total_payment', 'caw_code', 'userdetails', 'getresit', 'fileresit'));
} }
public function listpengesahanakaun($lelong_id, $kodcaw) public function listpengesahanakaun($lelong_id, $kodcaw)
+12 -2
View File
@@ -24,6 +24,9 @@ class PaymentController extends Controller
public function SenaraiLelongBayar(Request $request){ public function SenaraiLelongBayar(Request $request){
$arrayinfo = []; $arrayinfo = [];
$arraysms = [];
$arraysls = [];
$tarikh_semasa = date('Y-m-d', strtotime(now()));
$user = Auth::user(); $user = Auth::user();
@@ -44,13 +47,20 @@ class PaymentController extends Controller
->where('cawangan.caw_code',$user->kodcaw) ->where('cawangan.caw_code',$user->kodcaw)
->get() ->get()
->toArray(); ->toArray();
array_push($arrayinfo,['info'=>$info, 'detailsinfo'=>$detailsinfo]);
if($info['tarikh_lelong'] == $tarikh_semasa)
{
array_push($arraysms,['info'=>$info, 'detailsinfo'=>$detailsinfo]);
} else {
array_push($arraysls,['info'=>$info, 'detailsinfo'=>$detailsinfo]);
}
// array_push($arrayinfo,['info'=>$info, 'detailsinfo'=>$detailsinfo]);
// dd($detailsinfo); // dd($detailsinfo);
} }
$datacaw = Cawangan::where('caw_code','=', $user->kodcaw) $datacaw = Cawangan::where('caw_code','=', $user->kodcaw)
->get(); ->get();
return view('pembayaran.senarailelongbayaran',compact('datacaw','lelong', 'arrayinfo')); return view('pembayaran.senarailelongbayaran',compact('arraysms','arraysls','datacaw','lelong', 'arrayinfo'));
} }
+17 -1
View File
@@ -101,7 +101,23 @@
<td></td> <td></td>
</tr> </tr>
</table> </table>
<input type="hidden" name="photo_type" value="1">
@foreach ($fileresit as $item)
<div class="row justify-content-center">
<div class="col-12">
<div class="card card-overall-marhun">
<div class="card-header">Bukti Pembayaran(Resit Transfer/Kaunter Bank/CDM)</div>
<div class="card-body pl-0 pr-0" style="align-self: center; justify-content: center;">
{{-- <button type="button" data-toggle="modal" onclick="kesulurahanMarhunData(this)" data-lelongid="{{$lelong_id}}" data-lelongbidid="" data-lelongbid_status_semak="" data-fileid="{{ $item->fileresit_id }}" data-target="#modaloverallphoto"> --}}
<img src="{{ route('account.showphotoresit', ['user_id' => $user_id, 'fileresit_id' => $item->fileresit_id]) }}" width="100%">
{{-- </button> --}}
</div>
</div>
</div>
</div>
@endforeach
<div style="margin-top:2%; align:center"> <div style="margin-top:2%; align:center">
{{-- <a href="{{ route('account.listbayaranonline', [$lelong_id,$caw_code]) }}" class="btn btn-primary">Kembali</a> --}} {{-- <a href="{{ route('account.listbayaranonline', [$lelong_id,$caw_code]) }}" class="btn btn-primary">Kembali</a> --}}
{{-- @foreach($senaraisag as $senarai) --}} {{-- @foreach($senaraisag as $senarai) --}}
+1 -1
View File
@@ -277,7 +277,7 @@
@endif @endif
@elseif($details['status_online'] == '1') @elseif($details['status_online'] == '1')
<a class="startlelongcawangan" href="{{ route('lelong.stopcawangan',[$lel['info']['lelong_id'], 'cawid'=>$details['caw_id']]) }}" data-toggle="tooltip" data-placement="top" title="Tamat Lelong Cawangan"><button class="badge badge-pill badge-danger" id="btnstart">Online</button></a><br> <a class="startlelongcawangan" href="{{ route('lelong.stopcawangan',[$lel['info']['lelong_id'], 'cawid'=>$details['caw_id']]) }}" data-toggle="tooltip" data-placement="top" title="Tamat Lelong Cawangan"><button class="badge badge-pill badge-success" id="btnstart">Online</button></a><br>
@endif @endif
@endforeach @endforeach
@@ -22,7 +22,22 @@
<p>{{ $message }}</p> <p>{{ $message }}</p>
</div> </div>
@endif @endif
<table class="table table-bordered text-center" id="senarailelongonline" style="width:100%"> <ul class="nav mb-2 nav-tabs" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="sedang-lelong-tab" data-toggle="tab" href="#sedang-lelong" role="tab" aria-controls="sedang-lelong" aria-selected="false">
Lelongan Semasa
</a>
</li>
<li class="nav-item">
<a class="nav-link" id="selesai-lelong-tab" data-toggle="tab" href="#selesai-lelong" role="tab" aria-controls="selesai-lelong" aria-selected="false">
Lelongan Selesai
</a>
</li>
</ul>
<div class="tab-content" style="overflow-x: auto;" id="myTabContent">
<div class="tab-pane fade show active" id="sedang-lelong" role="tabpanel" aria-labelledby="sedang-lelong-tab">
<div style="overflow-x: auto;">
<table class="table table-bordered text-center" id="tablestatussedanglelong" style="width:100%">
<thead class="bg-primary text-white"> <thead class="bg-primary text-white">
<tr> <tr>
<th>No</th> <th>No</th>
@@ -35,7 +50,51 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@foreach($arrayinfo as $data) @forelse($arraysms as $data)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{ $data['info']['lelong_id'] }}</td>
{{-- <td align = 'left'>
@foreach($data['detailsinfo'] as $details)
<span class="m-2">{{$details['caw_name']}}</span><br>
@endforeach
</td> --}}
<td>{{ $data['info']['fasa'] }}</td>
<td>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $data['info']['tarikh_lelong'] );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>
@if($data['info']['sts_lelong'] == 3)
<button class="btn btn-success btn-sm" disabled>LELONG SELESAI</button>
@endif
</td>
<td><a class="btn m-1 btn-primary" href=" {{ route('pembayaran.kaunterpembayaran', ['lelong_id'=>$data['info']['lelong_id']]) }} " data-toggle="tooltip" data-placement="top" title="Butiran Bidaan"><i class="far fa-edit"></i></a></td>
</tr>
@empty
<td colspan="6">No Data Available</td>
@endforelse
</tbody>
</table>
</div>
</div>
<div class="tab-pane fade" id="selesai-lelong" role="tabpanel" aria-labelledby="selesai-lelong-tab">
<div style="overflow-x: auto;">
<table class="table table-bordered text-center" id="tablestatusselesailelong" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th>No</th>
<th>Batch Lelong</th>
{{-- <th>Cawangan</th> --}}
<th>Fasa</th>
<th>Tarikh Lelong</th>
<th>Status Lelong</th>
<th class="text-center">Tindakan</th>
</tr>
</thead>
<tbody>
@foreach($arraysls as $data)
<tr> <tr>
<td>{{$loop->iteration}}</td> <td>{{$loop->iteration}}</td>
<td>{{ $data['info']['lelong_id'] }}</td> <td>{{ $data['info']['lelong_id'] }}</td>
@@ -69,47 +128,45 @@
$(function () { $(function () {
$('[data-toggle="tooltip"]').tooltip() $('[data-toggle="tooltip"]').tooltip()
}) })
var tablesenarailelongonline = $('#senarailelongonline').DataTable({ var tablestatussedanglelong = $('#tablestatussedanglelong').DataTable({
"columnDefs": [ "columnDefs": [
{ {
"targets": 0, "targets": 0,
"orderable": false "orderable": false
}, },
{ {
"targets": 3, "targets": 7,
"orderable": false "orderable": false
} }
], ],
order: [[1, 'asc']], order: [[1, 'asc']],
"info": false, // "ordering": false,
"lengthChange": false, "info": false,
"pageLength": 15, "lengthChange": false,
dom: 'Bfrtip', "pageLength": 15,
// buttons: [ dom: 'Bfrtip',
// {
// className: 'btn btn-outline-success pl-4 pr-4 btn-sm addcaw', });
// text: '<i class="fas fa-plus" id="test"></i>',
// titleAttr: 'Tambah Cawangan', var tablestatusselesailelong = $('#tablestatusselesailelong').DataTable({
// action: function ( e, dt, node, config ) { "columnDefs": [
// // alert( 'Button activated' ); {
// // console.log('hye'); "targets": 0,
"orderable": false
// $('#myModal').modal("show"); },
// $('#myModal').on('shown.bs.modal', function () { {
// $('#rolename').trigger('focus') "targets": 7,
// }) "orderable": false
// } }
// }, ],
// { order: [[1, 'asc']],
// className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export', // "ordering": false,
// titleAttr: 'Export to CSV', "info": false,
// text: '<i class="fas fa-download"></i>', "lengthChange": false,
// action: function ( e, dt, node, config ) { "pageLength": 15,
// $("#exportform").submit(); dom: 'Bfrtip',
// }
// } });
// ]
});
// $('.addcaw').tooltip(); // $('.addcaw').tooltip();
// $('.export').tooltip(); // $('.export').tooltip();
@@ -20,7 +20,7 @@
<ul class="nav mb-2 nav-tabs" id="myTab" role="tablist"> <ul class="nav mb-2 nav-tabs" id="myTab" role="tablist">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link active" id="belum-lelong-tab" data-toggle="tab" href="#belum-lelong" role="tab" aria-controls="belum-lelong" aria-selected="false"> <a class="nav-link active" id="belum-lelong-tab" data-toggle="tab" href="#belum-lelong" role="tab" aria-controls="belum-lelong" aria-selected="false">
Lelongan Semasa Belum Lelong
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">