feat: greepy review

This commit is contained in:
=
2025-10-20 22:05:02 +05:30
parent 2fa762e56d
commit eec2b30666
25 changed files with 65 additions and 66 deletions
@@ -2,6 +2,7 @@ import { useMutation, useQueryClient } from "@tanstack/react-query";
import { apiRequest } from "@app/config/request";
import { identitiesKeys } from "../identities";
import {
TCreateOrgIdentityMembershipDTO,
TDeleteOrgIdentityMembershipDTO,
@@ -19,8 +20,7 @@ export const useCreateOrgIdentityMembership = () => {
return data.identityMembership;
},
onSuccess: () => {
// Invalidate relevant queries if needed
queryClient.invalidateQueries({ queryKey: ["organization"] });
queryClient.invalidateQueries({ queryKey: identitiesKeys.searchIdentities({ search: {} }) });
}
});
};
@@ -35,8 +35,7 @@ export const useDeleteOrgIdentityMembership = () => {
return data.identityMembership;
},
onSuccess: () => {
// Invalidate relevant queries if needed
queryClient.invalidateQueries({ queryKey: ["organization"] });
queryClient.invalidateQueries({ queryKey: identitiesKeys.searchIdentities({ search: {} }) });
}
});
};
@@ -344,7 +344,7 @@ export const Navbar = () => {
size="xs"
className="flex w-full items-center justify-start p-0 font-normal"
leftIcon={
currentOrg?.id === org.id && (
currentOrg?.parentOrgId === org.id && (
<FontAwesomeIcon
icon={faCheck}
className="mr-3 text-primary"
@@ -654,7 +654,7 @@ export const Navbar = () => {
subTitle="Define a new sub-organization under your current organization."
>
<div className="mb-2">
<NewSubOrganizationForm onClose={() => setShowSubOrgForm(true)} />
<NewSubOrganizationForm onClose={() => setShowSubOrgForm(false)} />
</div>
</ModalContent>
</Modal>
@@ -3,8 +3,8 @@ import { motion } from "framer-motion";
import { CreateOrgModal } from "@app/components/organization/CreateOrgModal";
import { Tab, TabList, Tabs } from "@app/components/v2";
import { usePopUp } from "@app/hooks";
import { useOrganization } from "@app/context";
import { usePopUp } from "@app/hooks";
type Props = {
isHidden?: boolean;
@@ -243,7 +243,7 @@ export const IdentitySection = withPermission(
>
<ModalContent
title="Assign Existing Identity"
subTitle="Assign an existing identity from your organization or namespace to this project. The identity will continue to be managed at its original scope."
subTitle="Assign an existing identity from your root organization to the sub organization. The identity will continue to be managed at its original scope."
>
<IdentityLinkForm onClose={() => handlePopUpClose("linkIdentity")} />
</ModalContent>
@@ -370,7 +370,7 @@ export const IdentityTable = ({ handlePopUpOpen }: Props) => {
<Td>
<p className="truncate">
<FontAwesomeIcon size="sm" className="mr-1.5" icon={faBuilding} />
{currentOrg.id === orgId ? "Organization" : "Root Organization"}
{currentOrg.id === orgId ? "Sub Organization" : "Root Organization"}
</p>
</Td>
)}
@@ -1,4 +1,5 @@
import { createFileRoute } from "@tanstack/react-router";
import { z } from "zod";
import { AppConnectionsPage } from "./AppConnectionsPage";
@@ -6,6 +7,11 @@ export const Route = createFileRoute(
"/_authenticate/_inject-org-details/_org-layout/organization/app-connections/"
)({
component: AppConnectionsPage,
validateSearch: z.object({
error: z.string().optional(),
success: z.string().optional(),
connectionId: z.string().optional()
}),
context: () => ({
breadcrumbs: [
{
@@ -145,7 +145,7 @@ export const IdentityDetailsSection = ({ identityId, handlePopUpOpen, isOrgIdent
</div>
{isSubOrganization && (
<div className="mb-4">
<p className="text-sm font-medium text-mineshaft-300">Manage By</p>
<p className="text-sm font-medium text-mineshaft-300">Managed By</p>
<p className="text-sm text-mineshaft-300">
{isOrgIdentity ? "Organization" : "Root Organization"}
</p>
@@ -3,6 +3,7 @@ import { Controller, useForm } from "react-hook-form";
import { faCheck, faCopy, faRedo } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { zodResolver } from "@hookform/resolvers/zod";
import { useSearch } from "@tanstack/react-router";
import { z } from "zod";
import { createNotification } from "@app/components/notifications";
@@ -22,7 +23,6 @@ import {
import { useTimedReset } from "@app/hooks";
import { useCreatePublicSharedSecret, useCreateSharedSecret } from "@app/hooks/api";
import { SecretSharingAccessType } from "@app/hooks/api/secretSharing";
import { useSearch } from "@tanstack/react-router";
// values in ms
const expiresInOptions = [