fix: document count period filter (#882)
## Description Currently the count for the documents table tabs do not display the correct values when the period filter is applied. ## Changes Made - Updated `getStats` to support filtering on period ## Testing Performed - Tested to see if the documents tab count were being filtered based on the period ## Checklist - [X] I have tested these changes locally and they work as expected. - [X] I have followed the project's coding style guidelines.
This commit is contained in:
@@ -9,6 +9,8 @@ import { ExtendedDocumentStatus } from '@documenso/prisma/types/extended-documen
|
||||
import type { FindResultSet } from '../../types/find-result-set';
|
||||
import { maskRecipientTokensForDocument } from '../../utils/mask-recipient-tokens-for-document';
|
||||
|
||||
export type PeriodSelectorValue = '' | '7d' | '14d' | '30d';
|
||||
|
||||
export type FindDocumentsOptions = {
|
||||
userId: number;
|
||||
term?: string;
|
||||
@@ -19,7 +21,7 @@ export type FindDocumentsOptions = {
|
||||
column: keyof Omit<Document, 'document'>;
|
||||
direction: 'asc' | 'desc';
|
||||
};
|
||||
period?: '' | '7d' | '14d' | '30d';
|
||||
period?: PeriodSelectorValue;
|
||||
};
|
||||
|
||||
export const findDocuments = async ({
|
||||
|
||||
Reference in New Issue
Block a user