From 2bd170df7d4cbe192ac308ea5255855a2eb2ce87 Mon Sep 17 00:00:00 2001 From: lemmyMwaura Date: Sat, 27 Jul 2024 22:03:44 +0300 Subject: [PATCH 01/19] feat: add queryparam when switching tabs --- .../components/IdentityProjectsSection/IdentityProjectRow.tsx | 2 +- .../UserPage/components/UserProjectsSection/UserProjectRow.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/Org/IdentityPage/components/IdentityProjectsSection/IdentityProjectRow.tsx b/frontend/src/views/Org/IdentityPage/components/IdentityProjectsSection/IdentityProjectRow.tsx index e5ec47f6c..ab908dae9 100644 --- a/frontend/src/views/Org/IdentityPage/components/IdentityProjectsSection/IdentityProjectRow.tsx +++ b/frontend/src/views/Org/IdentityPage/components/IdentityProjectsSection/IdentityProjectRow.tsx @@ -51,7 +51,7 @@ export const IdentityProjectRow = ({ key={`identity-project-membership-${id}`} onClick={() => { if (isAccessible) { - router.push(`/project/${project.id}/members`); + router.push(`/project/${project.id}/members?selectedTab=identities`); return; } diff --git a/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserProjectRow.tsx b/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserProjectRow.tsx index 31c3184af..8d61c252a 100644 --- a/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserProjectRow.tsx +++ b/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserProjectRow.tsx @@ -47,7 +47,7 @@ export const UserProjectRow = ({ key={`user-project-membership-${id}`} onClick={() => { if (isAccessible) { - router.push(`/project/${project.id}/members`); + router.push(`/project/${project.id}/members?selectedTab=members`); return; } From 2e50072caa03a08e1609a5888f83fc634ac6a69c Mon Sep 17 00:00:00 2001 From: lemmyMwaura Date: Sat, 27 Jul 2024 22:04:11 +0300 Subject: [PATCH 02/19] feat: move shared enum to separate file --- frontend/src/types/TabSections.ts | 9 +++++++++ frontend/src/types/index.ts | 2 ++ 2 files changed, 11 insertions(+) create mode 100644 frontend/src/types/TabSections.ts create mode 100644 frontend/src/types/index.ts diff --git a/frontend/src/types/TabSections.ts b/frontend/src/types/TabSections.ts new file mode 100644 index 000000000..f9ca3b207 --- /dev/null +++ b/frontend/src/types/TabSections.ts @@ -0,0 +1,9 @@ +enum TabSections { + Member = "members", + Roles = "roles", + Groups = "groups", + Identities = "identities", + ServiceTokens = "service-tokens" +} + +export default TabSections diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.ts new file mode 100644 index 000000000..58ab663a6 --- /dev/null +++ b/frontend/src/types/index.ts @@ -0,0 +1,2 @@ +import TabSections from "./TabSections"; +export { TabSections }; From 4ac487c97456d8976fdd6e952a82b0e4d7aa5caf Mon Sep 17 00:00:00 2001 From: lemmyMwaura Date: Sat, 27 Jul 2024 22:04:43 +0300 Subject: [PATCH 03/19] feat: selectTab state from url --- .../views/Project/MembersPage/MembersPage.tsx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/frontend/src/views/Project/MembersPage/MembersPage.tsx b/frontend/src/views/Project/MembersPage/MembersPage.tsx index 188d11ede..86f177e7b 100644 --- a/frontend/src/views/Project/MembersPage/MembersPage.tsx +++ b/frontend/src/views/Project/MembersPage/MembersPage.tsx @@ -1,25 +1,33 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ +import { useRouter } from 'next/router'; +import { useEffect, useState } from 'react'; import { Tab, TabList, TabPanel, Tabs } from "@app/components/v2"; import { ProjectPermissionActions, ProjectPermissionSub } from "@app/context"; import { withProjectPermission } from "@app/hoc"; import { IdentityTab, MembersTab,ProjectRoleListTab, ServiceTokenTab } from "./components"; -enum TabSections { - Member = "members", - Roles = "roles", - Groups = "groups", - Identities = "identities", - ServiceTokens = "service-tokens" -} +import { TabSections } from '@app/types'; export const MembersPage = withProjectPermission( () => { + const router = useRouter(); + const { query } = router; + const selectedTab = query.selectedTab as string; + const [activeTab, setActiveTab] = useState(TabSections.Member); + + useEffect(() => { + if (selectedTab && Object.values(TabSections).includes(selectedTab as TabSections)) { + setActiveTab(selectedTab as TabSections); + } + }, [selectedTab]); + return (
+
{selectedTab}

Project Access Control

- + Users From 9e9aff129eb3581e21317f4aac54c61087d0db22 Mon Sep 17 00:00:00 2001 From: lemmyMwaura Date: Sat, 27 Jul 2024 22:12:19 +0300 Subject: [PATCH 04/19] feat: use shared enum for consistent values --- .../components/IdentityProjectsSection/IdentityProjectRow.tsx | 3 ++- .../UserPage/components/UserProjectsSection/UserProjectRow.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/Org/IdentityPage/components/IdentityProjectsSection/IdentityProjectRow.tsx b/frontend/src/views/Org/IdentityPage/components/IdentityProjectsSection/IdentityProjectRow.tsx index ab908dae9..da5c8a156 100644 --- a/frontend/src/views/Org/IdentityPage/components/IdentityProjectsSection/IdentityProjectRow.tsx +++ b/frontend/src/views/Org/IdentityPage/components/IdentityProjectsSection/IdentityProjectRow.tsx @@ -10,6 +10,7 @@ import { useWorkspace } from "@app/context"; import { IdentityMembership } from "@app/hooks/api/identities/types"; import { ProjectMembershipRole } from "@app/hooks/api/roles/types"; import { UsePopUpState } from "@app/hooks/usePopUp"; +import { TabSections } from "@app/types"; type Props = { membership: IdentityMembership; @@ -51,7 +52,7 @@ export const IdentityProjectRow = ({ key={`identity-project-membership-${id}`} onClick={() => { if (isAccessible) { - router.push(`/project/${project.id}/members?selectedTab=identities`); + router.push(`/project/${project.id}/members?selectedTab=${TabSections.Identities}`); return; } diff --git a/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserProjectRow.tsx b/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserProjectRow.tsx index 8d61c252a..0d480a283 100644 --- a/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserProjectRow.tsx +++ b/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserProjectRow.tsx @@ -9,6 +9,7 @@ import { useWorkspace } from "@app/context"; import { ProjectMembershipRole } from "@app/hooks/api/roles/types"; import { TWorkspaceUser } from "@app/hooks/api/types"; import { UsePopUpState } from "@app/hooks/usePopUp"; +import { TabSections } from "@app/types"; type Props = { membership: TWorkspaceUser; @@ -47,7 +48,7 @@ export const UserProjectRow = ({ key={`user-project-membership-${id}`} onClick={() => { if (isAccessible) { - router.push(`/project/${project.id}/members?selectedTab=members`); + router.push(`/project/${project.id}/members?selectedTab=${TabSections.Member}`); return; } From 15749a1f52deba7c22c3b0254ac48ad53e086d51 Mon Sep 17 00:00:00 2001 From: lemmyMwaura Date: Sat, 27 Jul 2024 22:18:56 +0300 Subject: [PATCH 05/19] feat: update url onvalue change --- frontend/src/views/Project/MembersPage/MembersPage.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/Project/MembersPage/MembersPage.tsx b/frontend/src/views/Project/MembersPage/MembersPage.tsx index 86f177e7b..9c5d9d876 100644 --- a/frontend/src/views/Project/MembersPage/MembersPage.tsx +++ b/frontend/src/views/Project/MembersPage/MembersPage.tsx @@ -22,12 +22,19 @@ export const MembersPage = withProjectPermission( } }, [selectedTab]); + const updateSelectedTab = (tab: TabSections) => { + router.push({ + pathname: router.pathname, + query: { ...router.query, selectedTab: tab }, + }); + } + return (
{selectedTab}

Project Access Control

- + Users From ea39ef92699a4f0b154c6deae007accc10e5b188 Mon Sep 17 00:00:00 2001 From: lemmyMwaura Date: Sat, 27 Jul 2024 22:45:53 +0300 Subject: [PATCH 06/19] feat: persist state at the org level when tab switching --- .../views/Org/IdentityPage/IdentityPage.tsx | 3 +- .../src/views/Org/MembersPage/MembersPage.tsx | 31 ++++++++++++++----- frontend/src/views/Org/RolePage/RolePage.tsx | 3 +- frontend/src/views/Org/UserPage/UserPage.tsx | 3 +- 4 files changed, 29 insertions(+), 11 deletions(-) diff --git a/frontend/src/views/Org/IdentityPage/IdentityPage.tsx b/frontend/src/views/Org/IdentityPage/IdentityPage.tsx index 1be789baa..aaf7d7398 100644 --- a/frontend/src/views/Org/IdentityPage/IdentityPage.tsx +++ b/frontend/src/views/Org/IdentityPage/IdentityPage.tsx @@ -24,6 +24,7 @@ import { useRevokeIdentityTokenAuthToken, useRevokeIdentityUniversalAuthClientSecret} from "@app/hooks/api"; import { usePopUp } from "@app/hooks/usePopUp"; +import { TabSections } from "@app/types"; import { IdentityAuthMethodModal } from "../MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityAuthMethodModal"; import { IdentityModal } from "../MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityModal"; @@ -154,7 +155,7 @@ export const IdentityPage = withPermission( type="submit" leftIcon={} onClick={() => { - router.push(`/org/${orgId}/members`); + router.push(`/org/${orgId}/members?selectedTab=${TabSections.Identities}`); }} className="mb-4" > diff --git a/frontend/src/views/Org/MembersPage/MembersPage.tsx b/frontend/src/views/Org/MembersPage/MembersPage.tsx index 0a9363d09..9b787c8d5 100644 --- a/frontend/src/views/Org/MembersPage/MembersPage.tsx +++ b/frontend/src/views/Org/MembersPage/MembersPage.tsx @@ -1,23 +1,38 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ +import { useRouter } from 'next/router'; +import { useEffect, useState } from 'react'; import { Tab, TabList, TabPanel, Tabs } from "@app/components/v2"; import { OrgPermissionActions, OrgPermissionSubjects } from "@app/context"; import { withPermission } from "@app/hoc"; +import { TabSections } from "@app/types"; import { OrgIdentityTab, OrgMembersTab, OrgRoleTabSection } from "./components"; -enum TabSections { - Member = "members", - Roles = "roles", - Identities = "identities" -} - export const MembersPage = withPermission( () => { + const router = useRouter(); + const { query } = router; + const selectedTab = query.selectedTab as string; + const [activeTab, setActiveTab] = useState(TabSections.Member); + + useEffect(() => { + if (selectedTab && Object.values(TabSections).includes(selectedTab as TabSections)) { + setActiveTab(selectedTab as TabSections); + } + }, [selectedTab]); + + const updateSelectedTab = (tab: TabSections) => { + router.push({ + pathname: router.pathname, + query: { ...router.query, selectedTab: tab }, + }); + } + return (

Organization Access Control

- + Users @@ -25,7 +40,7 @@ export const MembersPage = withPermission(

Machine Identities

- Organization Roles + Organization Roles diff --git a/frontend/src/views/Org/RolePage/RolePage.tsx b/frontend/src/views/Org/RolePage/RolePage.tsx index c8e78a54e..b481434cf 100644 --- a/frontend/src/views/Org/RolePage/RolePage.tsx +++ b/frontend/src/views/Org/RolePage/RolePage.tsx @@ -19,6 +19,7 @@ import { OrgPermissionActions, OrgPermissionSubjects, useOrganization } from "@a import { withPermission } from "@app/hoc"; import { useDeleteOrgRole, useGetOrgRole } from "@app/hooks/api"; import { usePopUp } from "@app/hooks/usePopUp"; +import { TabSections } from "@app/types"; import { RoleDetailsSection, RoleModal, RolePermissionsSection } from "./components"; @@ -51,7 +52,7 @@ export const RolePage = withPermission( }); handlePopUpClose("deleteOrgRole"); - router.push(`/org/${orgId}/members`); + router.push(`/org/${orgId}/members?selectedTab=${TabSections.Roles}`); } catch (err) { console.error(err); const error = err as any; diff --git a/frontend/src/views/Org/UserPage/UserPage.tsx b/frontend/src/views/Org/UserPage/UserPage.tsx index 2858d97df..4129af1aa 100644 --- a/frontend/src/views/Org/UserPage/UserPage.tsx +++ b/frontend/src/views/Org/UserPage/UserPage.tsx @@ -29,6 +29,7 @@ import { useUpdateOrgMembership } from "@app/hooks/api"; import { usePopUp } from "@app/hooks/usePopUp"; +import { TabSections } from "@app/types"; import { UserDetailsSection, UserOrgMembershipModal, UserProjectsSection } from "./components"; @@ -111,7 +112,7 @@ export const UserPage = withPermission( type="submit" leftIcon={} onClick={() => { - router.push(`/org/${orgId}/members`); + router.push(`/org/${orgId}/members?selectedTab=${TabSections.Member}`); }} className="mb-4" > From 4aa9cd0f72eb0e58952504cf02731a1457ef7808 Mon Sep 17 00:00:00 2001 From: lemmyMwaura Date: Sat, 27 Jul 2024 22:58:36 +0300 Subject: [PATCH 07/19] feat: also persist the state on delete --- frontend/src/views/Org/IdentityPage/IdentityPage.tsx | 2 +- frontend/src/views/Org/RolePage/RolePage.tsx | 2 +- frontend/src/views/Org/UserPage/UserPage.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/Org/IdentityPage/IdentityPage.tsx b/frontend/src/views/Org/IdentityPage/IdentityPage.tsx index aaf7d7398..7663a1775 100644 --- a/frontend/src/views/Org/IdentityPage/IdentityPage.tsx +++ b/frontend/src/views/Org/IdentityPage/IdentityPage.tsx @@ -76,7 +76,7 @@ export const IdentityPage = withPermission( }); handlePopUpClose("deleteIdentity"); - router.push(`/org/${orgId}/members`); + router.push(`/org/${orgId}/members?selectedTab=${TabSections.Identities}`); } catch (err) { console.error(err); const error = err as any; diff --git a/frontend/src/views/Org/RolePage/RolePage.tsx b/frontend/src/views/Org/RolePage/RolePage.tsx index b481434cf..d0488fcd4 100644 --- a/frontend/src/views/Org/RolePage/RolePage.tsx +++ b/frontend/src/views/Org/RolePage/RolePage.tsx @@ -76,7 +76,7 @@ export const RolePage = withPermission( type="submit" leftIcon={} onClick={() => { - router.push(`/org/${orgId}/members`); + router.push(`/org/${orgId}/members?selectedTab=${TabSections.Roles}`); }} className="mb-4" > diff --git a/frontend/src/views/Org/UserPage/UserPage.tsx b/frontend/src/views/Org/UserPage/UserPage.tsx index 4129af1aa..0ad5a5052 100644 --- a/frontend/src/views/Org/UserPage/UserPage.tsx +++ b/frontend/src/views/Org/UserPage/UserPage.tsx @@ -91,7 +91,7 @@ export const UserPage = withPermission( }); handlePopUpClose("removeMember"); - router.push(`/org/${orgId}/members`); + router.push(`/org/${orgId}/members?selectedTab=${TabSections.Member}`); } catch (err) { console.error(err); createNotification({ From 57320c51fb1abd601ccb78624273b57bc70736b2 Mon Sep 17 00:00:00 2001 From: lemmyMwaura Date: Sat, 27 Jul 2024 23:09:38 +0300 Subject: [PATCH 08/19] fix: add selectedtab when moving back from roles page --- frontend/src/views/Project/RolePage/RolePage.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/Project/RolePage/RolePage.tsx b/frontend/src/views/Project/RolePage/RolePage.tsx index 7e19b49f4..576deae0d 100644 --- a/frontend/src/views/Project/RolePage/RolePage.tsx +++ b/frontend/src/views/Project/RolePage/RolePage.tsx @@ -21,6 +21,7 @@ import { useDeleteProjectRole,useGetProjectRoleBySlug } from "@app/hooks/api"; import { usePopUp } from "@app/hooks/usePopUp"; import { RoleDetailsSection, RoleModal, RolePermissionsSection } from "./components"; +import { TabSections } from "@app/types"; export const RolePage = withProjectPermission( () => { @@ -52,7 +53,7 @@ export const RolePage = withProjectPermission( type: "success" }); handlePopUpClose("deleteRole"); - router.push(`/project/${projectId}/members`); + router.push(`/project/${projectId}/members?selectedTab=${TabSections.Roles}`); } catch (err) { console.error(err); const error = err as any; @@ -75,7 +76,7 @@ export const RolePage = withProjectPermission( variant="link" type="submit" leftIcon={} - onClick={() => router.push(`/project/${projectId}/members`)} + onClick={() => router.push(`/project/${projectId}/members?selectedTab=${TabSections.Roles}`)} className="mb-4" > Roles From d71cb96adf41d6124cd0436ff83d3abff2747ae7 Mon Sep 17 00:00:00 2001 From: lemmyMwaura Date: Sat, 27 Jul 2024 23:33:09 +0300 Subject: [PATCH 09/19] fix(lint): resolve type error --- frontend/src/views/Org/MembersPage/MembersPage.tsx | 2 +- frontend/src/views/Project/MembersPage/MembersPage.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/Org/MembersPage/MembersPage.tsx b/frontend/src/views/Org/MembersPage/MembersPage.tsx index 9b787c8d5..f567ee523 100644 --- a/frontend/src/views/Org/MembersPage/MembersPage.tsx +++ b/frontend/src/views/Org/MembersPage/MembersPage.tsx @@ -21,7 +21,7 @@ export const MembersPage = withPermission( } }, [selectedTab]); - const updateSelectedTab = (tab: TabSections) => { + const updateSelectedTab = (tab: string) => { router.push({ pathname: router.pathname, query: { ...router.query, selectedTab: tab }, diff --git a/frontend/src/views/Project/MembersPage/MembersPage.tsx b/frontend/src/views/Project/MembersPage/MembersPage.tsx index 9c5d9d876..10af057eb 100644 --- a/frontend/src/views/Project/MembersPage/MembersPage.tsx +++ b/frontend/src/views/Project/MembersPage/MembersPage.tsx @@ -22,7 +22,7 @@ export const MembersPage = withProjectPermission( } }, [selectedTab]); - const updateSelectedTab = (tab: TabSections) => { + const updateSelectedTab = (tab: string) => { router.push({ pathname: router.pathname, query: { ...router.query, selectedTab: tab }, From 06900b9c99575503a5f00c36bc40c8e48f65f5c6 Mon Sep 17 00:00:00 2001 From: lemmyMwaura Date: Sun, 28 Jul 2024 07:14:57 +0300 Subject: [PATCH 10/19] refactor: create helper fn to check if string is in TabSections --- frontend/src/types/TabSections.ts | 6 +++++- frontend/src/types/index.ts | 5 +++-- frontend/src/views/Org/MembersPage/MembersPage.tsx | 6 +++--- frontend/src/views/Project/MembersPage/MembersPage.tsx | 6 +++--- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/frontend/src/types/TabSections.ts b/frontend/src/types/TabSections.ts index f9ca3b207..2496d3da8 100644 --- a/frontend/src/types/TabSections.ts +++ b/frontend/src/types/TabSections.ts @@ -6,4 +6,8 @@ enum TabSections { ServiceTokens = "service-tokens" } -export default TabSections +const isTabSection = (value: any): boolean => { + return Object.values(TabSections).includes(value); +} + +export { TabSections, isTabSection } diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.ts index 58ab663a6..76f47c6f2 100644 --- a/frontend/src/types/index.ts +++ b/frontend/src/types/index.ts @@ -1,2 +1,3 @@ -import TabSections from "./TabSections"; -export { TabSections }; +import { TabSections, isTabSection } from "./TabSections"; + +export { TabSections, isTabSection }; diff --git a/frontend/src/views/Org/MembersPage/MembersPage.tsx b/frontend/src/views/Org/MembersPage/MembersPage.tsx index f567ee523..94009caf7 100644 --- a/frontend/src/views/Org/MembersPage/MembersPage.tsx +++ b/frontend/src/views/Org/MembersPage/MembersPage.tsx @@ -4,7 +4,7 @@ import { useEffect, useState } from 'react'; import { Tab, TabList, TabPanel, Tabs } from "@app/components/v2"; import { OrgPermissionActions, OrgPermissionSubjects } from "@app/context"; import { withPermission } from "@app/hoc"; -import { TabSections } from "@app/types"; +import { isTabSection, TabSections } from "@app/types"; import { OrgIdentityTab, OrgMembersTab, OrgRoleTabSection } from "./components"; @@ -16,10 +16,10 @@ export const MembersPage = withPermission( const [activeTab, setActiveTab] = useState(TabSections.Member); useEffect(() => { - if (selectedTab && Object.values(TabSections).includes(selectedTab as TabSections)) { + if (selectedTab && isTabSection(selectedTab)) { setActiveTab(selectedTab as TabSections); } - }, [selectedTab]); + }, [isTabSection, selectedTab]); const updateSelectedTab = (tab: string) => { router.push({ diff --git a/frontend/src/views/Project/MembersPage/MembersPage.tsx b/frontend/src/views/Project/MembersPage/MembersPage.tsx index 10af057eb..877c0ebbd 100644 --- a/frontend/src/views/Project/MembersPage/MembersPage.tsx +++ b/frontend/src/views/Project/MembersPage/MembersPage.tsx @@ -7,7 +7,7 @@ import { withProjectPermission } from "@app/hoc"; import { IdentityTab, MembersTab,ProjectRoleListTab, ServiceTokenTab } from "./components"; -import { TabSections } from '@app/types'; +import { TabSections, isTabSection } from '@app/types'; export const MembersPage = withProjectPermission( () => { @@ -17,10 +17,10 @@ export const MembersPage = withProjectPermission( const [activeTab, setActiveTab] = useState(TabSections.Member); useEffect(() => { - if (selectedTab && Object.values(TabSections).includes(selectedTab as TabSections)) { + if (selectedTab && isTabSection(selectedTab)) { setActiveTab(selectedTab as TabSections); } - }, [selectedTab]); + }, [isTabSection, selectedTab]); const updateSelectedTab = (tab: string) => { router.push({ From f5bc4e1b5fd4121c19f4b85a5ef196e6928c6448 Mon Sep 17 00:00:00 2001 From: lemmyMwaura Date: Sun, 28 Jul 2024 07:50:27 +0300 Subject: [PATCH 11/19] refactor: return value as Tabsection from isTabSection fn (avoids assertion at setState level) --- frontend/src/types/TabSections.ts | 2 +- frontend/src/views/Org/MembersPage/MembersPage.tsx | 3 ++- frontend/src/views/Project/MembersPage/MembersPage.tsx | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/src/types/TabSections.ts b/frontend/src/types/TabSections.ts index 2496d3da8..ef49919bc 100644 --- a/frontend/src/types/TabSections.ts +++ b/frontend/src/types/TabSections.ts @@ -6,7 +6,7 @@ enum TabSections { ServiceTokens = "service-tokens" } -const isTabSection = (value: any): boolean => { +const isTabSection = (value: any): value is TabSections => { return Object.values(TabSections).includes(value); } diff --git a/frontend/src/views/Org/MembersPage/MembersPage.tsx b/frontend/src/views/Org/MembersPage/MembersPage.tsx index 94009caf7..b2916ce56 100644 --- a/frontend/src/views/Org/MembersPage/MembersPage.tsx +++ b/frontend/src/views/Org/MembersPage/MembersPage.tsx @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import { useRouter } from 'next/router'; import { useEffect, useState } from 'react'; + import { Tab, TabList, TabPanel, Tabs } from "@app/components/v2"; import { OrgPermissionActions, OrgPermissionSubjects } from "@app/context"; import { withPermission } from "@app/hoc"; @@ -17,7 +18,7 @@ export const MembersPage = withPermission( useEffect(() => { if (selectedTab && isTabSection(selectedTab)) { - setActiveTab(selectedTab as TabSections); + setActiveTab(selectedTab); } }, [isTabSection, selectedTab]); diff --git a/frontend/src/views/Project/MembersPage/MembersPage.tsx b/frontend/src/views/Project/MembersPage/MembersPage.tsx index 877c0ebbd..818f1304c 100644 --- a/frontend/src/views/Project/MembersPage/MembersPage.tsx +++ b/frontend/src/views/Project/MembersPage/MembersPage.tsx @@ -1,13 +1,14 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import { useRouter } from 'next/router'; import { useEffect, useState } from 'react'; + import { Tab, TabList, TabPanel, Tabs } from "@app/components/v2"; import { ProjectPermissionActions, ProjectPermissionSub } from "@app/context"; import { withProjectPermission } from "@app/hoc"; +import { TabSections, isTabSection } from '@app/types'; import { IdentityTab, MembersTab,ProjectRoleListTab, ServiceTokenTab } from "./components"; -import { TabSections, isTabSection } from '@app/types'; export const MembersPage = withProjectPermission( () => { @@ -18,7 +19,7 @@ export const MembersPage = withProjectPermission( useEffect(() => { if (selectedTab && isTabSection(selectedTab)) { - setActiveTab(selectedTab as TabSections); + setActiveTab(selectedTab); } }, [isTabSection, selectedTab]); From ceb741955dea25922427a55d1d771d2c75d12a67 Mon Sep 17 00:00:00 2001 From: Vlad Matsiiako <78047717+vmatsiiako@users.noreply.github.com> Date: Sun, 28 Jul 2024 10:08:58 -0700 Subject: [PATCH 12/19] Update changelog --- docs/changelog/overview.mdx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/changelog/overview.mdx b/docs/changelog/overview.mdx index d265b546c..1ebdf46e7 100644 --- a/docs/changelog/overview.mdx +++ b/docs/changelog/overview.mdx @@ -4,6 +4,29 @@ title: "Changelog" The changelog below reflects new product developments and updates on a monthly basis. +## July 2024 +- Released the official [Ruby SDK](https://infisical.com/docs/sdks/languages/ruby). +- Increased the speed and efficiency of secret operations. +- Released AWS KMS wrapping (bring your own key). +- Users can now log in to CLI via SSO in non-browser environments. +- Released [Slack Webhooks](https://infisical.com/docs/documentation/platform/webhooks). +- Added [Dynamic Secrets with MS SQL](https://infisical.com/docs/documentation/platform/dynamic-secrets/mssql). +- Redesigned and simplified the Machine Identities page. +- Added the ability to move secrets/folders to another location. +- Added [OIDC](https://infisical.com/docs/documentation/platform/identities/oidc-auth/general) support to CLI, Go SDK, and more. + +## June 2024 +- Released [Infisical PKI](https://infisical.com/docs/documentation/platform/pki/overview). +- Released the official [Go SDK](https://infisical.com/docs/sdks/languages/go). +- Released [OIDC Authentication method](https://infisical.com/docs/documentation/platform/identities/oidc-auth/general). +- Allowed users to configure log retention periods on self-hosted instances. +- Added [tags](https://registry.terraform.io/providers/Infisical/infisical/latest/docs/resources/secret_tag) to terraform provider. +- Released [public secret sharing](https://share.infisical.com). +- Built a [native integration with Rundeck](https://infisical.com/docs/integrations/cicd/rundeck). +- Added list view for projects in the dashboard. +- Fixed offline coding mode in CLI. +- Users are now able to leave a particular project themselves. + ## May 2024 - Released [AWS](https://infisical.com/docs/documentation/platform/identities/aws-auth), [GCP](https://infisical.com/docs/documentation/platform/identities/gcp-auth), [Azure](https://infisical.com/docs/documentation/platform/identities/azure-auth), and [Kubernetes](https://infisical.com/docs/documentation/platform/identities/kubernetes-auth) Native Auth Methods. - Added [Secret Sharing](https://infisical.com/docs/documentation/platform/secret-sharing) functionality for sharing sensitive data through encrypted links – within and outside of an organization. From 3f3e41282dfc11d608820da5454a66cb7baa3a2d Mon Sep 17 00:00:00 2001 From: lemmyMwaura Date: Sun, 28 Jul 2024 20:33:17 +0300 Subject: [PATCH 13/19] fix: remove unnecessary selectedTab div --- frontend/src/views/Project/MembersPage/MembersPage.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/views/Project/MembersPage/MembersPage.tsx b/frontend/src/views/Project/MembersPage/MembersPage.tsx index 818f1304c..6c335cffc 100644 --- a/frontend/src/views/Project/MembersPage/MembersPage.tsx +++ b/frontend/src/views/Project/MembersPage/MembersPage.tsx @@ -33,7 +33,6 @@ export const MembersPage = withProjectPermission( return (
-
{selectedTab}

Project Access Control

From fefe2d1de192790f23a8461ba37ffa28202fc1dc Mon Sep 17 00:00:00 2001 From: Vlad Matsiiako <78047717+vmatsiiako@users.noreply.github.com> Date: Sun, 28 Jul 2024 10:53:44 -0700 Subject: [PATCH 14/19] Update changelog --- docs/changelog/overview.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog/overview.mdx b/docs/changelog/overview.mdx index 1ebdf46e7..b66b07288 100644 --- a/docs/changelog/overview.mdx +++ b/docs/changelog/overview.mdx @@ -14,6 +14,7 @@ The changelog below reflects new product developments and updates on a monthly b - Redesigned and simplified the Machine Identities page. - Added the ability to move secrets/folders to another location. - Added [OIDC](https://infisical.com/docs/documentation/platform/identities/oidc-auth/general) support to CLI, Go SDK, and more. +- Released [Linux installer for Infisical](https://infisical.com/docs/self-hosting/deployment-options/native/standalone-binary). ## June 2024 - Released [Infisical PKI](https://infisical.com/docs/documentation/platform/pki/overview). From 7239158e7f868b6239878d0e81854327559caa4b Mon Sep 17 00:00:00 2001 From: lemmyMwaura Date: Mon, 29 Jul 2024 19:37:19 +0300 Subject: [PATCH 15/19] refactor: localize tabs at both the org and project level --- frontend/src/types/TabSections.ts | 13 ------------- frontend/src/views/Org/types/TabSections.ts | 11 +++++++++++ frontend/src/{ => views/Org}/types/index.ts | 0 frontend/src/views/Project/types/TabSections.ts | 11 +++++++++++ frontend/src/views/Project/types/index.ts | 3 +++ 5 files changed, 25 insertions(+), 13 deletions(-) delete mode 100644 frontend/src/types/TabSections.ts create mode 100644 frontend/src/views/Org/types/TabSections.ts rename frontend/src/{ => views/Org}/types/index.ts (100%) create mode 100644 frontend/src/views/Project/types/TabSections.ts create mode 100644 frontend/src/views/Project/types/index.ts diff --git a/frontend/src/types/TabSections.ts b/frontend/src/types/TabSections.ts deleted file mode 100644 index ef49919bc..000000000 --- a/frontend/src/types/TabSections.ts +++ /dev/null @@ -1,13 +0,0 @@ -enum TabSections { - Member = "members", - Roles = "roles", - Groups = "groups", - Identities = "identities", - ServiceTokens = "service-tokens" -} - -const isTabSection = (value: any): value is TabSections => { - return Object.values(TabSections).includes(value); -} - -export { TabSections, isTabSection } diff --git a/frontend/src/views/Org/types/TabSections.ts b/frontend/src/views/Org/types/TabSections.ts new file mode 100644 index 000000000..ffc93587e --- /dev/null +++ b/frontend/src/views/Org/types/TabSections.ts @@ -0,0 +1,11 @@ +export enum TabSections { + Member = "members", + Roles = "roles", + Groups = "groups", + Identities = "identities", + ServiceTokens = "service-tokens" +} + +export const isTabSection = (value: string): value is TabSections => { + return (Object.values(TabSections) as string[]).includes(value); +} diff --git a/frontend/src/types/index.ts b/frontend/src/views/Org/types/index.ts similarity index 100% rename from frontend/src/types/index.ts rename to frontend/src/views/Org/types/index.ts diff --git a/frontend/src/views/Project/types/TabSections.ts b/frontend/src/views/Project/types/TabSections.ts new file mode 100644 index 000000000..ffc93587e --- /dev/null +++ b/frontend/src/views/Project/types/TabSections.ts @@ -0,0 +1,11 @@ +export enum TabSections { + Member = "members", + Roles = "roles", + Groups = "groups", + Identities = "identities", + ServiceTokens = "service-tokens" +} + +export const isTabSection = (value: string): value is TabSections => { + return (Object.values(TabSections) as string[]).includes(value); +} diff --git a/frontend/src/views/Project/types/index.ts b/frontend/src/views/Project/types/index.ts new file mode 100644 index 000000000..76f47c6f2 --- /dev/null +++ b/frontend/src/views/Project/types/index.ts @@ -0,0 +1,3 @@ +import { TabSections, isTabSection } from "./TabSections"; + +export { TabSections, isTabSection }; From d8169a866df6c9e00c2e13ae0057297667f67256 Mon Sep 17 00:00:00 2001 From: lemmyMwaura Date: Mon, 29 Jul 2024 19:41:02 +0300 Subject: [PATCH 16/19] refactor: update types import path --- frontend/src/views/Org/IdentityPage/IdentityPage.tsx | 2 +- .../components/IdentityProjectsSection/IdentityProjectRow.tsx | 2 +- frontend/src/views/Org/MembersPage/MembersPage.tsx | 2 +- frontend/src/views/Org/RolePage/RolePage.tsx | 2 +- frontend/src/views/Org/UserPage/UserPage.tsx | 2 +- .../UserPage/components/UserProjectsSection/UserProjectRow.tsx | 2 +- frontend/src/views/Project/MembersPage/MembersPage.tsx | 2 +- frontend/src/views/Project/RolePage/RolePage.tsx | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/views/Org/IdentityPage/IdentityPage.tsx b/frontend/src/views/Org/IdentityPage/IdentityPage.tsx index 7663a1775..818954cbc 100644 --- a/frontend/src/views/Org/IdentityPage/IdentityPage.tsx +++ b/frontend/src/views/Org/IdentityPage/IdentityPage.tsx @@ -24,7 +24,7 @@ import { useRevokeIdentityTokenAuthToken, useRevokeIdentityUniversalAuthClientSecret} from "@app/hooks/api"; import { usePopUp } from "@app/hooks/usePopUp"; -import { TabSections } from "@app/types"; +import { TabSections } from"@app/views/Org/types"; import { IdentityAuthMethodModal } from "../MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityAuthMethodModal"; import { IdentityModal } from "../MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityModal"; diff --git a/frontend/src/views/Org/IdentityPage/components/IdentityProjectsSection/IdentityProjectRow.tsx b/frontend/src/views/Org/IdentityPage/components/IdentityProjectsSection/IdentityProjectRow.tsx index da5c8a156..8432b2a48 100644 --- a/frontend/src/views/Org/IdentityPage/components/IdentityProjectsSection/IdentityProjectRow.tsx +++ b/frontend/src/views/Org/IdentityPage/components/IdentityProjectsSection/IdentityProjectRow.tsx @@ -10,7 +10,7 @@ import { useWorkspace } from "@app/context"; import { IdentityMembership } from "@app/hooks/api/identities/types"; import { ProjectMembershipRole } from "@app/hooks/api/roles/types"; import { UsePopUpState } from "@app/hooks/usePopUp"; -import { TabSections } from "@app/types"; +import { TabSections } from "@app/views/Org/types"; type Props = { membership: IdentityMembership; diff --git a/frontend/src/views/Org/MembersPage/MembersPage.tsx b/frontend/src/views/Org/MembersPage/MembersPage.tsx index b2916ce56..09f6b213d 100644 --- a/frontend/src/views/Org/MembersPage/MembersPage.tsx +++ b/frontend/src/views/Org/MembersPage/MembersPage.tsx @@ -5,7 +5,7 @@ import { useEffect, useState } from 'react'; import { Tab, TabList, TabPanel, Tabs } from "@app/components/v2"; import { OrgPermissionActions, OrgPermissionSubjects } from "@app/context"; import { withPermission } from "@app/hoc"; -import { isTabSection, TabSections } from "@app/types"; +import { isTabSection, TabSections } from "@app/views/Org/types";; import { OrgIdentityTab, OrgMembersTab, OrgRoleTabSection } from "./components"; diff --git a/frontend/src/views/Org/RolePage/RolePage.tsx b/frontend/src/views/Org/RolePage/RolePage.tsx index d0488fcd4..0e64b3d01 100644 --- a/frontend/src/views/Org/RolePage/RolePage.tsx +++ b/frontend/src/views/Org/RolePage/RolePage.tsx @@ -19,7 +19,7 @@ import { OrgPermissionActions, OrgPermissionSubjects, useOrganization } from "@a import { withPermission } from "@app/hoc"; import { useDeleteOrgRole, useGetOrgRole } from "@app/hooks/api"; import { usePopUp } from "@app/hooks/usePopUp"; -import { TabSections } from "@app/types"; +import { TabSections } from "@app/views/Org/types"; import { RoleDetailsSection, RoleModal, RolePermissionsSection } from "./components"; diff --git a/frontend/src/views/Org/UserPage/UserPage.tsx b/frontend/src/views/Org/UserPage/UserPage.tsx index 0ad5a5052..7c4db0963 100644 --- a/frontend/src/views/Org/UserPage/UserPage.tsx +++ b/frontend/src/views/Org/UserPage/UserPage.tsx @@ -29,7 +29,7 @@ import { useUpdateOrgMembership } from "@app/hooks/api"; import { usePopUp } from "@app/hooks/usePopUp"; -import { TabSections } from "@app/types"; +import { TabSections } from "@app/views/Org/types"; import { UserDetailsSection, UserOrgMembershipModal, UserProjectsSection } from "./components"; diff --git a/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserProjectRow.tsx b/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserProjectRow.tsx index 0d480a283..3de817d5a 100644 --- a/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserProjectRow.tsx +++ b/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserProjectRow.tsx @@ -9,7 +9,7 @@ import { useWorkspace } from "@app/context"; import { ProjectMembershipRole } from "@app/hooks/api/roles/types"; import { TWorkspaceUser } from "@app/hooks/api/types"; import { UsePopUpState } from "@app/hooks/usePopUp"; -import { TabSections } from "@app/types"; +import { TabSections } from "@app/views/Org/types";; type Props = { membership: TWorkspaceUser; diff --git a/frontend/src/views/Project/MembersPage/MembersPage.tsx b/frontend/src/views/Project/MembersPage/MembersPage.tsx index 6c335cffc..c06accd41 100644 --- a/frontend/src/views/Project/MembersPage/MembersPage.tsx +++ b/frontend/src/views/Project/MembersPage/MembersPage.tsx @@ -5,9 +5,9 @@ import { useEffect, useState } from 'react'; import { Tab, TabList, TabPanel, Tabs } from "@app/components/v2"; import { ProjectPermissionActions, ProjectPermissionSub } from "@app/context"; import { withProjectPermission } from "@app/hoc"; -import { TabSections, isTabSection } from '@app/types'; import { IdentityTab, MembersTab,ProjectRoleListTab, ServiceTokenTab } from "./components"; +import { TabSections, isTabSection } from '../types'; export const MembersPage = withProjectPermission( diff --git a/frontend/src/views/Project/RolePage/RolePage.tsx b/frontend/src/views/Project/RolePage/RolePage.tsx index 576deae0d..189d043f2 100644 --- a/frontend/src/views/Project/RolePage/RolePage.tsx +++ b/frontend/src/views/Project/RolePage/RolePage.tsx @@ -21,7 +21,7 @@ import { useDeleteProjectRole,useGetProjectRoleBySlug } from "@app/hooks/api"; import { usePopUp } from "@app/hooks/usePopUp"; import { RoleDetailsSection, RoleModal, RolePermissionsSection } from "./components"; -import { TabSections } from "@app/types"; +import { TabSections } from '../types'; export const RolePage = withProjectPermission( () => { From 4416b11094604f962b498d786e8c799d629a42a2 Mon Sep 17 00:00:00 2001 From: lemmyMwaura Date: Mon, 29 Jul 2024 19:48:49 +0300 Subject: [PATCH 17/19] refactor: change folder name to uppercase for consistency --- frontend/src/views/Org/IdentityPage/IdentityPage.tsx | 2 +- .../components/IdentityProjectsSection/IdentityProjectRow.tsx | 2 +- frontend/src/views/Org/MembersPage/MembersPage.tsx | 2 +- frontend/src/views/Org/RolePage/RolePage.tsx | 2 +- frontend/src/views/Org/UserPage/UserPage.tsx | 2 +- .../UserPage/components/UserProjectsSection/UserProjectRow.tsx | 2 +- frontend/src/views/Project/MembersPage/MembersPage.tsx | 2 +- frontend/src/views/Project/RolePage/RolePage.tsx | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/views/Org/IdentityPage/IdentityPage.tsx b/frontend/src/views/Org/IdentityPage/IdentityPage.tsx index 818954cbc..3d863f2d3 100644 --- a/frontend/src/views/Org/IdentityPage/IdentityPage.tsx +++ b/frontend/src/views/Org/IdentityPage/IdentityPage.tsx @@ -24,7 +24,7 @@ import { useRevokeIdentityTokenAuthToken, useRevokeIdentityUniversalAuthClientSecret} from "@app/hooks/api"; import { usePopUp } from "@app/hooks/usePopUp"; -import { TabSections } from"@app/views/Org/types"; +import { TabSections } from"@app/views/Org/Types"; import { IdentityAuthMethodModal } from "../MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityAuthMethodModal"; import { IdentityModal } from "../MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityModal"; diff --git a/frontend/src/views/Org/IdentityPage/components/IdentityProjectsSection/IdentityProjectRow.tsx b/frontend/src/views/Org/IdentityPage/components/IdentityProjectsSection/IdentityProjectRow.tsx index 8432b2a48..70a3c998b 100644 --- a/frontend/src/views/Org/IdentityPage/components/IdentityProjectsSection/IdentityProjectRow.tsx +++ b/frontend/src/views/Org/IdentityPage/components/IdentityProjectsSection/IdentityProjectRow.tsx @@ -10,7 +10,7 @@ import { useWorkspace } from "@app/context"; import { IdentityMembership } from "@app/hooks/api/identities/types"; import { ProjectMembershipRole } from "@app/hooks/api/roles/types"; import { UsePopUpState } from "@app/hooks/usePopUp"; -import { TabSections } from "@app/views/Org/types"; +import { TabSections } from "@app/views/Org/Types"; type Props = { membership: IdentityMembership; diff --git a/frontend/src/views/Org/MembersPage/MembersPage.tsx b/frontend/src/views/Org/MembersPage/MembersPage.tsx index 09f6b213d..303411ab0 100644 --- a/frontend/src/views/Org/MembersPage/MembersPage.tsx +++ b/frontend/src/views/Org/MembersPage/MembersPage.tsx @@ -5,7 +5,7 @@ import { useEffect, useState } from 'react'; import { Tab, TabList, TabPanel, Tabs } from "@app/components/v2"; import { OrgPermissionActions, OrgPermissionSubjects } from "@app/context"; import { withPermission } from "@app/hoc"; -import { isTabSection, TabSections } from "@app/views/Org/types";; +import { isTabSection, TabSections } from "@app/views/Org/Types";; import { OrgIdentityTab, OrgMembersTab, OrgRoleTabSection } from "./components"; diff --git a/frontend/src/views/Org/RolePage/RolePage.tsx b/frontend/src/views/Org/RolePage/RolePage.tsx index 0e64b3d01..eb5dae788 100644 --- a/frontend/src/views/Org/RolePage/RolePage.tsx +++ b/frontend/src/views/Org/RolePage/RolePage.tsx @@ -19,7 +19,7 @@ import { OrgPermissionActions, OrgPermissionSubjects, useOrganization } from "@a import { withPermission } from "@app/hoc"; import { useDeleteOrgRole, useGetOrgRole } from "@app/hooks/api"; import { usePopUp } from "@app/hooks/usePopUp"; -import { TabSections } from "@app/views/Org/types"; +import { TabSections } from "@app/views/Org/Types"; import { RoleDetailsSection, RoleModal, RolePermissionsSection } from "./components"; diff --git a/frontend/src/views/Org/UserPage/UserPage.tsx b/frontend/src/views/Org/UserPage/UserPage.tsx index 7c4db0963..f1ac3fae8 100644 --- a/frontend/src/views/Org/UserPage/UserPage.tsx +++ b/frontend/src/views/Org/UserPage/UserPage.tsx @@ -29,7 +29,7 @@ import { useUpdateOrgMembership } from "@app/hooks/api"; import { usePopUp } from "@app/hooks/usePopUp"; -import { TabSections } from "@app/views/Org/types"; +import { TabSections } from "@app/views/Org/Types"; import { UserDetailsSection, UserOrgMembershipModal, UserProjectsSection } from "./components"; diff --git a/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserProjectRow.tsx b/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserProjectRow.tsx index 3de817d5a..0e13442a5 100644 --- a/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserProjectRow.tsx +++ b/frontend/src/views/Org/UserPage/components/UserProjectsSection/UserProjectRow.tsx @@ -9,7 +9,7 @@ import { useWorkspace } from "@app/context"; import { ProjectMembershipRole } from "@app/hooks/api/roles/types"; import { TWorkspaceUser } from "@app/hooks/api/types"; import { UsePopUpState } from "@app/hooks/usePopUp"; -import { TabSections } from "@app/views/Org/types";; +import { TabSections } from "@app/views/Org/Types";; type Props = { membership: TWorkspaceUser; diff --git a/frontend/src/views/Project/MembersPage/MembersPage.tsx b/frontend/src/views/Project/MembersPage/MembersPage.tsx index c06accd41..5b30b1d4e 100644 --- a/frontend/src/views/Project/MembersPage/MembersPage.tsx +++ b/frontend/src/views/Project/MembersPage/MembersPage.tsx @@ -7,7 +7,7 @@ import { ProjectPermissionActions, ProjectPermissionSub } from "@app/context"; import { withProjectPermission } from "@app/hoc"; import { IdentityTab, MembersTab,ProjectRoleListTab, ServiceTokenTab } from "./components"; -import { TabSections, isTabSection } from '../types'; +import { TabSections, isTabSection } from '../Types'; export const MembersPage = withProjectPermission( diff --git a/frontend/src/views/Project/RolePage/RolePage.tsx b/frontend/src/views/Project/RolePage/RolePage.tsx index 189d043f2..95ea64a90 100644 --- a/frontend/src/views/Project/RolePage/RolePage.tsx +++ b/frontend/src/views/Project/RolePage/RolePage.tsx @@ -21,7 +21,7 @@ import { useDeleteProjectRole,useGetProjectRoleBySlug } from "@app/hooks/api"; import { usePopUp } from "@app/hooks/usePopUp"; import { RoleDetailsSection, RoleModal, RolePermissionsSection } from "./components"; -import { TabSections } from '../types'; +import { TabSections } from '../Types'; export const RolePage = withProjectPermission( () => { From b740e8c900e6d91ccd3c51c6e82c41927a04976c Mon Sep 17 00:00:00 2001 From: lemmyMwaura Date: Mon, 29 Jul 2024 20:02:42 +0300 Subject: [PATCH 18/19] Rename types to Types with correct case --- frontend/src/views/Org/{types => Types}/TabSections.ts | 0 frontend/src/views/Org/{types => Types}/index.ts | 0 frontend/src/views/Project/{types => Types}/TabSections.ts | 0 frontend/src/views/Project/{types => Types}/index.ts | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename frontend/src/views/Org/{types => Types}/TabSections.ts (100%) rename frontend/src/views/Org/{types => Types}/index.ts (100%) rename frontend/src/views/Project/{types => Types}/TabSections.ts (100%) rename frontend/src/views/Project/{types => Types}/index.ts (100%) diff --git a/frontend/src/views/Org/types/TabSections.ts b/frontend/src/views/Org/Types/TabSections.ts similarity index 100% rename from frontend/src/views/Org/types/TabSections.ts rename to frontend/src/views/Org/Types/TabSections.ts diff --git a/frontend/src/views/Org/types/index.ts b/frontend/src/views/Org/Types/index.ts similarity index 100% rename from frontend/src/views/Org/types/index.ts rename to frontend/src/views/Org/Types/index.ts diff --git a/frontend/src/views/Project/types/TabSections.ts b/frontend/src/views/Project/Types/TabSections.ts similarity index 100% rename from frontend/src/views/Project/types/TabSections.ts rename to frontend/src/views/Project/Types/TabSections.ts diff --git a/frontend/src/views/Project/types/index.ts b/frontend/src/views/Project/Types/index.ts similarity index 100% rename from frontend/src/views/Project/types/index.ts rename to frontend/src/views/Project/Types/index.ts From 3f3c0aab0f905acc3942df781156e48e9235631f Mon Sep 17 00:00:00 2001 From: lemmyMwaura Date: Mon, 29 Jul 2024 20:04:58 +0300 Subject: [PATCH 19/19] refactor: revert the org level enum to only types that existed before --- frontend/src/views/Org/Types/TabSections.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/views/Org/Types/TabSections.ts b/frontend/src/views/Org/Types/TabSections.ts index ffc93587e..945370d45 100644 --- a/frontend/src/views/Org/Types/TabSections.ts +++ b/frontend/src/views/Org/Types/TabSections.ts @@ -1,9 +1,7 @@ export enum TabSections { Member = "members", Roles = "roles", - Groups = "groups", - Identities = "identities", - ServiceTokens = "service-tokens" + Identities = "identities" } export const isTabSection = (value: string): value is TabSections => {