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:
Anmol Singh Bhatia 2023-12-06 19:10:53 +05:30 committed by GitHub
parent 956d7acfa6
commit b499e2c5a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 13 deletions

View File

@ -4,8 +4,6 @@ import { Plus } from "lucide-react";
// mobx store
import { useMobxStore } from "lib/mobx/store-provider";
// components
import { CreateUpdateProjectViewModal } from "components/views";
// components
import { Breadcrumbs, PhotoFilterIcon, Button } from "@plane/ui";
// helpers
import { renderEmoji } from "helpers/emoji.helper";
@ -13,21 +11,13 @@ import { renderEmoji } from "helpers/emoji.helper";
export const ProjectViewsHeader: React.FC = observer(() => {
// router
const router = useRouter();
const { workspaceSlug, projectId } = router.query;
const { workspaceSlug } = router.query;
const { project: projectStore, commandPalette } = useMobxStore();
const { currentProjectDetails } = projectStore;
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="flex items-center gap-2 flex-grow w-full whitespace-nowrap overflow-ellipsis">
<div>

View File

@ -17,10 +17,11 @@ type Props = {
onChange: (value: string[]) => void;
projectId: string;
label?: JSX.Element;
disabled?: boolean;
};
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
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()));
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) => (
<>
<Combobox.Button as={Fragment}>

View File

@ -125,6 +125,7 @@ export const SidebarLabelSelect: React.FC<Props> = observer((props) => {
Select Label
</span>
}
disabled={uneditable}
/>
{!isNotAllowed && (
<button