diff --git a/webclient/src/App.js b/webclient/src/App.js index 996b07a..5a57797 100644 --- a/webclient/src/App.js +++ b/webclient/src/App.js @@ -368,7 +368,7 @@ function Transactions(props) { return ( -
Protospace Transactions
+
Transactions
@@ -454,7 +454,69 @@ function TransactionDetail(props) { : ); -} +}; + +function Cards(props) { + const { user } = props; + + const cardStatus = (c) => c.active_status === 'card_active' ? 'Yes' : 'No'; + const card = user.cards[0]; + + return ( + +
Member Cards
+ + {user.cards.length ? + user.cards.length > 1 ? +
+ + + Number + Notes + Last Seen + Active + + + + + {user.cards.map((x, i) => + + {x.card_number} + {x.notes} + {x.last_seen_at} + {cardStatus(x)} + + )} + +
+ : + + + + Number: + {card.card_number} + + + Notes: + {card.notes} + + + Last Seen: + {card.last_seen_at} + + + Active: + {cardStatus(card)} + + +
+ : +

No cards yet! Ask a director for one after you are vetted.

+ } + +
+ ); +}; function PleaseLogin() { return ( @@ -538,6 +600,8 @@ function App() { /> @@ -568,24 +632,30 @@ function App() { - {user ? - - - - - - - - +
+ {user ? + + + + + + + + + + + + + + + + + : - + - - : - - - - } + } +
) diff --git a/webclient/src/light.css b/webclient/src/light.css index e69b0d6..ef5c5a5 100644 --- a/webclient/src/light.css +++ b/webclient/src/light.css @@ -25,3 +25,7 @@ body { #ps-menu .dropdown.icon { display: none; } + +.topPadding { + padding-top: 1rem; +}