@@ -1,3 +1,4 @@
|
||||
import type { GeographyDescription } from '@/components/administrative-location';
|
||||
import { Head, Link, useForm } from '@inertiajs/react';
|
||||
import { Download, FileLock2, Pencil, Upload } from 'lucide-react';
|
||||
import { useRef } from 'react';
|
||||
@@ -27,6 +28,7 @@ type Document = {
|
||||
sha256: string;
|
||||
};
|
||||
type Props = {
|
||||
geography?: GeographyDescription;
|
||||
supplier: Supplier;
|
||||
documents: Document[];
|
||||
canEdit: boolean;
|
||||
@@ -36,6 +38,7 @@ type Props = {
|
||||
|
||||
export default function SupplierShow({
|
||||
supplier,
|
||||
geography = null,
|
||||
documents,
|
||||
canEdit,
|
||||
canDocuments,
|
||||
@@ -69,6 +72,17 @@ export default function SupplierShow({
|
||||
}
|
||||
/>
|
||||
<Panel title="Dados do fornecedor">
|
||||
{geography && (
|
||||
<p className="mb-4 text-sm">
|
||||
Localização administrativa:{' '}
|
||||
{geography.path
|
||||
.map((node) => node.name)
|
||||
.join(' / ')}
|
||||
{geography.requires_review
|
||||
? ' (requer revisão)'
|
||||
: ''}
|
||||
</p>
|
||||
)}
|
||||
{canDocuments && (
|
||||
<Link
|
||||
className="mb-4 inline-block font-semibold text-teal-700"
|
||||
|
||||
Reference in New Issue
Block a user