Permitir consulta pública dos ecrãs reais com dados privados protegidos
tests / ci (push) Canceled after 0s
tests / ci (push) Canceled after 0s
This commit is contained in:
@@ -56,7 +56,11 @@ export function AppSidebar() {
|
||||
...(canReadPurchases
|
||||
? [
|
||||
{ title: 'Fornecedores', href: '/fornecedores', icon: Users },
|
||||
{ title: 'Avaliação de fornecedores', href: '/fornecedores/avaliacoes', icon: Users },
|
||||
{
|
||||
title: 'Avaliação de fornecedores',
|
||||
href: '/fornecedores/avaliacoes',
|
||||
icon: Users,
|
||||
},
|
||||
{ title: 'Cotações', href: '/cotacoes', icon: Scale },
|
||||
{
|
||||
title: 'Ordens de compra',
|
||||
@@ -157,7 +161,14 @@ export function AppSidebar() {
|
||||
icon: FileCheck2,
|
||||
},
|
||||
...(payablesAvailable === true
|
||||
? [{title: 'Obrigações a fornecedores', href: '/obrigacoes-fornecedores', icon: FileCheck2, fullPage: true}]
|
||||
? [
|
||||
{
|
||||
title: 'Obrigações a fornecedores',
|
||||
href: '/obrigacoes-fornecedores',
|
||||
icon: FileCheck2,
|
||||
fullPage: true,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{
|
||||
title: 'Pagamentos externos',
|
||||
|
||||
@@ -34,6 +34,9 @@ import { roleLabels } from '@/types/procurement';
|
||||
export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
|
||||
const page = usePage();
|
||||
const user = page.props.auth?.user;
|
||||
const publicNavigation = page.props.publicNavigation as
|
||||
| { paths: string[] }
|
||||
| undefined;
|
||||
const [mobileOpen, setMobileOpen] = useState(false);
|
||||
const [search, setSearch] = useState('');
|
||||
const [expanded, setExpanded] = useState<Record<string, boolean>>({});
|
||||
@@ -44,6 +47,7 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
|
||||
const groups = procurementNavigation(
|
||||
access?.active ? access.permissions : (user?.purchasing_role ?? ''),
|
||||
page.props.payablesAvailable === true,
|
||||
publicNavigation?.paths,
|
||||
);
|
||||
const activeId = activeProcurementEntry(groups, page.url);
|
||||
const activeGroup = groups.find((group) =>
|
||||
@@ -274,6 +278,13 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
|
||||
);
|
||||
return (
|
||||
<div className="min-h-screen bg-slate-50 text-foreground dark:bg-background print:block">
|
||||
{publicNavigation && (
|
||||
<p className="border-b bg-background p-3 text-center text-sm">
|
||||
Consulta pública de desenvolvimento · Sem organização
|
||||
seleccionada e sem registos privados. Alterações exigem
|
||||
autenticação.
|
||||
</p>
|
||||
)}
|
||||
<a
|
||||
href="#sgc-main"
|
||||
className="sr-only z-50 rounded bg-white p-3 text-black focus:not-sr-only focus:fixed focus:top-2 focus:left-2"
|
||||
|
||||
Reference in New Issue
Block a user