Skip to content

feat(admin): Add adoption inquiries management and UI updates - #3

Merged
gtapp1 merged 1 commit into
mainfrom
feat/design-system-and-motion
Jul 5, 2026
Merged

feat(admin): Add adoption inquiries management and UI updates#3
gtapp1 merged 1 commit into
mainfrom
feat/design-system-and-motion

Conversation

@gtapp1

@gtapp1 gtapp1 commented Jul 5, 2026

Copy link
Copy Markdown
Owner

No description provided.

@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
palengkatts Ready Ready Preview, Comment Jul 5, 2026 7:14pm

@gtapp1 gtapp1 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

LGTM!

@gtapp1
gtapp1 merged commit 999a7c3 into main Jul 5, 2026
3 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b7f6cf9e03

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const updateStatus = async (id, status) => {
const { error } = await supabase
.from('adoptions')
.update({ status })

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add an adoption UPDATE policy

When an admin approves or rejects a pending inquiry, this call attempts to update adoptions, but the migration enables RLS on that table and only defines SELECT/INSERT policies for it; unlike reports, volunteers, and cats, there is no FOR UPDATE policy. In any Supabase database created from this schema, the new Approve/Reject buttons will hit an RLS error and always show the failure toast instead of changing the inquiry status.

Useful? React with 👍 / 👎.

note: volunteerData.note || null,
available_dates: volunteerData.availableDates || [],
status: 'active',
status: 'pending',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add a real migration for pending volunteers

In environments that already applied supabase/migrations/001_initial_schema.sql before this change, inserting new volunteer applications with status: 'pending' will still violate the existing volunteers status CHECK constraint, because this commit only edits the already-applied initial migration instead of adding an ALTER migration to allow pending. Supabase/Postgres will not replay migration 001, so public volunteer sign-ups start returning the generic "Could not submit" error until the live constraint is migrated.

Useful? React with 👍 / 👎.

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.

1 participant