diff --git a/apiserver/plane/app/views/workspace/draft.py b/apiserver/plane/app/views/workspace/draft.py index 5bd8c2dfae7..8930e871703 100644 --- a/apiserver/plane/app/views/workspace/draft.py +++ b/apiserver/plane/app/views/workspace/draft.py @@ -210,7 +210,7 @@ def retrieve(self, request, slug, pk=None): @allow_permission( allowed_roles=[ROLE.ADMIN], creator=True, - model=Issue, + model=DraftIssue, level="WORKSPACE", ) def destroy(self, request, slug, pk=None): diff --git a/packages/types/src/workspace-draft-issues/base.d.ts b/packages/types/src/workspace-draft-issues/base.d.ts index f0272defd5e..8090a9cb79b 100644 --- a/packages/types/src/workspace-draft-issues/base.d.ts +++ b/packages/types/src/workspace-draft-issues/base.d.ts @@ -26,6 +26,8 @@ export type TWorkspaceDraftIssue = { updated_by: string; is_draft: boolean; + + type_id: string; }; export type TWorkspaceDraftPaginationInfo = { diff --git a/packages/ui/src/header/helper.tsx b/packages/ui/src/header/helper.tsx index b6d76f8c6d6..13fee8b479f 100644 --- a/packages/ui/src/header/helper.tsx +++ b/packages/ui/src/header/helper.tsx @@ -10,9 +10,11 @@ export interface IHeaderProperties { } export const headerStyle: IHeaderProperties = { [EHeaderVariant.PRIMARY]: - "relative flex w-full flex-shrink-0 flex-row items-center justify-between gap-x-2 gap-y-4 bg-custom-sidebar-background-100 bg-custom-background-100 z-[18]", - [EHeaderVariant.SECONDARY]: "!py-0 overflow-y-hidden border-b border-custom-border-200 justify-between bg-custom-background-100 z-[15]", - [EHeaderVariant.TERNARY]: "flex flex-wrap justify-between py-2 border-b border-custom-border-200 gap-2 bg-custom-background-100 z-[12]", + "relative flex w-full flex-shrink-0 flex-row items-center justify-between gap-x-2 gap-y-4 bg-custom-sidebar-background-100 bg-custom-sidebar-background-100 z-[18]", + [EHeaderVariant.SECONDARY]: + "!py-0 overflow-y-hidden border-b border-custom-border-200 justify-between bg-custom-background-100 z-[15]", + [EHeaderVariant.TERNARY]: + "flex flex-wrap justify-between py-2 border-b border-custom-border-200 gap-2 bg-custom-background-100 z-[12]", }; export const minHeights: IHeaderProperties = { [EHeaderVariant.PRIMARY]: "", diff --git a/web/app/[workspaceSlug]/(projects)/drafts/header.tsx b/web/app/[workspaceSlug]/(projects)/drafts/header.tsx index 6f0b90717d1..0c5b4ecc7f1 100644 --- a/web/app/[workspaceSlug]/(projects)/drafts/header.tsx +++ b/web/app/[workspaceSlug]/(projects)/drafts/header.tsx @@ -44,7 +44,11 @@ export const WorkspaceDraftHeader: FC = observer(() => { link={} />} /> - {paginationInfo?.count && paginationInfo?.count > 0 ? : <>} + {paginationInfo?.total_count && paginationInfo?.total_count > 0 ? ( + + ) : ( + <> + )} diff --git a/web/ce/components/issues/issue-details/issue-identifier.tsx b/web/ce/components/issues/issue-details/issue-identifier.tsx index c461e88fa31..fbd9439842b 100644 --- a/web/ce/components/issues/issue-details/issue-identifier.tsx +++ b/web/ce/components/issues/issue-details/issue-identifier.tsx @@ -1,3 +1,4 @@ +import { FC } from "react"; import { observer } from "mobx-react"; // types import { IIssueDisplayProperties } from "@plane/types"; @@ -28,6 +29,13 @@ type TIssueIdentifierWithDetails = TIssueIdentifierBaseProps & { export type TIssueIdentifierProps = TIssueIdentifierFromStore | TIssueIdentifierWithDetails; +type TIssueTypeIdentifier = { + issueTypeId: string; + size?: "xs" | "sm" | "md" | "lg"; +}; + +export const IssueTypeIdentifier: FC = observer((props) => <>); + type TIdentifierTextProps = { identifier: string; enableClickToCopyIdentifier?: boolean; diff --git a/web/core/components/issues/workspace-draft/draft-issue-block.tsx b/web/core/components/issues/workspace-draft/draft-issue-block.tsx index 8be73154d6d..0e0561353f6 100644 --- a/web/core/components/issues/workspace-draft/draft-issue-block.tsx +++ b/web/core/components/issues/workspace-draft/draft-issue-block.tsx @@ -8,7 +8,7 @@ import { cn } from "@/helpers/common.helper"; // hooks import { useAppTheme, useProject, useWorkspaceDraftIssues } from "@/hooks/store"; // plane-web components -import { IdentifierText } from "ce/components/issues"; +import { IdentifierText, IssueTypeIdentifier } from "@/plane-web/components/issues"; // local components import { WorkspaceDraftIssueQuickActions } from "../issue-layouts"; import { DraftIssueProperties } from "./draft-issue-properties"; @@ -51,6 +51,7 @@ export const DraftIssueBlock: FC = observer((props) => {
{issue.project_id && (
+ {issue?.type_id && }