style(companies): centraliza itens na tabela de empresas

- Adiciona text-center em todos os TableCell
- Centraliza conteudo interno com justify-center
- Mantem texto a esquerda dentro dos cards de contrato/contato

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
rever-tecnologia 2025-12-18 11:29:29 -03:00
parent d38d5d39eb
commit a9feea9b78

View file

@ -814,13 +814,13 @@ function TableView({ companies, machineCountsBySlug, onEdit, onDelete }: TableVi
return ( return (
<TableRow key={company.id} className="hover:bg-muted/40"> <TableRow key={company.id} className="hover:bg-muted/40">
<TableCell className="align-middle"> <TableCell className="text-center align-middle">
<div className="flex min-h-[3.5rem] flex-col justify-center gap-1"> <div className="flex min-h-[3.5rem] flex-col items-center justify-center gap-1">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<p className="font-semibold text-foreground">{company.name}</p> <p className="font-semibold text-foreground">{company.name}</p>
{company.isAvulso ? <Badge variant="outline">Avulso</Badge> : null} {company.isAvulso ? <Badge variant="outline">Avulso</Badge> : null}
</div> </div>
<div className="flex flex-wrap gap-1 text-xs text-muted-foreground"> <div className="flex flex-wrap justify-center gap-1 text-xs text-muted-foreground">
{company.domain ? <span>{company.domain}</span> : null} {company.domain ? <span>{company.domain}</span> : null}
{company.phone ? ( {company.phone ? (
<span className="inline-flex items-center gap-1"> <span className="inline-flex items-center gap-1">
@ -829,7 +829,7 @@ function TableView({ companies, machineCountsBySlug, onEdit, onDelete }: TableVi
</span> </span>
) : null} ) : null}
</div> </div>
<div className="flex flex-wrap gap-1"> <div className="flex flex-wrap justify-center gap-1">
{company.tags.map((tag) => ( {company.tags.map((tag) => (
<Badge key={tag} variant="secondary" className="text-[11px] uppercase"> <Badge key={tag} variant="secondary" className="text-[11px] uppercase">
{tag} {tag}
@ -838,13 +838,13 @@ function TableView({ companies, machineCountsBySlug, onEdit, onDelete }: TableVi
</div> </div>
</div> </div>
</TableCell> </TableCell>
<TableCell className="align-middle text-sm"> <TableCell className="text-center align-middle text-sm">
{contracts.length === 0 ? ( {contracts.length === 0 ? (
<p className="text-muted-foreground">Nenhum contrato registrado.</p> <p className="text-muted-foreground">Nenhum contrato registrado.</p>
) : ( ) : (
<ul className="space-y-1 text-xs"> <ul className="space-y-1 text-xs">
{contracts.map((contract) => ( {contracts.map((contract) => (
<li key={contract.id} className="rounded-md border border-border/60 px-2 py-1"> <li key={contract.id} className="rounded-md border border-border/60 px-2 py-1 text-left">
<p className="font-semibold capitalize">{contract.contractType}</p> <p className="font-semibold capitalize">{contract.contractType}</p>
<p className="text-muted-foreground"> <p className="text-muted-foreground">
{contract.scope.length ? contract.scope.join(", ") : "Escopo base"} {contract.scope.length ? contract.scope.join(", ") : "Escopo base"}
@ -860,13 +860,13 @@ function TableView({ companies, machineCountsBySlug, onEdit, onDelete }: TableVi
</ul> </ul>
)} )}
</TableCell> </TableCell>
<TableCell className="align-middle text-sm"> <TableCell className="text-center align-middle text-sm">
{contacts.length === 0 ? ( {contacts.length === 0 ? (
<p className="text-muted-foreground">Nenhum contato cadastrado.</p> <p className="text-muted-foreground">Nenhum contato cadastrado.</p>
) : ( ) : (
<ul className="space-y-1 text-xs"> <ul className="space-y-1 text-xs">
{contacts.map((contact) => ( {contacts.map((contact) => (
<li key={contact.id} className="rounded-md border border-border/60 px-2 py-1"> <li key={contact.id} className="rounded-md border border-border/60 px-2 py-1 text-left">
<p className="font-semibold">{contact.fullName}</p> <p className="font-semibold">{contact.fullName}</p>
<p className="text-muted-foreground">{contact.email}</p> <p className="text-muted-foreground">{contact.email}</p>
<p className="text-muted-foreground capitalize">{contact.role.replace("_", " ")}</p> <p className="text-muted-foreground capitalize">{contact.role.replace("_", " ")}</p>
@ -880,11 +880,11 @@ function TableView({ companies, machineCountsBySlug, onEdit, onDelete }: TableVi
</ul> </ul>
)} )}
</TableCell> </TableCell>
<TableCell className="align-middle text-sm"> <TableCell className="text-center align-middle text-sm">
<Badge variant="outline">{machineCount}</Badge> <Badge variant="outline">{machineCount}</Badge>
</TableCell> </TableCell>
<TableCell className="align-middle text-right text-sm"> <TableCell className="text-center align-middle text-sm">
<div className="flex flex-wrap items-center justify-end gap-1.5"> <div className="flex flex-wrap items-center justify-center gap-1.5">
<Button <Button
size="sm" size="sm"
variant="outline" variant="outline"