fix(frontend): correct pluralization in classmates count

Use ternary operator to display correct singular/plural form:
- "1 compañero" (singular) when count === 1
- "X compañeros" (plural) otherwise

Fixes DEF-003: Page incorrectly showed "1 compañeros" instead of
"1 compañero" when there was exactly one classmate.
This commit is contained in:
Andrés Eduardo García Márquez 2026-01-08 00:02:09 -05:00
parent e0c130294f
commit ac6119b265
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ import { InitialsPipe } from '@shared/pipes/initials.pipe';
<h2 class="classmates-section-title"> <h2 class="classmates-section-title">
<mat-icon>book</mat-icon> <mat-icon>book</mat-icon>
{{ item.subjectName }} {{ item.subjectName }}
<span class="classmates-count">{{ item.classmates.length }} compañeros</span> <span class="classmates-count">{{ item.classmates.length }} {{ item.classmates.length === 1 ? 'compañero' : 'compañeros' }}</span>
</h2> </h2>
@if (item.classmates.length === 0) { @if (item.classmates.length === 0) {