Skip to content

Commit

Permalink
Merge pull request #1034 from bcgov/fix/bugFixes
Browse files Browse the repository at this point in the history
Bug fixes - EDX-1816, 1818, 1820
  • Loading branch information
trev-dev authored Sep 15, 2023
2 parents 5f8dda2 + b75b192 commit 1c15753
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1052,9 +1052,11 @@ const fieldOrHyphen = (field) => field || '-';
const getLegalName = (first, middle, last) => {
if(first && middle){
return last + ', ' + first + ', ' + middle;
return last + ', ' + first + ' ' + middle;
}else if(first){
return last + ', ' + first;
}else if(middle){
return last + ', ' + middle;
}else if(last){
return last;
}
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/utils/sdc/sdcValidationFieldMappings.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import {isValidPEN} from '../../utils/validation';
export const SDC_VALIDATION_FIELD_MAPPINGS = Object.freeze({
LOCALID: {label: 'Local ID', key: 'localID', type: 'input', options: {}},
STUDENT_PEN: {label: 'PEN', key: 'studentPen', type: 'input', options: {rules: [v => (!v || isValidPEN(v) || 'Invalid PEN')]}},
LEGAL_FIRST_NAME: {label: 'Legal First Name', key: 'legalFirstName', type: 'input', options: {}},
LEGAL_MIDDLE_NAMES: {label: 'Legal Middle Name', key: 'legalMiddleNames', type: 'input', options: {}},
LEGAL_LAST_NAME: {label: 'Legal Last Name', key: 'legalLastName', type: 'input', options: {rules: [formRules.required()]}},
USUAL_FIRST_NAME: {label: 'Usual First Name', key: 'usualFirstName', type: 'input', options: {}},
USUAL_MIDDLE_NAMES: {label: 'Usual Middle Names', key: 'usualMiddleNames', type: 'input', options: {}},
USUAL_LAST_NAME: {label: 'Usual Last Name', key: 'usualLastName', type: 'input', options: {}},
LEGAL_FIRST_NAME: {label: 'Legal Given', key: 'legalFirstName', type: 'input', options: {}},
LEGAL_MIDDLE_NAMES: {label: 'Legal Middle', key: 'legalMiddleNames', type: 'input', options: {}},
LEGAL_LAST_NAME: {label: 'Legal Surname', key: 'legalLastName', type: 'input', options: {rules: [formRules.required()]}},
USUAL_FIRST_NAME: {label: 'Usual Given', key: 'usualFirstName', type: 'input', options: {}},
USUAL_MIDDLE_NAMES: {label: 'Usual Middle', key: 'usualMiddleNames', type: 'input', options: {}},
USUAL_LAST_NAME: {label: 'Usual Surname', key: 'usualLastName', type: 'input', options: {}},
DOB: {label: 'DOB', key: 'dob', type: 'datePicker', options: {}},
GENDER_CODE: {label: 'Gender', key: 'gender', type: 'select', options: {items: 'genderCodes', itemValue: 'genderCode'}},
GRADE_CODE: {label: 'Grade Code', key: 'enrolledGradeCode', type: 'select', options: {items: 'enrolledGradeCodes', itemValue: 'enrolledGradeCode'}},
Expand Down

0 comments on commit 1c15753

Please sign in to comment.