23 lines
766 B
TypeScript
23 lines
766 B
TypeScript
import { Component, effect, inject, input } from '@angular/core';
|
|
import { DecimalPipe } from '@angular/common';
|
|
import { PacienteRiesgoState } from './paciente-riesgo.state';
|
|
import { tieneIntervalo } from './paciente-riesgo.validation';
|
|
|
|
@Component({
|
|
selector: 'app-paciente-riesgo-tabla',
|
|
imports: [DecimalPipe],
|
|
providers: [PacienteRiesgoState],
|
|
templateUrl: './paciente-riesgo-tabla.html',
|
|
styleUrl: './paciente-riesgo-tabla.scss',
|
|
})
|
|
export class PacienteRiesgoTabla {
|
|
readonly idSeudonimo = input.required<string>();
|
|
private readonly state = inject(PacienteRiesgoState);
|
|
readonly estado = this.state.estado;
|
|
readonly tieneIntervalo = tieneIntervalo;
|
|
|
|
constructor() {
|
|
effect(() => this.state.idSeudonimo.set(this.idSeudonimo()));
|
|
}
|
|
}
|