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

exui-2227-handing of error #1769

Merged
merged 17 commits into from
Oct 24, 2024
Merged

exui-2227-handing of error #1769

merged 17 commits into from
Oct 24, 2024

Conversation

RiteshHMCTS
Copy link
Collaborator

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")

[ ] Yes
[x] No

OgunyemiO
OgunyemiO previously approved these changes Sep 10, 2024
Copy link
Contributor

@connorpgpmcelroy connorpgpmcelroy left a 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",
Copy link
Contributor

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

Copy link
Collaborator Author

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;
Copy link
Contributor

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

Copy link
Collaborator Author

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 });
Copy link
Contributor

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

Copy link
Collaborator Author

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">
Copy link
Contributor

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"

Copy link
Collaborator Author

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

Copy link

sonarcloud bot commented Oct 24, 2024

@RiteshHMCTS RiteshHMCTS merged commit b9e29d3 into master Oct 24, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants