Add customer-facing check for winning items

This commit is contained in:
2026-04-24 15:56:29 -04:00
parent ef4ef144a6
commit b6db2f200b
8 changed files with 207 additions and 1 deletions
+5
View File
@@ -202,6 +202,11 @@
Checkout Bidder
</a>
</li>
<li>
<a href="/mywinnings">
Check My Winnings
</a>
</li>
</ul>
<!-- Right Side Of Navbar -->
<ul class="nav navbar-nav navbar-right">
+41
View File
@@ -0,0 +1,41 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">Check My Winnings</div>
<div class="panel-body">
@if (isset($error))
<div class="alert alert-danger">
{{ $error }}
</div>
@endif
<form class="form-horizontal" method="POST" action="/mywinnings">
{{ csrf_field() }}
<div class="form-group">
<label for="bidder_number" class="col-md-4 control-label">Bidder Number</label>
<div class="col-md-6">
<input id="bidder_number" type="text" class="form-control" name="bidder_number" value="{{ old('bidder_number') }}" required autofocus>
</div>
</div>
<div class="form-group">
<div class="col-md-8 col-md-offset-4">
<button type="submit" class="btn btn-primary">
Check Winnings
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
@endsection
@@ -0,0 +1,49 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div class="panel-heading">Winnings for Bidder #{{ $bidder->bidder_assigned_number }} - {{ $bidder->bidder_fname }} {{ $bidder->bidder_lname }}</div>
<div class="panel-body">
@if($winnings->count() > 0)
<table class="table table-striped">
<thead>
<tr>
<th>Item #</th>
<th>Description</th>
<th>Amount</th>
</tr>
</thead>
<tbody>
@foreach($winnings as $winning)
<tr>
<td>{{ $winning->items->item_assigned_num }}</td>
<td>{{ $winning->items->item_desc }}</td>
<td>${{ number_format($winning->winning_cost, 2) }}</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th colspan="2" class="text-right">Total:</th>
<th>${{ number_format($total_cost, 2) }}</th>
</tr>
</tfoot>
</table>
@else
<p>No winning bids found for this bidder number.</p>
@endif
<hr>
<div class="text-center">
<a href="/mywinnings" class="btn btn-default">Back to Search</a>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection