Don't override UI changes in member affiliation v2 #1444
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed ✍️
What
🤖 Generated by Copilot at c2c7de5
This pull request adds the
source
attribute to the member's organization and work experience data in the backend and frontend. It also adds the option to replace or merge the existing organizations when updating a member's profile. It also fixes a typo in theMember
type definition and removes some redundant logic from the member enrichment service.
🤖 Generated by Copilot at c2c7de5
Why
How
🤖 Generated by Copilot at c2c7de5
moment
library and addsource
column tomemberOrganization
table inbackend/src/database/repositories/memberRepository.ts
(link, link)organizationsReplace
parameter toMemberRepository.update
method and use it to decide whether to replace or merge the existing organizations of a member with the new ones (link)source
attribute tomemberOrganization
table inMemberRepository.fetch
andMemberRepository.fetchWorkExperiences
methods and use it to filter and display the organizations and work experiences of a member based on their origin (link, link)replace
parameter toMemberRepository.updateWorkExperiences
method and use it to decide whether to delete the work experiences that are not present in the new data (link)MemberRepository.updateWorkExperiences
method to usemoment
library to compare the dates of the work experiences in ISO format (link)sourceUi
parameter and SQL condition that exclude the work experiences with the sourceui
fromMemberRepository.fetchWorkExperiences
method as they are no longer needed (link, link)Member
inbackend/src/serverless/integrations/types/messageTypes.ts
(link)source
property to organization data and usemoment
library to format the dates of the work experiences in ISO format inbackend/src/services/memberService.ts
(link)backend/src/services/premium/enrichment/memberEnrichmentService.ts
as the organization data is fetched from thememberOrganization
table instead (link)organizationsReplace
property to data objects infrontend/src/modules/member/components/form/member-form-organizations-drawer.vue
andfrontend/src/modules/member/pages/member-form-page.vue
and pass it to the backend API call and themember-form-organizations-drawer
component respectively (link, link)Checklist ✅
Feature
,Improvement
, orBug
.