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; +}; + + + +