@@ -6,6 +6,8 @@ import {
|
||||
controlClass,
|
||||
} from '@/components/procurement';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { SavedProcurementSearches } from '@/components/saved-procurement-searches';
|
||||
import type { SavedSearches } from '@/components/saved-procurement-searches';
|
||||
|
||||
type Group = {
|
||||
key: string;
|
||||
@@ -34,10 +36,12 @@ export default function ProcurementSearch({
|
||||
term,
|
||||
groups,
|
||||
invoiceSearchAvailable = false,
|
||||
savedSearches = null,
|
||||
}: {
|
||||
term: string;
|
||||
groups: Group[];
|
||||
invoiceSearchAvailable?: boolean;
|
||||
savedSearches?: SavedSearches | null;
|
||||
}) {
|
||||
const form = useForm({ q: term });
|
||||
return (
|
||||
@@ -90,6 +94,13 @@ export default function ProcurementSearch({
|
||||
</p>
|
||||
)}
|
||||
</Panel>
|
||||
{savedSearches && (
|
||||
<SavedProcurementSearches
|
||||
key={term}
|
||||
saved={savedSearches}
|
||||
term={term}
|
||||
/>
|
||||
)}
|
||||
{term.trim().length < 2 && (
|
||||
<p role="status">
|
||||
Introduza pelo menos dois caracteres para pesquisar.
|
||||
|
||||
Reference in New Issue
Block a user