From 5ef7586072cf4a4c3975d9fa474bd5e448311218 Mon Sep 17 00:00:00 2001
From: Anjula Shanaka <anjula@sack.edu.lk>
Date: Fri, 6 Aug 2021 16:57:28 +0530
Subject: [PATCH 1/4] Change the required message in mentor application (#231)

---
 .../Home/components/AddProgram/index.tsx      | 27 ++++++++++++++++---
 .../scenes/EditMentorApplication/index.tsx    | 11 +++++---
 .../Home/scenes/MentorApplication/index.tsx   |  9 +++++--
 3 files changed, 38 insertions(+), 9 deletions(-)

diff --git a/src/scenes/Home/components/AddProgram/index.tsx b/src/scenes/Home/components/AddProgram/index.tsx
index 36bf41a..9e18600 100644
--- a/src/scenes/Home/components/AddProgram/index.tsx
+++ b/src/scenes/Home/components/AddProgram/index.tsx
@@ -86,27 +86,46 @@ function AddProgram() {
             onFinish={addProgram}
             form={form}
           >
-            <Form.Item name="title" label="Title" rules={[{ required: true }]}>
+            <Form.Item
+              name="title"
+              label="Title"
+              rules={[
+                {
+                  required: true,
+                  message: 'Please provide a title for the program',
+                },
+              ]}
+            >
               <Input />
             </Form.Item>
             <Form.Item
               name="heading"
               label="Heading"
-              rules={[{ required: true }]}
+              rules={[{ required: true, message: 'Please provide a heading' }]}
             >
               <Input />
             </Form.Item>
             <Form.Item
               name="imgURL"
               label="Image URL"
-              rules={[{ required: true }]}
+              rules={[
+                {
+                  required: true,
+                  message: 'Please add a image URL for the program card',
+                },
+              ]}
             >
               <Input />
             </Form.Item>
             <Form.Item
               name="landingURL"
               label="Landing Page URL"
-              rules={[{ required: true }]}
+              rules={[
+                {
+                  required: true,
+                  message: 'Please add the link for the static page',
+                },
+              ]}
             >
               <Input />
             </Form.Item>
diff --git a/src/scenes/Home/scenes/EditMentorApplication/index.tsx b/src/scenes/Home/scenes/EditMentorApplication/index.tsx
index 933b4f5..3c51ad7 100644
--- a/src/scenes/Home/scenes/EditMentorApplication/index.tsx
+++ b/src/scenes/Home/scenes/EditMentorApplication/index.tsx
@@ -126,15 +126,20 @@ function MentorApplication() {
                     {responses.length > 0 &&
                       responses.map(
                         (question: QuestionResponse, index: number) => (
-                          <Row key={question.id.questionId}>
+                          <Row key={index}>
                             <Col span={16} offset={4}>
                               <Title level={4}>
                                 {index + 1}.{question.question.question}
                               </Title>
                               <Form.Item
-                                name={question.id.questionId}
+                                name={question.question.id}
                                 initialValue={question.response}
-                                rules={[{ required: true }]}
+                                rules={[
+                                  {
+                                    required: true,
+                                    message: 'Required',
+                                  },
+                                ]}
                               >
                                 <TextArea rows={5} />
                               </Form.Item>
diff --git a/src/scenes/Home/scenes/MentorApplication/index.tsx b/src/scenes/Home/scenes/MentorApplication/index.tsx
index d4a0772..24a8c25 100644
--- a/src/scenes/Home/scenes/MentorApplication/index.tsx
+++ b/src/scenes/Home/scenes/MentorApplication/index.tsx
@@ -116,14 +116,19 @@ function MentorApplication() {
                   >
                     {questions.length > 0 &&
                       questions.map((question: Question, index: number) => (
-                        <Row key={question.id}>
+                        <Row key={index}>
                           <Col span={16} offset={4}>
                             <Title level={4}>
                               {index + 1}.{question.question}
                             </Title>
                             <Form.Item
                               name={question.id}
-                              rules={[{ required: true }]}
+                              rules={[
+                                {
+                                  required: true,
+                                  message: 'Required',
+                                },
+                              ]}
                             >
                               <TextArea rows={5} />
                             </Form.Item>

From f59f4d73af4522775793485eb502cf7cc9c0cadc Mon Sep 17 00:00:00 2001
From: Anjula Shanaka <anjula@sack.edu.lk>
Date: Sat, 7 Aug 2021 21:26:30 +0530
Subject: [PATCH 2/4] Show my mentor button for mentees who have previously
 been mentors (#233)

Change the method of checking if the user is a mentor from checking the length to using a `.some` method to look for mentoring programs
---
 .../Home/components/ActivePrograms/index.tsx  | 41 +++++++++++--------
 1 file changed, 25 insertions(+), 16 deletions(-)

diff --git a/src/scenes/Home/components/ActivePrograms/index.tsx b/src/scenes/Home/components/ActivePrograms/index.tsx
index 4544142..148215e 100644
--- a/src/scenes/Home/components/ActivePrograms/index.tsx
+++ b/src/scenes/Home/components/ActivePrograms/index.tsx
@@ -179,20 +179,23 @@ function ActivePrograms() {
                         )}
                       {(program.state === 'MENTOR_CONFIRMATION' ||
                         program.state === 'ONGOING') &&
-                      !isUserAdmin &&
-                      user != null &&
-                      !mentoringPrograms.length ? (
-                        <Button
-                          type="primary"
-                          onClick={() =>
-                            history.push(
-                              `/program/${program.id}/mentor/confirmation`
-                            )
-                          }
-                        >
-                          My mentor
-                        </Button>
-                      ) : null}
+                        !isUserAdmin &&
+                        user != null &&
+                        !mentoringPrograms.some(
+                          (mentoringProgram) =>
+                            mentoringProgram.id == program.id
+                        ) && (
+                          <Button
+                            type="primary"
+                            onClick={() =>
+                              history.push(
+                                `/program/${program.id}/mentor/confirmation`
+                              )
+                            }
+                          >
+                            My mentor
+                          </Button>
+                        )}
                     </Col>
                   </Row>
                   {program.state === 'MENTOR_SELECTION' && !isUserAdmin && (
@@ -207,14 +210,20 @@ function ActivePrograms() {
                   )}
                   {program.state === 'MENTOR_CONFIRMATION' &&
                   !isUserAdmin &&
-                  (mentoringPrograms.length || user === null) ? (
+                  (user === null ||
+                    mentoringPrograms.some(
+                      (mentoringProgram) => mentoringProgram.id == program.id
+                    )) ? (
                     <Tag className={styles.tag} color="green">
                       Mentor Confirmation Period
                     </Tag>
                   ) : null}
                   {program.state === 'ONGOING' &&
                   !isUserAdmin &&
-                  (mentoringPrograms.length || user === null) ? (
+                  (mentoringPrograms.some(
+                    (mentoringProgram) => mentoringProgram.id == program.id
+                  ) ||
+                    user === null) ? (
                     <Tag className={styles.tag} color="green">
                       Ongoing
                     </Tag>

From fff1ea095f76c158a5ea28e5b023aec9bbb2fbee Mon Sep 17 00:00:00 2001
From: Heshan Andrews <45477334+Gravewalker666@users.noreply.github.com>
Date: Sun, 8 Aug 2021 11:55:14 +0530
Subject: [PATCH 3/4] Include scholarx video guide links as a fixed hover
 button (#236)

---
 .../Home/components/HelpButton/index.tsx      | 68 +++++++++++++++++++
 .../Home/components/HelpButton/styles.css     |  9 +++
 src/scenes/Home/index.tsx                     |  2 +
 .../scenes/EditMentorApplication/index.tsx    |  2 +
 .../Home/scenes/ManageMentees/index.tsx       |  2 +
 .../Home/scenes/MentorApplication/index.tsx   |  2 +
 .../Home/scenes/MentorConfirmation/index.tsx  |  2 +
 .../Home/scenes/RequestMentors/index.tsx      |  2 +
 8 files changed, 89 insertions(+)
 create mode 100644 src/scenes/Home/components/HelpButton/index.tsx
 create mode 100644 src/scenes/Home/components/HelpButton/styles.css

diff --git a/src/scenes/Home/components/HelpButton/index.tsx b/src/scenes/Home/components/HelpButton/index.tsx
new file mode 100644
index 0000000..fd96c1e
--- /dev/null
+++ b/src/scenes/Home/components/HelpButton/index.tsx
@@ -0,0 +1,68 @@
+import React from 'react';
+
+import { QuestionCircleOutlined } from '@ant-design/icons';
+import { Button, Popover, Typography } from 'antd';
+
+import styles from './styles.css';
+
+const { Paragraph, Title } = Typography;
+const content = (
+  <div>
+    <Title level={4}>Mentor</Title>
+    <Paragraph>
+      <ul>
+        <li>
+          <a
+            href="https://docs.google.com/document/d/1ZJeKxdAvHcPanXRoGP5rT-vkOTEfsYhrnqr1QVglS58/edit?usp=sharing"
+            target="_blank"
+            rel="noreferrer"
+          >
+            Mentor Guide
+          </a>
+        </li>
+        <li>
+          <a
+            href="https://drive.google.com/file/d/13b0xg3HdZeQohefYMY9gP8_r_G11pGFA/view?usp=sharing"
+            target="_blank"
+            rel="noreferrer"
+          >
+            Mentor Video Guide
+          </a>
+        </li>
+      </ul>
+    </Paragraph>
+    <Title level={4}>Mentee</Title>
+    <Paragraph>
+      <ul>
+        <li>
+          <a
+            href="https://drive.google.com/file/d/1vnW1bhNzETtPtiGTsphzBT2GQ6K0LuX9/view"
+            target="_blank"
+            rel="noreferrer"
+          >
+            Mentee Video Guide
+          </a>
+        </li>
+      </ul>
+    </Paragraph>
+  </div>
+);
+
+function HelpButton() {
+  return (
+    <div className={styles.helpPosition}>
+      <Popover placement="leftBottom" content={content} trigger="click">
+        <Button
+          type="primary"
+          shape="round"
+          size="large"
+          icon={<QuestionCircleOutlined />}
+        >
+          Watch Tutorial
+        </Button>
+      </Popover>
+    </div>
+  );
+}
+
+export default HelpButton;
diff --git a/src/scenes/Home/components/HelpButton/styles.css b/src/scenes/Home/components/HelpButton/styles.css
new file mode 100644
index 0000000..eb3bd0d
--- /dev/null
+++ b/src/scenes/Home/components/HelpButton/styles.css
@@ -0,0 +1,9 @@
+.helpPosition {
+    position: fixed;
+    right: 30px;
+    bottom: 100px;
+    z-index: 10;
+    display: flex;
+    flex-direction: column;
+    cursor: pointer;
+}
diff --git a/src/scenes/Home/index.tsx b/src/scenes/Home/index.tsx
index c2fd9c0..7e33414 100644
--- a/src/scenes/Home/index.tsx
+++ b/src/scenes/Home/index.tsx
@@ -8,6 +8,7 @@ import { trackPageWithGoogleAnalytics } from '../../util/google-analytics';
 import ActivePrograms from './components/ActivePrograms';
 import CompletedPrograms from './components/CompletedPrograms';
 import Footer from './components/Footer';
+import HelpButton from './components/HelpButton';
 import MenteePrograms from './components/MenteePrograms';
 import MentorPrograms from './components/MentorPrograms';
 import NavigationBar from './components/NavigationBar';
@@ -82,6 +83,7 @@ const Home = () => {
         </Row>
         <div className={styles.push} />
       </div>
+      <HelpButton />
       <div className={styles.footer}>
         <Footer />
       </div>
diff --git a/src/scenes/Home/scenes/EditMentorApplication/index.tsx b/src/scenes/Home/scenes/EditMentorApplication/index.tsx
index 3c51ad7..52f5418 100644
--- a/src/scenes/Home/scenes/EditMentorApplication/index.tsx
+++ b/src/scenes/Home/scenes/EditMentorApplication/index.tsx
@@ -19,6 +19,7 @@ import {
 } from '../../../../util/mentor-services';
 import { getProgramDetails } from '../../../../util/program-services';
 import Footer from '../../components/Footer';
+import HelpButton from '../../components/HelpButton';
 import NavigationBar from '../../components/NavigationBar';
 import Result from '../../components/ResultScreen';
 import mainStyles from '../../styles.css';
@@ -170,6 +171,7 @@ function MentorApplication() {
         </Spin>
         <div className={styles.push} />
       </div>
+      <HelpButton />
       <div className={styles.footer}>
         <Footer />
       </div>
diff --git a/src/scenes/Home/scenes/ManageMentees/index.tsx b/src/scenes/Home/scenes/ManageMentees/index.tsx
index 4cb85af..3f720ba 100644
--- a/src/scenes/Home/scenes/ManageMentees/index.tsx
+++ b/src/scenes/Home/scenes/ManageMentees/index.tsx
@@ -19,6 +19,7 @@ import { API_URL } from '../../../../constants';
 import { UserContext } from '../../../../index';
 import { Mentee, Profile, SavedProgram } from '../../../../types';
 import Footer from '../../components/Footer';
+import HelpButton from '../../components/HelpButton';
 import NavigationBar from '../../components/NavigationBar';
 import styles from '../../styles.css';
 import MenteeRow from './components/MenteeRow';
@@ -147,6 +148,7 @@ function ManageMentees() {
           </Row>
         </Spin>
       </div>
+      <HelpButton />
       <Footer />
     </>
   );
diff --git a/src/scenes/Home/scenes/MentorApplication/index.tsx b/src/scenes/Home/scenes/MentorApplication/index.tsx
index 24a8c25..e1011d8 100644
--- a/src/scenes/Home/scenes/MentorApplication/index.tsx
+++ b/src/scenes/Home/scenes/MentorApplication/index.tsx
@@ -19,6 +19,7 @@ import {
   getQuestions,
 } from '../../../../util/program-services';
 import Footer from '../../components/Footer';
+import HelpButton from '../../components/HelpButton';
 import NavigationBar from '../../components/NavigationBar';
 import Result from '../../components/ResultScreen';
 import mainStyles from '../../styles.css';
@@ -158,6 +159,7 @@ function MentorApplication() {
         </Spin>
         <div className={styles.push} />
       </div>
+      <HelpButton />
       <div className={styles.footer}>
         <Footer />
       </div>
diff --git a/src/scenes/Home/scenes/MentorConfirmation/index.tsx b/src/scenes/Home/scenes/MentorConfirmation/index.tsx
index 45acb72..932fb0c 100644
--- a/src/scenes/Home/scenes/MentorConfirmation/index.tsx
+++ b/src/scenes/Home/scenes/MentorConfirmation/index.tsx
@@ -26,6 +26,7 @@ import { API_URL } from '../../../../constants';
 import { UserContext } from '../../../../index';
 import { Mentor, Profile } from '../../../../types';
 import Footer from '../../components/Footer';
+import HelpButton from '../../components/HelpButton';
 import NavigationBar from '../../components/NavigationBar';
 import mainStyles from '../../styles.css';
 import styles from './styles.css';
@@ -257,6 +258,7 @@ function MentorConfirmation() {
           )}
         </Spin>
       </div>
+      <HelpButton />
       <Footer />
     </>
   );
diff --git a/src/scenes/Home/scenes/RequestMentors/index.tsx b/src/scenes/Home/scenes/RequestMentors/index.tsx
index 0b34ce2..ab7c247 100644
--- a/src/scenes/Home/scenes/RequestMentors/index.tsx
+++ b/src/scenes/Home/scenes/RequestMentors/index.tsx
@@ -10,6 +10,7 @@ import { API_URL } from '../../../../constants';
 import { UserContext } from '../../../../index';
 import { Profile, SavedProgram } from '../../../../types';
 import Footer from '../../components/Footer';
+import HelpButton from '../../components/HelpButton';
 import NavigationBar from '../../components/NavigationBar';
 import styles from '../../styles.css';
 import AppliedMentors from './components/AppliedMentors';
@@ -102,6 +103,7 @@ function RequestMentors() {
           </div>
         </Col>
       </Row>
+      <HelpButton />
       <Footer />
     </>
   );

From 32eab2c83fab87b829b072cdb47b13f13e04e453 Mon Sep 17 00:00:00 2001
From: Kumuditha Karunarathna <kumudithaudaya@gmail.com>
Date: Sun, 8 Aug 2021 14:28:56 +0530
Subject: [PATCH 4/4] Change mentee application instructions (#238)

---
 .../scenes/MenteeApplication/index.tsx            | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/scenes/Home/scenes/RequestMentors/scenes/MenteeApplication/index.tsx b/src/scenes/Home/scenes/RequestMentors/scenes/MenteeApplication/index.tsx
index d9ef10b..82fd3b1 100644
--- a/src/scenes/Home/scenes/RequestMentors/scenes/MenteeApplication/index.tsx
+++ b/src/scenes/Home/scenes/RequestMentors/scenes/MenteeApplication/index.tsx
@@ -167,11 +167,10 @@ function MenteeApplication() {
               {isFormVisible ? (
                 <>
                   <Text className={styles.textPadding}>
-                    Download the template from the link below and make a
-                    document containing your information. Upload the document to
-                    a cloud storage platfrom (Ex: GoogleDrive, iCloud, OneDrive,
-                    etc) and provide a link. Make sure the document is in pdf
-                    and format and it is accessible to anybody with the link.
+                    Make a copy of the document linked below and fill out your
+                    information. Save the google document and provide a link.
+                    Make sure the document is accessible to anybody with the
+                    link.
                   </Text>
                   <Form
                     layout="vertical"
@@ -187,7 +186,7 @@ function MenteeApplication() {
                         href={APPLICATION_TEMPLATE}
                         target="_blank"
                       >
-                        Download Template
+                        Template Document
                       </Button>
                     </Row>
                     <Form.Item
@@ -196,11 +195,11 @@ function MenteeApplication() {
                       rules={[
                         {
                           required: true,
-                          message: 'Please provide a Google Drive link!',
+                          message: 'Please provide a Google Doc link!',
                         },
                       ]}
                     >
-                      <Input placeholder={'Enter the google drive link here'} />
+                      <Input placeholder={'Enter the Google Doc link here'} />
                     </Form.Item>
                     <Row>
                       <Button type="primary" htmlType="submit">