diff --git a/web/components/issues/issue-detail/main-content.tsx b/web/components/issues/issue-detail/main-content.tsx index 92e72c63a..541dd1f3e 100644 --- a/web/components/issues/issue-detail/main-content.tsx +++ b/web/components/issues/issue-detail/main-content.tsx @@ -24,11 +24,12 @@ type Props = { issueId: string; issueOperations: TIssueOperations; isEditable: boolean; + isArchived: boolean; swrIssueDetails: TIssue | null | undefined; }; export const IssueMainContent: React.FC = observer((props) => { - const { workspaceSlug, projectId, issueId, issueOperations, isEditable, swrIssueDetails } = props; + const { workspaceSlug, projectId, issueId, issueOperations, isEditable, isArchived, swrIssueDetails } = props; // states const [isSubmitting, setIsSubmitting] = useState<"submitting" | "submitted" | "saved">("saved"); // hooks @@ -105,6 +106,7 @@ export const IssueMainContent: React.FC = observer((props) => { projectId={projectId} issueId={issueId} currentUser={currentUser} + disabled={isArchived} /> )} @@ -126,7 +128,7 @@ export const IssueMainContent: React.FC = observer((props) => { disabled={!isEditable} /> - + ); }); diff --git a/web/components/issues/issue-detail/root.tsx b/web/components/issues/issue-detail/root.tsx index 14a0a8eb5..f9e3c83f7 100644 --- a/web/components/issues/issue-detail/root.tsx +++ b/web/components/issues/issue-detail/root.tsx @@ -365,6 +365,7 @@ export const IssueDetailRoot: FC = observer((props) => { issueId={issueId} issueOperations={issueOperations} isEditable={!is_archived && isEditable} + isArchived={is_archived} />
void; } export const PeekOverviewIssueDetails: FC = observer((props) => { - const { workspaceSlug, issueId, issueOperations, disabled, isSubmitting, setIsSubmitting } = props; + const { workspaceSlug, issueId, issueOperations, disabled, isArchived, isSubmitting, setIsSubmitting } = props; // store hooks const { getProjectById } = useProject(); const { currentUser } = useUser(); @@ -88,7 +89,7 @@ export const PeekOverviewIssueDetails: FC = observer( projectId={issue.project_id} issueId={issueId} currentUser={currentUser} - disabled={disabled} + disabled={isArchived} /> )}
diff --git a/web/components/issues/peek-overview/view.tsx b/web/components/issues/peek-overview/view.tsx index 37f92134d..aaa150674 100644 --- a/web/components/issues/peek-overview/view.tsx +++ b/web/components/issues/peek-overview/view.tsx @@ -157,6 +157,7 @@ export const IssueView: FC = observer((props) => { issueId={issueId} issueOperations={issueOperations} disabled={disabled || is_archived} + isArchived={is_archived} isSubmitting={isSubmitting} setIsSubmitting={(value) => setIsSubmitting(value)} /> @@ -190,7 +191,7 @@ export const IssueView: FC = observer((props) => { workspaceSlug={workspaceSlug} projectId={projectId} issueId={issueId} - disabled={disabled || is_archived} + disabled={is_archived} /> ) : ( @@ -203,6 +204,7 @@ export const IssueView: FC = observer((props) => { issueId={issueId} issueOperations={issueOperations} disabled={disabled || is_archived} + isArchived={is_archived} isSubmitting={isSubmitting} setIsSubmitting={(value) => setIsSubmitting(value)} /> @@ -228,7 +230,7 @@ export const IssueView: FC = observer((props) => { workspaceSlug={workspaceSlug} projectId={projectId} issueId={issueId} - disabled={disabled || is_archived} + disabled={is_archived} />