Files
Investidor-V2/resources/js/pages/investment/business-opportunity.tsx
T
nala 1106509116
tests / ci (push) Canceled after 0s
vrsao 2
2026-10-08 14:02:01 +02:00

81 lines
2.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { Link } from '@inertiajs/react';
import { Frame, button, card } from './shared';
import { businessModalities } from './business-types';
import PartnershipSourceLinks from '@/components/partnership-source-links';
type Business = {
id: string;
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;
};
export default function BusinessOpportunity({
record,
returnUrl = '/negocios',
interestUrl = `/negocios/${record.slug}/manifestar-interesse`,
}: {
record: Business;
returnUrl?: string;
interestUrl?: string;
}) {
return (
<Frame title={record.title}>
<PartnershipSourceLinks type="business" id={record.id} />
<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>
)}
{record.available_percentage && (
<p>Participação indicada: {record.available_percentage}%</p>
)}
{record.objective && (
<div>
<h2 className="font-bold">Objectivo</h2>
<p className="whitespace-pre-wrap">
{record.objective}
</p>
</div>
)}
<p className="text-sm">
A publicação não constitui garantia de titularidade,
avaliação, transmissibilidade ou retorno.
</p>
<Link className={button} href={interestUrl}>
Manifestar interesse
</Link>
</section>
</Frame>
);
}