Show if a class is cancelled
This commit is contained in:
parent
2040875fe0
commit
036a39febb
|
@ -32,7 +32,7 @@ function ClassTable(props) {
|
||||||
{moment.utc(x.datetime).format('ll')}
|
{moment.utc(x.datetime).format('ll')}
|
||||||
</Link>
|
</Link>
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
<Table.Cell>{moment.utc(x.datetime).format('LT')}</Table.Cell>
|
<Table.Cell>{x.is_cancelled ? 'Cancelled' : moment.utc(x.datetime).format('LT')}</Table.Cell>
|
||||||
<Table.Cell>{x.instructor_name}</Table.Cell>
|
<Table.Cell>{x.instructor_name}</Table.Cell>
|
||||||
<Table.Cell>{x.cost === '0.00' ? 'Free' : '$'+x.cost}</Table.Cell>
|
<Table.Cell>{x.cost === '0.00' ? 'Free' : '$'+x.cost}</Table.Cell>
|
||||||
<Table.Cell>{x.student_count}</Table.Cell>
|
<Table.Cell>{x.student_count}</Table.Cell>
|
||||||
|
@ -126,7 +126,7 @@ export function ClassDetail(props) {
|
||||||
<Table.Row>
|
<Table.Row>
|
||||||
<Table.Cell>Time:</Table.Cell>
|
<Table.Cell>Time:</Table.Cell>
|
||||||
<Table.Cell>
|
<Table.Cell>
|
||||||
{moment.utc(clazz.datetime).format('LT')}
|
{clazz.is_cancelled ? 'Cancelled' : moment.utc(clazz.datetime).format('LT')}
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
</Table.Row>
|
</Table.Row>
|
||||||
<Table.Row>
|
<Table.Row>
|
||||||
|
|
|
@ -76,9 +76,6 @@ export function CourseDetail(props) {
|
||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const getInstructor = (session) =>
|
|
||||||
session.instructor ? session.instructor.first_name : session.old_instructor;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container>
|
<Container>
|
||||||
{!error ?
|
{!error ?
|
||||||
|
@ -119,8 +116,8 @@ export function CourseDetail(props) {
|
||||||
{moment.utc(x.datetime).format('ll')}
|
{moment.utc(x.datetime).format('ll')}
|
||||||
</Link>
|
</Link>
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
<Table.Cell>{moment.utc(x.datetime).format('LT')}</Table.Cell>
|
<Table.Cell>{x.is_cancelled ? 'Cancelled' : moment.utc(x.datetime).format('LT')}</Table.Cell>
|
||||||
<Table.Cell>{getInstructor(x)}</Table.Cell>
|
<Table.Cell>{x.instructor_name}</Table.Cell>
|
||||||
<Table.Cell>{x.cost === '0.00' ? 'Free' : '$'+x.cost}</Table.Cell>
|
<Table.Cell>{x.cost === '0.00' ? 'Free' : '$'+x.cost}</Table.Cell>
|
||||||
</Table.Row>
|
</Table.Row>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user