diff --git a/src/CqlBuilderPanel/definitionsSection/Definitions.scss b/src/CqlBuilderPanel/definitionsSection/Definitions.scss index a554014..1ff9ba7 100644 --- a/src/CqlBuilderPanel/definitionsSection/Definitions.scss +++ b/src/CqlBuilderPanel/definitionsSection/Definitions.scss @@ -84,3 +84,10 @@ float: right; } } + +#definitions-tbl { + tr > td { + padding: 10px; + border-bottom: 1px solid #8c8c8c; + } +} diff --git a/src/CqlBuilderPanel/definitionsSection/DefinitionsSection.tsx b/src/CqlBuilderPanel/definitionsSection/DefinitionsSection.tsx index a7aae46..b266595 100644 --- a/src/CqlBuilderPanel/definitionsSection/DefinitionsSection.tsx +++ b/src/CqlBuilderPanel/definitionsSection/DefinitionsSection.tsx @@ -58,30 +58,28 @@ export default function DefinitionsSection({ definitionCount={measureDefinitions.length} loading={loading} /> -
- {activeTab === "definition" && ( - - )} - {activeTab === "saved-definitions" && ( - - )} -
+ {activeTab === "definition" && ( + + )} + {activeTab === "saved-definitions" && ( + + )} ); } diff --git a/src/CqlBuilderPanel/definitionsSection/definitions/Definitions.tsx b/src/CqlBuilderPanel/definitionsSection/definitions/Definitions.tsx index 6212631..74f8578 100644 --- a/src/CqlBuilderPanel/definitionsSection/definitions/Definitions.tsx +++ b/src/CqlBuilderPanel/definitionsSection/definitions/Definitions.tsx @@ -19,10 +19,10 @@ import BorderColorOutlinedIcon from "@mui/icons-material/BorderColorOutlined"; import ToolTippedIcon from "../../../toolTippedIcon/ToolTippedIcon"; import { CqlBuilderLookup, Lookup } from "../../../model/CqlBuilderLookup"; import DefinitionBuilderDialog from "../definitionBuilderDialog/DefinitionBuilderDialog"; -import { Stack, Tooltip, Typography } from "@mui/material"; +import { Stack } from "@mui/material"; const TH = tw.th`p-3 text-left text-sm font-bold capitalize`; -const TD = tw.td`p-3 text-left text-sm break-all`; +const TD = tw.td`p-3 text-left text-sm w-1/2`; type DefinitionsPropTypes = { canEdit: boolean; @@ -230,70 +230,57 @@ const Definitions = ({ {row.getVisibleCells().map((cell) => ( - {cell.column.id === "comment" ? ( -
- - {cell.getValue()} -
- } - > - {cell.getValue()} - - - ) : ( - flexRender(cell.column.columnDef.cell, cell.getContext()) - )} + {flexRender(cell.column.columnDef.cell, cell.getContext())} ))} ))} {loading && ( -
- - - -
+ + + + + + + )} - { - handleDefinitionDelete(selectedDefinition); - setDeleteDialogOpen(false); - }} - onClose={() => setDeleteDialogOpen(false)} - dialogTitle="Are you sure?" - name={"this Definition"} - /> - { - resetCql(); - if (discardDialog?.operation === "delete") { - setDiscardDialog({ - open: false, - operation: "delete", - }); - setDeleteDialogOpen(true); - } else if (discardDialog?.operation === "edit") { - setDiscardDialog({ - open: false, - operation: "edit", - }); - setOpenDefinitionDialog(true); - } - }} - onClose={() => { + + { + handleDefinitionDelete(selectedDefinition); + setDeleteDialogOpen(false); + }} + onClose={() => setDeleteDialogOpen(false)} + dialogTitle="Are you sure?" + name={"this Definition"} + /> + { + resetCql(); + if (discardDialog?.operation === "delete") { setDiscardDialog({ open: false, - operation: null, + operation: "delete", }); - }} - /> - + setDeleteDialogOpen(true); + } else if (discardDialog?.operation === "edit") { + setDiscardDialog({ + open: false, + operation: "edit", + }); + setOpenDefinitionDialog(true); + } + }} + onClose={() => { + setDiscardDialog({ + open: false, + operation: null, + }); + }} + />