ConceptPortal-public/rsconcept/frontend/src/components/Shared/InfoConstituenta.tsx

40 lines
953 B
TypeScript
Raw Normal View History

2023-09-11 20:31:54 +03:00
import { IConstituenta } from '../../models/rsform';
2023-09-21 14:58:01 +03:00
import { labelCstTypification } from '../../utils/labels';
2023-08-15 21:43:15 +03:00
2023-08-16 10:11:22 +03:00
interface InfoConstituentaProps
2023-08-15 21:43:15 +03:00
extends React.HTMLAttributes<HTMLDivElement> {
data: IConstituenta
}
function InfoConstituenta({ data, ...restProps }: InfoConstituentaProps) {
2023-08-15 21:43:15 +03:00
return (
<div {...restProps}>
<h1>Конституента {data.alias}</h1>
<p>
<b>Типизация: </b>
{labelCstTypification(data)}
</p>
<p>
<b>Термин: </b>
{data.term_resolved || data.term_raw}
</p>
{data.definition_formal ?
<p>
<b>Выражение: </b>
{data.definition_formal}
</p> : null}
{data.definition_resolved ?
<p>
<b>Определение: </b>
{data.definition_resolved}
</p> : null}
{data.convention ?
<p>
<b>Конвенция: </b>
{data.convention}
</p> : null}
</div>);
2023-08-15 21:43:15 +03:00
}
2023-08-23 18:11:42 +03:00
export default InfoConstituenta;