feat: add update and delete operations for users and policies in admin interface
Add updateUser and deleteUser API client methods with PATCH and DELETE endpoints. Add updatePolicy and deletePolicy API client methods. Add email field to User type. Add Actions column to users and policies tables with Edit and Delete buttons. Implement inline edit forms for users and policies with state management for editing mode. Add update and delete mutations with query invalidation on success. Add error notices
This commit is contained in:
@@ -28,6 +28,14 @@ func (s *Service) Create(ctx context.Context, actorID uuid.UUID, input CreateReq
|
||||
return s.repo.Create(ctx, input, actorID)
|
||||
}
|
||||
|
||||
func (s *Service) Update(ctx context.Context, policyID uuid.UUID, input UpdateRequest) (Policy, error) {
|
||||
return s.repo.Update(ctx, policyID, input)
|
||||
}
|
||||
|
||||
func (s *Service) Delete(ctx context.Context, policyID uuid.UUID) error {
|
||||
return s.repo.Delete(ctx, policyID)
|
||||
}
|
||||
|
||||
func (s *Service) ResolveDestinations(ctx context.Context, userID uuid.UUID, deviceID *uuid.UUID) ([]string, error) {
|
||||
return s.repo.ResolveDestinations(ctx, userID, deviceID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user