Commit bb9d5ad6 authored by Viacheslav Pavlov's avatar Viacheslav Pavlov Committed by Maksym Tishchenko
Browse files

Fix: Adding to Cart

parent 6a39f49d
......@@ -132,15 +132,17 @@ const AccessionTable = ({ accessions, loadData, onSelectedModified, noRedirect }
<td>{ a.sampStat && t(`accession.sampleStatus.${ a.sampStat }`) }</td>
{ shoppingCartEnabled &&
<td>
<button
type="button"
name={ `button-add-${ a.uuid }-${ i }` }
data-uuid={ a.uuid }
onClick={ a.inCart ? removeFromCart : addToCart }
className="btn btn-primary"
>
{ a.inCart ? t('cart.removeFromCart') : t('cart.addToCart') }
</button>
{ a.canAdd &&
<button
type="button"
name={ `button-add-${ a.uuid }-${ i }` }
data-uuid={ a.uuid }
onClick={ a.inCart ? removeFromCart : addToCart }
className="btn btn-primary"
>
{ a.inCart ? t('cart.removeFromCart') : t('cart.addToCart') }
</button>
}
</td>
}
</tr>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment