chore: create update view modal and sidebar global issues redirection

This commit is contained in:
Anmol Singh Bhatia 2023-09-22 15:21:20 +05:30
parent b297241d34
commit 8dbd77974b
5 changed files with 12 additions and 2 deletions

View File

@ -161,6 +161,7 @@ export const CommandPalette: React.FC = observer(() => {
/>
<CreateUpdateViewModal
handleClose={() => setIsCreateViewModalOpen(false)}
viewType="project"
isOpen={isCreateViewModalOpen}
user={user}
/>

View File

@ -12,6 +12,7 @@ import stateService from "services/state.service";
// hooks
import useUser from "hooks/use-user";
import { useProjectMyMembership } from "contexts/project-member.context";
import useSpreadsheetIssuesView from "hooks/use-spreadsheet-issues-view";
// components
import {
AllLists,
@ -86,6 +87,8 @@ export const AllViews: React.FC<Props> = ({
const { groupedIssues, isEmpty, displayFilters } = viewProps;
const { spreadsheetIssues, mutateIssues } = useSpreadsheetIssuesView();
const { data: stateGroups } = useSWR(
workspaceSlug && projectId ? STATES_LIST(projectId as string) : null,
workspaceSlug
@ -174,6 +177,8 @@ export const AllViews: React.FC<Props> = ({
) : displayFilters?.layout === "spreadsheet" ? (
<SpreadsheetView
handleIssueAction={handleIssueAction}
spreadsheetIssues={spreadsheetIssues}
mutateIssues={mutateIssues}
openIssuesListModal={cycleId || moduleId ? openIssuesListModal : null}
disableUserActions={disableUserActions}
user={user}

View File

@ -481,6 +481,7 @@ export const IssuesView: React.FC<Props> = ({
<CreateUpdateViewModal
isOpen={createViewModal !== null}
handleClose={() => setCreateViewModal(null)}
viewType="project"
preLoadedData={createViewModal}
user={user}
/>

View File

@ -34,8 +34,8 @@ const workspaceLinks = (workspaceSlug: string) => [
},
{
Icon: TaskAltOutlined,
name: "My Issues",
href: `/${workspaceSlug}/me/my-issues`,
name: "Issues",
href: `/${workspaceSlug}/workspace-views`,
},
];

View File

@ -88,12 +88,14 @@ const ProjectViews: NextPage = () => {
>
<CreateUpdateViewModal
isOpen={createUpdateViewModal}
viewType="project"
handleClose={() => setCreateUpdateViewModal(false)}
data={selectedViewToUpdate}
user={user}
/>
<DeleteViewModal
isOpen={deleteViewModal}
viewType="project"
data={selectedViewToDelete}
setIsOpen={setDeleteViewModal}
user={user}
@ -107,6 +109,7 @@ const ProjectViews: NextPage = () => {
<SingleViewItem
key={view.id}
view={view}
viewType="project"
handleEditView={() => handleEditView(view)}
handleDeleteView={() => handleDeleteView(view)}
/>