Skip to content

Commit

Permalink
Revert "Fix(tp): correct location text on jobseeker profile card and …
Browse files Browse the repository at this point in the history
…validati…" (#973)

This reverts commit 7bcb708.
  • Loading branch information
katamatata authored Sep 19, 2024
1 parent 0298683 commit 9f2110d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function MentorProfileCard({
categories,
} = mentorProfile
const tags = categories.map((category) => CATEGORIES_MAP[category])
const location = `ReDI ${REDI_LOCATION_NAMES[rediLocation]}`
const location = REDI_LOCATION_NAMES[rediLocation]
const avatar = profileAvatarImageS3Key || placeholderImage

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// THIS FILE IS GENERATED, DO NOT EDIT!
import * as Types from '@talent-connect/data-access';

export type JobseekerProfileCardJobseekerProfilePropFragment = { __typename?: 'TpJobseekerDirectoryEntry', id: string, fullName: string, desiredPositions?: Array<Types.TpDesiredPosition> | null, topSkills?: Array<Types.TpTechnicalSkill> | null, profileAvatarImageS3Key?: string | null, federalState?: Types.FederalState | null, workingLanguages?: Array<{ __typename?: 'TpJobseekerProfileLanguageRecord', language: Types.Language }> | null };
export type JobseekerProfileCardJobseekerProfilePropFragment = { __typename?: 'TpJobseekerDirectoryEntry', id: string, fullName: string, desiredPositions?: Array<Types.TpDesiredPosition> | null, topSkills?: Array<Types.TpTechnicalSkill> | null, profileAvatarImageS3Key?: string | null, location?: string | null, workingLanguages?: Array<{ __typename?: 'TpJobseekerProfileLanguageRecord', language: Types.Language }> | null };

export const JobseekerProfileCardJobseekerProfilePropFragmentDoc = `
fragment JobseekerProfileCardJobseekerProfileProp on TpJobseekerDirectoryEntry {
Expand All @@ -10,7 +10,7 @@ export const JobseekerProfileCardJobseekerProfilePropFragmentDoc = `
desiredPositions
topSkills
profileAvatarImageS3Key
federalState
location
workingLanguages {
language
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ fragment JobseekerProfileCardJobseekerProfileProp on TpJobseekerDirectoryEntry {
desiredPositions
topSkills
profileAvatarImageS3Key
federalState
location
workingLanguages {
language
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { NewProfileCard } from '../../../../../libs/shared-atomic-design-compone
import placeholderImage from '../../assets/img-placeholder.png'
import { JobseekerProfileCardJobseekerProfilePropFragment } from './JobseekerProfileCard.generated'
import './JobseekerProfileCard.scss'
import { germanFederalStates } from '@talent-connect/talent-pool/config'

interface JobseekerProfileCardProps {
jobseekerProfile: JobseekerProfileCardJobseekerProfilePropFragment
Expand All @@ -26,7 +25,7 @@ export function JobseekerProfileCard({
profileAvatarImageS3Key,
fullName,
desiredPositions,
federalState,
location,
workingLanguages,
topSkills,
} = jobseekerProfile
Expand All @@ -38,7 +37,6 @@ export function JobseekerProfileCard({
const languages = workingLanguages?.map(({ language }) => language)
const tags = topSkills?.map((skill) => topSkillsIdToLabelMap[skill])
const avatar = profileAvatarImageS3Key || placeholderImage
const location = `Based in ${germanFederalStates[federalState]}`

return (
<div className="jobSeeker-profile-card-wrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ const validationSchema = Yup.object({
lastName: Yup.string()
.transform(toPascalCaseAndTrim)
.required('Your last name is required'),
location: Yup.string().ensure().required('Your location is required'),
federalState: Yup.mixed().required('Please select the state you live in'),
location: Yup.string().required('Your location is required'),
federalState: Yup.string().required('Please select the state you live in'),
})

function ModalForm({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const UserLocation = ({ location }) => {
alt="Location"
className="new-profile-card__location-icon"
/>
<p className="new-profile-card__location-text">{location}</p>
<p className="new-profile-card__location-text">ReDI {location}</p>
</div>
)
}
Expand Down

0 comments on commit 9f2110d

Please sign in to comment.