From ea172eb4f53a4065af838a3d4d8509f6d44b6fa9 Mon Sep 17 00:00:00 2001 From: Ryan Mathis Date: Tue, 26 Oct 2021 12:46:14 -0700 Subject: [PATCH 1/2] Removed filter list button from restoration editing --- ui/src/app/metadata/editor/MetadataEditor.js | 4 ++-- ui/src/app/metadata/view/MetadataRestore.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/src/app/metadata/editor/MetadataEditor.js b/ui/src/app/metadata/editor/MetadataEditor.js index 0c8757d97..3281ee100 100644 --- a/ui/src/app/metadata/editor/MetadataEditor.js +++ b/ui/src/app/metadata/editor/MetadataEditor.js @@ -21,7 +21,7 @@ import { checkChanges } from '../hooks/utility'; import { createNotificationAction, NotificationTypes, useNotificationDispatcher } from '../../notifications/hoc/Notifications'; import { useUserGroup } from '../../core/user/UserContext'; -export function MetadataEditor ({ current }) { +export function MetadataEditor ({ restore, current }) { const translator = useTranslator(); const group = useUserGroup(); @@ -83,7 +83,7 @@ export function MetadataEditor ({ current }) { const warnings = definition.warnings && definition.warnings(metadata); - const canFilter = FilterableProviders.indexOf(definition.type) > -1; + const canFilter = restore ? false : FilterableProviders.indexOf(definition.type) > -1; return (
diff --git a/ui/src/app/metadata/view/MetadataRestore.js b/ui/src/app/metadata/view/MetadataRestore.js index 3dd257d4d..7d009c60f 100644 --- a/ui/src/app/metadata/view/MetadataRestore.js +++ b/ui/src/app/metadata/view/MetadataRestore.js @@ -16,7 +16,7 @@ export function MetadataRestore() { ...metadata, version: latest.version }}> - From ee4f981cee56e44b507fb4db8b18523b9d20a546 Mon Sep 17 00:00:00 2001 From: Ryan Mathis Date: Thu, 28 Oct 2021 09:57:20 -0700 Subject: [PATCH 2/2] Fixed issue with navigation --- ui/src/app/metadata/editor/MetadataEditor.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/src/app/metadata/editor/MetadataEditor.js b/ui/src/app/metadata/editor/MetadataEditor.js index 3281ee100..1ebc8e8f0 100644 --- a/ui/src/app/metadata/editor/MetadataEditor.js +++ b/ui/src/app/metadata/editor/MetadataEditor.js @@ -71,10 +71,9 @@ export function MetadataEditor ({ restore, current }) { const resetBlock = blocking; setBlocking(false); setTimeout(() => { - history.push(path); + history.push(restore ? `../${path}/edit` : path); setBlocking(resetBlock); }); - // setBlocking(resetBlock); }; const [blocking, setBlocking] = React.useState(false);