Skip to content

Commit

Permalink
Fix expandable disable on summary issue
Browse files Browse the repository at this point in the history
  • Loading branch information
puranban authored and AdityaKhatri committed Nov 9, 2023
1 parent 8b505d0 commit 763b2ed
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
Button,
Container,
TextInput,
Footer,
useAlert,
} from '@the-deep/deep-ui';
import { gql, useMutation } from '@apollo/client';
Expand Down Expand Up @@ -52,10 +51,10 @@ type Props = {
refetch: () => void;
} & ({
type: 'pillar';
subPillar?: AssessmentRegistrySummarySubPillarTypeEnum | null;
subPillar?: AssessmentRegistrySummarySubPillarTypeEnum;
} | {
type: 'dimension';
subDimension?: AssessmentRegistrySummarySubDimensionTypeEnum | null;
subDimension?: AssessmentRegistrySummarySubDimensionTypeEnum;
})

function AddSummaryIssueModal(props: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ const keySelector = (d: SummaryIssueType) => d.id;
function IssueItem(props: Props) {
const {
name,
data,
data: newData,
subPillar,
subDimension,
type,
} = props;

const data = removeNull(newData);
const [
showAddIssue,
setShowAddIssueTrue,
Expand Down Expand Up @@ -204,19 +204,21 @@ function IssueItem(props: Props) {
spacing="compact"
disabled={data.level === 3 || data.childCount === 0}
>
<ListView
className={styles.subIssue}
data={response?.results}
keySelector={keySelector}
renderer={IssueItem}
rendererParams={issueParams}
errored={false}
filtered={false}
pending={false}
messageShown
emptyIcon
emptyMessage="No issue found!"
/>
{data.childCount > 0 && (
<ListView
className={styles.subIssue}
data={response?.results}
keySelector={keySelector}
renderer={IssueItem}
rendererParams={issueParams}
errored={false}
filtered={false}
pending={false}
messageShown
emptyIcon
emptyMessage="No issue found!"
/>
)}
{showAddIssue && (
<AddSummaryIssueModal
type={type}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ function SubPillarItem(props: Props) {
spacing="compact"
onClick={setShowAddIssueTrue}
>
Add a Subpillar
ADD A SUBPILLAR
</Button>
)}
>
Expand Down

0 comments on commit 763b2ed

Please sign in to comment.