diff --git a/rsconcept/frontend/src/features/rsform/components/pick-substitutions.tsx b/rsconcept/frontend/src/features/rsform/components/pick-substitutions.tsx index f6e85214..3f318575 100644 --- a/rsconcept/frontend/src/features/rsform/components/pick-substitutions.tsx +++ b/rsconcept/frontend/src/features/rsform/components/pick-substitutions.tsx @@ -58,18 +58,26 @@ export function PickSubstitutions({ const [rightArgument, setRightArgument] = useState( schemas.length === 1 && allowSelfSubstitution ? schemas[0] : null ); - const leftItems = !leftArgument - ? [] - : (leftArgument as IRSForm).items.filter( - cst => !value.find(item => item.original === cst.id) && (!filterCst || filterCst(cst)) - ); const [leftCst, setLeftCst] = useState(null); const [rightCst, setRightCst] = useState(null); + + const leftItems = !leftArgument + ? [] + : (leftArgument as IRSForm).items.filter( + cst => + cst.id !== rightCst?.id && // + !value.find(item => item.original === cst.id) && + (!filterCst || filterCst(cst)) + ); + const rightItems = !rightArgument ? [] : (rightArgument as IRSForm).items.filter( - cst => !value.find(item => item.original === cst.id) && (!filterCst || filterCst(cst)) + cst => + cst.id !== leftCst?.id && // + !value.find(item => item.original === cst.id) && + (!filterCst || filterCst(cst)) ); const [deleteRight, setDeleteRight] = useState(true); diff --git a/rsconcept/frontend/src/utils/labels.ts b/rsconcept/frontend/src/utils/labels.ts index a3b41b12..574ace46 100644 --- a/rsconcept/frontend/src/utils/labels.ts +++ b/rsconcept/frontend/src/utils/labels.ts @@ -86,7 +86,7 @@ export const hintMsg = { versionEmpty: 'Введите шифр версии', versionTaken: 'Версия с таким шифром уже существует', relocateEmpty: 'Необходимо выбрать хотя бы одну собственную конституенту', - substitutionsEmpty: 'Выберите две различные конституенты', + substitutionsEmpty: 'Добавьте хотя бы одно отождествление', sourceEmpty: 'Выберите схему источник', referenceInvalid: 'Выберите тип ссылки и заполните все поля', fileEmpty: 'Выберите файл для загрузки'