chore: Include test case title query in filters to improve UI consistency (#284)

This commit is contained in:
kimatata
2025-09-23 11:22:14 +09:00
committed by GitHub
parent 81805c605a
commit 0a8cccfad4
12 changed files with 164 additions and 215 deletions

View File

@@ -26,9 +26,13 @@ async function fetchCase(jwt: string, caseId: number) {
}
}
async function fetchCases(jwt: string, folderId: number, priority?: number[], type?: number[], q?: string) {
async function fetchCases(jwt: string, folderId: number, title?: string, priority?: number[], type?: number[]) {
const queryParams = [`folderId=${folderId}`];
if (title) {
queryParams.push(`title=${title}`);
}
if (priority && priority.length > 0) {
queryParams.push(`priority=${priority.join(',')}`);
}
@@ -37,10 +41,6 @@ async function fetchCases(jwt: string, folderId: number, priority?: number[], ty
queryParams.push(`type=${type.join(',')}`);
}
if (q) {
queryParams.push(`q=${q}`);
}
const query = queryParams.length > 0 ? `?${queryParams.join('&')}` : '';
const url = `${apiServer}/cases${query}`;