Skip to content
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

Feature/appeals 60037 #23613

Open
wants to merge 4 commits into
base: feature/APPEALS-59830
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ jobs:
CI: true
REDIS_URL_CACHE: redis://redis:6379/0/cache/
TEST_VACOLS_HOST: facols_db
HEADLESS: true

steps:
- uses: actions/checkout@v3
Expand Down
16 changes: 11 additions & 5 deletions app/models/legacy_tasks/judge_legacy_decision_review_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@ def review_action
def available_actions(current_user, _role)
# This must check judge_in_vacols? rather than role as judge, otherwise acting
# VLJs cannot check out
return [] if current_user != assigned_to || !current_user.judge_in_vacols?
scm = current_user.can_act_on_behalf_of_judges?

[
Constants.TASK_ACTIONS.ADD_ADMIN_ACTION.to_h,
review_action
]
actions = []

if scm && FeatureToggle.enabled?(:legacy_case_movement_vlj_to_atty_for_rewrite)
actions << Constants.TASK_ACTIONS.LEGACY_RETURN_TO_ATTORNEY.to_h
end

return actions if current_user != assigned_to || !current_user.judge_in_vacols?

actions << Constants.TASK_ACTIONS.ADD_ADMIN_ACTION.to_h
actions << review_action
end

def label
Expand Down
14 changes: 10 additions & 4 deletions app/queries/ineligible_judge_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ class IneligibleJudgeList
}.freeze

EMPTY_KEY_VALUE = "No Key Present"
INACTIVE_VACOLS = CaseDistributionIneligibleJudges.ineligible_vacols_judges
INACTIVE_CASEFLOW = CaseDistributionIneligibleJudges.ineligible_caseflow_judges

def self.generate_rows(record)
HEADERS.keys.map { |key| record[key] }
Expand Down Expand Up @@ -47,9 +45,17 @@ def self.parse_record(record)
}
end

def self.inactive_caseflow
@inactive_caseflow ||= CaseDistributionIneligibleJudges.ineligible_caseflow_judges
end

def self.inactive_vacols
@inactive_vacols ||= CaseDistributionIneligibleJudges.ineligible_vacols_judges
end

def self.get_reason_for_ineligibility(css_id_value, sdomainid_value)
inactive_caseflow_user = INACTIVE_CASEFLOW.find { |caseflow_user| caseflow_user[:css_id] == css_id_value }
inactive_vacols_user = INACTIVE_VACOLS.find { |vacols_user| vacols_user[:sdomainid] == sdomainid_value }
inactive_caseflow_user = inactive_caseflow.find { |caseflow_user| caseflow_user[:css_id] == css_id_value }
inactive_vacols_user = inactive_vacols.find { |vacols_user| vacols_user[:sdomainid] == sdomainid_value }

@reason = if inactive_caseflow_user && inactive_vacols_user
"BOTH"
Expand Down
8 changes: 8 additions & 0 deletions app/repositories/task_action_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,14 @@ def judge_qr_return_to_attorney_data(task, _user = nil)
}
end

def legacy_return_to_attorney_data(_task, _user = nil)
{
selected: nil,
options: users_to_options(Attorney.list_all),
type: AttorneyLegacyTask.name
}
end

def assign_to_privacy_team_data(_task, _user = nil)
org = PrivacyTeam.singleton

Expand Down
13 changes: 11 additions & 2 deletions client/app/queue/AssignToView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import SearchableDropdown from '../components/SearchableDropdown';
import TextareaField from '../components/TextareaField';
import QueueFlowModal from './components/QueueFlowModal';

import { requestPatch, requestSave, resetSuccessMessages } from './uiReducer/uiActions';
import { requestPatch, requestSave, resetSuccessMessages, highlightInvalidFormItems } from './uiReducer/uiActions';

import { taskActionData } from './utils';

Expand Down Expand Up @@ -76,6 +76,7 @@ class AssignToView extends React.Component {
};

submit = () => {

const { appeal, task, isReassignAction, isTeamAssign } = this.props;

const action = getAction(this.props);
Expand Down Expand Up @@ -270,7 +271,7 @@ class AssignToView extends React.Component {
}

render = () => {
const { assigneeAlreadySelected, task } = this.props;
const { assigneeAlreadySelected, highlightFormItems, task } = this.props;

const action = getAction(this.props);
const actionData = taskActionData(this.props);
Expand Down Expand Up @@ -327,11 +328,13 @@ class AssignToView extends React.Component {
name="Assign to selector"
searchable
hideLabel={actionData.drop_down_label ? null : true}
errorMessage={highlightFormItems && this.state.selectedValue === null ? 'This field is required' : null}
label={this.determineDropDownLabel(actionData)}
placeholder={this.determinePlaceholder(this.props, actionData)}
value={this.state.selectedValue}
onChange={(option) => this.setState({ selectedValue: option ? option.value : null })}
options={this.determineOptions(actionData)}
required={this.props.task.type === 'JudgeLegacyDecisionReviewTask'}
/>
)}
{this.isVHAAssignToRegional() &&
Expand All @@ -353,6 +356,8 @@ class AssignToView extends React.Component {
onChange={(value) => this.setState({ instructions: value })}
value={this.state.instructions}
optional={actionData.body_optional}
errorMessage={highlightFormItems && !validInstructions(this.state.instructions) ? 'Instructions field is required' : null}
required={this.props.task.type === 'JudgeLegacyDecisionReviewTask'}
/>
)}
{isPulacCerullo && (
Expand All @@ -373,6 +378,8 @@ AssignToView.propTypes = {
veteranFullName: PropTypes.string
}),
assigneeAlreadySelected: PropTypes.bool,
highlightInvalidFormItems: PropTypes.func,
highlightFormItems: PropTypes.bool,
isReassignAction: PropTypes.bool,
isTeamAssign: PropTypes.bool,
onReceiveAmaTasks: PropTypes.func,
Expand All @@ -392,6 +399,7 @@ AssignToView.propTypes = {

const mapStateToProps = (state, ownProps) => {
return {
highlightFormItems: state.ui.highlightFormItems,
task: taskById(state, { taskId: ownProps.taskId }),
appeal: appealWithDetailSelector(state, ownProps)
};
Expand All @@ -403,6 +411,7 @@ const mapDispatchToProps = (dispatch) =>
requestPatch,
requestSave,
onReceiveAmaTasks,
highlightInvalidFormItems,
legacyReassignToJudge,
setOvertime,
resetSuccessMessages
Expand Down
5 changes: 5 additions & 0 deletions client/app/queue/QueueApp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,11 @@ class QueueApp extends React.PureComponent {
}`}
render={this.routedAssignToUser}
/>
<Route
path={`/queue/appeals/:appealId/tasks/:taskId/${TASK_ACTIONS.LEGACY_RETURN_TO_ATTORNEY.value
}`}
render={this.routedAssignToUser}
/>
<Route
path={`/queue/appeals/:appealId/tasks/:taskId/${TASK_ACTIONS.ASSIGN_TO_PERSON.value
}`}
Expand Down
5 changes: 5 additions & 0 deletions client/constants/TASK_ACTIONS.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@
"value": "modal/return_to_attorney",
"func": "return_to_attorney_data"
},
"LEGACY_RETURN_TO_ATTORNEY": {
"label": "Return to attorney",
"value": "modal/return_to_attorney",
"func": "legacy_return_to_attorney_data"
},
"LIT_SUPPORT_PULAC_CERULLO": {
"label": "Notify Litigation Support of Possible Conflict of Jurisdiction",
"value": "modal/flag_conflict_of_jurisdiction",
Expand Down
Loading
Loading