Compare commits
2 Commits
v1.4.7
...
jkantor/re
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
286e194414 | ||
|
|
3deb592d89 |
@@ -344,9 +344,6 @@ export default class Gradebook extends React.Component {
|
|||||||
<Table
|
<Table
|
||||||
columns={this.props.headings}
|
columns={this.props.headings}
|
||||||
data={this.formatter[this.props.format](this.props.grades, this.props.areGradesFrozen)}
|
data={this.formatter[this.props.format](this.props.grades, this.props.areGradesFrozen)}
|
||||||
tableSortable
|
|
||||||
defaultSortDirection="asc"
|
|
||||||
defaultSortedColumn="username"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{PageButtons(this.props)}
|
{PageButtons(this.props)}
|
||||||
|
|||||||
@@ -96,16 +96,12 @@ describe('actions', () => {
|
|||||||
track: expectedTrack,
|
track: expectedTrack,
|
||||||
headings: [
|
headings: [
|
||||||
{
|
{
|
||||||
columnSortable: true,
|
|
||||||
key: 'username',
|
key: 'username',
|
||||||
label: 'Username',
|
label: 'Username',
|
||||||
onSort: expect.anything(),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
columnSortable: true,
|
|
||||||
key: 'total',
|
key: 'total',
|
||||||
label: 'Total',
|
label: 'Total',
|
||||||
onSort: expect.anything(),
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
prev: responseData.previous,
|
prev: responseData.previous,
|
||||||
|
|||||||
@@ -66,8 +66,6 @@ const headingMapper = (filterKey) => {
|
|||||||
const results = [{
|
const results = [{
|
||||||
label: 'Username',
|
label: 'Username',
|
||||||
key: 'username',
|
key: 'username',
|
||||||
columnSortable: true,
|
|
||||||
onSort: (direction) => { dispatch(sortGrades('username', direction)); },
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
const assignmentHeadings = entry.section_breakdown
|
const assignmentHeadings = entry.section_breakdown
|
||||||
@@ -75,15 +73,11 @@ const headingMapper = (filterKey) => {
|
|||||||
.map(s => ({
|
.map(s => ({
|
||||||
label: s.label,
|
label: s.label,
|
||||||
key: s.label,
|
key: s.label,
|
||||||
columnSortable: true,
|
|
||||||
onSort: direction => dispatch(sortGrades(s.label, direction)),
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const totals = [{
|
const totals = [{
|
||||||
label: 'Total',
|
label: 'Total',
|
||||||
key: 'total',
|
key: 'total',
|
||||||
columnSortable: true,
|
|
||||||
onSort: direction => dispatch(sortGrades('total', direction)),
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
return results.concat(assignmentHeadings).concat(totals);
|
return results.concat(assignmentHeadings).concat(totals);
|
||||||
@@ -95,8 +89,6 @@ const headingMapper = (filterKey) => {
|
|||||||
const results = [{
|
const results = [{
|
||||||
label: 'Username',
|
label: 'Username',
|
||||||
key: 'username',
|
key: 'username',
|
||||||
columnSortable: true,
|
|
||||||
onSort: (direction) => { dispatch(sortGrades('username', direction)); },
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
const assignmentHeadings = entry.section_breakdown
|
const assignmentHeadings = entry.section_breakdown
|
||||||
@@ -104,15 +96,11 @@ const headingMapper = (filterKey) => {
|
|||||||
.map(s => ({
|
.map(s => ({
|
||||||
label: s.label,
|
label: s.label,
|
||||||
key: s.label,
|
key: s.label,
|
||||||
columnSortable: false,
|
|
||||||
onSort: (direction) => { this.sortNumerically(s.label, direction); },
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const totals = [{
|
const totals = [{
|
||||||
label: 'Total',
|
label: 'Total',
|
||||||
key: 'total',
|
key: 'total',
|
||||||
columnSortable: true,
|
|
||||||
onSort: direction => dispatch(sortGrades('total', direction)),
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
return results.concat(assignmentHeadings).concat(totals);
|
return results.concat(assignmentHeadings).concat(totals);
|
||||||
|
|||||||
Reference in New Issue
Block a user