import { FC, Fragment } from "react"; import { observer } from "mobx-react-lite"; import { Dialog, Transition } from "@headlessui/react"; import { Trash2, Plus, X } from "lucide-react"; // hooks import { useViewDetail } from "hooks/store"; // components import { ViewAppliedFiltersRoot } from "../"; // ui import { Input, Button } from "@plane/ui"; // types import { TView, TViewTypes } from "@plane/types"; import { TViewOperations } from "../types"; type TViewCreateEditForm = { workspaceSlug: string; projectId: string | undefined; viewId: string; viewType: TViewTypes; viewOperations: TViewOperations; modalToggle: boolean; handleModalClose: () => void; onSubmit: (viewData: Partial) => void; }; export const ViewCreateEditForm: FC = observer((props) => { const { workspaceSlug, projectId, viewId, viewType, viewOperations, modalToggle, handleModalClose, onSubmit } = props; // hooks const viewDetailStore = useViewDetail(workspaceSlug, projectId, viewId, viewType); const onContinue = async () => { const payload: Partial = { id: viewDetailStore?.id, name: viewDetailStore?.name, filters: viewDetailStore?.filters, }; onSubmit(payload); }; return (
{/*
Project Identifier
*/}
Create View
{ viewDetailStore?.setName(e.target.value); }} placeholder="What do you want to call this view?" className="h-[46px] w-full border border-onboarding-border-100 pr-12 placeholder:text-onboarding-text-400" autoFocus />
Filters
Clear all filters
); });