chore: update comments and documentation for clarity and consistency across various files

- Translated comments from Spanish to English in vite.config.ts, docker-compose.yml, attendance-risk.ts, analytics.ts, attendance.ts, attendees.ts, enums.ts, groups.ts, and onboarding.ts.
- Improved descriptions for better understanding of code functionality and purpose.
- Ensured uniformity in terminology and phrasing throughout the codebase.
This commit is contained in:
Jose Selesan
2026-10-01 16:06:54 -03:00
parent 01b35691df
commit 69275c37b4
100 changed files with 1121 additions and 1086 deletions

View File

@@ -14,7 +14,7 @@ export type AttendeeRecord = {
updatedAt: Date;
};
/** Item del listado con el resumen de asistencia y cobro ya resuelto. */
/** Listing item with the attendance and payment summary already resolved. */
export type AttendeeListItemRecord = AttendeeRecord & {
attendances: { status: AttendeeListItem['recentAttendance'][number] }[];
payments: {
@@ -39,15 +39,15 @@ export function toAttendeeDto(record: AttendeeRecord): AttendeeDto {
};
}
/* El renglón que resume el cobro vigente. Si hay algo impago manda el de
vencimiento más antiguo: quien arrastra un cargo viejo tiene que ver cuántos
días lleva atras, no el vencimiento de un cargo nuevo. Si no queda nada
impago, el último pago cerrado sirve para marcar la fila como al día. */
/* The row that summarizes the current charge. If something is unpaid the
oldest due date wins: someone carrying an old charge has to see how many
days late they are, not the due date of a new charge. If nothing is left
unpaid, the last closed payment serves to mark the row as ok. */
function pickRelevantPayment(
payments: AttendeeListItemRecord['payments'],
): AttendeeListItem['payment'] {
// CANCELLED no es un cobro. La consulta ya los deja fuera, pero descartarlos
// acá también evita que un cargo anulado gane la fila por ser el más antiguo.
// CANCELLED is not a charge. The query already filters them out, but dropping
// them here too keeps a voided charge from winning the row for being the oldest.
const byDueDate = payments
.filter((payment) => payment.status !== 'CANCELLED')
.sort((a, b) => a.dueDate.getTime() - b.dueDate.getTime());
@@ -60,8 +60,8 @@ function pickRelevantPayment(
return { status: relevant.status, dueDate: relevant.dueDate.toISOString() };
}
/* La consulta viene en orden descendente; la fila los muestra de más antigua a
más reciente para que el punto de la derecha sea el último hecho. */
/* The query comes in descending order; the row shows them from oldest to most
recent so the dot on the right is the latest event. */
export function toAttendeeListItemDto(record: AttendeeListItemRecord): AttendeeListItem {
return {
...toAttendeeDto(record),
@@ -71,8 +71,8 @@ export function toAttendeeListItemDto(record: AttendeeListItemRecord): AttendeeL
}
/**
* Normaliza números de teléfono eliminando espacios, guiones, paréntesis y puntos.
* Conserva el '+' si lo tiene al inicio para números internacionales.
* Normalizes phone numbers by stripping spaces, dashes, parentheses and dots.
* Keeps a leading '+' for international numbers.
*/
export function normalizePhone(rawPhone: string): string {
const trimmed = rawPhone.trim();