From c0db0a83f6224044b4a28cb4bb3e3a2067a44966 Mon Sep 17 00:00:00 2001 From: katamatata Date: Thu, 23 Oct 2025 17:17:38 +0200 Subject: [PATCH 1/2] Add meetingNotes field --- .../sf-api-con-mentoring-sessions.service.ts | 1 + .../profile-viewer/ProfileViewer.generated.ts | 93 +++++-------------- .../con-mentoring-session.entityprops.ts | 1 + .../con-mentoring-session.mapper.ts | 2 + .../con-mentoring-session.record.ts | 1 + .../con-mentoring-session.recordprops.ts | 1 + ...reate-con-mentoring-session.entityinput.ts | 8 +- .../mentorship-matches.generated.ts | 3 +- .../mentorship-matches.graphql | 1 + libs/data-access/src/lib/types/types.ts | 2 + .../src/lib/RedMentoringSession.ts | 1 + schema.graphql | 2 + 12 files changed, 44 insertions(+), 72 deletions(-) diff --git a/apps/nestjs-api/src/salesforce-api/sf-api-con-mentoring-sessions.service.ts b/apps/nestjs-api/src/salesforce-api/sf-api-con-mentoring-sessions.service.ts index b23d668c0..77a249fc4 100644 --- a/apps/nestjs-api/src/salesforce-api/sf-api-con-mentoring-sessions.service.ts +++ b/apps/nestjs-api/src/salesforce-api/sf-api-con-mentoring-sessions.service.ts @@ -29,6 +29,7 @@ export class SfApiConMentoringSessionsService { const cleanProps = pick(record.props, [ 'Date__c', 'Durations_in_Minutes__c', + 'Meeting_Notes__c', 'Mentor__c', 'Mentee__c', 'Mentorship_Match__c', diff --git a/apps/redi-connect/src/pages/app/profile/profile-viewer/ProfileViewer.generated.ts b/apps/redi-connect/src/pages/app/profile/profile-viewer/ProfileViewer.generated.ts index 9910a7df6..d4bd99902 100644 --- a/apps/redi-connect/src/pages/app/profile/profile-viewer/ProfileViewer.generated.ts +++ b/apps/redi-connect/src/pages/app/profile/profile-viewer/ProfileViewer.generated.ts @@ -1,59 +1,16 @@ // THIS FILE IS GENERATED, DO NOT EDIT! -import * as Types from '@talent-connect/data-access' +import * as Types from '@talent-connect/data-access'; -import { fetcher } from '@talent-connect/data-access' -import { useQuery, UseQueryOptions } from 'react-query' -import { AllConProfileFieldsFragmentDoc } from '../../../../../../../libs/data-access/src/lib/connect/con-profiles/con-profile.fragment.generated' +import { AllConProfileFieldsFragmentDoc } from '../../../../../../../libs/data-access/src/lib/connect/con-profiles/con-profile.fragment.generated'; +import { useQuery, UseQueryOptions } from 'react-query'; +import { fetcher } from '@talent-connect/data-access'; export type ProfilePageQueryQueryVariables = Types.Exact<{ - id: Types.Scalars['ID'] -}> + id: Types.Scalars['ID']; +}>; + + +export type ProfilePageQueryQuery = { __typename?: 'Query', conProfile: { __typename?: 'ConProfile', userId: string, age?: number | null, birthDate?: any | null, categories: Array, createdAt: any, doesNotHaveAvailableMentorshipSlot: boolean, email: string, expectations?: string | null, firstName: string, fullName: string, gender?: Types.Gender | null, githubProfileUrl?: string | null, id: string, languages?: Array | null, lastName: string, linkedInProfileUrl?: string | null, loopbackUserId: string, menteeCountCapacity?: number | null, mentee_highestEducationLevel?: Types.EducationLevel | null, mentee_occupationCategoryId?: Types.OccupationCategory | null, mentee_occupationJob_placeOfEmployment?: string | null, mentee_occupationJob_position?: string | null, mentee_occupationLookingForJob_what?: string | null, mentee_occupationOther_description?: string | null, mentee_occupationStudent_studyName?: string | null, mentee_occupationStudent_studyPlace?: string | null, mentor_isPartnershipMentor?: boolean | null, mentor_occupation?: string | null, mentor_workPlace?: string | null, optOutOfMenteesFromOtherRediLocation: boolean, personalDescription?: string | null, profileAvatarImageS3Key?: string | null, profileStatus: Types.ConnectProfileStatus, rediLocation: Types.RediLocation, slackUsername?: string | null, telephoneNumber?: string | null, updatedAt: any, userActivatedAt?: any | null, userType: Types.UserType, isSubscribedToCONMarketingEmails: boolean } }; -export type ProfilePageQueryQuery = { - __typename?: 'Query' - conProfile: { - __typename?: 'ConProfile' - userId: string - age?: number | null - birthDate?: any | null - categories: Array - createdAt: any - doesNotHaveAvailableMentorshipSlot: boolean - email: string - expectations?: string | null - firstName: string - fullName: string - gender?: Types.Gender | null - githubProfileUrl?: string | null - id: string - languages?: Array | null - lastName: string - linkedInProfileUrl?: string | null - loopbackUserId: string - menteeCountCapacity?: number | null - mentee_highestEducationLevel?: Types.EducationLevel | null - mentee_occupationCategoryId?: Types.OccupationCategory | null - mentee_occupationJob_placeOfEmployment?: string | null - mentee_occupationJob_position?: string | null - mentee_occupationLookingForJob_what?: string | null - mentee_occupationOther_description?: string | null - mentee_occupationStudent_studyName?: string | null - mentee_occupationStudent_studyPlace?: string | null - mentor_isPartnershipMentor?: boolean | null - mentor_occupation?: string | null - mentor_workPlace?: string | null - optOutOfMenteesFromOtherRediLocation: boolean - personalDescription?: string | null - profileAvatarImageS3Key?: string | null - profileStatus: Types.ConnectProfileStatus - rediLocation: Types.RediLocation - slackUsername?: string | null - telephoneNumber?: string | null - updatedAt: any - userActivatedAt?: any | null - userType: Types.UserType - isSubscribedToCONMarketingEmails: boolean - } -} export const ProfilePageQueryDocument = ` query ProfilePageQuery($id: ID!) { @@ -61,23 +18,19 @@ export const ProfilePageQueryDocument = ` ...AllConProfileFields } } - ${AllConProfileFieldsFragmentDoc}` + ${AllConProfileFieldsFragmentDoc}`; export const useProfilePageQueryQuery = < - TData = ProfilePageQueryQuery, - TError = unknown ->( - variables: ProfilePageQueryQueryVariables, - options?: UseQueryOptions -) => - useQuery( - ['ProfilePageQuery', variables], - fetcher( - ProfilePageQueryDocument, - variables - ), - options - ) + TData = ProfilePageQueryQuery, + TError = unknown + >( + variables: ProfilePageQueryQueryVariables, + options?: UseQueryOptions + ) => + useQuery( + ['ProfilePageQuery', variables], + fetcher(ProfilePageQueryDocument, variables), + options + ); -useProfilePageQueryQuery.getKey = ( - variables: ProfilePageQueryQueryVariables -) => ['ProfilePageQuery', variables] +useProfilePageQueryQuery.getKey = (variables: ProfilePageQueryQueryVariables) => ['ProfilePageQuery', variables]; +; diff --git a/libs/common-types/src/lib/con-mentoring-session/con-mentoring-session.entityprops.ts b/libs/common-types/src/lib/con-mentoring-session/con-mentoring-session.entityprops.ts index 379c2f62d..7e860b568 100644 --- a/libs/common-types/src/lib/con-mentoring-session/con-mentoring-session.entityprops.ts +++ b/libs/common-types/src/lib/con-mentoring-session/con-mentoring-session.entityprops.ts @@ -10,6 +10,7 @@ export class ConMentoringSessionEntityProps implements EntityProps { date: Date @Field((type) => MentoringSessionDuration) minuteDuration: MentoringSessionDuration + meetingNotes?: string @Field((type) => ID) mentorId: string diff --git a/libs/common-types/src/lib/con-mentoring-session/con-mentoring-session.mapper.ts b/libs/common-types/src/lib/con-mentoring-session/con-mentoring-session.mapper.ts index bb4f47f89..047c0435c 100644 --- a/libs/common-types/src/lib/con-mentoring-session/con-mentoring-session.mapper.ts +++ b/libs/common-types/src/lib/con-mentoring-session/con-mentoring-session.mapper.ts @@ -24,6 +24,7 @@ export class ConMentoringSessionMapper ] props.mentorId = raw.props.Mentor__c props.menteeId = raw.props.Mentee__c + props.meetingNotes = raw.props.Meeting_Notes__c props.mentorshipMatchId = raw.props.Mentorship_Match__c props.createdAt = raw.props.CreatedDate props.updatedAt = raw.props.LastModifiedDate @@ -42,6 +43,7 @@ export class ConMentoringSessionMapper props.Durations_in_Minutes__c = parseInt( srcProps.minuteDuration.replace('MIN', '') ) + props.Meeting_Notes__c = srcProps.meetingNotes props.Mentor__c = srcProps.mentorId props.Mentee__c = srcProps.menteeId props.Mentorship_Match__c = srcProps.mentorshipMatchId diff --git a/libs/common-types/src/lib/con-mentoring-session/con-mentoring-session.record.ts b/libs/common-types/src/lib/con-mentoring-session/con-mentoring-session.record.ts index 038d1e2db..8d3319355 100644 --- a/libs/common-types/src/lib/con-mentoring-session/con-mentoring-session.record.ts +++ b/libs/common-types/src/lib/con-mentoring-session/con-mentoring-session.record.ts @@ -19,6 +19,7 @@ export class ConMentoringSessionRecord extends Record Date) Date__c: Date Durations_in_Minutes__c: number + Meeting_Notes__c?: string Mentor__c: string Mentee__c: string diff --git a/libs/common-types/src/lib/con-mentoring-session/entity-dtos/create-con-mentoring-session.entityinput.ts b/libs/common-types/src/lib/con-mentoring-session/entity-dtos/create-con-mentoring-session.entityinput.ts index d513ae3b7..5e6415fda 100644 --- a/libs/common-types/src/lib/con-mentoring-session/entity-dtos/create-con-mentoring-session.entityinput.ts +++ b/libs/common-types/src/lib/con-mentoring-session/entity-dtos/create-con-mentoring-session.entityinput.ts @@ -7,5 +7,11 @@ class _ConMentoringSessionntityProps extends ConMentoringSessionEntityProps {} @InputType('CreateConMentoringSessionInput') export class CreateConMentoringSessionInput extends PickType( _ConMentoringSessionntityProps, - ['date', 'minuteDuration', 'menteeId', 'mentorshipMatchId'] as const + [ + 'date', + 'minuteDuration', + 'menteeId', + 'mentorshipMatchId', + 'meetingNotes', + ] as const ) {} diff --git a/libs/data-access/src/lib/connect/mentorship-matches/mentorship-matches.generated.ts b/libs/data-access/src/lib/connect/mentorship-matches/mentorship-matches.generated.ts index bef43f530..45c1ae815 100644 --- a/libs/data-access/src/lib/connect/mentorship-matches/mentorship-matches.generated.ts +++ b/libs/data-access/src/lib/connect/mentorship-matches/mentorship-matches.generated.ts @@ -15,7 +15,7 @@ export type FindMatchQueryVariables = Types.Exact<{ }>; -export type FindMatchQuery = { __typename?: 'Query', conMentorshipMatch: { __typename?: 'ConMentorshipMatch', id: string, applicationText?: string | null, expectationText?: string | null, status: Types.MentorshipMatchStatus, mentee: { __typename?: 'ConProfile', userId: string, id: string, fullName: string, firstName: string, lastName: string, email: string, languages?: Array | null, categories: Array, rediLocation: Types.RediLocation, profileAvatarImageS3Key?: string | null, telephoneNumber?: string | null, linkedInProfileUrl?: string | null, slackUsername?: string | null }, mentor: { __typename?: 'ConProfile', userId: string, id: string, fullName: string, firstName: string, lastName: string, email: string, languages?: Array | null, categories: Array, rediLocation: Types.RediLocation, profileAvatarImageS3Key?: string | null, telephoneNumber?: string | null, linkedInProfileUrl?: string | null, slackUsername?: string | null }, mentoringSessions: Array<{ __typename?: 'ConMentoringSession', id: string, date: any, minuteDuration: Types.MentoringSessionDuration }> } }; +export type FindMatchQuery = { __typename?: 'Query', conMentorshipMatch: { __typename?: 'ConMentorshipMatch', id: string, applicationText?: string | null, expectationText?: string | null, status: Types.MentorshipMatchStatus, mentee: { __typename?: 'ConProfile', userId: string, id: string, fullName: string, firstName: string, lastName: string, email: string, languages?: Array | null, categories: Array, rediLocation: Types.RediLocation, profileAvatarImageS3Key?: string | null, telephoneNumber?: string | null, linkedInProfileUrl?: string | null, slackUsername?: string | null }, mentor: { __typename?: 'ConProfile', userId: string, id: string, fullName: string, firstName: string, lastName: string, email: string, languages?: Array | null, categories: Array, rediLocation: Types.RediLocation, profileAvatarImageS3Key?: string | null, telephoneNumber?: string | null, linkedInProfileUrl?: string | null, slackUsername?: string | null }, mentoringSessions: Array<{ __typename?: 'ConMentoringSession', id: string, date: any, minuteDuration: Types.MentoringSessionDuration, meetingNotes?: string | null }> } }; export type ConProfileFieldsFragment = { __typename?: 'ConProfile', userId: string, id: string, fullName: string, firstName: string, lastName: string, email: string, languages?: Array | null, categories: Array, rediLocation: Types.RediLocation, profileAvatarImageS3Key?: string | null, telephoneNumber?: string | null, linkedInProfileUrl?: string | null, slackUsername?: string | null }; @@ -110,6 +110,7 @@ export const FindMatchDocument = ` id date minuteDuration + meetingNotes } } } diff --git a/libs/data-access/src/lib/connect/mentorship-matches/mentorship-matches.graphql b/libs/data-access/src/lib/connect/mentorship-matches/mentorship-matches.graphql index 7d96b3bf1..90b6a3c11 100644 --- a/libs/data-access/src/lib/connect/mentorship-matches/mentorship-matches.graphql +++ b/libs/data-access/src/lib/connect/mentorship-matches/mentorship-matches.graphql @@ -46,6 +46,7 @@ query findMatch($id: ID!) { id date minuteDuration + meetingNotes } } } diff --git a/libs/data-access/src/lib/types/types.ts b/libs/data-access/src/lib/types/types.ts index 4617e33b2..70cf724f1 100644 --- a/libs/data-access/src/lib/types/types.ts +++ b/libs/data-access/src/lib/types/types.ts @@ -53,6 +53,7 @@ export type ConMentoringSession = { createdAt: Scalars['DateTime']; date: Scalars['DateTime']; id: Scalars['ID']; + meetingNotes?: Maybe; menteeId: Scalars['ID']; mentorId: Scalars['ID']; mentorshipMatchId: Scalars['ID']; @@ -194,6 +195,7 @@ export enum ConnectProfileStatus { export type CreateConMentoringSessionInput = { date: Scalars['DateTime']; + meetingNotes?: InputMaybe; menteeId: Scalars['ID']; mentorshipMatchId: Scalars['ID']; minuteDuration: MentoringSessionDuration; diff --git a/libs/shared-types/src/lib/RedMentoringSession.ts b/libs/shared-types/src/lib/RedMentoringSession.ts index 397539184..c8ae2adca 100644 --- a/libs/shared-types/src/lib/RedMentoringSession.ts +++ b/libs/shared-types/src/lib/RedMentoringSession.ts @@ -9,4 +9,5 @@ export type RedMentoringSession = { menteeId?: string date: Date minuteDuration: MentoringSessionDurationOption + meetingNotes?: string } diff --git a/schema.graphql b/schema.graphql index ab361293b..d6489363b 100644 --- a/schema.graphql +++ b/schema.graphql @@ -32,6 +32,7 @@ type ConMentoringSession { createdAt: DateTime! date: DateTime! id: ID! + meetingNotes: String menteeId: ID! mentorId: ID! mentorshipMatchId: ID! @@ -167,6 +168,7 @@ enum ConnectProfileStatus { input CreateConMentoringSessionInput { date: DateTime! + meetingNotes: String menteeId: ID! mentorshipMatchId: ID! minuteDuration: MentoringSessionDuration! From cf38cc968084f493224df0b17eda1c51585dd97d Mon Sep 17 00:00:00 2001 From: katamatata Date: Mon, 5 Jan 2026 15:04:13 +0100 Subject: [PATCH 2/2] Add mentoring notes field, wip --- .../organisms/modules/MContacts.scss | 1 + .../organisms/modules/MSessions.scss | 4 +-- .../organisms/modules/MSessions.tsx | 31 ++++++++++++++++++- .../src/pages/app/mentorship/Mentorship.tsx | 14 ++++----- .../src/lib/molecules/Module.scss | 2 +- .../src/lib/molecules/Module.tsx | 8 +++-- 6 files changed, 47 insertions(+), 13 deletions(-) diff --git a/apps/redi-connect/src/components/organisms/modules/MContacts.scss b/apps/redi-connect/src/components/organisms/modules/MContacts.scss index a38cefd62..813931b59 100644 --- a/apps/redi-connect/src/components/organisms/modules/MContacts.scss +++ b/apps/redi-connect/src/components/organisms/modules/MContacts.scss @@ -5,6 +5,7 @@ &__row { display: flex; margin-bottom: 0.5rem; + overflow-wrap: anywhere; &__label { color: $grey; diff --git a/apps/redi-connect/src/components/organisms/modules/MSessions.scss b/apps/redi-connect/src/components/organisms/modules/MSessions.scss index b819567ae..d2f907545 100644 --- a/apps/redi-connect/src/components/organisms/modules/MSessions.scss +++ b/apps/redi-connect/src/components/organisms/modules/MSessions.scss @@ -29,11 +29,11 @@ width: 2.5rem; height: 2.5rem; padding: 0.5rem; - margin: 0 -0.5rem; - border-radius: 50%; + margin: 0 -0.2rem; &:hover { background-color: $redi-orange-extra-light; + border-radius: 50%; } } } diff --git a/apps/redi-connect/src/components/organisms/modules/MSessions.tsx b/apps/redi-connect/src/components/organisms/modules/MSessions.tsx index 1b52bc45c..4044ec11a 100644 --- a/apps/redi-connect/src/components/organisms/modules/MSessions.tsx +++ b/apps/redi-connect/src/components/organisms/modules/MSessions.tsx @@ -8,6 +8,7 @@ import { Button, FormDatePicker, FormSelect, + FormTextArea, Icon, Modal, Module, @@ -32,6 +33,9 @@ const formMentoringSessionDurationOptions = Object.values( interface AddSessionProps { onClickHandler: Function } +interface ExpandSessionProps { + setShowText: Function +} const AddSession = ({ onClickHandler }: AddSessionProps) => ( ( interface FormValues { date: Date minuteDuration: MentoringSessionDuration + meetingNotes?: string } const initialFormValues: FormValues = { date: new Date(), minuteDuration: MentoringSessionDuration.Min60, + meetingNotes: '', } const validationSchema = Yup.object({ @@ -59,10 +65,14 @@ const validationSchema = Yup.object({ [...Object.values(MentoringSessionDuration)], 'Please select a duration' ), + meetingNotes: Yup.string().label('Please provide a meeting note.'), }) interface MSessions { - sessions: Pick[] + sessions: Pick< + ConMentoringSession, + 'id' | 'date' | 'minuteDuration' | 'meetingNotes' + >[] menteeId: string editable?: boolean mentorshipMatchId: string @@ -80,6 +90,15 @@ const MSessions = ({ const [showAddSession, setShowAddSession] = useState(false) + const [showText, setShowText] = useState(false) + const ExpandSessions = ({ setShowText }: ExpandSessionProps) => ( + setShowText(!showText)} + /> + ) + const submitForm = async ( values: FormValues, actions: FormikHelpers @@ -122,6 +141,7 @@ const MSessions = ({ } buttons={editable && } > {sessions.length > 0 ? ( @@ -132,6 +152,8 @@ const MSessions = ({ {session.minuteDuration.replace('MIN', '')} min +

+ {showText && session.meetingNotes} ))} @@ -172,6 +194,13 @@ const MSessions = ({ items={formMentoringSessionDurationOptions} formik={formik} /> + diff --git a/apps/redi-connect/src/pages/app/mentorship/Mentorship.tsx b/apps/redi-connect/src/pages/app/mentorship/Mentorship.tsx index 3211b3b7b..4936789e4 100644 --- a/apps/redi-connect/src/pages/app/mentorship/Mentorship.tsx +++ b/apps/redi-connect/src/pages/app/mentorship/Mentorship.tsx @@ -97,13 +97,6 @@ function Mentorship() { profile={viewProfile} linkTo={`/app/mentorships/profile/${viewProfile.id}`} /> - - + + diff --git a/libs/shared-atomic-design-components/src/lib/molecules/Module.scss b/libs/shared-atomic-design-components/src/lib/molecules/Module.scss index e32f5f985..19db59be8 100644 --- a/libs/shared-atomic-design-components/src/lib/molecules/Module.scss +++ b/libs/shared-atomic-design-components/src/lib/molecules/Module.scss @@ -19,6 +19,6 @@ } &:not(:last-child) { - margin-top: 1.5rem; + margin-bottom: 1.5rem; } } diff --git a/libs/shared-atomic-design-components/src/lib/molecules/Module.tsx b/libs/shared-atomic-design-components/src/lib/molecules/Module.tsx index 97a46eaea..0909c7505 100644 --- a/libs/shared-atomic-design-components/src/lib/molecules/Module.tsx +++ b/libs/shared-atomic-design-components/src/lib/molecules/Module.tsx @@ -6,18 +6,22 @@ import './Module.scss' interface Props { title: string children: React.ReactNode + toggles?: React.ReactNode buttons?: React.ReactNode className?: string } function Module(props: Props) { - const { title, children, buttons, className } = props + const { title, children, toggles, buttons, className } = props return (
{title} -
{buttons && buttons}
+
+
{toggles && toggles}
+
{buttons && buttons}
+
{children}