From 70e8df83b5c5969603aeb4380f8bacca673e89cd Mon Sep 17 00:00:00 2001
From: andreas-unleash <104830839+andreas-unleash@users.noreply.github.com>
Date: Mon, 25 Jul 2022 09:30:04 +0300
Subject: [PATCH] bug fix
---
.../ConstraintAccordionEditHeader.tsx | 2 +-
.../ConstraintAccordionHeaderActions.tsx | 15 +++++++++++----
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionEdit/ConstraintAccordionEditHeader/ConstraintAccordionEditHeader.tsx b/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionEdit/ConstraintAccordionEditHeader/ConstraintAccordionEditHeader.tsx
index b57f90c2d0..5edb1eb890 100644
--- a/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionEdit/ConstraintAccordionEditHeader/ConstraintAccordionEditHeader.tsx
+++ b/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionEdit/ConstraintAccordionEditHeader/ConstraintAccordionEditHeader.tsx
@@ -147,7 +147,7 @@ export const ConstraintAccordionEditHeader = ({
}
/>
-
+
);
};
diff --git a/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionHeaderActions/ConstraintAccordionHeaderActions.tsx b/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionHeaderActions/ConstraintAccordionHeaderActions.tsx
index a1022a9dff..c02fbcfdf2 100644
--- a/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionHeaderActions/ConstraintAccordionHeaderActions.tsx
+++ b/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionHeaderActions/ConstraintAccordionHeaderActions.tsx
@@ -2,15 +2,20 @@ import React from 'react';
import { IconButton, Tooltip } from '@mui/material';
import { Delete, Edit } from '@mui/icons-material';
import { useStyles } from '../ConstraintAccordion.styles';
+import {ConditionallyRender} from "../../ConditionallyRender/ConditionallyRender";
interface ConstraintAccordionHeaderActionsProps {
onDelete?: () => void;
onEdit?: () => void;
+ disableEdit?: boolean;
+ disableDelete?: boolean
}
export const ConstraintAccordionHeaderActions = ({
onEdit,
onDelete,
+ disableDelete = false,
+ disableEdit = false
}: ConstraintAccordionHeaderActionsProps) => {
const { classes: styles } = useStyles();
const onEditClick =
@@ -29,24 +34,26 @@ export const ConstraintAccordionHeaderActions = ({
return (
+
-
+ } />
+
-
+ } />
);
};