feat: migrate checkout and checkout_complete views to tablar
This commit is contained in:
@@ -1,120 +1,52 @@
|
|||||||
@extends('layouts.app')
|
@extends('tablar::page')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="container">
|
<div class="page-header d-print-none">
|
||||||
<div class="row">
|
<div class="container-xl">
|
||||||
<div class="col-md-10 col-md-offset-1">
|
<div class="row g-2 align-items-center">
|
||||||
<div class="panel panel-default">
|
<div class="col">
|
||||||
<div class="panel-heading">Checkout</div>
|
<h2 class="page-title">Checkout</h2>
|
||||||
|
</div>
|
||||||
<div class="panel-body">
|
|
||||||
<form id="checkout_form" required method="post" action="/checkout" enctype="multipart/form-data" class=form-horizontal>
|
|
||||||
{{ csrf_field() }}
|
|
||||||
<table align='center' class='table table-striped table-condensed table-hover table-bordered'>
|
|
||||||
@foreach($checkout_info_results as $checkout_info_result)
|
|
||||||
@php
|
|
||||||
$bidnum = $checkout_info_result->idbidders;
|
|
||||||
$totaldue = $checkout_info_result->total_cost;
|
|
||||||
@endphp
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">
|
|
||||||
<h2>
|
|
||||||
Bidder Number: {{ $checkout_info_result->bidder_assigned_number }}
|
|
||||||
</h2>
|
|
||||||
</th>
|
|
||||||
<th colspan="2">
|
|
||||||
<h2>
|
|
||||||
Total: ${{ $checkout_info_result->total_cost }}
|
|
||||||
</h2>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">
|
|
||||||
Name: {{ $checkout_info_result->bidder_fname }} {{ $checkout_info_result->bidder_lname }}
|
|
||||||
</th>
|
|
||||||
<th colspan="2">
|
|
||||||
Phone Number: {{ \App\Helpers\PhoneHelper::format($checkout_info_result->bidder_phone) }}
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
Address: {{ $checkout_info_result->bidder_addr }}
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
City: {{ $checkout_info_result->bidder_city }}
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
State: {{ $checkout_info_result->bidder_state }}
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Zip: {{ $checkout_info_result->bidder_zip }}
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
@endforeach
|
|
||||||
</table>
|
|
||||||
@if($checkout_list_results)
|
|
||||||
<table align='center' class='table table-striped table-condensed table-hover table-bordered'>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
Item Number:
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Winning Bid:
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
@foreach($checkout_list_results as $checkout_list_result)
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
{{ $checkout_list_result->item_assigned_num }}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
${{ $checkout_list_result->winning_cost }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
@endforeach
|
|
||||||
</table>
|
|
||||||
@else
|
|
||||||
<h3>
|
|
||||||
No Winning Bids
|
|
||||||
</h3>
|
|
||||||
@endif
|
|
||||||
<div class=form-group>
|
|
||||||
<label for=paymentmethod class="col-sm-3 col-sm-offset-1 control-label">
|
|
||||||
Payment Method:
|
|
||||||
</label>
|
|
||||||
<div class=col-sm-4>
|
|
||||||
<select name="checkout_payment_method" id="checkout_payment_method" required class=form-control>
|
|
||||||
<?php echo App\Helpers\PaymentMethodSelectList::PaymentShowMethods(); ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class=form-group>
|
|
||||||
<label for=check_number class="col-sm-3 col-sm-offset-1 control-label">
|
|
||||||
Check Number:
|
|
||||||
</label>
|
|
||||||
<div class=col-sm-4>
|
|
||||||
<input type="text" name="check_number" id="check_number" class=form-control />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class=form-group>
|
|
||||||
<label for=cc_transaction class="col-sm-3 col-sm-offset-1 control-label">
|
|
||||||
Credit Card Transaction Number:
|
|
||||||
</label>
|
|
||||||
<div class=col-sm-4>
|
|
||||||
<input type="text" name="cc_transaction" id="cc_transaction" class=form-control />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class=form-group>
|
|
||||||
<div class="col-sm-offset-5 col-sm-10">
|
|
||||||
<button type="submit" value="Submit" class="btn btn-primary">Checkout</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<input type="hidden" name="winnertotal" value={{ $totaldue }}>
|
|
||||||
<input type="hidden" name="checkoutbiddernum" value={{ $bidnum }}>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="page-body">
|
||||||
|
<div class="container-xl">
|
||||||
|
<div class="row row-cards">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<form method="POST" action="/checkout" class="row g-3">
|
||||||
|
{{ csrf_field() }}
|
||||||
|
<input type="hidden" name="bidder_num" value="{{ $bidder->idbidders }}">
|
||||||
|
|
||||||
|
<h3 class="mb-3">Winning Items for {{ $bidder->bidder_fname }} {{ $bidder->bidder_lname }}</h3>
|
||||||
|
<ul class="list-group mb-4">
|
||||||
|
@foreach($winnings as $item)
|
||||||
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||||
|
{{ $item->items->item_desc }}
|
||||||
|
<span class="badge bg-primary rounded-pill">${{ number_format($item->winning_cost, 2) }}</span>
|
||||||
|
</li>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="col-md-4">
|
||||||
|
<label for="payment_method" class="form-label">Payment Method</label>
|
||||||
|
<select name="payment_method" id="payment_method" class="form-select" required>
|
||||||
|
@foreach($paymentMethods as $pm)
|
||||||
|
<option value="{{ $pm->pm_id }}">{{ $pm->pm_name }}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
<button type="submit" class="btn btn-success">Complete Checkout</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,137 +1,30 @@
|
|||||||
@extends('layouts.app')
|
@extends('tablar::page')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="container">
|
<div class="page-header d-print-none">
|
||||||
<div class="row">
|
<div class="container-xl">
|
||||||
<div class="col-md-10 col-md-offset-1">
|
<div class="row g-2 align-items-center">
|
||||||
<div class="panel panel-default">
|
<div class="col">
|
||||||
<div class="panel-heading">
|
<h2 class="page-title">Checkout Complete</h2>
|
||||||
Checkout Complete
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="panel-body">
|
|
||||||
<table align='center' class='table'>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
<h4>
|
|
||||||
North Hackathon
|
|
||||||
<br>
|
|
||||||
Car Show Silent Auction
|
|
||||||
<br>
|
|
||||||
250 Stephenson Hwy
|
|
||||||
<br>
|
|
||||||
Troy, MI 48083
|
|
||||||
</h4>
|
|
||||||
</th>
|
|
||||||
<th align='right'>
|
|
||||||
<div class="btn-group">
|
|
||||||
<a class="btn btn-primary" target=_blank href="{{ route('receiptpdf', ['checkout_id' => $checkout_result]) }}" role="button">
|
|
||||||
Print Receipt
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-success" href="{{ route('download_receipt', ['checkout_id' => $checkout_result]) }}" role="button">
|
|
||||||
Save Receipt PDF
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<table align='center' class='table table-striped table-condensed table-hover table-bordered'>
|
|
||||||
@foreach($checkout_info_results as $checkout_info_result)
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">
|
|
||||||
<h4>
|
|
||||||
Bidder Number: {{ $checkout_info_result->bidder_assigned_number }}
|
|
||||||
</h4>
|
|
||||||
</th>
|
|
||||||
<th colspan="2">
|
|
||||||
<h4>
|
|
||||||
Total: ${{ $checkout_info_result->total_cost }}
|
|
||||||
</h4>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">
|
|
||||||
Name: {{ $checkout_info_result->bidder_fname }} {{ $checkout_info_result->bidder_lname }}
|
|
||||||
</th>
|
|
||||||
<th colspan="2">
|
|
||||||
Phone Number: {{ \App\Helpers\PhoneHelper::format($checkout_info_result->bidder_phone) }}
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
Address: {{ $checkout_info_result->bidder_addr }}
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
City: {{ $checkout_info_result->bidder_city }}
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
State: {{ $checkout_info_result->bidder_state }}
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Zip: {{ $checkout_info_result->bidder_zip }}
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
@endforeach
|
|
||||||
</table>
|
|
||||||
@if($checkout_list_results)
|
|
||||||
<table align='center' class='table table-striped table-condensed table-hover table-bordered'>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
Item Number:
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Item Description:
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Winning Bid:
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
@foreach($checkout_list_results as $checkout_list_result)
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
{{ $checkout_list_result->item_assigned_num }}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{{ $checkout_list_result->item_desc }}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
${{ $checkout_list_result->winning_cost }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
@endforeach
|
|
||||||
</table>
|
|
||||||
@else
|
|
||||||
<h3>
|
|
||||||
No Winning Bids
|
|
||||||
</h3>
|
|
||||||
@endif
|
|
||||||
<table align='center' class='table table-striped table-condensed table-bordered'>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
<h4>
|
|
||||||
PAID
|
|
||||||
</h4>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
@if($payment_method==1)
|
|
||||||
<h4>
|
|
||||||
CASH
|
|
||||||
</h4>
|
|
||||||
@elseif($payment_method==2)
|
|
||||||
<h4>
|
|
||||||
CHECK Number {{ $check_number }}
|
|
||||||
</h4>
|
|
||||||
@else
|
|
||||||
<h4>
|
|
||||||
CREDIT {{ $cc_transaction }}
|
|
||||||
</h4>
|
|
||||||
@endif
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="page-body">
|
||||||
|
<div class="container-xl">
|
||||||
|
<div class="row row-cards">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body text-center">
|
||||||
|
<h2 class="card-title">Success!</h2>
|
||||||
|
<p class="text-muted">The checkout has been successfully processed.</p>
|
||||||
|
<a href="{{ route('receiptpdf', ['checkout_id' => $checkout_result]) }}" class="btn btn-primary" target="_blank">Print Receipt</a>
|
||||||
|
<a href="{{ route('download_receipt', ['checkout_id' => $checkout_result]) }}" class="btn btn-success">Save PDF Receipt</a>
|
||||||
|
<a href="/home" class="btn btn-secondary">Back to Dashboard</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
Reference in New Issue
Block a user