This commit is contained in:
rizrmd 2024-07-20 07:02:30 +00:00
parent ac74e0770b
commit 9b0fcd40e8
1 changed files with 3 additions and 1 deletions

View File

@ -79,7 +79,8 @@ const get_layer = async (
default: v.default, default: v.default,
}), }),
label: k + (!v.optional && !v.default ? " *" : ""), label: k + (!v.optional && !v.default ? " *" : ""),
checked: v.is_pk, alt: v.type,
checked: v.is_pk && depth === 0,
}); });
} }
} }
@ -105,6 +106,7 @@ const get_layer = async (
optional: true, optional: true,
relation: { from, to }, relation: { from, to },
}), }),
alt: v.type === "has-many" ? `1-N` : `1-1`,
label: k, label: k,
options: r_rels, options: r_rels,
checked: false, checked: false,