Skip to content

Commit

Permalink
job stop, v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ceddybi committed Feb 6, 2024
1 parent 0fe7e3f commit f455d56
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "aij",
"productName": "AIJ",
"version": "0.1.0",
"version": "0.1.1",
"description": "AI Jobs",
"main": ".webpack/main",
"homepage": "https://algojobs.ca",
Expand Down
30 changes: 18 additions & 12 deletions src/app/dashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,34 @@ export const Dashboard = ({ state }: LayoutPageProps) => {
};

const appStop = async (job: AppJob) => {
const app = (apps || []).find((ap) => ap.job.id === job.id) || {
job,
questions: [] as any,
};
const app = job
? (apps || []).find((ap) => ap?.job?.id === job?.id) || {
job,
questions: [] as any,
}
: null;

await (window as any).api.invoke("app:stop", app);
};

const skipJob = async (job: AppJob) => {
const app = (apps || []).find((ap) => ap.job.id === job.id) || {
job,
questions: [] as any,
};
const app = job
? (apps || []).find((ap) => ap.job.id === job.id) || {
job,
questions: [] as any,
}
: null;

await (window as any).api.invoke("app:skip", app);
};

const moveToCompleted = async (job: AppJob) => {
const app = (apps || []).find((ap) => ap.job.id === job.id) || {
job,
questions: [] as any,
};
const app = job
? (apps || []).find((ap) => ap.job.id === job.id) || {
job,
questions: [] as any,
}
: null;
await (window as any).api.invoke("app:complete", app);
};

Expand Down

0 comments on commit f455d56

Please sign in to comment.