feature/IO-3255-simplified-parts-management - Checkpoint

This commit is contained in:
Dave Richer
2025-06-24 14:38:13 -04:00
parent cbb6c43ec3
commit 7d930045ef
2 changed files with 436 additions and 355 deletions

View File

@@ -0,0 +1,40 @@
// GraphQL Queries and Mutations
const GET_BODYSHOP_STATUS = `
query GetBodyshopStatus($id: uuid!) {
bodyshops_by_pk(id: $id) {
md_order_statuses
}
}
`;
const GET_VEHICLE_BY_SHOP_VIN = `
query GetVehicleByShopVin($shopid: uuid!, $v_vin: String!) {
vehicles(where: { shopid: { _eq: $shopid }, v_vin: { _eq: $v_vin } }, limit: 1) {
id
}
}
`;
const INSERT_OWNER = `
mutation InsertOwner($owner: owners_insert_input!) {
insert_owners_one(object: $owner) {
id
}
}
`;
const INSERT_JOB_WITH_LINES = `
mutation InsertJob($job: jobs_insert_input!) {
insert_jobs_one(object: $job) {
id
joblines { id unq_seq }
}
}
`;
module.exports = {
GET_BODYSHOP_STATUS,
GET_VEHICLE_BY_SHOP_VIN,
INSERT_OWNER,
INSERT_JOB_WITH_LINES
};