-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Monthly-checking Feature for Mentees, Mentors and Admins #199
Conversation
… mentor and mentee side
- Refactor MonthlyChecking component to include UI changes for viewing submissions in both mentor and mentee side. - Add TagInput functionality to allow users to input and display tags for monthly check-ins.
…ogress Towards Goals; Prevent multiple submissions
Remove menteeName property from MonthlyCheckIn interface in types.ts Refactor useMonthlyCheckIns hook: Update return type to include MonthlyCheckIn[] Update formatDate function in utils.ts: Handle null and invalid date strings Add HistoryClockIcon component Add NewSubmissionsIcon component Refactor MentorFeedbackForm component: Update submit button styling Update MenteeCheckInSchema in schemas.ts: Update validation rules for generalUpdatesAndFeedback and progressTowardsGoals Add HistoryToggle component Add NotificationBadge component Refactor MenteeCheckIn component: Update remove button styling Refactor MenteeMonthlyChecking component: Update media link text and date format
…te media links handling
package.json
Outdated
"dotenv": "^16.0.3", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-hook-form": "^7.51.0", | ||
"react-intersection-observer": "^9.13.1", | ||
"react-router": "^6.11.2", | ||
"react-router-dom": "^6.11.2", | ||
"react-spring": "^9.7.4", | ||
"react-tag-input": "^6.10.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not using this right?
src/components/TagInput/index.tsx
Outdated
onValidationError?: (error: string) => void; | ||
} | ||
|
||
const TagInput: React.FC<TagInputProps> = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this unused component
package.json
Outdated
"dotenv": "^16.0.3", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-hook-form": "^7.51.0", | ||
"react-intersection-observer": "^9.13.1", | ||
"react-router": "^6.11.2", | ||
"react-router-dom": "^6.11.2", | ||
"react-spring": "^9.7.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remov this library as well. We don't need animations for now.
if (!isOpen) return null; | ||
|
||
return ( | ||
<div className="fixed inset-0 flex items-center justify-center z-50 bg-black bg-opacity-50"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to reuse the existing modal component for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not using, i'll remove this
<option value="">Select a month</option> | ||
<option value="January">January</option> | ||
<option value="February">February</option> | ||
<option value="March">March</option> | ||
<option value="April">April</option> | ||
<option value="May">May</option> | ||
<option value="June">June</option> | ||
<option value="July">July</option> | ||
<option value="August">August</option> | ||
<option value="September">September</option> | ||
<option value="October">October</option> | ||
<option value="November">November</option> | ||
<option value="December">December</option> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a loop for this
const months = ['January', 'February', 'March' ....]
months.map()
{showGuidelines ? ( | ||
<> | ||
<ArrowDownIcon /> | ||
Guidelines | ||
</> | ||
) : ( | ||
<> | ||
<ArrowRightIcon /> | ||
Guidelines | ||
</> | ||
)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{showGuidelines ? ( | |
<> | |
<ArrowDownIcon /> | |
Guidelines | |
</> | |
) : ( | |
<> | |
<ArrowRightIcon /> | |
Guidelines | |
</> | |
)} | |
{showGuidelines ? <ArrowDownIcon /> : <ArrowRightIcon />} Guidelines |
src/App.tsx
Outdated
<Route path="/mentors" element={<Mentors />} /> | ||
<Route path="/mentors/:mentorId" element={<MentorProfile />} /> | ||
<Route path="/mentees/:menteeId" element={<MenteeProfile />} /> | ||
<Route path="/mentee-checkin" element={<MenteeCheckIn />} /> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package.json
Outdated
@@ -19,9 +19,11 @@ | |||
"license": "ISC", | |||
"dependencies": { | |||
"@hookform/resolvers": "^3.3.4", | |||
"@react-spring/web": "^9.7.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this
"@react-spring/web": "^9.7.4", |
mentor: Mentor; | ||
} | ||
|
||
const MentorProfileCard: React.FC<MentorCardProps> = ({ mentor }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we reuse the existing mentor card?
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewBox="0 0 24 24" | ||
className="w-6 h-6" | ||
> | ||
<path | ||
fill="none" | ||
stroke={iconColor} | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
strokeWidth="1.5" | ||
d="M12 6.5V3m0 3.5a5 5 0 015 5v3.5c0 1 .5 2 1.5 2.5H5.5c1-.5 1.5-1.5 1.5-2.5V11.5a5 5 0 015-5zm-3.5 14h7" | ||
/> | ||
{count > 0 && ( | ||
<> | ||
<circle cx="18" cy="6" r="5.5" fill={badgeColor} /> | ||
<text | ||
x="18" | ||
y="6" | ||
fontFamily="Arial, sans-serif" | ||
fontSize="7" | ||
fontWeight="bold" | ||
fill={textColor} | ||
textAnchor="middle" | ||
dominantBaseline="central" | ||
> | ||
{displayCount} | ||
</text> | ||
</> | ||
)} | ||
</svg> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this to svgs
@@ -0,0 +1,6 @@ | |||
import React from 'react'; | |||
|
|||
const Spinner: React.FC = () => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import React from 'react'; | ||
import { NotificationProps } from '../../../types'; | ||
|
||
const NotificationBellSVG: React.FC<NotificationProps> = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const NotificationBellSVG: React.FC<NotificationProps> = ({ | |
const NotificationBell: React.FC<NotificationProps> = ({ |
Rename the component folder as well NotificationBell
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! @mayura-andrew
Purpose
The purpose of this PR is to fix #198 by introducing a comprehensive monthly check-in feature for mentees, mentors, and admins.
Goals
Approach
Screenshots
New Mentor Dashboard
New Mentee Dashboard UI
Mentee Monthly-checking Form Modal
Mentor Feedback UI
Checklist
Related PRs
Test environment
NodeJS: 20.15.0
FireFox: 129.0
Learning