Skip to content

Achievements - #195

Open
TheAshSolver wants to merge 27 commits into
masterfrom
achievements
Open

Achievements#195
TheAshSolver wants to merge 27 commits into
masterfrom
achievements

Conversation

@TheAshSolver

@TheAshSolver TheAshSolver commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

📝 Description

Have added UI features to support adding and viewing achievements.

🚀 Type of Change

Please delete options that are not relevant.

  • ✨ New feature (non-breaking change which adds functionality)

🚀 Changes Introduced

  • Added an achievements form, achievements page and a manage achievements section to add , edit and view the achievements. Have also added UI features to view achievements from the members and clubs page.

Tip

GitHub Copilot Review
@github-copilot review

Comment thread src/components/achievements/AchievementLinks.jsx Fixed
@IrishBumfuzzle
IrishBumfuzzle requested a lite review from Copilot August 6, 2026 20:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Introduces an “Achievements” feature across public pages, club pages, profiles, and management flows (create/edit/approve/reject/delete), backed by new GraphQL queries/mutations.

Changes:

  • Added GraphQL queries/mutations and server actions for achievements CRUD + moderation.
  • Added UI components and pages for listing, viewing, filtering, and managing achievements (including profile/club integrations).
  • Added image carousel support for achievement images (slick).

Reviewed changes

Copilot reviewed 33 out of 35 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/utils/fetchData.jsx Adds a cached getAchievement fetch helper for achievement detail pages.
src/gql/queries/achievements.jsx Adds achievement GraphQL queries (all/by user/by id/by club).
src/gql/mutations/achievements.jsx Adds achievement GraphQL mutations (create/edit/delete/approve/reject).
src/components/profile/UserAchievements.jsx Adds achievements table to the user profile page.
src/components/events/PaginatedEventGrid.jsx Whitespace-only change.
src/components/achievements/slick-theme.css Adds local slick theme overrides for the image carousel.
src/components/achievements/UsersTable.jsx Adds participants table for an achievement details view.
src/components/achievements/ManageAchievementGrid.jsx Adds wrapper grid component for manage achievements page.
src/components/achievements/ManageAchievementCards.jsx Adds card list rendering for manage achievements.
src/components/achievements/ManageAchievementCard.jsx Adds manage card UI with edit navigation.
src/components/achievements/AchievementsGrid.jsx Adds server component to fetch/render achievements by club.
src/components/achievements/AchievementsForm.jsx Adds create/edit achievement form UI and submission logic.
src/components/achievements/AchievementsFilter.jsx Adds filtering UI for achievements listing page.
src/components/achievements/AchievementLinks.jsx Adds dynamic blog links field array to the form.
src/components/achievements/AchievementImages.jsx Adds achievement image carousel + fallback placeholder image.
src/components/achievements/AchievementDetails.jsx Adds the achievement detail view layout.
src/components/achievements/AchievementCards.jsx Adds cards grid rendering for achievements lists.
src/components/achievements/AchievementCard.jsx Adds individual achievement card UI.
src/components/achievements/AchievementActions.jsx Adds approve/reject/delete UI actions with confirm dialogs.
src/app/profile/[id]/page.jsx Fetches and displays a user’s achievements on their profile.
src/app/manage/achievements/page.jsx Adds manage achievements landing page (list + pending approvals).
src/app/manage/achievements/new/page.jsx Adds create achievement page.
src/app/manage/achievements/[id]/page.jsx Adds manage achievement detail page with moderation actions.
src/app/manage/achievements/[id]/edit/page.jsx Adds edit achievement page and defaultValue transformation.
src/app/layout.jsx Imports slick carousel CSS globally.
src/app/clubs/[id]/page.jsx Integrates achievements section on club detail page.
src/app/achievements/page.jsx Adds public achievements list + filter behavior.
src/app/achievements/[id]/page.jsx Adds public achievement detail page + metadata generation.
src/actions/achievements/reject/server_action.jsx Adds server action to reject achievements.
src/actions/achievements/edit/server_action.jsx Adds server action to edit achievements.
src/actions/achievements/delete/server_action.jsx Adds server action to delete achievements.
src/actions/achievements/create/server_action.jsx Adds server action to create achievements.
src/actions/achievements/approve/server_action.jsx Adds server action to approve achievements.
src/acl/routes.js Adds ACL routes for achievements management pages.
Suppressed comments (3)

src/components/profile/UserAchievements.jsx:1

  • DataGrid expects flex to be a number (or omitted), and getRowHeight to return a number or 'auto'—returning null can cause warnings/incorrect sizing. Additionally, the initial sort is set to field end, which does not appear in the achievement rows shown elsewhere (dateperiod is used instead), so sorting will be ineffective. Use undefined instead of null for optional props and sort on an actual field (or add a derived end value to rows).
    src/components/profile/UserAchievements.jsx:1
  • DataGrid expects flex to be a number (or omitted), and getRowHeight to return a number or 'auto'—returning null can cause warnings/incorrect sizing. Additionally, the initial sort is set to field end, which does not appear in the achievement rows shown elsewhere (dateperiod is used instead), so sorting will be ineffective. Use undefined instead of null for optional props and sort on an actual field (or add a derived end value to rows).
    src/utils/fetchData.jsx:1
  • Two issues here: (1) catch (achievement) is misleading (it’s an error object), and (2) console.log in a shared fetch utility can generate noisy server logs in production. Rename the catch parameter (e.g., error) and remove/guard logging behind a dev check.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/app/manage/achievements/page.jsx
Comment on lines +20 to +37
let data;
if (achievements) {
data = { data: { achievements } };
} else {
data = await getClient().query(GET_ACHIEVEMENT_BY_CLUB, {
cid,
limit: limit || 12,
});
// console.log(data);
}

return (
<AchievementCards
achievements={data.data.achievementsByClub}
loading={false}
noAchievementsMessage="No achievements found."
/>
);
Comment thread src/components/achievements/ManageAchievementCard.jsx Outdated
Comment thread src/components/achievements/UsersTable.jsx
Comment thread src/acl/routes.js Outdated
Comment thread src/components/achievements/AchievementDetails.jsx Outdated
Comment thread src/components/achievements/AchievementsForm.jsx
Comment thread src/components/achievements/AchievementsForm.jsx Outdated
Comment thread src/components/achievements/AchievementsForm.jsx Outdated
Comment on lines +397 to +409
<Button
loading={loading}
variant="contained"
onClick={
() => handleSubmit((data) =>
onSubmit(data, { shouldSubmit: true }),
)()
}
size="large"
color="primary"
fullWidth
disabled={disabled}
>
@IrishBumfuzzle

IrishBumfuzzle commented Aug 7, 2026

Copy link
Copy Markdown
Member

@anma07 @TheAshSolver Please take a look at the bot's review message. If they seem legit, then fix them.
Also where is the manage achievements page meant to be navigated from? It is not in the 'Manage' subsection in the sidebar for clubs

Comment thread src/components/achievements/AchievementLinks.jsx Fixed
anma07 and others added 2 commits August 8, 2026 04:24
…expression'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
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.

5 participants