Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apiserver/plane/app/views/workspace/draft.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 2 additions & 0 deletions packages/types/src/workspace-draft-issues/base.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export type TWorkspaceDraftIssue = {
updated_by: string;

is_draft: boolean;

type_id: string;
};

export type TWorkspaceDraftPaginationInfo<T> = {
Expand Down
8 changes: 5 additions & 3 deletions packages/ui/src/header/helper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]: "",
Expand Down
6 changes: 5 additions & 1 deletion web/app/[workspaceSlug]/(projects)/drafts/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ export const WorkspaceDraftHeader: FC = observer(() => {
link={<BreadcrumbLink label={`Draft`} icon={<PenSquare className="h-4 w-4 text-custom-text-300" />} />}
/>
</Breadcrumbs>
{paginationInfo?.count && paginationInfo?.count > 0 ? <CountChip count={paginationInfo?.count} /> : <></>}
{paginationInfo?.total_count && paginationInfo?.total_count > 0 ? (
<CountChip count={paginationInfo?.total_count} />
) : (
<></>
)}
</div>
</Header.LeftItem>

Expand Down
8 changes: 8 additions & 0 deletions web/ce/components/issues/issue-details/issue-identifier.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { FC } from "react";
import { observer } from "mobx-react";
// types
import { IIssueDisplayProperties } from "@plane/types";
Expand Down Expand Up @@ -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<TIssueTypeIdentifier> = observer((props) => <></>);

type TIdentifierTextProps = {
identifier: string;
enableClickToCopyIdentifier?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -51,6 +51,7 @@ export const DraftIssueBlock: FC<Props> = observer((props) => {
<div className="flex-shrink-0">
{issue.project_id && (
<div className="flex items-center space-x-2">
{issue?.type_id && <IssueTypeIdentifier issueTypeId={issue.type_id} />}
<IdentifierText
identifier={projectIdentifier}
enableClickToCopyIdentifier
Expand Down