mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: bug fixes (#3010)
* fix: project view modal auto close bug fix * fix: issue peek overview label select permission validation added
This commit is contained in:
parent
c5cc706978
commit
aba4592b73
@ -4,8 +4,6 @@ import { Plus } from "lucide-react";
|
|||||||
// mobx store
|
// mobx store
|
||||||
import { useMobxStore } from "lib/mobx/store-provider";
|
import { useMobxStore } from "lib/mobx/store-provider";
|
||||||
// components
|
// components
|
||||||
import { CreateUpdateProjectViewModal } from "components/views";
|
|
||||||
// components
|
|
||||||
import { Breadcrumbs, PhotoFilterIcon, Button } from "@plane/ui";
|
import { Breadcrumbs, PhotoFilterIcon, Button } from "@plane/ui";
|
||||||
// helpers
|
// helpers
|
||||||
import { renderEmoji } from "helpers/emoji.helper";
|
import { renderEmoji } from "helpers/emoji.helper";
|
||||||
@ -13,21 +11,13 @@ import { renderEmoji } from "helpers/emoji.helper";
|
|||||||
export const ProjectViewsHeader: React.FC = observer(() => {
|
export const ProjectViewsHeader: React.FC = observer(() => {
|
||||||
// router
|
// router
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { workspaceSlug, projectId } = router.query;
|
const { workspaceSlug } = router.query;
|
||||||
|
|
||||||
const { project: projectStore, commandPalette } = useMobxStore();
|
const { project: projectStore, commandPalette } = useMobxStore();
|
||||||
const { currentProjectDetails } = projectStore;
|
const { currentProjectDetails } = projectStore;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{workspaceSlug && projectId && (
|
|
||||||
<CreateUpdateProjectViewModal
|
|
||||||
isOpen={commandPalette.isCreateViewModalOpen}
|
|
||||||
onClose={() => commandPalette.toggleCreateViewModal(false)}
|
|
||||||
workspaceSlug={workspaceSlug.toString()}
|
|
||||||
projectId={projectId.toString()}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<div className="relative flex w-full flex-shrink-0 flex-row z-10 h-[3.75rem] items-center justify-between gap-x-2 gap-y-4 border-b border-custom-border-200 bg-custom-sidebar-background-100 p-4">
|
<div className="relative flex w-full flex-shrink-0 flex-row z-10 h-[3.75rem] items-center justify-between gap-x-2 gap-y-4 border-b border-custom-border-200 bg-custom-sidebar-background-100 p-4">
|
||||||
<div className="flex items-center gap-2 flex-grow w-full whitespace-nowrap overflow-ellipsis">
|
<div className="flex items-center gap-2 flex-grow w-full whitespace-nowrap overflow-ellipsis">
|
||||||
<div>
|
<div>
|
||||||
|
@ -17,10 +17,11 @@ type Props = {
|
|||||||
onChange: (value: string[]) => void;
|
onChange: (value: string[]) => void;
|
||||||
projectId: string;
|
projectId: string;
|
||||||
label?: JSX.Element;
|
label?: JSX.Element;
|
||||||
|
disabled?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const IssueLabelSelect: React.FC<Props> = observer((props) => {
|
export const IssueLabelSelect: React.FC<Props> = observer((props) => {
|
||||||
const { setIsOpen, value, onChange, projectId, label } = props;
|
const { setIsOpen, value, onChange, projectId, label, disabled = false } = props;
|
||||||
|
|
||||||
// states
|
// states
|
||||||
const [query, setQuery] = useState("");
|
const [query, setQuery] = useState("");
|
||||||
@ -50,7 +51,14 @@ export const IssueLabelSelect: React.FC<Props> = observer((props) => {
|
|||||||
query === "" ? issueLabels : issueLabels?.filter((l) => l.name.toLowerCase().includes(query.toLowerCase()));
|
query === "" ? issueLabels : issueLabels?.filter((l) => l.name.toLowerCase().includes(query.toLowerCase()));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Combobox as="div" value={value} onChange={(val) => onChange(val)} className="relative flex-shrink-0" multiple>
|
<Combobox
|
||||||
|
as="div"
|
||||||
|
value={value}
|
||||||
|
onChange={(val) => onChange(val)}
|
||||||
|
className="relative flex-shrink-0"
|
||||||
|
multiple
|
||||||
|
disabled={disabled}
|
||||||
|
>
|
||||||
{({ open }: any) => (
|
{({ open }: any) => (
|
||||||
<>
|
<>
|
||||||
<Combobox.Button as={Fragment}>
|
<Combobox.Button as={Fragment}>
|
||||||
|
@ -125,6 +125,7 @@ export const SidebarLabelSelect: React.FC<Props> = observer((props) => {
|
|||||||
Select Label
|
Select Label
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
|
disabled={uneditable}
|
||||||
/>
|
/>
|
||||||
{!isNotAllowed && (
|
{!isNotAllowed && (
|
||||||
<button
|
<button
|
||||||
|
Loading…
Reference in New Issue
Block a user