From b3eb2f6d6b1a201ad4a15aa684e4b06e2feec989 Mon Sep 17 00:00:00 2001 From: Bryann Yeap Kok Keong Date: Thu, 3 Nov 2022 16:13:32 +0800 Subject: [PATCH] [offers][chore] Add profileId to AnalysisOffer --- apps/portal/src/mappers/offers-mappers.ts | 14 ++++++-------- apps/portal/src/types/offers.d.ts | 1 + 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/apps/portal/src/mappers/offers-mappers.ts b/apps/portal/src/mappers/offers-mappers.ts index 07b37bb0..9ce90cc1 100644 --- a/apps/portal/src/mappers/offers-mappers.ts +++ b/apps/portal/src/mappers/offers-mappers.ts @@ -87,6 +87,7 @@ const analysisOfferDtoMapper = ( background?.experiences ?.filter((exp) => exp.company != null) .map((exp) => exp.company?.name ?? '') ?? [], + profileId: offer.profileId, profileName, title: offer.jobType === JobType.FULLTIME @@ -708,20 +709,17 @@ export const dashboardOfferDtoMapper = ( if (offer.offersFullTime.baseSalary) { dashboardOfferDto.baseSalary = valuationDtoMapper( - offer.offersFullTime.baseSalary + offer.offersFullTime.baseSalary, ); } if (offer.offersFullTime.bonus) { - dashboardOfferDto.bonus = valuationDtoMapper( - offer.offersFullTime.bonus - ); - + dashboardOfferDto.bonus = valuationDtoMapper(offer.offersFullTime.bonus); } if (offer.offersFullTime.stocks) { dashboardOfferDto.stocks = valuationDtoMapper( - offer.offersFullTime.stocks + offer.offersFullTime.stocks, ); } } else if (offer.offersIntern) { @@ -736,12 +734,12 @@ export const dashboardOfferDtoMapper = ( export const getOffersResponseMapper = ( data: Array, paging: Paging, - jobType: JobType + jobType: JobType, ) => { const getOffersResponse: GetOffersResponse = { data, jobType, - paging + paging, }; return getOffersResponse; }; diff --git a/apps/portal/src/types/offers.d.ts b/apps/portal/src/types/offers.d.ts index 425d654d..559c9f31 100644 --- a/apps/portal/src/types/offers.d.ts +++ b/apps/portal/src/types/offers.d.ts @@ -181,6 +181,7 @@ export type AnalysisOffer = { monthYearReceived: Date; negotiationStrategy: string; previousCompanies: Array; + profileId: string; profileName: string; title: string; totalYoe: number;