Fix class sorting bug and move datetime picker down
This commit is contained in:
parent
1a8b12ceb4
commit
27c6ca65e1
|
@ -115,7 +115,7 @@ export function CourseDetail(props) {
|
||||||
|
|
||||||
<Table.Body>
|
<Table.Body>
|
||||||
{course.sessions.length ?
|
{course.sessions.length ?
|
||||||
course.sessions.sort((a, b) => a.datetime < b.datetime).map((x, i) =>
|
course.sessions.sort((a, b) => a.datetime < b.datetime ? 1 : -1).slice(0,10).map((x, i) =>
|
||||||
<Table.Row key={i}>
|
<Table.Row key={i}>
|
||||||
<Table.Cell>
|
<Table.Cell>
|
||||||
<Link to={'/classes/'+x.id}>
|
<Link to={'/classes/'+x.id}>
|
||||||
|
|
|
@ -25,6 +25,16 @@ function InstructorClassEditor(props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='class-editor'>
|
<div className='class-editor'>
|
||||||
|
<Form.Input
|
||||||
|
label='Cost ($)'
|
||||||
|
{...makeProps('cost')}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Form.Input
|
||||||
|
label='Max Students — Blank for Unlimited'
|
||||||
|
{...makeProps('max_students')}
|
||||||
|
/>
|
||||||
|
|
||||||
<Form.Field>
|
<Form.Field>
|
||||||
<label>Time and Date</label>
|
<label>Time and Date</label>
|
||||||
<Datetime
|
<Datetime
|
||||||
|
@ -39,16 +49,6 @@ function InstructorClassEditor(props) {
|
||||||
}
|
}
|
||||||
</Form.Field>
|
</Form.Field>
|
||||||
|
|
||||||
<Form.Input
|
|
||||||
label='Cost ($)'
|
|
||||||
{...makeProps('cost')}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Form.Input
|
|
||||||
label='Max Students — Blank for Unlimited'
|
|
||||||
{...makeProps('max_students')}
|
|
||||||
/>
|
|
||||||
|
|
||||||
{editing && <Form.Field>
|
{editing && <Form.Field>
|
||||||
<label>Is the class cancelled?</label>
|
<label>Is the class cancelled?</label>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
|
|
Loading…
Reference in New Issue
Block a user