feat(pipeline): search the render queue by shot or client code
Deploy / deploy (push) Successful in 3m16s
Deploy / deploy (push) Successful in 3m16s
A search box above the exports table matches any part of the shot code or client code, case-insensitively, so "UNG_114" lists a whole episode. It is applied server-side (the table is paged there), debounced, and scopes the summary counts too; combines with the project and status filters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -522,6 +522,8 @@ export interface ListExportsFilter {
|
||||
episode?: string;
|
||||
status?: ExportStatus;
|
||||
shotId?: string;
|
||||
/** Free-text match on shot code or client code ("UNG_114" → the whole episode). */
|
||||
search?: string;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
}
|
||||
@@ -535,6 +537,21 @@ export async function listExports(filter: ListExportsFilter) {
|
||||
...(filter.shotId ? { shotId: filter.shotId } : {}),
|
||||
...(filter.episode ? { shot: { episode: filter.episode } } : {}),
|
||||
};
|
||||
// Part of the scope rather than the status filter, so the summary counts
|
||||
// describe what was searched for.
|
||||
const search = filter.search?.trim();
|
||||
if (search) {
|
||||
scope.AND = [
|
||||
{
|
||||
shot: {
|
||||
OR: [
|
||||
{ shotCode: { contains: search, mode: "insensitive" } },
|
||||
{ clientCode: { contains: search, mode: "insensitive" } },
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
const where: Prisma.ExportWhereInput = {
|
||||
...scope,
|
||||
...(filter.status ? { status: filter.status } : {}),
|
||||
|
||||
Reference in New Issue
Block a user