Skip to content

Add organization status and rejection reason fields #673

Description

@FangHsin0122

Description

Backend support for the organization lifecycle in #1204.
The frontend is built (demo Video): An admin moves an organization through Pending → Active / Rejected with a reason captured on rejection, and Active ↔ Suspended.

The record currently only has active (boolean), which can't express these states.
Image

Fields needed on stakeholder (type = organization)

Column Type Notes
status enum / varchar pending / active / suspended / rejected
rejection_reason text set when status = rejected

Endpoints

No new endpoint. The frontend already uses these (on stakeholder-api).
They only need to carry the two fields:

Method Endpoint Change
GET /stakeholders/{id} return status and rejection_reason
PATCH /stakeholders/{id} accept status and rejection_reason

Placement
I opened this in admin-api per Seba, though the frontend currently connects to stakeholder-api (/stakeholders).

A couple of quick questions to @dadiorchen

  1. Which repo should own these fields? Admin-api or stakeholder-api?
  2. Should status live in the stakeholder schema, or a separate SaaS schema?

Happy to move the issue wherever it fits best.

Metadata

Metadata

Assignees

No one assigned

    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