Skip to content

Commit

Permalink
Merge pull request #2246 from ministryofjustice/update-api-types
Browse files Browse the repository at this point in the history
API model updates
  • Loading branch information
bobmeredith authored Dec 13, 2024
2 parents a141adb + d15f162 commit 90ec4a7
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ApprovedPremisesUserPermission = 'cas1_adhoc_booking_create' | 'cas1_application_withdraw_others' | 'cas1_assess_appealed_application' | 'cas1_assess_application' | 'cas1_assess_placement_application' | 'cas1_assess_placement_request' | 'cas1_booking_create' | 'cas1_booking_change_dates' | 'cas1_booking_withdraw' | 'cas1_out_of_service_bed_create' | 'cas1_process_an_appeal' | 'cas1_user_list' | 'cas1_user_management' | 'cas1_view_assigned_assessments' | 'cas1_view_cru_dashboard' | 'cas1_view_manage_tasks' | 'cas1_view_out_of_service_beds' | 'cas1_request_for_placement_withdraw_others' | 'cas1_space_booking_create' | 'cas1_space_booking_list' | 'cas1_space_booking_record_arrival' | 'cas1_space_booking_record_departure' | 'cas1_space_booking_record_non_arrival' | 'cas1_space_booking_record_keyworker' | 'cas1_space_booking_view' | 'cas1_space_booking_withdraw' | 'cas1_premises_view_capacity' | 'cas1_premises_view_summary' | 'cas1_reports_view';
export type ApprovedPremisesUserPermission = 'cas1_adhoc_booking_create' | 'cas1_application_withdraw_others' | 'cas1_assess_appealed_application' | 'cas1_assess_application' | 'cas1_assess_placement_application' | 'cas1_assess_placement_request' | 'cas1_booking_create' | 'cas1_booking_change_dates' | 'cas1_booking_withdraw' | 'cas1_out_of_service_bed_create' | 'cas1_process_an_appeal' | 'cas1_user_list' | 'cas1_user_management' | 'cas1_view_assigned_assessments' | 'cas1_view_cru_dashboard' | 'cas1_view_manage_tasks' | 'cas1_view_out_of_service_beds' | 'cas1_request_for_placement_withdraw_others' | 'cas1_space_booking_create' | 'cas1_space_booking_list' | 'cas1_space_booking_record_arrival' | 'cas1_space_booking_record_departure' | 'cas1_space_booking_record_non_arrival' | 'cas1_space_booking_record_keyworker' | 'cas1_space_booking_view' | 'cas1_space_booking_withdraw' | 'cas1_premises_view' | 'cas1_premises_manage' | 'cas1_reports_view';
2 changes: 1 addition & 1 deletion server/@types/shared/models/ApprovedPremisesUserRole.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ApprovedPremisesUserRole = 'assessor' | 'matcher' | 'future_manager' | 'workflow_manager' | 'cru_member' | 'cru_member_find_and_book_beta' | 'applicant' | 'role_admin' | 'report_viewer' | 'excluded_from_assess_allocation' | 'excluded_from_match_allocation' | 'excluded_from_placement_application_allocation' | 'appeals_manager' | 'janitor' | 'user_manager';
export type ApprovedPremisesUserRole = 'assessor' | 'matcher' | 'future_manager' | 'workflow_manager' | 'cru_member' | 'cru_member_find_and_book_beta' | 'cru_member_enable_out_of_service_beds' | 'applicant' | 'role_admin' | 'report_viewer' | 'excluded_from_assess_allocation' | 'excluded_from_match_allocation' | 'excluded_from_placement_application_allocation' | 'appeals_manager' | 'janitor' | 'user_manager';
5 changes: 5 additions & 0 deletions server/utils/users/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,15 @@ export const roleLabelDictionary: RoleLabelDictionary = {
label: 'CRU member',
hint: 'Manage out of service beds across all premises and areas',
},
cru_member_enable_out_of_service_beds: {
label: 'CRU member enable out of service beds',
hint: 'Enable out of service beds',
},
cru_member_find_and_book_beta: {
label: 'CRU member beta (find and book)',
hint: 'Create and amend space bookings',
},

report_viewer: {
label: 'Report Viewer',
hint: 'View and download reports',
Expand Down
10 changes: 10 additions & 0 deletions server/utils/users/userManagement.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ describe('userRolesSelectOptions', () => {
text: 'Excluded from placement application allocation',
value: 'excluded_from_placement_application_allocation',
},
{
selected: false,
text: 'CRU member enable out of service beds',
value: 'cru_member_enable_out_of_service_beds',
},
{ selected: false, text: 'CRU member beta (find and book)', value: 'cru_member_find_and_book_beta' },
{
selected: false,
Expand Down Expand Up @@ -153,6 +158,11 @@ describe('userRolesSelectOptions', () => {
text: 'Excluded from placement application allocation',
value: 'excluded_from_placement_application_allocation',
},
{
selected: false,
text: 'CRU member enable out of service beds',
value: 'cru_member_enable_out_of_service_beds',
},
{ selected: false, text: 'CRU member beta (find and book)', value: 'cru_member_find_and_book_beta' },
{
selected: false,
Expand Down
1 change: 1 addition & 0 deletions server/utils/users/userManagement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const userRoles: Record<RoleInUse, string> = {
excluded_from_assess_allocation: 'Excluded from assess allocation',
excluded_from_match_allocation: 'Excluded from match allocation',
excluded_from_placement_application_allocation: 'Excluded from placement application allocation',
cru_member_enable_out_of_service_beds: 'CRU member enable out of service beds',
cru_member_find_and_book_beta: 'CRU member beta (find and book)',
appeals_manager: 'Appeals manager',
future_manager: 'Future manager',
Expand Down

0 comments on commit 90ec4a7

Please sign in to comment.