Skip to content

feat(user-management): implemented the enable, and disable api endpoint - #123

Open
panckeyk wants to merge 2 commits into
mainfrom
feat/user-enable-disable
Open

panckeyk wants to merge 2 commits into
mainfrom
feat/user-enable-disable

Conversation

@panckeyk

Copy link
Copy Markdown
Contributor

Ticket

Description

Added

  • API hook for disabling users (disable-user.ts)
  • API hook for enabling users (enable-user.ts)
  • Enable/disable actions in user row actions dropdown

Modified

  • user-actions.tsx

    • Replaced "Delete User" action with conditional "Disable User" / "Enable User"
    • Disable action styled as destructive (red)
    • Enable action styled with CheckCircle icon
    • Actions switch based on user active status
    • Inline mutation without confirmation dialog
  • filters.tsx

    • Removed soft-delete status filter (exclude/only/include)
    • Cleaned up deleted filter references
    • Removed unused imports and state

Technical Details

  • Uses backend endpoints: POST /api/users/{id}/disable/ and POST /api/users/{id}/enable/
  • Query invalidation refreshes user list after mutation
  • Conditional rendering based on user.is_active

Related Issue

Closes #

Type of Change

  • Bug fix
  • New feature
  • Chore
  • Refactor
  • Documentation

Image Change

Copilot AI balanced review requested due to automatic review settings November 29, 2026 18:14

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

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