From 22ce5094d440b01bcb16f7230f180aeb9e2182bc Mon Sep 17 00:00:00 2001 From: IRBorisov <8611739+IRBorisov@users.noreply.github.com> Date: Mon, 25 Mar 2024 19:17:18 +0300 Subject: [PATCH] Minor UI fixes --- .../frontend/src/components/select/SubstitutionsPicker.tsx | 2 +- rsconcept/frontend/src/context/RSFormContext.tsx | 2 +- .../src/dialogs/DlgConstituentaTemplate/ArgumentsTab.tsx | 2 +- .../frontend/src/pages/RSFormPage/EditorRSList/RSTable.tsx | 6 +++--- .../pages/RSFormPage/ViewConstituents/ConstituentsTable.tsx | 2 ++ 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/rsconcept/frontend/src/components/select/SubstitutionsPicker.tsx b/rsconcept/frontend/src/components/select/SubstitutionsPicker.tsx index aaac98ec..36b1789f 100644 --- a/rsconcept/frontend/src/components/select/SubstitutionsPicker.tsx +++ b/rsconcept/frontend/src/components/select/SubstitutionsPicker.tsx @@ -133,7 +133,7 @@ function SubstitutionsPicker({ id: 'right_text', header: 'Описание', size: 1000, - cell: props =>
{props.getValue()}
+ cell: props =>
{props.getValue()}
}), columnHelper.display({ id: 'actions', diff --git a/rsconcept/frontend/src/context/RSFormContext.tsx b/rsconcept/frontend/src/context/RSFormContext.tsx index 8fcaf01f..f8739d08 100644 --- a/rsconcept/frontend/src/context/RSFormContext.tsx +++ b/rsconcept/frontend/src/context/RSFormContext.tsx @@ -122,7 +122,7 @@ export const RSFormState = ({ schemaID, versionID, children }: RSFormStateProps) const isArchive = useMemo(() => !!versionID, [versionID]); 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]); const isSubscribed = useMemo(() => { diff --git a/rsconcept/frontend/src/dialogs/DlgConstituentaTemplate/ArgumentsTab.tsx b/rsconcept/frontend/src/dialogs/DlgConstituentaTemplate/ArgumentsTab.tsx index 725f1ac5..a27f97fe 100644 --- a/rsconcept/frontend/src/dialogs/DlgConstituentaTemplate/ArgumentsTab.tsx +++ b/rsconcept/frontend/src/dialogs/DlgConstituentaTemplate/ArgumentsTab.tsx @@ -5,9 +5,9 @@ import clsx from 'clsx'; import { useCallback, useEffect, useMemo, useState } from 'react'; import { BiCheck, BiRefresh, BiX } from 'react-icons/bi'; +import RSInput from '@/components/RSInput'; import ConstituentaPicker from '@/components/select/ConstituentaPicker'; import DataTable, { IConditionalStyle } from '@/components/ui/DataTable'; -import RSInput from '@/components/RSInput'; import MiniButton from '@/components/ui/MiniButton'; import { useConceptTheme } from '@/context/ThemeContext'; import { IConstituenta, IRSForm } from '@/models/rsform'; diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorRSList/RSTable.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorRSList/RSTable.tsx index df40294a..b32a1952 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorRSList/RSTable.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorRSList/RSTable.tsx @@ -93,7 +93,7 @@ function RSTable({ items, maxHeight, enableSelection, selected, setSelected, onE size: 1000, minSize: 300, maxSize: 1000, - cell: props =>
{props.getValue()}
+ cell: props =>
{props.getValue()}
}), columnHelper.accessor(cst => cst.definition_resolved || cst.definition_raw || '', { id: 'definition', @@ -101,7 +101,7 @@ function RSTable({ items, maxHeight, enableSelection, selected, setSelected, onE size: 1000, minSize: 200, maxSize: 1000, - cell: props =>
{props.getValue()}
+ cell: props =>
{props.getValue()}
}), columnHelper.accessor('convention', { id: 'convention', @@ -110,7 +110,7 @@ function RSTable({ items, maxHeight, enableSelection, selected, setSelected, onE minSize: 100, maxSize: 500, enableHiding: true, - cell: props =>
{props.getValue()}
+ cell: props =>
{props.getValue()}
}) ], [colors] diff --git a/rsconcept/frontend/src/pages/RSFormPage/ViewConstituents/ConstituentsTable.tsx b/rsconcept/frontend/src/pages/RSFormPage/ViewConstituents/ConstituentsTable.tsx index 94c81cf9..7f3da9f1 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/ViewConstituents/ConstituentsTable.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/ViewConstituents/ConstituentsTable.tsx @@ -69,6 +69,7 @@ function ConstituentsTable({ items, activeID, onOpenEdit, maxHeight, denseThresh cell: props => (
(