feature/IO-3255-simplified-parts-management - Soft Deletes
This commit is contained in:
@@ -102,6 +102,18 @@ const DELETE_JOBLINES_BY_IDS = `
|
||||
}
|
||||
`;
|
||||
|
||||
// Soft delete joblines by marking removed=true instead of hard-deleting
|
||||
const SOFT_DELETE_JOBLINES_BY_IDS = `
|
||||
mutation SoftDeleteJoblinesByIds($jobid: uuid!, $unqSeqs: [Int!]!) {
|
||||
update_joblines(
|
||||
where: { jobid: { _eq: $jobid }, unq_seq: { _in: $unqSeqs } },
|
||||
_set: { removed: true }
|
||||
) {
|
||||
affected_rows
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const INSERT_JOBLINES = `
|
||||
mutation InsertJoblines($joblines: [joblines_insert_input!]!) {
|
||||
insert_joblines(objects: $joblines) {
|
||||
@@ -243,6 +255,7 @@ module.exports = {
|
||||
UPSERT_JOBLINES,
|
||||
DELETE_JOBLINES_BY_JOBID,
|
||||
DELETE_JOBLINES_BY_IDS,
|
||||
SOFT_DELETE_JOBLINES_BY_IDS,
|
||||
INSERT_JOBLINES,
|
||||
CHECK_EXTERNAL_SHOP_ID,
|
||||
CREATE_SHOP,
|
||||
|
||||
Reference in New Issue
Block a user