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

Don't override UI changes in member affiliation v2 #1444

Merged
merged 6 commits into from
Sep 7, 2023

Conversation

sausage-todd
Copy link
Contributor

@sausage-todd sausage-todd commented Sep 7, 2023

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 the Member type definition and removes some redundant logic from the member enrichment service.

🤖 Generated by Copilot at c2c7de5

source and replace
enhance member data flow
autumn of refactor

Why

How

🤖 Generated by Copilot at c2c7de5

  • Import moment library and add source column to memberOrganization table in backend/src/database/repositories/memberRepository.ts (link, link)
  • Add organizationsReplace parameter to MemberRepository.update method and use it to decide whether to replace or merge the existing organizations of a member with the new ones (link)
  • Add source attribute to memberOrganization table in MemberRepository.fetch and MemberRepository.fetchWorkExperiences methods and use it to filter and display the organizations and work experiences of a member based on their origin (link, link)
  • Add replace parameter to MemberRepository.updateWorkExperiences method and use it to decide whether to delete the work experiences that are not present in the new data (link)
  • Modify the logic of MemberRepository.updateWorkExperiences method to use moment library to compare the dates of the work experiences in ISO format (link)
  • Remove sourceUi parameter and SQL condition that exclude the work experiences with the source ui from MemberRepository.fetchWorkExperiences method as they are no longer needed (link, link)
  • Fix typo in type definition of Member in backend/src/serverless/integrations/types/messageTypes.ts (link)
  • Add source property to organization data and use moment library to format the dates of the work experiences in ISO format in backend/src/services/memberService.ts (link)
  • Remove logic that assigns the company name and other details from the enrichment data to the member's organization in backend/src/services/premium/enrichment/memberEnrichmentService.ts as the organization data is fetched from the memberOrganization table instead (link)
  • Add organizationsReplace property to data objects in frontend/src/modules/member/components/form/member-form-organizations-drawer.vue and frontend/src/modules/member/pages/member-form-page.vue and pass it to the backend API call and the member-form-organizations-drawer component respectively (link, link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

@sausage-todd sausage-todd force-pushed the member-affiliation-dont-override-ui-changes branch from c2c7de5 to 8c42ad5 Compare September 7, 2023 13:15
@sausage-todd sausage-todd force-pushed the member-affiliation-dont-override-ui-changes branch from 8c42ad5 to c93696f Compare September 7, 2023 13:27
@sausage-todd sausage-todd merged commit d8135bc into main Sep 7, 2023
27 checks passed
@sausage-todd sausage-todd deleted the member-affiliation-dont-override-ui-changes branch September 7, 2023 15:17
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.

None yet

1 participant