Add job status changer.

This commit is contained in:
Patrick Fic
2025-10-28 15:32:13 -07:00
parent 9f65ca3c2f
commit 22ce0a4703
7 changed files with 223 additions and 25 deletions

View File

@@ -430,6 +430,7 @@ export const UPDATE_JOB_STATUS = gql`
update_jobs(where: { id: { _eq: $jobId } }, _set: { status: $status }) {
returning {
id
status
}
}
}
@@ -886,9 +887,8 @@ export const generate_UPDATE_JOB_KANBAN = (
) => {
const oldChildQuery = `
updateOldChild: update_jobs(where: { id: { _eq: "${oldChildId}" } },
_set: {kanbanparent: ${
oldChildNewParent ? `"${oldChildNewParent}"` : null
}}) {
_set: {kanbanparent: ${oldChildNewParent ? `"${oldChildNewParent}"` : null
}}) {
returning {
id
kanbanparent
@@ -897,9 +897,8 @@ export const generate_UPDATE_JOB_KANBAN = (
const movedQuery = `
updateMovedChild: update_jobs(where: { id: { _eq: "${movedId}" } },
_set: {kanbanparent: ${
movedNewParent ? `"${movedNewParent}"` : null
} , status: "${movedNewStatus}"}) {
_set: {kanbanparent: ${movedNewParent ? `"${movedNewParent}"` : null
} , status: "${movedNewStatus}"}) {
returning {
id
status