forked from github/plane
Compare commits
2 Commits
preview
...
chore/bug_
Author | SHA1 | Date | |
---|---|---|---|
|
d021d38a98 | ||
|
3d5cbaae2a |
@ -46,24 +46,25 @@ export const IssuePropertyDate: React.FC<IIssuePropertyDate> = observer((props)
|
||||
disabled ? "cursor-not-allowed text-custom-text-200" : "cursor-pointer hover:bg-custom-background-80"
|
||||
}`}
|
||||
>
|
||||
<Tooltip tooltipHeading={placeHolder} tooltipContent={value ?? "None"}>
|
||||
<div className="overflow-hidden flex justify-center items-center gap-2">
|
||||
<Calendar className="h-3 w-3" strokeWidth={2} />
|
||||
{value && (
|
||||
<>
|
||||
<div className="overflow-hidden flex justify-center items-center gap-2">
|
||||
<Calendar className="h-3 w-3" strokeWidth={2} />
|
||||
{value && (
|
||||
<>
|
||||
<Tooltip tooltipHeading={placeHolder} tooltipContent={value ?? "None"}>
|
||||
<div className="text-xs">{value}</div>
|
||||
<div
|
||||
className="flex-shrink-0 flex justify-center items-center"
|
||||
onClick={() => {
|
||||
if (onChange) onChange(null);
|
||||
}}
|
||||
>
|
||||
<X className="h-2.5 w-2.5" strokeWidth={2} />
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</Tooltip>
|
||||
</Tooltip>
|
||||
|
||||
<div
|
||||
className="flex-shrink-0 flex justify-center items-center"
|
||||
onClick={() => {
|
||||
if (onChange) onChange(null);
|
||||
}}
|
||||
>
|
||||
<X className="h-2.5 w-2.5" strokeWidth={2} />
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</Popover.Button>
|
||||
|
||||
<div className={`${open ? "fixed z-20 top-0 left-0 h-full w-full cursor-auto" : ""}`}>
|
||||
|
@ -9,6 +9,7 @@ import { Popover, Transition } from "@headlessui/react";
|
||||
import { IssueLabelService } from "services/issue";
|
||||
// hooks
|
||||
import useUser from "hooks/use-user";
|
||||
import useToast from "hooks/use-toast";
|
||||
// ui
|
||||
import { Input } from "@plane/ui";
|
||||
import { IssueLabelSelect } from "../select";
|
||||
@ -57,6 +58,8 @@ export const SidebarLabelSelect: React.FC<Props> = ({
|
||||
defaultValues,
|
||||
});
|
||||
|
||||
const { setToastAlert } = useToast();
|
||||
|
||||
const { user } = useUser();
|
||||
|
||||
const { data: issueLabels, mutate: issueLabelMutate } = useSWR<IIssueLabels[]>(
|
||||
@ -79,6 +82,14 @@ export const SidebarLabelSelect: React.FC<Props> = ({
|
||||
submitChanges({ labels: [...(issueDetails?.labels ?? []), res.id] });
|
||||
|
||||
setCreateLabelForm(false);
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
setToastAlert({
|
||||
type: "error",
|
||||
title: "Error!",
|
||||
message: e.error ? e.error : "Something went wrong. Please try again.",
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user