Skip to content

Commit 9127a91

Browse files
Corregir certificado de ética
1 parent 7bcec4c commit 9127a91

File tree

1 file changed

+95
-17
lines changed

1 file changed

+95
-17
lines changed

modules/descargas/matriculaciones/certificado-etica-body.ts

Lines changed: 95 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,48 @@ import { loadImage } from '../model/informe.class';
44

55
export class CertificadoEticaBody extends HTMLComponent {
66
template = `
7+
<style>
8+
.tabla-sanciones {
9+
width: 100%;
10+
border-collapse: collapse;
11+
margin-top: 10px;
12+
margin-bottom: 10px;
13+
}
14+
.tabla-sanciones thead td {
15+
border: 1px solid #000;
16+
padding: 8px;
17+
text-align: center;
18+
font-weight: bold;
19+
background-color: #f0f0f0;
20+
}
21+
.tabla-sanciones tbody td {
22+
border: 1px solid #000;
23+
padding: 8px;
24+
text-align: center;
25+
}
26+
.tabla-posgrados {
27+
width: 100%;
28+
border-collapse: collapse;
29+
margin-top: 10px;
30+
margin-bottom: 10px;
31+
}
32+
.tabla-posgrados thead td {
33+
border: 1px solid #000;
34+
padding: 8px;
35+
text-align: center;
36+
font-weight: bold;
37+
background-color: #f0f0f0;
38+
}
39+
.tabla-posgrados tbody td {
40+
border: 1px solid #000;
41+
padding: 8px;
42+
text-align: center;
43+
}
44+
</style>
745
<main>
8-
<h4 align="center">
46+
<h3 align="center">
947
<b>Provincia del Neuquén</b>
10-
</h4>
48+
</h3>
1149
<section>
1250
<div class="row">
1351
<div class="col">
@@ -19,31 +57,52 @@ export class CertificadoEticaBody extends HTMLComponent {
1957
{{#if tienePosgrados}}
2058
Y como especialista en:
2159
<br/><br/>
22-
<table class="w-100">
60+
<table class="tabla-posgrados">
2361
<thead>
2462
<tr>
25-
<td class="w-75">Especialidad</td>
26-
<td>Mat N°</td>
27-
<td>Desde</td>
63+
<td class="w-50">Especialidad</td>
64+
<td class="w-25">Mat N°</td>
65+
<td class="w-25">Desde</td>
2866
</tr>
2967
</thead>
30-
</table>
31-
<hr>
32-
<table class="w-100">
3368
<tbody>
3469
{{#each matricula.posgrados}}
3570
<tr>
36-
<td class="w-75">{{ titulo }}</td>
37-
<td>{{ matriculaNumero }}</td>
38-
<td>{{ fechaAlta }}</td>
71+
<td class="w-50">{{ titulo }}</td>
72+
<td class="w-25">{{ matriculaNumero }}</td>
73+
<td class="w-25">{{ fechaAlta }}</td>
3974
</tr>
4075
{{/each}}
4176
</tbody>
4277
</table>
4378
{{/if}}
44-
<p>
45-
A la fecha, no surge de nuestros registros presuntas infracciones emergentes del incumplimiento de la Ley N° 578, y su Decreto Reglamentario N° 338/78, referidas al citado profesional.
46-
</p>
79+
{{#if tieneSanciones}}
80+
<p> <b>Según los registros de esta Dirección, el/la profesional registra las siguientes sanciones disciplinarias: </b></p>
81+
<table class="tabla-sanciones">
82+
<thead>
83+
<tr>
84+
<td class="w-25">Tipo de sanción</td>
85+
<td class="w-25">Fecha de registro</td>
86+
<td class="w-25">Norma legal</td>
87+
<td class="w-25">Vencimiento</td>
88+
</tr>
89+
</thead>
90+
<tbody>
91+
{{#each sanciones}}
92+
<tr>
93+
<td class="w-25">{{sancion.nombre}}</td>
94+
<td class="w-25">{{fecha}}</td>
95+
<td class="w-25">{{normaLegal}}</td>
96+
<td class="w-25">{{vencimiento}}</td>
97+
</tr>
98+
{{/each}}
99+
</tbody>
100+
</table>
101+
{{else}}
102+
<p>
103+
A la fecha, no surge de nuestros registros presuntas infracciones emergentes del incumplimiento de la Ley N° 578, y su Decreto Reglamentario N° 338/78, referidas al citado profesional.
104+
</p>
105+
{{/if}}
47106
<p>
48107
<b>{{ detalleExtension }}</b>
49108
</p>
@@ -66,22 +125,41 @@ export class CertificadoEticaBody extends HTMLComponent {
66125

67126
constructor(public _data) {
68127
super();
69-
70128
const tienePosgrados = (_data.matricula.posgrados?.length > 0);
71129
const firmaSupervisor = loadImage('templates/matriculaciones/img/firma-supervisor.png');
72130
const selloSubse = loadImage('templates/matriculaciones/img/sello.png');
73131
const footer = 'Dirección de Fiscalización Sanitaria | Antártida Argentina y Colón, Edif. CAM 3 | CP (8300) Neuquén | Tel.: 0299 - 4495590 / 5591';
74132
const detalleExtension = `Por pedido del interesado/a, a los fines que hubiere lugar, se extiende el presente, en Neuquén a los ${moment().format('D')} días del mes de ${(moment().format('MMMM'))} de ${moment().format('YYYY')}.`;
75133
_data.matricula.grado.fechaAlta = moment(_data.matricula.grado.fechaAlta).format('DD/MM/YYYY');
76134
_data.matricula.posgrados?.map(p => p.fechaAlta = moment(p.fechaAlta).format('YYYY'));
135+
136+
_data.sanciones?.map(s => {
137+
s.fecha = s.fecha ? moment(s.fecha).format('DD/MM/YYYY') : '-';
138+
s.vencimiento = s.vencimiento ? moment(s.vencimiento).format('DD/MM/YYYY') : '-';
139+
s.normaLegal = s.normaLegal || '-';
140+
return s;
141+
});
142+
143+
if (_data.sanciones.length && !_data.sanciones[0].sancion.id) {
144+
_data.sanciones.shift();
145+
}
146+
147+
_data.sanciones = _data.sanciones?.filter(sancion =>
148+
sancion.vencimiento && moment(sancion.vencimiento, 'DD/MM/YYYY').isAfter(moment())
149+
) || [];
150+
151+
const tieneSanciones = (_data.sanciones?.length > 0);
152+
77153
this.data = {
78154
matricula: _data.matricula,
79155
profesional: _data.profesional,
80156
tienePosgrados,
81157
detalleExtension,
82158
footer,
83159
firmaSupervisor,
84-
selloSubse
160+
selloSubse,
161+
tieneSanciones,
162+
sanciones: _data.sanciones
85163
};
86164
}
87165

0 commit comments

Comments
 (0)