UDT-009: Overrides de PermisosJson por usuario — cierre módulo Auth #12

Merged
dmolinari merged 14 commits from feature/UDT-009 into main 2026-04-16 13:12:23 +00:00
2 changed files with 7 additions and 1 deletions
Showing only changes of commit 6822d56e11 - Show all commits

View File

@@ -1,5 +1,6 @@
import { BrowserRouter } from 'react-router-dom'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { Toaster } from 'sonner'
import { AppRoutes } from './router'
const queryClient = new QueryClient({
@@ -15,6 +16,7 @@ function App() {
<BrowserRouter>
<AppRoutes />
</BrowserRouter>
<Toaster richColors closeButton position="top-right" />
</QueryClientProvider>
)
}

View File

@@ -1,5 +1,6 @@
import { useState, useEffect } from 'react'
import { isAxiosError } from 'axios'
import { toast } from 'sonner'
import { AlertCircle } from 'lucide-react'
import { Alert, AlertDescription } from '@/components/ui/alert'
import { Button } from '@/components/ui/button'
@@ -116,10 +117,13 @@ export function PermisosEditor({ userId }: PermisosEditorProps) {
{ grant, deny },
{
onError: (err) => {
setSaveError(resolveErrorMessage(err))
const msg = resolveErrorMessage(err)
setSaveError(msg)
toast.error(msg)
},
onSuccess: () => {
setSaveError(null)
toast.success('Permisos actualizados correctamente')
},
},
)