Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Data/Model/Alumno.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class Alumno

[StringLength(100, ErrorMessage = "El campo Correo debe tener como máximo 100 caracteres.")]
[EmailAddress(ErrorMessage = "El campo Correo debe ser una dirección de correo válida.")]
public string Correo { get; set; } = string.Empty;
public string? Correo { get; set; } = string.Empty;

[StringLength(150, ErrorMessage = "El campo Dirección debe tener como máximo 150 caracteres.")]
public string Direccion { get; set; } = string.Empty;
Expand Down
5 changes: 2 additions & 3 deletions Data/Seed/SeedAlumnosTutores.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*namespace OyeIap.Server.Data.Seed;
namespace OyeIap.Server.Data.Seed;
internal class SeedAlumnosTutores : Seed
{
private readonly string[] _nombres = new[] {
Expand Down Expand Up @@ -202,5 +202,4 @@ private string GetTutorFirstLastName(Alumno alumno, Parentesco parentesco, ref b

private static bool IsParent(Parentesco parentesco) =>
parentesco == Parentesco.Padre || parentesco == Parentesco.Madre;
}
*/
}
5 changes: 2 additions & 3 deletions Data/Seed/SeedInstituciones.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*namespace OyeIap.Server.Data.Seed;
namespace OyeIap.Server.Data.Seed;
internal class SeedInstituciones : Seed
{
private readonly string[] _nombres = [
Expand Down Expand Up @@ -106,5 +106,4 @@ public async Task SeedDatabaseWithInstitucionCountOfAsync(ApplicationDbContext c
currentCycle = 0;
}
}
}
*/
}
4 changes: 2 additions & 2 deletions DatabaseUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public static async Task EnsureDbCreatedAndSeedWithCountOfAsync(DbContextOptions
{
var seedInstituciones = new SeedInstituciones();
var seedAlumnos = new SeedAlumnosTutores();
await seedInstituciones.SeedDatabaseWithInstitucionCountOfAsync(context, 10);
await seedAlumnos.SeedDatabaseWithAlumnoCountOfAsync(context, 10);
await seedInstituciones.SeedDatabaseWithInstitucionCountOfAsync(context, 0);
await seedAlumnos.SeedDatabaseWithAlumnoCountOfAsync(context, 0);

await transaction.CommitAsync();
}
Expand Down
2 changes: 1 addition & 1 deletion Pages/AlumnosTable.razor
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</div>
<div class="col-2"
@onclick="@(async ()=>await ToggleAsync(nameof(Alumno.FechaIngreso)))">
<ColSortIndicator Column="@(nameof(Alumno.FechaIngreso))" />&nbsp;Fecha de Ingreso
<ColSortIndicator Column="@(nameof(Alumno.FechaIngreso))" />&nbsp;Fecha de Ingreso
</div>
<div class="col-2"
@onclick="@(async ()=>await ToggleAsync(nameof(Alumno.FechaEgreso)))">
Expand Down
19 changes: 11 additions & 8 deletions Pages/ViewAlumno.razor
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,33 @@ else
<FluentCard>
<FluentLabel Weight="FontWeight.Bold"> Detalles de alumno</FluentLabel>
<FluentLabel>Activo: @(Alumno.Activo ? "Si" : "No")</FluentLabel>
<FluentLabel>Fecha Ingreso: @Alumno.FechaIngreso</FluentLabel>
@if (Alumno.FechaEgreso.HasValue)
@if (Alumno.FechaIngreso != DateOnly.MinValue)
{
<FluentLabel>Fecha Egreso: @Alumno.FechaEgreso.Value.ToString("dd-MM-yyyy")</FluentLabel>
<FluentLabel>Fecha Ingreso: @Alumno.FechaIngreso.ToString("dd-MM-yyyy")</FluentLabel>
}
@if (Alumno.Activo == false && Alumno.FechaEgreso != DateOnly.MinValue)
{
<FluentLabel>Fecha Egreso: @Alumno.FechaEgreso.ToString("dd-MM-yyyy")</FluentLabel>
}
</FluentCard>
</FluentGridItem>
<FluentGridItem xs = "6" sm="3">
<FluentCard>
<FluentLabel Weight="FontWeight.Bold">Datos sobre el Alumno</FluentLabel>
<FluentLabel>El alumno usa aparato? @(Alumno.Aparato ? "Si" : "No") </FluentLabel>
@if (Alumno.Aparato && Alumno.FechaAparato is DateOnly fechaAparato)
@if (Alumno.Aparato && Alumno.FechaAparato is DateOnly fechaAparato && fechaAparato != DateOnly.MinValue)
{
<FluentLabel>Fecha de Aparato: @fechaAparato.ToString("dd-MM-yyyy")</FluentLabel>
@if(Alumno.Aparato && Alumno.FechaProgramacion is DateOnly fechaProgramacion)
@if (Alumno.Aparato && Alumno.FechaProgramacion is DateOnly fechaProgramacion && fechaProgramacion != DateOnly.MinValue)
{
<FluentLabel>Fecha de Porgramacion: @fechaProgramacion.ToString("dd-MM-yyyy")</FluentLabel>
}
}
<FluentLabel>El alumno tiene implante? @(Alumno.Implante ? "Si" : "No") </FluentLabel>
@if (Alumno.Aparato && Alumno.FechaImplante is DateOnly fechaImplante)
{
@if (Alumno.Implante && Alumno.FechaImplante is DateOnly fechaImplante && fechaImplante != DateOnly.MinValue)
{
<FluentLabel>Fecha de Implante: @fechaImplante.ToString("dd-MM-yyyy")</FluentLabel>
@if (Alumno.Aparato && Alumno.FechaConexion is DateOnly fechaConexion)
@if (Alumno.Implante && Alumno.FechaConexion is DateOnly fechaConexion && fechaConexion != DateOnly.MinValue)
{
<FluentLabel>Fecha de Conexion: @fechaConexion.ToString("dd-MM-yyyy")</FluentLabel>
}
Expand Down
2 changes: 1 addition & 1 deletion Pages/ViewInstitucion.razor
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ else
<FluentGridItem xs="6" sm="3">
<FluentCard>
<FluentLabel Weight="FontWeight.Bold">Patrocinio</FluentLabel>
@if (Institucion.PatrocinioActivo && Institucion.Donacion is decimal donacion)
@if (Institucion.PatrocinioActivo && Institucion.Donacion is decimal donacion && donacion != 0)
{
<FluentLabel>Donacion: @donacion.ToString("")</FluentLabel>
@if (Institucion.PatrocinioActivo && Institucion.DetallesAyuda is string detalles)
Expand Down
2 changes: 1 addition & 1 deletion Shared/ConcurrencyField.razor
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
else
{
<span class="alert alert-success">(same)</span>
<span class="alert alert-success"></span>
}
}

Expand Down