Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

fix: merge conflicts from preview

sriram veeraghanta3729011cb056
diff --cc packages/ui/src/form-fields/input.tsx
index fa15901f45,9b645c0224..4e71ea89a0
--- a/packages/ui/src/form-fields/input.tsx
+++ b/packages/ui/src/form-fields/input.tsx
@@@ -4,9 -4,10 +4,10 @@@ import { cn } from "../../helpers"
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
mode?: "primary" | "transparent" | "true-transparent";
- inputSize?: "sm" | "md";
+ inputSize?: "xs" | "sm" | "md";
hasError?: boolean;
className?: string;
+ autoComplete?: "on" | "off";
}
const Input = React.forwardRef<HTMLInputElement, InputProps>((props, ref) => {
diff --cc web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/settings/sidebar.tsx
index c90f155ebe,3b60e15253..91630e9229
--- a/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/settings/sidebar.tsx
+++ b/web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/settings/sidebar.tsx
@@@ -8,13 -9,11 +9,13 @@@ import { Loader } from "@plane/ui"
// components
import { SidebarNavItem } from "@/components/sidebar";
// constants
-import { EUserProjectRoles, PROJECT_SETTINGS_LINKS } from "@/constants/project";
+import { EUserProjectRoles } from "@/constants/project";
// hooks
import { useUser } from "@/hooks/store";
+// plane web constants
+import { PROJECT_SETTINGS_LINKS } from "@/plane-web/constants/project";
- export const ProjectSettingsSidebar = () => {
+ export const ProjectSettingsSidebar = observer(() => {
const { workspaceSlug, projectId } = useParams();
const pathname = usePathname();
// mobx store
diff --cc web/ce/constants/project/settings/tabs.ts
index 6da1430cae,0000000000..d067fba92e
mode 100644,000000..100644
--- a/web/ce/constants/project/settings/tabs.ts
+++ b/web/ce/constants/project/settings/tabs.ts
@@@ -1,82 -1,0 +1,82 @@@
+// icons
+import { SettingIcon } from "@/components/icons/attachment";
+// types
+import { Props } from "@/components/icons/types";
+// constants
+import { EUserProjectRoles } from "@/constants/project";
+
+export const PROJECT_SETTINGS = {
+ general: {
+ key: "general",
+ label: "General",
+ href: `/settings`,
- access: EUserProjectRoles.MEMBER,
++ access: EUserProjectRoles.GUEST,
+ highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/settings/`,
+ Icon: SettingIcon,
+ },
+ members: {
+ key: "members",
+ label: "Members",
+ href: `/settings/members`,
- access: EUserProjectRoles.MEMBER,
++ access: EUserProjectRoles.VIEWER,
+ highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/settings/members/`,
+ Icon: SettingIcon,
+ },
+ features: {
+ key: "features",
+ label: "Features",
+ href: `/settings/features`,
+ access: EUserProjectRoles.ADMIN,
+ highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/settings/features/`,
+ Icon: SettingIcon,
+ },
+ states: {
+ key: "states",
+ label: "States",
+ href: `/settings/states`,
+ access: EUserProjectRoles.MEMBER,
+ highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/settings/states/`,
+ Icon: SettingIcon,
+ },
+ labels: {
+ key: "labels",
+ label: "Labels",
+ href: `/settings/labels`,
+ access: EUserProjectRoles.MEMBER,
+ highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/settings/labels/`,
+ Icon: SettingIcon,
+ },
+ estimates: {
+ key: "estimates",
+ label: "Estimates",
+ href: `/settings/estimates`,
+ access: EUserProjectRoles.ADMIN,
+ highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/settings/estimates/`,
+ Icon: SettingIcon,
+ },
+ automations: {
+ key: "automations",
+ label: "Automations",
+ href: `/settings/automations`,
+ access: EUserProjectRoles.ADMIN,
+ highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/settings/automations/`,
+ Icon: SettingIcon,
+ },
+};
+
+export const PROJECT_SETTINGS_LINKS: {
+ key: string;
+ label: string;
+ href: string;
+ access: EUserProjectRoles;
+ highlight: (pathname: string, baseUrl: string) => boolean;
+ Icon: React.FC<Props>;
+}[] = [
- PROJECT_SETTINGS["general"],
- PROJECT_SETTINGS["members"],
- PROJECT_SETTINGS["features"],
- PROJECT_SETTINGS["states"],
- PROJECT_SETTINGS["labels"],
- PROJECT_SETTINGS["estimates"],
- PROJECT_SETTINGS["automations"],
- ];
++ PROJECT_SETTINGS["general"],
++ PROJECT_SETTINGS["members"],
++ PROJECT_SETTINGS["features"],
++ PROJECT_SETTINGS["states"],
++ PROJECT_SETTINGS["labels"],
++ PROJECT_SETTINGS["estimates"],
++ PROJECT_SETTINGS["automations"],
++];
diff --cc web/core/components/project/send-project-invitation-modal.tsx
index e0c0506154,759137c8d8..c6cc912df4
--- a/web/core/components/project/send-project-invitation-modal.tsx
+++ b/web/core/components/project/send-project-invitation-modal.tsx
@@@ -237,9 -252,17 +252,17 @@@ export const SendProjectInvitationModal
}
onChange={(val: string) => {
onChange(val);
+ // Update the role to the workspace role when member ID changes
+ const workspaceMemberDetails = getWorkspaceMemberDetails(val);
+ const workspaceRole = workspaceMemberDetails?.role ?? 5;
+ const newValue = ROLE[workspaceRole].toUpperCase();
+ setValue(
+ `members.${index}.role`,
+ EUserProjectRoles[newValue as keyof typeof EUserProjectRoles]
+ );
}}
options={options}
- optionsClassName="w-full"
+ optionsClassName="w-48"
/>
);
}}