This commit is contained in:
David Nguyen
2025-02-05 00:57:00 +11:00
parent 540cc5bfc1
commit 1057ae6d2a
105 changed files with 379 additions and 357 deletions

View File

@ -172,18 +172,33 @@ export const documentRouter = router({
};
}
console.log({
userId: user.id,
teamId,
query,
templateId,
page,
perPage,
source,
status,
period,
senderIds,
orderBy: orderByColumn ? { column: orderByColumn, direction: orderByDirection } : undefined,
});
const [stats, documents] = await Promise.all([
getStats(getStatOptions),
findDocuments({
userId: user.id,
teamId,
templateId,
query,
source,
status,
templateId,
page,
perPage,
source,
status,
period,
senderIds,
orderBy: orderByColumn
? { column: orderByColumn, direction: orderByDirection }
: undefined,