BC-5 fix: general tab of preferences form submitting.

This commit is contained in:
a.bouhuolia
2021-09-04 18:49:01 +02:00
parent d6d6fefd1f
commit 11df54d4ed
25 changed files with 251 additions and 131 deletions

View File

@@ -19,7 +19,6 @@ import { Icon, Hint, If } from 'components';
import withUniversalSearchActions from 'containers/UniversalSearch/withUniversalSearchActions';
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
import withDashboard from 'containers/Dashboard/withDashboard';
import withSettings from 'containers/Settings/withSettings';
import QuickNewDropdown from 'containers/QuickNewDropdown/QuickNewDropdown';
import { compose } from 'utils';
@@ -76,9 +75,6 @@ function DashboardTopbar({
// #withDashboard
sidebarExpended,
// #withSettings
organizationName,
// #withGlobalSearch
openGlobalSearch,
@@ -190,9 +186,6 @@ export default compose(
sidebarExpended,
pageHint,
})),
withSettings(({ organizationSettings }) => ({
organizationName: organizationSettings.name,
})),
withDashboardActions,
withSubscriptions(
({ isSubscriptionActive, isSubscriptionInactive }) => ({

View File

@@ -2,8 +2,8 @@ import React from 'react';
import { Button, Popover, Menu, Position } from '@blueprintjs/core';
import Icon from 'components/Icon';
import { useAuthUser } from 'hooks/state';
import withSettings from 'containers/Settings/withSettings';
import { compose, firstLettersArgs } from 'utils';
import withCurrentOrganization from '../../containers/Organization/withCurrentOrganization';
// Popover modifiers.
const POPOVER_MODIFIERS = {
@@ -14,8 +14,8 @@ const POPOVER_MODIFIERS = {
* Sideabr head.
*/
function SidebarHead({
// #withSettings
organizationName,
// #withCurrentOrganization
organization,
}) {
const user = useAuthUser();
@@ -29,9 +29,9 @@ function SidebarHead({
<Menu className={'menu--dashboard-organization'}>
<div class="org-item">
<div class="org-item__logo">
{firstLettersArgs(...organizationName.split(' '))}{' '}
{firstLettersArgs(...(organization.name || '').split(' '))}{' '}
</div>
<div class="org-item__name">{organizationName}</div>
<div class="org-item__name">{organization.name}</div>
</div>
</Menu>
}
@@ -42,7 +42,7 @@ function SidebarHead({
className="title"
rightIcon={<Icon icon={'caret-down-16'} size={16} />}
>
{organizationName}
{organization.name}
</Button>
</Popover>
<span class="subtitle">{user.full_name}</span>
@@ -61,7 +61,5 @@ function SidebarHead({
}
export default compose(
withSettings(({ organizationSettings }) => ({
organizationName: organizationSettings.name,
})),
withCurrentOrganization(({ organization }) => ({ organization })),
)(SidebarHead);