Merge pull request #118 from Dmitra/feat-class-failed
Feat class failed
This commit is contained in:
commit
31daa56df0
|
@ -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'
|
||||||
|
@ -1076,4 +1077,4 @@ class MyLoginSerializer(LoginSerializer):
|
||||||
if not user:
|
if not user:
|
||||||
raise ValidationError(dict(password='Incorrect password. Check caps lock.'))
|
raise ValidationError(dict(password='Incorrect password. Check caps lock.'))
|
||||||
|
|
||||||
return user
|
return user
|
|
@ -668,7 +668,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')}>
|
||||||
|
@ -749,5 +750,4 @@ export function ClassDetail(props) {
|
||||||
}
|
}
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,7 +10,7 @@ export const Footer = () => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!footerRef.current) return;
|
if (!footerRef.current) return;
|
||||||
if (footerRef.current.clientWidth < 650) return
|
if (footerRef.current.clientWidth < 650) return
|
||||||
scene({ ref: footerRef });
|
if (window.location.hostname === 'my.protospace.ca') scene({ ref: footerRef });
|
||||||
}, [footerRef]);
|
}, [footerRef]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -51,7 +51,7 @@ export const Footer = () => {
|
||||||
>
|
>
|
||||||
View the source code and license on GitHub.
|
View the source code and license on GitHub.
|
||||||
</a>{' '}
|
</a>{' '}
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
@ -101,4 +101,4 @@ export const Footer = () => {
|
||||||
</Container>
|
</Container>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
|
@ -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>
|
||||||
|
@ -495,4 +499,4 @@ export function InstructorClassList(props) {
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
Loading…
Reference in New Issue
Block a user