Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export function UserExperienceItem({
startedAt,
endedAt,
subtitle,
image,
} = experience;
const { skills, location, locationType, customLocation } =
experience as UserExperienceWork;
Expand Down Expand Up @@ -127,7 +128,7 @@ export function UserExperienceItem({
<Image
className="h-8 w-8 rounded-max object-cover"
type={ImageType.Organization}
src={company?.image}
src={company?.image || image}
/>
)}
{editUrl && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export function UserExperiencesGroupedList({
<Image
className="h-8 w-8 rounded-max object-cover"
type={ImageType.Organization}
src={first.company?.image}
src={first.company?.image || first.image}
/>
<div className="flex flex-1 flex-col">
<div className="flex flex-wrap items-center gap-1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ const UserEducationForm = () => {
label="School*"
type={AutocompleteType.School}
/>
<ControlledTextField
name="customDomain"
label="School domain"
placeholder="Ex: university.edu"
fieldType="secondary"
className={profileSecondaryFieldStyles}
/>
<ControlledTextField
name="subtitle"
label="Degree*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ const UserWorkExperienceForm = ({ location }: { location?: TLocation }) => {
label="Company or organization*"
name="customCompanyName"
/>
<ControlledTextField
name="customDomain"
label="Company domain"
placeholder="Ex: company.com"
fieldType="secondary"
className={profileSecondaryFieldStyles}
/>
</div>
<HorizontalSeparator />
<CurrentExperienceSwitch
Expand Down
9 changes: 9 additions & 0 deletions packages/shared/src/graphql/user/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const excludedProperties = [
'location',
'company',
'customLocation',
'image',
];

const USER_EXPERIENCE_FRAGMENT = gql`
Expand All @@ -39,6 +40,8 @@ const USER_EXPERIENCE_FRAGMENT = gql`
startedAt
endedAt
customCompanyName
customDomain
image
employmentType
locationType
verified
Expand Down Expand Up @@ -175,6 +178,8 @@ export interface UserExperience {
endedAt?: string | null;
company?: Company | null;
customCompanyName?: string | null;
customDomain?: string | null;
image?: string | null;
subtitle?: string | null;
url?: string | null;
verified?: boolean | null;
Expand Down Expand Up @@ -282,6 +287,8 @@ const UPSERT_USER_GENERAL_EXPERIENCE = gql`
name
}
customCompanyName
customDomain
image
url
grade
externalReferenceId
Expand Down Expand Up @@ -325,6 +332,8 @@ const UPSERT_USER_WORK_EXPERIENCE = gql`
name
}
customCompanyName
customDomain
image
employmentType
location {
id
Expand Down
8 changes: 8 additions & 0 deletions packages/shared/src/hooks/useUserExperienceForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ export const userExperienceInputBaseSchema = z
.nullable()
.optional()
.default(null),
customDomain: z
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this z.url();?

.string()
.trim()
.normalize()
.max(255)
.nullable()
.optional()
.default(null),
url: z
.union([
z.url('Please enter a valid URL.').max(2000),
Expand Down