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

Account Archival Frontend & Backend #107

Merged
merged 28 commits into from
Jun 16, 2024

Conversation

aaronchan32
Copy link
Member

Tracking Info

Resolves #99

Changes

  • Added backend routes to modify account archive status and account type from team to admin with authentication and authorization checks
  • Disabled user login when archiving account which disables the Firebase account. As there is currently no way to unarchive accounts with our application, please manually update the archive field when re-enabling a disabled firebase account.
  • Created frontend and conditionally rendered Team Accounts section based on whether user is an admin

Testing

  • Tested archiving account and updating account type
  • Tested whether a team account can see the Team Accounts section on profile page
  • Tested logging in with archived account

image

commit 0b133b8
Author: Michael Sullivan <[email protected]>
Date:   Tue May 14 09:09:16 2024 -0700

    Feature/mraysu/program form v2 (#100)

    * Update Backend Program Schema

    * V2 UI

    * Disabled Editing Program Type

    * Frontend-backend integration

    * Lint fixes

    ---------

    Co-authored-by: mraysu <[email protected]>
    Co-authored-by: Adhithya Ananthan <[email protected]>

commit e17b509
Author: parth4apple <[email protected]>
Date:   Tue May 14 09:01:15 2024 -0700

    Student and Enrollment Schema modifications (#101)

    * feat: initial schema

    * feat: edit routes

    * feat: test and fix routes
@aaronchan32 aaronchan32 self-assigned this Jun 3, 2024
@aaronchan32 aaronchan32 requested a review from adhi0331 as a code owner June 3, 2024 23:42
@aaronchan32 aaronchan32 changed the title Feature/aaronchan32/account archival Account Archival Frontend & Backend Jun 3, 2024
Copy link

github-actions bot commented Jun 4, 2024

Visit the preview URL for this PR (updated for commit 92e959b):

https://pia-dev-60cea--pr107-feature-aaronchan32-u2e0s9oz.web.app

(expires Sun, 23 Jun 2024 20:06:33 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: b780ee12a240535f7ca0729d49968573a1f3e284

@adhi0331 adhi0331 merged commit a16cf00 into main Jun 16, 2024
4 checks passed
@adhi0331 adhi0331 deleted the feature/aaronchan32/account-archival branch June 16, 2024 20:15
aaronchan32 added a commit that referenced this pull request Dec 1, 2024
commit 058c01b
Author: Victor Siu <[email protected]>
Date:   Mon Jun 17 19:25:24 2024 -0700

    Feature/vs2961/attendance dashboard (#106)

    * Add backend query code

    * Add frontend components

    * Add mobile

    * Add attendance dashboard code

    * Add code for attendanceTable

    * Fix linting

    * Make varying sessions work

    * Fix linting

    * Fix types

    * fix linting

    * Prevent buttons from being clicked multiple times

commit 525fbe2
Author: adhi0331 <[email protected]>
Date:   Sun Jun 16 15:29:45 2024 -0500

    fixed minor bug

commit a16cf00
Author: Aaron Chan <[email protected]>
Date:   Sun Jun 16 13:15:56 2024 -0700

    Account Archival Frontend & Backend (#107)

    * feat: add create program notes backend

    * fix: THead unique key prop warning

    * feat: add edited by field to notes

    * fix: fix styling issues

    * feat: add edit and delete functionality to progress notes and change userId to uid for backend

    * fix: fix calendar styling

    * feat: add download progress notes functionality using react-pdf

    * feat: add mobile responsiveness

    * feat: create program context provider shared across Home, Programs, and Notes page

    * fix: fix styling to be consistent across pages

    * feat: add progress note filtering and add loading spinner to pages

    * feat: add account type authorization checks on frontend and backend

    * refactor: refactor notes logic and fix styling

    * feat: add logic to check for no students and refactor filter

    * feat: add shadows using overflow clip

    * fix: fix styling for search filter

    * fix: fix small style inconsistencies

    * fix: update poppins font url to use https

    * fix: fix modal close button styling to be more consistent

    * fix: fix escape key overriding dialog close

    * Squashed commit of the following:

    commit 0b133b8
    Author: Michael Sullivan <[email protected]>
    Date:   Tue May 14 09:09:16 2024 -0700

        Feature/mraysu/program form v2 (#100)

        * Update Backend Program Schema

        * V2 UI

        * Disabled Editing Program Type

        * Frontend-backend integration

        * Lint fixes

        ---------

        Co-authored-by: mraysu <[email protected]>
        Co-authored-by: Adhithya Ananthan <[email protected]>

    commit e17b509
    Author: parth4apple <[email protected]>
    Date:   Tue May 14 09:01:15 2024 -0700

        Student and Enrollment Schema modifications (#101)

        * feat: initial schema

        * feat: edit routes

        * feat: test and fix routes

    * feat: add frontend and backend for account archival

    * feat: ensure ui updates and refactor code

    * Squashed merge with main

    * fix: update type of VerifyUser to be same as User

    * fix: fix user type error

commit fe61637
Author: Andrew Pu <[email protected]>
Date:   Sun Jun 16 13:00:01 2024 -0700

    Feature/andrewzpu/program profile pages (#105)

    * added backend route for getting single program

    * added separate pages for each program

    * Added program edit popup and "no programs" message

    * Fixed add button display

    * Reorganized ProgramFormButton to take take any component

    * Removed start and end date from card

    * Connected Program Card to Program Profile Pages

    * Set up basic framework of Program Profile Page

    * Added feature where clicking anywhere else will close the edit popup button

    * Updated popup and redirect functionality of program profiles

    * Finished full screen view of program profile

    * Fixed hourly pay references

    * Added backend route to get program enrollments

    * Connected enrollments route to program profile page

    * Updated student count messages on cards and program profile

    * Added Student Names to Enrollment Table

    * Fixed mobile view

    * Fixed minor details

    * Minor Table Change

    * finish merge

    * fixed try catch error

    ---------

    Co-authored-by: Adhithya Ananthan <[email protected]>
    Co-authored-by: adhi0331 <[email protected]>

commit 6e67ad3
Author: Michael Sullivan <[email protected]>
Date:   Sat Jun 15 08:16:22 2024 -0700

    Feature/mraysu/program archive (#96)

    * Archive Program Route

    * Change program status to archived for students

    * Added Archived field to program schema

    * Implemented Archive Button

    * Prevent students from 'joining' archived programs

    * Lint fix

    * Integrated new enrollment schema

    * Archived Programs Page

    * Fix merge issues

    * Updated Archive Page View

    * Mobile UI Adjustments

    ---------

    Co-authored-by: mraysu <[email protected]>

commit b0b800a
Author: Aammya Sapra <[email protected]>
Date:   Fri Jun 14 21:40:43 2024 -0700

    Feature/aammya8/new account approval (#104)

    * Add user approval and denial functionality, as well as email user about account approval updates

    * backup

    * backup

    * fixed delete route

    * change approve/deny/delete to use email

    * approve/deny controllers do not get entered? but delete does

    * Fix Notifications UI (immediately remove corresponding card when approve/deny button clicked)

    * Modify routes for testing purposes

    * Debug statements --> user does not get found in denyUser

    * Email successfully sent for deny (accidentally deleted user before trying to send email earlier lol)

    * Fix frontend (populate account type)

    * Remove extra comments

    * added auth protection and cleaned up code

    * added env for emails

    * fix user role bug

    * fixed some bugs and deleted some log statements

    * ran lint fix

    ---------

    Co-authored-by: adhi0331 <[email protected]>
adhi0331 pushed a commit that referenced this pull request Dec 17, 2024
* created file to put ui code in

* finished hardcoded notification table

* updated backend to match main

* student profile basic shell text

* finished rest of ui

* feat: starting form changes

* finished up student page

* updating with main

* feat: set up useFieldArray, refactor

* feat: working student form

* Removed conflicting color

* Implemented view profile button

* End-to-end retrieve student info

* Visualize Student Data

* Deletion route

* Printing Student Profile

* Remove debug code

* Delete Student Dialog

* Student Deletion

* Student Profile Picture Render

* Get Student Route Verification

* Squashed commit of the following:

commit 058c01b
Author: Victor Siu <[email protected]>
Date:   Mon Jun 17 19:25:24 2024 -0700

    Feature/vs2961/attendance dashboard (#106)

    * Add backend query code

    * Add frontend components

    * Add mobile

    * Add attendance dashboard code

    * Add code for attendanceTable

    * Fix linting

    * Make varying sessions work

    * Fix linting

    * Fix types

    * fix linting

    * Prevent buttons from being clicked multiple times

commit 525fbe2
Author: adhi0331 <[email protected]>
Date:   Sun Jun 16 15:29:45 2024 -0500

    fixed minor bug

commit a16cf00
Author: Aaron Chan <[email protected]>
Date:   Sun Jun 16 13:15:56 2024 -0700

    Account Archival Frontend & Backend (#107)

    * feat: add create program notes backend

    * fix: THead unique key prop warning

    * feat: add edited by field to notes

    * fix: fix styling issues

    * feat: add edit and delete functionality to progress notes and change userId to uid for backend

    * fix: fix calendar styling

    * feat: add download progress notes functionality using react-pdf

    * feat: add mobile responsiveness

    * feat: create program context provider shared across Home, Programs, and Notes page

    * fix: fix styling to be consistent across pages

    * feat: add progress note filtering and add loading spinner to pages

    * feat: add account type authorization checks on frontend and backend

    * refactor: refactor notes logic and fix styling

    * feat: add logic to check for no students and refactor filter

    * feat: add shadows using overflow clip

    * fix: fix styling for search filter

    * fix: fix small style inconsistencies

    * fix: update poppins font url to use https

    * fix: fix modal close button styling to be more consistent

    * fix: fix escape key overriding dialog close

    * Squashed commit of the following:

    commit 0b133b8
    Author: Michael Sullivan <[email protected]>
    Date:   Tue May 14 09:09:16 2024 -0700

        Feature/mraysu/program form v2 (#100)

        * Update Backend Program Schema

        * V2 UI

        * Disabled Editing Program Type

        * Frontend-backend integration

        * Lint fixes

        ---------

        Co-authored-by: mraysu <[email protected]>
        Co-authored-by: Adhithya Ananthan <[email protected]>

    commit e17b509
    Author: parth4apple <[email protected]>
    Date:   Tue May 14 09:01:15 2024 -0700

        Student and Enrollment Schema modifications (#101)

        * feat: initial schema

        * feat: edit routes

        * feat: test and fix routes

    * feat: add frontend and backend for account archival

    * feat: ensure ui updates and refactor code

    * Squashed merge with main

    * fix: update type of VerifyUser to be same as User

    * fix: fix user type error

commit fe61637
Author: Andrew Pu <[email protected]>
Date:   Sun Jun 16 13:00:01 2024 -0700

    Feature/andrewzpu/program profile pages (#105)

    * added backend route for getting single program

    * added separate pages for each program

    * Added program edit popup and "no programs" message

    * Fixed add button display

    * Reorganized ProgramFormButton to take take any component

    * Removed start and end date from card

    * Connected Program Card to Program Profile Pages

    * Set up basic framework of Program Profile Page

    * Added feature where clicking anywhere else will close the edit popup button

    * Updated popup and redirect functionality of program profiles

    * Finished full screen view of program profile

    * Fixed hourly pay references

    * Added backend route to get program enrollments

    * Connected enrollments route to program profile page

    * Updated student count messages on cards and program profile

    * Added Student Names to Enrollment Table

    * Fixed mobile view

    * Fixed minor details

    * Minor Table Change

    * finish merge

    * fixed try catch error

    ---------

    Co-authored-by: Adhithya Ananthan <[email protected]>
    Co-authored-by: adhi0331 <[email protected]>

commit 6e67ad3
Author: Michael Sullivan <[email protected]>
Date:   Sat Jun 15 08:16:22 2024 -0700

    Feature/mraysu/program archive (#96)

    * Archive Program Route

    * Change program status to archived for students

    * Added Archived field to program schema

    * Implemented Archive Button

    * Prevent students from 'joining' archived programs

    * Lint fix

    * Integrated new enrollment schema

    * Archived Programs Page

    * Fix merge issues

    * Updated Archive Page View

    * Mobile UI Adjustments

    ---------

    Co-authored-by: mraysu <[email protected]>

commit b0b800a
Author: Aammya Sapra <[email protected]>
Date:   Fri Jun 14 21:40:43 2024 -0700

    Feature/aammya8/new account approval (#104)

    * Add user approval and denial functionality, as well as email user about account approval updates

    * backup

    * backup

    * fixed delete route

    * change approve/deny/delete to use email

    * approve/deny controllers do not get entered? but delete does

    * Fix Notifications UI (immediately remove corresponding card when approve/deny button clicked)

    * Modify routes for testing purposes

    * Debug statements --> user does not get found in denyUser

    * Email successfully sent for deny (accidentally deleted user before trying to send email earlier lol)

    * Fix frontend (populate account type)

    * Remove extra comments

    * added auth protection and cleaned up code

    * added env for emails

    * fix user role bug

    * fixed some bugs and deleted some log statements

    * ran lint fix

    ---------

    Co-authored-by: adhi0331 <[email protected]>

* fix: fix enrollment frontend and backend inconsistency

* Squashed merge branch 'feature/lisasiliu/view-student-profile-v2' into feature/parth4apple/student-form-updates

* feat: add image upload to student profile

* feat: add document upload to student profile and fix image upload

* feat: fix document upload so that it only triggers when user saves

* fix: fix merge conflict bug

* Complete Route Auth Verification

* Prettier

* /all token verification

* Fix Formatting

* formatting

* Auth for frontend attendance

* Fix Dependency Issue

* formatting error

* More Auth Headers

* Minor fix

* Auth Headers

---------

Co-authored-by: parth4apple <[email protected]>
Co-authored-by: mraysu <[email protected]>
Co-authored-by: mraysu <[email protected]>
Co-authored-by: Aaron Chan <[email protected]>
adhi0331 added a commit that referenced this pull request Dec 18, 2024
* feat: starting form changes

* feat: set up useFieldArray, refactor

* feat: working student form

* rerun build

* Squashed commit of the following:

commit 058c01b
Author: Victor Siu <[email protected]>
Date:   Mon Jun 17 19:25:24 2024 -0700

    Feature/vs2961/attendance dashboard (#106)

    * Add backend query code

    * Add frontend components

    * Add mobile

    * Add attendance dashboard code

    * Add code for attendanceTable

    * Fix linting

    * Make varying sessions work

    * Fix linting

    * Fix types

    * fix linting

    * Prevent buttons from being clicked multiple times

commit 525fbe2
Author: adhi0331 <[email protected]>
Date:   Sun Jun 16 15:29:45 2024 -0500

    fixed minor bug

commit a16cf00
Author: Aaron Chan <[email protected]>
Date:   Sun Jun 16 13:15:56 2024 -0700

    Account Archival Frontend & Backend (#107)

    * feat: add create program notes backend

    * fix: THead unique key prop warning

    * feat: add edited by field to notes

    * fix: fix styling issues

    * feat: add edit and delete functionality to progress notes and change userId to uid for backend

    * fix: fix calendar styling

    * feat: add download progress notes functionality using react-pdf

    * feat: add mobile responsiveness

    * feat: create program context provider shared across Home, Programs, and Notes page

    * fix: fix styling to be consistent across pages

    * feat: add progress note filtering and add loading spinner to pages

    * feat: add account type authorization checks on frontend and backend

    * refactor: refactor notes logic and fix styling

    * feat: add logic to check for no students and refactor filter

    * feat: add shadows using overflow clip

    * fix: fix styling for search filter

    * fix: fix small style inconsistencies

    * fix: update poppins font url to use https

    * fix: fix modal close button styling to be more consistent

    * fix: fix escape key overriding dialog close

    * Squashed commit of the following:

    commit 0b133b8
    Author: Michael Sullivan <[email protected]>
    Date:   Tue May 14 09:09:16 2024 -0700

        Feature/mraysu/program form v2 (#100)

        * Update Backend Program Schema

        * V2 UI

        * Disabled Editing Program Type

        * Frontend-backend integration

        * Lint fixes

        ---------

        Co-authored-by: mraysu <[email protected]>
        Co-authored-by: Adhithya Ananthan <[email protected]>

    commit e17b509
    Author: parth4apple <[email protected]>
    Date:   Tue May 14 09:01:15 2024 -0700

        Student and Enrollment Schema modifications (#101)

        * feat: initial schema

        * feat: edit routes

        * feat: test and fix routes

    * feat: add frontend and backend for account archival

    * feat: ensure ui updates and refactor code

    * Squashed merge with main

    * fix: update type of VerifyUser to be same as User

    * fix: fix user type error

commit fe61637
Author: Andrew Pu <[email protected]>
Date:   Sun Jun 16 13:00:01 2024 -0700

    Feature/andrewzpu/program profile pages (#105)

    * added backend route for getting single program

    * added separate pages for each program

    * Added program edit popup and "no programs" message

    * Fixed add button display

    * Reorganized ProgramFormButton to take take any component

    * Removed start and end date from card

    * Connected Program Card to Program Profile Pages

    * Set up basic framework of Program Profile Page

    * Added feature where clicking anywhere else will close the edit popup button

    * Updated popup and redirect functionality of program profiles

    * Finished full screen view of program profile

    * Fixed hourly pay references

    * Added backend route to get program enrollments

    * Connected enrollments route to program profile page

    * Updated student count messages on cards and program profile

    * Added Student Names to Enrollment Table

    * Fixed mobile view

    * Fixed minor details

    * Minor Table Change

    * finish merge

    * fixed try catch error

    ---------

    Co-authored-by: Adhithya Ananthan <[email protected]>
    Co-authored-by: adhi0331 <[email protected]>

commit 6e67ad3
Author: Michael Sullivan <[email protected]>
Date:   Sat Jun 15 08:16:22 2024 -0700

    Feature/mraysu/program archive (#96)

    * Archive Program Route

    * Change program status to archived for students

    * Added Archived field to program schema

    * Implemented Archive Button

    * Prevent students from 'joining' archived programs

    * Lint fix

    * Integrated new enrollment schema

    * Archived Programs Page

    * Fix merge issues

    * Updated Archive Page View

    * Mobile UI Adjustments

    ---------

    Co-authored-by: mraysu <[email protected]>

commit b0b800a
Author: Aammya Sapra <[email protected]>
Date:   Fri Jun 14 21:40:43 2024 -0700

    Feature/aammya8/new account approval (#104)

    * Add user approval and denial functionality, as well as email user about account approval updates

    * backup

    * backup

    * fixed delete route

    * change approve/deny/delete to use email

    * approve/deny controllers do not get entered? but delete does

    * Fix Notifications UI (immediately remove corresponding card when approve/deny button clicked)

    * Modify routes for testing purposes

    * Debug statements --> user does not get found in denyUser

    * Email successfully sent for deny (accidentally deleted user before trying to send email earlier lol)

    * Fix frontend (populate account type)

    * Remove extra comments

    * added auth protection and cleaned up code

    * added env for emails

    * fix user role bug

    * fixed some bugs and deleted some log statements

    * ran lint fix

    ---------

    Co-authored-by: adhi0331 <[email protected]>

* fix: fix enrollment frontend and backend inconsistency

* Squashed merge branch 'feature/lisasiliu/view-student-profile-v2' into feature/parth4apple/student-form-updates

* feat: add image upload to student profile

* feat: add document upload to student profile and fix image upload

* feat: fix document upload so that it only triggers when user saves

* fix: fix merge conflict bug

* feat: ensure team accounts cannot see documents that are markedAdmin

* add firebase token

* make docs visible on student profile

* make delete student admin only

---------

Co-authored-by: adhi0331 <[email protected]>
Co-authored-by: Aaron Chan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[EPIC] - Account Archival
2 participants