Created
June 13, 2018 08:32
-
-
Save abel-masila/dc0ad3d72ff2856a03dd01c622ea15b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div className="card clearfix"> | |
{filteredInsurers.length > 0 ? ( | |
<DataTable | |
tableId="quotes-table" | |
columnTitles={['Provider', 'Premium ', 'Rate', '']} | |
> | |
{filteredInsurers.map((insurer, index) => { | |
return insurer.insurer !== null ? ( | |
<tr key={index}> | |
<td> | |
<img | |
src={insurer.insurer_logo} | |
alt={insurer.insurer_name} | |
className="img-responsive insurer-logo" | |
/> | |
<span className="insurer-title"> | |
{insurer.insurer_name} | |
</span> | |
</td> | |
<td> | |
<h4> | |
{translations.currency} | |
{numeral( | |
revisedPremiumCalculation( | |
insurer, | |
selected_goods, | |
conveyance, | |
packaging, | |
transshipment, | |
warehousing, | |
currency_rate.rate, | |
other_rates, | |
icc_class | |
).premium | |
).format('0,0') || 0} | |
</h4> | |
</td> | |
<td> | |
<h4> | |
{numeral( | |
getInsurerValue( | |
insurer, | |
conveyance, | |
packaging, | |
icc_class | |
) | |
).value() + '%'} | |
</h4> | |
</td> | |
<td> | |
<button | |
className="btn btn-sm btn-warning" | |
onClick={() => { | |
this.setSelectedInsurer(insurer); | |
}} | |
> | |
<span className="glyphicon glyphicon-credit-card" /> | |
BUY | |
</button> | |
<button | |
className="btn btn-primary btn-sm" | |
data-toggle="modal" | |
data-target=".quote-email-modal" | |
onClick={() => { | |
this.handleEmailQuote(insurer); | |
}} | |
> | |
<span className="glyphicon glyphicon-envelope" /> | |
Email Quote | |
</button> | |
</td> | |
</tr> | |
) : null; | |
})} | |
</DataTable> | |
) : ( | |
<BlankState | |
data={quotes} | |
dataName="Quotes" | |
isDataLoading={quotes_loading} | |
/> | |
)} | |
<Modal | |
className="quote-email-modal" | |
title={'Email Quote from ' + selected_insurer.insurer_name} | |
closable={true} | |
> | |
<EmailQuoteForm insurer={selected_insurer} premium={premium} /> | |
</Modal> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment