feat: add list filter to board view (#241)

* feat: add list filter to board view

* feat: implement API-driven list filtering

* refactor: remove unnecessary list join from card filtering queries

* feat: enable list filter options for public boards

* refactor(perf): move to main query

---------

Co-authored-by: Henry <henry_ball@hotmail.co.uk>
This commit is contained in:
Arpit Soni
2025-11-18 02:55:50 +05:30
committed by GitHub
parent c0a3c37d95
commit af6490896a
11 changed files with 70 additions and 1 deletions

View File

@@ -78,6 +78,7 @@ export const boardRouter = createTRPCRouter({
boardPublicId: z.string().min(12),
members: z.array(z.string().min(12)).optional(),
labels: z.array(z.string().min(12)).optional(),
lists: z.array(z.string().min(12)).optional(),
type: z.enum(["regular", "template"]).optional(),
}),
)
@@ -110,6 +111,7 @@ export const boardRouter = createTRPCRouter({
{
members: input.members ?? [],
labels: input.labels ?? [],
lists: input.lists ?? [],
type: input.type,
},
);
@@ -142,6 +144,7 @@ export const boardRouter = createTRPCRouter({
.regex(/^(?![-]+$)[a-zA-Z0-9-]+$/),
members: z.array(z.string().min(12)).optional(),
labels: z.array(z.string().min(12)).optional(),
lists: z.array(z.string().min(12)).optional(),
}),
)
.output(z.custom<Awaited<ReturnType<typeof boardRepo.getBySlug>>>())
@@ -164,6 +167,7 @@ export const boardRouter = createTRPCRouter({
{
members: input.members ?? [],
labels: input.labels ?? [],
lists: input.lists ?? [],
},
);
@@ -234,6 +238,7 @@ export const boardRouter = createTRPCRouter({
{
members: [],
labels: [],
lists: [],
type: sourceBoardInfo.type,
},
);