mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 09:26:47 +00:00
feat(ui): made corresponding changes in api call made from frontend
This commit is contained in:
@@ -150,8 +150,7 @@ export type DeletOrgMembershipDTO = {
|
|||||||
|
|
||||||
export type AddUserToOrgDTO = {
|
export type AddUserToOrgDTO = {
|
||||||
inviteeEmails: string[];
|
inviteeEmails: string[];
|
||||||
projectIds?: string[];
|
projects?: { id: string; projectRoleSlug: string }[];
|
||||||
projectRoleSlug?: string;
|
|
||||||
organizationRoleSlug: string;
|
organizationRoleSlug: string;
|
||||||
organizationId: string;
|
organizationId: string;
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-2
@@ -129,8 +129,7 @@ export const AddOrgMemberModal = ({
|
|||||||
organizationId: currentOrg?.id,
|
organizationId: currentOrg?.id,
|
||||||
inviteeEmails: emails.split(",").map((email) => email.trim()),
|
inviteeEmails: emails.split(",").map((email) => email.trim()),
|
||||||
organizationRoleSlug,
|
organizationRoleSlug,
|
||||||
projectIds,
|
projects: projectIds.map((id) => ({ id, projectRoleSlug }))
|
||||||
projectRoleSlug
|
|
||||||
});
|
});
|
||||||
|
|
||||||
setCompleteInviteLinks(data?.completeInviteLinks ?? null);
|
setCompleteInviteLinks(data?.completeInviteLinks ?? null);
|
||||||
|
|||||||
+8
-5
@@ -1,10 +1,11 @@
|
|||||||
import { useMemo,useState } from "react";
|
import { useMemo, useState } from "react";
|
||||||
import {
|
import {
|
||||||
faClock,
|
faClock,
|
||||||
faEdit,
|
faEdit,
|
||||||
faMagnifyingGlass,
|
faMagnifyingGlass,
|
||||||
faTrash,
|
faTrash,
|
||||||
faUsers} from "@fortawesome/free-solid-svg-icons";
|
faUsers
|
||||||
|
} from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
@@ -27,12 +28,14 @@ import {
|
|||||||
Th,
|
Th,
|
||||||
THead,
|
THead,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
Tr} from "@app/components/v2";
|
Tr
|
||||||
|
} from "@app/components/v2";
|
||||||
import {
|
import {
|
||||||
ProjectPermissionActions,
|
ProjectPermissionActions,
|
||||||
ProjectPermissionSub,
|
ProjectPermissionSub,
|
||||||
useUser,
|
useUser,
|
||||||
useWorkspace} from "@app/context";
|
useWorkspace
|
||||||
|
} from "@app/context";
|
||||||
import { useGetWorkspaceUsers } from "@app/hooks/api";
|
import { useGetWorkspaceUsers } from "@app/hooks/api";
|
||||||
import { ProjectMembershipRole } from "@app/hooks/api/roles/types";
|
import { ProjectMembershipRole } from "@app/hooks/api/roles/types";
|
||||||
import { TWorkspaceUser } from "@app/hooks/api/types";
|
import { TWorkspaceUser } from "@app/hooks/api/types";
|
||||||
@@ -104,7 +107,7 @@ export const MembersTable = ({ popUp, handlePopUpOpen, handlePopUpToggle }: Prop
|
|||||||
{!isMembersLoading &&
|
{!isMembersLoading &&
|
||||||
filterdUsers?.map((projectMember, index) => {
|
filterdUsers?.map((projectMember, index) => {
|
||||||
const { user: u, inviteEmail, id: membershipId, roles } = projectMember;
|
const { user: u, inviteEmail, id: membershipId, roles } = projectMember;
|
||||||
const name = u ? `${u.firstName} ${u.lastName}` : "-";
|
const name = u.firstName || u.lastName ? `${u.firstName} ${u.lastName || ""}` : "-";
|
||||||
const email = u?.email || inviteEmail;
|
const email = u?.email || inviteEmail;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user