Files
lelong/resources/views/account/sahsagonline.blade.php
T
2022-04-10 08:53:23 +08:00

137 lines
5.5 KiB
PHP

@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 action="{{ route('account.sahbayaronline') }}" method="POST" id="formsahbayaronline">
@csrf
<input type="hidden" name="lelong_id" value="{{ $lelong_id }}" />
<input type="hidden" name="user_id" value="{{ $user_id }}" />
<table class="table table-striped table-xl text-center" id="tablekaunter" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th>No</th>
<th>No Rujukan</th>
<th>Tarikh Lelong</th>
<th>Harga Asas (RM)</th>
<th>Harga Bida (RM)</th>
<th>Masa Bidaan</th>
<th>Remark</th>
<th class="text-center">Status</th>
</tr>
</thead>
<tbody>
@foreach($senaraisag as $sag)
<tr>
<td> {{ $loop->iteration }} </td>
<td>{{ $sag['norujukan'] }}</td>
<td>{{ $sag['t_lelong'] }}</td>
<td>{{ $sag['hargaasas'] }}</td>
<td>{{ $sag['hargabida'] }}</td>
<td>{{ $sag['masa_bidaan'] }}</td>
<td>
<button class="btn btn-outline-success btn-sm" disabled><b>{{ $sag['remark'] }}</b></button>
</td>
<td>
<span class="btn btn-success btn-sm hovernone-success" disabled>PAID</span>
</td>
</tr>
@endforeach
</tbody>
<tr>
<td colspan="2"><b> Jumlah Bayaran</b></td>
<td colspan="2"></td>
<td colspan="1"><b>RM<input type="text" id="total" value="{{ $total_payment }}" style="border: none;" readonly></b></td>
<td colspan="3"></td>
</tr>
</table>
<div class="modal-footer" style="margin-top:2%;">
<a href="{{ route('account.senarailelongan') }}" class="btn btn-primary">Kembali</a>
<!-- <a href="{{ route('account.sahbayaronline', ['lelong_id'=>$lelong_id, 'user_id'=>$user_id]) }}" class="btn btn-warning">Sahkan</a> -->
<button type="button" class="btn btn-warning" onclick="confirm()" >Sahkan</button>
</div>
</form>
</div>
</div>
</div>
<script>
function confirm() {
$.confirm({
title: 'Confirmation',
content: 'Anda pasti?',
type: 'orange',
typeAnimated: true,
buttons: {
Sahkan: {
btnClass: 'btn-warning',
action: function () {
$("#formsahbayaronline").submit();
}
},
Batal: {
btnClass: 'btn-default',
action: function () {}
}
}
});
}
var tablekaunter = $('#tablekaunter').DataTable({
"columnDefs": [
{
"targets": 0,
"orderable": false
},
{
"targets": 6,
"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