fix: corrige cliques nao responsivos e erros silenciosos

- Remove coluna de acoes sem implementacao em data-table
- Corrige loading states travados em new-ticket-dialog, close-ticket-dialog
- Adiciona finally blocks em forgot-password e reset-password
- Adiciona tratamento de erros em invokes do Tauri (ChatWidget, ChatHubWidget)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
esdrasrenan 2025-12-15 19:15:51 -03:00
parent a285e6f252
commit 7a3791117b
7 changed files with 51 additions and 63 deletions

View file

@ -20,16 +20,16 @@ import {
verticalListSortingStrategy,
} from "@dnd-kit/sortable"
import { CSS } from "@dnd-kit/utilities"
import {
IconChevronDown,
IconCircleCheckFilled,
IconDotsVertical,
IconGripVertical,
IconLayoutColumns,
IconLoader,
IconPlus,
IconTrendingUp,
} from "@tabler/icons-react"
import {
IconChevronDown,
IconCircleCheckFilled,
IconDotsVertical,
IconGripVertical,
IconLayoutColumns,
IconLoader,
IconPlus,
IconTrendingUp,
} from "@tabler/icons-react"
import {
ColumnDef,
ColumnFiltersState,
@ -95,13 +95,13 @@ import {
TableHeader,
TableRow,
} from "@/components/ui/table"
import {
Tabs,
TabsContent,
TabsList,
TabsTrigger,
} from "@/components/ui/tabs"
import { TablePagination } from "@/components/ui/table-pagination"
import {
Tabs,
TabsContent,
TabsList,
TabsTrigger,
} from "@/components/ui/tabs"
import { TablePagination } from "@/components/ui/table-pagination"
export const schema = z.object({
id: z.number(),
@ -282,30 +282,7 @@ const columns: ColumnDef<z.infer<typeof schema>>[] = [
)
},
},
{
id: "actions",
cell: () => (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
variant="ghost"
className="data-[state=open]:bg-muted text-muted-foreground flex size-8"
size="icon"
>
<IconDotsVertical />
<span className="sr-only">Open menu</span>
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" className="w-32">
<DropdownMenuItem>Edit</DropdownMenuItem>
<DropdownMenuItem>Make a copy</DropdownMenuItem>
<DropdownMenuItem>Favorite</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem variant="destructive">Delete</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
),
},
// Actions column removed - no functionality implemented
]
function DraggableRow({ row }: { row: Row<z.infer<typeof schema>> }) {
@ -526,18 +503,18 @@ export function DataTable({
</TableBody>
</Table>
</DndContext>
</div>
<TablePagination
table={table}
pageSizeOptions={[10, 20, 30, 40, 50]}
rowsPerPageLabel="Rows per page"
showSelectedRows
selectionLabel={(selected, total) =>
`${selected} of ${total} row${total === 1 ? "" : "s"} selected.`
}
className="pb-4"
/>
</TabsContent>
</div>
<TablePagination
table={table}
pageSizeOptions={[10, 20, 30, 40, 50]}
rowsPerPageLabel="Rows per page"
showSelectedRows
selectionLabel={(selected, total) =>
`${selected} of ${total} row${total === 1 ? "" : "s"} selected.`
}
className="pb-4"
/>
</TabsContent>
<TabsContent
value="past-performance"
className="flex flex-col px-4 lg:px-6"

View file

@ -630,14 +630,12 @@ export function CloseTicketDialog({
if (linkedReference.trim().length > 0) {
if (isLinkLoading) {
toast.error("Aguarde carregar o ticket vinculado antes de encerrar.", { id: "close-ticket" })
setIsSubmitting(false)
return
}
if (linkNotFound || !linkedTicketCandidate) {
toast.error("Não encontramos o ticket informado para vincular. Verifique o número e tente novamente.", {
id: "close-ticket",
})
setIsSubmitting(false)
return
}
}

View file

@ -612,6 +612,7 @@ export function NewTicketDialog({
const plainDescription = sanitizedDescription.replace(/<[^>]*>/g, "").trim()
if (plainDescription.length === 0) {
form.setError("description", { type: "custom", message: "Descreva o contexto do chamado." })
setLoading(false)
return
}