fix(checklists): adiciona skeleton de carregamento na lista de templates
All checks were successful
All checks were successful
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
ce52a4393b
commit
d6188fd384
1 changed files with 22 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ import { Input } from "@/components/ui/input"
|
||||||
import { Label } from "@/components/ui/label"
|
import { Label } from "@/components/ui/label"
|
||||||
import { SearchableCombobox, type SearchableComboboxOption } from "@/components/ui/searchable-combobox"
|
import { SearchableCombobox, type SearchableComboboxOption } from "@/components/ui/searchable-combobox"
|
||||||
import { Switch } from "@/components/ui/switch"
|
import { Switch } from "@/components/ui/switch"
|
||||||
|
import { Skeleton } from "@/components/ui/skeleton"
|
||||||
import { Textarea } from "@/components/ui/textarea"
|
import { Textarea } from "@/components/ui/textarea"
|
||||||
|
|
||||||
type ChecklistItemType = "checkbox" | "question"
|
type ChecklistItemType = "checkbox" | "question"
|
||||||
|
|
@ -496,7 +497,27 @@ export function ChecklistTemplatesManager() {
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
{!templates ? (
|
{!templates ? (
|
||||||
<p className="text-sm text-neutral-600">Carregando templates...</p>
|
<div className="space-y-3">
|
||||||
|
{Array.from({ length: 4 }).map((_, index) => (
|
||||||
|
<div key={`template-skeleton-${index}`} className="rounded-2xl border border-slate-200 bg-white p-4 shadow-sm">
|
||||||
|
<div className="flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between">
|
||||||
|
<div className="min-w-0 space-y-2">
|
||||||
|
<div className="flex flex-wrap items-center gap-2">
|
||||||
|
<Skeleton className="h-5 w-40" />
|
||||||
|
<Skeleton className="h-5 w-16 rounded-full" />
|
||||||
|
<Skeleton className="h-5 w-14 rounded-full" />
|
||||||
|
</div>
|
||||||
|
<Skeleton className="h-4 w-64" />
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<Skeleton className="h-8 w-16 rounded-md" />
|
||||||
|
<Skeleton className="h-8 w-20 rounded-md" />
|
||||||
|
<Skeleton className="h-8 w-8 rounded-md" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
) : orderedTemplates.length === 0 ? (
|
) : orderedTemplates.length === 0 ? (
|
||||||
<div className="rounded-xl border border-dashed border-slate-200 p-6 text-sm text-neutral-600">
|
<div className="rounded-xl border border-dashed border-slate-200 p-6 text-sm text-neutral-600">
|
||||||
Nenhum template cadastrado.
|
Nenhum template cadastrado.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue