[offers][chore] Add location to experience in the back end

pull/402/head
BryannYeap 2 years ago
parent 111b078147
commit 0311ee3e6a

@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "OffersExperience" ADD COLUMN "location" TEXT;

@ -232,6 +232,7 @@ model OffersExperience {
// Add more fields
durationInMonths Int?
specialization String?
location String?
// FULLTIME fields
level String?

@ -267,6 +267,7 @@ export const experienceDtoMapper = (
id: experience.id,
jobType: experience.jobType,
level: experience.level,
location: experience.location,
monthlySalary: experience.monthlySalary
? valuationDtoMapper(experience.monthlySalary)
: experience.monthlySalary,

@ -103,7 +103,7 @@ function Test() {
],
experiences: [
{
companyId: 'cl9ec1mgg0000w33hg1a3612r',
companyId: 'cl9h0bqu50000txxwkhmshhxz',
durationInMonths: 24,
jobType: 'FULLTIME',
level: 'Junior',
@ -132,7 +132,7 @@ function Test() {
{
comments: 'I am a Raffles Institution almumni',
// Comments: '',
companyId: 'cl98yuqk80007txhgjtjp8fk4',
companyId: 'cl9h0bqu50000txxwkhmshhxz',
jobType: 'FULLTIME',
location: 'Singapore, Singapore',
monthYearReceived: new Date('2022-09-30T07:58:54.000Z'),
@ -161,7 +161,7 @@ function Test() {
},
{
comments: '',
companyId: 'cl98yuqk80007txhgjtjp8fk4',
companyId: 'cl9h0bqu50000txxwkhmshhxz',
jobType: 'FULLTIME',
location: 'Singapore, Singapore',
monthYearReceived: new Date('2022-09-30T07:58:54.000Z'),
@ -263,7 +263,7 @@ function Test() {
slug: 'meta',
updatedAt: new Date('2022-10-12T16:19:05.196Z'),
},
companyId: 'cl9ec1mgg0000w33hg1a3612r',
companyId: 'cl9h0bqu50000txxwkhmshhxz',
durationInMonths: 24,
id: 'cl96stky6002iw32gpt6t87s2',
jobType: 'FULLTIME',
@ -339,7 +339,7 @@ function Test() {
slug: 'meta',
updatedAt: new Date('2022-10-12T16:19:05.196Z'),
},
companyId: 'cl9ec1mgg0000w33hg1a3612r',
companyId: 'cl9h0bqu50000txxwkhmshhxz',
id: 'cl976t4de00047iygl0zbce11',
jobType: 'FULLTIME',
location: 'Singapore, Singapore',
@ -392,7 +392,7 @@ function Test() {
slug: 'meta',
updatedAt: new Date('2022-10-12T16:19:05.196Z'),
},
companyId: 'cl9ec1mgg0000w33hg1a3612r',
companyId: 'cl9h0bqu50000txxwkhmshhxz',
id: 'cl96stky80031w32gau9mu1gs',
jobType: 'FULLTIME',
location: 'Singapore, Singapore',
@ -445,7 +445,7 @@ function Test() {
slug: 'meta',
updatedAt: new Date('2022-10-12T16:19:05.196Z'),
},
companyId: 'cl9ec1mgg0000w33hg1a3612r',
companyId: 'cl9h0bqu50000txxwkhmshhxz',
id: 'cl96stky9003bw32gc3l955vr',
jobType: 'FULLTIME',
location: 'Singapore, Singapore',
@ -498,7 +498,7 @@ function Test() {
slug: 'meta',
updatedAt: new Date('2022-10-12T16:19:05.196Z'),
},
companyId: 'cl9ec1mgg0000w33hg1a3612r',
companyId: 'cl9h0bqu50000txxwkhmshhxz',
id: 'cl976wf28000t7iyga4noyz7s',
jobType: 'FULLTIME',
location: 'Singapore, Singapore',
@ -551,7 +551,7 @@ function Test() {
slug: 'meta',
updatedAt: new Date('2022-10-12T16:19:05.196Z'),
},
companyId: 'cl9ec1mgg0000w33hg1a3612r',
companyId: 'cl9h0bqu50000txxwkhmshhxz',
id: 'cl96tbb3o0051w32gjrpaiiit',
jobType: 'FULLTIME',
location: 'Singapore, Singapore',

@ -8,7 +8,7 @@ function GenerateAnalysis() {
return (
<div>
{JSON.stringify(
analysisMutation.mutate({ profileId: 'cl98ywtbv0000tx1s4p18eol1' }),
analysisMutation.mutate({ profileId: 'cl9gvjn8b004di96vd1hhh9c4' }),
)}
</div>
);

@ -75,6 +75,7 @@ const experience = z.object({
id: z.string().optional(),
jobType: z.string().nullish(),
level: z.string().nullish(),
location: z.string().nullish(),
monthlySalary: valuation.nullish(),
monthlySalaryId: z.string().nullish(),
specialization: z.string().nullish(),

@ -24,6 +24,7 @@ export type Experience = {
id: string;
jobType: JobType?;
level: string?;
location: string?;
monthlySalary: Valuation?;
specialization: string?;
title: string?;

Loading…
Cancel
Save