Adjust courses and class list

This commit is contained in:
Tanner Collin 2020-01-10 23:56:10 +00:00
parent 027a5fdfc1
commit fddaf083b4
2 changed files with 3 additions and 5 deletions

View File

@ -17,9 +17,9 @@ function ClassTable(props) {
<Table basic='very'>
<Table.Header>
<Table.Row>
<Table.HeaderCell>ID</Table.HeaderCell>
<Table.HeaderCell>Name</Table.HeaderCell>
<Table.HeaderCell>Date</Table.HeaderCell>
<Table.HeaderCell>Time</Table.HeaderCell>
<Table.HeaderCell>Instructor</Table.HeaderCell>
<Table.HeaderCell>Cost</Table.HeaderCell>
<Table.HeaderCell>Students</Table.HeaderCell>
@ -30,13 +30,13 @@ function ClassTable(props) {
{classes.length ?
classes.map((x, i) =>
<Table.Row key={i}>
<Table.Cell>{x.id}</Table.Cell>
<Table.Cell>{x.course.name}</Table.Cell>
<Table.Cell>
<Link to={'/classes/'+x.id}>
{moment.utc(x.datetime).format('ll')}
</Link>
</Table.Cell>
<Table.Cell>{moment.utc(x.datetime).format('LT')}</Table.Cell>
<Table.Cell>{getInstructor(x)}</Table.Cell>
<Table.Cell>{x.cost === '0.00' ? 'Free' : '$'+x.cost}</Table.Cell>
<Table.Cell>{x.student_count}</Table.Cell>

View File

@ -24,13 +24,12 @@ export function Courses(props) {
return (
<Container>
<Header size='large'>Courses / Events</Header>
<Header size='large'>Courses</Header>
{courses ?
<Table basic='very'>
<Table.Header>
<Table.Row>
<Table.HeaderCell>ID</Table.HeaderCell>
<Table.HeaderCell>Name</Table.HeaderCell>
</Table.Row>
</Table.Header>
@ -39,7 +38,6 @@ export function Courses(props) {
{courses.length ?
courses.map((x, i) =>
<Table.Row key={i}>
<Table.Cell>{x.id}</Table.Cell>
<Table.Cell>
<Link to={'/courses/'+x.id}>{x.name}</Link>
</Table.Cell>