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

Revert "Feature/appeals 24683" #20269

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 0 additions & 4 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,6 @@ def vso_employee?
roles.include?("VSO")
end

def non_board_employee?
vso_employee? || roles.include?("RO ViewHearSched")
end

def camo_employee?
member_of_organization?(VhaCamo.singleton) && FeatureToggle.enabled?(:vha_predocket_workflow, user: self)
end
Expand Down
8 changes: 3 additions & 5 deletions app/serializers/hearings/hearing_day_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@ class HearingDaySerializer
attribute :deleted_at
attribute :id
attribute :judge_first_name do |hearing_day, params|
RequestStore[:current_user]&.non_board_employee? ? nil : get_judge_first_name(hearing_day, params)
get_judge_first_name(hearing_day, params)
end
attribute :judge_id
attribute :judge_css_id
attribute :judge_last_name do |hearing_day, params|
RequestStore[:current_user]&.non_board_employee? ? nil : get_judge_last_name(hearing_day, params)
get_judge_last_name(hearing_day, params)
end
attribute :lock
attribute :notes do |hearing_day|
RequestStore[:current_user]&.non_board_employee? ? nil : hearing_day.notes
end
attribute :notes
attribute :readable_request_type do |hearing_day, params|
get_readable_request_type(hearing_day, params)
end
Expand Down
1 change: 0 additions & 1 deletion app/views/hearings/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
userIsHearingManagement: current_user.in_hearing_management_team?,
userIsBoardAttorney: current_user.attorney?,
userIsHearingAdmin: current_user.in_hearing_admin_team?,
userIsNonBoardEmployee: current_user.non_board_employee?,
featureToggles: {
metricsBrowserError: FeatureToggle.enabled?(:metrics_browser_error, user: current_user)
}
Expand Down
9 changes: 3 additions & 6 deletions client/app/hearings/HearingsApp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ export default class HearingsApp extends React.PureComponent {
userIsDvc,
userIsHearingManagement,
userIsBoardAttorney,
userIsHearingAdmin,
userIsNonBoardEmployee
userIsHearingAdmin
} = this.props;

return Object.freeze({
Expand All @@ -62,8 +61,7 @@ export default class HearingsApp extends React.PureComponent {
userIsDvc,
userIsHearingManagement,
userIsBoardAttorney,
userIsHearingAdmin,
userIsNonBoardEmployee,
userIsHearingAdmin
});
};

Expand Down Expand Up @@ -240,6 +238,5 @@ HearingsApp.propTypes = {
userIsDvc: PropTypes.bool,
userIsHearingManagement: PropTypes.bool,
userIsBoardAttorney: PropTypes.bool,
userIsHearingAdmin: PropTypes.bool,
userIsNonBoardEmployee: PropTypes.bool
userIsHearingAdmin: PropTypes.bool
};
7 changes: 3 additions & 4 deletions client/app/hearings/components/dailyDocket/DailyDocket.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export default class DailyDocket extends React.Component {
/>
</div>
<div className="cf-push-right" tabIndex={0}>
{!user.userIsNonBoardEmployee && (
{!user.userVsoEmployee && (
<React.Fragment>
VLJ: {dailyDocket.judgeFirstName} {dailyDocket.judgeLastName}
<br />
Expand Down Expand Up @@ -301,9 +301,8 @@ export default class DailyDocket extends React.Component {
)}
</div>
</div>
{(user.userIsHearingManagement || user.userIsHearingAdmin) && (
<DailyDocketGuestLinkSection linkInfo={dailyDocket.conferenceLink} />
)}
{(user.userIsHearingManagement || user.userIsHearingAdmin) &&
<DailyDocketGuestLinkSection linkInfo={dailyDocket.conferenceLink} />}
<DailyDocketRows
hearings={this.props.hearings}
hidePreviouslyScheduled
Expand Down
24 changes: 9 additions & 15 deletions client/app/hearings/components/dailyDocket/DailyDocketPrinted.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,31 +83,25 @@ export class DailyDocketPrinted extends React.Component {
<AppSegment extraClassNames={['cf-daily-docket-printed']}>
<div className="cf-app-segment">
<div className="cf-push-left">
<h2>
Daily Docket (
{moment(docket.scheduledFor).format('ddd M/DD/YYYY')})
</h2>
{docket.notes && (
<h2>Daily Docket ({moment(docket.scheduledFor).format('ddd M/DD/YYYY')})</h2>
{docket.notes &&
<div>
<strong>Notes:</strong>
<br />
<strong>Notes:</strong><br />
{docket.notes}
</div>
)}
}
</div>

<div className="cf-push-right">
{!user.userIsNonBoardEmployee && (
{!user.userVsoEmployee && (
<React.Fragment>
<strong>VLJ:</strong>
{` ${docket.judgeFirstName} ${docket.judgeLastName}`}
<strong>VLJ:</strong> `${docket.judgeFirstName}` `${docket.judgeLastName}`
<br />
</React.Fragment>
)}
<strong>Coordinator:</strong> {docket.bvaPoc} <br />
<strong>Hearing type:</strong> {docket.readableRequestType} <br />
<strong>Regional office:</strong> {docket.regionalOffice}
<br />
<strong>Regional office:</strong> {docket.regionalOffice}<br />
<strong>Room number:</strong> {docket.room}
</div>
</div>
Expand All @@ -118,7 +112,7 @@ export class DailyDocketPrinted extends React.Component {
slowReRendersAreOk
/>

{_.size(previousHearings) > 0 && (
{_.size(previousHearings) > 0 &&
<div>
<h2>Previous Hearings</h2>

Expand All @@ -128,7 +122,7 @@ export class DailyDocketPrinted extends React.Component {
slowReRendersAreOk
/>
</div>
)}
}
</AppSegment>
);
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

9 changes: 7 additions & 2 deletions spec/feature/hearings/daily_docket/ro_viewhearsched_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@
let!(:current_user) { User.authenticate!(css_id: "BVATWARNER", roles: ["RO ViewHearSched"]) }
let!(:hearing) { create(:hearing, :with_tasks) }

scenario "User cannot view docket notes" do
scenario "User can only update notes" do
visit "hearings/schedule/docket/" + hearing.hearing_day.id.to_s
expect(page).to_not have_button("Print all Hearing Worksheets")
expect(page).to_not have_content("Edit Hearing Day")
expect(page).to_not have_content("Lock Hearing Day")
expect(page).to_not have_content("Hearing Details")
expect(page).to_not have_content("Notes")
expect(page).to have_field("Transcript Requested", disabled: true, visible: false)
expect(find(".dropdown-#{hearing.external_id}-disposition")).to have_css(".cf-select__control--is-disabled")
fill_in "Notes", with: "This is a note about the hearing!"
click_button("Save")

expect(page).to have_content("You have successfully updated", wait: 10)
expect(page).to have_content("This is a note about the hearing!")
end
end
1 change: 0 additions & 1 deletion spec/feature/hearings/daily_docket/vso_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@
expect(page).to_not have_content("Edit Hearing Day")
expect(page).to_not have_content("Lock Hearing Day")
expect(page).to_not have_content("Hearing Details")
expect(page).to_not have_content("Notes")
end
end
Loading