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

fix: Fetch announcement with the edit button is clicked #724

Conversation

goemen
Copy link
Contributor

@goemen goemen commented Sep 5, 2024

Description

The code changes in this commit add error handling for the case when the retrieval of an announcement fails. When the editAnnouncement function is called, it now makes an API request to retrieve the announcement using the getAnnouncement method from the ApiService. If the retrieval is successful, the announcement is set in the announcementSelectionStore and the user is redirected to the edit announcement page. However, if the retrieval fails, an error message is displayed using the NotificationService.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have already been accepted and merged

Further comments


Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are deployed in:

The code changes in this commit add error handling for the case when the retrieval of an announcement fails. When the `editAnnouncement` function is called, it now makes an API request to retrieve the announcement using the `getAnnouncement` method from the `ApiService`. If the retrieval is successful, the announcement is set in the `announcementSelectionStore` and the user is redirected to the edit announcement page. However, if the retrieval fails, an error message is displayed using the `NotificationService`.

This commit also includes recent user commits and recent repository commits for reference.
@goemen goemen force-pushed the GEO-1085-the-save-as-draft-option-is-not-available-after-i-unpublish-a-published-announcement-and-go-into-edit-the-first-time branch from 7de79f8 to 940047f Compare September 5, 2024 19:52
Copy link

sonarcloud bot commented Sep 5, 2024

Quality Gate Passed Quality Gate passed for 'Pay Transparency admin-frontend'

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Sep 5, 2024

Quality Gate Passed Quality Gate passed for 'Pay Transparency backend-external'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Sep 5, 2024

Copy link

sonarcloud bot commented Sep 5, 2024

Quality Gate Passed Quality Gate passed for 'Pay Transparency doc-gen-service'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Sep 5, 2024

@jer3k jer3k merged commit 848bb6f into main Sep 5, 2024
32 checks passed
@jer3k jer3k deleted the GEO-1085-the-save-as-draft-option-is-not-available-after-i-unpublish-a-published-announcement-and-go-into-edit-the-first-time branch September 5, 2024 20:23
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.

2 participants