mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 13:00:39 +03:00
Minor UI fixes
This commit is contained in:
parent
001fc525f8
commit
22ce5094d4
|
@ -133,7 +133,7 @@ function SubstitutionsPicker({
|
||||||
id: 'right_text',
|
id: 'right_text',
|
||||||
header: 'Описание',
|
header: 'Описание',
|
||||||
size: 1000,
|
size: 1000,
|
||||||
cell: props => <div className='text-xs text-ellipsis'>{props.getValue()}</div>
|
cell: props => <div className='text-xs text-ellipsis text-pretty'>{props.getValue()}</div>
|
||||||
}),
|
}),
|
||||||
columnHelper.display({
|
columnHelper.display({
|
||||||
id: 'actions',
|
id: 'actions',
|
||||||
|
|
|
@ -122,7 +122,7 @@ export const RSFormState = ({ schemaID, versionID, children }: RSFormStateProps)
|
||||||
const isArchive = useMemo(() => !!versionID, [versionID]);
|
const isArchive = useMemo(() => !!versionID, [versionID]);
|
||||||
|
|
||||||
const isClaimable = useMemo(() => {
|
const isClaimable = useMemo(() => {
|
||||||
return isArchive && ((user?.id !== schema?.owner && schema?.is_common && !schema?.is_canonical) ?? false);
|
return !isArchive && ((user?.id !== schema?.owner && schema?.is_common && !schema?.is_canonical) ?? false);
|
||||||
}, [user, schema?.owner, schema?.is_common, schema?.is_canonical, isArchive]);
|
}, [user, schema?.owner, schema?.is_common, schema?.is_canonical, isArchive]);
|
||||||
|
|
||||||
const isSubscribed = useMemo(() => {
|
const isSubscribed = useMemo(() => {
|
||||||
|
|
|
@ -5,9 +5,9 @@ import clsx from 'clsx';
|
||||||
import { useCallback, useEffect, useMemo, useState } from 'react';
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
import { BiCheck, BiRefresh, BiX } from 'react-icons/bi';
|
import { BiCheck, BiRefresh, BiX } from 'react-icons/bi';
|
||||||
|
|
||||||
|
import RSInput from '@/components/RSInput';
|
||||||
import ConstituentaPicker from '@/components/select/ConstituentaPicker';
|
import ConstituentaPicker from '@/components/select/ConstituentaPicker';
|
||||||
import DataTable, { IConditionalStyle } from '@/components/ui/DataTable';
|
import DataTable, { IConditionalStyle } from '@/components/ui/DataTable';
|
||||||
import RSInput from '@/components/RSInput';
|
|
||||||
import MiniButton from '@/components/ui/MiniButton';
|
import MiniButton from '@/components/ui/MiniButton';
|
||||||
import { useConceptTheme } from '@/context/ThemeContext';
|
import { useConceptTheme } from '@/context/ThemeContext';
|
||||||
import { IConstituenta, IRSForm } from '@/models/rsform';
|
import { IConstituenta, IRSForm } from '@/models/rsform';
|
||||||
|
|
|
@ -93,7 +93,7 @@ function RSTable({ items, maxHeight, enableSelection, selected, setSelected, onE
|
||||||
size: 1000,
|
size: 1000,
|
||||||
minSize: 300,
|
minSize: 300,
|
||||||
maxSize: 1000,
|
maxSize: 1000,
|
||||||
cell: props => <div className='break-words'>{props.getValue()}</div>
|
cell: props => <div className='break-words text-pretty'>{props.getValue()}</div>
|
||||||
}),
|
}),
|
||||||
columnHelper.accessor(cst => cst.definition_resolved || cst.definition_raw || '', {
|
columnHelper.accessor(cst => cst.definition_resolved || cst.definition_raw || '', {
|
||||||
id: 'definition',
|
id: 'definition',
|
||||||
|
@ -101,7 +101,7 @@ function RSTable({ items, maxHeight, enableSelection, selected, setSelected, onE
|
||||||
size: 1000,
|
size: 1000,
|
||||||
minSize: 200,
|
minSize: 200,
|
||||||
maxSize: 1000,
|
maxSize: 1000,
|
||||||
cell: props => <div className='text-xs'>{props.getValue()}</div>
|
cell: props => <div className='text-xs text-pretty'>{props.getValue()}</div>
|
||||||
}),
|
}),
|
||||||
columnHelper.accessor('convention', {
|
columnHelper.accessor('convention', {
|
||||||
id: 'convention',
|
id: 'convention',
|
||||||
|
@ -110,7 +110,7 @@ function RSTable({ items, maxHeight, enableSelection, selected, setSelected, onE
|
||||||
minSize: 100,
|
minSize: 100,
|
||||||
maxSize: 500,
|
maxSize: 500,
|
||||||
enableHiding: true,
|
enableHiding: true,
|
||||||
cell: props => <div className='text-xs'>{props.getValue()}</div>
|
cell: props => <div className='text-xs text-pretty'>{props.getValue()}</div>
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
[colors]
|
[colors]
|
||||||
|
|
|
@ -69,6 +69,7 @@ function ConstituentsTable({ items, activeID, onOpenEdit, maxHeight, denseThresh
|
||||||
cell: props => (
|
cell: props => (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
textWrap: 'pretty',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: isMockCst(props.row.original) ? colors.fgWarning : undefined
|
color: isMockCst(props.row.original) ? colors.fgWarning : undefined
|
||||||
}}
|
}}
|
||||||
|
@ -87,6 +88,7 @@ function ConstituentsTable({ items, activeID, onOpenEdit, maxHeight, denseThresh
|
||||||
cell: props => (
|
cell: props => (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
textWrap: 'pretty',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: isMockCst(props.row.original) ? colors.fgWarning : undefined
|
color: isMockCst(props.row.original) ? colors.fgWarning : undefined
|
||||||
}}
|
}}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user