Skip to content
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

Implment Monthly-Checking API Endpoint #172

Merged
merged 26 commits into from
Oct 15, 2024

Conversation

mayura-andrew
Copy link
Member

Purpose

The purpose of this PR is to fix #157

Goals

  • Implement a new API endpoint for monthly checking.
  • Separate the controller and service logic for better code organization and maintainability.

Approach

Implemened controller and service for monthly checking api endpoint

  • Created a new controller file monthlyChecking.controller.ts to handle the API requests related to monthly checking.
    Created a new service file monthlyChecking.service.ts to handle the business logic for monthly checking.
    Implemented the addMonthlyCheckIn, fetchMonthlyCheckIns and addFeedbackByMentorfunctions in the service file.
    Updated the controller to call the appropriate service functions.

Screenshots

Checklist

  • This PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.
  • I have read and understood the development best practices guidelines ( http://bit.ly/sef-best-practices )
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Related PRs

Test environment

Os: Linux Mint 21.3
Nodejs: 20.15.0

Learning

  • Followed the project’s existing code structure and style guidelines for consistency.

mayura-andrew and others added 23 commits July 14, 2024 20:28
- Moved monthly checking service functions to a dedicated service file (monthlyChecking.service.ts).
- Moved monthly checking controller functions to a dedicated controller file (monthlyChecking.controller.ts).
- Updated import paths and references to reflect the new file structure.
- Improved code organization and maintainability by separating concerns.
Copy link
Member

@anjula-sack anjula-sack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this 'sudo' empty file

@anjula-sack anjula-sack changed the base branch from main to development October 2, 2024 07:10
Comment on lines 93 to 104
checkIns: Array<{
uuid: string
title: string
generalUpdatesAndFeedback: string
progressTowardsGoals: string
mediaContentLinks: string[]
mentorFeedback: string | null
isCheckedByMentor: boolean
mentorCheckedDate: Date | null
checkInDate: Date
mentee: Mentee
}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create the CheckIn type at types.ts

Comment on lines 132 to 143
const checkInsWithUuid = checkIns.map((checkIn) => ({
uuid: checkIn.uuid,
title: checkIn.title,
generalUpdatesAndFeedback: checkIn.generalUpdatesAndFeedback,
progressTowardsGoals: checkIn.progressTowardsGoals,
mediaContentLinks: checkIn.mediaContentLinks,
mentorFeedback: checkIn.mentorFeedback,
isCheckedByMentor: checkIn.isCheckedByMentor,
mentorCheckedDate: checkIn.mentorCheckedDate,
checkInDate: checkIn.checkInDate,
mentee: checkIn.mentee
}))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to map here?

Copy link
Member

@anjula-sack anjula-sack left a 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

@anjula-sack anjula-sack merged commit d88d261 into sef-global:development Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for monthly check-Ins and email reminders
2 participants