diff --git a/webclient/src/Home.js b/webclient/src/Home.js index d544a84..6ee0e80 100644 --- a/webclient/src/Home.js +++ b/webclient/src/Home.js @@ -18,6 +18,8 @@ function MemberInfo(props) { const lastTrain = user.training?.sort((a, b) => a.session.datetime < b.session.datetime ? 1 : -1).slice(0,3); const lastCard = user.cards?.sort((a, b) => a.last_seen < b.last_seen)[0]; + const unpaidTraining = user.training?.filter(x => x.attendance_status === 'Waiting for payment'); + return (
@@ -55,7 +57,7 @@ function MemberInfo(props) { - {!member.photo_medium && + {!lastTrans.length && Welcome, new member!

@@ -84,6 +86,14 @@ function MemberInfo(props) { }

Latest Training
+ + {unpaidTraining.map(x => + + Please pay your course fee! +

Pay ${x.session.cost} for {x.session.course_data.name} to avoid losing your spot.

+
+ )} + {lastTrain.length ? @@ -158,7 +168,7 @@ function MemberInfo(props) { - {member.photo_medium &&

+ {!!lastTrans.length &&

View application forms