added advanced verification and removed show property from validation
This commit is contained in:
parent
38aa051bf9
commit
a3294c4fcf
3 changed files with 3 additions and 4 deletions
|
|
@ -66,7 +66,7 @@ export default function GenericNode({
|
|||
<div className=" absolute text-red-600 -top-2 -right-1">
|
||||
{Object.keys(data.node.template).some(
|
||||
(t) =>
|
||||
// data.node.template[t].advanced &&
|
||||
data.node.template[t].advanced &&
|
||||
data.node.template[t].required
|
||||
)
|
||||
? " *"
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ export default function Chat({ flow, reactFlowInstance }: ChatType) {
|
|||
return Object.keys(template).reduce(
|
||||
(errors: Array<string>, t) =>
|
||||
errors.concat(
|
||||
(template[t].required && template[t].show) &&
|
||||
(template[t].required) &&
|
||||
(template[t].value===undefined || template[t].value === "") &&
|
||||
!reactFlowInstance
|
||||
.getEdges()
|
||||
|
|
|
|||
|
|
@ -88,9 +88,8 @@ export default function NodeModal({ data }: { data: NodeDataType }) {
|
|||
<div className="overflow-hidden px-4 sm:p-4 w-full rounded-lg bg-white dark:bg-gray-800 shadow">
|
||||
<div className="flex flex-col h-full gap-5">
|
||||
{
|
||||
//&& data.node.template[t].advanced
|
||||
Object.keys(data.node.template)
|
||||
.filter((t) => t.charAt(0) !== "_")
|
||||
.filter((t) => t.charAt(0) !== "_"&& data.node.template[t].advanced)
|
||||
.map((t: string, idx) => {
|
||||
return (
|
||||
<ModalField
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue