Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #219 from sef-global/development
Browse files Browse the repository at this point in the history
Release ScholarX v1.2.4
  • Loading branch information
Gravewalker666 authored Jul 26, 2021
2 parents a83c0c6 + 0edb888 commit c669c9b
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 5 deletions.
7 changes: 6 additions & 1 deletion src/scenes/Dashboard/scenes/ManageMentees/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { useParams } from 'react-router';
import { API_URL } from '../../../../constants';
import { Mentee } from '../../../../types';
import styles from '../../styles.css';
import StatusTag from '../ManageMentors/components/StatusTag';

const { Title } = Typography;
const { confirm } = Modal;
Expand Down Expand Up @@ -112,10 +113,14 @@ function ManageMentees() {
}
description={item.profile.headline}
/>
<span>
<span className={styles.mentorNameSpan}>
{item.profile.email}
</span>
<span className={styles.mentorNameSpan}>
Mentor: {item.mentor.profile.firstName}{' '}
{item.mentor.profile.lastName}
</span>
<StatusTag state={item.state} />
</List.Item>
)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ function MentorRow({ mentor, programState }: Props) {
}
description={mentor.profile.headline}
/>
<span className={styles.mentorNameSpan}>{mentor.profile.email}</span>
</List.Item>
<Drawer
width={640}
Expand Down
4 changes: 4 additions & 0 deletions src/scenes/Dashboard/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@
padding-right: 40px;
}

.mentorNameSpan{
padding-right: 2rem;
}

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const { Paragraph, Title, Text } = Typography;
function MentorProgramCard({
program,
buttonText,
state,
isRejected,
href,
}: MentorProgramCardProps) {
Expand Down Expand Up @@ -39,13 +40,12 @@ function MentorProgramCard({
</Title>
</Col>
<Col span={11} className={styles.programActionButton}>
{isRejected ? (
<Text type={'danger'}>Rejected</Text>
) : (
{isRejected ? <Text type={'danger'}>Rejected</Text> : null}
{state !== 'MENTEE_APPLICATION' && !isRejected ? (
<Button type="primary" href={href}>
{buttonText}
</Button>
)}
) : null}
</Col>
</Row>
<Paragraph>{program.headline}</Paragraph>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,13 @@ export interface MentorProgramCardProps {
href?: string;
buttonText?: string;
isRejected: boolean;
state:
| 'CREATED'
| 'MENTOR_APPLICATION'
| 'MENTOR_SELECTION'
| 'MENTEE_APPLICATION'
| 'MENTEE_SELECTION'
| 'MENTOR_CONFIRMATION'
| 'ONGOING'
| 'COMPLETED';
}
3 changes: 3 additions & 0 deletions src/scenes/Home/components/MentorPrograms/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ function MentorPrograms() {
href={`/program/${program.id}/mentor/edit`}
buttonText={'Edit Application'}
isRejected={false}
state={program.state}
/>
))}
{approvedMentorPrograms.map((program: SavedProgram) => (
Expand All @@ -159,13 +160,15 @@ function MentorPrograms() {
href={`/mentor/program/${program.id}`}
buttonText={'Manage'}
isRejected={false}
state={program.state}
/>
))}
{rejectedMentorPrograms.map((program: SavedProgram) => (
<MentorProgramCard
key={program.id}
program={program}
isRejected={true}
state={program.state}
/>
))}
</Row>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ function MenteeRow({ mentee, programState }: StatusTagProps) {
}
description={mentee.profile.headline}
/>
<span>{mentee.profile.email}</span>
</List.Item>
);
}
Expand Down

0 comments on commit c669c9b

Please sign in to comment.