-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(MPI): implementa seleccion editable de obras sociales
- Loading branch information
Showing
8 changed files
with
223 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 43 additions & 2 deletions
45
src/app/components/turnos/dar-turnos/seleccionar-financiador.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,51 @@ | ||
<div *ngIf="showSelector"> | ||
<div *ngIf="showSelector && !editable"> | ||
<plex-radio *ngIf="obraSocial" [(ngModel)]="obraSocial" name="obraSocial" (change)="seleccionarObraSocial($event)" | ||
label="Seleccione una Obra Social" [data]="selectorObrasSociales"> | ||
</plex-radio> | ||
<plex-select class="w-100" *ngIf="showListado || !obraSocial" [(ngModel)]="financiador" name="financiador" | ||
[data]="selectorFinanciadores" | ||
[data]="opcionesFinanciadores" | ||
label="{{ selectorObrasSociales ? 'Seleccione una opción' : 'Seleccione una Obra Social'}}" | ||
idField="nombre" labelField="nombre" (change)="seleccionarOtro($event)"> | ||
</plex-select> | ||
</div> | ||
|
||
<div class="editable" *ngIf="!showSelector && editable"> | ||
<plex-title titulo="Obras Sociales del paciente" size="sm"></plex-title> | ||
<div *ngIf="obrasSocialesPUCO.length > 0"> | ||
<ul> | ||
<li *ngFor="let obra of obrasSocialesPUCO"> | ||
<plex-icon size="md" name="check" class="mr-2"></plex-icon> {{ obra.nombre }} | ||
</li> | ||
</ul> | ||
</div> | ||
<plex-label *ngIf="!obrasSocialesPUCO.length" class="mt-3" direction="column" size="md" icon="informacion" | ||
type="warning" titulo="El paciente no contiene obras sociales cargadas"> | ||
</plex-label> | ||
|
||
<plex-title titulo="Editar financiadores" size="sm"></plex-title> | ||
<div class="mt-2"> | ||
<plex-list> | ||
<plex-item *ngFor="let financiador of financiadoresANDES; let i = index"> | ||
<plex-label size="sm" icon="check" titulo="{{ financiador.nombre }}" | ||
subtitulo="Fecha actualización: {{ financiador.fechaDeActualizacion | fecha }}"> | ||
</plex-label> | ||
<plex-button icon="delete" type="danger" size="sm" (click)="eliminarFinanciador(i)"> | ||
</plex-button> | ||
</plex-item> | ||
</plex-list> | ||
<plex-label *ngIf="!financiadoresANDES.length" class="mt-3" direction="column" size="md" icon="informacion" | ||
type="warning" titulo="El paciente no contiene otros financiadores cargados"> | ||
</plex-label> | ||
</div> | ||
<div class="selector-wrapper"> | ||
<div class="selector"> | ||
<plex-select [(ngModel)]="financiadorSeleccionado" [data]="opcionesFinanciadores" | ||
label="Agregar Financiador" idField="id" labelField="nombre" | ||
[disabled]="!opcionesFinanciadores.length"> | ||
</plex-select> | ||
</div> | ||
<plex-button icon="plus" type="info" tooltip="Agregar financiador" titlePosition="left" size="md" | ||
[disabled]="!opcionesFinanciadores.length" (click)="agregarFinanciador(financiadorSeleccionado)"> | ||
</plex-button> | ||
</div> | ||
</div> |
30 changes: 30 additions & 0 deletions
30
src/app/components/turnos/dar-turnos/seleccionar-financiador.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.editable { | ||
display: flex; | ||
flex-direction: column; | ||
|
||
ul { | ||
list-style: none; | ||
padding-left: 18px; | ||
gap: 5px; | ||
display: flex; | ||
flex-direction: column; | ||
|
||
.item-lista { | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
} | ||
|
||
.selector-wrapper { | ||
display: flex; | ||
flex-direction: row; | ||
flex-grow: 1; | ||
align-items: flex-end; | ||
|
||
.selector { | ||
flex-grow: 1; | ||
margin-right: 15px; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { IPaciente } from '../interfaces/IPaciente'; | ||
|
||
@Component({ | ||
selector: 'obra-social', | ||
templateUrl: 'obra-social.html' | ||
}) | ||
|
||
export class ObraSocialComponent { | ||
@Input() paciente: IPaciente; | ||
|
||
public financiador; | ||
|
||
setFinanciador(financiador: any) { | ||
this.financiador = financiador; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<section class="mt-2"> | ||
<seleccionar-financiador [paciente]="paciente" editable="true" | ||
(setFinanciador)="setFinanciador($event)"></seleccionar-financiador> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters