Skip to content

Commit

Permalink
Update casing for unknownDoi
Browse files Browse the repository at this point in the history
  • Loading branch information
James Tessmer committed Sep 30, 2024
1 parent 89a46f0 commit 6e81c82
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion nmdc_server/schemas_submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class ContextForm(BaseModel):
facilities: List[str]
award: Optional[str]
otherAward: str
unknownDOI: Optional[bool]
unknownDoi: Optional[bool]


class MetadataSubmissionRecord(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion web/src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Definitions = {
studyNCBIBioProjectAccession: 'Provide the NCBI BioProject Accession Number associated with the listed NCBI BioProject Title.',
metadataTypes: 'Check all -omics data types associated with samples collected for this study.',
doi: 'DOI associated with the user project awarded. This is required when data is already generated and can be found <a href="https://www.osti.gov/award-doi-service/" target="_blank" rel="noopener noreferrer">here</a>.',
unknowndoi: 'If selected you will not have to enter the required Award DOIs and you will be contacted by an NMDC team member after you have submitted your data.',
unknownDoi: 'If selected you will not have to enter the required Award DOIs and you will be contacted by an NMDC team member after you have submitted your data.',
};

export default Definitions;
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default defineComponent({
return true;
}];
const doiRequiredRules = () => [(v: string) => {
const valid = !!v || (!contextForm.facilityGenerated && contextForm.dataGenerated) || (contextForm.unknownDOI && !contextForm.dataGenerated);
const valid = !!v || (!contextForm.facilityGenerated && contextForm.dataGenerated) || (contextForm.unknownDoi && !contextForm.dataGenerated);
return valid || 'An award DOI is required if data was or is going to be generated by a DOE facility.';
}];
const revalidate = () => {
Expand Down Expand Up @@ -323,10 +323,10 @@ export default defineComponent({
</v-btn>
<v-checkbox
v-if="!contextForm.dataGenerated && (contextForm.facilities.includes('EMSL') || contextForm.facilities.includes('JGI'))"
v-model="contextForm.unknownDOI"
v-model="contextForm.unknownDoi"
class="pa-0 ma-0"
:label="`I don't know my award DOI`"
:hint="Definitions.unknowndoi"
:hint="Definitions.unknownDoi"
persistent-hint
@change="revalidate"
/>
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/SubmissionPortal/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const contextFormDefault = {
facilities: [] as string[],
award: undefined as undefined | string,
otherAward: '',
unknownDOI: undefined as undefined | boolean,
unknownDoi: undefined as undefined | boolean,
};
const contextForm = reactive(clone(contextFormDefault));
const contextFormValid = ref(false);
Expand Down

0 comments on commit 6e81c82

Please sign in to comment.