fix: make join review read only
This commit is contained in:
@@ -177,6 +177,28 @@ function buildSchemaLinkingRequest({ id, phase, title, tables }) {
|
||||
};
|
||||
}
|
||||
|
||||
// Build a blocking, read-only join review. The reviewer can accept the complete
|
||||
// proposal or use Other to request a textual correction; individual joins are
|
||||
// deliberately not selectable because omitting one could create a Cartesian product.
|
||||
function buildJoinReviewRequest({ id, phase, title, options }) {
|
||||
requireString(title, "title", "join-review");
|
||||
const opts = requireArray(options, "options", "join-review");
|
||||
if (opts.length === 0) {
|
||||
throw new Error("builders: join-review requires at least one option");
|
||||
}
|
||||
return {
|
||||
type: "ui_request",
|
||||
id,
|
||||
phase,
|
||||
schema_version: SCHEMA_VERSION,
|
||||
widget: "join-review",
|
||||
title,
|
||||
options: [...opts],
|
||||
confirm_label: "Continue",
|
||||
reserved: RESERVED,
|
||||
};
|
||||
}
|
||||
|
||||
// Attach a child-widget spec to an option (linkage, §4.2). Returns the option.
|
||||
function withChildLinkage(option, widgetSpec) {
|
||||
option.opens = widgetSpec;
|
||||
@@ -190,6 +212,7 @@ module.exports = {
|
||||
buildInfoRequest,
|
||||
buildFreetextRequest,
|
||||
buildSchemaLinkingRequest,
|
||||
buildJoinReviewRequest,
|
||||
withChildLinkage,
|
||||
SCHEMA_VERSION,
|
||||
RESERVED,
|
||||
|
||||
Reference in New Issue
Block a user