-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PART 3] Remove overtime status of appeal if case is reassigned #14453
Changes from 6 commits
3cb011e
43ee4ec
f0d51c9
970be15
9d63a8a
b0172b4
1c612ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ import COPY from '../../COPY'; | |
|
||
import { taskById, appealWithDetailSelector } from './selectors'; | ||
|
||
import { onReceiveAmaTasks, legacyReassignToJudge } from './QueueActions'; | ||
import { onReceiveAmaTasks, legacyReassignToJudge, setOvertime } from './QueueActions'; | ||
|
||
import SearchableDropdown from '../components/SearchableDropdown'; | ||
import TextareaField from '../components/TextareaField'; | ||
|
@@ -145,6 +145,9 @@ class AssignToView extends React.Component { | |
|
||
return this.props.requestPatch(`/tasks/${task.taskId}`, payload, successMsg).then((resp) => { | ||
this.props.onReceiveAmaTasks(resp.body.tasks.data); | ||
if (task.type === 'JudgeAssignTask') { | ||
this.props.setOvertime(task.externalAppealId, false); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On reassign of a judge assign task: Ensure we update the redux store to reflect that this appeal's overtime status is now false |
||
}); | ||
}; | ||
|
||
|
@@ -241,7 +244,8 @@ class AssignToView extends React.Component { | |
|
||
AssignToView.propTypes = { | ||
appeal: PropTypes.shape({ | ||
externalId: PropTypes.string | ||
externalId: PropTypes.string, | ||
id: PropTypes.string | ||
}), | ||
assigneeAlreadySelected: PropTypes.bool, | ||
highlightFormItems: PropTypes.bool, | ||
|
@@ -254,8 +258,11 @@ AssignToView.propTypes = { | |
task: PropTypes.shape({ | ||
instructions: PropTypes.string, | ||
taskId: PropTypes.string, | ||
availableActions: PropTypes.arrayOf(PropTypes.object) | ||
}) | ||
availableActions: PropTypes.arrayOf(PropTypes.object), | ||
externalAppealId: PropTypes.string, | ||
type: PropTypes.string | ||
}), | ||
setOvertime: PropTypes.func | ||
}; | ||
|
||
const mapStateToProps = (state, ownProps) => { | ||
|
@@ -274,7 +281,8 @@ const mapDispatchToProps = (dispatch) => | |
requestPatch, | ||
requestSave, | ||
onReceiveAmaTasks, | ||
legacyReassignToJudge | ||
legacyReassignToJudge, | ||
setOvertime | ||
}, | ||
dispatch | ||
); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -220,7 +220,7 @@ export const setOvertime = (appealId, overtime) => ({ | |
appealId, | ||
overtime | ||
} | ||
}) | ||
}); | ||
|
||
export const deleteTask = (taskId) => ({ | ||
type: ACTIONS.DELETE_TASK, | ||
|
@@ -534,6 +534,8 @@ export const reassignTasksToUser = ({ | |
dispatch(decrementTaskCountForAttorney({ | ||
id: previousAssigneeId | ||
})); | ||
|
||
dispatch(setOvertime(oldTask.externalAppealId, false)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On reassign of an attorney assign task: Ensure we update the redux store to reflect that this appeal's overtime status is now false |
||
}); | ||
})); | ||
|
||
|
@@ -557,6 +559,8 @@ export const legacyReassignToJudge = ({ | |
dispatch(onReceiveTasks(_.pick(allTasks, ['tasks', 'amaTasks']))); | ||
|
||
dispatch(showSuccessMessage(successMessage)); | ||
|
||
dispatch(setOvertime(oldTask.externalAppealId, false)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On reassign of a legacy judge assign task: Ensure we update the redux store to reflect that this appeal's overtime status is now false |
||
}); | ||
})); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not need a feature toggle check here as
overtime?
returns false if the feature toggle is not enabled