feat(review): approved/rejected queue views — approve now produces a working list
serverListPendingReviewMatches gains a status param; queue gains Pending/Approved/Rejected tabs composed with the source filter. Approve was already durable (review fields survive nightly re-scoring) but approved matches vanished from the UI — now they're the working list for manual contact pulls and sends. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -23,7 +23,10 @@ export interface PendingReviewMatch {
|
||||
|
||||
export async function serverListPendingReviewMatches(
|
||||
db: NpOutreachDatabase | NpOutreachTransaction,
|
||||
{ source }: { source?: string } = {},
|
||||
{
|
||||
source,
|
||||
status = 'pending',
|
||||
}: { source?: string; status?: 'pending' | 'approved' | 'rejected' } = {},
|
||||
): Promise<PendingReviewMatch[]> {
|
||||
return db
|
||||
.select({
|
||||
@@ -42,9 +45,9 @@ export async function serverListPendingReviewMatches(
|
||||
.innerJoin(schema.grants, eq(schema.matches.grantId, schema.grants.id))
|
||||
.where(
|
||||
source == null
|
||||
? eq(schema.matches.reviewStatus, 'pending')
|
||||
? eq(schema.matches.reviewStatus, status)
|
||||
: and(
|
||||
eq(schema.matches.reviewStatus, 'pending'),
|
||||
eq(schema.matches.reviewStatus, status),
|
||||
eq(schema.grants.source, source as never),
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user