Skip to content

Active -> Inactive on Approved Matches #68

@dilanurbayraktar

Description

@dilanurbayraktar

Active -> Inactive on Approved Matches

Summary 💻

Welcome back! This ticket contains some back-end fun. We know you missed it 😁

For this ticket, you will be working on the "Move to Inactive" functionality that moves a tutor-tutee pair from the Active tab to the Inactive tab on the Approved Matches table. Do you see the three dots on every entry?

When clicked on the three dots, we want a "Make Inactive" option to appear. To make it look pretty, please also add a Delete icon next to "Make Inactive". The Delete icon is in frontend/src/assets/images/delete.svg.

After clicking on "Make Inactive", we want three things to happen:

  • The pair should now be moved to the Inactive tab.
  • The tutor of that pair should be moved to Unmatched in the Tutor Database page.
  • The tutee of that pair should be moved to Unmatched in the Tutee Database page.
Image

Deliverables 🚀

  • Schedule at least two meetings as a pair
  • Create a new branch using the "create a branch" button
  • Create your endpoint
  • Create your frontend endpoint fetch
  • See if the data is displayed with your dev server
  • Open a PR and request review from @brandondionisio.

Steps

  • Navigate to MatchedInfoBox.tsx. Scroll down until you can see the three dots where you will implement the button.
  • First, you will implement the dropdown aspect when clicking the "...". This should resemble what happens when clicking the "Forms" dropdown on the home page. Create an option that says "Move to Inactive" with the corresponding icon.
  • Create a route in backend/src/index.ts named /move-to-inactive, which will make the matched boolean of an approved matched pair given their id false, move the associated tutor from the The tutor of that pair should be moved to Unmatched in the Tutor Database page.
  • The tutee of that pair should be moved to Unmatched in the Tutee Database page.
  • Done!

Tip for success 📈

  • On the backend, if you go to the approved_matches table on Neon, you should see an "active?" field. When the "Make Inactive" button is clicked, we want the field to be set to False for that pair.
  • To complete this ticket, implement a moveToInactive() function in /backend/src/index.ts.

Where to get help!

Reach out to @dilanurbayraktar and @brandondionisio.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions