Ajusta placeholders, formulários e widgets

This commit is contained in:
Esdras Renan 2025-11-06 23:13:41 -03:00
parent 343f0c8c64
commit b94cea2f9a
33 changed files with 2122 additions and 462 deletions

View file

@ -6,7 +6,7 @@ import { useRouter } from "next/navigation"
import { useMutation, useQuery } from "convex/react"
import { formatDistanceToNow } from "date-fns"
import { ptBR } from "date-fns/locale"
import { Plus, Sparkles, Trash2 } from "lucide-react"
import { LayoutTemplate, MonitorPlay, Plus, Share2, Sparkles, Trash2 } from "lucide-react"
import type { Id } from "@/convex/_generated/dataModel"
import { api } from "@/convex/_generated/api"
@ -239,23 +239,42 @@ export function DashboardListView() {
</div>
{activeDashboards.length === 0 ? (
<Card className="border-dashed border-muted-foreground/40 bg-muted/10">
<CardHeader className="flex flex-col items-start gap-2 sm:flex-row sm:items-center sm:justify-between">
<div>
<CardTitle className="flex items-center gap-2">
<Sparkles className="size-4 text-primary" />
Crie o seu primeiro dashboard
</CardTitle>
<CardDescription>
Monte painéis por cliente, fila ou operação e compartilhe com a equipe.
</CardDescription>
<Card className="overflow-hidden border-dashed border-slate-200 bg-gradient-to-br from-white via-white to-slate-50 shadow-sm">
<CardContent className="flex flex-col gap-6 p-6 lg:flex-row lg:items-center lg:justify-between">
<div className="space-y-4">
<div className="flex items-center gap-3">
<div className="inline-flex size-12 items-center justify-center rounded-full bg-sky-50 text-sky-700">
<Sparkles className="size-5" />
</div>
<div>
<h3 className="text-xl font-semibold text-neutral-900">Nenhum dashboard ainda</h3>
<p className="text-sm text-muted-foreground">Use KPIs, filas e texto para contar a história da operação.</p>
</div>
</div>
<ul className="space-y-2 text-sm text-neutral-600">
<li className="flex items-start gap-2">
<LayoutTemplate className="mt-0.5 size-4 text-slate-500" />
<span>Escolha widgets arrastando no canvas e organize por seções.</span>
</li>
<li className="flex items-start gap-2">
<Share2 className="mt-0.5 size-4 text-slate-500" />
<span>Compartilhe com a equipe, salve filtros padrão e gere PDFs/PNGs.</span>
</li>
<li className="flex items-start gap-2">
<MonitorPlay className="mt-0.5 size-4 text-slate-500" />
<span>Entre no modo apresentação/TV para um loop automático em tela cheia.</span>
</li>
</ul>
</div>
<div className="flex w-full flex-col gap-3 rounded-2xl border border-slate-200 bg-white/90 p-4 lg:w-auto lg:min-w-[220px]">
{renderCreateButton()}
<Button variant="outline" className="gap-2" asChild>
<Link href="/views">
<LayoutTemplate className="size-4" />
Ver exemplos
</Link>
</Button>
</div>
{renderCreateButton()}
</CardHeader>
<CardContent className="space-y-2 text-sm text-muted-foreground">
<p> Arraste e redimensione widgets livremente no canvas.</p>
<p> Salve filtros padrão por dashboard e gere exportações em PDF/PNG.</p>
<p> Ative o modo TV ou compartilhe via link público com token rotativo.</p>
</CardContent>
</Card>
) : (