mirror of
https://github.com/makeplane/plane
synced 2025-08-07 19:59:33 +00:00
chore: workspace draft issue type (#5836)
This commit is contained in:
committed by
GitHub
parent
ff090ecf39
commit
4e70e894f6
@@ -3,6 +3,7 @@ type TIssueAdditionalPropertiesProps = {
|
|||||||
issueTypeId: string | null;
|
issueTypeId: string | null;
|
||||||
projectId: string;
|
projectId: string;
|
||||||
workspaceSlug: string;
|
workspaceSlug: string;
|
||||||
|
isDraft?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const IssueAdditionalProperties: React.FC<TIssueAdditionalPropertiesProps> = () => <></>;
|
export const IssueAdditionalProperties: React.FC<TIssueAdditionalPropertiesProps> = () => <></>;
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ export const CreateUpdateIssueModalBase: React.FC<IssuesModalProps> = observer((
|
|||||||
issueTypeId: response.type_id,
|
issueTypeId: response.type_id,
|
||||||
projectId: response.project_id,
|
projectId: response.project_id,
|
||||||
workspaceSlug: workspaceSlug.toString(),
|
workspaceSlug: workspaceSlug.toString(),
|
||||||
|
isDraft: isDraft,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,6 +258,7 @@ export const CreateUpdateIssueModalBase: React.FC<IssuesModalProps> = observer((
|
|||||||
issueTypeId: payload.type_id,
|
issueTypeId: payload.type_id,
|
||||||
projectId: payload.project_id,
|
projectId: payload.project_id,
|
||||||
workspaceSlug: workspaceSlug.toString(),
|
workspaceSlug: workspaceSlug.toString(),
|
||||||
|
isDraft: isDraft,
|
||||||
});
|
});
|
||||||
|
|
||||||
setToast({
|
setToast({
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export type TCreateUpdatePropertyValuesProps = {
|
|||||||
projectId: string;
|
projectId: string;
|
||||||
workspaceSlug: string;
|
workspaceSlug: string;
|
||||||
issueTypeId: string | null | undefined;
|
issueTypeId: string | null | undefined;
|
||||||
|
isDraft?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TIssueModalContext = {
|
export type TIssueModalContext = {
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ export const DraftIssueLayout: React.FC<DraftIssueProps> = observer((props) => {
|
|||||||
issueTypeId: response.type_id,
|
issueTypeId: response.type_id,
|
||||||
projectId,
|
projectId,
|
||||||
workspaceSlug: workspaceSlug?.toString(),
|
workspaceSlug: workspaceSlug?.toString(),
|
||||||
|
isDraft: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -195,12 +195,12 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
|
|||||||
const submitData = !data?.id
|
const submitData = !data?.id
|
||||||
? formData
|
? formData
|
||||||
: {
|
: {
|
||||||
...getChangedIssuefields(formData, dirtyFields as { [key: string]: boolean | undefined }),
|
...getChangedIssuefields(formData, dirtyFields as { [key: string]: boolean | undefined }),
|
||||||
project_id: getValues<"project_id">("project_id"),
|
project_id: getValues<"project_id">("project_id"),
|
||||||
id: data.id,
|
id: data.id,
|
||||||
description_html: formData.description_html ?? "<p></p>",
|
description_html: formData.description_html ?? "<p></p>",
|
||||||
type_id: getValues<"type_id">("type_id"),
|
type_id: getValues<"type_id">("type_id"),
|
||||||
};
|
};
|
||||||
|
|
||||||
// this condition helps to move the issues from draft to project issues
|
// this condition helps to move the issues from draft to project issues
|
||||||
if (formData.hasOwnProperty("is_draft")) submitData.is_draft = formData.is_draft;
|
if (formData.hasOwnProperty("is_draft")) submitData.is_draft = formData.is_draft;
|
||||||
@@ -323,7 +323,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
|
|||||||
className={cn(
|
className={cn(
|
||||||
"pb-4 space-y-3",
|
"pb-4 space-y-3",
|
||||||
activeAdditionalPropertiesLength > 4 &&
|
activeAdditionalPropertiesLength > 4 &&
|
||||||
"max-h-[45vh] overflow-hidden overflow-y-auto vertical-scrollbar scrollbar-sm"
|
"max-h-[45vh] overflow-hidden overflow-y-auto vertical-scrollbar scrollbar-sm"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className="px-5">
|
<div className="px-5">
|
||||||
@@ -352,7 +352,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
|
|||||||
className={cn(
|
className={cn(
|
||||||
"px-5",
|
"px-5",
|
||||||
activeAdditionalPropertiesLength <= 4 &&
|
activeAdditionalPropertiesLength <= 4 &&
|
||||||
"max-h-[25vh] overflow-hidden overflow-y-auto vertical-scrollbar scrollbar-sm"
|
"max-h-[25vh] overflow-hidden overflow-y-auto vertical-scrollbar scrollbar-sm"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{projectId && (
|
{projectId && (
|
||||||
@@ -361,6 +361,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
|
|||||||
issueTypeId={watch("type_id")}
|
issueTypeId={watch("type_id")}
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
workspaceSlug={workspaceSlug?.toString()}
|
workspaceSlug={workspaceSlug?.toString()}
|
||||||
|
isDraft={isDraft}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -393,7 +394,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
|
|||||||
tabIndex={getIndex("create_more")}
|
tabIndex={getIndex("create_more")}
|
||||||
role="button"
|
role="button"
|
||||||
>
|
>
|
||||||
<ToggleSwitch value={isCreateMoreToggleEnabled} onChange={() => { }} size="sm" />
|
<ToggleSwitch value={isCreateMoreToggleEnabled} onChange={() => {}} size="sm" />
|
||||||
<span className="text-xs">Create more</span>
|
<span className="text-xs">Create more</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user