mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 10:27:09 +00:00
Add complete to line PATCH options.
`complete` is a boolean. If true, any virgin points remaining on the line will be marked as `ntba=true`. If false, *all* points on the line will be marked as `ntba=false`.
This commit is contained in:
@@ -7,6 +7,9 @@ async function patch (projectId, line, payload, opts = {}) {
|
||||
"remarks": "UPDATE preplot_lines SET remarks = $2 WHERE line = $1 AND class ='V';",
|
||||
"meta": "UPDATE preplot_lines SET meta = $2 WHERE line = $1 AND class ='V';",
|
||||
"ntba": "UPDATE preplot_lines SET ntba = $2 WHERE line = $1 AND class ='V';",
|
||||
"complete": "UPDATE preplot_points pp SET ntba = $2 FROM preplot_points_count ppc WHERE pp.line = ppc.line AND pp.point = ppc.point AND pp.line = $1 AND ($2 = false OR ppc.count = 0);"
|
||||
// NOTE on the "complete" query: if complete is true it sets *only* virgin points to NTBA=true,
|
||||
// but if complete is false it sets all points on the line to NTBA=false.
|
||||
};
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user