feat: Show drafts to author in collections (#1134)

This commit is contained in:
Tom Moor 2020-01-02 21:17:29 -08:00 committed by GitHub
parent c7aa261863
commit 541e4ebe37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 11 deletions

View File

@ -77,19 +77,11 @@ export default class DocumentsStore extends BaseStore<Document> {
}
leastRecentlyUpdatedInCollection(collectionId: string): Document[] {
return orderBy(
this.publishedInCollection(collectionId),
'updatedAt',
'asc'
);
return orderBy(this.inCollection(collectionId), 'updatedAt', 'asc');
}
recentlyUpdatedInCollection(collectionId: string): Document[] {
return orderBy(
this.publishedInCollection(collectionId),
'updatedAt',
'desc'
);
return orderBy(this.inCollection(collectionId), 'updatedAt', 'desc');
}
recentlyPublishedInCollection(collectionId: string): Document[] {
@ -101,7 +93,7 @@ export default class DocumentsStore extends BaseStore<Document> {
}
alphabeticalInCollection(collectionId: string): Document[] {
return naturalSort(this.publishedInCollection(collectionId), 'title');
return naturalSort(this.inCollection(collectionId), 'title');
}
searchResults(query: string): SearchResult[] {