From d22df2ad6ef5827748efe03d7728b5625111ccc7 Mon Sep 17 00:00:00 2001 From: Bryann Yeap Kok Keong Date: Mon, 31 Oct 2022 14:47:05 +0800 Subject: [PATCH] Include City, State, and Country in profileDtoMapper params --- apps/portal/src/mappers/offers-mappers.ts | 24 +++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/apps/portal/src/mappers/offers-mappers.ts b/apps/portal/src/mappers/offers-mappers.ts index 7ce52626..a2a7c80f 100644 --- a/apps/portal/src/mappers/offers-mappers.ts +++ b/apps/portal/src/mappers/offers-mappers.ts @@ -1,5 +1,7 @@ import type { + City, Company, + Country, OffersAnalysis, OffersAnalysisUnit, OffersBackground, @@ -12,6 +14,7 @@ import type { OffersProfile, OffersReply, OffersSpecificYoe, + State, User, } from '@prisma/client'; import { JobType } from '@prisma/client'; @@ -449,6 +452,7 @@ export const profileDtoMapper = ( topSimilarOffers: Array< OffersOffer & { company: Company; + location: City & { state: State & { country: Country } }; offersFullTime: | (OffersFullTime & { totalCompensation: OffersCurrency }) | null; @@ -459,7 +463,14 @@ export const profileDtoMapper = ( background: | (OffersBackground & { experiences: Array< - OffersExperience & { company: Company | null } + OffersExperience & { + company: Company | null; + location: + | (City & { + state: State & { country: Country }; + }) + | null; + } >; }) | null; @@ -472,6 +483,7 @@ export const profileDtoMapper = ( topSimilarOffers: Array< OffersOffer & { company: Company; + location: City & { state: State & { country: Country } }; offersFullTime: | (OffersFullTime & { totalCompensation: OffersCurrency }) | null; @@ -482,7 +494,12 @@ export const profileDtoMapper = ( background: | (OffersBackground & { experiences: Array< - OffersExperience & { company: Company | null } + OffersExperience & { + company: Company | null; + location: + | (City & { state: State & { country: Country } }) + | null; + } >; }) | null; @@ -492,6 +509,7 @@ export const profileDtoMapper = ( }; overallHighestOffer: OffersOffer & { company: Company; + location: City & { state: State & { country: Country } }; offersFullTime: | (OffersFullTime & { totalCompensation: OffersCurrency }) | null; @@ -508,6 +526,7 @@ export const profileDtoMapper = ( experiences: Array< OffersExperience & { company: Company | null; + location: (City & { state: State & { country: Country } }) | null; monthlySalary: OffersCurrency | null; totalCompensation: OffersCurrency | null; } @@ -525,6 +544,7 @@ export const profileDtoMapper = ( offers: Array< OffersOffer & { company: Company; + location: City & { state: State & { country: Country } }; offersFullTime: | (OffersFullTime & { baseSalary: OffersCurrency | null;