forked from github/plane
chore: create update issue modal improvement (#2765)
This commit is contained in:
parent
4e37916616
commit
4c09e46de7
@ -542,13 +542,13 @@ export const IssueForm: FC<IssueFormProps> = observer((props) => {
|
|||||||
)}
|
)}
|
||||||
{(fieldsToShow.includes("all") || fieldsToShow.includes("parent")) && (
|
{(fieldsToShow.includes("all") || fieldsToShow.includes("parent")) && (
|
||||||
<>
|
<>
|
||||||
|
{watch("parent") ? (
|
||||||
<CustomMenu
|
<CustomMenu
|
||||||
customButton={
|
customButton={
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="flex items-center justify-between gap-1 w-full cursor-pointer rounded border-[0.5px] border-custom-border-300 text-custom-text-200 px-2 py-1 text-xs hover:bg-custom-background-80"
|
className="flex items-center justify-between gap-1 w-full cursor-pointer rounded border-[0.5px] border-custom-border-300 text-custom-text-200 px-2 py-1 text-xs hover:bg-custom-background-80"
|
||||||
>
|
>
|
||||||
{watch("parent") ? (
|
|
||||||
<div className="flex items-center gap-1 text-custom-text-200">
|
<div className="flex items-center gap-1 text-custom-text-200">
|
||||||
<LayoutPanelTop className="h-3 w-3 flex-shrink-0" />
|
<LayoutPanelTop className="h-3 w-3 flex-shrink-0" />
|
||||||
<span className="whitespace-nowrap">
|
<span className="whitespace-nowrap">
|
||||||
@ -557,31 +557,30 @@ export const IssueForm: FC<IssueFormProps> = observer((props) => {
|
|||||||
${selectedParentIssue.sequence_id}`}
|
${selectedParentIssue.sequence_id}`}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
|
||||||
<div className="flex items-center gap-1 text-custom-text-300">
|
|
||||||
<LayoutPanelTop className="h-3 w-3 flex-shrink-0" />
|
|
||||||
<span className="whitespace-nowrap">Add Parent</span>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</button>
|
</button>
|
||||||
}
|
}
|
||||||
placement="bottom-start"
|
placement="bottom-start"
|
||||||
>
|
>
|
||||||
{watch("parent") ? (
|
|
||||||
<>
|
|
||||||
<CustomMenu.MenuItem className="!p-1" onClick={() => setParentIssueListModalOpen(true)}>
|
<CustomMenu.MenuItem className="!p-1" onClick={() => setParentIssueListModalOpen(true)}>
|
||||||
Change parent issue
|
Change parent issue
|
||||||
</CustomMenu.MenuItem>
|
</CustomMenu.MenuItem>
|
||||||
<CustomMenu.MenuItem className="!p-1" onClick={() => setValue("parent", null)}>
|
<CustomMenu.MenuItem className="!p-1" onClick={() => setValue("parent", null)}>
|
||||||
Remove parent issue
|
Remove parent issue
|
||||||
</CustomMenu.MenuItem>
|
</CustomMenu.MenuItem>
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
<CustomMenu.MenuItem className="!p-1" onClick={() => setParentIssueListModalOpen(true)}>
|
|
||||||
Select Parent Issue
|
|
||||||
</CustomMenu.MenuItem>
|
|
||||||
)}
|
|
||||||
</CustomMenu>
|
</CustomMenu>
|
||||||
|
) : (
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="flex items-center justify-between gap-1 w-min cursor-pointer rounded border-[0.5px] border-custom-border-300 text-custom-text-200 px-2 py-1 text-xs hover:bg-custom-background-80"
|
||||||
|
onClick={() => setParentIssueListModalOpen(true)}
|
||||||
|
>
|
||||||
|
<div className="flex items-center gap-1 text-custom-text-300">
|
||||||
|
<LayoutPanelTop className="h-3 w-3 flex-shrink-0" />
|
||||||
|
<span className="whitespace-nowrap">Add Parent</span>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
|
||||||
<Controller
|
<Controller
|
||||||
control={control}
|
control={control}
|
||||||
name="parent"
|
name="parent"
|
||||||
|
Loading…
Reference in New Issue
Block a user