Skip to content

Commit

Permalink
Merge pull request #43 from roboduels/develop
Browse files Browse the repository at this point in the history
Fix update human grades
  • Loading branch information
sarikaya authored Mar 20, 2024
2 parents d147df2 + 1b11bfb commit d429047
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export function GradesForm({ task }: Props): JSX.Element | null {
const handleUpdate = useCallback(async () => {
const formValues = await formRef.current?.validateFields();
if (formValues) {
// dispatch(gradesActions.setGrades(formValues));
dispatch(gradesActions.setGrades(formValues));
dispatch(submitHumanGradesAsync(frameOptions.certificateId));
}
}, [frameOptions]);
Expand Down
8 changes: 7 additions & 1 deletion cvat-ui/src/reducers/grades-reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@ export default function (state: GradesState = defaultState, action: any): Grades
case GradesActionsTypes.SET_LOADING:
return { ...state, loading: action.payload.loading };
case GradesActionsTypes.LOAD_VALUES:
return { ...state, values: action.payload.values };
return {
...state,
values: {
...state.values,
...action.payload.values,
},
};
case GradesActionsTypes.ASSIGN_VALUES:
return {
...state,
Expand Down

0 comments on commit d429047

Please sign in to comment.