Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: translate and improve how informations are displayed #266

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions apps/client/app/(auth)/(members)/members/assemblies/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default async function AssemblyPage() {
const badgeFrench = {
current: 'En cours',
upcoming: 'À venir',
past: 'Passée',
past: 'Terminée',
};

return (
Expand All @@ -50,7 +50,14 @@ export default async function AssemblyPage() {
<div className="space-y-4">
<div className="flex items-center space-x-2">
<CalendarIcon className="text-muted-foreground" />
<span>{new Date(assembly.date).toLocaleDateString()}</span>
<span>
{`${new Date(assembly.date).toLocaleDateString('fr-FR', {
weekday: 'long',
year: 'numeric',
month: 'long',
day: 'numeric',
})} à ${new Date(assembly.date).toLocaleTimeString('fr-FR', { hour: '2-digit', minute: '2-digit' })}`}
</span>
</div>
<div className="flex items-center space-x-2">
<MapPinIcon className="text-muted-foreground" />
Expand All @@ -60,18 +67,18 @@ export default async function AssemblyPage() {
<div className="flex items-center space-x-2">
<UsersIcon className="text-muted-foreground" />
<span>
{status === 'current' && assembly.attendees
? `${Object.keys(assembly.attendees).length} attendees`
: 'Pas de participants confirmés pour le moment'}
{status === 'past' && assembly.attendees
? `${Object.keys(assembly.attendees).length} attendees`
: 'Aucun participants confirmés'}
{status === 'current' &&
assembly.attendees &&
`${Object.keys(assembly.attendees).length} membres sont présents`}
{status === 'past' &&
assembly.attendees &&
`${Object.keys(assembly.attendees).length} membres ont participé`}
</span>
</div>
)}
{assembly.lawsuit && (
<div className="mt-4">
<h3 className="font-semibold">Lawsuit:</h3>
<h3 className="font-semibold">Compte rendu de l'assemblée :</h3>
<p>{assembly.lawsuit}</p>
</div>
)}
Expand Down
Loading