mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-28 04:33:42 +08:00
[offers][fix] Add previous companies to analysis DTO
This commit is contained in:
@ -43,7 +43,13 @@ const analysisOfferDtoMapper = (
|
|||||||
| (OffersFullTime & { totalCompensation: OffersCurrency })
|
| (OffersFullTime & { totalCompensation: OffersCurrency })
|
||||||
| null;
|
| null;
|
||||||
offersIntern: (OffersIntern & { monthlySalary: OffersCurrency }) | null;
|
offersIntern: (OffersIntern & { monthlySalary: OffersCurrency }) | null;
|
||||||
profile: OffersProfile & { background: OffersBackground | null };
|
profile: OffersProfile & {
|
||||||
|
background:
|
||||||
|
| (OffersBackground & {
|
||||||
|
experiences: Array<OffersExperience & { company: Company | null }>;
|
||||||
|
})
|
||||||
|
| null;
|
||||||
|
};
|
||||||
},
|
},
|
||||||
) => {
|
) => {
|
||||||
const { background, profileName } = offer.profile;
|
const { background, profileName } = offer.profile;
|
||||||
@ -56,7 +62,10 @@ const analysisOfferDtoMapper = (
|
|||||||
location: offer.location,
|
location: offer.location,
|
||||||
monthYearReceived: offer.monthYearReceived,
|
monthYearReceived: offer.monthYearReceived,
|
||||||
negotiationStrategy: offer.negotiationStrategy,
|
negotiationStrategy: offer.negotiationStrategy,
|
||||||
previousCompanies: [], // TODO: Fill this up
|
previousCompanies:
|
||||||
|
background?.experiences
|
||||||
|
?.filter((exp) => exp.company != null)
|
||||||
|
.map((exp) => exp.company?.name ?? '') ?? [],
|
||||||
profileName,
|
profileName,
|
||||||
specialization:
|
specialization:
|
||||||
offer.jobType === JobType.FULLTIME
|
offer.jobType === JobType.FULLTIME
|
||||||
@ -103,10 +112,26 @@ const analysisDtoMapper = (
|
|||||||
OffersOffer & {
|
OffersOffer & {
|
||||||
company: Company;
|
company: Company;
|
||||||
offersFullTime:
|
offersFullTime:
|
||||||
| (OffersFullTime & { totalCompensation: OffersCurrency })
|
| (OffersFullTime & {
|
||||||
|
totalCompensation: OffersCurrency;
|
||||||
|
})
|
||||||
| null;
|
| null;
|
||||||
offersIntern: (OffersIntern & { monthlySalary: OffersCurrency }) | null;
|
offersIntern:
|
||||||
profile: OffersProfile & { background: OffersBackground | null };
|
| (OffersIntern & {
|
||||||
|
monthlySalary: OffersCurrency;
|
||||||
|
})
|
||||||
|
| null;
|
||||||
|
profile: OffersProfile & {
|
||||||
|
background:
|
||||||
|
| (OffersBackground & {
|
||||||
|
experiences: Array<
|
||||||
|
OffersExperience & {
|
||||||
|
company: Company | null;
|
||||||
|
}
|
||||||
|
>;
|
||||||
|
})
|
||||||
|
| null;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
>,
|
>,
|
||||||
) => {
|
) => {
|
||||||
|
Reference in New Issue
Block a user