commit9
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-30 20:02:30 +02:00
parent 6d14b4e6f0
commit c6373365bf
225 changed files with 15365 additions and 285 deletions
+70 -42
View File
@@ -7,13 +7,14 @@ import {
Search,
X,
} from 'lucide-react';
import { useEffect, useState } from 'react';
import { Fragment, useEffect, useState } from 'react';
import type { ReactNode } from 'react';
import { Button } from '@/components/ui/button';
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu';
import {
@@ -69,7 +70,13 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
entries: group.entries.filter(
(entry) =>
!query ||
normalize(group.label + ' ' + entry.label).includes(query),
normalize(
group.label +
' ' +
(entry.section ?? '') +
' ' +
entry.label,
).includes(query),
),
}))
.filter((group) => group.entries.length);
@@ -88,10 +95,10 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
</span>
<span>
<span className="block text-lg font-semibold tracking-tight text-white">
Compras
SGC
</span>
<span className="block text-xs text-slate-400">
Sistema de Gestão de Compras
Sistema de Gestão de Contratações
</span>
</span>
</Link>
@@ -186,10 +193,18 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
/>
</summary>
<ul className="mt-1 mb-3 ml-5 space-y-1 border-l border-white/10 pl-3">
{group.entries.map((entry) => {
{group.entries.map((entry, index) => {
const className = `block rounded-md px-3 py-2 text-[13px] leading-5 transition-colors focus-visible:outline-2 focus-visible:outline-white ${activeId === entry.id ? 'bg-red-500/15 font-medium text-red-300' : 'text-slate-400 hover:bg-white/5 hover:text-white'}`;
return (
<li key={entry.id}>
{entry.section &&
entry.section !==
group.entries[index - 1]
?.section && (
<p className="px-3 pt-3 pb-1 text-xs font-semibold text-slate-500">
{entry.section}
</p>
)}
{entry.fullPage ? (
<a
href={entry.path}
@@ -271,7 +286,7 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
className="flex w-[min(90vw,20rem)] max-w-none flex-col gap-0 border-white/10 bg-[#101715] p-0 text-white [&>button]:text-white"
>
<SheetHeader className="sr-only">
<SheetTitle>Menu de Compras</SheetTitle>
<SheetTitle>Menu do SGC</SheetTitle>
<SheetDescription>
Escolhe uma área da aplicação ou procura pelo nome.
</SheetDescription>
@@ -334,40 +349,50 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
sideOffset={8}
className="max-h-[min(70vh,32rem)] w-72 overflow-y-auto border-white/10 bg-[#101715] p-2 text-white"
>
{group.entries.map((entry) => (
<DropdownMenuItem
key={entry.id}
asChild
className={`rounded-md px-3 py-2 text-[13px] leading-5 focus:bg-white/5 focus:text-white ${activeId === entry.id ? 'bg-red-500/15 font-medium text-red-300' : 'text-slate-400'}`}
>
{entry.fullPage ? (
<a
href={entry.path}
onClick={navigate}
aria-current={
activeId ===
entry.id
? 'page'
: undefined
}
>
{entry.label}
</a>
) : (
<Link
href={entry.path}
onClick={navigate}
aria-current={
activeId ===
entry.id
? 'page'
: undefined
}
>
{entry.label}
</Link>
)}
</DropdownMenuItem>
{group.entries.map((entry, index) => (
<Fragment key={entry.id}>
{entry.section &&
entry.section !==
group.entries[index - 1]
?.section && (
<DropdownMenuLabel className="px-3 pt-3 pb-1 text-xs text-slate-500">
{entry.section}
</DropdownMenuLabel>
)}
<DropdownMenuItem
key={entry.id}
asChild
className={`rounded-md px-3 py-2 text-[13px] leading-5 focus:bg-white/5 focus:text-white ${activeId === entry.id ? 'bg-red-500/15 font-medium text-red-300' : 'text-slate-400'}`}
>
{entry.fullPage ? (
<a
href={entry.path}
onClick={navigate}
aria-current={
activeId ===
entry.id
? 'page'
: undefined
}
>
{entry.label}
</a>
) : (
<Link
href={entry.path}
onClick={navigate}
aria-current={
activeId ===
entry.id
? 'page'
: undefined
}
>
{entry.label}
</Link>
)}
</DropdownMenuItem>
</Fragment>
))}
</DropdownMenuContent>
</DropdownMenu>
@@ -388,7 +413,7 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
<Button
variant="outline"
size="icon"
aria-label="Abrir menu de Compras"
aria-label="Abrir menu do SGC"
onClick={() => setMobileOpen(true)}
className="shrink-0 lg:hidden"
>
@@ -478,7 +503,10 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
{children}
</main>
<footer className="mt-auto border-t border-border px-5 py-4 text-xs text-muted-foreground lg:px-8 print:hidden">
SGC · Sistema de Gestão de Compras
SGC · Sistema de Gestão de Contratações
<span className="block">
Aquisições, serviços e pessoas · Uma solução TEMPO
</span>
<Link
href="/settings/appearance"
className="ml-4 hover:text-foreground"