supply chain stuff

This commit is contained in:
2020-07-20 06:46:54 -05:00
parent 2d2395a97d
commit 997d29c88a
3 changed files with 31 additions and 3 deletions

View File

@@ -298,9 +298,18 @@ class SupplyChainController extends Controller
'contract_id' => 'required',
]);
//Get the contract id
$contractId = $request->contract_id;
//Get the bid id to be modified later
$bid = SupplyChainBid::where([
'contract_id' => $contractId,
'entity_id' => auth()->user()->getId(),
])->get();
return view('supplychain.forms.modifybid')->with('contractId', $contractId);
$bidId = $bid->id;
return view('supplychain.forms.modifybid')->with('contractId', $contractId)
->with('bidId', $bidId);
}
/**

View File

@@ -52,7 +52,7 @@
<div class="card-body">
<table class="table table-striped">
<tbody>
<tr class="table-success">
<tr class="table-primary">
<td>Moon Available</td>
</tr>
<tr class="table-danger">

View File

@@ -1,6 +1,25 @@
@extends('layouts.user.dashb4')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">
Modify Bid
</div>
<div class="card-body">
{!! Form::open(['action' => 'Contracts\SupplyChainController@storeModifyBid', 'method' => 'POST']) !!}
<div class="form-group">
{{ Form::hidden('bid_id', $bidId) }}
{{ Form::hidden('contract_id', $contractId) }}
{{ Form::label('bid_amount', 'Bid Amount') }}
{{ Form::text('bid_amount', '', ['class' => 'form-control']) }}
</div>
{{ Form::submit('Submit', ['class' => 'btn btn-primary']) }}
{!! Form::close() !!}
</div>
</div>
</div>
</div>
</div>
@endsection