forked from github/plane
chore: create update issue modal improvement (#2765)
This commit is contained in:
parent
f0c72bf249
commit
bdc9c9c2a8
@ -542,13 +542,13 @@ export const IssueForm: FC<IssueFormProps> = observer((props) => {
|
|||||||
)}
|
)}
|
||||||
{(fieldsToShow.includes("all") || fieldsToShow.includes("parent")) && (
|
{(fieldsToShow.includes("all") || fieldsToShow.includes("parent")) && (
|
||||||
<>
|
<>
|
||||||
<CustomMenu
|
{watch("parent") ? (
|
||||||
customButton={
|
<CustomMenu
|
||||||
<button
|
customButton={
|
||||||
type="button"
|
<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"
|
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"
|
||||||
{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>
|
||||||
) : (
|
</button>
|
||||||
<div className="flex items-center gap-1 text-custom-text-300">
|
}
|
||||||
<LayoutPanelTop className="h-3 w-3 flex-shrink-0" />
|
placement="bottom-start"
|
||||||
<span className="whitespace-nowrap">Add Parent</span>
|
>
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</button>
|
|
||||||
}
|
|
||||||
placement="bottom-start"
|
|
||||||
>
|
|
||||||
{watch("parent") ? (
|
|
||||||
<>
|
|
||||||
<CustomMenu.MenuItem className="!p-1" onClick={() => setParentIssueListModalOpen(true)}>
|
|
||||||
Change parent issue
|
|
||||||
</CustomMenu.MenuItem>
|
|
||||||
<CustomMenu.MenuItem className="!p-1" onClick={() => setValue("parent", null)}>
|
|
||||||
Remove parent issue
|
|
||||||
</CustomMenu.MenuItem>
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
<CustomMenu.MenuItem className="!p-1" onClick={() => setParentIssueListModalOpen(true)}>
|
<CustomMenu.MenuItem className="!p-1" onClick={() => setParentIssueListModalOpen(true)}>
|
||||||
Select Parent Issue
|
Change parent issue
|
||||||
</CustomMenu.MenuItem>
|
</CustomMenu.MenuItem>
|
||||||
)}
|
<CustomMenu.MenuItem className="!p-1" onClick={() => setValue("parent", null)}>
|
||||||
</CustomMenu>
|
Remove parent issue
|
||||||
|
</CustomMenu.MenuItem>
|
||||||
|
</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