mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: merge conflicts
This commit is contained in:
commit
90c913ce03
@ -278,6 +278,7 @@ export const SingleBoardIssue: React.FC<Props> = ({
|
|||||||
issue={issue}
|
issue={issue}
|
||||||
partialUpdateIssue={partialUpdateIssue}
|
partialUpdateIssue={partialUpdateIssue}
|
||||||
isNotAllowed={isNotAllowed}
|
isNotAllowed={isNotAllowed}
|
||||||
|
tooltipPosition="left"
|
||||||
selfPositioned
|
selfPositioned
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
@ -75,6 +75,19 @@ export const CreateUpdateIssueModal: React.FC<IssuesModalProps> = ({
|
|||||||
setActiveProject(projects?.find((p) => p.id === projectId)?.id ?? projects?.[0].id ?? null);
|
setActiveProject(projects?.find((p) => p.id === projectId)?.id ?? projects?.[0].id ?? null);
|
||||||
}, [projectId, projects]);
|
}, [projectId, projects]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const handleKeyDown = (e: KeyboardEvent) => {
|
||||||
|
if (e.key === "Escape") {
|
||||||
|
handleClose();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
window.addEventListener("keydown", handleKeyDown);
|
||||||
|
return () => {
|
||||||
|
window.removeEventListener("keydown", handleKeyDown);
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
const addIssueToCycle = async (issueId: string, cycleId: string) => {
|
const addIssueToCycle = async (issueId: string, cycleId: string) => {
|
||||||
if (!workspaceSlug || !projectId) return;
|
if (!workspaceSlug || !projectId) return;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import useSWR, { mutate } from "swr";
|
|||||||
import issuesService from "services/issues.service";
|
import issuesService from "services/issues.service";
|
||||||
import cyclesService from "services/cycles.service";
|
import cyclesService from "services/cycles.service";
|
||||||
// ui
|
// ui
|
||||||
import { Spinner, CustomSelect } from "components/ui";
|
import { Spinner, CustomSelect, Tooltip } from "components/ui";
|
||||||
// icons
|
// icons
|
||||||
import { CyclesIcon } from "components/icons";
|
import { CyclesIcon } from "components/icons";
|
||||||
// types
|
// types
|
||||||
@ -65,11 +65,19 @@ export const SidebarCycleSelect: React.FC<Props> = ({
|
|||||||
<div className="space-y-1 sm:basis-1/2">
|
<div className="space-y-1 sm:basis-1/2">
|
||||||
<CustomSelect
|
<CustomSelect
|
||||||
label={
|
label={
|
||||||
<span
|
<Tooltip
|
||||||
className={`hidden truncate text-left sm:block ${issueCycle ? "" : "text-gray-900"}`}
|
position="top-right"
|
||||||
|
tooltipHeading="Cycle"
|
||||||
|
tooltipContent={issueCycle ? issueCycle.cycle_detail.name : "None"}
|
||||||
>
|
>
|
||||||
{issueCycle ? issueCycle.cycle_detail.name : "None"}
|
<span
|
||||||
</span>
|
className={` w-full max-w-[125px] truncate text-left sm:block ${
|
||||||
|
issueCycle ? "" : "text-gray-900"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
{issueCycle ? issueCycle.cycle_detail.name : "None"}
|
||||||
|
</span>
|
||||||
|
</Tooltip>
|
||||||
}
|
}
|
||||||
value={issueCycle?.cycle_detail.id}
|
value={issueCycle?.cycle_detail.id}
|
||||||
onChange={(value: any) => {
|
onChange={(value: any) => {
|
||||||
@ -84,11 +92,15 @@ export const SidebarCycleSelect: React.FC<Props> = ({
|
|||||||
<>
|
<>
|
||||||
{cycles.map((option) => (
|
{cycles.map((option) => (
|
||||||
<CustomSelect.Option key={option.id} value={option.id}>
|
<CustomSelect.Option key={option.id} value={option.id}>
|
||||||
{option.name}
|
<Tooltip position="left-bottom" tooltipContent={option.name}>
|
||||||
|
<span className="w-full max-w-[125px] truncate ">{option.name}</span>
|
||||||
|
</Tooltip>
|
||||||
</CustomSelect.Option>
|
</CustomSelect.Option>
|
||||||
))}
|
))}
|
||||||
<CustomSelect.Option value={null} className="capitalize">
|
<CustomSelect.Option value={null} className="capitalize">
|
||||||
None
|
<Tooltip position="left-bottom" tooltipContent="None">
|
||||||
|
<span className="w-full max-w-[125px] truncate">None</span>
|
||||||
|
</Tooltip>
|
||||||
</CustomSelect.Option>
|
</CustomSelect.Option>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
|
@ -7,7 +7,7 @@ import useSWR, { mutate } from "swr";
|
|||||||
// services
|
// services
|
||||||
import modulesService from "services/modules.service";
|
import modulesService from "services/modules.service";
|
||||||
// ui
|
// ui
|
||||||
import { Spinner, CustomSelect } from "components/ui";
|
import { Spinner, CustomSelect, Tooltip } from "components/ui";
|
||||||
// icons
|
// icons
|
||||||
import { RectangleGroupIcon } from "@heroicons/react/24/outline";
|
import { RectangleGroupIcon } from "@heroicons/react/24/outline";
|
||||||
// types
|
// types
|
||||||
@ -64,11 +64,19 @@ export const SidebarModuleSelect: React.FC<Props> = ({
|
|||||||
<div className="space-y-1 sm:basis-1/2">
|
<div className="space-y-1 sm:basis-1/2">
|
||||||
<CustomSelect
|
<CustomSelect
|
||||||
label={
|
label={
|
||||||
<span
|
<Tooltip
|
||||||
className={`hidden truncate text-left sm:block ${issueModule ? "" : "text-gray-900"}`}
|
position="top-right"
|
||||||
|
tooltipHeading="Module"
|
||||||
|
tooltipContent={modules?.find((m) => m.id === issueModule?.module)?.name ?? "None"}
|
||||||
>
|
>
|
||||||
{modules?.find((m) => m.id === issueModule?.module)?.name ?? "None"}
|
<span
|
||||||
</span>
|
className={`w-full max-w-[125px] truncate text-left sm:block ${
|
||||||
|
issueModule ? "" : "text-gray-900"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
{modules?.find((m) => m.id === issueModule?.module)?.name ?? "None"}
|
||||||
|
</span>
|
||||||
|
</Tooltip>
|
||||||
}
|
}
|
||||||
value={issueModule?.module_detail?.id}
|
value={issueModule?.module_detail?.id}
|
||||||
onChange={(value: any) => {
|
onChange={(value: any) => {
|
||||||
@ -83,11 +91,15 @@ export const SidebarModuleSelect: React.FC<Props> = ({
|
|||||||
<>
|
<>
|
||||||
{modules.map((option) => (
|
{modules.map((option) => (
|
||||||
<CustomSelect.Option key={option.id} value={option.id}>
|
<CustomSelect.Option key={option.id} value={option.id}>
|
||||||
{option.name}
|
<Tooltip position="left-bottom" tooltipContent={option.name}>
|
||||||
|
<span className="w-full max-w-[125px] truncate">{option.name}</span>
|
||||||
|
</Tooltip>
|
||||||
</CustomSelect.Option>
|
</CustomSelect.Option>
|
||||||
))}
|
))}
|
||||||
<CustomSelect.Option value={null} className="capitalize">
|
<CustomSelect.Option value={null} className="capitalize">
|
||||||
None
|
<Tooltip position="left-bottom" tooltipContent="None">
|
||||||
|
<span className="w-full max-w-[125px] truncate"> None </span>
|
||||||
|
</Tooltip>
|
||||||
</CustomSelect.Option>
|
</CustomSelect.Option>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
|
@ -19,6 +19,7 @@ type Props = {
|
|||||||
issue: IIssue;
|
issue: IIssue;
|
||||||
partialUpdateIssue: (formData: Partial<IIssue>) => void;
|
partialUpdateIssue: (formData: Partial<IIssue>) => void;
|
||||||
selfPositioned?: boolean;
|
selfPositioned?: boolean;
|
||||||
|
tooltipPosition?: "left" | "right";
|
||||||
isNotAllowed: boolean;
|
isNotAllowed: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -26,6 +27,7 @@ export const ViewAssigneeSelect: React.FC<Props> = ({
|
|||||||
issue,
|
issue,
|
||||||
partialUpdateIssue,
|
partialUpdateIssue,
|
||||||
selfPositioned = false,
|
selfPositioned = false,
|
||||||
|
tooltipPosition = "right",
|
||||||
isNotAllowed,
|
isNotAllowed,
|
||||||
}) => {
|
}) => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@ -57,7 +59,7 @@ export const ViewAssigneeSelect: React.FC<Props> = ({
|
|||||||
<div>
|
<div>
|
||||||
<Listbox.Button>
|
<Listbox.Button>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
position="top-right"
|
position={`top-${tooltipPosition}`}
|
||||||
tooltipHeading="Assignees"
|
tooltipHeading="Assignees"
|
||||||
tooltipContent={
|
tooltipContent={
|
||||||
issue.assignee_details.length > 0
|
issue.assignee_details.length > 0
|
||||||
|
Loading…
Reference in New Issue
Block a user