From 54bf66571b5a9850ee459abaf4bd4debdcd4b840 Mon Sep 17 00:00:00 2001 From: Paul Elliott Date: Thu, 8 Aug 2024 11:33:35 -0400 Subject: [PATCH] fix(DicomWeb): expand panel at start and build fix --- src/components/DataBrowser.vue | 6 ++++-- src/store/dicom-web/dicom-web-store.ts | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/DataBrowser.vue b/src/components/DataBrowser.vue index 5db78edce..912f37490 100644 --- a/src/components/DataBrowser.vue +++ b/src/components/DataBrowser.vue @@ -65,8 +65,9 @@ export default defineComponent({ } }); + const openDicomWeb = computed(() => dicomWeb.isConfigured); watch( - computed(() => dicomWeb.isConfigured), + openDicomWeb, (configured) => { if (configured) { panels.value.push(DICOM_WEB_KEY); @@ -74,7 +75,8 @@ export default defineComponent({ // Remove from panels to avoid error in vuetify group.ts removeFromArray(panels.value, DICOM_WEB_KEY); } - } + }, + { immediate: true } ); watch( diff --git a/src/store/dicom-web/dicom-web-store.ts b/src/store/dicom-web/dicom-web-store.ts index a51c8bb2b..acbd0c56d 100644 --- a/src/store/dicom-web/dicom-web-store.ts +++ b/src/store/dicom-web/dicom-web-store.ts @@ -191,9 +191,8 @@ export const useDicomWebStore = defineStore('dicom-web', () => { if (!loadResult) { throw new Error('Did not receive a load result'); } - - if (!loadResult.ok) { - throw loadResult.errors[0].cause; + if (loadResult.type === 'error') { + throw loadResult.error; } const selection = convertSuccessResultToDataSelection(loadResult);