Skip to content

Commit

Permalink
fix(turnos-prestaciones): bug conceptId (#2006)
Browse files Browse the repository at this point in the history
* fix(turnos-prestaciones): conceptId

* fix(turnos-prestaciones): ternaria

* refactor(visualizacion): delete home component

Co-authored-by: Pancho <martinebucarey@gmail,com>
Co-authored-by: Mariano Andres Botta <marianoabotta@gmail.com>
  • Loading branch information
3 people authored Oct 30, 2020
1 parent e7f8526 commit 8835db9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 132 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,61 +173,30 @@ export class TurnosPrestacionesComponent implements OnInit {
this.parametros['organizacion'] = this.auth.organizacion.id;
}
}
const data = value.value;
if (tipo === 'prestaciones') {
if (value.value !== null) {
this.parametros['prestacion'] = value.value.conceptId;
} else {
this.parametros['prestacion'] = '';
}
this.parametros['prestacion'] = data ? data.conceptId : '';
}
if (tipo === 'profesionales') {
if (value.value) {
this.parametros['idProfesional'] = value.value.id;
} else {
this.parametros['idProfesional'] = '';
}
this.parametros['idProfesional'] = data ? data.id : '';
}
if (tipo === 'estado') {
if (value.value) {
this.parametros['estado'] = value.value.id;
} else {
this.parametros['estado'] = '';
}
this.parametros['estado'] = data ? data.id : '';
}
if (tipo === 'financiador') {
if (value.value) {
this.parametros['financiador'] = value.value.nombre;
} else {
this.parametros['financiador'] = '';
}
this.parametros['financiador'] = data ? data.nombre : '';
}
if (tipo === 'sumar') {
if (value.value) {
this.parametros['financiador'] = 'SUMAR';
} else {
this.parametros['financiador'] = '';
}
this.parametros['financiador'] = data ? 'SUMAR' : '';
}
if (tipo === 'sinOS') {
if (value.value) {
this.parametros['financiador'] = 'No posee';
} else {
this.parametros['financiador'] = '';
}
this.parametros['financiador'] = data ? 'No posee' : '';
}
if (tipo === 'estadoFacturacion') {
if (value.value) {
this.parametros['estadoFacturacion'] = value.value.id;
} else {
this.parametros['estadoFacturacion'] = '';
}
this.parametros['estadoFacturacion'] = data ? data.id : '';
}
if (tipo === 'documento') {
if (value.value) {
this.parametros['documento'] = value.value;
} else {
this.parametros['documento'] = '';
}
this.parametros['documento'] = data ? data : '';
}
if (tipo === 'filter') {
this.buscar(this.parametros);
Expand Down
12 changes: 0 additions & 12 deletions src/app/modules/estadisticas/components/home.component.ts

This file was deleted.

Empty file.
77 changes: 0 additions & 77 deletions src/app/modules/estadisticas/components/home.scss

This file was deleted.

3 changes: 0 additions & 3 deletions src/app/modules/estadisticas/estadistica.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { EstAgendasService } from './services/agenda.service';
import { SolicitudesTopService } from './services/top.service';

// Components
import { HomeComponent } from './components/home.component';
import { FiltrosComponent } from './components/citas/filtros.component';
import { GraficosComponent } from './components/citas/graficos.component';
import { FiltrosSolicitudesComponent } from './components/top/filtrosSolicitudes.component';
Expand Down Expand Up @@ -36,7 +35,6 @@ import { SumPipe } from './pipes/sum.pipe';
],
declarations: [
SumPipe,
HomeComponent,
FiltrosComponent,
FiltrosSolicitudesComponent,
CitasComponent,
Expand All @@ -46,7 +44,6 @@ import { SumPipe } from './pipes/sum.pipe';
TopComponent
],
entryComponents: [
HomeComponent,
FiltrosComponent,
FiltrosSolicitudesComponent,
CitasComponent,
Expand Down

0 comments on commit 8835db9

Please sign in to comment.