feat: debounce search, tambah filter source & date range di bug-reports, hapus seafile.ts
- Debounce search input (400ms, min 3 karakter) sesuai konvensi - Tambah filter source (QC/SYSTEM/USER) dan date range di bug-reports - Backend /api/bugs support query param source, dateFrom, dateTo - Update API_URLS.getBugs dengan param baru - Hapus seafile.ts (dead code, tidak digunakan)
This commit is contained in:
@@ -51,8 +51,13 @@ export const API_URLS = {
|
||||
createOperator: () => `/api/operators`,
|
||||
editOperator: (id: string) => `/api/operators/${id}`,
|
||||
deleteOperator: (id: string) => `/api/operators/${id}`,
|
||||
getBugs: (page: number, search: string, app: string, status: string) =>
|
||||
`/api/bugs?page=${page}&search=${encodeURIComponent(search)}&app=${app}&status=${status}`,
|
||||
getBugs: (page: number, search: string, app: string, status: string, source?: string, dateFrom?: string, dateTo?: string) => {
|
||||
const params = new URLSearchParams({ page: String(page), search: encodeURIComponent(search), app, status })
|
||||
if (source && source !== 'all') params.set('source', source)
|
||||
if (dateFrom) params.set('dateFrom', dateFrom)
|
||||
if (dateTo) params.set('dateTo', dateTo)
|
||||
return `/api/bugs?${params}`
|
||||
},
|
||||
createBug: () => `/api/bugs`,
|
||||
uploadImage: () => `/api/upload/image`,
|
||||
updateBugStatus: (id: string) => `/api/bugs/${id}/status`,
|
||||
|
||||
Reference in New Issue
Block a user