api cleanup
This commit is contained in:
@@ -8,8 +8,6 @@ import {
|
||||
TextFilter,
|
||||
} from '@edx/paragon';
|
||||
|
||||
import { gradingStatuses as statuses } from 'data/services/lms/constants';
|
||||
|
||||
import selectors from 'data/selectors';
|
||||
import thunkActions from 'data/thunkActions';
|
||||
|
||||
@@ -17,13 +15,6 @@ import StatusBadge from 'components/StatusBadge';
|
||||
import ReviewModal from 'containers/ReviewModal';
|
||||
import './ListView.scss';
|
||||
|
||||
const selectColumn = {
|
||||
id: 'selection',
|
||||
Header: DataTable.ControlledSelectHeader,
|
||||
Cell: DataTable.ControlledSelect,
|
||||
displaySortBy: true,
|
||||
};
|
||||
|
||||
/**
|
||||
* <ListView />
|
||||
*/
|
||||
|
||||
@@ -6,7 +6,6 @@ const createAction = createActionFactory(dataKey);
|
||||
|
||||
export default StrictDict({
|
||||
loadOraMetadata: createAction('loadOraMetadata'),
|
||||
updateSelection: createAction('updateSelection'),
|
||||
setShowReview: createAction('setReview'),
|
||||
setGrading: createAction('setGrading'),
|
||||
});
|
||||
|
||||
@@ -4,6 +4,7 @@ const initialState = {
|
||||
oraMetadata: {
|
||||
prompt: '',
|
||||
name: '',
|
||||
type: '',
|
||||
},
|
||||
showReview: false,
|
||||
grading: false,
|
||||
@@ -14,8 +15,6 @@ const app = (state = initialState, { type, payload }) => {
|
||||
switch (type) {
|
||||
case actions.app.loadOraMetadata.toString():
|
||||
return { ...state, oraMetadata: payload };
|
||||
case actions.app.updateSelection.toString():
|
||||
return { ...state, selectedSubmissions: payload };
|
||||
case actions.app.setShowReview.toString():
|
||||
return { ...state, showReview: payload };
|
||||
case actions.app.setGrading.toString():
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
import actions from 'data/actions';
|
||||
|
||||
const initialState = {
|
||||
submissions: {},
|
||||
selected: [],
|
||||
};
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const app = (state = initialState, { type, payload }) => {
|
||||
switch (type) {
|
||||
case actions.list.load.toString():
|
||||
return { ...state, submissions: payload };
|
||||
case actions.list.updateSelection.toString():
|
||||
return { ...state, selected: payload };
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
};
|
||||
|
||||
export { initialState };
|
||||
export default app;
|
||||
@@ -5,6 +5,7 @@ export const simpleSelectors = {
|
||||
grading: state => state.app.grading,
|
||||
oraName: state => state.app.oraMetadata.name,
|
||||
oraPrompt: state => state.app.oraMetadata.prompt,
|
||||
oraTypes: state => state.app.oraMetadata.type,
|
||||
};
|
||||
|
||||
export default StrictDict({
|
||||
|
||||
@@ -9,4 +9,6 @@ Phasellus porttitor vel magna et auctor. Nulla porttitor convallis aliquam. Done
|
||||
|
||||
export const name = 'This is the Name of the ORA';
|
||||
|
||||
export default { prompt, name };
|
||||
export const type = 'individual';
|
||||
|
||||
export default { name, prompt, type };
|
||||
|
||||
Reference in New Issue
Block a user