mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 23:52:09 +00:00
fix: requested changes
This commit is contained in:
@@ -7,7 +7,7 @@ import { workflowIntegrationKeys } from "./queries";
|
||||
import {
|
||||
TCheckMicrosoftTeamsIntegrationInstallationStatusDTO,
|
||||
TCreateMicrosoftTeamsIntegrationDTO,
|
||||
TDeleteMicrosoftTeamsIntegrationIntegrationDTO,
|
||||
TDeleteMicrosoftTeamsIntegrationDTO,
|
||||
TDeleteProjectWorkflowIntegrationDTO,
|
||||
TDeleteSlackIntegrationDTO,
|
||||
TUpdateMicrosoftTeamsIntegrationDTO,
|
||||
@@ -93,7 +93,7 @@ export const useDeleteSlackIntegration = () => {
|
||||
export const useDeleteMicrosoftTeamsIntegration = () => {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
return useMutation<object, object, TDeleteMicrosoftTeamsIntegrationIntegrationDTO>({
|
||||
return useMutation<object, object, TDeleteMicrosoftTeamsIntegrationDTO>({
|
||||
mutationFn: async (dto) => {
|
||||
const { data } = await apiRequest.delete(
|
||||
`/api/v1/workflow-integrations/microsoft-teams/${dto.id}`
|
||||
@@ -118,7 +118,7 @@ export const useUpdateProjectWorkflowIntegrationConfig = () => {
|
||||
return useMutation({
|
||||
mutationFn: async (dto: TUpdateProjectWorkflowIntegrationConfigDTO) => {
|
||||
const { data } = await apiRequest.put(
|
||||
`/api/v1/workspace/${dto.workspaceId}/workflow-integration/${dto.integration}`,
|
||||
`/api/v1/workspace/${dto.workspaceId}/workflow-integration`,
|
||||
dto
|
||||
);
|
||||
|
||||
@@ -138,7 +138,7 @@ export const useDeleteProjectWorkflowIntegration = () => {
|
||||
return useMutation({
|
||||
mutationFn: async (dto: TDeleteProjectWorkflowIntegrationDTO) => {
|
||||
const { data } = await apiRequest.delete(
|
||||
`/api/v1/workspace/${dto.projectId}/workflow-integrations/${dto.integration}/${dto.integrationId}`
|
||||
`/api/v1/workspace/${dto.projectId}/workflow-integration/${dto.integration}/${dto.integrationId}`
|
||||
);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -70,7 +70,7 @@ export type TDeleteSlackIntegrationDTO = {
|
||||
orgId: string;
|
||||
};
|
||||
|
||||
export type TDeleteMicrosoftTeamsIntegrationIntegrationDTO = {
|
||||
export type TDeleteMicrosoftTeamsIntegrationDTO = {
|
||||
id: string;
|
||||
orgId: string;
|
||||
};
|
||||
|
||||
@@ -141,7 +141,7 @@ export const MicrosoftTeamsIntegrationForm = ({ adminIntegrationsConfig }: Props
|
||||
render={({ field, fieldState: { error } }) => (
|
||||
<FormControl
|
||||
label="Bot ID"
|
||||
tooltipClassName="You can find the bot ID in your bot's manifest.json file as the `id` field."
|
||||
tooltipText="You can find the bot ID in your bot's manifest.json file as the `id` field."
|
||||
className="w-96"
|
||||
isError={Boolean(error)}
|
||||
errorText={error?.message}
|
||||
|
||||
+2
-2
@@ -49,7 +49,7 @@ export const MicrosoftTeamsIntegrationForm = ({ id, onClose }: Props) => {
|
||||
}
|
||||
}, [microsoftTeamsIntegration]);
|
||||
|
||||
const handleSlackFormSubmit = async ({
|
||||
const handleMicrosoftTeamsFormSubmit = async ({
|
||||
slug,
|
||||
description,
|
||||
tenantId
|
||||
@@ -97,7 +97,7 @@ export const MicrosoftTeamsIntegrationForm = ({ id, onClose }: Props) => {
|
||||
};
|
||||
|
||||
return (
|
||||
<form onSubmit={handleSubmit(handleSlackFormSubmit)} autoComplete="off">
|
||||
<form onSubmit={handleSubmit(handleMicrosoftTeamsFormSubmit)} autoComplete="off">
|
||||
<Controller
|
||||
control={control}
|
||||
name="slug"
|
||||
|
||||
+1
-1
@@ -214,7 +214,7 @@ export const OrgWorkflowIntegrationTab = withPermission(
|
||||
onClick={async (e) => {
|
||||
e.stopPropagation();
|
||||
|
||||
await triggerSlackReinstall(workflowIntegration.integration);
|
||||
await triggerSlackReinstall(workflowIntegration.id);
|
||||
}}
|
||||
>
|
||||
Reinstall
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ export const AddWorkflowIntegrationModal = ({ isOpen, onToggle }: Props) => {
|
||||
(platform === WorkflowIntegrationPlatform.SLACK && slackConfigured);
|
||||
|
||||
return (
|
||||
<div className="relative">
|
||||
<div className="relative" key={platform}>
|
||||
<div
|
||||
key={platform}
|
||||
className={twMerge(
|
||||
|
||||
+2
-2
@@ -78,7 +78,7 @@ export const MicrosoftTeamsConfigRow = ({ handlePopUpOpen }: Props) => {
|
||||
<Spinner size="xs" />
|
||||
) : (
|
||||
<Badge>
|
||||
{microsoftTeamsConfig.accessRequestChannels?.channelIds
|
||||
{(microsoftTeamsConfig.accessRequestChannels?.channelIds || [])
|
||||
?.map((channel) => microsoftTeamsChannelIdToName[channel])
|
||||
.join(", ")}
|
||||
</Badge>
|
||||
@@ -89,7 +89,7 @@ export const MicrosoftTeamsConfigRow = ({ handlePopUpOpen }: Props) => {
|
||||
<Spinner size="xs" />
|
||||
) : (
|
||||
<Badge>
|
||||
{microsoftTeamsConfig.secretRequestChannels?.channelIds
|
||||
{(microsoftTeamsConfig.secretRequestChannels?.channelIds || [])
|
||||
?.map((channel) => microsoftTeamsChannelIdToName[channel])
|
||||
.join(", ")}
|
||||
</Badge>
|
||||
|
||||
Reference in New Issue
Block a user