feature/IO-3096-GlobalNotifications - Watchers - First revision.
This commit is contained in:
@@ -524,6 +524,9 @@ export const GET_JOB_BY_PK = gql`
|
||||
invoice_final_note
|
||||
iouparent
|
||||
job_totals
|
||||
job_watchers {
|
||||
user_email
|
||||
}
|
||||
joblines(where: { removed: { _eq: false } }, order_by: { line_no: asc }) {
|
||||
act_price
|
||||
act_price_before_ppc
|
||||
@@ -2566,3 +2569,30 @@ export const GET_JOB_BY_PK_QUICK_INTAKE = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_JOB_WATCHERS = gql`
|
||||
query GET_JOB_WATCHERS($jobid: uuid!) {
|
||||
job_watchers(where: { jobid: { _eq: $jobid } }) {
|
||||
id
|
||||
user_email
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const ADD_JOB_WATCHER = gql`
|
||||
mutation ADD_JOB_WATCHER($jobid: uuid!, $userEmail: String!) {
|
||||
insert_job_watchers_one(object: { jobid: $jobid, user_email: $userEmail }) {
|
||||
id
|
||||
jobid
|
||||
user_email
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const REMOVE_JOB_WATCHER = gql`
|
||||
mutation REMOVE_JOB_WATCHER($jobid: uuid!, $userEmail: String!) {
|
||||
delete_job_watchers(where: { jobid: { _eq: $jobid }, user_email: { _eq: $userEmail } }) {
|
||||
affected_rows
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user