src/app/shared/components/registration-metadata/registration-metadata.component.ts
Right side registration menu
changeDetection | ChangeDetectionStrategy.OnPush |
selector | ccf-registration-metadata |
styleUrls | ./registration-metadata.component.scss |
templateUrl | ./registration-metadata.component.html |
Properties |
|
Methods |
Outputs |
constructor(model: ModelState, registration: RegistrationState, page: PageState)
|
||||||||||||||||
Creates an instance of registration metadata component.
Parameters :
|
registrationSelected | |
Type : EventEmitter
|
|
Emits when user has uploaded registration |
checkNameValid | ||||||||
checkNameValid(event: Pick<Person | "firstName" | "lastName">)
|
||||||||
Checks to see if a first and last name has been entered
Parameters :
Returns :
void
|
getErrorMessage |
getErrorMessage()
|
Error message to inform user if orcid is invalid
Returns :
string
Error message |
handleRegistrationUpload | ||||||
handleRegistrationUpload(reg: SpatialEntityJsonLd)
|
||||||
Emits registrationSelected and calls editRegistration in state
Parameters :
Returns :
void
|
setSexFromLabel | ||||||||
setSexFromLabel(label: "Female" | "Male")
|
||||||||
Updates current sex selected
Parameters :
Returns :
void
|
updateOrcid | ||||||||
updateOrcid(value: string)
|
||||||||
Updates orcid value
Parameters :
Returns :
void
|
nameValid |
Type : boolean
|
Checks if first and last name has been entered |
Optional orcId |
Type : string
|
Orcid URI converted to regular id |
orcidControl |
Default value : new FormControl('', [Validators.pattern('^[a-zA-Z0-9]{4}(-[a-zA-Z0-9]{4}){3}$')])
|
Form control for validating orcid id |
uploadText |
Type : string
|
Text to inform user if a registration file has been uploaded |
./registration-metadata.component.scss