diff --git a/src/apps/profiles/src/member-profile/about-me/ModifyAboutMeModal/ModifyAboutMeModal.module.scss b/src/apps/profiles/src/member-profile/about-me/ModifyAboutMeModal/ModifyAboutMeModal.module.scss index 30fa3bb54..4ebd12ab0 100644 --- a/src/apps/profiles/src/member-profile/about-me/ModifyAboutMeModal/ModifyAboutMeModal.module.scss +++ b/src/apps/profiles/src/member-profile/about-me/ModifyAboutMeModal/ModifyAboutMeModal.module.scss @@ -12,4 +12,8 @@ .editForm { margin-top: $sp-4; + + :global(.input-wrapper) { + margin-bottom: $sp-4; + } } \ No newline at end of file diff --git a/src/apps/profiles/src/member-profile/education-and-certifications/ModifyEducationModal/ModifyEducationModal.tsx b/src/apps/profiles/src/member-profile/education-and-certifications/ModifyEducationModal/ModifyEducationModal.tsx index f7c52eb19..1344b0459 100644 --- a/src/apps/profiles/src/member-profile/education-and-certifications/ModifyEducationModal/ModifyEducationModal.tsx +++ b/src/apps/profiles/src/member-profile/education-and-certifications/ModifyEducationModal/ModifyEducationModal.tsx @@ -258,7 +258,7 @@ const ModifyEducationModal: FC = (props: ModifyEducat disabled={false} error={formErrors.endDate} dirty - maxDate={new Date()} + showMonthPicker={false} showYearPicker dateFormat='yyyy' /> diff --git a/src/apps/profiles/src/member-profile/profile-header/ModifyMemberPhotoModal/ModifyMemberPhotoModal.tsx b/src/apps/profiles/src/member-profile/profile-header/ModifyMemberPhotoModal/ModifyMemberPhotoModal.tsx index dfa29add0..4a0e40129 100644 --- a/src/apps/profiles/src/member-profile/profile-header/ModifyMemberPhotoModal/ModifyMemberPhotoModal.tsx +++ b/src/apps/profiles/src/member-profile/profile-header/ModifyMemberPhotoModal/ModifyMemberPhotoModal.tsx @@ -21,8 +21,8 @@ const ModifyMemberPhotoModal: FC = (props: ModifyMe const fileElRef: MutableRefObject = useRef() - const [fileSizeError, setFileSizeError]: [boolean, Dispatch>] - = useState(false) + const [fileSelectError, setFileSelectError]: [string | undefined, Dispatch>] + = useState() function handleModifyPhotoSave(): void { const formData: FormData = new FormData() @@ -53,14 +53,19 @@ const ModifyMemberPhotoModal: FC = (props: ModifyMe if (pickedFile) { if (pickedFile?.size < 2000000) { // max 2mb limit + if (pickedFile.type !== 'image/png' && pickedFile.type !== 'image/jpeg') { + setFileSelectError('Please select a PNG or JPG image.') + return + } + setFile(pickedFile) - setFileSizeError(false) + setFileSelectError(undefined) } else { - setFileSizeError(true) + setFileSelectError('Please select an image that is less than 2MB.') } } else { setFile(undefined) - setFileSizeError(false) + setFileSelectError(undefined) } } @@ -105,8 +110,8 @@ const ModifyMemberPhotoModal: FC = (props: ModifyMe onClick={handleFilePickClick} /> { - fileSizeError && ( -

Please select an image that is less than 2MB.

+ fileSelectError && ( +

{fileSelectError}

) } diff --git a/src/apps/profiles/src/member-profile/work-expirence/WorkExpirenceCard/WorkExpirenceCard.tsx b/src/apps/profiles/src/member-profile/work-expirence/WorkExpirenceCard/WorkExpirenceCard.tsx index 9904cd49b..b10877873 100644 --- a/src/apps/profiles/src/member-profile/work-expirence/WorkExpirenceCard/WorkExpirenceCard.tsx +++ b/src/apps/profiles/src/member-profile/work-expirence/WorkExpirenceCard/WorkExpirenceCard.tsx @@ -27,14 +27,14 @@ const WorkExpirenceCard: FC = (props: WorkExpirenceCardP

{ - props.work.timePeriodFrom || props.work.timePeriodTo ? ( + props.work.timePeriodFrom || props.work.timePeriodTo || props.work.working ? (

{props.work.timePeriodFrom ? moment(props.work.timePeriodFrom) .format('MM/YYYY') : ''} - {props.work.timePeriodTo || props.work.currentlyWorking ? ' - ' : ''} + {props.work.timePeriodFrom && (props.work.timePeriodTo || props.work.working) ? ' - ' : ''} {props.work.timePeriodTo ? moment(props.work.timePeriodTo) - .format('MM/YYYY') : (props.work.currentlyWorking ? 'Present' : '')} + .format('MM/YYYY') : (props.work.working ? 'Present' : '')}

) : undefined diff --git a/src/apps/profiles/src/profiles.routes.tsx b/src/apps/profiles/src/profiles.routes.tsx index eee6288b0..8d3e6c664 100644 --- a/src/apps/profiles/src/profiles.routes.tsx +++ b/src/apps/profiles/src/profiles.routes.tsx @@ -18,6 +18,7 @@ export const profilesRoutes: ReadonlyArray = [ { children: [ { + authRequired: true, element: , id: 'ProfilesLandingPage', route: '', diff --git a/src/libs/ui/lib/components/form/form-groups/form-input/input-date-picker/InputDatePicker.tsx b/src/libs/ui/lib/components/form/form-groups/form-input/input-date-picker/InputDatePicker.tsx index a6d91626f..f52fd6b66 100644 --- a/src/libs/ui/lib/components/form/form-groups/form-input/input-date-picker/InputDatePicker.tsx +++ b/src/libs/ui/lib/components/form/form-groups/form-input/input-date-picker/InputDatePicker.tsx @@ -27,6 +27,7 @@ interface InputDatePickerProps { readonly minDate?: Date | null | undefined; readonly minTime?: Date | undefined; readonly placeholder?: string + readonly showMonthPicker?: boolean readonly showYearPicker?: boolean readonly tabIndex?: number } @@ -63,16 +64,20 @@ const InputDatePicker: FC = (props: InputDatePickerProps) - + { + props.showMonthPicker !== false && ( + + ) + }