Skip to content

feat(admin): add bulk management actions#6

Merged
coding-hui merged 3 commits into
mainfrom
refactor/admin-pages-bulk-actions
May 16, 2026
Merged

feat(admin): add bulk management actions#6
coding-hui merged 3 commits into
mainfrom
refactor/admin-pages-bulk-actions

Conversation

@coding-hui
Copy link
Copy Markdown
Owner

@coding-hui coding-hui commented May 16, 2026

Summary

  • add admin batch APIs for question status/delete, paper delete, and exam close flows
  • add ProTable row selection and FooterToolbar batch actions for questions, papers, and exams
  • align list action menu styling so question, paper, and exam tables use a consistent More dropdown
  • extract small reusable admin detail components for question and paper editing
  • add desktop Biome formatting setup, format desktop Vue/Vite files, and restore the shared TypeScript base config used by desktop/client packages

Validation

  • git diff --check
  • pnpm --dir apps/admin biome
  • pnpm --dir apps/admin lint
  • pnpm --dir apps/desktop biome
  • pnpm --dir apps/desktop typecheck
  • pnpm --dir apps/desktop build
  • go test ./...

@coding-hui coding-hui marked this pull request as ready for review May 16, 2026 01:30
@coding-hui coding-hui merged commit 5acfc5f into main May 16, 2026
2 checks passed
@coding-hui coding-hui deleted the refactor/admin-pages-bulk-actions branch May 16, 2026 01:30
Copy link
Copy Markdown

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

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: 973f7d5e35

ℹ️ 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".

Comment on lines +423 to +425
method: 'DELETE',
data: { ids: selectedRows.map((item) => item.id) },
skipErrorHandler: true,
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 Send question batch IDs with a supported payload method

This call relies on method: 'DELETE' with data, but the @umijs/max request client is backed by umi-request semantics where data is only serialized for PUT/POST/PATCH (and apps/admin/src/request.ts does not override that behavior). In practice, the /api/admin/questions/batch request can be sent without the ids body, so the new bulk delete action fails with backend validation (invalid request/ids are required) instead of deleting selected questions.

Useful? React with 👍 / 👎.

Comment on lines +194 to +196
method: 'DELETE',
data: { ids: selectedRows.map((item) => item.id) },
skipErrorHandler: true,
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 Send paper batch IDs with a supported payload method

This bulk-delete request uses the same DELETE + data pattern, which is not serialized by umi-request defaults (only PUT/POST/PATCH carry data bodies, and no custom override is configured in apps/admin/src/request.ts). As a result, /api/admin/papers/batch can receive an empty body and reject the operation, so the new batch paper delete flow is functionally broken from the admin UI.

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