Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobiClark committed May 30, 2024
2 parents ecb34b2 + ffbfc8c commit 08dbf0b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/src/scripts/guided-mode/guided-curate-dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 = () => {
Expand Down
18 changes: 15 additions & 3 deletions src/renderer/src/stores/slices/dropDownSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 || "";
})
);
};

0 comments on commit 08dbf0b

Please sign in to comment.