Skip to content

Commit

Permalink
[#175] Card de error y de exito
Browse files Browse the repository at this point in the history
  • Loading branch information
juanblas09 committed Oct 13, 2023
1 parent a5010f3 commit 7e00079
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/_models/padron.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export class Estudiante{
dni: number;
legajo: number;
nombre: string;
carrera: string;
}
31 changes: 31 additions & 0 deletions src/app/padron/padron.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,34 @@ <h2>CONSULTA DE PADRÓN 2023</h2>
</div>
</div>
</div>

<div class="row mt-2" *ngIf="consultado && votante!==null">
<div class="col-md-6 offset-md-3">
<div class="card text-center">
<div class="card-header bg-success text-light">
<h2>Tschopp, Juan Blas</h2>
</div>
<div class="card-body">
<b>DNI:</b> 42.530.052 <br />
<b>Legajo:</b> 26063 <br />
<b>Carrera:</b> Ing. Sist. Inf. <br />
<br />
<b>Habilitado/a para votar</b>
</div>
</div>
</div>
</div>

<div class="row mt-2" *ngIf="consultado && votante===null">
<div class="col-md-6 offset-md-3">
<div class="card text-center">
<div class="card-header bg-danger text-light">
<h2>DNI no encontrado</h2>
</div>
<div class="card-body">
No encontramos tu DNI en el padrón. <br />
Contactate con la Junta Electoral antes del 20/10.
</div>
</div>
</div>
</div>
4 changes: 4 additions & 0 deletions src/app/padron/padron.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component, inject } from "@angular/core";
import { Estudiante } from "@app/_models/padron";
import { PadronService } from "@app/_services/padron.service";

@Component({
Expand All @@ -8,6 +9,8 @@ import { PadronService } from "@app/_services/padron.service";
})
export class PadronComponent {
dni: string;
consultado: boolean = false;
votante: Estudiante = null;

private padronService = inject(PadronService);

Expand All @@ -22,5 +25,6 @@ export class PadronComponent {
console.log(error);
}
);
this.consultado = true;
}
}

0 comments on commit 7e00079

Please sign in to comment.