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

Jonathan/appeals 51926 #22215

Merged
merged 2 commits into from
Jul 18, 2024
Merged
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
3 changes: 2 additions & 1 deletion app/views/higher_level_reviews/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
featureToggles: {
useAmaActivationDate: FeatureToggle.enabled?(:use_ama_activation_date, user: current_user),
correctClaimReviews: FeatureToggle.enabled?(:correct_claim_reviews, user: current_user),
covidTimelinessExemption: FeatureToggle.enabled?(:covid_timeliness_exemption, user: current_user)
covidTimelinessExemption: FeatureToggle.enabled?(:covid_timeliness_exemption, user: current_user),
disableAmaEventing: FeatureToggle.enabled?(:disable_ama_eventing, user: current_user)
}
}) %>
<% end %>
3 changes: 2 additions & 1 deletion app/views/queue/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
additional_remand_reasons: FeatureToggle.enabled?(:additional_remand_reasons, user: current_user),
acd_cases_tied_to_judges_no_longer_with_board: FeatureToggle.enabled?(:acd_cases_tied_to_judges_no_longer_with_board, user: current_user),
admin_case_distribution: FeatureToggle.enabled?(:admin_case_distribution, user: current_user),
acd_exclude_from_affinity: FeatureToggle.enabled?(:acd_exclude_from_affinity, user: current_user)
acd_exclude_from_affinity: FeatureToggle.enabled?(:acd_exclude_from_affinity, user: current_user),
disable_ama_eventing: FeatureToggle.enabled?(:disable_ama_eventing, user: current_user)
}
}) %>
<% end %>
3 changes: 2 additions & 1 deletion app/views/supplemental_claims/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
featureToggles: {
useAmaActivationDate: FeatureToggle.enabled?(:use_ama_activation_date, user: current_user),
correctClaimReviews: FeatureToggle.enabled?(:correct_claim_reviews, user: current_user),
covidTimelinessExemption: FeatureToggle.enabled?(:covid_timeliness_exemption, user: current_user)
covidTimelinessExemption: FeatureToggle.enabled?(:covid_timeliness_exemption, user: current_user),
disableAmaEventing: FeatureToggle.enabled?(:disable_ama_eventing, user: current_user)
}
}) %>
<% end %>
174 changes: 88 additions & 86 deletions client/app/intake/pages/addIssues/addIssues.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,97 +115,97 @@ class AddIssuesPage extends React.Component {
const identifier = issueModificationRequest.identifier;

switch (requestType) {
case 'reviewIssueModificationRequest':
this.setState({
pendingIssueModification: issueModificationRequest
});
this.props.toggleRequestIssueModificationModal(identifier);
break;
case 'reviewIssueAdditionRequest':
this.setState({
pendingIssueModification: issueModificationRequest
});
this.props.toggleRequestIssueAdditionModal(identifier);
break;
case 'reviewIssueWithdrawalRequest':
this.setState({
pendingIssueModification: issueModificationRequest
});
this.props.toggleRequestIssueWithdrawalModal(identifier);
break;
case 'reviewIssueRemovalRequest':
this.setState({
pendingIssueModification: issueModificationRequest,
});
this.props.toggleRequestIssueRemovalModal(identifier);
break;
case 'cancelReviewIssueRequest':
this.setState({
pendingIssueModification: issueModificationRequest,
});
this.props.toggleCancelPendingRequestIssueModal();
break;
default:
// Do nothing if the dropdown option was not set or implemented.
break;
case 'reviewIssueModificationRequest':
this.setState({
pendingIssueModification: issueModificationRequest
});
this.props.toggleRequestIssueModificationModal(identifier);
break;
case 'reviewIssueAdditionRequest':
this.setState({
pendingIssueModification: issueModificationRequest
});
this.props.toggleRequestIssueAdditionModal(identifier);
break;
case 'reviewIssueWithdrawalRequest':
this.setState({
pendingIssueModification: issueModificationRequest
});
this.props.toggleRequestIssueWithdrawalModal(identifier);
break;
case 'reviewIssueRemovalRequest':
this.setState({
pendingIssueModification: issueModificationRequest,
});
this.props.toggleRequestIssueRemovalModal(identifier);
break;
case 'cancelReviewIssueRequest':
this.setState({
pendingIssueModification: issueModificationRequest,
});
this.props.toggleCancelPendingRequestIssueModal();
break;
default:
// Do nothing if the dropdown option was not set or implemented.
break;
}
};

onClickIssueAction = (index, option = 'remove') => {
switch (option) {
case 'add_decision_date':
this.props.toggleAddDecisionDateModal();
this.setState({ issueAddDecisionDateIndex: index });
break;
case 'remove':
if (this.props.toggleIssueRemoveModal) {
// on the edit page, so show the remove modal
this.setState({
issueRemoveIndex: index
});
this.props.toggleIssueRemoveModal();
} else {
this.props.removeIssue(index);
}
break;
case 'withdraw':
this.props.withdrawIssue(index);
break;
case 'correct':
this.props.toggleCorrectionTypeModal({ index });
break;
case 'undo_correction':
this.props.undoCorrection(index);
break;
case 'edit':
this.setState({
issueIndex: index
});
this.props.toggleEditIntakeIssueModal({ index });
break;
case 'requestModification':
this.setState({
issueIndex: index,
pendingIssueModification: {}
});
this.props.toggleRequestIssueModificationModal(index);
break;
case 'requestRemoval':
this.setState({
issueIndex: index,
pendingIssueModification: {}
});
this.props.toggleRequestIssueRemovalModal(index);
break;
case 'requestWithdrawal':
case 'add_decision_date':
this.props.toggleAddDecisionDateModal();
this.setState({ issueAddDecisionDateIndex: index });
break;
case 'remove':
if (this.props.toggleIssueRemoveModal) {
// on the edit page, so show the remove modal
this.setState({
issueIndex: index,
pendingIssueModification: {}
issueRemoveIndex: index
});
this.props.toggleRequestIssueWithdrawalModal(index);
break;
default:
this.props.undoCorrection(index);
this.props.toggleIssueRemoveModal();
} else {
this.props.removeIssue(index);
}
break;
case 'withdraw':
this.props.withdrawIssue(index);
break;
case 'correct':
this.props.toggleCorrectionTypeModal({ index });
break;
case 'undo_correction':
this.props.undoCorrection(index);
break;
case 'edit':
this.setState({
issueIndex: index
});
this.props.toggleEditIntakeIssueModal({ index });
break;
case 'requestModification':
this.setState({
issueIndex: index,
pendingIssueModification: {}
});
this.props.toggleRequestIssueModificationModal(index);
break;
case 'requestRemoval':
this.setState({
issueIndex: index,
pendingIssueModification: {}
});
this.props.toggleRequestIssueRemovalModal(index);
break;
case 'requestWithdrawal':
this.setState({
issueIndex: index,
pendingIssueModification: {}
});
this.props.toggleRequestIssueWithdrawalModal(index);
break;
default:
this.props.undoCorrection(index);
}
};

Expand Down Expand Up @@ -337,7 +337,7 @@ class AddIssuesPage extends React.Component {

const intakeData = intakeForms[formType];
const appealInfo = intakeForms.appeal;
const { useAmaActivationDate, hlrScUnrecognizedClaimants } = featureToggles;
const { useAmaActivationDate, hlrScUnrecognizedClaimants, disableAmaEventing } = featureToggles;
const hasClearedEp = intakeData && (intakeData.hasClearedRatingEp || intakeData.hasClearedNonratingEp);

if (this.willRedirect(intakeData, hasClearedEp)) {
Expand Down Expand Up @@ -639,7 +639,9 @@ class AddIssuesPage extends React.Component {

let rowObjects = fieldsForFormType;

rowObjects = rowObjects.concat(intakeSystemLabelRow());
if (!disableAmaEventing) {
rowObjects = rowObjects.concat(intakeSystemLabelRow());
}

Object.keys(issuesBySection).sort().
map((key) => {
Expand Down
133 changes: 75 additions & 58 deletions client/app/queue/OtherReviewsTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,70 +63,85 @@ class OtherReviewsTable extends React.PureComponent {

getKeyForRow = (rowNumber, object) => `${object.reviewType}-${object.claimId}`;

getColumns = () => [
{
valueFunction: (review) => <BadgeArea review={review} />
},
{
header: COPY.OTHER_REVIEWS_TABLE_APPELLANT_NAME_COLUMN_TITLE,
valueFunction: (review) => review.claimantNames.length > 0 ?
review.claimantNames.join(', ') :
review.veteranFullName
},
{
header: COPY.OTHER_REVIEWS_TABLE_REVIEW_TYPE_COLUMN_TITLE,
valueFunction: (review) => {
return <React.Fragment>
<Link
name="edit-issues"
href={review.editIssuesUrl}
target="_blank">
{_.startCase(review.reviewType)}
</Link>
</React.Fragment>;
}
},
{
header: COPY.OTHER_REVIEWS_TABLE_RECEIPT_DATE_COLUMN_TITLE,
valueFunction: (review) => <DateString date={review.receiptDate} />
},
{
header: COPY.OTHER_REVIEWS_TABLE_EP_CODE_COLUMN_TITLE,
valueFunction: (review) => {
if (review.endProductStatuses && review.endProductStatuses.length > 0) {
if (review.endProductStatuses.length > 1) {
return review.endProductStatuses.map((endProduct, i) => {
return <SubdividedTableRow rowNumber={i}>
{endProduct.ep_code}
</SubdividedTableRow>;
});
getColumns = () => {
const { featureToggles } = this.props;

// Check if disable_ama_eventing is false to determine whether to show the BadgeArea column
const showBadgeAreaColumn = !featureToggles.disable_ama_eventing;

const columns = [
{
header: COPY.OTHER_REVIEWS_TABLE_APPELLANT_NAME_COLUMN_TITLE,
valueFunction: (review) => review.claimantNames.length > 0 ?
review.claimantNames.join(', ') :
review.veteranFullName
},
{
header: COPY.OTHER_REVIEWS_TABLE_REVIEW_TYPE_COLUMN_TITLE,
valueFunction: (review) => (
<React.Fragment>
<Link
name="edit-issues"
href={review.editIssuesUrl}
target="_blank">
{_.startCase(review.reviewType)}
</Link>
</React.Fragment>
)
},
{
header: COPY.OTHER_REVIEWS_TABLE_RECEIPT_DATE_COLUMN_TITLE,
valueFunction: (review) => <DateString date={review.receiptDate} />
},
{
header: COPY.OTHER_REVIEWS_TABLE_EP_CODE_COLUMN_TITLE,
valueFunction: (review) => {
if (review.endProductStatuses && review.endProductStatuses.length > 0) {
if (review.endProductStatuses.length > 1) {
return review.endProductStatuses.map((endProduct, i) => (
<SubdividedTableRow key={i} rowNumber={i}>
{endProduct.ep_code}
</SubdividedTableRow>
));
}
const endProduct = review.endProductStatuses[0];

return endProduct.ep_code;
}
const endProduct = review.endProductStatuses[0];

return endProduct.ep_code;
return <em>{COPY[CLAIM_REVIEW_TEXT[review.reviewType]]}</em>;
}

return <em>{COPY[CLAIM_REVIEW_TEXT[review.reviewType]]}</em>;
}
},
{
header: COPY.OTHER_REVIEWS_TABLE_EP_STATUS_COLUMN_TITLE,
valueFunction: (review) => {
if (review.endProductStatuses && review.endProductStatuses.length > 0) {
if (review.endProductStatuses.length > 1) {
return review.endProductStatuses.map((endProduct, i) => {
return <SubdividedTableRow rowNumber={i}>{endProduct.ep_status}</SubdividedTableRow>;
});
},
{
header: COPY.OTHER_REVIEWS_TABLE_EP_STATUS_COLUMN_TITLE,
valueFunction: (review) => {
if (review.endProductStatuses && review.endProductStatuses.length > 0) {
if (review.endProductStatuses.length > 1) {
return review.endProductStatuses.map((endProduct, i) => (
<SubdividedTableRow key={i} rowNumber={i}>
{endProduct.ep_status}
</SubdividedTableRow>
));
}
const endProduct = review.endProductStatuses[0];

return endProduct.ep_status;
}
const endProduct = review.endProductStatuses[0];

return endProduct.ep_status;
return '';
}

return '';
}
];

// Conditionally include the BadgeArea column at the start of row based on showBadgeAreaColumn
if (showBadgeAreaColumn) {
columns.unshift({
valueFunction: (review) => <BadgeArea review={review} />
});
}
];

return columns;
};

render = () => {
if (this.props.reviews.length === 0) {
Expand All @@ -152,12 +167,14 @@ OtherReviewsTable.propTypes = {
reviews: PropTypes.arrayOf(PropTypes.object).isRequired,
veteranName: PropTypes.string,
styling: PropTypes.object,
clearCaseListSearch: PropTypes.func
clearCaseListSearch: PropTypes.func,
featureToggles: PropTypes.object
};

const mapStateToProps = (state) => ({
userCssId: state.ui.userCssId,
userRole: state.ui.userRole
userRole: state.ui.userRole,
featureToggles: state.ui.featureToggles
});

const mapDispatchToProps = (dispatch) => bindActionCreators({
Expand Down
Loading