136 lines
5.5 KiB
TypeScript
136 lines
5.5 KiB
TypeScript
import { getTranslations } from 'next-intl/server';
|
|
import { Card, CardContent } from '@/components/ui/card';
|
|
import { CreditCard } from 'lucide-react';
|
|
import { WikiBackLink } from '@/components/wiki/WikiBackLink';
|
|
|
|
export default async function LettreCreditPage() {
|
|
const t = await getTranslations('dashboard.wikiPages');
|
|
|
|
const types = t.raw('lettreCredit.types') as Array<{ name: string; description: string }>;
|
|
const parties = t.raw('lettreCredit.parties') as Array<{ role: string; description: string }>;
|
|
const documents = t.raw('lettreCredit.documents') as Array<{ name: string; description: string }>;
|
|
const errors = t.raw('lettreCredit.errors') as string[];
|
|
const datesItems = t.raw('lettreCredit.datesItems') as Array<{
|
|
label: string;
|
|
description: string;
|
|
}>;
|
|
const costsItems = t.raw('lettreCredit.costsItems') as Array<{
|
|
label: string;
|
|
description: string;
|
|
}>;
|
|
|
|
return (
|
|
<div className="space-y-6">
|
|
<WikiBackLink />
|
|
|
|
<div className="mb-8">
|
|
<div className="flex items-center gap-3">
|
|
<CreditCard className="w-10 h-10 text-brand-navy" />
|
|
<h1 className="text-3xl font-bold text-brand-navy">{t('lettreCredit.title')}</h1>
|
|
</div>
|
|
<p className="mt-3 text-neutral-600 max-w-3xl">{t('lettreCredit.description')}</p>
|
|
</div>
|
|
|
|
<div className="mt-8">
|
|
<h2 className="text-xl font-bold text-brand-navy mb-4">{t('lettreCredit.typesTitle')}</h2>
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
{types.map(type => (
|
|
<Card key={type.name} className="bg-white">
|
|
<CardContent className="pt-4">
|
|
<h4 className="font-semibold text-brand-navy">{type.name}</h4>
|
|
<p className="text-sm text-neutral-600 mt-1">{type.description}</p>
|
|
</CardContent>
|
|
</Card>
|
|
))}
|
|
</div>
|
|
</div>
|
|
|
|
<div className="mt-8">
|
|
<h2 className="text-xl font-bold text-brand-navy mb-4">{t('lettreCredit.partiesTitle')}</h2>
|
|
<div className="overflow-x-auto">
|
|
<table className="w-full text-sm bg-white rounded-lg border">
|
|
<thead className="bg-neutral-50">
|
|
<tr>
|
|
<th className="text-left p-3 font-medium">{t('lettreCredit.colRole')}</th>
|
|
<th className="text-left p-3 font-medium">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{parties.map(p => (
|
|
<tr key={p.role} className="border-t hover:bg-neutral-50">
|
|
<td className="p-3 font-medium text-brand-navy">{p.role}</td>
|
|
<td className="p-3 text-neutral-600">{p.description}</td>
|
|
</tr>
|
|
))}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div className="mt-8">
|
|
<h2 className="text-xl font-bold text-brand-navy mb-4">{t('lettreCredit.documentsTitle')}</h2>
|
|
<div className="space-y-3">
|
|
{documents.map(doc => (
|
|
<div key={doc.name} className="flex items-start gap-3 bg-white p-4 rounded-lg border">
|
|
<span className="text-green-500 mt-0.5 flex-shrink-0">✓</span>
|
|
<div>
|
|
<span className="font-medium text-brand-navy">{doc.name}</span>
|
|
<span className="text-sm text-neutral-500 ml-2">— {doc.description}</span>
|
|
</div>
|
|
</div>
|
|
))}
|
|
</div>
|
|
</div>
|
|
|
|
<Card className="mt-8 bg-red-50 border-red-200">
|
|
<CardContent className="pt-6">
|
|
<h3 className="font-semibold text-red-900 mb-3">{t('lettreCredit.errorsTitle')}</h3>
|
|
<ul className="space-y-2">
|
|
{errors.map((err, i) => (
|
|
<li key={i} className="flex items-start gap-2 text-sm text-red-800">
|
|
<span className="text-red-500 mt-0.5 flex-shrink-0">⚠</span> {err}
|
|
</li>
|
|
))}
|
|
</ul>
|
|
</CardContent>
|
|
</Card>
|
|
|
|
<Card className="mt-4 bg-brand-turquoise/5 border-brand-turquoise/30">
|
|
<CardContent className="pt-6">
|
|
<h3 className="font-semibold text-brand-navy mb-2">{t('lettreCredit.ucp600Title')}</h3>
|
|
<p className="text-sm text-brand-navy">{t('lettreCredit.ucp600Content')}</p>
|
|
</CardContent>
|
|
</Card>
|
|
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 mt-8">
|
|
<Card className="bg-white">
|
|
<CardContent className="pt-6">
|
|
<h3 className="font-semibold text-brand-navy mb-3">{t('lettreCredit.datesTitle')}</h3>
|
|
<div className="space-y-3">
|
|
{datesItems.map(item => (
|
|
<div key={item.label}>
|
|
<span className="font-medium text-neutral-800 text-sm">{item.label}</span>
|
|
<p className="text-xs text-neutral-600 mt-0.5">{item.description}</p>
|
|
</div>
|
|
))}
|
|
</div>
|
|
</CardContent>
|
|
</Card>
|
|
<Card className="bg-white">
|
|
<CardContent className="pt-6">
|
|
<h3 className="font-semibold text-brand-navy mb-3">{t('lettreCredit.costsTitle')}</h3>
|
|
<div className="space-y-3">
|
|
{costsItems.map(item => (
|
|
<div key={item.label}>
|
|
<span className="font-medium text-neutral-800 text-sm">{item.label}</span>
|
|
<p className="text-xs text-neutral-600 mt-0.5">{item.description}</p>
|
|
</div>
|
|
))}
|
|
</div>
|
|
</CardContent>
|
|
</Card>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|