From c948751987e556b389c21ad2b598992a1f85d9fd Mon Sep 17 00:00:00 2001 From: Yeganathan S Date: Mon, 16 Dec 2024 20:56:57 +0530 Subject: [PATCH 1/2] safely handle cases where error.response is undefined (#2728) --- .../apps/merge_suggestions_worker/src/activities/common.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/apps/merge_suggestions_worker/src/activities/common.ts b/services/apps/merge_suggestions_worker/src/activities/common.ts index c55cfdb9e4..6f10a56e24 100644 --- a/services/apps/merge_suggestions_worker/src/activities/common.ts +++ b/services/apps/merge_suggestions_worker/src/activities/common.ts @@ -131,7 +131,7 @@ export async function mergeMembers( try { await axios(url, requestOptions) } catch (error) { - console.log(`Failed merging member wit status [${error.response.status}]. Skipping!`) + console.log(`Failed merging member wit status [${error.response?.status}]. Skipping!`) } } @@ -156,6 +156,6 @@ export async function mergeOrganizations( try { await axios(url, requestOptions) } catch (error) { - console.log(`Failed merging organization with status [${error.response.status}]. Skipping!`) + console.log(`Failed merging organization with status [${error.response?.status}]. Skipping!`) } } From 81832aa5cd663c1568e86be9d954e33ccc1a888a Mon Sep 17 00:00:00 2001 From: emlimlf <52259294+emlimlf@users.noreply.github.com> Date: Tue, 17 Dec 2024 01:57:17 +0800 Subject: [PATCH 2/2] Improve work history display (#2716) Signed-off-by: Efren Lim --- .../contributor-details-work-history.vue | 54 +++++++++++++---- .../contributor-details-work-history-item.vue | 44 ++------------ .../src/ui-kit/timeline/Timeline.stories.ts | 53 ++++++++++++++++ frontend/src/ui-kit/timeline/Timeline.vue | 60 +++++++++++++++++++ frontend/src/ui-kit/timeline/TimelineItem.vue | 19 ++++++ frontend/src/ui-kit/timeline/timeline.scss | 40 +++++++++++++ .../ui-kit/timeline/types/TimelineTypes.ts | 9 +++ 7 files changed, 231 insertions(+), 48 deletions(-) create mode 100644 frontend/src/ui-kit/timeline/Timeline.stories.ts create mode 100644 frontend/src/ui-kit/timeline/Timeline.vue create mode 100644 frontend/src/ui-kit/timeline/TimelineItem.vue create mode 100644 frontend/src/ui-kit/timeline/timeline.scss create mode 100644 frontend/src/ui-kit/timeline/types/TimelineTypes.ts diff --git a/frontend/src/modules/contributor/components/details/contributor-details-work-history.vue b/frontend/src/modules/contributor/components/details/contributor-details-work-history.vue index e6d5779321..b19d8b10fa 100644 --- a/frontend/src/modules/contributor/components/details/contributor-details-work-history.vue +++ b/frontend/src/modules/contributor/components/details/contributor-details-work-history.vue @@ -31,14 +31,17 @@
- -
+ + + + + +

No work experiences @@ -55,7 +58,7 @@

(false); const isEditModalOpen = ref(false); const editOrganization = ref(null); +const hoveredGroup = ref(null); -const orgs = computed(() => props.contributor.organizations); +const orgGrouped = computed(() => { + const grouped = groupBy(props.contributor.organizations, 'id'); + return Object.keys(grouped).map((id, index): TimelineGroup => ({ + id: index, + label: grouped[id][0].displayName, + labelLink: { + name: 'organizationView', + params: { + id, + }, + query: { + projectGroup: selectedProjectGroup.value?.id, + }, + }, + icon: grouped[id][0].logo, + items: grouped[id], + })); +}); +const minimumShownGroups = 3; +const shownGroups = computed(() => orgGrouped.value.slice(0, showMore.value ? orgGrouped.value.length : minimumShownGroups)); const masked = computed(() => isMasked(props.contributor)); + +const onGroupHover = (index: TimelineGroup | null) => { + hoveredGroup.value = index; +}; + + + +