@@ -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
|
||||
}
|
||||
}`;
|
||||
|
||||
Reference in New Issue
Block a user