Skip to content

feat(frontend): Add resources section to mentor admin forms #771

Description

@Sowmiya07

Description

Add a Resources section (recommended books and resource links) to both the Create Mentor and Edit Mentor pages in the admin app.

How it should work:

  • The Edit Mentor form already has a ResourcesSection component with books (multiline text) and links (title + URL pairs) fields, and the schema/payload are fully wired — but the section was hidden pending the Create form being aligned.
  • The Create Mentor form has no resources support: the schema, default values, and transformFormData are all missing books and links.

Requirements:

  • Re-enable ResourcesSection in EditMentorForm.tsx.
  • Add books and links fields to CreateMentor/schema.ts (both optional).
  • Add books and links to defaultValues in CreateMentorForm.tsx.
  • Include resources: { books, links } in transformFormData of
    CreateMentorForm.tsx.
  • Reuse the existing ResourcesSection component from EditMentor/ in the
    Create form.

Edge cases:

  • Both fields are optional — no validation error when left blank.

Expected behavior

When an admin opens either the Create or Edit Mentor page, a "Resources" section
is visible below the Mentorship Availability section. The admin can enter
recommended books and add/remove resource links (title + URL).
On save/submit, the payload sent to the backend includes:

"resources": {
  "books": ["Clean Code", "The Pragmatic Programmer"],
  "links": [{ "title": "MDN Docs", "uri": "https://developer.mozilla.org" }]
}

Additional Context
The backend Mentor domain already supports resources.books and resources.links — no backend changes needed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ad-hocepic-mentorshipAll tasks related to mentorship pages & tasksfrontendAll tasks related to admin platform application

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions