From 4661066a9fa719febfa12d3ae5c87f83fff07696 Mon Sep 17 00:00:00 2001 From: Adrian Date: Wed, 6 Mar 2024 15:54:22 +0200 Subject: [PATCH 1/5] fix google oauth redirect (#2232) --- wondrous-bot-admin/src/utils/constants.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/wondrous-bot-admin/src/utils/constants.tsx b/wondrous-bot-admin/src/utils/constants.tsx index 5bcc1d3e8..311994af6 100644 --- a/wondrous-bot-admin/src/utils/constants.tsx +++ b/wondrous-bot-admin/src/utils/constants.tsx @@ -357,6 +357,7 @@ export const EXCLUDED_PATHS = [ "/referral", "/referral-campaign", "/activity", + "/oauth/google/callback" ]; export const TUTORIALS = { From 954bc5013e80a8b89e972505ccac33b368f8b098 Mon Sep 17 00:00:00 2001 From: adrian mustea Date: Wed, 6 Mar 2024 19:09:54 +0200 Subject: [PATCH 2/5] hotfixd activity pg --- .../src/components/CmtyUserActivity/Header.tsx | 15 ++++++++++++--- wondrous-bot-admin/src/index.css | 4 ++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/wondrous-bot-admin/src/components/CmtyUserActivity/Header.tsx b/wondrous-bot-admin/src/components/CmtyUserActivity/Header.tsx index a09e37880..22399530e 100644 --- a/wondrous-bot-admin/src/components/CmtyUserActivity/Header.tsx +++ b/wondrous-bot-admin/src/components/CmtyUserActivity/Header.tsx @@ -8,13 +8,22 @@ export default function CmtyUserHeaderComponent({ org }) { return ( - + Date: Wed, 6 Mar 2024 19:20:06 +0200 Subject: [PATCH 3/5] added inline picker for org during plan select (#2231) --- .../PlanSelect/InlineWorkspacePicker.tsx | 146 ++++++++++++++++++ .../Onboarding/PlanSelect/index.tsx | 11 +- .../src/components/Onboarding/index.tsx | 2 +- .../src/components/Shared/Select.tsx | 2 +- 4 files changed, 156 insertions(+), 5 deletions(-) create mode 100644 wondrous-bot-admin/src/components/Onboarding/PlanSelect/InlineWorkspacePicker.tsx diff --git a/wondrous-bot-admin/src/components/Onboarding/PlanSelect/InlineWorkspacePicker.tsx b/wondrous-bot-admin/src/components/Onboarding/PlanSelect/InlineWorkspacePicker.tsx new file mode 100644 index 000000000..b3bc8a104 --- /dev/null +++ b/wondrous-bot-admin/src/components/Onboarding/PlanSelect/InlineWorkspacePicker.tsx @@ -0,0 +1,146 @@ +import { Box, ClickAwayListener, Popper, Typography } from "@mui/material"; +import { useGlobalContext } from "utils/hooks"; +import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown"; +import { useRef, useState } from "react"; +import { WorkspaceDAOIcon } from "components/Icons/DAOIcon"; +import { OrgProfilePicture } from "components/Shared/ProjectProfilePicture"; +import { WorkspaceContainer, WorkspaceWrapper, WorkspaceImageWrapper } from "components/WorkspaceSwitch/styles"; +import { Label } from "components/CreateTemplate/styles"; +import CheckCircleOutlineOutlinedIcon from "@mui/icons-material/CheckCircleOutlineOutlined"; +import { useNavigate } from "react-router-dom"; +import AddImage from "components/Icons/Add.svg"; + +const InlineWorkspacePicker = () => { + const { activeOrg, userOrgs, setActiveOrg } = useGlobalContext(); + + const anchorEl = useRef(null); + const hasMoreThanOneOrg = userOrgs.length > 1; + + const [isOpen, setIsOpen] = useState(false); + + const onClickAway = () => (isOpen ? setIsOpen(false) : null); + + const onOrgClick = (org) => { + setActiveOrg(org); + onClickAway(); + }; + + const navigate = useNavigate(); + return ( + + setIsOpen((prev) => !prev)} + justifyContent="center" + alignItems="center" + sx={{ + borderBottom: "1px solid transparent", + pointerEvents: hasMoreThanOneOrg ? "auto" : "none", + "&:hover": { + cursor: "pointer", + borderColor: "white", + }, + }} + > + + {activeOrg?.name} + + {hasMoreThanOneOrg && ( + + )} + + + + {userOrgs?.map((org, idx) => { + const isActive = org.id === activeOrg?.id; + return ( + onOrgClick(org)} key={org.id}> + + + {org?.profilePicture ? ( + + ) : ( + + )} + + + + {isActive && ( + + )} + + ); + })} + navigate("/onboarding/welcome?ref=workspace")}> + + + + + + + + + + ); +}; + +export default InlineWorkspacePicker; diff --git a/wondrous-bot-admin/src/components/Onboarding/PlanSelect/index.tsx b/wondrous-bot-admin/src/components/Onboarding/PlanSelect/index.tsx index fb3e5b12a..90893deab 100644 --- a/wondrous-bot-admin/src/components/Onboarding/PlanSelect/index.tsx +++ b/wondrous-bot-admin/src/components/Onboarding/PlanSelect/index.tsx @@ -9,6 +9,7 @@ import { GET_CHECKOUT_LINK } from "graphql/queries/subscription"; import useAlerts, { useGlobalContext } from "utils/hooks"; import PostHeaderGoogleTag from "components/GoogleTag/PostHeaderGoogleTag"; import PostBodyGoogleTag from "components/GoogleTag/PostBodyGoogleTag"; +import InlineWorkspacePicker from "./InlineWorkspacePicker"; const PlanSelectComponent = () => { const { setSnackbarAlertOpen, setSnackbarAlertMessage, setSnackbarAlertAutoHideDuration } = useAlerts(); @@ -91,11 +92,14 @@ const PlanSelectComponent = () => { > { fontWeight={600} color="white" > - Select your plan + Select your plan for + { notifyOnNetworkStatusChange: true, refetchQueries: ["getLoggedInUserFullAccessOrgs"], onCompleted: (data) => { - setActiveOrg(data?.createOrg); + setActiveOrg(data?.createCmtyOrg); navigate("/onboarding/plan-select"); }, }); diff --git a/wondrous-bot-admin/src/components/Shared/Select.tsx b/wondrous-bot-admin/src/components/Shared/Select.tsx index 9810c631c..e007c6690 100644 --- a/wondrous-bot-admin/src/components/Shared/Select.tsx +++ b/wondrous-bot-admin/src/components/Shared/Select.tsx @@ -20,7 +20,7 @@ const SelectComponent = ({ grouped = false, groupedOptions = [], minWidth = "100px", - selectProps={} + selectProps={}, }) => { const handleChange = (e) => onChange(e.target.value); From 4413d575646720cacb4144ba6abcd1c4c837e31c Mon Sep 17 00:00:00 2001 From: Adrian Date: Wed, 6 Mar 2024 20:22:23 +0200 Subject: [PATCH 4/5] small fix (#2235) --- wondrous-bot-admin/src/components/CmtyUserActivity/Header.tsx | 2 ++ wondrous-bot-admin/src/utils/constants.tsx | 1 + 2 files changed, 3 insertions(+) diff --git a/wondrous-bot-admin/src/components/CmtyUserActivity/Header.tsx b/wondrous-bot-admin/src/components/CmtyUserActivity/Header.tsx index 22399530e..d89deec1c 100644 --- a/wondrous-bot-admin/src/components/CmtyUserActivity/Header.tsx +++ b/wondrous-bot-admin/src/components/CmtyUserActivity/Header.tsx @@ -24,6 +24,8 @@ export default function CmtyUserHeaderComponent({ org }) { style={{ height: "40px", width: "40px", + objectFit: "cover", + objectPosition: "center", }} /> Date: Wed, 6 Mar 2024 14:50:44 -0800 Subject: [PATCH 5/5] fix: remove hourly presence graph --- .../src/components/Analytics/index.tsx | 79 +++++++++---------- 1 file changed, 38 insertions(+), 41 deletions(-) diff --git a/wondrous-bot-admin/src/components/Analytics/index.tsx b/wondrous-bot-admin/src/components/Analytics/index.tsx index 635aca24e..d313f42e6 100644 --- a/wondrous-bot-admin/src/components/Analytics/index.tsx +++ b/wondrous-bot-admin/src/components/Analytics/index.tsx @@ -61,7 +61,7 @@ const AnalyticsComponent = () => { data: onboardedUsersData, refetch: onboardedUsersRefetch, loading: onboardedUsersLoading, - error: onboardedUsersError + error: onboardedUsersError, } = useQuery(GET_ONBOARDED_USERS_DATA, { fetchPolicy: "cache-and-network", notifyOnNetworkStatusChange: true, @@ -71,7 +71,6 @@ const AnalyticsComponent = () => { skip: !activeOrg?.id, }); - return ( <> @@ -92,46 +91,44 @@ const AnalyticsComponent = () => { }} > - - - - - - - - - + + + + + + + + + + - -