Skip to content

Commit

Permalink
fix(rup): ajustes post rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
liquid36 committed Oct 5, 2020
1 parent 23d46a0 commit e365846
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
8 changes: 5 additions & 3 deletions src/app/modules/rup/components/core/rup.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<div *ngIf="(ultimaConsulta?.updatedAt || ultimaConsulta?.createdAt) && validacion === false" class="row bg-faded"
<div *ngIf="(ultimaConsulta?.updatedAt || ultimaConsulta?.createdAt) && !validacion" class="row bg-faded"
class="d-flex justify-content-start">
<div class="col m-0 p-0 bg-registro-anterior">
<span>Registros tomados el {{ (ultimaConsulta.updatedAt || ultimaConsulta.createdAt) | fecha }}, por {{ ultimaConsulta.createdBy
| nombre }}</span>
<span>
Registros tomados el {{ (ultimaConsulta.updatedAt || ultimaConsulta.createdAt) | fecha }},
por
{{ ultimaConsulta.createdBy | nombre }}</span>
</div>
</div>

Expand Down
29 changes: 15 additions & 14 deletions src/app/modules/rup/components/elementos/moleculaBase.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,27 @@ import { RupElement } from '.';
})
@RupElement('MoleculaBaseComponent')
export class MoleculaBaseComponent extends RUPComponent implements OnInit {
flag = true;
flag = false;
ultimaConsulta;
validacion = false;

ngOnInit() {
if (this.params && this.params.hasSections) {
this.registro.hasSections = true;
}
this.route.url.subscribe(urlParts => {
if (urlParts.length > 1) {
if (urlParts[1].path === 'validacion') {
this.validacion = true;
}
} else {
this.validacion = false;
}
});
// this.route.url.subscribe(urlParts => {
// if (urlParts.length > 1) {
// if (urlParts[1].path === 'validacion') {
// this.validacion = true;
// }
// } else {
// this.validacion = false;
// }
// });
this.validacion = !this.ejecucionService;

const buscarAnterior = this.params && this.params.buscarAnterior;
if (!this.validacion && !this.soloValores && buscarAnterior) {

this.prestacionesService.getRegistrosHuds(this.paciente.id, this.registro.concepto.conceptId).subscribe(consulta => {
// ordeno por fecha desde lo mas actual hasta infinito

Expand All @@ -46,12 +47,12 @@ export class MoleculaBaseComponent extends RUPComponent implements OnInit {

this.ultimaConsulta = consulta[0].registro;
this.registro.registros = JSON.parse(JSON.stringify(this.ultimaConsulta.registros));



}
}
this.flag = true;
});
} else {
this.flag = true;
}


Expand Down

0 comments on commit e365846

Please sign in to comment.