Skip to content

Commit

Permalink
feat: display finished workshops and presentations
Browse files Browse the repository at this point in the history
  • Loading branch information
AlirezaYousefpourM committed Dec 6, 2023
1 parent 13fcab0 commit 43d9ebf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions frontend/src/components/item-card/item-card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const ItemCard = ({
startDate,
endDate,
presenterName,
finished,
level,
cost = 50000,
purchaseState = 0, // 0 -> not purchased, 1 -> in cart, 2 -> purchased
Expand Down Expand Up @@ -169,6 +170,12 @@ const ItemCard = ({
{levelComponentMapping[level]}
{!hasBought && <Cost cost={cost} />}
{!hasBought && shouldShowFullCapacity && <FullCapacityChip />}
{finished && <div style={{
backgroundColor: "grey",
borderRadius: "5px",
display: "inline-block",
padding: "2px 5px 2px 5px"
}}>Finished!</div>}
</CardContent>
<CardActions
sx={{
Expand Down Expand Up @@ -208,6 +215,7 @@ ItemCard.propTypes = {
addToCalendarLink: PropTypes.string,
onClickAddToCart: PropTypes.func,
remainingCapacity: PropTypes.number,
finished: PropTypes.bool,
};

export default ItemCard;

0 comments on commit 43d9ebf

Please sign in to comment.