feat: maintenance flows frontend foundation - types, API clients, sidebar, library filter
- Add maintenance.ts types: TargetEntry, TargetList, MaintenanceSchedule, BatchLaunch - Add targetListsApi and maintenanceSchedulesApi/batchLaunchApi clients - Extend TreeType union with 'maintenance' in tree.ts - Update getTreeNavigatePath/getTreeEditorPath in routing.ts for maintenance - Sidebar: track maintenance count and add Maintenance sub-nav item - TreeLibraryPage: add maintenance to typeFilter state, URL sync, and tab buttons - TreeGridView, TreeListView, TreeTableView: add amber Wrench maintenance badge Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
19
frontend/src/api/targetLists.ts
Normal file
19
frontend/src/api/targetLists.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { apiClient } from './client'
|
||||
import type { TargetList, TargetListCreate } from '@/types'
|
||||
|
||||
export const targetListsApi = {
|
||||
list: (): Promise<TargetList[]> =>
|
||||
apiClient.get('/target-lists/').then(r => r.data),
|
||||
|
||||
get: (id: string): Promise<TargetList> =>
|
||||
apiClient.get(`/target-lists/${id}`).then(r => r.data),
|
||||
|
||||
create: (data: TargetListCreate): Promise<TargetList> =>
|
||||
apiClient.post('/target-lists/', data).then(r => r.data),
|
||||
|
||||
update: (id: string, data: Partial<TargetListCreate>): Promise<TargetList> =>
|
||||
apiClient.put(`/target-lists/${id}`, data).then(r => r.data),
|
||||
|
||||
delete: (id: string): Promise<void> =>
|
||||
apiClient.delete(`/target-lists/${id}`).then(() => undefined),
|
||||
}
|
||||
Reference in New Issue
Block a user