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 "lthompson/APPEALS-26633" #19239

Merged
merged 1 commit into from
Aug 23, 2023
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
9 changes: 0 additions & 9 deletions app/controllers/organizations/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def update
adjust_admin_rights
end

update_user_meeting_type
render json: { users: json_administered_users([user_to_modify]) }, status: :ok
end

Expand Down Expand Up @@ -68,14 +67,6 @@ def adjust_admin_rights
end
end

def update_user_meeting_type
new_meeting_type = params.dig(:attributes, :meeting_type)

if organization["url"] == HearingsManagement.singleton.url && new_meeting_type
OrganizationsUser.update_user_conference_type(user_to_modify, new_meeting_type)
end
end

def organization_url
params[:organization_url]
end
Expand Down
6 changes: 0 additions & 6 deletions app/models/organizations_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ def remove_admin_rights_from_user(user, organization)
existing_record(user, organization)&.update!(admin: false)
end

def update_user_conference_type(user, new_meeting_type)
if user.meeting_type
user.update!(meeting_type: new_meeting_type)
end
end

def remove_user_from_organization(user, organization)
if user_is_judge_of_team?(user, organization)
fail Caseflow::Error::ActionForbiddenError, message: COPY::JUDGE_TEAM_REMOVE_JUDGE_ERROR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ class WorkQueue::AdministeredUserSerializer < WorkQueue::UserSerializer
params[:organization].dvc&.eql?(object)
end
end
attribute :meeting_type
end
1 change: 0 additions & 1 deletion client/COPY.json
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,6 @@
"USER_MANAGEMENT_GIVE_USER_ADMIN_RIGHTS_BUTTON_TEXT": "Add admin rights",
"USER_MANAGEMENT_REMOVE_USER_ADMIN_RIGHTS_BUTTON_TEXT": "Remove admin rights",
"USER_MANAGEMENT_REMOVE_USER_FROM_ORG_BUTTON_TEXT": "Remove from team",
"USER_MANAGEMENT_SELECT_HEARINGS_CONFERENCE_TYPE": "Schedule hearings using:",
"MEMBERSHIP_REQUEST_ACTION_SUCCESS_TITLE": "You successfully %s %s's request",
"MEMBERSHIP_REQUEST_ACTION_SUCCESS_MESSAGE": "The user was %s regular member access to %s.",
"VHA_MEMBERSHIP_REQUEST_AUTOMATIC_VHA_ACCESS_NOTE": "Note: If you are requesting specialized access and are not a member of the general VHA group, you will automatically be given access to the general VHA group if your request is approved.",
Expand Down
55 changes: 16 additions & 39 deletions client/app/queue/OrganizationUsers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { LOGO_COLORS } from '../constants/AppConstants';
import COPY from '../../COPY';
import LoadingDataDisplay from '../components/LoadingDataDisplay';
import MembershipRequestTable from './MembershipRequestTable';
import SelectConferenceTypeRadioField from './SelectConferenceTypeRadioField';

const userStyle = css({
margin: '.5rem 0 .5rem',
Expand All @@ -39,17 +38,11 @@ const buttonStyle = css({
const buttonContainerStyle = css({
borderBottom: '1rem solid gray',
borderWidth: '1px',
padding: '.5rem 7rem 2rem 0',
display: 'flex',
justifyContent: 'space-between',
flexWrap: 'wrap'
padding: '.5rem 0 2rem',
});
const listStyle = css({
listStyle: 'none'
});
const radioContainerStyle = css({
padding: '-5rem 5rem 2rem 2rem',
});

export default class OrganizationUsers extends React.PureComponent {
constructor(props) {
Expand Down Expand Up @@ -255,34 +248,18 @@ export default class OrganizationUsers extends React.PureComponent {
const style = i === 0 ? topUserStyle : userStyle;

return <React.Fragment key={user.id}>
<div>
<ul>
<li key={user.id} {...style}>{this.formatName(user)}
{ judgeTeam && admin && <strong> ( {COPY.USER_MANAGEMENT_JUDGE_LABEL} )</strong> }
{ dvcTeam && dvc && <strong> ( {COPY.USER_MANAGEMENT_DVC_LABEL} )</strong> }
{ judgeTeam && !admin && <strong> ( {COPY.USER_MANAGEMENT_ATTORNEY_LABEL} )</strong> }
{ (judgeTeam || dvcTeam) && admin && <strong> ( {COPY.USER_MANAGEMENT_ADMIN_LABEL} )</strong> }
</li>
{ (judgeTeam || dvcTeam) && admin ?
<div {...topUserBorder}></div > :
<div {...buttonContainerStyle}>
<div>
{ (judgeTeam || dvcTeam) ? '' : this.adminButton(user, admin) }
{ this.removeUserButton(user) }
</div>
{ this.state.organizationName === 'Hearings Management' &&
<div {...radioContainerStyle}>
<SelectConferenceTypeRadioField
key={`${user.id}-conference-selection`}
name={user.id}
meetingType={user.attributes.meeting_type}
organization={this.props.organization}
user={user} />
</div>
}
</div> }
</ul>
</div>
<li key={user.id} {...style}>{this.formatName(user)}
{ judgeTeam && admin && <strong> ( {COPY.USER_MANAGEMENT_JUDGE_LABEL} )</strong> }
{ dvcTeam && dvc && <strong> ( {COPY.USER_MANAGEMENT_DVC_LABEL} )</strong> }
{ judgeTeam && !admin && <strong> ( {COPY.USER_MANAGEMENT_ATTORNEY_LABEL} )</strong> }
{ (judgeTeam || dvcTeam) && admin && <strong> ( {COPY.USER_MANAGEMENT_ADMIN_LABEL} )</strong> }
</li>
{ (judgeTeam || dvcTeam) && admin ?
<div {...topUserBorder}></div> :
<div {...buttonContainerStyle}>
{ (judgeTeam || dvcTeam) ? '' : this.adminButton(user, admin) }
{ this.removeUserButton(user) }
</div> }
</React.Fragment>;
});

Expand All @@ -308,10 +285,10 @@ export default class OrganizationUsers extends React.PureComponent {
<div>
<h2>{COPY.USER_MANAGEMENT_EDIT_USER_IN_ORG_LABEL}</h2>
<ul {...listStyle}>
{ (judgeTeam || dvcTeam) ? '' : <ul><li><strong>{COPY.USER_MANAGEMENT_ADMIN_RIGHTS_HEADING}</strong>{COPY.USER_MANAGEMENT_ADMIN_RIGHTS_DESCRIPTION}</li></ul> }
<ul><li><strong>{COPY.USER_MANAGEMENT_REMOVE_USER_HEADING}</strong>{ judgeTeam ?
{ (judgeTeam || dvcTeam) ? '' : <li><strong>{COPY.USER_MANAGEMENT_ADMIN_RIGHTS_HEADING}</strong>{COPY.USER_MANAGEMENT_ADMIN_RIGHTS_DESCRIPTION}</li> }
<li><strong>{COPY.USER_MANAGEMENT_REMOVE_USER_HEADING}</strong>{ judgeTeam ?
COPY.USER_MANAGEMENT_JUDGE_TEAM_REMOVE_USER_DESCRIPTION :
COPY.USER_MANAGEMENT_REMOVE_USER_DESCRIPTION }</li></ul>
COPY.USER_MANAGEMENT_REMOVE_USER_DESCRIPTION }</li>
</ul>
</div>
<ul>{listOfUsers}</ul>
Expand Down
48 changes: 0 additions & 48 deletions client/app/queue/SelectConferenceTypeRadioField.jsx

This file was deleted.

80 changes: 0 additions & 80 deletions client/test/app/queue/SelectConferenceTypeRadioField.test.js

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions db/migrate/20230726201514_add_meeting_type_to_users.rb

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading