From 10a049f6277f1ebc9e786267d0e921f9e0cb760b Mon Sep 17 00:00:00 2001 From: Bryann Yeap Kok Keong Date: Sat, 29 Oct 2022 12:18:10 +0800 Subject: [PATCH] [offers][fix] Fix bug where full timers when getting sorted by monthly salary instead of TC --- .../portal/src/server/router/offers/offers-analysis-router.ts | 1 - apps/portal/src/server/router/offers/offers.ts | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/portal/src/server/router/offers/offers-analysis-router.ts b/apps/portal/src/server/router/offers/offers-analysis-router.ts index 9ee081cd..8176b3c3 100644 --- a/apps/portal/src/server/router/offers/offers-analysis-router.ts +++ b/apps/portal/src/server/router/offers/offers-analysis-router.ts @@ -213,7 +213,6 @@ export const offersAnalysisRouter = createRouter() const overallHighestOffer = offers[0]; - // TODO: Shift yoe out of background to make it mandatory if ( !overallHighestOffer.profile.background || overallHighestOffer.profile.background.totalYoe == null diff --git a/apps/portal/src/server/router/offers/offers.ts b/apps/portal/src/server/router/offers/offers.ts index 7d5ff908..86cd29ef 100644 --- a/apps/portal/src/server/router/offers/offers.ts +++ b/apps/portal/src/server/router/offers/offers.ts @@ -219,8 +219,8 @@ export const offersRouter = createRouter().query('list', { : sortingKey === sortingKeysMap.totalCompensation ? [ { - offersIntern: { - monthlySalary: { + offersFullTime: { + totalCompensation: { baseValue: order, }, },