mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
optionally chain sub issue count (#4585)
This commit is contained in:
parent
c7996544b4
commit
f0ece1c6b7
@ -68,7 +68,7 @@ export const IssueBlock = observer((props: IssueBlockProps) => {
|
|||||||
setPeekIssue({ workspaceSlug, projectId: issue.project_id, issueId: issue.id, nestingLevel: nestingLevel });
|
setPeekIssue({ workspaceSlug, projectId: issue.project_id, issueId: issue.id, nestingLevel: nestingLevel });
|
||||||
|
|
||||||
const issue = issuesMap[issueId];
|
const issue = issuesMap[issueId];
|
||||||
const subIssuesCount = issue.sub_issues_count;
|
const subIssuesCount = issue?.sub_issues_count ?? 0;
|
||||||
|
|
||||||
const { isMobile } = usePlatformOS();
|
const { isMobile } = usePlatformOS();
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
|
|||||||
const currentLayout = `${activeLayout} layout`;
|
const currentLayout = `${activeLayout} layout`;
|
||||||
// derived values
|
// derived values
|
||||||
const stateDetails = getStateById(issue.state_id);
|
const stateDetails = getStateById(issue.state_id);
|
||||||
const subIssueCount = issue.sub_issues_count;
|
const subIssueCount = issue?.sub_issues_count ?? 0;
|
||||||
|
|
||||||
const issueOperations = useMemo(
|
const issueOperations = useMemo(
|
||||||
() => ({
|
() => ({
|
||||||
|
@ -19,7 +19,7 @@ export const SpreadsheetSubIssueColumn: React.FC<Props> = observer((props: Props
|
|||||||
// hooks
|
// hooks
|
||||||
const { workspaceSlug } = useAppRouter();
|
const { workspaceSlug } = useAppRouter();
|
||||||
// derived values
|
// derived values
|
||||||
const subIssueCount = issue.sub_issues_count;
|
const subIssueCount = issue?.sub_issues_count ?? 0;
|
||||||
|
|
||||||
const redirectToIssueDetail = () => {
|
const redirectToIssueDetail = () => {
|
||||||
router.push({
|
router.push({
|
||||||
|
@ -203,7 +203,7 @@ const IssueRowDetails = observer((props: IssueRowDetailsProps) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const disableUserActions = !canEditProperties(issueDetail.project_id);
|
const disableUserActions = !canEditProperties(issueDetail.project_id);
|
||||||
const subIssuesCount = issueDetail.sub_issues_count;
|
const subIssuesCount = issueDetail?.sub_issues_count ?? 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
@ -61,7 +61,7 @@ export const IssueListItem: React.FC<ISubIssues> = observer((props) => {
|
|||||||
undefined;
|
undefined;
|
||||||
|
|
||||||
const subIssueHelpers = subIssueHelpersByIssueId(parentIssueId);
|
const subIssueHelpers = subIssueHelpersByIssueId(parentIssueId);
|
||||||
const subIssueCount = issue?.sub_issues_count || 0;
|
const subIssueCount = issue?.sub_issues_count ?? 0;
|
||||||
|
|
||||||
const handleIssuePeekOverview = (issue: TIssue) =>
|
const handleIssuePeekOverview = (issue: TIssue) =>
|
||||||
workspaceSlug &&
|
workspaceSlug &&
|
||||||
|
Loading…
Reference in New Issue
Block a user