docs: add report draft and dashboard form refinements
This commit is contained in:
parent
4e0cf0140f
commit
441e709193
26 changed files with 1700 additions and 505 deletions
|
|
@ -3,7 +3,7 @@ import { useMutation, useQuery } from "@tanstack/react-query";
|
|||
import { createFileRoute, Link } from "@tanstack/react-router";
|
||||
import { toast } from "sonner";
|
||||
|
||||
import { PageSection, QueryStateCard, ResourceListCard } from "@/components/dashboard-ui";
|
||||
import { ConfirmDeleteIconButton, PageSection, QueryStateCard, ResourceListCard } from "@/components/dashboard-ui";
|
||||
import { queryClient, trpc, trpcClient } from "@/utils/trpc";
|
||||
|
||||
export const Route = createFileRoute("/dashboard/notes")({
|
||||
|
|
@ -76,21 +76,13 @@ function RouteComponent() {
|
|||
{
|
||||
key: "actions",
|
||||
header: "Actions",
|
||||
className: "w-28",
|
||||
className: "w-16",
|
||||
render: (item: (typeof notes.data)[number]) => (
|
||||
<Button
|
||||
type="button"
|
||||
variant="ghost"
|
||||
className="h-auto px-0 text-red-600 hover:text-red-700"
|
||||
<ConfirmDeleteIconButton
|
||||
itemLabel={`note ${item.title}`}
|
||||
disabled={removeNote.isPending}
|
||||
onClick={() => {
|
||||
if (confirm(`Delete note \"${item.title}\"?`)) {
|
||||
removeNote.mutate(item.id);
|
||||
}
|
||||
}}
|
||||
>
|
||||
Delete
|
||||
</Button>
|
||||
onConfirm={() => removeNote.mutate(item.id)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
]}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue