This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { Link } from "@inertiajs/react";
|
||||
import { Frame, button, card } from "./shared";
|
||||
import { businessModalities } from "./business-types";
|
||||
|
||||
type Business = {
|
||||
slug: string; title: string; objective?: string | null; stage?: string | null; activity_code?: string | null;
|
||||
slug: string; title: string; modality: string; objective?: string | null; stage?: string | null; activity_code?: string | null;
|
||||
amount_min?: string | null; amount_max?: string | null; available_percentage?: string | null; currency?: string | null;
|
||||
province?: string | null; district?: string | null; locality?: string | null; sector?: { name: string; slug: string } | null;
|
||||
};
|
||||
@@ -12,6 +13,7 @@ export default function BusinessOpportunity({ record, returnUrl = "/negocios", i
|
||||
<Frame title={record.title}>
|
||||
<Link href={returnUrl} className="underline">Voltar às oportunidades</Link>
|
||||
<section className={`${card} space-y-4`}>
|
||||
<p>{businessModalities[record.modality] ?? record.modality}</p>
|
||||
<p>{[record.sector?.name, record.stage, record.activity_code].filter(Boolean).join(" · ")}</p>
|
||||
{(record.province || record.district || record.locality) && <p>{[record.locality, record.district, record.province].filter(Boolean).join(", ")}</p>}
|
||||
{(record.amount_min || record.amount_max) && <p>Montante indicativo: {record.amount_min ?? "—"} – {record.amount_max ?? "—"} {record.currency}</p>}
|
||||
|
||||
Reference in New Issue
Block a user