feat: adicionar tooltips normativos e refatorar relatorio PDF
This commit is contained in:
@@ -11,6 +11,7 @@ import { Slider } from '@/components/ui/slider';
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Separator } from '@/components/ui/separator';
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
|
||||
import ExportMenu from '../components/ExportMenu';
|
||||
import { EducationalManual } from '@/components/EducationalManual';
|
||||
|
||||
@@ -43,7 +44,14 @@ const GalpaoModule: React.FC = () => {
|
||||
<CardContent className="space-y-6">
|
||||
<div className="space-y-3">
|
||||
<div className="flex justify-between items-center">
|
||||
<label className="text-sm font-medium text-foreground">Largura (X)</label>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<label className="text-sm font-medium text-foreground cursor-help underline decoration-dashed decoration-muted-foreground underline-offset-4">Largura (X)</label>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="right">
|
||||
<p className="text-sm">Determina as proporções em planta (a/b)<br/>usadas nas <b>Tabelas 4 e 5</b> da NBR 6123.</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
<span className="text-sm text-muted-foreground font-mono">{width} m</span>
|
||||
</div>
|
||||
<Slider min={5} max={80} step={1} value={[width]} onValueChange={(vals) => setWidth(vals[0])} className="py-1 cursor-pointer" />
|
||||
@@ -51,7 +59,14 @@ const GalpaoModule: React.FC = () => {
|
||||
|
||||
<div className="space-y-3">
|
||||
<div className="flex justify-between items-center">
|
||||
<label className="text-sm font-medium text-foreground">Comprimento (Z)</label>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<label className="text-sm font-medium text-foreground cursor-help underline decoration-dashed decoration-muted-foreground underline-offset-4">Comprimento (Z)</label>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="right">
|
||||
<p className="text-sm">Usado nas proporções a/b e b/a (Tabelas 4 e 5).<br/>Importante também para o cálculo de Atrito.</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
<span className="text-sm text-muted-foreground font-mono">{length} m</span>
|
||||
</div>
|
||||
<Slider min={5} max={150} step={1} value={[length]} onValueChange={(vals) => setLength(vals[0])} className="py-1 cursor-pointer" />
|
||||
@@ -59,7 +74,14 @@ const GalpaoModule: React.FC = () => {
|
||||
|
||||
<div className="space-y-3">
|
||||
<div className="flex justify-between items-center">
|
||||
<label className="text-sm font-medium text-foreground">Altura (Y)</label>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<label className="text-sm font-medium text-foreground cursor-help underline decoration-dashed decoration-muted-foreground underline-offset-4">Altura (Y)</label>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="right">
|
||||
<p className="text-sm">Altura total. Define a proporção h/b para S₂ (Tabela 1).<br/>Influencia nas <b>Tabelas 4 e 5</b> para cálculo do Cpe.</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
<span className="text-sm text-muted-foreground font-mono">{height} m</span>
|
||||
</div>
|
||||
<Slider min={3} max={40} step={0.5} value={[height]} onValueChange={(vals) => setHeight(vals[0])} className="py-1 cursor-pointer" />
|
||||
@@ -67,7 +89,14 @@ const GalpaoModule: React.FC = () => {
|
||||
|
||||
<div className="space-y-3">
|
||||
<div className="flex justify-between items-center">
|
||||
<label className="text-sm font-medium text-foreground">Inclinação (θ)</label>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<label className="text-sm font-medium text-foreground cursor-help underline decoration-dashed decoration-muted-foreground underline-offset-4">Inclinação (θ)</label>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="right">
|
||||
<p className="text-sm">Ângulo do telhado (<b>Tabela 5</b>).<br/>Acima de 60° interpola para Cpe de paredes.</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
<span className="text-sm text-muted-foreground font-mono">{roofPitch}°</span>
|
||||
</div>
|
||||
<Slider min={0} max={60} step={1} value={[roofPitch]} onValueChange={(vals) => setRoofPitch(vals[0])} className="py-1 cursor-pointer" />
|
||||
@@ -76,7 +105,14 @@ const GalpaoModule: React.FC = () => {
|
||||
<Separator />
|
||||
|
||||
<div className="space-y-2">
|
||||
<label className="text-sm font-medium text-foreground">Direção do Vento</label>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<label className="text-sm font-medium text-foreground cursor-help underline decoration-dashed decoration-muted-foreground underline-offset-4">Direção do Vento</label>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="right">
|
||||
<p className="text-sm">Define a face barlavento. Tabelas da NBR são lidas para 0° e 90° separadamente.</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
<Select value={windAngle.toString()} onValueChange={(val) => setWindAngle(Number(val) as 0 | 90)}>
|
||||
<SelectTrigger className="w-full">
|
||||
<SelectValue placeholder="Selecione a direção" />
|
||||
|
||||
Reference in New Issue
Block a user