Nag members to pay their course fees
This commit is contained in:
parent
ff267cc32c
commit
36014201c6
|
@ -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 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 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 (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Grid stackable>
|
<Grid stackable>
|
||||||
|
@ -55,7 +57,7 @@ function MemberInfo(props) {
|
||||||
</Grid.Column>
|
</Grid.Column>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
{!member.photo_medium && <Message>
|
{!lastTrans.length && <Message>
|
||||||
<Message.Header>Welcome, new member!</Message.Header>
|
<Message.Header>Welcome, new member!</Message.Header>
|
||||||
<p>
|
<p>
|
||||||
<a href={staticUrl + '/' + member.member_forms} target='_blank'>
|
<a href={staticUrl + '/' + member.member_forms} target='_blank'>
|
||||||
|
@ -84,6 +86,14 @@ function MemberInfo(props) {
|
||||||
</React.Fragment>}
|
</React.Fragment>}
|
||||||
|
|
||||||
<Header size='medium'>Latest Training</Header>
|
<Header size='medium'>Latest Training</Header>
|
||||||
|
|
||||||
|
{unpaidTraining.map(x =>
|
||||||
|
<Message warning>
|
||||||
|
<Message.Header>Please pay your course fee!</Message.Header>
|
||||||
|
<p>Pay ${x.session.cost} for <Link to={'/classes/'+x.session.id}>{x.session.course_data.name}</Link> to avoid losing your spot.</p>
|
||||||
|
</Message>
|
||||||
|
)}
|
||||||
|
|
||||||
<BasicTable>
|
<BasicTable>
|
||||||
<Table.Body>
|
<Table.Body>
|
||||||
{lastTrain.length ?
|
{lastTrain.length ?
|
||||||
|
@ -158,7 +168,7 @@ function MemberInfo(props) {
|
||||||
</Table.Body>
|
</Table.Body>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
|
|
||||||
{member.photo_medium && <p>
|
{!!lastTrans.length && <p>
|
||||||
<a href={staticUrl + '/' + member.member_forms} target='_blank'>
|
<a href={staticUrl + '/' + member.member_forms} target='_blank'>
|
||||||
View application forms
|
View application forms
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user