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

#357 Refactor attendance handling to be processed server-side #358

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

aimedivin
Copy link
Contributor

@aimedivin aimedivin commented Oct 13, 2024

PR Description

This PR refactors the attendance handling logic to be processed server-side, ensuring a more secure and centralized approach. Additionally, the update includes logic to prevent any attendance week from being skipped.

Description of tasks that were expected to be completed

  • Updated API routes for attendance submissions and retrieval.
  • Added checks and error handling to prevent skipped weeks.
  • Fix issue of how Team phase was before handled
  • Ensured that the changes do not negatively impact any other functionality.

Functionality

How does this works, add some information that maybe needed in testing

How has this been tested?

  • Clone this repository and navigate to the project directory
  • Ensure that you have set your .env file using .env.example.
  git clone https://github.com/atlp-rwanda/atlp-pulse-bn.git
  cd atlp-pulse-bn
  git checkout fix-server-side-attendance
  npm i
  npm run dev

Track PR

#357

@codecov-commenter
Copy link

codecov-commenter commented Oct 18, 2024

Codecov Report

Attention: Patch coverage is 8.20312% with 235 lines in your changes missing coverage. Please review.

Please upload report for BASE (develop@d3f9075). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/resolvers/attendance.resolvers.ts 5.73% 115 Missing ⚠️
src/utils/cron-jobs/team-jobs.ts 10.76% 58 Missing ⚠️
src/utils/getDateForDays.ts 8.57% 32 Missing ⚠️
src/resolvers/team.resolvers.ts 8.33% 11 Missing ⚠️
src/resolvers/userResolver.ts 0.00% 7 Missing ⚠️
src/resolvers/cohort.resolvers.ts 14.28% 6 Missing ⚠️
src/models/attendance.model.ts 16.66% 5 Missing ⚠️
src/resolvers/coordinatorResolvers.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #358   +/-   ##
==========================================
  Coverage           ?   16.85%           
==========================================
  Files              ?       88           
  Lines              ?     3393           
  Branches           ?      967           
==========================================
  Hits               ?      572           
  Misses             ?     2816           
  Partials           ?        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aimedivin aimedivin linked an issue Oct 21, 2024 that may be closed by this pull request
@aimedivin aimedivin changed the title Refactor attendance handling to be processed server-side #357 Refactor attendance handling to be processed server-side Oct 22, 2024
@aimedivin aimedivin added ready for review and removed WIP Work in progress labels Oct 22, 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.

Rating a TTL
8 participants