Correct sorting by modified time function in Vacancies

Correct sorting by modified time function in Vacancies
This commit is contained in:
Timur Mukhamedishin 2022-10-11 13:01:57 +07:00 committed by GitHub
commit 2298a08327
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,8 +60,8 @@
const applicationSorting = (a: Doc, b: Doc) =>
(applications?.get(b._id as Ref<Vacancy>)?.count ?? 0) - (applications?.get(a._id as Ref<Vacancy>)?.count ?? 0) ?? 0
const modifiedSorting = (a: Doc, b: Doc) =>
(applications?.get(b._id as Ref<Vacancy>)?.modifiedOn ?? 0) -
(applications?.get(a._id as Ref<Vacancy>)?.modifiedOn ?? 0) ?? 0
(applications?.get(b._id as Ref<Vacancy>)?.modifiedOn ?? b.modifiedOn) -
(applications?.get(a._id as Ref<Vacancy>)?.modifiedOn ?? a.modifiedOn)
const replacedKeys: Map<string, BuildModelKey> = new Map<string, BuildModelKey>([
[