|
|
|
@ -17,6 +17,7 @@ const getOrder = (prefix: string) => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const sortingKeysMap = {
|
|
|
|
|
companyName: 'companyName',
|
|
|
|
|
monthYearReceived: 'monthYearReceived',
|
|
|
|
|
totalCompensation: 'totalCompensation',
|
|
|
|
|
totalYoe: 'totalYoe',
|
|
|
|
@ -138,6 +139,14 @@ export const offersRouter = createRouter().query('list', {
|
|
|
|
|
monthYearReceived: 'desc',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
: sortingKey === sortingKeysMap.companyName
|
|
|
|
|
? [
|
|
|
|
|
{
|
|
|
|
|
company: {
|
|
|
|
|
name: order,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
: { monthYearReceived: 'desc' },
|
|
|
|
|
where: {
|
|
|
|
|
AND: [
|
|
|
|
@ -268,6 +277,14 @@ export const offersRouter = createRouter().query('list', {
|
|
|
|
|
monthYearReceived: 'desc',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
: sortingKey === sortingKeysMap.companyName
|
|
|
|
|
? [
|
|
|
|
|
{
|
|
|
|
|
company: {
|
|
|
|
|
name: order,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
: { monthYearReceived: 'desc' },
|
|
|
|
|
where: {
|
|
|
|
|
AND: [
|
|
|
|
|