Skip to content

Commit

Permalink
feat: ✨ Skip spreadsheet import page after completion
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobiClark committed Dec 4, 2023
1 parent 3b8642f commit 1c5d45a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
12 changes: 11 additions & 1 deletion scripts/guided-mode/guided-curate-dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,8 @@ const savePageChanges = async (pageBeingLeftID) => {
// Skip the page where they confirm their log in and workspace because we should already have it
sodaJSONObj["digital-metadata"]["dataset-workspace"] = guidedGetCurrentUserWorkSpace();
guidedSkipPage("guided-pennsieve-intro-tab");
}
// Skip the subject structure import page since the user is starting from Pennsieve
guidedSkipPage("guided-subject-structure-spreadsheet-importation-tab"); }

//Skip this page becausae we should not come back to it
guidedSkipPage("guided-select-starting-point-tab");
Expand Down Expand Up @@ -1367,6 +1368,13 @@ const savePageChanges = async (pageBeingLeftID) => {
throw errorArray;
}
}

if (userChoseToEnterSubsSamsPoolsManually) {
// Skip the page so the user can add subjects manually
guidedSkipPage("guided-subject-structure-spreadsheet-importation-tab");
}


}

if (pageBeingLeftID === "guided-primary-data-organization-tab") {
Expand Down Expand Up @@ -11580,6 +11588,8 @@ document
<b>Note:</b> You will not be able to return to this step once you proceed.
`
);
// Skip the spreadsheet importation page so the user can't go back to it
guidedSkipPage("guided-subject-structure-spreadsheet-importation-tab");
$("#guided-next-button").click();
});

Expand Down
18 changes: 11 additions & 7 deletions sections/guided_mode/guided_curate_dataset.html
Original file line number Diff line number Diff line change
Expand Up @@ -1197,15 +1197,16 @@ <h2 class="guided--text-user-directions">
<div
id="guided-subject-structure-spreadsheet-importation-tab"
class="guided--page"
data-page-name="Subject spreadsheet importation"
data-page-name="Subject/sample IDs specification"
>
<div class="guided--section">
<h1 class="text-sub-step-title">Subject spreadsheet importation</h1>
<h1 class="text-sub-step-title">Subject/sample IDs specification</h1>
<p class="help-text">
The SDS requires a unique ID for each subject in your dataset. SODA provides a feature
that allows you to create a list of your subjects in an external spreadsheet and then
import the list into SODA, saving you from having to type out each subject in the SODA
UI.
The SDS requires a unique ID to be specified for each subject (and sample if
applicable) in our dataset. You can type these IDs in the SODA interfaces on the next
pages. SODA also provides a feature to import these IDs through an external
spreadsheet saving you from typing them in the SODA interfaces. This is especially
convenient if you have a large number of subjects/samples.
</p>
<div class="alert alert-primary" role="alert">
<p class="help-text">
Expand All @@ -1216,7 +1217,7 @@ <h1 class="text-sub-step-title">Subject spreadsheet importation</h1>
</div>
<div class="guided--section">
<label class="guided--form-label centered">
Would you like to import your subjects from a spreadsheet?
Would you like to import your subjects/samples IDs through a spreadsheet?
</label>
<div class="guided--radio-button-container" style="margin-bottom: 7px">
<button
Expand Down Expand Up @@ -1251,6 +1252,9 @@ <h2 class="guided--text-user-directions">
class="guided--section"
id="guided-section-user-chose-to-add-subs-sams-pools-via-spreadsheet"
>
<h2 class="text-sub-step-title mb-5">
Follow the step-by-step instructions below to import your IDs through a spreadsheet.
</h2>
<div class="guided--section" id="guided-section-spreadsheet-subject-pooling-query">
<label class="guided--form-label centered">
Will you be organizing your subjects into pools?
Expand Down

0 comments on commit 1c5d45a

Please sign in to comment.