Skip to content

Add admin station editing and confirmed station deletion#35

Merged
xylo04 merged 3 commits into
mainfrom
copilot/edit-station-details-delete-stations
May 25, 2026
Merged

Add admin station editing and confirmed station deletion#35
xylo04 merged 3 commits into
mainfrom
copilot/edit-station-details-delete-stations

Conversation

Copilot AI commented May 25, 2026

Copy link
Copy Markdown
Contributor

Club admins could create stations, but not manage existing ones. This change adds in-place station management: admins can edit station details and delete stations behind an explicit confirmation step.

  • Admin station management UI

    • Adds an Edit station action to each station in club detail.
    • Opens a dedicated dialog to update name, description, block size, and active state.
    • Applies updates back into the local resource list without reloading the page.
  • Confirmed deletion flow

    • Adds a reusable confirmation dialog for destructive actions.
    • Routes station deletion through that dialog before issuing the delete.
    • Removes deleted stations from the UI and refreshes dependent access data.
  • Resource API support

    • Extends ClubService with updateResource(...) and deleteResource(...).
    • Keeps the existing resource creation path unchanged while adding full lifecycle support for admins.
  • Backend authorization

    • Adds an RLS delete policy for resources so approved club admins can delete stations, matching existing insert/update admin permissions.
this.dialog.open(EditResourceDialog, { data: resource }).afterClosed().subscribe((result) => {
  if (result?.kind === 'updated') {
    this.updateResource(result);
  } else if (result?.kind === 'deleted') {
    this.removeResource(result);
  }
});

Copilot AI and others added 2 commits May 25, 2026 02:43
@supabase

supabase Bot commented May 25, 2026

Copy link
Copy Markdown

Updates to Preview Branch (copilot/edit-station-details-delete-stations) ↗︎

Deployments Status Updated
Database Mon, 25 May 2026 02:55:15 UTC
Services Mon, 25 May 2026 02:55:15 UTC
APIs Mon, 25 May 2026 02:55:15 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations Mon, 25 May 2026 02:55:16 UTC
Migrations Mon, 25 May 2026 02:55:16 UTC
Seeding Mon, 25 May 2026 02:55:16 UTC
Edge Functions Mon, 25 May 2026 02:55:16 UTC

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

@xylo04 xylo04 marked this pull request as ready for review May 25, 2026 02:49
Copilot finished work on behalf of xylo04 May 25, 2026 02:55
Copilot AI requested a review from xylo04 May 25, 2026 02:55
@xylo04 xylo04 merged commit f37635a into main May 25, 2026
3 checks passed
@xylo04 xylo04 deleted the copilot/edit-station-details-delete-stations branch May 25, 2026 03:01
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.

2 participants