diff --git a/plane-src/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/properties.tsx b/plane-src/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/properties.tsx index 0a604b0..fea5ad8 100644 --- a/plane-src/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/properties.tsx +++ b/plane-src/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/properties.tsx @@ -215,7 +215,7 @@ export const SubIssuesListItemProperties = observer(function SubIssuesListItemPr
issue.project_id && diff --git a/plane-src/apps/web/core/components/issues/issue-detail/sidebar.tsx b/plane-src/apps/web/core/components/issues/issue-detail/sidebar.tsx index 14e02b3..536fbcf 100644 --- a/plane-src/apps/web/core/components/issues/issue-detail/sidebar.tsx +++ b/plane-src/apps/web/core/components/issues/issue-detail/sidebar.tsx @@ -81,6 +81,7 @@ export const IssueDetailsSidebar = observer(function IssueDetailsSidebar(props: const maxDate = issue.target_date ? getDate(issue.target_date) : null; maxDate?.setDate(maxDate.getDate()); + const assigneeIds = issue.assignee_ids ?? []; return ( <> @@ -105,17 +106,17 @@ export const IssueDetailsSidebar = observer(function IssueDetailsSidebar(props: issueOperations.update(workspaceSlug, projectId, issueId, { assignee_ids: val })} disabled={!isEditable} projectId={projectId?.toString() ?? ""} placeholder={t("issue.add.assignee")} multiple - buttonVariant={issue?.assignee_ids?.length > 1 ? "transparent-without-text" : "transparent-with-text"} + buttonVariant={assigneeIds.length > 1 ? "transparent-without-text" : "transparent-with-text"} className="group w-full grow" buttonContainerClassName="w-full text-left h-7.5" - buttonClassName={`text-body-xs-regular justify-between ${issue?.assignee_ids?.length > 0 ? "" : "text-placeholder"}`} - hideIcon={issue.assignee_ids?.length === 0} + buttonClassName={`text-body-xs-regular justify-between ${assigneeIds.length > 0 ? "" : "text-placeholder"}`} + hideIcon={assigneeIds.length === 0} dropdownArrow dropdownArrowClassName="h-3.5 w-3.5 hidden group-hover:inline" /> diff --git a/plane-src/apps/web/core/components/issues/issue-layouts/issue-layout-HOC.tsx b/plane-src/apps/web/core/components/issues/issue-layouts/issue-layout-HOC.tsx index 2750f4b..0a895ca 100644 --- a/plane-src/apps/web/core/components/issues/issue-layouts/issue-layout-HOC.tsx +++ b/plane-src/apps/web/core/components/issues/issue-layouts/issue-layout-HOC.tsx @@ -52,6 +52,10 @@ export const IssueLayoutHOC = observer(function IssueLayoutHOC(props: Props) { const { issues } = useIssues(storeType); useIssueRealtimeEvents(storeType, workspaceSlug?.toString(), projectId?.toString()); + if (!issues) { + return ; + } + const issueCount = issues.getGroupIssueCount(undefined, undefined, false); if (issues?.getIssueLoader() === "init-loader" || issueCount === undefined) { diff --git a/plane-src/apps/web/core/components/issues/issue-layouts/kanban/base-kanban-root.tsx b/plane-src/apps/web/core/components/issues/issue-layouts/kanban/base-kanban-root.tsx index 9b05c88..274051c 100644 --- a/plane-src/apps/web/core/components/issues/issue-layouts/kanban/base-kanban-root.tsx +++ b/plane-src/apps/web/core/components/issues/issue-layouts/kanban/base-kanban-root.tsx @@ -268,6 +268,10 @@ export const BaseKanBanRoot = observer(function BaseKanBanRoot(props: IBaseKanBa const collapsedGroups = issuesFilter?.issueFilters?.kanbanFilters || { group_by: [], sub_group_by: [] }; + if (!issues) { + return null; + } + return ( <> 0; + const assigneeIds = issue.assignee_ids ?? []; const cornerControlClasses = cn( "flex h-12 w-12 -translate-x-0.5 -translate-y-0.5 items-center justify-center rounded-full border bg-transparent shadow-none ring-0 transition-colors outline-none", isActive @@ -246,7 +247,7 @@ export const InternalContourKanbanCard = observer(function InternalContourKanban <> updateIssue?.(issue.project_id ?? null, issue.id, { assignee_ids: assigneeIds })} disabled={isReadOnly || !updateIssue} multiple @@ -261,7 +262,7 @@ export const InternalContourKanbanCard = observer(function InternalContourKanban isActive ? "text-[rgb(var(--nodedc-on-card-active-rgb))]" : "text-white" )} > - +
} /> diff --git a/plane-src/apps/web/core/components/issues/issue-layouts/properties/all-properties.tsx b/plane-src/apps/web/core/components/issues/issue-layouts/properties/all-properties.tsx index 0b8f1bb..c2fcb04 100644 --- a/plane-src/apps/web/core/components/issues/issue-layouts/properties/all-properties.tsx +++ b/plane-src/apps/web/core/components/issues/issue-layouts/properties/all-properties.tsx @@ -191,6 +191,7 @@ export const IssueProperties = observer(function IssueProperties(props: IIssuePr ); const defaultLabelOptions = issue?.label_ids?.map((id) => labelMap[id]) || []; + const assigneeIds = issue.assignee_ids ?? []; const minDate = getDate(issue.start_date); const maxDate = getDate(issue.target_date); @@ -365,13 +366,13 @@ export const IssueProperties = observer(function IssueProperties(props: IIssuePr > 0 ? "transparent-without-text" : "border-without-text"} - buttonClassName={issue.assignee_ids?.length > 0 ? "hover:bg-transparent px-0" : ""} - showTooltip={issue?.assignee_ids?.length === 0} + buttonVariant={assigneeIds.length > 0 ? "transparent-without-text" : "border-without-text"} + buttonClassName={assigneeIds.length > 0 ? "hover:bg-transparent px-0" : ""} + showTooltip={assigneeIds.length === 0} placeholder={t("common.assignees")} optionsClassName="z-10" tooltipContent="" diff --git a/plane-src/apps/web/core/components/issues/peek-overview/properties.tsx b/plane-src/apps/web/core/components/issues/peek-overview/properties.tsx index 67af20c..f40340a 100644 --- a/plane-src/apps/web/core/components/issues/peek-overview/properties.tsx +++ b/plane-src/apps/web/core/components/issues/peek-overview/properties.tsx @@ -77,6 +77,7 @@ export const PeekOverviewProperties = observer(function PeekOverviewProperties(p const maxDate = getDate(issue.target_date); maxDate?.setDate(maxDate.getDate()); + const assigneeIds = issue.assignee_ids ?? []; return (
@@ -99,17 +100,17 @@ export const PeekOverviewProperties = observer(function PeekOverviewProperties(p issueOperations.update(workspaceSlug, projectId, issueId, { assignee_ids: val })} disabled={disabled} projectId={projectId} placeholder={t("issue.add.assignee")} multiple - buttonVariant={issue?.assignee_ids?.length > 1 ? "transparent-without-text" : "transparent-with-text"} + buttonVariant={assigneeIds.length > 1 ? "transparent-without-text" : "transparent-with-text"} className="group w-full grow" buttonContainerClassName="w-full text-left h-7.5" - buttonClassName={`text-body-xs-medium justify-between ${issue?.assignee_ids?.length > 0 ? "" : "text-placeholder"}`} - hideIcon={issue.assignee_ids?.length === 0} + buttonClassName={`text-body-xs-medium justify-between ${assigneeIds.length > 0 ? "" : "text-placeholder"}`} + hideIcon={assigneeIds.length === 0} dropdownArrow dropdownArrowClassName="h-3.5 w-3.5 hidden group-hover:inline" /> diff --git a/plane-src/apps/web/core/components/issues/relations/properties.tsx b/plane-src/apps/web/core/components/issues/relations/properties.tsx index 0342d8c..9ebc92e 100644 --- a/plane-src/apps/web/core/components/issues/relations/properties.tsx +++ b/plane-src/apps/web/core/components/issues/relations/properties.tsx @@ -81,7 +81,7 @@ export const RelationIssueProperty = observer(function RelationIssueProperty(pro
labelMap[id]) || []; + const assigneeIds = issue.assignee_ids ?? []; const minDate = getDate(issue.start_date); minDate?.setDate(minDate.getDate()); @@ -222,12 +223,12 @@ export const DraftIssueProperties = observer(function DraftIssueProperties(props
0 ? "transparent-without-text" : "border-without-text"} - buttonClassName={issue.assignee_ids?.length > 0 ? "hover:bg-transparent px-0" : ""} - showTooltip={issue?.assignee_ids?.length === 0} + buttonVariant={assigneeIds.length > 0 ? "transparent-without-text" : "border-without-text"} + buttonClassName={assigneeIds.length > 0 ? "hover:bg-transparent px-0" : ""} + showTooltip={assigneeIds.length === 0} placeholder={t("assignees")} optionsClassName="z-10" tooltipContent=""