feat: adicionar tooltips normativos e refatorar relatorio PDF
This commit is contained in:
@@ -4,6 +4,7 @@ import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/com
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||
import { Slider } from '@/components/ui/slider';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
|
||||
import type { PermeabilityCase } from '@/lib/internal-pressure';
|
||||
|
||||
export const CpiSettingsCard: React.FC = () => {
|
||||
@@ -25,7 +26,14 @@ export const CpiSettingsCard: React.FC = () => {
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-4">
|
||||
<div className="space-y-1">
|
||||
<label className="text-xs font-medium text-foreground">Caso de Permeabilidade</label>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<label className="text-xs font-medium text-foreground cursor-help underline decoration-dashed decoration-muted-foreground underline-offset-4">Caso de Permeabilidade</label>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="right">
|
||||
<p className="text-sm">Baseado na <b>NBR 6123, Seção 6.3</b> (Coeficiente de pressão interna).<br/>Permeabilidade afeta a diferença de pressão total na estrutura.</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
<Select value={permeabilityCase} onValueChange={(val) => setPermeabilityCase(val as PermeabilityCase)}>
|
||||
<SelectTrigger className="w-full text-xs h-8">
|
||||
<SelectValue placeholder="Selecione" />
|
||||
@@ -44,7 +52,14 @@ export const CpiSettingsCard: React.FC = () => {
|
||||
{(permeabilityCase === 'dominant-windward' || permeabilityCase === 'dominant-lateral') && (
|
||||
<div className="space-y-2">
|
||||
<div className="flex justify-between items-center">
|
||||
<label className="text-xs font-medium text-foreground">Razão de áreas</label>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<label className="text-xs font-medium text-foreground cursor-help underline decoration-dashed decoration-muted-foreground underline-offset-4">Razão de áreas</label>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="right">
|
||||
<p className="text-sm">A razão entre a área das aberturas na face dominante<br/>e as demais determina o valor limite do Cpi (Figura 2 / Sec. 6.3).</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
<span className="text-xs text-muted-foreground font-mono">{cpiRatio.toFixed(2)}</span>
|
||||
</div>
|
||||
<Slider min={0.1} max={5} step={0.05} value={[cpiRatio]} onValueChange={(vals) => setCpiRatio(vals[0])} className="py-1 cursor-pointer" />
|
||||
|
||||
Reference in New Issue
Block a user