Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 18, 2025

Adds frontend support for fetching and displaying all groups for teachers using the GET /groups-management/groups endpoint.

Implementation

  • DTO & Service: Created Group interface and GroupsManagementService.getGroups() returning ApiResponse<Group[]>
  • Remote Function: Added getGroups() query function at /dashboard/teacher/groups/groups.remote.ts
  • UI Components:
    • AdminGroupCard - Displays group metadata (ID, name, created/updated timestamps, creator)
    • GroupsList - Grid layout matching Tasks management pattern
    • Groups page with loading, error, and empty states
  • Localization: Added admin_groups_* keys for EN/PL

API Response Structure

Based on similar endpoints (e.g., AccessControlService.getTaskCollaborators), the service expects ApiResponse<Group[]> despite Swagger documenting APIResponse-Group (singular). This matches the pattern for non-paginated list endpoints in the codebase.

// GroupsManagementService.ts
async getGroups(): Promise<{ success: boolean; data?: Group[]; error?: string }> {
  const response = await this.apiClient.get<ApiResponse<Group[]>>({
    url: '/groups-management/groups'
  });
  return { success: true, data: response.data, status: 200 };
}

Access Control

Page located at /dashboard/teacher/groups/ follows teacher routing convention, ready for future role-based access expansion.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdn.jsdelivr.net
    • Triggering command: /opt/hostedtoolcache/node/22.21.1/x64/bin/node node /home/REDACTED/work/frontend/frontend/node_modules/.bin/../vite/bin/vite.js build (dns block)
  • eu.posthog.com
    • Triggering command: /opt/hostedtoolcache/node/22.21.1/x64/bin/node node /home/REDACTED/work/frontend/frontend/node_modules/.bin/../vite/bin/vite.js build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[Groups] List all groups via remote function (GET /groups-management/groups)</issue_title>
<issue_description>Implement the frontend logic and UI integration for fetching and displaying all groups for teachers using the endpoint GET /groups-management/groups. READ parent issue before implementing anything

Requirements

  • Create a SvelteKit remote function to call GET /groups-management/groups.
  • Build a groups listing table and UI, reusing and matching the patterns/styles from Tasks management.
  • Handle loading and error states.
  • Integrate with valibot for validation where applicable.
  • Localize all UI strings with Paraglide (EN/PL).
  • Ensure access management for teachers (with readiness for future roles).

Child of [Groups] Implement groups management for teachers (parent issue): #139</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits December 18, 2025 19:27
Co-authored-by: TheRealSeber <111927572+TheRealSeber@users.noreply.github.com>
…ated data

Co-authored-by: TheRealSeber <111927572+TheRealSeber@users.noreply.github.com>
Co-authored-by: TheRealSeber <111927572+TheRealSeber@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement frontend logic for listing all groups Implement groups listing via GET /groups-management/groups Dec 18, 2025
Copilot AI requested a review from TheRealSeber December 18, 2025 19:33
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.

[Groups] List all groups via remote function (GET /groups-management/groups)

2 participants