Skip to content

Commit

Permalink
Handle export format change
Browse files Browse the repository at this point in the history
If we go back and change the export format after selecting some of the other options with a the previous format, we should ensure the options are compatible with that new format.
  • Loading branch information
davelopez committed Sep 18, 2024
1 parent f3d8484 commit d21956c
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { BAlert, BCard, BCardGroup, BCardImg, BCardTitle, BFormCheckbox, BFormGroup, BFormInput } from "bootstrap-vue";
import { computed, reactive, ref } from "vue";
import { computed, reactive, ref, watch } from "vue";
import { GalaxyApi } from "@/api";
import { useWizard } from "@/components/Common/Wizard/useWizard";
Expand Down Expand Up @@ -180,6 +180,16 @@ const wizard = useWizard({
},
});
watch(
() => exportData.exportPluginFormat,
() => {
// Only allow BCO format to be exported to BCODB
if (exportData.destination === "bco-database" && exportData.exportPluginFormat !== "bco") {
exportData.destination = "download";
}
}
);
function onRecordSelected(recordUri: string) {
exportData.remoteUri = recordUri;
}
Expand Down

0 comments on commit d21956c

Please sign in to comment.