Skip to content

feat: add mentorship cycle status page to admin app (#785) - #814

Merged
dricazenck merged 1 commit into
Women-Coding-Community:mainfrom
wilsonadenuga:feat/785-cycle-status-page
Oct 7, 2026
Merged

dricazenck merged 1 commit into
Women-Coding-Community:mainfrom
wilsonadenuga:feat/785-cycle-status-page

Conversation

@wilsonadenuga

@wilsonadenuga wilsonadenuga commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds a Cycles page to the admin app at /admin/mentorship/cycles, so the mentorship team can move cycles through their lifecycle without calling the API directly.

  • Lists the current year's cycles in a table (cycle, type, registration dates, run dates, status), styled like the Mentees page.
  • Type and Status filters narrow the table. They filter the cycles already loaded, so no extra API calls.
  • Each row has a status select. Picking a new status opens a confirm dialog showing the change (e.g. OPEN → CLOSED) and what it means. Confirm calls the API, Cancel keeps the current status.
  • On success the row updates in place and a success alert is shown. API errors (e.g. Invalid status transition from 'DRAFT' to 'COMPLETED') are shown inline as an error alert.
  • A Cycles nav link is added to AdminLayout for ADMIN and MENTORSHIP_ADMIN, the same guard as the Mentorship link.
Endpoint Used for
GET /api/platform/v1/admin/mentorship/cycles/all?year={current year} Loading the table
PATCH /api/platform/v1/admin/mentorship/cycles/status?cycleId={id}&status={status} Confirming a status change

Notes:

  • Merge after feat: add optional year filter to admin cycles list (#800) #803. The year filter comes from feat: add optional year filter to admin cycles list (#800) #803. Until it is merged the backend ignores ?year= and returns cycles for all years.
  • The design differs slightly from the issue: cycles are shown in a table with a status select per row instead of a cycle dropdown, filters were added, and status changes go through a confirm dialog because they cannot be undone (COMPLETED and CANCELLED are final, and OPEN/CLOSED change public registration).
  • The status select lists all six statuses. Allowed transitions stay in the backend, and any rejected move shows the API's error message.

Related Issue

Closes #785

Change Type

  • Bug Fix
  • New Feature
  • Code Refactor
  • Documentation
  • Test
  • Other

Screenshots

Cycles table

1-cycles-table

Status filter (Draft)

2-status-filter

Confirm dialog

3-confirm-dialog

Pull request checklist

Please check if your PR fulfills the following requirements:

@sonarqubecloud

sonarqubecloud Bot commented Oct 7, 2026

Copy link
Copy Markdown

@dricazenck dricazenck left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@dricazenck
dricazenck merged commit a9c3717 into Women-Coding-Community:main Oct 7, 2026
6 checks passed
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.

feat: Add Mentorship Cycle status management page in Admin App

2 participants