fix(offers): align private navigation with portal dropdown menus
tests / ci (push) Canceled after 0s
tests / ci (push) Canceled after 0s
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Head, Link } from '@inertiajs/react';
|
||||
import { offerStates } from '@/lib/offer-editorial';
|
||||
import OfferNavigation from '@/components/offer-navigation';
|
||||
|
||||
export default function OfferPreparations({
|
||||
records,
|
||||
@@ -47,41 +48,7 @@ export default function OfferPreparations({
|
||||
</Link>
|
||||
)}
|
||||
</header>
|
||||
<nav
|
||||
aria-label="Filtrar ofertas por estado"
|
||||
className="flex flex-wrap gap-3 text-sm"
|
||||
>
|
||||
<Link
|
||||
href="/minhas-oportunidades/ofertas"
|
||||
aria-current={!filters.state ? 'page' : undefined}
|
||||
>
|
||||
Todas
|
||||
</Link>
|
||||
{Object.entries(offerStates).map(([state, label]) => (
|
||||
<Link
|
||||
key={state}
|
||||
href={`/minhas-oportunidades/ofertas?state=${state}`}
|
||||
aria-current={
|
||||
filters.state === state ? 'page' : undefined
|
||||
}
|
||||
>
|
||||
{label}
|
||||
</Link>
|
||||
))}
|
||||
</nav>
|
||||
{filters.operational && (
|
||||
<nav
|
||||
className="flex flex-wrap gap-4"
|
||||
aria-label="Acompanhamento de ofertas"
|
||||
>
|
||||
<Link href="/minhas-oportunidades/ofertas?operational=1">
|
||||
Todas no meu âmbito
|
||||
</Link>
|
||||
<Link href="/minhas-oportunidades/ofertas?operational=1&pending_reports=1">
|
||||
Denúncias pendentes
|
||||
</Link>
|
||||
</nav>
|
||||
)}
|
||||
<OfferNavigation canCreate={canCreate} filters={filters} />
|
||||
{!records.data.length && (
|
||||
<p>Ainda não existem ofertas neste âmbito.</p>
|
||||
)}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Head, Link, router } from '@inertiajs/react';
|
||||
import { Head, router } from '@inertiajs/react';
|
||||
import { useState } from 'react';
|
||||
import {
|
||||
TerritoryFields,
|
||||
@@ -16,6 +16,7 @@ import OfferParticularsFields, {
|
||||
import OfferPrivateResources from '@/components/offer-private-resources';
|
||||
import OfferConfidentialAccess from '@/components/offer-confidential-access';
|
||||
import OfferOperations from '@/components/offer-operations';
|
||||
import OfferNavigation from '@/components/offer-navigation';
|
||||
|
||||
type Offer = OfferParticulars & {
|
||||
price_mode?: string | null;
|
||||
@@ -169,12 +170,7 @@ export default function OfferPreparation({
|
||||
return (
|
||||
<main className="mx-auto w-full max-w-4xl space-y-6 p-4 md:p-8">
|
||||
<Head title="Preparar oferta" />
|
||||
<Link
|
||||
href="/minhas-oportunidades/ofertas"
|
||||
className="text-sm underline"
|
||||
>
|
||||
As minhas ofertas
|
||||
</Link>
|
||||
<OfferNavigation canCreate={contexts.length > 0} />
|
||||
<header>
|
||||
<h1 className="text-2xl font-semibold">Preparar oferta</h1>
|
||||
<p className="text-muted-foreground mt-2">
|
||||
|
||||
Reference in New Issue
Block a user