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
|
* Display the new bid on a supply chain contract page
|
||||||
*/
|
*/
|
||||||
public function displaySupplyChainContractBid(Request $request) {
|
public function displaySupplyChainContractBid($contractId) {
|
||||||
$this->validate($request, [
|
|
||||||
'contract_id' => 'required',
|
|
||||||
]);
|
|
||||||
|
|
||||||
$contractId = $request->contract_id;
|
|
||||||
|
|
||||||
return view('supplychain.forms.enterbid')->with('contractId', $contractId);
|
return view('supplychain.forms.enterbid')->with('contractId', $contractId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,50 +21,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
@if(count($openContracts))
|
@if(count($openContracts))
|
||||||
@foreach($openContracts as $contract)
|
@include('supplychain.includes.opencontracts')
|
||||||
<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
|
|
||||||
@else
|
@else
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
|
|||||||
@@ -9,10 +9,7 @@
|
|||||||
{{ $contract['title'] }}
|
{{ $contract['title'] }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm" align="right">
|
<div class="col-sm" align="right">
|
||||||
{!! Form::open(['action' => 'Contracts\SupplyChainController@displaySupplyChainContractBid', 'method' => 'POST']) !!}
|
<button type="button" class="btn btn-primary"><a href="/supplychain/display/newbid/" . {{ $contract['contract_id'] }}></a></button>
|
||||||
{{ Form::hidden('contract_id', $contract['contract_id'], ['class' => 'form-control']) }}
|
|
||||||
{{ Form::submit('Bid', ['class' => 'btn btn-primary']) }}
|
|
||||||
{!! Form::close() !!}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ Route::group(['middleware' => ['auth']], function(){
|
|||||||
Route::get('/supplychain/contracts/end', 'Contracts\SupplyChainController@displayEndSupplyChainContract');
|
Route::get('/supplychain/contracts/end', 'Contracts\SupplyChainController@displayEndSupplyChainContract');
|
||||||
Route::post('/supplychain/contracts/end', 'Contracts\SupplyChainController@storeEndSupplyChainContract');
|
Route::post('/supplychain/contracts/end', 'Contracts\SupplyChainController@storeEndSupplyChainContract');
|
||||||
Route::get('/supplychain/display/bids', 'Contracts\SupplyChainController@displaySupplyChainBids');
|
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/display/newbid', 'Contracts\SupplyChainController@storeSupplyChainContractBid');
|
||||||
Route::post('/supplychain/delete/bid', 'Contracts\SupplyChainController@deleteSupplyChainContractBid');
|
Route::post('/supplychain/delete/bid', 'Contracts\SupplyChainController@deleteSupplyChainContractBid');
|
||||||
Route::get('/supplychain/modify/bid', 'Contracts\SupplyChainController@displayModifySupplyChainContractBid');
|
Route::get('/supplychain/modify/bid', 'Contracts\SupplyChainController@displayModifySupplyChainContractBid');
|
||||||
|
|||||||
Reference in New Issue
Block a user