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