@@ -17,6 +17,7 @@ export default async function Page(props: {
1717 readonly params : Promise < {
1818 readonly exceptionId : string ;
1919 } > ;
20+ readonly searchParams ?: Promise < { readonly edit ?: string } > ;
2021} ) {
2122 const session = await auth ( ) ;
2223 const isCohortManager = await canAccessCohortManager ( session ) ;
@@ -27,6 +28,10 @@ export default async function Page(props: {
2728
2829 const params = await props . params ;
2930 const exceptionId = Number ( params . exceptionId ) ;
31+ const resolvedSearchParams = props . searchParams
32+ ? await props . searchParams
33+ : { } ;
34+ const isEditMode = resolvedSearchParams . edit === "true" ;
3035
3136 try {
3237 const exception = await fetchExceptions ( exceptionId ) ;
@@ -58,10 +63,6 @@ export default async function Page(props: {
5863 ? `, ${ exception . ExceptionDetails . ParticipantAddressLine5 } `
5964 : ""
6065 } , ${ exception . ExceptionDetails . ParticipantPostCode } `,
61- contactDetails : {
62- phoneNumber : exception . ExceptionDetails . TelephoneNumberHome ,
63- email : exception . ExceptionDetails . EmailAddressHome ,
64- } ,
6566 primaryCareProvider : exception . ExceptionDetails . PrimaryCareProvider ,
6667 serviceNowId : exception . ServiceNowId ?? "" ,
6768 serviceNowCreatedDate : exception . ServiceNowCreatedDate ,
@@ -94,7 +95,7 @@ export default async function Page(props: {
9495 Local reference (exception ID): { exceptionDetails . exceptionId }
9596 </ span >
9697 </ h1 >
97- { exceptionDetails . serviceNowId && (
98+ { exceptionDetails . serviceNowId && ! isEditMode && (
9899 < dl
99100 className = "nhsuk-summary-list"
100101 data-testid = "exception-details-labels"
@@ -148,10 +149,11 @@ export default async function Page(props: {
148149 className = "nhsuk-summary-list__actions"
149150 data-testid = "change-link"
150151 >
151- < a href = "# " >
152+ < a href = "?edit=true#exception-status " >
152153 Change{ " " }
153154 < span className = "nhsuk-u-visually-hidden" >
154155 ServiceNow Case ID
156+ { isEditMode }
155157 </ span >
156158 </ a >
157159 </ dd >
@@ -160,6 +162,7 @@ export default async function Page(props: {
160162 ) }
161163 < ParticipantInformationPanel
162164 exceptionDetails = { exceptionDetails }
165+ isEditMode = { isEditMode }
163166 />
164167 </ div >
165168 </ div >
0 commit comments