Add ability to trigger a save from the ui which whill make the trainer save on the next step

This commit is contained in:
Jaret Burkett
2026-05-26 08:38:49 -06:00
parent 2aa60e4ca5
commit 68e9b38220
6 changed files with 91 additions and 6 deletions

View File

@@ -50,6 +50,22 @@ export const deleteJob = (jobID: string) => {
});
};
export const saveJobNow = (jobID: string) => {
return new Promise<void>((resolve, reject) => {
apiClient
.get(`/api/jobs/${jobID}/save_now`)
.then(res => res.data)
.then(data => {
console.log('Job set to save on next step:', data);
resolve();
})
.catch(error => {
console.error('Error setting job to save on next step:', error);
reject(error);
});
});
};
export const markJobAsStopped = (jobID: string) => {
return new Promise<void>((resolve, reject) => {
apiClient