From 545bd97570b0d5dd65f8a537783a4115d86de6ba Mon Sep 17 00:00:00 2001 From: IRBorisov <8611739+IRBorisov@users.noreply.github.com> Date: Tue, 28 May 2024 19:48:33 +0300 Subject: [PATCH] Small UI fixes --- .../pages/RSFormPage/EditorRSForm/EditorLibraryItem.tsx | 8 +++++++- .../RSFormPage/ViewConstituents/ConstituentsTable.tsx | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorRSForm/EditorLibraryItem.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorRSForm/EditorLibraryItem.tsx index 9785eede..1f7b9373 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorRSForm/EditorLibraryItem.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorRSForm/EditorLibraryItem.tsx @@ -31,11 +31,17 @@ function EditorLibraryItem({ item, isModified }: EditorLibraryItemProps) { const ownerSelector = useDropdown(); const onSelectUser = useCallback( (newValue: UserID) => { - console.log(newValue); ownerSelector.hide(); if (newValue === item?.owner) { return; } + if ( + !window.confirm( + 'Вы уверены, что хотите изменить владельца? Вы потеряете право управления данной схемой. Данное действие отменить нельзя' + ) + ) { + return; + } controller.setOwner(newValue); }, [controller, item?.owner, ownerSelector] diff --git a/rsconcept/frontend/src/pages/RSFormPage/ViewConstituents/ConstituentsTable.tsx b/rsconcept/frontend/src/pages/RSFormPage/ViewConstituents/ConstituentsTable.tsx index ca62e2ec..70ba61f8 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/ViewConstituents/ConstituentsTable.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/ViewConstituents/ConstituentsTable.tsx @@ -34,7 +34,6 @@ function ConstituentsTable({ items, activeCst, onOpenEdit, maxHeight, denseThres } setTimeout(() => { const element = document.getElementById(`${prefixes.cst_side_table}${activeCst.alias}`); - console.log(element); if (element) { element.scrollIntoView({ behavior: 'smooth',