Skip to content

Commit

Permalink
feat(mpi): muestra direccion legal del paciente
Browse files Browse the repository at this point in the history
incorpora label con direccion legal del paciente en tab 'datos de contacto'
  • Loading branch information
negro89 committed Aug 26, 2020
1 parent 826691c commit 3133990
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
9 changes: 9 additions & 0 deletions src/app/core/mpi/components/datos-contacto.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,15 @@ export class DatosContactoComponent implements OnInit {

// -------------------- DOMICILIO -------------------

get direccionLegal() {
let dir = null;
if (this.paciente.direccion[1]) {
dir = this.paciente.direccion[1];
dir = `${dir.valor}, ${dir.ubicacion.localidad.nombre}, ${dir.ubicacion.provincia.nombre}`;
}
return dir;
}

loadProvincia() {
this.provincias$ = this.provinciaService.get({}).pipe(
cache()
Expand Down
23 changes: 17 additions & 6 deletions src/app/core/mpi/components/datos-contacto.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,23 @@
[(ngModel)]="paciente.direccion[0].ubicacion.barrio" name="barrio"
[data]="barrios$ | async" labelField="nombre" grow="full">
</plex-select>
<plex-text label="Dirección" [(ngModel)]="paciente.direccion[0].valor" name="direccion"
placeholder="Ej: Avenida las Flores 1200">
</plex-text>
<plex-button [disabled]="disableGeoreferenciar" type="info" size="md" icon="map-marker"
(click)="geoReferenciar()">
</plex-button>
<label class="mb-1">Direccion</label>
<div class="w-100" justify="between">
<plex-text label="" [(ngModel)]="paciente.direccion[0].valor" name="direccion"
placeholder="Ej: Avenida las Flores 1200">
</plex-text>
<plex-button [disabled]="disableGeoreferenciar" type="info" size="md" icon="map-marker"
(click)="geoReferenciar()">
</plex-button>
</div>
<div class="w-100 mt-3" grow="1">
<plex-grid type="auto" size="sm">
<plex-label *ngIf="paciente.direccion[1]" size="md" span="3"
titulo="Domicilio legal del paciente" subtitulo="{{ direccionLegal }}"
hint="Domicilio declarado en el documento de identidad del paciente">
</plex-label>
</plex-grid>
</div>
</plex-wrapper>
</ng-container>

Expand Down

0 comments on commit 3133990

Please sign in to comment.