-
-
-
-
+
+
);
};
diff --git a/web/pages/[workspaceSlug]/profile/[userId]/subscribed.tsx b/web/pages/[workspaceSlug]/profile/[userId]/subscribed.tsx
index 3a1ca01ee..3d3400a80 100644
--- a/web/pages/[workspaceSlug]/profile/[userId]/subscribed.tsx
+++ b/web/pages/[workspaceSlug]/profile/[userId]/subscribed.tsx
@@ -1,20 +1,20 @@
import React from "react";
-// contexts
-import { ProfileIssuesContextProvider } from "contexts/profile-issues-context";
// layouts
+import { AppLayout } from "layouts/app-layout";
import { ProfileAuthWrapper } from "layouts/profile-layout";
// components
+import { UserProfileHeader } from "components/headers";
import { ProfileIssuesView } from "components/profile";
// types
import type { NextPage } from "next";
const ProfileSubscribedIssues: NextPage = () => (
-
+ }>
-
+
);
export default ProfileSubscribedIssues;
diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/settings/automations.tsx b/web/pages/[workspaceSlug]/projects/[projectId]/settings/automations.tsx
index cc709d598..99a7f01ef 100644
--- a/web/pages/[workspaceSlug]/projects/[projectId]/settings/automations.tsx
+++ b/web/pages/[workspaceSlug]/projects/[projectId]/settings/automations.tsx
@@ -7,7 +7,8 @@ import useSWR, { mutate } from "swr";
// services
import { ProjectService } from "services/project";
// layouts
-import { ProjectSettingLayout } from "layouts/setting-layout/project-setting-layout";
+import { AppLayout } from "layouts/app-layout";
+import { ProjectSettingLayout } from "layouts/setting-layout";
// hooks
import useUserAuth from "hooks/use-user-auth";
import useProjectDetails from "hooks/use-project-details";
@@ -70,15 +71,17 @@ const AutomationsSettings: NextPage = () => {
const isAdmin = memberDetails?.role === 20;
return (
-
}>
-
-
+
} withProjectWrapper>
+
+
+
+
);
};
diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/settings/estimates.tsx b/web/pages/[workspaceSlug]/projects/[projectId]/settings/estimates.tsx
index 125142cf2..0bfbd04b0 100644
--- a/web/pages/[workspaceSlug]/projects/[projectId]/settings/estimates.tsx
+++ b/web/pages/[workspaceSlug]/projects/[projectId]/settings/estimates.tsx
@@ -7,7 +7,8 @@ import { ProjectService, ProjectEstimateService } from "services/project";
// hooks
import useProjectDetails from "hooks/use-project-details";
// layouts
-import { ProjectSettingLayout } from "layouts/setting-layout/project-setting-layout";
+import { AppLayout } from "layouts/app-layout";
+import { ProjectSettingLayout } from "layouts/setting-layout";
// components
import { CreateUpdateEstimateModal, SingleEstimate } from "components/estimates";
import { ProjectSettingHeader } from "components/headers";
@@ -98,18 +99,17 @@ const EstimatesSettings: NextPage = () => {
};
return (
- <>
-
{
- setEstimateFormOpen(false);
- setEstimateToUpdate(undefined);
- }}
- user={user}
- />
-
- }>
+ } withProjectWrapper>
+
+ {
+ setEstimateFormOpen(false);
+ setEstimateToUpdate(undefined);
+ }}
+ user={user}
+ />
Estimates
@@ -172,7 +172,7 @@ const EstimatesSettings: NextPage = () => {
)}
- >
+
);
};
diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/settings/features.tsx b/web/pages/[workspaceSlug]/projects/[projectId]/settings/features.tsx
index 2e232e1b0..41878525c 100644
--- a/web/pages/[workspaceSlug]/projects/[projectId]/settings/features.tsx
+++ b/web/pages/[workspaceSlug]/projects/[projectId]/settings/features.tsx
@@ -6,7 +6,8 @@ import useSWR, { mutate } from "swr";
import { ProjectService } from "services/project";
import { TrackEventService, MiscellaneousEventType } from "services/track_event.service";
// layouts
-import { ProjectSettingLayout } from "layouts/setting-layout/project-setting-layout";
+import { AppLayout } from "layouts/app-layout";
+import { ProjectSettingLayout } from "layouts/setting-layout";
// hooks
import useToast from "hooks/use-toast";
import useUserAuth from "hooks/use-user-auth";
@@ -136,52 +137,54 @@ const FeaturesSettings: NextPage = () => {
const isAdmin = memberDetails?.role === 20;
return (
- }>
-
-
-
Features
-
-
- {featuresList.map((feature) => (
-
-
-
- {feature.icon}
-
-
-
{feature.title}
-
{feature.description}
+
} withProjectWrapper>
+
+
+
+
Features
+
+
+ {featuresList.map((feature) => (
+
+
+
+ {feature.icon}
+
+
+
{feature.title}
+
{feature.description}
+
+
{
+ trackEventService.trackMiscellaneousEvent(
+ {
+ workspaceId: (projectDetails?.workspace as any)?.id,
+ workspaceSlug,
+ projectId,
+ projectIdentifier: projectDetails?.identifier,
+ projectName: projectDetails?.name,
+ },
+ getEventType(feature.title, !projectDetails?.[feature.property as keyof IProject]),
+ user as IUser
+ );
+ handleSubmit({
+ [feature.property]: !projectDetails?.[feature.property as keyof IProject],
+ });
+ }}
+ disabled={!isAdmin}
+ size="sm"
+ />
-
{
- trackEventService.trackMiscellaneousEvent(
- {
- workspaceId: (projectDetails?.workspace as any)?.id,
- workspaceSlug,
- projectId,
- projectIdentifier: projectDetails?.identifier,
- projectName: projectDetails?.name,
- },
- getEventType(feature.title, !projectDetails?.[feature.property as keyof IProject]),
- user as IUser
- );
- handleSubmit({
- [feature.property]: !projectDetails?.[feature.property as keyof IProject],
- });
- }}
- disabled={!isAdmin}
- size="sm"
- />
-
- ))}
-
-
-
+ ))}
+
+
+
+
);
};
diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/settings/index.tsx b/web/pages/[workspaceSlug]/projects/[projectId]/settings/index.tsx
index 26b3ae90c..b78d44970 100644
--- a/web/pages/[workspaceSlug]/projects/[projectId]/settings/index.tsx
+++ b/web/pages/[workspaceSlug]/projects/[projectId]/settings/index.tsx
@@ -3,7 +3,8 @@ import { useRouter } from "next/router";
import useSWR from "swr";
// layouts
-import { ProjectSettingLayout } from "layouts/setting-layout/project-setting-layout";
+import { AppLayout } from "layouts/app-layout";
+import { ProjectSettingLayout } from "layouts/setting-layout";
// components
import { ProjectSettingHeader } from "components/headers";
import {
@@ -18,9 +19,6 @@ import type { NextPage } from "next";
import { useMobxStore } from "lib/mobx/store-provider";
import { observer } from "mobx-react-lite";
-// services
-// const projectService = new ProjectService();
-
const GeneralSettings: NextPage = observer(() => {
const { project: projectStore } = useMobxStore();
// states
@@ -42,33 +40,34 @@ const GeneralSettings: NextPage = observer(() => {
// const selectedNetwork = NETWORK_CHOICES.find((n) => n.key === watch("network"));
const isAdmin = projectDetails?.member_role === 20;
- console.log("isAdmin", isAdmin);
return (
-
}>
- {projectDetails && (
-
setSelectedProject(null)}
- />
- )}
-
-
- {projectDetails && workspaceSlug ? (
-
- ) : (
-
- )}
-
- {isAdmin && (
-
setSelectedProject(projectDetails.id ?? null)}
+ } withProjectWrapper>
+
+ {projectDetails && (
+ setSelectedProject(null)}
/>
)}
-
-
+
+
+ {projectDetails && workspaceSlug ? (
+
+ ) : (
+
+ )}
+
+ {isAdmin && (
+
setSelectedProject(projectDetails.id ?? null)}
+ />
+ )}
+
+
+
);
});
diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/settings/integrations.tsx b/web/pages/[workspaceSlug]/projects/[projectId]/settings/integrations.tsx
index 7daa2cec1..0011ceff8 100644
--- a/web/pages/[workspaceSlug]/projects/[projectId]/settings/integrations.tsx
+++ b/web/pages/[workspaceSlug]/projects/[projectId]/settings/integrations.tsx
@@ -5,7 +5,8 @@ import { useRouter } from "next/router";
import useSWR from "swr";
// layouts
-import { ProjectSettingLayout } from "layouts/setting-layout/project-setting-layout";
+import { AppLayout } from "layouts/app-layout";
+import { ProjectSettingLayout } from "layouts/setting-layout";
// services
import { IntegrationService } from "services/integrations";
import { ProjectService } from "services/project";
@@ -50,40 +51,42 @@ const ProjectIntegrations: NextPage = () => {
const isAdmin = projectDetails?.member_role === 20;
return (
- }>
-
-
-
Integrations
-
- {workspaceIntegrations ? (
- workspaceIntegrations.length > 0 ? (
-
- {workspaceIntegrations.map((integration) => (
-
- ))}
-
+
}>
+
+
+
+
Integrations
+
+ {workspaceIntegrations ? (
+ workspaceIntegrations.length > 0 ? (
+
+ {workspaceIntegrations.map((integration) => (
+
+ ))}
+
+ ) : (
+
router.push(`/${workspaceSlug}/settings/integrations`),
+ }}
+ disabled={!isAdmin}
+ />
+ )
) : (
- router.push(`/${workspaceSlug}/settings/integrations`),
- }}
- disabled={!isAdmin}
- />
- )
- ) : (
-
-
-
-
-
-
- )}
-
-
+
+
+
+
+
+
+ )}
+
+
+
);
};
diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/settings/labels.tsx b/web/pages/[workspaceSlug]/projects/[projectId]/settings/labels.tsx
index 222cbc90a..6b0ff25e1 100644
--- a/web/pages/[workspaceSlug]/projects/[projectId]/settings/labels.tsx
+++ b/web/pages/[workspaceSlug]/projects/[projectId]/settings/labels.tsx
@@ -9,7 +9,8 @@ import useUserAuth from "hooks/use-user-auth";
// services
import { IssueLabelService } from "services/issue";
// layouts
-import { ProjectSettingLayout } from "layouts/setting-layout/project-setting-layout";
+import { AppLayout } from "layouts/app-layout";
+import { ProjectSettingLayout } from "layouts/setting-layout";
// components
import {
CreateUpdateLabelInline,
@@ -92,43 +93,60 @@ const LabelsSettings: NextPage = () => {
onClose={() => setSelectDeleteLabel(null)}
user={user}
/>
- }>
-
-
-
Labels
+
}>
+
+
+
+
Labels
-
-
-
- {labelForm && (
- {
- setLabelForm(false);
- setIsUpdating(false);
- setLabelToUpdate(null);
- }}
- ref={scrollToRef}
- />
- )}
- <>
- {issueLabels ? (
- issueLabels.length > 0 ? (
- issueLabels.map((label) => {
- const children = issueLabels?.filter((l) => l.parent === label.id);
+
+
+
+ {labelForm && (
+ {
+ setLabelForm(false);
+ setIsUpdating(false);
+ setLabelToUpdate(null);
+ }}
+ ref={scrollToRef}
+ />
+ )}
+ <>
+ {issueLabels ? (
+ issueLabels.length > 0 ? (
+ issueLabels.map((label) => {
+ const children = issueLabels?.filter((l) => l.parent === label.id);
- if (children && children.length === 0) {
- if (!label.parent)
+ if (children && children.length === 0) {
+ if (!label.parent)
+ return (
+ addLabelToGroup(label)}
+ editLabel={(label) => {
+ editLabel(label);
+ scrollToRef.current?.scrollIntoView({
+ behavior: "smooth",
+ });
+ }}
+ handleLabelDelete={() => setSelectDeleteLabel(label)}
+ />
+ );
+ } else
return (
- addLabelToGroup(label)}
+ labelChildren={children}
+ addLabelToGroup={addLabelToGroup}
editLabel={(label) => {
editLabel(label);
scrollToRef.current?.scrollIntoView({
@@ -136,49 +154,34 @@ const LabelsSettings: NextPage = () => {
});
}}
handleLabelDelete={() => setSelectDeleteLabel(label)}
+ user={user}
/>
);
- } else
- return (
- {
- editLabel(label);
- scrollToRef.current?.scrollIntoView({
- behavior: "smooth",
- });
- }}
- handleLabelDelete={() => setSelectDeleteLabel(label)}
- user={user}
- />
- );
- })
+ })
+ ) : (
+ newLabel(),
+ }}
+ />
+ )
) : (
- newLabel(),
- }}
- />
- )
- ) : (
-
-
-
-
-
-
- )}
- >
-
-
-
+
+
+
+
+
+
+ )}
+ >
+
+
+
+
>
);
};
diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/settings/members.tsx b/web/pages/[workspaceSlug]/projects/[projectId]/settings/members.tsx
index a23ac5f5f..7a0b34197 100644
--- a/web/pages/[workspaceSlug]/projects/[projectId]/settings/members.tsx
+++ b/web/pages/[workspaceSlug]/projects/[projectId]/settings/members.tsx
@@ -12,7 +12,8 @@ import useProjectMembers from "hooks/use-project-members";
import useProjectDetails from "hooks/use-project-details";
import { Controller, useForm } from "react-hook-form";
// layouts
-import { ProjectSettingLayout } from "layouts/setting-layout/project-setting-layout";
+import { AppLayout } from "layouts/app-layout";
+import { ProjectSettingLayout } from "layouts/setting-layout";
// components
import ConfirmProjectMemberRemove from "components/project/confirm-project-member-remove";
import SendProjectInvitationModal from "components/project/send-project-invitation-modal";
@@ -196,234 +197,239 @@ const MembersSettings: NextPage = () => {
const isAdmin = memberDetails?.role === 20;
return (
- }>
- {
- setSelectedRemoveMember(null);
- setSelectedInviteRemoveMember(null);
- }}
- data={members.find((item) => item.id === selectedRemoveMember || item.id === selectedInviteRemoveMember)}
- handleDelete={async () => {
- if (!activeWorkspace || !projectDetails) return;
- if (selectedRemoveMember) {
- await projectService.deleteProjectMember(activeWorkspace.slug, projectDetails.id, selectedRemoveMember);
- mutateMembers((prevData: any) => prevData?.filter((item: any) => item.id !== selectedRemoveMember), false);
- }
- if (selectedInviteRemoveMember) {
- await projectInvitationService.deleteProjectInvitation(
- activeWorkspace.slug,
- projectDetails.id,
- selectedInviteRemoveMember
- );
- mutateInvitations(
- (prevData: any) => prevData?.filter((item: any) => item.id !== selectedInviteRemoveMember),
- false
- );
- }
- setToastAlert({
- type: "success",
- message: "Member removed successfully",
- title: "Success",
- });
- }}
- />
- mutateMembers()}
- />
-
-
-
Defaults
-
-
-
-
-
Project Lead
-
- {projectDetails ? (
-
(
- {
- submitChanges({ project_lead: val });
- }}
- isDisabled={!isAdmin}
- />
- )}
- />
- ) : (
-
-
-
- )}
+ }>
+
+ {
+ setSelectedRemoveMember(null);
+ setSelectedInviteRemoveMember(null);
+ }}
+ data={members.find((item) => item.id === selectedRemoveMember || item.id === selectedInviteRemoveMember)}
+ handleDelete={async () => {
+ if (!activeWorkspace || !projectDetails) return;
+ if (selectedRemoveMember) {
+ await projectService.deleteProjectMember(activeWorkspace.slug, projectDetails.id, selectedRemoveMember);
+ mutateMembers(
+ (prevData: any) => prevData?.filter((item: any) => item.id !== selectedRemoveMember),
+ false
+ );
+ }
+ if (selectedInviteRemoveMember) {
+ await projectInvitationService.deleteProjectInvitation(
+ activeWorkspace.slug,
+ projectDetails.id,
+ selectedInviteRemoveMember
+ );
+ mutateInvitations(
+ (prevData: any) => prevData?.filter((item: any) => item.id !== selectedInviteRemoveMember),
+ false
+ );
+ }
+ setToastAlert({
+ type: "success",
+ message: "Member removed successfully",
+ title: "Success",
+ });
+ }}
+ />
+ mutateMembers()}
+ />
+
+
+
Defaults
+
+
+
+
+
Project Lead
+
+ {projectDetails ? (
+ (
+ {
+ submitChanges({ project_lead: val });
+ }}
+ isDisabled={!isAdmin}
+ />
+ )}
+ />
+ ) : (
+
+
+
+ )}
+
-
-
-
Default Assignee
-
- {projectDetails ? (
-
(
- {
- submitChanges({ default_assignee: val });
- }}
- isDisabled={!isAdmin}
- />
- )}
- />
- ) : (
-
-
-
- )}
+
+
Default Assignee
+
+ {projectDetails ? (
+ (
+ {
+ submitChanges({ default_assignee: val });
+ }}
+ isDisabled={!isAdmin}
+ />
+ )}
+ />
+ ) : (
+
+
+
+ )}
+
-
-
-
Members
-
-
- {!projectMembers || !projectInvitations ? (
-
-
-
-
-
-
- ) : (
-
- {members.length > 0
- ? members.map((member) => (
-
-
- {member.avatar && member.avatar !== "" ? (
-
-
-
- ) : member.display_name || member.email ? (
-
- {(member.display_name || member.email)?.charAt(0)}
-
- ) : (
-
- ?
-
- )}
-
- {member.member ? (
-
-
-
- {member.first_name} {member.last_name}
-
- ({member.display_name})
-
-
+
+
Members
+
+
+ {!projectMembers || !projectInvitations ? (
+
+
+
+
+
+
+ ) : (
+
+ {members.length > 0
+ ? members.map((member) => (
+
+
+ {member.avatar && member.avatar !== "" ? (
+
+
+
+ ) : member.display_name || member.email ? (
+
+ {(member.display_name || member.email)?.charAt(0)}
+
) : (
-
{member.display_name || member.email}
+
+ ?
+
)}
- {isOwner &&
{member.email}
}
+
+
+
+ {!member.member && (
+
+ Pending
+
+ )}
+
+
+ {ROLE[member.role as keyof typeof ROLE]}
+
+ {member.memberId !== user?.id && }
+
+ }
+ value={member.role}
+ onChange={(value: 5 | 10 | 15 | 20 | undefined) => {
+ if (!activeWorkspace || !projectDetails) return;
+
+ mutateMembers(
+ (prevData: any) =>
+ prevData.map((m: any) => (m.id === member.id ? { ...m, role: value } : m)),
+ false
+ );
+
+ projectService
+ .updateProjectMember(activeWorkspace.slug, projectDetails.id, member.id, {
+ role: value,
+ })
+ .catch(() => {
+ setToastAlert({
+ type: "error",
+ title: "Error!",
+ message: "An error occurred while updating member role. Please try again.",
+ });
+ });
+ }}
+ disabled={
+ member.memberId === user?.id ||
+ !member.member ||
+ (currentUser && currentUser.role !== 20 && currentUser.role < member.role)
+ }
+ >
+ {Object.keys(ROLE).map((key) => {
+ if (currentUser && currentUser.role !== 20 && currentUser.role < parseInt(key)) return null;
+
+ return (
+
+ <>{ROLE[parseInt(key) as keyof typeof ROLE]}>
+
+ );
+ })}
+
+
+ {
+ if (member.member) setSelectedRemoveMember(member.id);
+ else setSelectedInviteRemoveMember(member.id);
+ }}
+ >
+
+
+
+ {member.memberId !== user?.id ? "Remove member" : "Leave project"}
+
+
+
-
- {!member.member && (
-
- Pending
-
- )}
-
-
- {ROLE[member.role as keyof typeof ROLE]}
-
- {member.memberId !== user?.id && }
-
- }
- value={member.role}
- onChange={(value: 5 | 10 | 15 | 20 | undefined) => {
- if (!activeWorkspace || !projectDetails) return;
-
- mutateMembers(
- (prevData: any) =>
- prevData.map((m: any) => (m.id === member.id ? { ...m, role: value } : m)),
- false
- );
-
- projectService
- .updateProjectMember(activeWorkspace.slug, projectDetails.id, member.id, {
- role: value,
- })
- .catch(() => {
- setToastAlert({
- type: "error",
- title: "Error!",
- message: "An error occurred while updating member role. Please try again.",
- });
- });
- }}
- disabled={
- member.memberId === user?.id ||
- !member.member ||
- (currentUser && currentUser.role !== 20 && currentUser.role < member.role)
- }
- >
- {Object.keys(ROLE).map((key) => {
- if (currentUser && currentUser.role !== 20 && currentUser.role < parseInt(key)) return null;
-
- return (
-
- <>{ROLE[parseInt(key) as keyof typeof ROLE]}>
-
- );
- })}
-
-
- {
- if (member.member) setSelectedRemoveMember(member.id);
- else setSelectedInviteRemoveMember(member.id);
- }}
- >
-
-
-
- {member.memberId !== user?.id ? "Remove member" : "Leave project"}
-
-
-
-
-
- ))
- : null}
-
- )}
-
-
+ ))
+ : null}
+
+ )}
+
+
+
);
};
diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/settings/states.tsx b/web/pages/[workspaceSlug]/projects/[projectId]/settings/states.tsx
index af233d013..d27fe1dcc 100644
--- a/web/pages/[workspaceSlug]/projects/[projectId]/settings/states.tsx
+++ b/web/pages/[workspaceSlug]/projects/[projectId]/settings/states.tsx
@@ -10,7 +10,8 @@ import { ProjectStateService } from "services/project";
import useProjectDetails from "hooks/use-project-details";
import useUserAuth from "hooks/use-user-auth";
// layouts
-import { ProjectSettingLayout } from "layouts/setting-layout/project-setting-layout";
+import { AppLayout } from "layouts/app-layout";
+import { ProjectSettingLayout } from "layouts/setting-layout";
// components
import { CreateUpdateStateInline, DeleteStateModal, SingleState, StateGroup } from "components/states";
import { ProjectSettingHeader } from "components/headers";
@@ -57,81 +58,83 @@ const StatesSettings: NextPage = () => {
onClose={() => setSelectDeleteState(null)}
user={user}
/>
- }>
-
-
-
States
-
-
- {states && projectDetails && orderedStateGroups ? (
- Object.keys(orderedStateGroups).map((key) => {
- if (orderedStateGroups[key].length !== 0)
- return (
-
-
-
{key}
-
-
-
- {key === activeGroup && (
-
{
- setActiveGroup(null);
- setSelectedState(null);
- }}
- data={null}
- selectedGroup={key as keyof StateGroup}
- user={user}
- />
- )}
- {orderedStateGroups[key].map((state, index) =>
- state.id !== selectedState ? (
- setSelectedState(state.id)}
- handleDeleteState={() => setSelectDeleteState(state.id)}
+ }>
+
+
+
+
States
+
+
+ {states && projectDetails && orderedStateGroups ? (
+ Object.keys(orderedStateGroups).map((key) => {
+ if (orderedStateGroups[key].length !== 0)
+ return (
+
+
+
{key}
+
+
+
+ {key === activeGroup && (
+
{
+ setActiveGroup(null);
+ setSelectedState(null);
+ }}
+ data={null}
+ selectedGroup={key as keyof StateGroup}
user={user}
/>
- ) : (
-
- {
- setActiveGroup(null);
- setSelectedState(null);
- }}
- groupLength={orderedStateGroups[key].length}
- data={statesList?.find((state) => state.id === selectedState) ?? null}
- selectedGroup={key as keyof StateGroup}
+ )}
+ {orderedStateGroups[key].map((state, index) =>
+ state.id !== selectedState ? (
+ setSelectedState(state.id)}
+ handleDeleteState={() => setSelectDeleteState(state.id)}
user={user}
/>
-
- )
- )}
+ ) : (
+
+ {
+ setActiveGroup(null);
+ setSelectedState(null);
+ }}
+ groupLength={orderedStateGroups[key].length}
+ data={statesList?.find((state) => state.id === selectedState) ?? null}
+ selectedGroup={key as keyof StateGroup}
+ user={user}
+ />
+
+ )
+ )}
+
-
- );
- })
- ) : (
-
-
-
-
-
-
- )}
+ );
+ })
+ ) : (
+
+
+
+
+
+
+ )}
+
-
-
+
+
>
);
};
diff --git a/web/pages/[workspaceSlug]/settings/billing.tsx b/web/pages/[workspaceSlug]/settings/billing.tsx
index 65a645217..8178d000b 100644
--- a/web/pages/[workspaceSlug]/settings/billing.tsx
+++ b/web/pages/[workspaceSlug]/settings/billing.tsx
@@ -1,6 +1,7 @@
import React from "react";
// layouts
-import { WorkspaceSettingLayout } from "layouts/setting-layout/workspace-setting-layout";
+import { AppLayout } from "layouts/app-layout";
+import { WorkspaceSettingLayout } from "layouts/setting-layout";
// component
import { WorkspaceSettingHeader } from "components/headers";
// ui
@@ -9,24 +10,26 @@ import { Button } from "@plane/ui";
import type { NextPage } from "next";
const BillingSettings: NextPage = () => (
-
}>
-
-
-
+
}>
+
+
-
Current plan
-
You are currently using the free plan
-
-
-
+
+
Billing & Plans
+
-
-
-
+
+
+
Current plan
+
You are currently using the free plan
+
+
+
+
+
+
+
+
);
export default BillingSettings;
diff --git a/web/pages/[workspaceSlug]/settings/exports.tsx b/web/pages/[workspaceSlug]/settings/exports.tsx
index 97e599094..58380df8e 100644
--- a/web/pages/[workspaceSlug]/settings/exports.tsx
+++ b/web/pages/[workspaceSlug]/settings/exports.tsx
@@ -1,20 +1,24 @@
+// layout
+import { AppLayout } from "layouts/app-layout";
+import { WorkspaceSettingLayout } from "layouts/setting-layout";
// components
+import { WorkspaceSettingHeader } from "components/headers";
import ExportGuide from "components/exporter/guide";
// types
import type { NextPage } from "next";
// helper
-import { WorkspaceSettingLayout } from "layouts/setting-layout/workspace-setting-layout";
-import { WorkspaceSettingHeader } from "components/headers";
const ImportExport: NextPage = () => (
-
}>
-
-
-
+
+
);
export default ImportExport;
diff --git a/web/pages/[workspaceSlug]/settings/imports.tsx b/web/pages/[workspaceSlug]/settings/imports.tsx
index 5263a97b7..033a85848 100644
--- a/web/pages/[workspaceSlug]/settings/imports.tsx
+++ b/web/pages/[workspaceSlug]/settings/imports.tsx
@@ -1,20 +1,23 @@
// layouts
-import { WorkspaceSettingLayout } from "layouts/setting-layout/workspace-setting-layout";
+import { WorkspaceSettingLayout } from "layouts/setting-layout";
// components
+import { AppLayout } from "layouts/app-layout";
import IntegrationGuide from "components/integration/guide";
import { WorkspaceSettingHeader } from "components/headers";
// types
import type { NextPage } from "next";
const ImportExport: NextPage = () => (
-
}>
-
-
+
}>
+
+
+
+
);
export default ImportExport;
diff --git a/web/pages/[workspaceSlug]/settings/index.tsx b/web/pages/[workspaceSlug]/settings/index.tsx
index 35fb220e8..5ccd4ed9e 100644
--- a/web/pages/[workspaceSlug]/settings/index.tsx
+++ b/web/pages/[workspaceSlug]/settings/index.tsx
@@ -13,7 +13,8 @@ import { FileService } from "services/file.service";
import useToast from "hooks/use-toast";
import useUserAuth from "hooks/use-user-auth";
// layouts
-import { WorkspaceSettingLayout } from "layouts/setting-layout/workspace-setting-layout";
+import { AppLayout } from "layouts/app-layout";
+import { WorkspaceSettingLayout } from "layouts/setting-layout";
// components
import { ImageUploadModal } from "components/core";
import { DeleteWorkspaceModal } from "components/workspace";
@@ -152,207 +153,209 @@ const WorkspaceSettings: NextPage = () => {
const isAdmin = memberDetails?.role === 20;
return (
-
}>
-
setIsImageUploadModalOpen(false)}
- isRemoving={isImageRemoving}
- handleDelete={() => handleDelete(activeWorkspace?.logo)}
- onSuccess={(imageUrl) => {
- setIsImageUploading(true);
- setValue("logo", imageUrl);
- setIsImageUploadModalOpen(false);
- handleSubmit(onSubmit)().then(() => setIsImageUploading(false));
- }}
- value={watch("logo")}
- />
- {
- setIsOpen(false);
- }}
- data={activeWorkspace ?? null}
- user={user}
- />
- {activeWorkspace ? (
-
-
-
-
-
-
-
{watch("name")}
-
{`${
- typeof window !== "undefined" && window.location.origin.replace("http://", "").replace("https://", "")
- }/${activeWorkspace.slug}`}
-
-
+
+
+
+
+
+
Workspace Name
+ (
+
+ )}
+ />
+
+
+
+
Company Size
+ (
+ c === value) ?? "Select organization size"}
+ width="w-full"
+ input
+ disabled={!isAdmin}
+ >
+ {ORGANIZATION_SIZE?.map((item) => (
+
+ {item}
+
+ ))}
+
+ )}
+ />
+
+
+
+
Workspace URL
+ (
+
+ )}
+ />
+
+
+
+
+
+ {isSubmitting ? "Updating..." : "Update Workspace"}
+
+
+
+ {isAdmin && (
+
+ {({ open }) => (
+
+
+ Delete Workspace
+ {/* */}
+ {open ? : }
+
+
+
+
+
+
+ The danger zone of the workspace delete page is a critical area that requires careful
+ consideration and attention. When deleting a workspace, all of the data and resources within
+ that workspace will be permanently removed and cannot be recovered.
+
+
+ setIsOpen(true)}>
+ Delete my workspace
+
+
+
+
+
+
+ )}
+
+ )}
+
+ ) : (
+
+
+
+ )}
+
+
);
};
diff --git a/web/pages/[workspaceSlug]/settings/integrations.tsx b/web/pages/[workspaceSlug]/settings/integrations.tsx
index 1ec29736e..434925c82 100644
--- a/web/pages/[workspaceSlug]/settings/integrations.tsx
+++ b/web/pages/[workspaceSlug]/settings/integrations.tsx
@@ -7,7 +7,8 @@ import useSWR from "swr";
// services
import { IntegrationService } from "services/integrations";
// layouts
-import { WorkspaceSettingLayout } from "layouts/setting-layout/workspace-setting-layout";
+import { AppLayout } from "layouts/app-layout";
+import { WorkspaceSettingLayout } from "layouts/setting-layout";
// components
import { SingleIntegrationCard } from "components/integration";
import { WorkspaceSettingHeader } from "components/headers";
@@ -32,23 +33,25 @@ const WorkspaceIntegrations: NextPage = () => {
);
return (
-
}>
-
-
-
- {appIntegrations ? (
- appIntegrations.map((integration) => (
-
- ))
- ) : (
-
-
-
-
- )}
-
-
-
+
}>
+
+
+
+
+ {appIntegrations ? (
+ appIntegrations.map((integration) => (
+
+ ))
+ ) : (
+
+
+
+
+ )}
+
+
+
+
);
};
diff --git a/web/pages/[workspaceSlug]/settings/members.tsx b/web/pages/[workspaceSlug]/settings/members.tsx
index 0a2cc7cc9..4c055b687 100644
--- a/web/pages/[workspaceSlug]/settings/members.tsx
+++ b/web/pages/[workspaceSlug]/settings/members.tsx
@@ -12,7 +12,8 @@ import useToast from "hooks/use-toast";
import useUser from "hooks/use-user";
import useWorkspaceMembers from "hooks/use-workspace-members";
// layouts
-import { WorkspaceSettingLayout } from "layouts/setting-layout/workspace-setting-layout";
+import { AppLayout } from "layouts/app-layout";
+import { WorkspaceSettingLayout } from "layouts/setting-layout";
// components
import ConfirmWorkspaceMemberRemove from "components/workspace/confirm-workspace-member-remove";
import SendWorkspaceInvitationModal from "components/workspace/send-workspace-invitation-modal";
@@ -92,218 +93,220 @@ const MembersSettings: NextPage = () => {
};
return (
-
}>
-
{
- setSelectedRemoveMember(null);
- setSelectedInviteRemoveMember(null);
- }}
- data={
- selectedRemoveMember
- ? members.find((item) => item.id === selectedRemoveMember)
- : selectedInviteRemoveMember
- ? members.find((item) => item.id === selectedInviteRemoveMember)
- : null
- }
- handleDelete={async () => {
- if (!workspaceSlug) return;
- if (selectedRemoveMember) {
- workspaceService
- .deleteWorkspaceMember(workspaceSlug as string, selectedRemoveMember)
- .catch((err) => {
- const error = err?.error;
- setToastAlert({
- type: "error",
- title: "Error",
- message: error || "Something went wrong",
- });
- })
- .finally(() => {
- mutateMembers((prevData: any) => prevData?.filter((item: any) => item.id !== selectedRemoveMember));
- });
+ }>
+
+ {
+ setSelectedRemoveMember(null);
+ setSelectedInviteRemoveMember(null);
+ }}
+ data={
+ selectedRemoveMember
+ ? members.find((item) => item.id === selectedRemoveMember)
+ : selectedInviteRemoveMember
+ ? members.find((item) => item.id === selectedInviteRemoveMember)
+ : null
}
- if (selectedInviteRemoveMember) {
- mutateInvitations(
- (prevData: any) => prevData?.filter((item: any) => item.id !== selectedInviteRemoveMember),
- false
- );
- workspaceService
- .deleteWorkspaceInvitations(workspaceSlug as string, selectedInviteRemoveMember)
- .then(() => {
- setToastAlert({
- type: "success",
- title: "Success",
- message: "Member removed successfully",
+ handleDelete={async () => {
+ if (!workspaceSlug) return;
+ if (selectedRemoveMember) {
+ workspaceService
+ .deleteWorkspaceMember(workspaceSlug as string, selectedRemoveMember)
+ .catch((err) => {
+ const error = err?.error;
+ setToastAlert({
+ type: "error",
+ title: "Error",
+ message: error || "Something went wrong",
+ });
+ })
+ .finally(() => {
+ mutateMembers((prevData: any) => prevData?.filter((item: any) => item.id !== selectedRemoveMember));
});
- })
- .catch((err) => {
- const error = err?.error;
- setToastAlert({
- type: "error",
- title: "Error",
- message: error || "Something went wrong",
+ }
+ if (selectedInviteRemoveMember) {
+ mutateInvitations(
+ (prevData: any) => prevData?.filter((item: any) => item.id !== selectedInviteRemoveMember),
+ false
+ );
+ workspaceService
+ .deleteWorkspaceInvitations(workspaceSlug as string, selectedInviteRemoveMember)
+ .then(() => {
+ setToastAlert({
+ type: "success",
+ title: "Success",
+ message: "Member removed successfully",
+ });
+ })
+ .catch((err) => {
+ const error = err?.error;
+ setToastAlert({
+ type: "error",
+ title: "Error",
+ message: error || "Something went wrong",
+ });
+ })
+ .finally(() => {
+ mutateInvitations();
});
- })
- .finally(() => {
- mutateInvitations();
- });
- }
- setSelectedRemoveMember(null);
- setSelectedInviteRemoveMember(null);
- }}
- />
-
-
-
-
Members
- setInviteModal(true)}>
- Add Member
-
-
- {!workspaceMembers || !workspaceInvitations ? (
-
-
-
-
-
-
- ) : (
-
- {members.length > 0
- ? members.map((member) => (
-
-
- {member.avatar && member.avatar !== "" ? (
-
-
-
-
-
- ) : member.display_name || member.email ? (
-
-
- {(member.display_name || member.email)?.charAt(0)}
-
-
- ) : (
-
- ?
-
- )}
-
- {member.member ? (
+ }
+ setSelectedRemoveMember(null);
+ setSelectedInviteRemoveMember(null);
+ }}
+ />
+
+
+
+
Members
+ setInviteModal(true)}>
+ Add Member
+
+
+ {!workspaceMembers || !workspaceInvitations ? (
+
+
+
+
+
+
+ ) : (
+
+ {members.length > 0
+ ? members.map((member) => (
+
+
+
+ {!member?.status && (
+
+ )}
+ {member?.status && !member?.accountCreated && (
+
+ )}
+
+
+ {ROLE[member.role as keyof typeof ROLE]}
+
+ {member.memberId !== user?.id && }
+
+ }
+ value={member.role}
+ onChange={(value: 5 | 10 | 15 | 20 | undefined) => {
+ if (!workspaceSlug) return;
+
+ mutateMembers(
+ (prevData: any) =>
+ prevData?.map((m: any) => (m.id === member.id ? { ...m, role: value } : m)),
+ false
+ );
+
+ workspaceService
+ .updateWorkspaceMember(workspaceSlug?.toString(), member.id, {
+ role: value,
+ })
+ .catch(() => {
+ setToastAlert({
+ type: "error",
+ title: "Error!",
+ message: "An error occurred while updating member role. Please try again.",
+ });
+ });
+ }}
+ disabled={
+ member.memberId === currentUser?.member.id ||
+ !member.status ||
+ (currentUser && currentUser.role !== 20 && currentUser.role < member.role)
+ }
+ >
+ {Object.keys(ROLE).map((key) => {
+ if (currentUser && currentUser.role !== 20 && currentUser.role < parseInt(key)) return null;
+
+ return (
+
+ <>{ROLE[parseInt(key) as keyof typeof ROLE]}>
+
+ );
+ })}
+
+
+ {
+ if (member.member) {
+ setSelectedRemoveMember(member.id);
+ } else {
+ setSelectedInviteRemoveMember(member.id);
+ }
+ }}
+ >
+
+
+
+ {user?.id === member.memberId ? "Leave" : "Remove member"}
+
+
+
-
- {!member?.status && (
-
- )}
- {member?.status && !member?.accountCreated && (
-
- )}
-
-
- {ROLE[member.role as keyof typeof ROLE]}
-
- {member.memberId !== user?.id && }
-
- }
- value={member.role}
- onChange={(value: 5 | 10 | 15 | 20 | undefined) => {
- if (!workspaceSlug) return;
-
- mutateMembers(
- (prevData: any) =>
- prevData?.map((m: any) => (m.id === member.id ? { ...m, role: value } : m)),
- false
- );
-
- workspaceService
- .updateWorkspaceMember(workspaceSlug?.toString(), member.id, {
- role: value,
- })
- .catch(() => {
- setToastAlert({
- type: "error",
- title: "Error!",
- message: "An error occurred while updating member role. Please try again.",
- });
- });
- }}
- disabled={
- member.memberId === currentUser?.member.id ||
- !member.status ||
- (currentUser && currentUser.role !== 20 && currentUser.role < member.role)
- }
- >
- {Object.keys(ROLE).map((key) => {
- if (currentUser && currentUser.role !== 20 && currentUser.role < parseInt(key)) return null;
-
- return (
-
- <>{ROLE[parseInt(key) as keyof typeof ROLE]}>
-
- );
- })}
-
-
- {
- if (member.member) {
- setSelectedRemoveMember(member.id);
- } else {
- setSelectedInviteRemoveMember(member.id);
- }
- }}
- >
-
-
-
- {user?.id === member.memberId ? "Leave" : "Remove member"}
-
-
-
-
-
- ))
- : null}
-
- )}
-
-
+ ))
+ : null}
+
+ )}
+
+
+
);
};
diff --git a/web/pages/[workspaceSlug]/workspace-views/issues.tsx b/web/pages/[workspaceSlug]/workspace-views/issues.tsx
deleted file mode 100644
index ef81e86a9..000000000
--- a/web/pages/[workspaceSlug]/workspace-views/issues.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-// layouts
-import { WorkspaceAuthorizationLayout } from "layouts/auth-layout-legacy";
-// components
-// import { WorkspaceIssuesViewOptions } from "components/issues/workspace-views/workspace-issue-view-option";
-// import { WorkspaceViewIssues } from "components/issues/workspace-views/workpace-view-issues";
-// ui
-import { PrimaryButton } from "components/ui";
-// icons
-import { CheckCircle, Plus } from "lucide-react";
-
-const WorkspaceView = () => (
-
-
- Workspace issues
-
- }
- right={
-
- {/*
*/}
-
{
- const e = new KeyboardEvent("keydown", { key: "c" });
- document.dispatchEvent(e);
- }}
- >
-
- Add Issue
-
-
- }
- >
- {/* */}
-
-);
-
-export default WorkspaceView;