-
Notifications
You must be signed in to change notification settings - Fork 8
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
exui-2227-handing of error #1769
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
package.json
Outdated
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "@hmcts/ccd-case-ui-toolkit", | |||
"version": "7.0.63", | |||
"version": "7.0.62-exui-2227-rc1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine for now but make sure that the release version is 7.0.64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will update when we going to release
@@ -32,6 +32,7 @@ export class CaseSpecificAccessRequestComponent implements OnDestroy, OnInit { | |||
|
|||
private readonly genericError = 'There is a problem'; | |||
private readonly specificReasonControlName = 'specificReason'; | |||
public getSpecificAccessError = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might do this on the OnInit instead of here - not sure what will happen if the component is redisplayed without being reloaded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andywilkinshmcts I'll keep here as not sure in above scenario.
@@ -100,7 +101,8 @@ export class CaseSpecificAccessRequestComponent implements OnDestroy, OnInit { | |||
this.router.navigate(['success'], { relativeTo: this.route }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would do
this.getSpecificAccessError = false;
on success
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -5,6 +5,10 @@ | |||
{{'Authorisation is needed to access this case.' | rpxTranslate}}<br /> | |||
{{'This could be because it\'s outside your jurisdiction, or you may be excluded from the case. If you request access to this case, it will be logged for auditing purposes.' | rpxTranslate}} | |||
</cut-alert> | |||
<div *ngIf="getSpecificAccessError" class="govuk-grid-column-two-thirds"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not use the component at the top, rather than adding a new element? You would need to change the ngIf to
*ngIf="(formGroup.invalid && submitted) || getSpecificAccessError"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I was thinking of to do use the same component but was getting issue in unit test where one of the the test keep on failing, but now it has been rectified and updated as mentioned above
Quality Gate passedIssues Measures |
JIRA link (if applicable)
https://tools.hmcts.net/jira/browse/EXUI-2227
Change description
handing of error
Does this PR introduce a breaking change? (check one with "x")