introduced "Failed" status for instructor
polite wording for member
This commit is contained in:
Adrian Dmitra 2023-08-14 11:23:07 -06:00
parent 9a4760aef5
commit 8315aa7b5d
3 changed files with 10 additions and 5 deletions

View File

@ -569,6 +569,7 @@ class TrainingSerializer(serializers.ModelSerializer):
'Waiting for payment', 'Waiting for payment',
'Withdrawn', 'Withdrawn',
'Rescheduled', 'Rescheduled',
'Failed',
'No-show', 'No-show',
'Attended', 'Attended',
'Confirmed' 'Confirmed'

View File

@ -669,7 +669,8 @@ export function ClassDetail(props) {
{clazz.instructor !== user.id && {clazz.instructor !== user.id &&
(userTraining ? (userTraining ?
<div> <div>
<p>Status: {userTraining.attendance_status}</p> { userTraining.attendance_status !== 'Failed' && <p>Status: {userTraining.attendance_status}</p>}
{ userTraining.attendance_status === 'Failed' && <p>Status: Attempted</p>}
<p> <p>
{userTraining.attendance_status === 'Withdrawn' ? {userTraining.attendance_status === 'Withdrawn' ?
<Button loading={loading} onClick={() => handleToggle('Waiting for payment')}> <Button loading={loading} onClick={() => handleToggle('Waiting for payment')}>
@ -751,4 +752,3 @@ export function ClassDetail(props) {
</Container> </Container>
); );
}; };

View File

@ -116,6 +116,10 @@ function AttendanceRow(props) {
Rescheduled Rescheduled
</Button> </Button>
<Button {...makeProps('Failed')}>
Failed
</Button>
<Button {...makeProps('No-show')}> <Button {...makeProps('No-show')}>
No-show No-show
</Button> </Button>