mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2026-04-07 21:07:59 +08:00
[offers][chore] Add sorting dashboard offers by job title
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user