Skip to content

Individual: Active/Inactive/Waitlisted Partner #76

@dilanurbayraktar

Description

@dilanurbayraktar

Active/Inactive/Waitlisted Partner

Summary 💻

Welcome back from break! Hope you had an amazing Thanksgiving with delicious food 🦃🥧

We have one final task for you this semester: editing small snippets of our front-end and back-end APIs to reflect if a partner organization is active, inactive, or waitlisted.

So far, we have only been focusing on active and waitlisted partners. However, what happens if Rachel stops partnering with one of the organizations? They should become inactive. Initially, we had "active" and "waitlisted" boolean columns on the database to reflect the status. However, we have just changed it to add a singular "status" column, that can be "active", "inactive", or "waitlisted" which simplifies the whole process for us.

You need to edit the /api/partners and /api/partners/[id] APIs to ensure that they return the status field successfully. They should no longer return the "active" and "waitlisted" fields as they don't exist in the database anymore.

Step 1: Update Front-End Components

We want you to update the following front-end components to successfully reflect these three states:

Step 1: Update API Logic

Adapt the /api/partners API so it updates the database appropriately when the Edit and Add Partner Forms are submitted.

The rules should be:

  • If Active is submitted:
    status: active

  • If Inactive is submitted:
    status: inactive

  • If Waitlisted is submitted:
    status: waitlisted

Make sure both /api/partners and /api/partners/[id] return the updated values correctly to the front-end.

2. Status Column on the Partners Table (PartnerTables.tsx)

The Status column should have three possible values:

  • Activestatus: active
  • Inactivestatus: inactive
  • Waitlistedstatus: waitlisted
Image

2. Edit Partner Information Form

The Edit Partner Information form should display three radio buttons for the status input field:

  • Active
  • Inactive
  • Waitlisted
Image

Deliverables 🚀

  • Schedule at least two meetings as a pair
  • Create a new branch using the Create a branch button
  • Update /api/partners and /api/partners/[id] to return and update the status field
  • Update front-end Status column on Partners table
  • Update Edit Partner Information form with 3 radio buttons
  • Correctly write submitted values to the database
  • Open a PR and request review from @coopergolemme

Wireframe 🎨

Here's the wireframe!

Tips for success 📈

Where to get help!

Reach out to @dilanurbayraktar and @coopergolemme.

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