diff --git a/cli/commands/docker/utils.js b/cli/commands/docker/utils.js index 1c1e1f92b4..658a09a8d0 100644 --- a/cli/commands/docker/utils.js +++ b/cli/commands/docker/utils.js @@ -559,6 +559,10 @@ const up = async ({ uis, downloadLocales, fromInstaller }) => { } }; + dockerComposeConfig.services["plugin-core-api"].deploy = deploy; + if(configs.core && Number(configs.core.replicas)) { + dockerComposeConfig.services["plugin-core-api"].deploy.replicas = Number(configs.core.replicas); + } dockerComposeConfig.services.coreui.deploy = deploy; dockerComposeConfig.services.gateway.deploy = deploy; } diff --git a/cli/package.json b/cli/package.json index c5d2faab56..6cef41210d 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "erxes", - "version": "0.4.25", + "version": "0.4.26", "description": "Free and open fair-code licensed all-in-one growth marketing & management software", "homepage": "https://erxes.io", "repository": "https://github.com/erxes/erxes", diff --git a/packages/core-ui/src/modules/settings/main/components/Settings.tsx b/packages/core-ui/src/modules/settings/main/components/Settings.tsx index 3da156269b..df566c2959 100644 --- a/packages/core-ui/src/modules/settings/main/components/Settings.tsx +++ b/packages/core-ui/src/modules/settings/main/components/Settings.tsx @@ -145,7 +145,7 @@ class Settings extends React.PureComponent { )} {this.renderBox( 'Structure', - '/images/icons/erxes-23.svg', + '/images/icons/erxes-15.svg', '/settings/structure', 'usersAll', teamPermissions diff --git a/packages/core-ui/src/modules/settings/team/components/branch/Form.tsx b/packages/core-ui/src/modules/settings/team/components/branch/Form.tsx index 5049fc427d..ecb2bda796 100644 --- a/packages/core-ui/src/modules/settings/team/components/branch/Form.tsx +++ b/packages/core-ui/src/modules/settings/team/components/branch/Form.tsx @@ -9,7 +9,6 @@ import { __ } from 'modules/common/utils'; import { IBranch } from '@erxes/ui/src/team/types'; import SelectTeamMembers from '@erxes/ui/src/team/containers/SelectTeamMembers'; import ContactInfoForm from '../common/ContactInfoForm'; -import SelectBranches from '@erxes/ui/src/team/containers/SelectBranches'; type Props = { renderButton: (props: IButtonMutateProps) => JSX.Element; @@ -19,7 +18,7 @@ type Props = { }; export default function BranchForm(props: Props) { - const { closeModal, renderButton } = props; + const { closeModal, renderButton, branches } = props; const object = props.branch || ({} as IBranch); const [userIds, setUserIds] = useState( @@ -75,6 +74,14 @@ export default function BranchForm(props: Props) { const renderContent = (formProps: IFormProps) => { const { values, isSubmitted } = formProps; + const generateOptions = () => { + return branches.map(branch => ( + + )); + }; + return ( <> @@ -120,13 +127,16 @@ export default function BranchForm(props: Props) { {__('Parent')} - + componentClass="select" + defaultValue={parentId || null} + onChange={onChangeParent} + > + {__('Team Members')} diff --git a/packages/core-ui/src/modules/settings/team/components/branch/MainList.tsx b/packages/core-ui/src/modules/settings/team/components/branch/MainList.tsx index d8cca1e078..6a4fa2605c 100644 --- a/packages/core-ui/src/modules/settings/team/components/branch/MainList.tsx +++ b/packages/core-ui/src/modules/settings/team/components/branch/MainList.tsx @@ -2,7 +2,6 @@ import { Button, ModalTrigger, BarItems, - HeaderDescription, FormControl, Table, Wrapper, @@ -13,13 +12,15 @@ import { } from '@erxes/ui/src'; import { BranchesMainQueryResponse, IBranch } from '@erxes/ui/src/team/types'; import React from 'react'; -import SettingsSideBar from '../common/SettingsSideBar'; +import SettingsSideBar from '../../containers/common/SettingSideBar'; import Form from '../../containers/branch/Form'; import { generateTree } from '../../utils'; import { queries } from '@erxes/ui/src/team/graphql'; import { gql } from '@apollo/client'; import { generatePaginationParams } from '@erxes/ui/src/utils/router'; -import { DescriptionContentRow } from '../common/DescriptionContentRow'; +import ActionButtons from '@erxes/ui/src/components/ActionButtons'; +import Tip from '@erxes/ui/src/components/Tip'; +import Icon from '@erxes/ui/src/components/Icon'; type Props = { listQuery: BranchesMainQueryResponse; @@ -55,8 +56,24 @@ class MainList extends React.Component { } ]; + remove = (_id?: string) => { + if (_id) { + this.props.deleteBranches([_id], () => + this.setState({ selectedItems: [] }) + ); + } else { + this.props.deleteBranches(this.state.selectedItems, () => + this.setState({ selectedItems: [] }) + ); + } + }; + renderForm() { - const trigger = ; + const trigger = ( + + ); const content = ({ closeModal }) => (
{ const onclick = e => { e.stopPropagation(); }; + const trigger = ( + + ); + + return ( { {branch?.parent?.title || ''} {__(branch.address.replace(/\n/g, ''))} {branch.userCount} + + + ( + + )} + trigger={trigger} + /> + +