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

feat: [DHIS2-12615][DHIS2-12616][DHIS2-15906] Add new Relationship (Feature-parity) #3401

Merged
merged 133 commits into from
Oct 24, 2023

Conversation

eirikhaugstulen
Copy link
Contributor

@eirikhaugstulen eirikhaugstulen commented Aug 14, 2023

Add a new TEI Relationship through Search or Registration (Capture-parity-version)

Tech-summary:

  • Added optional props called renderTrackedEntitySearch and renderTrackedEntityRegistration with props and callbacks
  • Copied the code from TeiSearch and TeiRegister (old relationships) and refactored to fit the workflow of the relationship widget
  • Build a mutation-hook that should work for both search and add new TEI. This mutation takes in apiData which is sent to the server and a clientData that updates the UI
  • Relationships are invalidated and refetched when the mutation completes

Question points:

  • We do not show that the optimistically updated relationship is not persisted. Should this follow the same standard of StagesAndEventsWidget with a greyed out row?
  • When adding a relationship we do not have information about the dataElementType of the TEI attributes, which might lead to wrong formatting
  • Should we follow the same structure of removing the relationship when there's an error?
  • How do we display relationshipTypes where we use ProgramAttributes in the list, but the relationship is connected to another or no program. (Program is treated as a soft constraint on the backend and therefore also in our widget)

jasminenguyennn and others added 30 commits January 21, 2022 07:58
…ationship/DHIS2-12455_ListApplicableRelationshipTypes

# Conflicts:
#	i18n/en.pot
#	src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/EnrollmentPageDefault.container.js
…ationship/DHIS2-12455_ListApplicableRelationshipTypes

# Conflicts:
#	i18n/en.pot
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.2, 2.39.3,2.38.5 versions

@eirikhaugstulen eirikhaugstulen requested review from a team as code owners October 17, 2023 12:34
@eirikhaugstulen eirikhaugstulen changed the title feat: [DHIS2-12615][DHIS2-12616] Add new Relationship (Feature-parity) feat: [DHIS2-12615][DHIS2-12616][DHIS2-15906] Add new Relationship (Feature-parity) Oct 17, 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.2,2.39.4,2.38.5 versions

@eirikhaugstulen eirikhaugstulen changed the base branch from eh/epics/DHIS2-12361_TeiRelationshipWidget to master October 20, 2023 20:32
…_CreateNewTrackedEntity

# Conflicts:
#	CHANGELOG.md
#	package.json
#	packages/rules-engine/package.json
@eirikhaugstulen eirikhaugstulen merged commit cafed8d into master Oct 24, 2023
34 of 36 checks passed
@eirikhaugstulen eirikhaugstulen deleted the eh/feat/DHIS2-12616_CreateNewTrackedEntity branch October 24, 2023 10:01
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 100.42.0 🎉

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.

6 participants