mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
Refactor global schedules with mobile-responsive UI and backend optimizations (#167)
* ralph: ralph-global-schedules-dashboard completed after 2 iterations * Refactor global schedules with mobile-responsive UI and backend optimizations
This commit is contained in:
1 parent
ba15fb31e4
commit
f18bcbbf3e
10 files changed
+721
-1
No files matched your search
@@ -6,12 +6,24 @@ import {
|
||||
deleteRepoSchedule,
|
||||
getRepoSchedule,
|
||||
getRepoScheduleRun,
|
||||
listAllSchedules,
|
||||
listRepoScheduleRuns,
|
||||
listRepoSchedules,
|
||||
runRepoSchedule,
|
||||
updateRepoSchedule,
|
||||
} from '@/api/schedules'
|
||||
import { showToast } from '@/lib/toast'
|
||||
import type { ScheduleJobWithRepo } from '@/api/schedules'
|
||||
|
||||
export function useAllSchedules() {
|
||||
return useQuery({
|
||||
queryKey: ['all-schedules'],
|
||||
queryFn: async () => {
|
||||
const response = await listAllSchedules()
|
||||
return response.jobs as ScheduleJobWithRepo[]
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export function useRepoSchedules(repoId: number | undefined) {
|
||||
return useQuery({
|
||||
|
||||
Reference in new issue
Block a user