Skip to content

Commit 91bee7c

Browse files
committed
chore: change sort key to timeOfContact (contacts) and createdAt (cases)
1 parent cf43f70 commit 91bee7c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

hrm-domain/packages/hrm-search-config/generateElasticsearchQuery.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,8 @@ const generateContactsQuery = ({
386386
},
387387
sort:
388388
searchParameters.searchTerm.length === 0
389-
? [{ updatedAt: 'desc' }]
390-
: ['_score', { updatedAt: 'desc' }],
389+
? [{ timeOfContact: 'desc' }]
390+
: ['_score', { timeOfContact: 'desc' }],
391391
min_score: MIN_SCORE,
392392
from: pagination.start,
393393
size: pagination.limit,
@@ -501,8 +501,8 @@ const generateCasesQuery = ({
501501
},
502502
sort:
503503
searchParameters.searchTerm.length === 0
504-
? [{ updatedAt: 'desc' }]
505-
: ['_score', { updatedAt: 'desc' }],
504+
? [{ createdAt: 'desc' }]
505+
: ['_score', { createdAt: 'desc' }],
506506
min_score: MIN_SCORE,
507507
from: pagination.start,
508508
size: pagination.limit,

0 commit comments

Comments
 (0)