Skip to content

Commit

Permalink
Add verify permission to support console
Browse files Browse the repository at this point in the history
  • Loading branch information
richardpattinson committed Sep 29, 2023
1 parent b1fdefd commit ef9fbe2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/staff/invitations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def configure_permitted_parameters
change_work_history_permission
reverse_decision_permission
support_console_permission
verify_permission
withdraw_permission
],
)
Expand Down
1 change: 1 addition & 0 deletions app/controllers/support_interface/staff_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def staff_params
:change_work_history_permission,
:reverse_decision_permission,
:support_console_permission,
:verify_permission,
:withdraw_permission,
)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<%= f.govuk_check_box :support_console_permission, 1, 0, multiple: false, link_errors: true,
label: { text: t("activerecord.attributes.staff.support_console_permission") } %>

<%= f.govuk_check_box :verify_permission, 1, 0, multiple: false, link_errors: true,
label: { text: t("activerecord.attributes.staff.verify_permission") } %>

<%= f.govuk_check_box :withdraw_permission, 1, 0, multiple: false, link_errors: true,
label: { text: t("activerecord.attributes.staff.withdraw_permission") } %>
<% end %>
9 changes: 9 additions & 0 deletions app/views/support_interface/staff/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@
)
end

summary_list.with_row do |row|
row.with_key { t("activerecord.attributes.staff.verify_permission") }
row.with_value { govuk_boolean_tag(staff.verify_permission) }
row.with_action(
href: edit_support_interface_staff_path(staff),
visually_hidden_text: t("activerecord.attributes.staff.verify_permission")
)
end

summary_list.with_row do |row|
row.with_key { t("activerecord.attributes.staff.withdraw_permission") }
row.with_value { govuk_boolean_tag(staff.withdraw_permission) }
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ en:
change_work_history_permission: Change work history references
reverse_decision_permission: Reverse decisions
support_console_permission: Support console access
verify_permission: Verify applicants
withdraw_permission: Withdraw
errors:
models:
Expand Down
1 change: 1 addition & 0 deletions spec/models/staff_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
# support_console_permission :boolean default(FALSE), not null
# unconfirmed_email :string
# unlock_token :string
# verify_permission :boolean default(FALSE), not null
# withdraw_permission :boolean default(FALSE), not null
# created_at :datetime not null
# updated_at :datetime not null
Expand Down

0 comments on commit ef9fbe2

Please sign in to comment.