forked from github/plane
fix: blocked and blocking in issue details sidebar (#641)
This commit is contained in:
parent
15ce3537ad
commit
a8f125cfa8
@ -113,17 +113,9 @@ export const SidebarBlockedSelect: React.FC<Props> = ({
|
|||||||
<div className="flex flex-wrap gap-1">
|
<div className="flex flex-wrap gap-1">
|
||||||
{watch("blocked_list") && watch("blocked_list").length > 0
|
{watch("blocked_list") && watch("blocked_list").length > 0
|
||||||
? watch("blocked_list").map((issue) => (
|
? watch("blocked_list").map((issue) => (
|
||||||
<span
|
<div
|
||||||
key={issue}
|
key={issue}
|
||||||
className="group flex cursor-pointer items-center gap-1 rounded-2xl border border-white px-1.5 py-0.5 text-xs text-red-500 duration-300 hover:border-red-500 hover:bg-red-50"
|
className="group flex cursor-pointer items-center gap-1 rounded-2xl border border-white px-1.5 py-0.5 text-xs text-red-500 duration-300 hover:border-red-500 hover:bg-red-50"
|
||||||
onClick={() => {
|
|
||||||
const updatedBlocked: string[] = watch("blocked_list").filter(
|
|
||||||
(i) => i !== issue
|
|
||||||
);
|
|
||||||
submitChanges({
|
|
||||||
blocks_list: updatedBlocked,
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Link
|
<Link
|
||||||
href={`/${workspaceSlug}/projects/${projectId}/issues/${
|
href={`/${workspaceSlug}/projects/${projectId}/issues/${
|
||||||
@ -137,10 +129,21 @@ export const SidebarBlockedSelect: React.FC<Props> = ({
|
|||||||
}`}
|
}`}
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
<span className="opacity-0 duration-300 group-hover:opacity-100">
|
<button
|
||||||
|
type="button"
|
||||||
|
className="opacity-0 duration-300 group-hover:opacity-100"
|
||||||
|
onClick={() => {
|
||||||
|
const updatedBlocked: string[] = watch("blocked_list").filter(
|
||||||
|
(i) => i !== issue
|
||||||
|
);
|
||||||
|
submitChanges({
|
||||||
|
blocks_list: updatedBlocked,
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
<XMarkIcon className="h-2 w-2" />
|
<XMarkIcon className="h-2 w-2" />
|
||||||
</span>
|
</button>
|
||||||
</span>
|
</div>
|
||||||
))
|
))
|
||||||
: null}
|
: null}
|
||||||
</div>
|
</div>
|
||||||
|
@ -129,7 +129,8 @@ export const SidebarBlockerSelect: React.FC<Props> = ({
|
|||||||
}`}
|
}`}
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
<span
|
<button
|
||||||
|
type="button"
|
||||||
className="opacity-0 duration-300 group-hover:opacity-100"
|
className="opacity-0 duration-300 group-hover:opacity-100"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const updatedBlockers: string[] = watch("blockers_list").filter(
|
const updatedBlockers: string[] = watch("blockers_list").filter(
|
||||||
@ -141,7 +142,7 @@ export const SidebarBlockerSelect: React.FC<Props> = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<XMarkIcon className="h-2 w-2" />
|
<XMarkIcon className="h-2 w-2" />
|
||||||
</span>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
))
|
))
|
||||||
: null}
|
: null}
|
||||||
|
Loading…
Reference in New Issue
Block a user