@@ -11,7 +11,7 @@ import { Company } from '../../../src/entity/Company';
1111import { UserExperienceWork } from '../../../src/entity/user/experiences/UserExperienceWork' ;
1212import { insertOrIgnoreUserExperienceSkills } from '../../../src/entity/user/experiences/UserExperienceSkill' ;
1313import { textFromEnumValue } from '../../../src/common' ;
14- import { LocationType } from '@dailydotdev/schema' ;
14+ import { EmploymentType , LocationType } from '@dailydotdev/schema' ;
1515import { DatasetLocation } from '../../../src/entity/dataset/DatasetLocation' ;
1616import { UserExperienceEducation } from '../../../src/entity/user/experiences/UserExperienceEducation' ;
1717import { UserExperienceCertification } from '../../../src/entity/user/experiences/UserExperienceCertification' ;
@@ -149,6 +149,7 @@ export const importUserExperienceWork = async ({
149149 ended_at : endedAt ,
150150 location,
151151 flags,
152+ employment_type : employmentType ,
152153 } = userExperience ;
153154
154155 const insertResult = await con . getRepository ( UserExperienceWork ) . insert (
@@ -166,7 +167,6 @@ export const importUserExperienceWork = async ({
166167 locationType : locationType
167168 ? ( Object . entries ( LocationType ) . find ( ( [ , value ] ) => {
168169 return (
169- // TODO cv-parsing remove this replace when cv is adjusted to not use prefix
170170 locationType . replace ( 'LOCATION_TYPE_' , '' ) ===
171171 textFromEnumValue ( LocationType , value )
172172 ) ;
@@ -176,6 +176,14 @@ export const importUserExperienceWork = async ({
176176 location,
177177 con : con ,
178178 } ) ) ,
179+ employmentType : employmentType
180+ ? ( Object . entries ( EmploymentType ) . find ( ( [ , value ] ) => {
181+ return (
182+ employmentType . replace ( 'EMPLOYMENT_TYPE_' , '' ) ===
183+ textFromEnumValue ( EmploymentType , value )
184+ ) ;
185+ } ) ?. [ 1 ] as EmploymentType )
186+ : undefined ,
179187 } ) ,
180188 ) ;
181189
@@ -201,7 +209,6 @@ export const importUserExperienceEducation = async ({
201209} ) : Promise < { experienceId : string } > => {
202210 const userExperience = userExperienceEducationImportSchema . parse ( data ) ;
203211
204- // TODO cv-parsing potentially won't be needed once cv is adjusted to use camelCase
205212 const {
206213 company,
207214 title,
0 commit comments