Skip to content

Commit

Permalink
Merge pull request #434 from memser-spaceport/feat/details-page-irl-c…
Browse files Browse the repository at this point in the history
…ontribution

Feat/details page irl contribution
  • Loading branch information
Thangaraj-Ideas2it authored Dec 16, 2024
2 parents 9264185 + 19a4dba commit bb64a38
Show file tree
Hide file tree
Showing 20 changed files with 1,120 additions and 5 deletions.
18 changes: 17 additions & 1 deletion analytics/members.analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,20 @@ export const useMemberAnalytics = () => {
captureEvent(MEMBER_ANALYTICS_EVENTS.MEMBER_DETAIL_BIO_EDIT_RECORD_SAVE, params);
}

function onClickSeeMoreIrlContribution(user: IAnalyticsUserInfo | null){
const params = {
user,
};
captureEvent(MEMBER_ANALYTICS_EVENTS.ON_CLICK_SEE_MORE_BUTTON_IRL_CONTRIBUTIONS, params);
}

function onClickEventIrlContribution(user: IAnalyticsUserInfo | null){
const params = {
user,
};
captureEvent(MEMBER_ANALYTICS_EVENTS.MEMBER_DETAILS_ON_CLICK_IRL_CONTRIBUTIONS, params);
}

return {
onOfficeHourClicked,
onProjectContributionEditClicked,
Expand Down Expand Up @@ -349,6 +363,8 @@ export const useMemberAnalytics = () => {
onMemberDetailsBioEditClicked,
onMemberDetailsBioEditSaveClicked,
onMemberDetailsBioEditCancelClicked,
recordBioSave
recordBioSave,
onClickSeeMoreIrlContribution,
onClickEventIrlContribution,
};
};
18 changes: 17 additions & 1 deletion analytics/teams.analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,20 @@ export const useTeamAnalytics = () => {
captureEvent(TEAMS_ANALYTICS_EVENTS.TEAM_DETAIL_ABOUT_SAVE, params);
}

function onClickSeeMoreIrlContribution(user: IAnalyticsUserInfo | null){
const params = {
user,
};
captureEvent(TEAMS_ANALYTICS_EVENTS.ON_CLICK_SEE_MORE_BUTTON_IRL_CONTRIBUTIONS, params);
}

function onClickTeamIrlContribution(user: IAnalyticsUserInfo | null){
const params = {
user,
};
captureEvent(TEAMS_ANALYTICS_EVENTS. TEAM_DETAILS_ON_CLICK_IRL_CONTRIBUTIONS, params);
}

return {
onOfficeHoursSelected,
onFriendsOfProtocolSelected,
Expand Down Expand Up @@ -287,7 +301,9 @@ export const useTeamAnalytics = () => {
onTeamDetailAboutEditSaveClicked,
onTeamDetailAboutEditCancelClicked,
onTeamDetailAboutEditClicked,
recordAboutSave
recordAboutSave,
onClickSeeMoreIrlContribution,
onClickTeamIrlContribution
}

}
9 changes: 8 additions & 1 deletion app/members/[id]/page.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@
background: #fff;
}

.memberDetail__irlContribution{
box-shadow: 0px 4px 4px 0px #0f172a0a;
background: #fff;
min-height: 20px;
padding: 20px;
}

@media (min-width: 1024px) {
.memberDetail {
align-items: center;
Expand All @@ -86,7 +93,7 @@
border-radius: 8px;
}

.memberDetail__container__repositories {
.memberDetail__container__repositories, .memberDetail__irlContribution {
border-radius: 8px;
}
}
6 changes: 6 additions & 0 deletions app/members/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { getAllTeams } from '@/services/teams.service';
import MemberProjectContribution from '@/components/page/member-details/member-project-contribution';
import MemberOfficeHours from '@/components/page/member-details/member-office-hours';
import Bio from '@/components/page/member-details/bio';
import IrlMemberContribution from '@/components/page/member-details/member-irl-contributions';

const MemberDetails = async ({ params }: { params: any }) => {
const memberId = params?.id;
Expand Down Expand Up @@ -52,6 +53,11 @@ const MemberDetails = async ({ params }: { params: any }) => {
<MemberProjectContribution member={member} userInfo={userInfo} />
</div>
)}
{member.eventGuests.length > 0 && (
<div className={styles?.memberDetail__irlContribution}>
<IrlMemberContribution member={member} userInfo={userInfo} />
</div>
)}
{isLoggedIn && (
<div className={styles?.memberDetail__container__repositories}>
<MemberRepositories member={member} userInfo={userInfo} />
Expand Down
7 changes: 7 additions & 0 deletions app/teams/[id]/page.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@
min-height: 100px;
}

.teamDetail__irlContributions {
box-shadow: 0px 4px 4px 0px #0f172a0a;
background: #fff;
min-height: 20px;
padding: 20px;
}

@media (min-width: 1024px) {
.teamDetail {
align-items: center;
Expand Down
7 changes: 7 additions & 0 deletions app/teams/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { getFocusAreas } from '@/services/common.service';
import { IFocusArea } from '@/types/shared.types';
import SelectedFocusAreas from '@/components/core/selected-focus-area';
import TeamOfficeHours from '@/components/page/team-details/team-office-hours';
import TeamIrlContributions from '@/components/page/team-details/team-irl-contributions';

async function Page({ params }: { params: ITeamDetailParams }) {
const teamId: string = params?.id;
Expand Down Expand Up @@ -60,6 +61,12 @@ async function Page({ params }: { params: ITeamDetailParams }) {
<SelectedFocusAreas focusAreas={focusAreas} selectedFocusAreas={team.teamFocusAreas} />
</div>
)}
{/* Irl Contribuions */}
{team.eventGuests.length > 0 &&
<div className={styles?.teamDetail__irlContributions}>
<TeamIrlContributions team={team} userInfo={userInfo} members={members} teamId={teamId} />
</div>
}
{/* Member */}
<div className={styles?.teamDetail__container__member}>
<TeamMembers team={team} userInfo={userInfo} members={members} teamId={teamId} />
Expand Down
Loading

0 comments on commit bb64a38

Please sign in to comment.