-
Notifications
You must be signed in to change notification settings - Fork 0
DBP-125: 可以在 admin 頁面輕鬆加點數 #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The head ref may contain hidden characters: "pan93412/dbp-125-\u53EF\u4EE5\u5728-admin-\u9801\u9762\u8F15\u9B06\u52A0\u9EDE\u6578"
Conversation
pan93412
commented
Oct 23, 2025
- refacto(points): move query to components
- feat(points): allow granting points
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
f706430 to
becaf7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements functionality to grant points to users through the admin interface. It adds a GraphQL mutation for creating point records and provides a user-friendly dialog form for admins to award points.
Key changes:
- Added
createPointGraphQL mutation with supporting types and schemas - Implemented a form-based UI for granting points with user selection and validation
- Refactored query definitions from separate files into components for better colocation
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| schema.graphql | Added CreatePointInput type and createPoint mutation definition |
| gql/graphql.ts | Generated TypeScript types for new mutation and queries |
| gql/gql.ts | Added GraphQL document type mappings for point creation |
| app/(admin)/(activity-management)/points/page.tsx | Added CreatePointTrigger button to points management page |
| app/(admin)/(activity-management)/points/_components/update-form.tsx | New form component for point granting with user validation |
| app/(admin)/(activity-management)/points/_components/query.ts | Removed (query moved to component file) |
| app/(admin)/(activity-management)/points/_components/data-table.tsx | Moved query definition here and refactored to use fragments |
| app/(admin)/(activity-management)/points/_components/create.tsx | New dialog component for creating point records |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
app/(admin)/(activity-management)/points/_components/data-table.tsx
Outdated
Show resolved
Hide resolved
app/(admin)/(activity-management)/points/_components/update-form.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
app/(admin)/(activity-management)/points/_components/update-form.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.