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: [DHIS2-15694] Cancel button in Relationship #3471

Merged

Conversation

eirikhaugstulen
Copy link
Contributor

@eirikhaugstulen eirikhaugstulen commented Nov 27, 2023

The cancel button on the registration form takes the user to the wrong place.

TECH-Summary:

  • Extract the cancel functionality into a callback function
  • NewPage => Navigate to Working Lists
  • NewPage Relationship => Navigate back to new form
  • Enrollment Relationship => Navigate back to Enrollment Dashboard

@eirikhaugstulen eirikhaugstulen marked this pull request as ready for review November 28, 2023 08:18
@eirikhaugstulen eirikhaugstulen requested a review from a team as a code owner November 28, 2023 08:18
@@ -60,22 +58,12 @@ const TeiRegistrationEntryPlain =

const handleOnCancel = () => {
if (!isUserInteractionInProgress) {
navigateToWorkingListsPage();
onCancel();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @eirikhaugstulen,
Looks like onCancel is not properly defined when creating a new relationship from the /viewEvent page. Can you have a look?

Screenshot 2023-11-30 at 11 13 00

Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Should be fixed now 👍

Copy link
Contributor

@simonadomnisoru simonadomnisoru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👏

Copy link

github-actions bot commented Nov 30, 2023

Copy link

@geethaalwan geethaalwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested successfully on 2.41,2.40.3,2.39.4,2.38.6 versions

…CancelButtonInRelationship

# Conflicts:
#	src/core_modules/capture-core/components/Pages/common/TEIRelationshipsWidget/RegisterTei/DataEntry/TrackedEntityInstance/DataEntryTrackedEntityInstance.js
#	src/core_modules/capture-core/components/Pages/common/TEIRelationshipsWidget/RegisterTei/RegisterTei.container.js
@eirikhaugstulen eirikhaugstulen merged commit c1dfbdb into master Dec 5, 2023
37 checks passed
@eirikhaugstulen eirikhaugstulen deleted the eh/fix/DHIS2-15694_CancelButtonInRelationship branch December 5, 2023 12:13
dhis2-bot added a commit that referenced this pull request Dec 5, 2023
## [100.47.1](v100.47.0...v100.47.1) (2023-12-05)

### Bug Fixes

* [DHIS2-15694] Cancel button in Relationship ([#3471](#3471)) ([c1dfbdb](c1dfbdb))
* [DHIS2-15983] Enrollment date not assigned on form init ([#3475](#3475)) ([a13a766](a13a766))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 100.47.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants