Skip to content

Commit

Permalink
curation sorts by needsAttention for now
Browse files Browse the repository at this point in the history
  • Loading branch information
oganm committed Sep 20, 2024
1 parent dc1ade8 commit 5d1de4b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/views/Browser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ export default {
text: "Curation",
value: "curationNote",
align: "center",
sortable: false
tip: "Sorting sorts by needsAttention field",
sortable: true
});
}
if (this.debug && this.appliedQuery) {
Expand All @@ -294,20 +295,24 @@ export default {
return generateFilter(this.searchSettings);
},
browsingOptions() {
let sort = this.options.sortBy[0] && (this.options.sortDesc[0] ? "-" : "+") + this.options.sortBy[0]
if (this.options.sortBy[0] == "curationNote") {
sort = "curationDetails.needsAttention" && (this.options.sortDesc[0] ? "-" : "+") + "curationDetails.needsAttention"
}
// query can be null if reset
if (this.searchSettings.query && this.searchSettings.query.length > 0) {
return {
query: this.searchSettings.query,
filter: this.filter,
sort: this.options.sortBy[0] && (this.options.sortDesc[0] ? "-" : "+") + this.options.sortBy[0],
sort: sort,
offset: (this.options.page - 1) * this.options.itemsPerPage,
limit: this.options.itemsPerPage,
ignoreExcludedTerms: !!this.searchSettings.ignoreExcludedTerms
};
} else {
return {
filter: this.filter,
sort: this.options.sortBy[0] && (this.options.sortDesc[0] ? "-" : "+") + this.options.sortBy[0],
sort: sort,
offset: (this.options.page - 1) * this.options.itemsPerPage,
limit: this.options.itemsPerPage,
ignoreExcludedTerms: !!this.searchSettings.ignoreExcludedTerms
Expand Down

0 comments on commit 5d1de4b

Please sign in to comment.