From 2f5c5e88ad3098ca6b776113fe8a20ebce34e04d Mon Sep 17 00:00:00 2001 From: Rudra Date: Wed, 16 Oct 2024 13:41:25 +0530 Subject: [PATCH 01/12] init --- .../OrganizationManager/CustomSelect.jsx | 47 +++++++----- .../_components/OrganizationManager/List.jsx | 70 +++++++++++++----- frontend/src/_styles/theme.scss | 27 +++++++ server/src/mails/assets/github.png | Bin 16824 -> 12095 bytes server/src/mails/assets/linkedin.png | Bin 6155 -> 6607 bytes server/src/mails/assets/twitter.png | Bin 10389 -> 9321 bytes server/src/mails/assets/youtube.png | Bin 5137 -> 5004 bytes server/src/mails/base/partials/footer.hbs | 8 +- server/src/mails/base/partials/header.hbs | 4 +- 9 files changed, 112 insertions(+), 44 deletions(-) diff --git a/frontend/src/_components/OrganizationManager/CustomSelect.jsx b/frontend/src/_components/OrganizationManager/CustomSelect.jsx index 2642b3a9f1..e070d1e97c 100644 --- a/frontend/src/_components/OrganizationManager/CustomSelect.jsx +++ b/frontend/src/_components/OrganizationManager/CustomSelect.jsx @@ -8,31 +8,42 @@ import { authenticationService } from '@/_services'; import SolidIcon from '@/_ui/Icon/SolidIcons'; import { ToolTip } from '@/_components'; import { decodeEntities } from '@/_helpers/utils'; - const Menu = (props) => { const { t } = useTranslation(); const { admin } = authenticationService.currentSessionValue; const darkMode = localStorage.getItem('darkMode') === 'true'; + return (
- {admin && ( - <> -
props.selectProps.setShowEditOrg(true)} - > -
-
{props?.selectProps?.value?.label}
-
- -
-
+ <> +
props.selectProps.setShowEditOrg(true)} + > +
+
Workspaces ({props.options.length})
+ {admin && ( + +
+ {/* */} + +
+
+ )}
- - )} +
+ +
{props.children}
+
{ const [showEditOrg, setShowEditOrg] = useState(false); const [showCreateOrg, setShowCreateOrg] = useState(false); const darkMode = localStorage.getItem('darkMode') === 'true'; - const currentValue = props?.options.find((option) => option?.value === props?.value); + // const currentValue = props?.options.find((option) => option?.value === props?.value); return ( <> - + {/* */} {org.id === current_organization_id && admin ? ( - +
) : ( org.id !== current_organization_id && ( - +
switchOrganization(org.id)} > - +
) @@ -103,7 +103,7 @@ export const OrganizationList = function () { isLoading={isGettingOrganizations} options={options} value={current_organization_id} - // onChange={(id) => switchOrganization(id)} + onChange={(id) => switchOrganization(id)} className={`tj-org-select ${darkMode && 'dark-theme'}`} />
diff --git a/frontend/src/_styles/theme.scss b/frontend/src/_styles/theme.scss index 724be3e7d2..77233c0dbd 100644 --- a/frontend/src/_styles/theme.scss +++ b/frontend/src/_styles/theme.scss @@ -10677,7 +10677,7 @@ tbody { } .current-org-indicator { - padding: 8px 8px; + padding: 0px 8px 0px 8px; margin-left: auto; margin-right: 5px; } @@ -10698,6 +10698,10 @@ tbody { } } +.org-dropdown-shadow{ + box-shadow: var(--elevation-400-box-shadow) +} + .css-1q0xftk-menu { background-color: var(--base-black) !important; border: 1px solid hsl(197, 6.8%, 13.6%) !important; @@ -10715,6 +10719,14 @@ tbody { .org-custom-select-header-wrap { border-bottom: 1px solid var(--slate5); + + .select-header-font{ +font-size: 14px; +font-weight: 500; +line-height: 20px; +color: var(--text-default); + + } } .btn-close:focus { From 5bbf4b8e3fc6df3ff7ba7adc982085bdd4df8ab4 Mon Sep 17 00:00:00 2001 From: Rudhra Deep Biswas <98055396+rudeUltra@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:50:16 +0530 Subject: [PATCH 05/12] init (#10859) --- .../ManageGroupPermissionsV2.jsx | 9 ++++- .../ManageOrgConstants/ManageOrgConstants.jsx | 35 ++++++++++++++----- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/frontend/src/ManageGroupPermissionsV2/ManageGroupPermissionsV2.jsx b/frontend/src/ManageGroupPermissionsV2/ManageGroupPermissionsV2.jsx index 2a4d39d771..f973837817 100644 --- a/frontend/src/ManageGroupPermissionsV2/ManageGroupPermissionsV2.jsx +++ b/frontend/src/ManageGroupPermissionsV2/ManageGroupPermissionsV2.jsx @@ -684,7 +684,14 @@ class ManageGroupPermissionsComponent extends React.Component { />
)} - + {filteredGroup.length === 0 && showGroupSearchBar && groups.length !== 0 && ( +
+ + + No custom groups found + +
+ )} {groups.length ? ( filteredGroup.map((permissionGroup) => { return ( diff --git a/frontend/src/ManageOrgConstants/ManageOrgConstants.jsx b/frontend/src/ManageOrgConstants/ManageOrgConstants.jsx index bc171967ee..b6548197bd 100644 --- a/frontend/src/ManageOrgConstants/ManageOrgConstants.jsx +++ b/frontend/src/ManageOrgConstants/ManageOrgConstants.jsx @@ -15,8 +15,8 @@ import EmptyState from './EmptyState'; import FolderList from '@/_ui/FolderList/FolderList'; import { BreadCrumbContext } from '@/App'; import './ConstantFormStyle.scss'; -import { Constants } from '@/_helpers/utils'; - +import { Constants, redirectToWorkspace } from '@/_helpers/utils'; +import { SearchBox } from '@/_components/SearchBox'; const MODES = Object.freeze({ CREATE: 'create', EDIT: 'edit', @@ -47,6 +47,7 @@ const ManageOrgConstantsComponent = ({ darkMode }) => { const [searchTerm, setSearchTerm] = useState(''); const [globalCount, setGlobalCount] = useState(0); const [secretCount, setSecretCount] = useState(0); + const NoPermissionMessage = 'You do not have permissions to perform this action'; const handleTabChange = (tab) => { setCurrentPage(1); @@ -62,6 +63,14 @@ const ManageOrgConstantsComponent = ({ darkMode }) => { updateTableData(constants, activeTabEnvironment?.name, 0, perPage, true, activeTab, searchTerm); }; + const handleSearchClear = () => { + const searchTerm = ''; + setSearchTerm(searchTerm); + + // Re-filter the constants based on the current search term and active tab + updateTableData(constants, activeTabEnvironment?.name, 0, perPage, true, activeTab, searchTerm); + }; + const onCancelBtnClicked = () => { setSelectedConstant(null); setIsManageVarDrawerOpen(false); @@ -323,6 +332,9 @@ const ManageOrgConstantsComponent = ({ darkMode }) => { .catch(({ error }) => { setErrors(error); toast.error(error); + if (error === NoPermissionMessage) { + redirectToWorkspace(); + } }) .finally(() => fetchConstantsAndEnvironments()); } @@ -335,7 +347,10 @@ const ManageOrgConstantsComponent = ({ darkMode }) => { }) .catch(({ error }) => { setErrors(error); - toast.error('Constant could not be created'); + toast.error(error || 'Constant could not be created'); + if (error === NoPermissionMessage) { + redirectToWorkspace(); + } }) .finally(() => fetchConstantsAndEnvironments()); }; @@ -358,6 +373,9 @@ const ManageOrgConstantsComponent = ({ darkMode }) => { }) .catch(({ error }) => { toast.error(error); + if (error === NoPermissionMessage) { + redirectToWorkspace(); + } }) .finally(() => fetchConstantsAndEnvironments()); }; @@ -460,12 +478,13 @@ const ManageOrgConstantsComponent = ({ darkMode }) => {
-
From 3a8fa29f58b8f95d80f7e4ec73fad4df25c904bb Mon Sep 17 00:00:00 2001 From: Rohan Lahori <64496391+rohanlahori@users.noreply.github.com> Date: Mon, 21 Oct 2024 12:11:24 +0530 Subject: [PATCH 06/12] onboarding ui changes setup (#10981) --- .../ForgotPasswordForm/ForgotPasswordForm.jsx | 6 +-- .../ForgotPasswordInfoScreen.jsx | 6 +-- .../components/LoginForm/LoginForm.jsx | 6 +-- .../ResetPasswordForm/ResetPasswordForm.jsx | 6 +-- .../ResetPasswordInfoScreen.jsx | 6 +-- .../styles/form-text-input.styles.scss | 13 ++--- .../styles/password-input.styles.scss | 16 +++---- .../styles/submit-button.styles.scss | 20 +++++--- .../OnboardingForm/OnboardingForm.jsx | 6 +-- .../styles/onboarding-form.styles.scss | 2 +- .../OnboardingFormWrapper.jsx | 47 +++++-------------- .../onboarding-form-wrapper.styles.scss | 2 +- .../OnboardingUIWrapper.jsx | 21 +++++++++ .../components/OnboardingUIWrapper/index.js | 1 + .../styles/onboarding-ui-wrapper.styles.scss | 33 +++++++++++++ .../WhiteLabellingBackgroundWrapper.jsx | 19 ++++++++ .../WhiteLabellingBackgroundWrapper/index.js | 1 + .../resources/styles/background.styles.scss | 20 ++++++++ .../WhiteLabellingFormWrapper.jsx | 37 +++++++++++++++ .../WhiteLabellingFormWrapper/index.js | 1 + .../whitelabelling-form-wrapper.styles.scss | 5 ++ .../modules/onboarding/components/index.js | 2 + .../SetupAdminForm/SetupAdminForm.jsx | 6 +-- .../SetupToolJetPage/SetupToolJetPage.jsx | 6 +-- .../components/SignupForm/SignupForm.jsx | 6 +-- .../SignupSuccessInfo/SignupSuccessInfo.jsx | 6 +-- .../WorkspaceInvitationPage.jsx | 6 +-- 27 files changed, 215 insertions(+), 91 deletions(-) create mode 100644 frontend/src/modules/onboarding/components/OnboardingUIWrapper/OnboardingUIWrapper.jsx create mode 100644 frontend/src/modules/onboarding/components/OnboardingUIWrapper/index.js create mode 100644 frontend/src/modules/onboarding/components/OnboardingUIWrapper/resources/styles/onboarding-ui-wrapper.styles.scss create mode 100644 frontend/src/modules/onboarding/components/WhiteLabellingBackgroundWrapper/WhiteLabellingBackgroundWrapper.jsx create mode 100644 frontend/src/modules/onboarding/components/WhiteLabellingBackgroundWrapper/index.js create mode 100644 frontend/src/modules/onboarding/components/WhiteLabellingBackgroundWrapper/resources/styles/background.styles.scss create mode 100644 frontend/src/modules/onboarding/components/WhiteLabellingFormWrapper/WhiteLabellingFormWrapper.jsx create mode 100644 frontend/src/modules/onboarding/components/WhiteLabellingFormWrapper/index.js create mode 100644 frontend/src/modules/onboarding/components/WhiteLabellingFormWrapper/resources/styles/whitelabelling-form-wrapper.styles.scss diff --git a/frontend/src/modules/auth/pages/ForgotPasswordPage/components/ForgotPasswordForm/ForgotPasswordForm.jsx b/frontend/src/modules/auth/pages/ForgotPasswordPage/components/ForgotPasswordForm/ForgotPasswordForm.jsx index 8c17e682a3..82b298700e 100644 --- a/frontend/src/modules/auth/pages/ForgotPasswordPage/components/ForgotPasswordForm/ForgotPasswordForm.jsx +++ b/frontend/src/modules/auth/pages/ForgotPasswordPage/components/ForgotPasswordForm/ForgotPasswordForm.jsx @@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { Link } from 'react-router-dom'; import { validateEmail } from '@/_helpers/utils'; -import { OnboardingFormWrapper, OnboardingFormInsideWrapper } from '@/modules/onboarding/components'; +import { OnboardingUIWrapper, OnboardingFormInsideWrapper } from '@/modules/onboarding/components'; import { FormTextInput, SubmitButton, FormHeader } from '@/modules/common/components'; import { retrieveWhiteLabelText } from '@white-label/whiteLabelling'; import './resources/styles/forgot-password-form.styles.scss'; @@ -43,7 +43,7 @@ const ForgotPasswordForm = ({ onSubmit }) => { }; return ( - +
{t('forgotPasswordPage.forgotPassword', 'Forgot Password')} @@ -77,7 +77,7 @@ const ForgotPasswordForm = ({ onSubmit }) => {
-
+ ); }; diff --git a/frontend/src/modules/auth/pages/ForgotPasswordPage/components/ForgotPasswordInfoScreen/ForgotPasswordInfoScreen.jsx b/frontend/src/modules/auth/pages/ForgotPasswordPage/components/ForgotPasswordInfoScreen/ForgotPasswordInfoScreen.jsx index f1676ea806..5ec9d3708e 100644 --- a/frontend/src/modules/auth/pages/ForgotPasswordPage/components/ForgotPasswordInfoScreen/ForgotPasswordInfoScreen.jsx +++ b/frontend/src/modules/auth/pages/ForgotPasswordPage/components/ForgotPasswordInfoScreen/ForgotPasswordInfoScreen.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { useNavigate } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; -import { OnboardingFormWrapper } from '@/modules/onboarding/components'; +import { OnboardingUIWrapper } from '@/modules/onboarding/components'; import { FormHeader } from '@/modules/common/components'; import './resources/styles/forgot-password-info.styles.scss'; import SepratorComponent from '@/modules/common/components/SepratorComponent'; @@ -19,7 +19,7 @@ const ForgotPasswordInfoScreen = ({ email }) => { return (
- + {t('forgotPasswordInfo.header', 'Check your mail')}

{message}

{info} @@ -29,7 +29,7 @@ const ForgotPasswordInfoScreen = ({ email }) => { {t('forgotPasswordInfo.backToLogin', 'Back to login')}
- + ); }; diff --git a/frontend/src/modules/auth/pages/LoginPage/components/LoginForm/LoginForm.jsx b/frontend/src/modules/auth/pages/LoginPage/components/LoginForm/LoginForm.jsx index 38e5496ce6..51fd3a24ab 100644 --- a/frontend/src/modules/auth/pages/LoginPage/components/LoginForm/LoginForm.jsx +++ b/frontend/src/modules/auth/pages/LoginPage/components/LoginForm/LoginForm.jsx @@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { Link } from 'react-router-dom'; import { validateEmail, validatePassword } from '@/_helpers/utils'; -import { OnboardingFormWrapper, OnboardingFormInsideWrapper } from '@/modules/onboarding/components'; +import { OnboardingUIWrapper, OnboardingFormInsideWrapper } from '@/modules/onboarding/components'; import { FormTextInput, PasswordInput, SubmitButton, FormHeader, SSOAuthModule } from '@/modules/common/components'; import { redirectToDashboard } from '@/_helpers/routes'; import './resources/styles/login-form.styles.scss'; @@ -107,7 +107,7 @@ const LoginForm = ({ return (
- + {noLoginMethodsEnabled ? (
@@ -184,7 +184,7 @@ const LoginForm = ({ )} - +
); }; diff --git a/frontend/src/modules/auth/pages/ResetPasswordPage/components/ResetPasswordForm/ResetPasswordForm.jsx b/frontend/src/modules/auth/pages/ResetPasswordPage/components/ResetPasswordForm/ResetPasswordForm.jsx index 382b35a58c..658af48dda 100644 --- a/frontend/src/modules/auth/pages/ResetPasswordPage/components/ResetPasswordForm/ResetPasswordForm.jsx +++ b/frontend/src/modules/auth/pages/ResetPasswordPage/components/ResetPasswordForm/ResetPasswordForm.jsx @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'; import { toast } from 'react-hot-toast'; import { useTranslation } from 'react-i18next'; import { authenticationService } from '@/_services'; -import { OnboardingFormWrapper, OnboardingFormInsideWrapper } from '@/modules/onboarding/components'; +import { OnboardingUIWrapper, OnboardingFormInsideWrapper } from '@/modules/onboarding/components'; import { PasswordInput, SubmitButton, FormHeader } from '@/modules/common/components'; import './resources/styles/reset-password-form.styles.scss'; @@ -89,7 +89,7 @@ const ResetPasswordForm = ({ token, onResetSuccess }) => { }; return (
- + {t('Reset Password')} @@ -114,7 +114,7 @@ const ResetPasswordForm = ({ token, onResetSuccess }) => { - +
); }; diff --git a/frontend/src/modules/auth/pages/ResetPasswordPage/components/ResetPasswordInfoScreen/ResetPasswordInfoScreen.jsx b/frontend/src/modules/auth/pages/ResetPasswordPage/components/ResetPasswordInfoScreen/ResetPasswordInfoScreen.jsx index 927a1a51c2..1f19e9e72e 100644 --- a/frontend/src/modules/auth/pages/ResetPasswordPage/components/ResetPasswordInfoScreen/ResetPasswordInfoScreen.jsx +++ b/frontend/src/modules/auth/pages/ResetPasswordPage/components/ResetPasswordInfoScreen/ResetPasswordInfoScreen.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { useNavigate } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; -import { OnboardingFormWrapper } from '@/modules/onboarding/components'; +import { OnboardingUIWrapper } from '@/modules/onboarding/components'; import { FormHeader } from '@/modules/common/components'; import { retrieveWhiteLabelText } from '@white-label/whiteLabelling'; @@ -15,7 +15,7 @@ const ForgotPasswordInfoScreen = ({ email }) => { return (
- + Password has been reset

{message}

@@ -31,7 +31,7 @@ const ForgotPasswordInfoScreen = ({ email }) => { {t('forgotPasswordInfo.backToLogin', 'Back to login')}
-
+
); }; diff --git a/frontend/src/modules/common/components/FormTextInput/resources/styles/form-text-input.styles.scss b/frontend/src/modules/common/components/FormTextInput/resources/styles/form-text-input.styles.scss index d14e7c5e79..42e65a5cb3 100644 --- a/frontend/src/modules/common/components/FormTextInput/resources/styles/form-text-input.styles.scss +++ b/frontend/src/modules/common/components/FormTextInput/resources/styles/form-text-input.styles.scss @@ -3,7 +3,7 @@ display: block; margin-bottom: 2px; font-family: "IBM Plex Sans"; - font-size: 12px; + font-size: 14px; font-style: normal; font-weight: 500; line-height: 18px; @@ -15,21 +15,21 @@ } &__required-disabled { - color: #495057; + color: #545B64; } &__field { width: 100%; - height: 32px; - padding: 7px 6px; + height: 40px; + padding: 7px 12px; font-family: "IBM Plex Sans"; - font-size: 12px; + font-size: 14px; font-style: normal; font-weight: 400; line-height: 18px; color: var(--Text-default, #1B1F24); background-clip: padding-box; - border-radius: var(--Border-radius, 8px); + border-radius: var(--Border-radius, 10px); border: 1px solid var(--Border-default, #CCD1D5); background: var(--Background-surface-layer-01, #FFF); transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; @@ -64,6 +64,7 @@ font-size: 10px; margin-top: 2px; height: 14px; + &__error-enabled { margin-bottom: 4px; display: block; diff --git a/frontend/src/modules/common/components/PasswordInput/resources/styles/password-input.styles.scss b/frontend/src/modules/common/components/PasswordInput/resources/styles/password-input.styles.scss index 5d9ab43df1..41a90dc587 100644 --- a/frontend/src/modules/common/components/PasswordInput/resources/styles/password-input.styles.scss +++ b/frontend/src/modules/common/components/PasswordInput/resources/styles/password-input.styles.scss @@ -5,7 +5,7 @@ display: block; margin-bottom: 2px; font-family: "IBM Plex Sans"; - font-size: 12px; + font-size: 14px; font-style: normal; font-weight: 500; line-height: 18px; @@ -22,17 +22,17 @@ &__field { width: 100%; - height: 32px; - padding: 7px 6px; - padding-right: 30px; + height: 40px; + padding: 7px 12px; + padding-right: 25px; font-family: "IBM Plex Sans"; - font-size: 12px; + font-size: 14px; font-style: normal; font-weight: 400; line-height: 18px; color: var(--Text-default, #1B1F24); background-clip: padding-box; - border-radius: var(--Border-radius, 8px); + border-radius: var(--Border-radius, 10px); border: 1px solid var(--Border-default, #CCD1D5); background: var(--Background-surface-layer-01, #FFF); transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; @@ -66,9 +66,7 @@ cursor: pointer; font-size: .7rem; color: #6c757d; - padding: 0.5rem; - padding-left: 4px; - margin-left: 10px; + padding: 0.25rem; &:focus { outline: none; diff --git a/frontend/src/modules/common/components/SubmitButton/resources/styles/submit-button.styles.scss b/frontend/src/modules/common/components/SubmitButton/resources/styles/submit-button.styles.scss index bba7200fe1..15c71ae874 100644 --- a/frontend/src/modules/common/components/SubmitButton/resources/styles/submit-button.styles.scss +++ b/frontend/src/modules/common/components/SubmitButton/resources/styles/submit-button.styles.scss @@ -1,17 +1,23 @@ .submit-button { - height: 32px; + height: 40px; width: fit-content; min-width: 87px; - border-radius: var(--4, 8px); - margin: 10px 8px; - padding: 6px 8px; + border-radius: var(--Border-radius, 10px); + margin: 10px; + padding: 10px 20px; + + display: flex; + justify-content: center; + align-items: center; + gap: var(--Border-gap, 8px); .button-text { color: var(--Text-on-color, #FFF); - font-size: 12px; + font-size: 14px; font-style: normal; + font-family: 'IBM Plex Sans'; font-weight: 500; - line-height: 18px; + line-height: 20px; } &:disabled { @@ -32,4 +38,4 @@ cursor: auto !important; } } -} +} \ No newline at end of file diff --git a/frontend/src/modules/onboarding/components/OnboardingForm/OnboardingForm.jsx b/frontend/src/modules/onboarding/components/OnboardingForm/OnboardingForm.jsx index ea2760fd32..b8a5069a77 100644 --- a/frontend/src/modules/onboarding/components/OnboardingForm/OnboardingForm.jsx +++ b/frontend/src/modules/onboarding/components/OnboardingForm/OnboardingForm.jsx @@ -1,6 +1,6 @@ import React from 'react'; import { FormHeader, FormDescription, SubmitButton } from '@/modules/common/components'; -import { OnboardingFormWrapper, OnboardingFormInsideWrapper } from '@/modules/onboarding/components'; +import { OnboardingUIWrapper, OnboardingFormInsideWrapper } from '@/modules/onboarding/components'; import useOnboardingStore from '@/modules/onboarding/stores/onboardingStore'; import useInvitationsStore from '@/modules/onboarding/stores/invitationsStore'; import { shallow } from 'zustand/shallow'; @@ -48,7 +48,7 @@ const OnboardingForm = ({ }); return ( - +
{shouldShowSteps && ( @@ -75,7 +75,7 @@ const OnboardingForm = ({
-
+
); }; diff --git a/frontend/src/modules/onboarding/components/OnboardingForm/resources/styles/onboarding-form.styles.scss b/frontend/src/modules/onboarding/components/OnboardingForm/resources/styles/onboarding-form.styles.scss index db2e93196e..a6048ef3c7 100644 --- a/frontend/src/modules/onboarding/components/OnboardingForm/resources/styles/onboarding-form.styles.scss +++ b/frontend/src/modules/onboarding/components/OnboardingForm/resources/styles/onboarding-form.styles.scss @@ -38,4 +38,4 @@ .__ce { padding-top: 24px !important; -} +} \ No newline at end of file diff --git a/frontend/src/modules/onboarding/components/OnboardingFormWrapper/OnboardingFormWrapper.jsx b/frontend/src/modules/onboarding/components/OnboardingFormWrapper/OnboardingFormWrapper.jsx index eab5e63a30..73e1acff0f 100644 --- a/frontend/src/modules/onboarding/components/OnboardingFormWrapper/OnboardingFormWrapper.jsx +++ b/frontend/src/modules/onboarding/components/OnboardingFormWrapper/OnboardingFormWrapper.jsx @@ -1,47 +1,26 @@ import React, { useEffect, useState } from 'react'; import Logo from '@/modules/common/resources/images/Logo'; import './resources/styles/onboarding-form-wrapper.styles.scss'; -import { - retrieveWhiteLabelLogo, - fetchWhiteLabelDetails, - defaultWhiteLabellingSettings, -} from '@white-label/whiteLabelling'; import { getSubpath } from '@/_helpers/routes'; +import WhiteLabellingFormWrapper from '@/modules/onboarding/components/WhiteLabellingFormWrapper'; +import { defaultWhiteLabellingSettings, retrieveWhiteLabelFavicon } from '@white-label/whiteLabelling'; const OnboardingFormWrapper = ({ children: components }) => { - const [whiteLabelLogo, setWhiteLableLogo] = useState(null); - const [imageWidth, setImageWidth] = useState(130); - const img = new Image(); - const handleLoad = () => { - const { naturalWidth } = img; - setImageWidth(naturalWidth < 130 ? naturalWidth : 130); - }; - useEffect(() => { - fetchWhiteLabelDetails(); - const data = retrieveWhiteLabelLogo(); - setWhiteLableLogo(data); - }, []); - useEffect(() => { - if (!whiteLabelLogo) return; - img.src = whiteLabelLogo; - img.addEventListener('load', handleLoad); - return () => { - img.removeEventListener('load', handleLoad); - }; - }, [whiteLabelLogo]); + const whiteLabelLogoTest = retrieveWhiteLabelFavicon(); + const defaultWhiteLabelLogoTest = defaultWhiteLabellingSettings.WHITE_LABEL_FAVICON; + const isWhiteLabelApplied = !(whiteLabelLogoTest === defaultWhiteLabelLogoTest); const redirectToLoginPage = () => { window.location.href = getSubpath() ? `${getSubpath()}` : '/'; }; + if (window.location.pathname != '/setup' && isWhiteLabelApplied == null) { + return
; + } + if (window.location.pathname != '/setup' && isWhiteLabelApplied) { + return {components}; + } return ( -
+
- {whiteLabelLogo != '' && - window.location.pathname != '/setup' && - whiteLabelLogo != defaultWhiteLabellingSettings.WHITE_LABEL_LOGO && - imageWidth != null ? ( - - ) : ( - - )} +
{components}
diff --git a/frontend/src/modules/onboarding/components/OnboardingFormWrapper/resources/styles/onboarding-form-wrapper.styles.scss b/frontend/src/modules/onboarding/components/OnboardingFormWrapper/resources/styles/onboarding-form-wrapper.styles.scss index 76c5c0ef04..14addf9412 100644 --- a/frontend/src/modules/onboarding/components/OnboardingFormWrapper/resources/styles/onboarding-form-wrapper.styles.scss +++ b/frontend/src/modules/onboarding/components/OnboardingFormWrapper/resources/styles/onboarding-form-wrapper.styles.scss @@ -23,4 +23,4 @@ .onboarding-form-wrapper { margin-top: 240px; } -} +} \ No newline at end of file diff --git a/frontend/src/modules/onboarding/components/OnboardingUIWrapper/OnboardingUIWrapper.jsx b/frontend/src/modules/onboarding/components/OnboardingUIWrapper/OnboardingUIWrapper.jsx new file mode 100644 index 0000000000..15a783c6df --- /dev/null +++ b/frontend/src/modules/onboarding/components/OnboardingUIWrapper/OnboardingUIWrapper.jsx @@ -0,0 +1,21 @@ +import React from 'react'; +import OnboardingFormWrapper from '../OnboardingFormWrapper/OnboardingFormWrapper'; +import './resources/styles/onboarding-ui-wrapper.styles.scss'; + +const OnboardingUIWrapper = ({ children: components }) => { + const pageLocation = window.location.pathname; + if (pageLocation == '/setup') { + return ( +
+ {components} +
+ ); + } + return ( +
+ {components} +
+ ); +}; + +export default OnboardingUIWrapper; diff --git a/frontend/src/modules/onboarding/components/OnboardingUIWrapper/index.js b/frontend/src/modules/onboarding/components/OnboardingUIWrapper/index.js new file mode 100644 index 0000000000..abb0e4eb4c --- /dev/null +++ b/frontend/src/modules/onboarding/components/OnboardingUIWrapper/index.js @@ -0,0 +1 @@ +export { default } from './OnboardingUIWrapper'; diff --git a/frontend/src/modules/onboarding/components/OnboardingUIWrapper/resources/styles/onboarding-ui-wrapper.styles.scss b/frontend/src/modules/onboarding/components/OnboardingUIWrapper/resources/styles/onboarding-ui-wrapper.styles.scss new file mode 100644 index 0000000000..34d0b0f9bc --- /dev/null +++ b/frontend/src/modules/onboarding/components/OnboardingUIWrapper/resources/styles/onboarding-ui-wrapper.styles.scss @@ -0,0 +1,33 @@ +/* Default styles */ +.onboarding-setup-wrapper { + margin-top: 95px !important; + /* Default margin-top */ +} + +.auth-pages-wrapper { + display: flex !important; + justify-content: center !important; + min-height: 100vh !important; + flex-direction: column !important; +} + +/* Media query for 1366x768 resolution */ +@media screen and (min-width: 1366px) and (min-height: 768px) { + .onboarding-setup-wrapper { + margin-top: 95px !important; + } +} + +/* Media query for 1440x900 resolution */ +@media screen and (min-width: 1440px) and (min-height: 900px) { + .onboarding-setup-wrapper { + margin-top: 180px !important; + } +} + +/* Media query for 1920x1080 resolution and above */ +@media screen and (min-width: 1920px) and (min-height: 1080px) { + .onboarding-setup-wrapper { + margin-top: 240px !important; + } +} \ No newline at end of file diff --git a/frontend/src/modules/onboarding/components/WhiteLabellingBackgroundWrapper/WhiteLabellingBackgroundWrapper.jsx b/frontend/src/modules/onboarding/components/WhiteLabellingBackgroundWrapper/WhiteLabellingBackgroundWrapper.jsx new file mode 100644 index 0000000000..c8b85fc5e4 --- /dev/null +++ b/frontend/src/modules/onboarding/components/WhiteLabellingBackgroundWrapper/WhiteLabellingBackgroundWrapper.jsx @@ -0,0 +1,19 @@ +import React from 'react'; +import './resources/styles/background.styles.scss'; +const WhiteLabellingBackgroundWrapper = ({ MiddleComponent }) => { + return ( +
+
+ {MiddleComponent && ( +
+
+ +
+
+ )} +
+
+ ); +}; + +export default WhiteLabellingBackgroundWrapper; diff --git a/frontend/src/modules/onboarding/components/WhiteLabellingBackgroundWrapper/index.js b/frontend/src/modules/onboarding/components/WhiteLabellingBackgroundWrapper/index.js new file mode 100644 index 0000000000..38a960ac7b --- /dev/null +++ b/frontend/src/modules/onboarding/components/WhiteLabellingBackgroundWrapper/index.js @@ -0,0 +1 @@ +export { default } from './WhiteLabellingBackgroundWrapper'; diff --git a/frontend/src/modules/onboarding/components/WhiteLabellingBackgroundWrapper/resources/styles/background.styles.scss b/frontend/src/modules/onboarding/components/WhiteLabellingBackgroundWrapper/resources/styles/background.styles.scss new file mode 100644 index 0000000000..ef4dbbd9fe --- /dev/null +++ b/frontend/src/modules/onboarding/components/WhiteLabellingBackgroundWrapper/resources/styles/background.styles.scss @@ -0,0 +1,20 @@ +.white-labelling-background-wrapper { + margin-top: 0px !important; + height: 100vh; + overflow: hidden; + background-size: cover; + background-size: cover; + background-position: center; + background-repeat: no-repeat; + + .container-fluid { + height: 100%; + padding: 0; + overflow-y: auto; + overflow-x: hidden; + } + + .row { + height: 100%; + } +} \ No newline at end of file diff --git a/frontend/src/modules/onboarding/components/WhiteLabellingFormWrapper/WhiteLabellingFormWrapper.jsx b/frontend/src/modules/onboarding/components/WhiteLabellingFormWrapper/WhiteLabellingFormWrapper.jsx new file mode 100644 index 0000000000..f24388143c --- /dev/null +++ b/frontend/src/modules/onboarding/components/WhiteLabellingFormWrapper/WhiteLabellingFormWrapper.jsx @@ -0,0 +1,37 @@ +import React, { useEffect, useState } from 'react'; +import Logo from '@/modules/common/resources/images/Logo'; +import './resources/styles/whitelabelling-form-wrapper.styles.scss'; +import { getSubpath } from '@/_helpers/routes'; +import { defaultWhiteLabellingSettings, retrieveWhiteLabelFavicon } from '@white-label/whiteLabelling'; +const WhiteLabellingFormWrapper = ({ children: components }) => { + const IMAGE_WIDTH = 36; + const IMAGE_HEIGHT = 36; + const [whiteLabelLogo, setWhiteLabelLogo] = useState(null); + useEffect(() => { + // Note : Currently, We are using favicon for white labelling in all the onboarding flow pages + const data = retrieveWhiteLabelFavicon(); + setWhiteLabelLogo(data); + }, []); + const redirectToLoginPage = () => { + window.location.href = getSubpath() ? `${getSubpath()}` : '/'; + }; + if (whiteLabelLogo == null) { + return
; + } + return ( +
+
+ {whiteLabelLogo != '' && + window.location.pathname != '/setup' && + whiteLabelLogo != defaultWhiteLabellingSettings.WHITE_LABEL_LOGO ? ( + + ) : ( + + )} +
+ {components} +
+ ); +}; + +export default WhiteLabellingFormWrapper; diff --git a/frontend/src/modules/onboarding/components/WhiteLabellingFormWrapper/index.js b/frontend/src/modules/onboarding/components/WhiteLabellingFormWrapper/index.js new file mode 100644 index 0000000000..f4b3d3815d --- /dev/null +++ b/frontend/src/modules/onboarding/components/WhiteLabellingFormWrapper/index.js @@ -0,0 +1 @@ +export { default } from './WhiteLabellingFormWrapper'; diff --git a/frontend/src/modules/onboarding/components/WhiteLabellingFormWrapper/resources/styles/whitelabelling-form-wrapper.styles.scss b/frontend/src/modules/onboarding/components/WhiteLabellingFormWrapper/resources/styles/whitelabelling-form-wrapper.styles.scss new file mode 100644 index 0000000000..57c8e393bf --- /dev/null +++ b/frontend/src/modules/onboarding/components/WhiteLabellingFormWrapper/resources/styles/whitelabelling-form-wrapper.styles.scss @@ -0,0 +1,5 @@ +/* Default styles */ +.white-labelling-form-wrapper { + margin-top: 0px; + /* Default margin-top */ +} \ No newline at end of file diff --git a/frontend/src/modules/onboarding/components/index.js b/frontend/src/modules/onboarding/components/index.js index 79e958cc3d..181b58b19c 100644 --- a/frontend/src/modules/onboarding/components/index.js +++ b/frontend/src/modules/onboarding/components/index.js @@ -3,6 +3,7 @@ import OnboardingFormWrapper from './OnboardingFormWrapper'; import OnboardingFormInsideWrapper from './OnboardingFormInsideWrapper'; import OnboardingQuestions from './OnboardingQuestions'; import OnboardingForm from './OnboardingForm'; +import OnboardingUIWrapper from './OnboardingUIWrapper'; export { OnboardingBackgroundWrapper, @@ -10,4 +11,5 @@ export { OnboardingFormInsideWrapper, OnboardingQuestions, OnboardingForm, + OnboardingUIWrapper, }; diff --git a/frontend/src/modules/onboarding/pages/SetupAdminPage/components/SetupAdminForm/SetupAdminForm.jsx b/frontend/src/modules/onboarding/pages/SetupAdminPage/components/SetupAdminForm/SetupAdminForm.jsx index 540704aaad..e13bbd792d 100644 --- a/frontend/src/modules/onboarding/pages/SetupAdminPage/components/SetupAdminForm/SetupAdminForm.jsx +++ b/frontend/src/modules/onboarding/pages/SetupAdminPage/components/SetupAdminForm/SetupAdminForm.jsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from 'react'; -import { OnboardingFormWrapper } from '@/modules/onboarding/components'; +import { OnboardingUIWrapper } from '@/modules/onboarding/components'; import { FormTextInput, PasswordInput, SubmitButton, FormHeader } from '@/modules/common/components'; import useOnboardingStore from '@/modules/onboarding/stores/onboardingStore'; import { shallow } from 'zustand/shallow'; @@ -86,7 +86,7 @@ const SetupAdminForm = () => { }; useEnterKeyPress(() => handleSubmit()); return ( - +
Set up your admin account
@@ -135,7 +135,7 @@ const SetupAdminForm = () => {

-
+ ); }; diff --git a/frontend/src/modules/onboarding/pages/SetupToolJetPage/SetupToolJetPage.jsx b/frontend/src/modules/onboarding/pages/SetupToolJetPage/SetupToolJetPage.jsx index fc09075d4c..2efe088013 100644 --- a/frontend/src/modules/onboarding/pages/SetupToolJetPage/SetupToolJetPage.jsx +++ b/frontend/src/modules/onboarding/pages/SetupToolJetPage/SetupToolJetPage.jsx @@ -2,7 +2,7 @@ import React from 'react'; import { OnboardingBackgroundWrapper, OnboardingFormInsideWrapper, - OnboardingFormWrapper, + OnboardingUIWrapper, } from '@/modules/onboarding/components'; import { SubmitButton, FormHeader, FormDescription, GeneralFeatureImage } from '@/modules/common/components'; import { useEnterKeyPress } from '@/modules/common/hooks'; @@ -32,13 +32,13 @@ const SetupToolJetPage = () => { const LeftSideComponent = () => { return (
- + {headerText} {description} - +
); }; diff --git a/frontend/src/modules/onboarding/pages/SignupPage/components/SignupForm/SignupForm.jsx b/frontend/src/modules/onboarding/pages/SignupPage/components/SignupForm/SignupForm.jsx index 3bbe22886e..40eb34c61c 100644 --- a/frontend/src/modules/onboarding/pages/SignupPage/components/SignupForm/SignupForm.jsx +++ b/frontend/src/modules/onboarding/pages/SignupPage/components/SignupForm/SignupForm.jsx @@ -1,7 +1,7 @@ import React, { useState, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { Link } from 'react-router-dom'; -import { OnboardingFormWrapper, OnboardingFormInsideWrapper } from '@/modules/onboarding/components'; +import { OnboardingUIWrapper, OnboardingFormInsideWrapper } from '@/modules/onboarding/components'; import { FormTextInput, PasswordInput, SubmitButton, FormHeader, SSOAuthModule } from '@/modules/common/components'; import SignupStatusCard from './components/SignupStatusCard'; import './resources/styles/sign-up-form.styles.scss'; @@ -149,7 +149,7 @@ const SignupForm = ({ return (
- + {t('loginSignupPage.signUp', 'Sign up')} {(organizationId || shouldShowSignInCTA) && ( @@ -241,7 +241,7 @@ const SignupForm = ({ )} - +
); }; diff --git a/frontend/src/modules/onboarding/pages/SignupPage/components/SignupSuccessInfo/SignupSuccessInfo.jsx b/frontend/src/modules/onboarding/pages/SignupPage/components/SignupSuccessInfo/SignupSuccessInfo.jsx index 543e513f65..475ff9f93e 100644 --- a/frontend/src/modules/onboarding/pages/SignupPage/components/SignupSuccessInfo/SignupSuccessInfo.jsx +++ b/frontend/src/modules/onboarding/pages/SignupPage/components/SignupSuccessInfo/SignupSuccessInfo.jsx @@ -1,6 +1,6 @@ import React, { useEffect } from 'react'; import OnboardingBackgroundWrapper from '@/modules/onboarding/components/OnboardingBackgroundWrapper'; -import { OnboardingFormWrapper } from '@/modules/onboarding/components'; +import { OnboardingUIWrapper } from '@/modules/onboarding/components'; import { FormHeader } from '@/modules/common/components'; import './resources/styles/email-verification.styles.scss'; import ResendVerificationEmail from './components/ResendVerificationEmail/ResendVerificationEmail'; @@ -12,7 +12,7 @@ const SignupSuccessInfo = ({ email, name, backToSignup, organizationId, redirect const info = `Did not receive an email? Check your spam folder!`; return (
- + Check your mail

{message}

{info} @@ -23,7 +23,7 @@ const SignupSuccessInfo = ({ email, name, backToSignup, organizationId, redirect Back to sign up
- +
); }; diff --git a/frontend/src/modules/onboarding/pages/WorkspaceInvitationPage/WorkspaceInvitationPage.jsx b/frontend/src/modules/onboarding/pages/WorkspaceInvitationPage/WorkspaceInvitationPage.jsx index 7dc9736f9a..f570300f47 100644 --- a/frontend/src/modules/onboarding/pages/WorkspaceInvitationPage/WorkspaceInvitationPage.jsx +++ b/frontend/src/modules/onboarding/pages/WorkspaceInvitationPage/WorkspaceInvitationPage.jsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import { OnboardingFormWrapper } from '@/modules/onboarding/components'; +import { OnboardingUIWrapper } from '@/modules/onboarding/components'; import { FormTextInput, SubmitButton, @@ -73,7 +73,7 @@ const WorkspaceInvitationPage = (props) => { const LeftSideComponent = () => { return ( - +
{`Join ${invitedOrganizationName}`} {`You are invited to ${ @@ -122,7 +122,7 @@ const WorkspaceInvitationPage = (props) => {

)}
-
+ ); }; return ; From 0249102c085867b7a53201182a4e454ba6cf5885 Mon Sep 17 00:00:00 2001 From: Rohan Lahori <64496391+rohanlahori@users.noreply.github.com> Date: Mon, 21 Oct 2024 12:37:09 +0530 Subject: [PATCH 07/12] Pending Backlog Issues (#10823) * folder-count-fix * fixed query * fixed app sharing bug * minor css fix for delete group-button * changed delete button color for light mode * profile photo missing in groups * ui fix for alignment * css fix * updated regex for email validation * ui-fix for syncing the ui file with ee * fix for workspace settings page * workspace slug fix * reverted some minor change * minor ui fix * folder-rerender changes --- .../RightTopHeaderButtons/ManageAppUsers.jsx | 67 ++++++++++--------- frontend/src/HomePage/AppList.jsx | 8 +-- frontend/src/HomePage/Folders.jsx | 13 +++- frontend/src/HomePage/HomePage.jsx | 5 +- .../index.jsx | 15 +++-- .../src/OrganizationSettingsPage/index.jsx | 18 ++--- .../CreateOrganization.jsx | 3 +- frontend/src/_helpers/utils.js | 6 +- frontend/src/_styles/theme.scss | 11 ++- .../_ui/HttpHeaders/sourceEditorStyles.scss | 3 +- .../utility/group-permissions.utility.ts | 1 + server/src/services/folders.service.ts | 2 +- 12 files changed, 92 insertions(+), 60 deletions(-) diff --git a/frontend/src/Editor/Header/RightTopHeaderButtons/ManageAppUsers.jsx b/frontend/src/Editor/Header/RightTopHeaderButtons/ManageAppUsers.jsx index a8d34774cb..094bac4414 100644 --- a/frontend/src/Editor/Header/RightTopHeaderButtons/ManageAppUsers.jsx +++ b/frontend/src/Editor/Header/RightTopHeaderButtons/ManageAppUsers.jsx @@ -401,40 +401,43 @@ class ManageAppUsersComponent extends React.Component {
)} - - {((this?.props?.isVersionReleased && this?.props?.isPublic) || - window?.public_config?.ENABLE_PRIVATE_APP_EMBED === 'true') && ( -
- - - {embeddableLink} - - toast.success('Link copied to clipboard')}> - + + + {embeddableLink} + + toast.success('Link copied to clipboard')} > - - - - + + + + + + - -
- )} + + )} } diff --git a/frontend/src/HomePage/AppList.jsx b/frontend/src/HomePage/AppList.jsx index 496bb3ec20..2de3653baa 100644 --- a/frontend/src/HomePage/AppList.jsx +++ b/frontend/src/HomePage/AppList.jsx @@ -55,10 +55,10 @@ const AppList = (props) => { className={`d-block text-center text-body ${props.darkMode && 'text-white-50'}`} data-cy="empty-folder-text" > - {/* removed this error message display for now -> as it was leading to multiple message being shown in the UI*/} - {/* {props.currentFolder?.count == 0 - ? t('homePage.thisFolderIsEmpty', 'This folder is empty') - : t('homePage.nonAccessibleFolderApps', 'You do not have access to any applications in this folder.')} */} + {props.currentFolder?.count == 0 && + props.apps?.length == 0 && + props.appSearchKey == '' && + t('homePage.thisFolderIsEmpty', 'This folder is empty')} )} diff --git a/frontend/src/HomePage/Folders.jsx b/frontend/src/HomePage/Folders.jsx index 90eb79e9f1..8818e65be6 100644 --- a/frontend/src/HomePage/Folders.jsx +++ b/frontend/src/HomePage/Folders.jsx @@ -25,6 +25,7 @@ export const Folders = function Folders({ canDeleteFolder, canCreateApp, darkMode, + searchedAppCount, }) { const [isLoading, setLoadingStatus] = useState(foldersLoading); const [showInput, setShowInput] = useState(false); @@ -40,11 +41,14 @@ export const Folders = function Folders({ const [activeFolder, setActiveFolder] = useState(currentFolder || {}); const [filteredData, setFilteredData] = useState(folders); const [errorText, setErrorText] = useState(''); + const [activeFolderAppCount, setActiveFolderAppCount] = useState(activeFolder.count); const navigate = useNavigate(); const { t } = useTranslation(); const { updateSidebarNAV } = useContext(BreadCrumbContext); - + useEffect(() => { + setActiveFolderAppCount(searchedAppCount); + }, [searchedAppCount]); useEffect(() => { setLoadingStatus(foldersLoading); // eslint-disable-next-line react-hooks/exhaustive-deps @@ -107,6 +111,7 @@ export const Folders = function Folders({ updateSidebarNAV(folder?.name ?? 'All apps'); //update the url query parameter with folder name updateFolderQuery(folder?.name); + setActiveFolderAppCount(folder.count); } function updateFolderQuery(name) { @@ -311,7 +316,11 @@ export const Folders = function Folders({ className="flex-grow-1 tj-folder-list tj-text-xsm" data-cy={`${folder.name.toLowerCase().replace(/\s+/g, '-')}-name`} > - {`${folder.name}${folder.count > 0 ? ` (${folder.count})` : ''}`} + {folder.id === activeFolder.id ? ( + {`${folder.name}${folder.count > 0 ? ` (${activeFolderAppCount})` : ''}`} + ) : ( + {`${folder.name}${folder.count > 0 ? ` (${folder.count})` : ''}`} + )} {(canDeleteFolder || canUpdateFolder) && ( diff --git a/frontend/src/HomePage/HomePage.jsx b/frontend/src/HomePage/HomePage.jsx index 5a84a84193..15219269e0 100644 --- a/frontend/src/HomePage/HomePage.jsx +++ b/frontend/src/HomePage/HomePage.jsx @@ -107,6 +107,7 @@ class HomePageComponent extends React.Component { this.setState({ apps: data.apps, meta: { ...this.state.meta, ...data.meta }, + searchedAppCount: appSearchKey ? data.apps.length : this.state.currentFolder.count, isLoading: false, }) ); @@ -842,6 +843,7 @@ class HomePageComponent extends React.Component { canUpdateFolder={this.canUpdateFolder()} darkMode={this.props.darkMode} canCreateApp={this.canCreateApp()} + searchedAppCount={this.state.searchedAppCount} /> @@ -900,7 +902,7 @@ class HomePageComponent extends React.Component { canCreateApp={this.canCreateApp} /> )} - {!isLoading && meta.total_count === 0 && appSearchKey && ( + {!isLoading && apps?.length === 0 && appSearchKey && (
{this.props.t('homePage.noApplicationFound', 'No Applications found')} @@ -921,6 +923,7 @@ class HomePageComponent extends React.Component { darkMode={this.props.darkMode} appActionModal={this.appActionModal} removeAppFromFolder={this.removeAppFromFolder} + appSearchKey={this.state.appSearchKey} /> )}
diff --git a/frontend/src/ManageGroupPermissionResourcesV2/index.jsx b/frontend/src/ManageGroupPermissionResourcesV2/index.jsx index 80e3ff4fec..5783aaef8f 100644 --- a/frontend/src/ManageGroupPermissionResourcesV2/index.jsx +++ b/frontend/src/ManageGroupPermissionResourcesV2/index.jsx @@ -20,6 +20,8 @@ import { SearchBox } from '@/_components/SearchBox'; import EditRoleErrorModal from '@/ManageGroupPermissionsV2/ErrorModal/ErrorModal'; import ChangeRoleModal from '@/ManageGroupPermissionResourcesV2/ChangeRoleModal'; import { ToolTip } from '@/_components/ToolTip'; +import Avatar from '@/_ui/Avatar'; + class ManageGroupPermissionResourcesComponent extends React.Component { constructor(props) { super(props); @@ -339,7 +341,6 @@ class ManageGroupPermissionResourcesComponent extends React.Component { this.setState({ isChangeRoleModalOpen: true, updatingUserRole: updatingUser }); showChangeRoleModalMessage = () => { - console.log('called'); this.setState({ showRoleEditMessage: true }); }; @@ -435,7 +436,6 @@ class ManageGroupPermissionResourcesComponent extends React.Component { autoRoleChangeModalList, autoRoleChangeMessageType, } = this.state; - const isBasicPlan = false; const isPaidPlan = false; @@ -737,11 +737,16 @@ class ManageGroupPermissionResourcesComponent extends React.Component { key={user.id} className="manage-group-users-row" data-cy={`${String(user.email).toLowerCase().replace(/\s+/g, '-')}-user-row`} + style={{ alignItems: 'center' }} >

-

- {`${user?.firstName?.[0] ?? ''} ${user?.lastName?.[0] ?? ''}`} -
+ {`${user?.firstName ?? ''} ${user?.lastName ?? ''}`}

diff --git a/frontend/src/OrganizationSettingsPage/index.jsx b/frontend/src/OrganizationSettingsPage/index.jsx index b79cdad83d..1ae96c4cc5 100644 --- a/frontend/src/OrganizationSettingsPage/index.jsx +++ b/frontend/src/OrganizationSettingsPage/index.jsx @@ -42,19 +42,20 @@ export function OrganizationSettings(props) { if (selectedTabFromRoute === 'workspace-settings') { // No Sub routes added loading first one setSelectedTab(admin ? workspaceSettingsLinks[0].id : 'workspacevariables'); + navigate(admin ? workspaceSettingsLinks[0].route : 'workspace-variables'); } else { + const selectedWorkspaceSetting = workspaceSettingsLinks?.find((m) => m.id === selectedTabFromRoute); + updateSidebarNAV(selectedWorkspaceSetting?.name || ''); setSelectedTab(getMenuFromRoute(selectedTabFromRoute)?.id); } return () => subscription.unsubscribe(); - }, [authenticationService.currentSessionValue?.admin]); - - useEffect(() => { - const menu = workspaceSettingsLinks?.find((m) => m.id === selectedTab); - updateSidebarNAV(menu?.name || ''); - navigate(menu?.route || ''); - }, [selectedTab]); + }, [admin, location.pathname]); + const handleClick = (data) => { + setSelectedTab(data.id); + updateSidebarNAV(data?.name || ''); + }; return (

@@ -67,6 +68,7 @@ export function OrganizationSettings(props) { { - setSelectedTab(item.id); + handleClick(item); }} selectedItem={selectedTab == item.id} renderBadgeForItems={[]} diff --git a/frontend/src/_components/OrganizationManager/CreateOrganization.jsx b/frontend/src/_components/OrganizationManager/CreateOrganization.jsx index 487b8a02f5..82bd046ae1 100644 --- a/frontend/src/_components/OrganizationManager/CreateOrganization.jsx +++ b/frontend/src/_components/OrganizationManager/CreateOrganization.jsx @@ -58,6 +58,7 @@ export const CreateOrganization = ({ showCreateOrg, setShowCreateOrg }) => { }; const handleInputChange = async (value, field) => { + const trimmedValue = value?.trim(); if (field === 'slug') { setSlug({ ...slug, @@ -83,7 +84,7 @@ export const CreateOrganization = ({ showCreateOrg, setShowCreateOrg }) => { if (error?.status === true) { try { await organizationService.checkWorkspaceUniqueness( - field === 'name' ? value : null, + field === 'name' ? trimmedValue : null, field === 'slug' ? value : null ); } catch (errResponse) { diff --git a/frontend/src/_helpers/utils.js b/frontend/src/_helpers/utils.js index bfe590b16c..581836006c 100644 --- a/frontend/src/_helpers/utils.js +++ b/frontend/src/_helpers/utils.js @@ -578,7 +578,7 @@ export function validateDates({ validationObject, widgetValue, currentState, cus export function validateEmail(email) { const emailRegex = - /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i; + /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[a-zA-Z]{2,})$/i; return emailRegex.test(email); } @@ -1099,9 +1099,9 @@ export const validateName = ( checkReservedWords = false, allowAllCases = false ) => { - const newName = name.trim(); + const newName = name; let errorMsg = ''; - if (emptyCheck && !newName) { + if (emptyCheck && (!newName || newName.trim().length === 0)) { errorMsg = `${nameType} can't be empty`; showError && toast.error(errorMsg, { diff --git a/frontend/src/_styles/theme.scss b/frontend/src/_styles/theme.scss index f81e2897f5..4b3bac7ce5 100644 --- a/frontend/src/_styles/theme.scss +++ b/frontend/src/_styles/theme.scss @@ -9841,7 +9841,7 @@ tbody { .manage-group-users-row { display: flex; flex-direction: row; - align-items: baseline; + align-items: center; padding: 12px 6px; width: 612px !important; height: 64px; @@ -10567,7 +10567,14 @@ tbody { } .disable { - color: var(--slate7); + color: var(--slate9); + } + .disable { + color: var(--slate9); + + &.dark-theme { + color: var(--slate11); + } } &__danger { diff --git a/frontend/src/_ui/HttpHeaders/sourceEditorStyles.scss b/frontend/src/_ui/HttpHeaders/sourceEditorStyles.scss index a625c2dcfd..c67709eb5e 100644 --- a/frontend/src/_ui/HttpHeaders/sourceEditorStyles.scss +++ b/frontend/src/_ui/HttpHeaders/sourceEditorStyles.scss @@ -1,3 +1,4 @@ +.query-manager-border-color{ input.form-control, textarea, .input-control { @@ -51,7 +52,7 @@ textarea, } } - +} .empty-key-value { border-radius: 6px; padding: 10px; diff --git a/server/src/modules/user_resource_permissions/utility/group-permissions.utility.ts b/server/src/modules/user_resource_permissions/utility/group-permissions.utility.ts index ef0af68895..c036d611c7 100644 --- a/server/src/modules/user_resource_permissions/utility/group-permissions.utility.ts +++ b/server/src/modules/user_resource_permissions/utility/group-permissions.utility.ts @@ -234,6 +234,7 @@ export function getUserInGroupQuery( 'users.firstName', 'users.lastName', 'users.email', + 'users.avatarId', 'userRole.id', 'role.name', 'organizationUsers.status', diff --git a/server/src/services/folders.service.ts b/server/src/services/folders.service.ts index 3c66a14425..94b0e336b1 100644 --- a/server/src/services/folders.service.ts +++ b/server/src/services/folders.service.ts @@ -107,7 +107,7 @@ export class FoldersService { .innerJoin('folderApp.app', 'app', 'folderApp.folderId = :id', { id: folder.id, }) - .where('app.name LIKE :name', { name: `%${searchKey}%` }) + .where('LOWER(app.name) LIKE :name', { name: `%${(searchKey ?? '').toLowerCase()}%` }) .getMany(); const userPermission = await this.abilityService.resourceActionsPermission(user, { From 21895cb2a15fc21f750fc10c78e9bbad4fa496a6 Mon Sep 17 00:00:00 2001 From: rohanlahori Date: Tue, 22 Oct 2024 02:00:58 +0530 Subject: [PATCH 08/12] reverted folder count changes --- frontend/src/HomePage/Folders.jsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/frontend/src/HomePage/Folders.jsx b/frontend/src/HomePage/Folders.jsx index 8818e65be6..15780cbe5a 100644 --- a/frontend/src/HomePage/Folders.jsx +++ b/frontend/src/HomePage/Folders.jsx @@ -316,11 +316,7 @@ export const Folders = function Folders({ className="flex-grow-1 tj-folder-list tj-text-xsm" data-cy={`${folder.name.toLowerCase().replace(/\s+/g, '-')}-name`} > - {folder.id === activeFolder.id ? ( - {`${folder.name}${folder.count > 0 ? ` (${activeFolderAppCount})` : ''}`} - ) : ( - {`${folder.name}${folder.count > 0 ? ` (${folder.count})` : ''}`} - )} + {`${folder.name}${folder.count > 0 ? ` (${folder.count})` : ''}`}
{(canDeleteFolder || canUpdateFolder) && ( From 7f0a3b145f98e04b5ca54211a7ce6db6b01c7d0c Mon Sep 17 00:00:00 2001 From: rohanlahori Date: Tue, 22 Oct 2024 10:46:29 +0530 Subject: [PATCH 09/12] reverted folder count changes --- frontend/src/HomePage/Folders.jsx | 6 ------ frontend/src/HomePage/HomePage.jsx | 1 - 2 files changed, 7 deletions(-) diff --git a/frontend/src/HomePage/Folders.jsx b/frontend/src/HomePage/Folders.jsx index 15780cbe5a..e62bc1c919 100644 --- a/frontend/src/HomePage/Folders.jsx +++ b/frontend/src/HomePage/Folders.jsx @@ -25,7 +25,6 @@ export const Folders = function Folders({ canDeleteFolder, canCreateApp, darkMode, - searchedAppCount, }) { const [isLoading, setLoadingStatus] = useState(foldersLoading); const [showInput, setShowInput] = useState(false); @@ -41,14 +40,10 @@ export const Folders = function Folders({ const [activeFolder, setActiveFolder] = useState(currentFolder || {}); const [filteredData, setFilteredData] = useState(folders); const [errorText, setErrorText] = useState(''); - const [activeFolderAppCount, setActiveFolderAppCount] = useState(activeFolder.count); const navigate = useNavigate(); const { t } = useTranslation(); const { updateSidebarNAV } = useContext(BreadCrumbContext); - useEffect(() => { - setActiveFolderAppCount(searchedAppCount); - }, [searchedAppCount]); useEffect(() => { setLoadingStatus(foldersLoading); // eslint-disable-next-line react-hooks/exhaustive-deps @@ -111,7 +106,6 @@ export const Folders = function Folders({ updateSidebarNAV(folder?.name ?? 'All apps'); //update the url query parameter with folder name updateFolderQuery(folder?.name); - setActiveFolderAppCount(folder.count); } function updateFolderQuery(name) { diff --git a/frontend/src/HomePage/HomePage.jsx b/frontend/src/HomePage/HomePage.jsx index 15219269e0..9f93dfdf8c 100644 --- a/frontend/src/HomePage/HomePage.jsx +++ b/frontend/src/HomePage/HomePage.jsx @@ -843,7 +843,6 @@ class HomePageComponent extends React.Component { canUpdateFolder={this.canUpdateFolder()} darkMode={this.props.darkMode} canCreateApp={this.canCreateApp()} - searchedAppCount={this.state.searchedAppCount} /> From 016ae90f3817ea2fc30f1bce869d61755b445552 Mon Sep 17 00:00:00 2001 From: rohanlahori Date: Tue, 22 Oct 2024 10:58:34 +0530 Subject: [PATCH 10/12] removed dropdown for all apps --- .../AddEditResourcePermissionsModal.jsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/frontend/src/ManageGranularAccess/AddEditResourceModal/AddEditResourcePermissionsModal.jsx b/frontend/src/ManageGranularAccess/AddEditResourceModal/AddEditResourcePermissionsModal.jsx index e70441a58e..783b008051 100644 --- a/frontend/src/ManageGranularAccess/AddEditResourceModal/AddEditResourcePermissionsModal.jsx +++ b/frontend/src/ManageGranularAccess/AddEditResourceModal/AddEditResourcePermissionsModal.jsx @@ -171,14 +171,16 @@ function AddEditResourcePermissionsModal({ - + {isCustom && ( + + )} From 05eb8482d802490f8ca4c0537315742942a8e4c4 Mon Sep 17 00:00:00 2001 From: Rudra Date: Tue, 22 Oct 2024 12:34:10 +0530 Subject: [PATCH 11/12] tick size --- frontend/src/_components/OrganizationManager/List.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/_components/OrganizationManager/List.jsx b/frontend/src/_components/OrganizationManager/List.jsx index 182c13224a..8ac54710bb 100644 --- a/frontend/src/_components/OrganizationManager/List.jsx +++ b/frontend/src/_components/OrganizationManager/List.jsx @@ -47,7 +47,7 @@ export const OrganizationList = function () {
{org.id === current_organization_id ? (
- +
) : (
Date: Tue, 22 Oct 2024 16:10:02 +0530 Subject: [PATCH 12/12] email footer image css fix --- server/src/mails/base/base_template.hbs | 7 +++++++ server/src/mails/base/partials/footer.hbs | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/server/src/mails/base/base_template.hbs b/server/src/mails/base/base_template.hbs index fd46c388b9..a135ee681c 100644 --- a/server/src/mails/base/base_template.hbs +++ b/server/src/mails/base/base_template.hbs @@ -204,6 +204,13 @@ margin-right: 10px; height: 20px !important; } + .social-icon-fit { + margin-top: 5px; + } + .social-icon-large { + height: 22px !important; + + } /* RESPONSIVE */ @media only screen and (max-width: 600px) { diff --git a/server/src/mails/base/partials/footer.hbs b/server/src/mails/base/partials/footer.hbs index 475af6d919..68b254bb10 100644 --- a/server/src/mails/base/partials/footer.hbs +++ b/server/src/mails/base/partials/footer.hbs @@ -17,10 +17,10 @@ target="_blank" href="https://www.youtube.com/channel/UCf1p2G5Z7fPpvlBPf4l2I1w" > - + - +
\ No newline at end of file