diff --git a/packages/client/src/pages/Home/InfoPanel/Body/views/Members/index.js b/packages/client/src/pages/Home/InfoPanel/Body/views/Members/index.js index efe43c3a6a..dafdf25091 100644 --- a/packages/client/src/pages/Home/InfoPanel/Body/views/Members/index.js +++ b/packages/client/src/pages/Home/InfoPanel/Body/views/Members/index.js @@ -43,6 +43,7 @@ import { Text } from "@docspace/shared/components/text"; import { Link } from "@docspace/shared/components/link"; import { IconButton } from "@docspace/shared/components/icon-button"; import { Tooltip } from "@docspace/shared/components/tooltip"; +import { isDesktop } from "@docspace/shared/utils"; import LinksToViewingIconUrl from "PUBLIC_DIR/images/links-to-viewing.react.svg?url"; import PlusReactSvgUrl from "PUBLIC_DIR/images/actions.button.plus.react.svg?url"; @@ -174,7 +175,7 @@ const Members = ({ {additionalLinks.length >= LINKS_LIMIT_COUNT && ( ( {content} diff --git a/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/TableView/TableHeader.js b/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/TableView/TableHeader.js index 0af82cdbab..3491f794e2 100644 --- a/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/TableView/TableHeader.js +++ b/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/TableView/TableHeader.js @@ -30,6 +30,7 @@ import { withTranslation } from "react-i18next"; import { TableHeader } from "@docspace/shared/components/table"; import { Events } from "@docspace/shared/enums"; +import { SortByFieldName } from "SRC_DIR/helpers/constants"; const TABLE_VERSION = "6"; const TABLE_COLUMNS = `insideGroupTableColumns_ver-${TABLE_VERSION}`; @@ -87,6 +88,19 @@ class InsideGroupTableHeader extends React.Component { }, ]; + props.showStorageInfo && + defaultColumns.push({ + key: "Storage", + title: props.isDefaultUsersQuotaSet + ? t("Common:StorageAndQuota") + : t("Common:Storage"), + enable: props.storageAccountsColumnIsEnabled, + sortBy: SortByFieldName.UsedSpace, + resizable: true, + onChange: this.onColumnChange, + onClick: this.onFilter, + }); + const columns = props.getColumns(defaultColumns); this.state = { columns }; @@ -188,6 +202,7 @@ export default inject( settingsStore, userStore, tableStore, + currentQuotaStore, }) => { const { groupsStore } = peopleStore; @@ -203,8 +218,11 @@ export default inject( typeAccountsInsideGroupColumnIsEnabled, groupAccountsInsideGroupColumnIsEnabled, emailAccountsInsideGroupColumnIsEnabled, + storageAccountsColumnIsEnabled, } = tableStore; + const { showStorageInfo, isDefaultUsersQuotaSet } = currentQuotaStore; + return { filter, setFilter, @@ -219,6 +237,9 @@ export default inject( typeAccountsInsideGroupColumnIsEnabled, groupAccountsInsideGroupColumnIsEnabled, emailAccountsInsideGroupColumnIsEnabled, + storageAccountsColumnIsEnabled, + showStorageInfo, + isDefaultUsersQuotaSet, }; }, )( diff --git a/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/TableView/TableRow.js b/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/TableView/TableRow.js index d7e093963d..ac363bbebc 100644 --- a/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/TableView/TableRow.js +++ b/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/TableView/TableRow.js @@ -25,6 +25,7 @@ // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode import React, { useState } from "react"; +import { inject, observer } from "mobx-react"; import styled, { css } from "styled-components"; import { withTranslation } from "react-i18next"; import { TableRow } from "@docspace/shared/components/table"; @@ -38,6 +39,8 @@ import Badges from "../../Badges"; import { Base } from "@docspace/shared/themes"; import { useNavigate } from "react-router-dom"; +import SpaceQuota from "SRC_DIR/components/SpaceQuota"; + const StyledWrapper = styled.div` display: contents; `; @@ -221,6 +224,8 @@ const InsideGroupTableRow = (props) => { typeAccountsInsideGroupColumnIsEnabled, groupAccountsInsideGroupColumnIsEnabled, emailAccountsInsideGroupColumnIsEnabled, + showStorageInfo, + storageAccountsColumnIsEnabled, } = props; const { @@ -601,11 +606,32 @@ const InsideGroupTableRow = (props) => { ) : (
)} + + {showStorageInfo && + (storageAccountsColumnIsEnabled ? ( + + + + ) : ( +
+ ))} ); }; -export default withTranslation(["People", "Common", "Settings"])( - withContent(InsideGroupTableRow), +export default inject(({ currentQuotaStore, tableStore }) => { + const { showStorageInfo } = currentQuotaStore; + const { storageAccountsColumnIsEnabled } = tableStore; + + return { + showStorageInfo, + storageAccountsColumnIsEnabled, + }; +})( + withContent( + withTranslation(["People", "Common", "Settings"])( + observer(InsideGroupTableRow), + ), + ), ); diff --git a/public/images/empty_screen_groups.svg b/public/images/empty_screen_groups.svg index 3935e0a06e..dd117f988e 100644 --- a/public/images/empty_screen_groups.svg +++ b/public/images/empty_screen_groups.svg @@ -1,25 +1,59 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/empty_screen_groups_dark.svg b/public/images/empty_screen_groups_dark.svg index b77e9acb54..f5de2b83be 100644 --- a/public/images/empty_screen_groups_dark.svg +++ b/public/images/empty_screen_groups_dark.svg @@ -1,25 +1,65 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +