PromucFlow_constructor/app/client/src/pages/workspace/ManageUsers.tsx
Ankita Kinger 9b7944e7ee
feat: migrate organisation to workspace (#13863)
* migration from organization to workspace on code level

* updated a few more files

* fixed runtime errors

* update org settings URL

* Renamed organizationId in domain objects

* changed field named from organization to workspace

* Reverted AppsmithRole changes

* fixed migrations

* recreating indexes

* migration update

* seed data runs before migration, undo changes

* mock commit

* seedmongo to populate upgraded data, datasource upgrade

* fixed two test cases

* updated migrations

* updated prop name

* Upgraded AclPermission

* comment

* migrated AppsmithRole

* more changes

* final set of changes

* variable name changes

* update cypress variable name

* Update app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/ApplicationControllerCE.java

* Update app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/Datasource.java

Co-authored-by: Trisha Anand <trisha@appsmith.com>

* reverting encryption handler change

* migrated a few missed out org to workspace

* migrated a few missed out org to workspace

* migration changes

* Removed Permission import

* fixed AppsmithRole

* mongodb version update

* fixed compile error

* fixed compile issue

* fixed some tests

* simplified embedded mongodb config

* updated a cypress test

Co-authored-by: Sidhant Goel <sidhant@appsmith.com>
Co-authored-by: Trisha Anand <trisha@appsmith.com>
Co-authored-by: Sidhant Goel <sidhant@hexcod.in>
2022-06-15 21:07:41 +05:30

58 lines
1.5 KiB
TypeScript

import React from "react";
import styled from "styled-components";
import history from "utils/history";
import Text, { TextType } from "components/ads/Text";
import Icon, { IconSize } from "components/ads/Icon";
import { Classes } from "components/ads/common";
import { useLocation } from "react-router-dom";
const StyledManageUsers = styled("a")`
margin-top: 12px;
display: inline-flex;
&&&& {
text-decoration: none;
}
.${Classes.TEXT} {
color: ${(props) => props.theme.colors.modal.manageUser};
margin-right: ${(props) => props.theme.spaces[1]}px;
font-size: 13px;
font-weight: 600;
letter-spacing: 0.6px;
}
.${Classes.ICON} {
svg path {
fill: ${(props) => props.theme.colors.modal.manageUser};
}
}
&:hover {
.${Classes.TEXT} {
color: ${(props) => props.theme.colors.modal.headerText};
}
.${Classes.ICON} {
svg path {
fill: ${(props) => props.theme.colors.modal.headerText};
}
}
}
`;
function ManageUsers({ workspaceId }: { workspaceId: string }) {
const currentPath = useLocation().pathname;
const pathRegex = /(?:\/workspace\/)\w+(?:\/settings)/;
return !pathRegex.test(currentPath) ? (
<StyledManageUsers
className="manageUsers"
onClick={() => {
history.push(`/workspace/${workspaceId}/settings/members`);
}}
>
<Text type={TextType.H6}>MANAGE USERS</Text>
<Icon name="manage" size={IconSize.XS} />
</StyledManageUsers>
) : null;
}
export default ManageUsers;