- the great reformat

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-02-06 18:20:58 -05:00
parent 30c530bcc4
commit e83badb454
912 changed files with 108516 additions and 107493 deletions

View File

@@ -1,97 +1,97 @@
import { gql } from "@apollo/client";
import {gql} from "@apollo/client";
export const QUERY_SURVEY = gql`
query QUERY_SURVEY($surveyId: uuid!) {
csi_by_pk(id: $surveyId) {
relateddata
valid
validuntil
id
csiquestion {
id
config
}
query QUERY_SURVEY($surveyId: uuid!) {
csi_by_pk(id: $surveyId) {
relateddata
valid
validuntil
id
csiquestion {
id
config
}
}
}
}
`;
export const COMPLETE_SURVEY = gql`
mutation COMPLETE_SURVEY($surveyId: uuid!, $survey: csi_set_input) {
update_csi(where: { id: { _eq: $surveyId } }, _set: $survey) {
affected_rows
mutation COMPLETE_SURVEY($surveyId: uuid!, $survey: csi_set_input) {
update_csi(where: { id: { _eq: $surveyId } }, _set: $survey) {
affected_rows
}
}
}
`;
export const GET_ALL_QUESTION_SETS = gql`
query GET_ALL_QUESTION_SETS {
csiquestions(order_by: { created_at: desc }) {
id
created_at
config
current
csis_aggregate {
aggregate {
count
query GET_ALL_QUESTION_SETS {
csiquestions(order_by: { created_at: desc }) {
id
created_at
config
current
csis_aggregate {
aggregate {
count
}
}
}
}
}
}
`;
export const GET_CURRENT_QUESTIONSET_ID = gql`
query GET_CURRENT_QUESTIONSET_ID {
csiquestions(where: { current: { _eq: true } }) {
id
query GET_CURRENT_QUESTIONSET_ID {
csiquestions(where: { current: { _eq: true } }) {
id
}
}
}
`;
export const INSERT_CSI = gql`
mutation INSERT_CSI($csiInput: [csi_insert_input!]!) {
insert_csi(objects: $csiInput) {
returning {
id
}
mutation INSERT_CSI($csiInput: [csi_insert_input!]!) {
insert_csi(objects: $csiInput) {
returning {
id
}
}
}
}
`;
export const QUERY_CSI_RESPONSE_PAGINATED = gql`
query QUERY_CSI_RESPONSE_PAGINATED(
$offset: Int
$limit: Int
$order: [csi_order_by!]!
) {
csi(offset: $offset, limit: $limit, order_by: $order) {
id
completedon
job {
ownr_fn
ownr_ln
ro_number
query QUERY_CSI_RESPONSE_PAGINATED(
$offset: Int
$limit: Int
$order: [csi_order_by!]!
) {
csi(offset: $offset, limit: $limit, order_by: $order) {
id
completedon
job {
ownr_fn
ownr_ln
ro_number
id
}
id
}
}
csi_aggregate {
aggregate {
count(distinct: true)
}
}
}
csi_aggregate {
aggregate {
count(distinct: true)
}
}
}
`;
export const QUERY_CSI_RESPONSE_BY_PK = gql`
query QUERY_CSI_RESPONSE_BY_PK($id: uuid!) {
csi_by_pk(id: $id) {
relateddata
valid
validuntil
id
response
csiquestion {
id
config
}
query QUERY_CSI_RESPONSE_BY_PK($id: uuid!) {
csi_by_pk(id: $id) {
relateddata
valid
validuntil
id
response
csiquestion {
id
config
}
}
}
}
`;