From 9e2a03244ed54f1a1c83b2343088f8adc2144a04 Mon Sep 17 00:00:00 2001 From: Aashish-Upadhyay-101 Date: Thu, 30 Mar 2023 01:05:15 +0545 Subject: [PATCH 1/3] typo fixed --- .../Settings/OrgSettingsPage/OrgSettingsPage.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx b/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx index f73249196..d3f8ba628 100644 --- a/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx +++ b/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx @@ -52,12 +52,12 @@ export const OrgSettingsPage = () => { const addIncidentContact = useAddIncidentContact(); const removeIncidentContact = useDeleteIncidentContact(); - const [completeInviteLink, setcompleteInviteLink] = useState("") + const [completeInviteLink, setcompleteInviteLink] = useState(''); const isMoreUsersNotAllowed = (orgUsers || []).length >= 5 && subscriptionPlan === plans.starter && - host === 'https://app.infisical.com' && + host === 'https://app.infisical.com' && currentWorkspace?._id !== '63ea8121b6e2b0543ba79616'; const onRenameOrg = async (name: string) => { @@ -84,7 +84,7 @@ export const OrgSettingsPage = () => { try { await removeUserOrgMembership.mutateAsync({ orgId: currentOrg?._id, membershipId }); createNotification({ - text: 'Successfully removed used from org', + text: 'Successfully removed user from org', type: 'success' }); } catch (error) { @@ -99,11 +99,14 @@ export const OrgSettingsPage = () => { if (!currentOrg?._id) return; try { - const {data} = await addUserToOrg.mutateAsync({ organizationId: currentOrg?._id, inviteeEmail: email }); - setcompleteInviteLink(data?.completeInviteLink) + const { data } = await addUserToOrg.mutateAsync({ + organizationId: currentOrg?._id, + inviteeEmail: email + }); + setcompleteInviteLink(data?.completeInviteLink); // only show this notification when email is configured. A [completeInviteLink] will not be sent if smtp is configured - if (!data.completeInviteLink){ + if (!data.completeInviteLink) { createNotification({ text: 'Successfully invited user to the organization.', type: 'success' From c9e12d33bd30110a6228ab603e009136e47072c8 Mon Sep 17 00:00:00 2001 From: Aashish-Upadhyay-101 Date: Thu, 30 Mar 2023 01:06:43 +0545 Subject: [PATCH 2/3] Revert "typo fixed" This reverts commit 9e2a03244ed54f1a1c83b2343088f8adc2144a04. --- .../Settings/OrgSettingsPage/OrgSettingsPage.tsx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx b/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx index d3f8ba628..f73249196 100644 --- a/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx +++ b/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx @@ -52,12 +52,12 @@ export const OrgSettingsPage = () => { const addIncidentContact = useAddIncidentContact(); const removeIncidentContact = useDeleteIncidentContact(); - const [completeInviteLink, setcompleteInviteLink] = useState(''); + const [completeInviteLink, setcompleteInviteLink] = useState("") const isMoreUsersNotAllowed = (orgUsers || []).length >= 5 && subscriptionPlan === plans.starter && - host === 'https://app.infisical.com' && + host === 'https://app.infisical.com' && currentWorkspace?._id !== '63ea8121b6e2b0543ba79616'; const onRenameOrg = async (name: string) => { @@ -84,7 +84,7 @@ export const OrgSettingsPage = () => { try { await removeUserOrgMembership.mutateAsync({ orgId: currentOrg?._id, membershipId }); createNotification({ - text: 'Successfully removed user from org', + text: 'Successfully removed used from org', type: 'success' }); } catch (error) { @@ -99,14 +99,11 @@ export const OrgSettingsPage = () => { if (!currentOrg?._id) return; try { - const { data } = await addUserToOrg.mutateAsync({ - organizationId: currentOrg?._id, - inviteeEmail: email - }); - setcompleteInviteLink(data?.completeInviteLink); + const {data} = await addUserToOrg.mutateAsync({ organizationId: currentOrg?._id, inviteeEmail: email }); + setcompleteInviteLink(data?.completeInviteLink) // only show this notification when email is configured. A [completeInviteLink] will not be sent if smtp is configured - if (!data.completeInviteLink) { + if (!data.completeInviteLink){ createNotification({ text: 'Successfully invited user to the organization.', type: 'success' From 91c83e04be43faeb1be890ff86d2318424ee4632 Mon Sep 17 00:00:00 2001 From: Aashish-Upadhyay-101 Date: Thu, 30 Mar 2023 01:08:30 +0545 Subject: [PATCH 3/3] fix typo notification message --- .../Settings/OrgSettingsPage/OrgSettingsPage.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx b/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx index f73249196..d3f8ba628 100644 --- a/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx +++ b/frontend/src/views/Settings/OrgSettingsPage/OrgSettingsPage.tsx @@ -52,12 +52,12 @@ export const OrgSettingsPage = () => { const addIncidentContact = useAddIncidentContact(); const removeIncidentContact = useDeleteIncidentContact(); - const [completeInviteLink, setcompleteInviteLink] = useState("") + const [completeInviteLink, setcompleteInviteLink] = useState(''); const isMoreUsersNotAllowed = (orgUsers || []).length >= 5 && subscriptionPlan === plans.starter && - host === 'https://app.infisical.com' && + host === 'https://app.infisical.com' && currentWorkspace?._id !== '63ea8121b6e2b0543ba79616'; const onRenameOrg = async (name: string) => { @@ -84,7 +84,7 @@ export const OrgSettingsPage = () => { try { await removeUserOrgMembership.mutateAsync({ orgId: currentOrg?._id, membershipId }); createNotification({ - text: 'Successfully removed used from org', + text: 'Successfully removed user from org', type: 'success' }); } catch (error) { @@ -99,11 +99,14 @@ export const OrgSettingsPage = () => { if (!currentOrg?._id) return; try { - const {data} = await addUserToOrg.mutateAsync({ organizationId: currentOrg?._id, inviteeEmail: email }); - setcompleteInviteLink(data?.completeInviteLink) + const { data } = await addUserToOrg.mutateAsync({ + organizationId: currentOrg?._id, + inviteeEmail: email + }); + setcompleteInviteLink(data?.completeInviteLink); // only show this notification when email is configured. A [completeInviteLink] will not be sent if smtp is configured - if (!data.completeInviteLink){ + if (!data.completeInviteLink) { createNotification({ text: 'Successfully invited user to the organization.', type: 'success'