diff --git a/src/frontend/src/components/ui/table.tsx b/src/frontend/src/components/ui/table.tsx index f87134a25..d41309e8b 100644 --- a/src/frontend/src/components/ui/table.tsx +++ b/src/frontend/src/components/ui/table.tsx @@ -1,5 +1,5 @@ -import * as React from "react" -import { cn } from "./lib/utils" +import * as React from "react"; +import { cn } from "./lib/utils"; const Table = React.forwardRef< HTMLTableElement, @@ -12,16 +12,16 @@ const Table = React.forwardRef< {...props} /> -)) -Table.displayName = "Table" +)); +Table.displayName = "Table"; const TableHeader = React.forwardRef< HTMLTableSectionElement, React.HTMLAttributes >(({ className, ...props }, ref) => ( -)) -TableHeader.displayName = "TableHeader" +)); +TableHeader.displayName = "TableHeader"; const TableBody = React.forwardRef< HTMLTableSectionElement, @@ -32,8 +32,8 @@ const TableBody = React.forwardRef< className={cn("[&_tr:last-child]:border-0", className)} {...props} /> -)) -TableBody.displayName = "TableBody" +)); +TableBody.displayName = "TableBody"; const TableFooter = React.forwardRef< HTMLTableSectionElement, @@ -44,8 +44,8 @@ const TableFooter = React.forwardRef< className={cn("bg-primary font-medium text-primary-foreground", className)} {...props} /> -)) -TableFooter.displayName = "TableFooter" +)); +TableFooter.displayName = "TableFooter"; const TableRow = React.forwardRef< HTMLTableRowElement, @@ -59,8 +59,8 @@ const TableRow = React.forwardRef< )} {...props} /> -)) -TableRow.displayName = "TableRow" +)); +TableRow.displayName = "TableRow"; const TableHead = React.forwardRef< HTMLTableCellElement, @@ -74,8 +74,8 @@ const TableHead = React.forwardRef< )} {...props} /> -)) -TableHead.displayName = "TableHead" +)); +TableHead.displayName = "TableHead"; const TableCell = React.forwardRef< HTMLTableCellElement, @@ -86,8 +86,8 @@ const TableCell = React.forwardRef< className={cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)} {...props} /> -)) -TableCell.displayName = "TableCell" +)); +TableCell.displayName = "TableCell"; const TableCaption = React.forwardRef< HTMLTableCaptionElement, @@ -98,8 +98,8 @@ const TableCaption = React.forwardRef< className={cn("mt-4 text-sm text-muted-foreground", className)} {...props} /> -)) -TableCaption.displayName = "TableCaption" +)); +TableCaption.displayName = "TableCaption"; export { Table, @@ -110,4 +110,4 @@ export { TableRow, TableCell, TableCaption, -} +}; diff --git a/src/frontend/src/modals/EditNodeModal/index.tsx b/src/frontend/src/modals/EditNodeModal/index.tsx index f3cc213d2..62232321c 100644 --- a/src/frontend/src/modals/EditNodeModal/index.tsx +++ b/src/frontend/src/modals/EditNodeModal/index.tsx @@ -8,11 +8,7 @@ import { import { Fragment, useContext, useEffect, useRef, useState } from "react"; import { PopUpContext } from "../../contexts/popUpContext"; import { NodeDataType } from "../../types/flow"; -import { - classNames, - limitScrollFieldsModal, - nodeIcons, -} from "../../utils"; +import { classNames, limitScrollFieldsModal, nodeIcons } from "../../utils"; import { typesContext } from "../../contexts/typesContext"; import { Table, @@ -22,7 +18,7 @@ import { TableHead, TableHeader, TableRow, -} from "../../components/ui/table" +} from "../../components/ui/table"; const invoices = [ { @@ -67,7 +63,7 @@ const invoices = [ totalAmount: "$300.00", paymentMethod: "Credit Card", }, -] +]; export default function EditNodeModal({ data }: { data: NodeDataType }) { const [open, setOpen] = useState(true); @@ -84,7 +80,7 @@ export default function EditNodeModal({ data }: { data: NodeDataType }) { } const [advanced, setAdvanced] = useState([]); const [parameters, setParameters] = useState([]); - const [enabled, setEnabled] = useState(false) + const [enabled, setEnabled] = useState(false); const updateAdvancedParameters = () => { setAdvanced( @@ -112,13 +108,13 @@ export default function EditNodeModal({ data }: { data: NodeDataType }) { ) ); }; - + useEffect(() => { updateAdvancedParameters(); }, [data.node.template]); console.log("DATA", data.node.template); - + const Icon = nodeIcons[types[data.type]]; return ( @@ -203,88 +199,113 @@ export default function EditNodeModal({ data }: { data: NodeDataType }) { )} >
+ + + A list of your recent invoices. + + + + + Invoice + + Status + Method + + Amount + + + + + {invoices.map((invoice) => ( + + + {invoice.invoice} + + {invoice.paymentStatus} + {invoice.paymentMethod} + + {invoice.totalAmount} + + + ))} + +
- - - A list of your recent invoices. - - - Invoice - Status - Method - Amount - - - - {invoices.map((invoice) => ( - - {invoice.invoice} - {invoice.paymentStatus} - {invoice.paymentMethod} - {invoice.totalAmount} - - ))} - -
- - - - - - - - - - - - - { - Object.keys(data.node.template).filter( - (t) => - t.charAt(0) !== "_" - ).map((n, i) => ( - - - - - - ))} - - -
- Param - - Value - - Show -
- {data.node.template[n].name ? data.node.template[n].name : data.node.template[n].display_name } - {data.node.template[n].value ? data.node.template[n].value : '-'} - - Use setting - - -
- + + + + + + + + + + {Object.keys(data.node.template) + .filter((t) => t.charAt(0) !== "_") + .map((n, i) => ( + + + + + + ))} + +
+ Param + + Value + + Show +
+ {data.node.template[n].name + ? data.node.template[n].name + : data.node.template[n].display_name} + + {data.node.template[n].value + ? data.node.template[n].value + : "-"} + + + + Use setting + + +