feat(documents): hide completed workflows from folder views
When listDocuments is called with folderId set (including folderId=null for root-only), exclude status='completed' rows. The signed-PDF file appears in the Files section with a "view signing details" link; the workflow row would just be noise alongside the file. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -184,6 +184,10 @@ export async function listDocuments(
|
||||
} else {
|
||||
filters.push(eq(documents.folderId, query.folderId));
|
||||
}
|
||||
// When viewing a specific folder, hide completed workflows — they surface
|
||||
// via their resulting signed-PDF file row in the Files section, not the
|
||||
// Signing section.
|
||||
filters.push(ne(documents.status, 'completed'));
|
||||
}
|
||||
if (sentSince) filters.push(gte(documents.createdAt, new Date(sentSince)));
|
||||
if (sentUntil) filters.push(lte(documents.createdAt, new Date(sentUntil)));
|
||||
|
||||
Reference in New Issue
Block a user