diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b6a6586f..6cd5434aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## v15.0.1 - 2024-05-30 +## Feature Additions: + +- Manifest generation text is less prominent. + ## Bug fixes: - Fixed an issue wherre uploads fail for fresh Pennsieve Agent installs. diff --git a/src/renderer/src/scripts/guided-mode/guided-curate-dataset.js b/src/renderer/src/scripts/guided-mode/guided-curate-dataset.js index caa8a0e45..6d84ea376 100644 --- a/src/renderer/src/scripts/guided-mode/guided-curate-dataset.js +++ b/src/renderer/src/scripts/guided-mode/guided-curate-dataset.js @@ -5203,7 +5203,7 @@ window.openPage = async (targetPageID) => { if (targetPageID === "guided-name-subtitle-tab") { // Get the dataset name and subtitle from the JSON obj - const datasetName = getGuidedDatasetName(); + const datasetName = getGuidedDatasetName() || ""; // Set the zustand datasetName state value to the dataset name setGuidedDatasetName(datasetName); @@ -12407,7 +12407,7 @@ $("#guided-submission-completion-date-manual").change(function () { ///////////////////////////////////////////////////////// const getGuidedDatasetName = () => { - return window.sodaJSONObj["digital-metadata"]["name"]; + return window.sodaJSONObj["digital-metadata"]["name"] || ""; }; const getGuidedDatasetSubtitle = () => { diff --git a/src/renderer/src/stores/slices/dropDownSlice.js b/src/renderer/src/stores/slices/dropDownSlice.js index 39621e741..80e15eb47 100644 --- a/src/renderer/src/stores/slices/dropDownSlice.js +++ b/src/renderer/src/stores/slices/dropDownSlice.js @@ -15,11 +15,23 @@ export const dropDownSlice = (set) => ({ export const setDropdownState = (id, selectedValue) => { useGlobalStore.setState( produce((state) => { - const dropDownOptions = useGlobalStore.getState().dropDownState[id].options; + // Get the options for the dropdown related to the id passed in + const dropDownOptions = useGlobalStore + .getState() + .dropDownState[id].options.filter((option) => option !== ""); + + // If the selected value is not in the dropdown options, set the value + // to an empty string and add an empty string to the dropdown options if (!dropDownOptions.includes(selectedValue)) { - return; + state.dropDownState[id].options = ["", ...dropDownOptions]; + state.dropDownState[id].selectedValue = ""; + } else { + // If the selected value is in the dropdown options, set the selected value + // to the selected value passed in and set the dropdown options to the + // dropdown options (To remove the empty string if it exists) + state.dropDownState[id].options = dropDownOptions; + state.dropDownState[id].selectedValue = selectedValue; } - state.dropDownState[id].selectedValue = selectedValue || ""; }) ); };