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

43 lines
1.0 KiB
TypeScript
Raw Normal View History

import { IConstituenta } from '@/models/rsform';
import { labelCstTypification } from '@/utils/labels';
2023-08-15 21:43:15 +03:00
2023-12-28 14:04:44 +03:00
interface InfoConstituentaProps extends React.HTMLAttributes<HTMLDivElement> {
data: IConstituenta;
2023-08-15 21:43:15 +03:00
}
function InfoConstituenta({ data, ...restProps }: InfoConstituentaProps) {
2023-08-15 21:43:15 +03:00
return (
2023-12-28 14:04:44 +03:00
<div {...restProps}>
<h2>Конституента {data.alias}</h2>
<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-12-28 14:04:44 +03:00
export default InfoConstituenta;