Atalho Nova requisição só no contexto de Compras, como o menu
This commit is contained in:
@@ -36,6 +36,7 @@ import type {
|
||||
import { roleLabels } from '@/types/procurement';
|
||||
import type { WorkContextState } from '@/types/work-context';
|
||||
import { WorkContextChange } from '@/components/work-context-change';
|
||||
import { contextOffersPath } from '@/lib/work-context-paths';
|
||||
import { ProcurementMenuResults } from '@/components/procurement-menu-results';
|
||||
import {
|
||||
matchesMenuSearch,
|
||||
@@ -559,18 +560,22 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
|
||||
<Link href="/login">Entrar</Link>
|
||||
</Button>
|
||||
)}
|
||||
{page.props.canRequest === true && (
|
||||
<Button
|
||||
asChild
|
||||
size="sm"
|
||||
className="hidden bg-[#ed1c24] text-white hover:bg-[#d01720] sm:inline-flex"
|
||||
>
|
||||
<Link href="/requisicoes/criar">
|
||||
<Plus className="size-4" />
|
||||
Nova requisição
|
||||
</Link>
|
||||
</Button>
|
||||
)}
|
||||
{page.props.canRequest === true &&
|
||||
contextOffersPath(
|
||||
context,
|
||||
'/requisicoes/criar',
|
||||
) && (
|
||||
<Button
|
||||
asChild
|
||||
size="sm"
|
||||
className="hidden bg-[#ed1c24] text-white hover:bg-[#d01720] sm:inline-flex"
|
||||
>
|
||||
<Link href="/requisicoes/criar">
|
||||
<Plus className="size-4" />
|
||||
Nova requisição
|
||||
</Link>
|
||||
</Button>
|
||||
)}
|
||||
{user && (
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
|
||||
Reference in New Issue
Block a user