@@ -1,79 +1,79 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const INSERT_NEW_NOTE = gql`
|
||||
mutation INSERT_NEW_NOTE($noteInput: [notes_insert_input!]!) {
|
||||
insert_notes(objects: $noteInput) {
|
||||
returning {
|
||||
created_at
|
||||
created_by
|
||||
critical
|
||||
id
|
||||
jobid
|
||||
private
|
||||
text
|
||||
updated_at
|
||||
audit
|
||||
type
|
||||
}
|
||||
mutation INSERT_NEW_NOTE($noteInput: [notes_insert_input!]!) {
|
||||
insert_notes(objects: $noteInput) {
|
||||
returning {
|
||||
created_at
|
||||
created_by
|
||||
critical
|
||||
id
|
||||
jobid
|
||||
private
|
||||
text
|
||||
updated_at
|
||||
audit
|
||||
type
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_NOTES_BY_JOB_PK = gql`
|
||||
query QUERY_NOTES_BY_JOB_PK($id: uuid!) {
|
||||
jobs_by_pk(id: $id) {
|
||||
id
|
||||
ro_number
|
||||
vehicle {
|
||||
jobs {
|
||||
id
|
||||
ro_number
|
||||
status
|
||||
clm_no
|
||||
query QUERY_NOTES_BY_JOB_PK($id: uuid!) {
|
||||
jobs_by_pk(id: $id) {
|
||||
id
|
||||
ro_number
|
||||
vehicle {
|
||||
jobs {
|
||||
id
|
||||
ro_number
|
||||
status
|
||||
clm_no
|
||||
}
|
||||
}
|
||||
notes {
|
||||
created_at
|
||||
created_by
|
||||
critical
|
||||
id
|
||||
jobid
|
||||
private
|
||||
text
|
||||
updated_at
|
||||
audit
|
||||
type
|
||||
}
|
||||
}
|
||||
}
|
||||
notes {
|
||||
created_at
|
||||
created_by
|
||||
critical
|
||||
id
|
||||
jobid
|
||||
private
|
||||
text
|
||||
updated_at
|
||||
audit
|
||||
type
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_NOTE = gql`
|
||||
mutation UPDATE_NOTE($noteId: uuid!, $note: notes_set_input!) {
|
||||
update_notes(where: { id: { _eq: $noteId } }, _set: $note) {
|
||||
returning {
|
||||
id
|
||||
created_at
|
||||
created_by
|
||||
critical
|
||||
id
|
||||
jobid
|
||||
private
|
||||
text
|
||||
updated_at
|
||||
audit
|
||||
type
|
||||
}
|
||||
mutation UPDATE_NOTE($noteId: uuid!, $note: notes_set_input!) {
|
||||
update_notes(where: { id: { _eq: $noteId } }, _set: $note) {
|
||||
returning {
|
||||
id
|
||||
created_at
|
||||
created_by
|
||||
critical
|
||||
id
|
||||
jobid
|
||||
private
|
||||
text
|
||||
updated_at
|
||||
audit
|
||||
type
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_NOTE = gql`
|
||||
mutation DELETE_NOTE($noteId: uuid!) {
|
||||
delete_notes(where: { id: { _eq: $noteId } }) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation DELETE_NOTE($noteId: uuid!) {
|
||||
delete_notes(where: { id: { _eq: $noteId } }) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user