mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 21:40:31 +00:00
fix(microsoft-teams-integration): bug fixes
This commit is contained in:
+3
-4
@@ -86,7 +86,6 @@ export const AddWorkflowIntegrationModal = ({ isOpen, onToggle }: Props) => {
|
||||
return (
|
||||
<div className="relative" key={platform}>
|
||||
<div
|
||||
key={platform}
|
||||
className={twMerge(
|
||||
"flex h-32 w-36 cursor-pointer flex-col items-center space-y-4 rounded border border-mineshaft-500 bg-bunker-600 p-6 transition-all hover:border-primary/70 hover:bg-primary/10 hover:text-white",
|
||||
isConfigured && "border-primary/50 opacity-60"
|
||||
@@ -110,7 +109,7 @@ export const AddWorkflowIntegrationModal = ({ isOpen, onToggle }: Props) => {
|
||||
{isConfigured && (
|
||||
<div className="absolute bottom-0 left-0 right-0 z-30 h-full">
|
||||
<div className="relative h-full">
|
||||
<div className="absolute bottom-0 right-0 w-full flex-row items-center overflow-hidden whitespace-nowrap rounded-b-md bg-primary px-2 py-0.5 text-center text-xs text-black transition-all duration-300 group-hover:w-0 group-hover:p-0">
|
||||
<div className="absolute bottom-0 right-0 w-full flex-row items-center overflow-hidden whitespace-nowrap rounded-b-md bg-primary px-2 py-0.5 text-center text-xs text-black">
|
||||
Already Configured
|
||||
</div>
|
||||
</div>
|
||||
@@ -126,7 +125,7 @@ export const AddWorkflowIntegrationModal = ({ isOpen, onToggle }: Props) => {
|
||||
{wizardStep === WizardSteps.PlatformInputs &&
|
||||
selectedPlatform === WorkflowIntegrationPlatform.SLACK && (
|
||||
<motion.div
|
||||
key="platform-inputs-step"
|
||||
key="platform-inputs-step-slack"
|
||||
transition={{ duration: 0.1 }}
|
||||
initial={{ opacity: 0, translateX: 30 }}
|
||||
animate={{ opacity: 1, translateX: 0 }}
|
||||
@@ -138,7 +137,7 @@ export const AddWorkflowIntegrationModal = ({ isOpen, onToggle }: Props) => {
|
||||
{wizardStep === WizardSteps.PlatformInputs &&
|
||||
selectedPlatform === WorkflowIntegrationPlatform.MICROSOFT_TEAMS && (
|
||||
<motion.div
|
||||
key="platform-inputs-step"
|
||||
key="platform-inputs-step-ms-teams"
|
||||
transition={{ duration: 0.1 }}
|
||||
initial={{ opacity: 0, translateX: 30 }}
|
||||
animate={{ opacity: 1, translateX: 0 }}
|
||||
|
||||
+4
@@ -2,6 +2,7 @@ import { Modal, ModalContent } from "@app/components/v2";
|
||||
import { WorkflowIntegrationPlatform } from "@app/hooks/api/workflowIntegrations/types";
|
||||
|
||||
import { SlackIntegrationForm } from "./SlackIntegrationForm";
|
||||
import { MicrosoftTeamsIntegrationForm } from "./MicrosoftTeamsIntegrationForm";
|
||||
|
||||
type Props = {
|
||||
isOpen?: boolean;
|
||||
@@ -23,6 +24,9 @@ export const EditWorkflowIntegrationModal = ({ isOpen, onClose, integration }: P
|
||||
{integration === WorkflowIntegrationPlatform.SLACK && (
|
||||
<SlackIntegrationForm onClose={handleFormReset} />
|
||||
)}
|
||||
{integration === WorkflowIntegrationPlatform.MICROSOFT_TEAMS && (
|
||||
<MicrosoftTeamsIntegrationForm onClose={handleFormReset} />
|
||||
)}
|
||||
</ModalContent>
|
||||
</Modal>
|
||||
);
|
||||
|
||||
+4
-4
@@ -84,7 +84,7 @@ const formSchema = z
|
||||
}
|
||||
});
|
||||
|
||||
type TSlackConfigForm = z.infer<typeof formSchema>;
|
||||
type TMicrosoftTeamsConfigForm = z.infer<typeof formSchema>;
|
||||
|
||||
type Props = {
|
||||
onClose: () => void;
|
||||
@@ -109,7 +109,7 @@ export const MicrosoftTeamsIntegrationForm = ({ onClose }: Props) => {
|
||||
handleSubmit,
|
||||
setValue,
|
||||
formState: { isDirty, isSubmitting }
|
||||
} = useForm<TSlackConfigForm>({
|
||||
} = useForm<TMicrosoftTeamsConfigForm>({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
isAccessRequestNotificationEnabled: false,
|
||||
@@ -125,7 +125,7 @@ export const MicrosoftTeamsIntegrationForm = ({ onClose }: Props) => {
|
||||
}
|
||||
});
|
||||
|
||||
const handleIntegrationSave = async (data: TSlackConfigForm) => {
|
||||
const handleIntegrationSave = async (data: TMicrosoftTeamsConfigForm) => {
|
||||
try {
|
||||
if (!currentWorkspace) {
|
||||
return;
|
||||
@@ -374,7 +374,7 @@ export const MicrosoftTeamsIntegrationForm = ({ onClose }: Props) => {
|
||||
: [...(value || []), channel.channelId]
|
||||
);
|
||||
}}
|
||||
key={`secret-requests-slack-channel-${channel.channelId}`}
|
||||
key={`secret-requests-microsoft-teams-channel-${channel.channelId}`}
|
||||
iconPos="right"
|
||||
icon={isChecked && <FontAwesomeIcon icon={faCheckCircle} />}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user