- Progress

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-04-16 15:36:27 -04:00
parent 34d773bcd8
commit bb205af019
8 changed files with 323 additions and 105 deletions

View File

@@ -2393,3 +2393,37 @@ exports.COMPLETE_SURVEY = `mutation COMPLETE_SURVEY($surveyId: uuid!, $survey: c
affected_rows
}
}`;
exports.QUERY_REMIND_TASKS = `
query QUERY_REMIND_TASKS($time: timestamptz!) {
tasks(
where: {
_and: [
{ remind_at: { _is_null: false } }
{ remind_at: { _lte: $time } }
{ remind_at_sent: { _is_null: true } }
]
}
) {
id
title
due_date
created_by
assigned_to
remind_at
remind_at_sent
priority
job {
id
ro_number
}
jobid
}
}
`;
exports.UPDATE_TASKS_REMIND_AT_SENT = `mutation UPDATE_TASK_REMIND_AT_SENT($taskIds: [uuid!]!, $now: timestamptz!) {
update_tasks_many(updates: {where: {id: {_in: $taskIds}}, _set: {remind_at_sent: $now}}) {
affected_rows
}
}`;