|
|
|
@ -18,6 +18,7 @@ const getOrder = (prefix: string) => {
|
|
|
|
|
|
|
|
|
|
const sortingKeysMap = {
|
|
|
|
|
companyName: 'companyName',
|
|
|
|
|
jobTitle: 'jobTitle',
|
|
|
|
|
monthYearReceived: 'monthYearReceived',
|
|
|
|
|
totalCompensation: 'totalCompensation',
|
|
|
|
|
totalYoe: 'totalYoe',
|
|
|
|
@ -146,6 +147,20 @@ export const offersRouter = createRouter().query('list', {
|
|
|
|
|
name: order,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
monthYearReceived: 'desc',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
: sortingKey === sortingKeysMap.jobTitle
|
|
|
|
|
? [
|
|
|
|
|
{
|
|
|
|
|
offersIntern: {
|
|
|
|
|
title: order,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
monthYearReceived: 'desc',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
: { monthYearReceived: 'desc' },
|
|
|
|
|
where: {
|
|
|
|
@ -284,6 +299,20 @@ export const offersRouter = createRouter().query('list', {
|
|
|
|
|
name: order,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
monthYearReceived: 'desc',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
: sortingKey === sortingKeysMap.jobTitle
|
|
|
|
|
? [
|
|
|
|
|
{
|
|
|
|
|
offersFullTime: {
|
|
|
|
|
title: order,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
monthYearReceived: 'desc',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
: { monthYearReceived: 'desc' },
|
|
|
|
|
where: {
|
|
|
|
|