changed form to button only and updated web routes
This commit is contained in:
@@ -216,13 +216,7 @@ class SupplyChainController extends Controller
|
||||
/**
|
||||
* Display the new bid on a supply chain contract page
|
||||
*/
|
||||
public function displaySupplyChainContractBid(Request $request) {
|
||||
$this->validate($request, [
|
||||
'contract_id' => 'required',
|
||||
]);
|
||||
|
||||
$contractId = $request->contract_id;
|
||||
|
||||
public function displaySupplyChainContractBid($contractId) {
|
||||
return view('supplychain.forms.enterbid')->with('contractId', $contractId);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,50 +21,7 @@
|
||||
</div>
|
||||
<br>
|
||||
@if(count($openContracts))
|
||||
@foreach($openContracts as $contract)
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="row">
|
||||
<div class="col-sm" align="left">
|
||||
{{ $contract['title'] }}
|
||||
</div>
|
||||
<div class="col-sm" align="right">
|
||||
{!! Form::open(['action' => 'Contracts\SupplyChainController@displaySupplyChainContractBid', 'method' => 'POST']) !!}
|
||||
{{ Form::hidden('contract_id', $contract['contract_id'], ['class' => 'form-control']) }}
|
||||
{{ Form::submit('Bid', ['class' => 'btn btn-primary']) }}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="container">
|
||||
Delivery Date: {{ $contract['delivery_by'] }}<br>
|
||||
End Date: {{ $contract['end_date'] }}<br>
|
||||
</div>
|
||||
<span class="border-dark">
|
||||
<div class="container">
|
||||
{!! $contract['body'] !!}
|
||||
</div>
|
||||
</span>
|
||||
<hr>
|
||||
<!-- If there is more than one bid display the lowest bid, and the number of bids -->
|
||||
@if($contract['bid_count'] > 0)
|
||||
<span class="border-dark">
|
||||
<table class="table table-striped">
|
||||
{{ $contract['lowest_bid']['name'] }}<br>
|
||||
{{ $contract['lowest_bid']['amount'] }}<br>
|
||||
</table>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@include('supplychain.includes.opencontracts')
|
||||
@else
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
|
||||
@@ -9,10 +9,7 @@
|
||||
{{ $contract['title'] }}
|
||||
</div>
|
||||
<div class="col-sm" align="right">
|
||||
{!! Form::open(['action' => 'Contracts\SupplyChainController@displaySupplyChainContractBid', 'method' => 'POST']) !!}
|
||||
{{ Form::hidden('contract_id', $contract['contract_id'], ['class' => 'form-control']) }}
|
||||
{{ Form::submit('Bid', ['class' => 'btn btn-primary']) }}
|
||||
{!! Form::close() !!}
|
||||
<button type="button" class="btn btn-primary"><a href="/supplychain/display/newbid/" . {{ $contract['contract_id'] }}></a></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -185,7 +185,7 @@ Route::group(['middleware' => ['auth']], function(){
|
||||
Route::get('/supplychain/contracts/end', 'Contracts\SupplyChainController@displayEndSupplyChainContract');
|
||||
Route::post('/supplychain/contracts/end', 'Contracts\SupplyChainController@storeEndSupplyChainContract');
|
||||
Route::get('/supplychain/display/bids', 'Contracts\SupplyChainController@displaySupplyChainBids');
|
||||
Route::post('/supplychain/display/newbid', 'Contracts\SupplyChainController@displaySupplyChainContractBid');
|
||||
Route::get('/supplychain/display/newbid/{contractId}', 'Contracts\SupplyChainController@displaySupplyChainContractBid');
|
||||
Route::post('/supplychain/display/newbid', 'Contracts\SupplyChainController@storeSupplyChainContractBid');
|
||||
Route::post('/supplychain/delete/bid', 'Contracts\SupplyChainController@deleteSupplyChainContractBid');
|
||||
Route::get('/supplychain/modify/bid', 'Contracts\SupplyChainController@displayModifySupplyChainContractBid');
|
||||
|
||||
Reference in New Issue
Block a user