Merge pull request #118 from Dmitra/feat-class-failed

Feat class failed
This commit is contained in:
Tanner 2023-08-15 19:46:39 +00:00 committed by GitHub
commit 31daa56df0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 8 deletions

View File

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

View File

@ -668,7 +668,8 @@ export function ClassDetail(props) {
{clazz.instructor !== user.id &&
(userTraining ?
<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>
{userTraining.attendance_status === 'Withdrawn' ?
<Button loading={loading} onClick={() => handleToggle('Waiting for payment')}>
@ -750,4 +751,3 @@ export function ClassDetail(props) {
</Container>
);
};

View File

@ -10,7 +10,7 @@ export const Footer = () => {
useEffect(() => {
if (!footerRef.current) return;
if (footerRef.current.clientWidth < 650) return
scene({ ref: footerRef });
if (window.location.hostname === 'my.protospace.ca') scene({ ref: footerRef });
}, [footerRef]);
return (

View File

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