Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Commit

Permalink
Merge branch 'dev' of github.com:erxes/erxes-community into manySynce…
Browse files Browse the repository at this point in the history
…rkhet
  • Loading branch information
munkhsaikhan committed Oct 30, 2023
2 parents a4f7efc + 2803441 commit b8c7ae4
Show file tree
Hide file tree
Showing 31 changed files with 497 additions and 249 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/plugin-chats-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
- dev
- staging
- build-test
- exm-improve
paths:
- 'packages/api-utils/**'
- 'packages/api-plugin-template.erxes/**'
Expand All @@ -17,7 +16,6 @@ on:
- dev
- staging
- build-test
- exm-improve
paths:
- 'packages/api-utils/**'
- 'packages/api-plugin-template.erxes/**'
Expand Down Expand Up @@ -60,9 +58,9 @@ jobs:
cd dist/main/.erxes/src
- name: Build docker image
if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/exm-improve' )
if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test' )
run: |
cd dist/plugin-chats-api/.erxes
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
docker build -t erxes/plugin-chats-api:dev -f Dockerfile .
docker push erxes/plugin-chats-api:dev
docker build -t erxes/plugin-chats-api:${GITHUB_REF#refs/heads/} -f Dockerfile .
docker push erxes/plugin-chats-api:${GITHUB_REF#refs/heads/}
2 changes: 1 addition & 1 deletion .github/workflows/plugin-ebarimt-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
yarn build
- name: Configure AWS credentials
if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test' )
if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test')
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/plugin-timeclock-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ jobs:
run: |
cd dist/plugin-timeclock-api/.erxes
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
docker build -t erxes/plugin-timeclock-api:community -f Dockerfile .
docker push erxes/plugin-timeclock-api:community
docker build -t erxes/plugin-timeclock-api:${GITHUB_REF#refs/heads/} -f Dockerfile .
docker push erxes/plugin-timeclock-api:${GITHUB_REF#refs/heads/}
2 changes: 1 addition & 1 deletion .github/workflows/plugin-timeclock-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ jobs:
tar -cf build.tar --directory=packages/plugin-timeclock-ui/.erxes/dist .
cp build.tar packages/plugin-timeclock-ui/.erxes/dist
rm -rf packages/plugin-timeclock-ui/.erxes/dist/*.js
aws s3 sync packages/plugin-timeclock-ui/.erxes/dist s3://erxes-community-plugins/uis/plugin-timeclock-ui --delete
aws s3 sync packages/plugin-timeclock-ui/.erxes/dist s3://erxes-${GITHUB_REF#refs/heads/}-plugins/uis/plugin-timeclock-ui --delete
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
import {
BarItems,
Button,
DataWithLoader,
FormControl,
ModalTrigger,
Pagination,
Table,
Wrapper,
__,
router
} from '@erxes/ui/src';
import { BranchesMainQueryResponse, IBranch } from '@erxes/ui/src/team/types';
import { FilterContainer, InputBar } from '@erxes/ui-settings/src/styles';
import { __, router } from '@erxes/ui/src/utils';

import ActionButtons from '@erxes/ui/src/components/ActionButtons';
import { BarItems } from 'modules/layout/styles';
import Button from 'modules/common/components/Button';
import DataWithLoader from 'modules/common/components/DataWithLoader';
import Form from '../../containers/common/BlockForm';
import FormControl from 'modules/common/components/form/Control';
import Icon from '@erxes/ui/src/components/Icon';
import ModalTrigger from 'modules/common/components/ModalTrigger';
import Pagination from 'modules/common/components/pagination/Pagination';
import React from 'react';
import SettingsSideBar from '../../containers/common/SettingSideBar';
import Table from 'modules/common/components/table';
import Tip from '@erxes/ui/src/components/Tip';
import Wrapper from 'modules/layout/components/Wrapper';
import { generatePaginationParams } from '@erxes/ui/src/utils/router';
import { generateTree } from '../../utils';
import { gql } from '@apollo/client';
Expand Down Expand Up @@ -79,6 +77,7 @@ class MainList extends React.Component<Props, State> {
const content = ({ closeModal }) => (
<Form
closeModal={closeModal}
queryType="branches"
additionalRefetchQueries={this.refetchQueries()}
/>
);
Expand Down Expand Up @@ -113,14 +112,19 @@ class MainList extends React.Component<Props, State> {
};

return (
<FormControl
type="text"
placeholder={__('Type to search')}
onChange={search}
value={this.state.searchValue}
autoFocus={true}
onFocus={moveCursorAtTheEnd}
/>
<FilterContainer marginRight={true}>
<InputBar type="searchBar">
<Icon icon="search-1" size={20} />
<FormControl
type="text"
placeholder={__('Type to search')}
onChange={search}
value={this.state.searchValue}
autoFocus={true}
onFocus={moveCursorAtTheEnd}
/>
</InputBar>
</FilterContainer>
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
import {
BarItems,
Button,
DataWithLoader,
FormControl,
ModalTrigger,
Pagination,
Table,
Wrapper,
__,
generateTree,
router
} from '@erxes/ui/src';
import {
DepartmentsMainQueryResponse,
IDepartment
} from '@erxes/ui/src/team/types';
import { FilterContainer, InputBar } from '@erxes/ui-settings/src/styles';
import { __, router } from '@erxes/ui/src/utils';

import ActionButtons from '@erxes/ui/src/components/ActionButtons';
import { BarItems } from 'modules/layout/styles';
import Button from 'modules/common/components/Button';
import DataWithLoader from 'modules/common/components/DataWithLoader';
import Form from '../../containers/common/BlockForm';
import FormControl from 'modules/common/components/form/Control';
import Icon from '@erxes/ui/src/components/Icon';
import ModalTrigger from 'modules/common/components/ModalTrigger';
import Pagination from 'modules/common/components/pagination/Pagination';
import React from 'react';
import SettingsSideBar from '../../containers/common/SettingSideBar';
import Table from 'modules/common/components/table';
import Tip from '@erxes/ui/src/components/Tip';
import Wrapper from 'modules/layout/components/Wrapper';
import { generatePaginationParams } from '@erxes/ui/src/utils/router';
import { generateTree } from '../../utils';
import { gql } from '@apollo/client';
import { queries } from '@erxes/ui/src/team/graphql';

Expand Down Expand Up @@ -81,6 +79,7 @@ class MainList extends React.Component<Props, State> {
const content = ({ closeModal }) => (
<Form
closeModal={closeModal}
queryType="departments"
additionalRefetchQueries={this.refetchQueries()}
/>
);
Expand Down Expand Up @@ -119,14 +118,19 @@ class MainList extends React.Component<Props, State> {
};

return (
<FormControl
type="text"
placeholder={__('Type to search')}
onChange={search}
value={this.state.searchValue}
autoFocus={true}
onFocus={moveCursorAtTheEnd}
/>
<FilterContainer marginRight={true}>
<InputBar type="searchBar">
<Icon icon="search-1" size={20} />
<FormControl
type="text"
placeholder={__('Type to search')}
onChange={search}
value={this.state.searchValue}
autoFocus={true}
onFocus={moveCursorAtTheEnd}
/>
</InputBar>
</FilterContainer>
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
import {
BarItems,
Button,
DataWithLoader,
FormControl,
ModalTrigger,
Pagination,
Table,
Wrapper,
__,
router
} from '@erxes/ui/src';
import { FilterContainer, InputBar } from '@erxes/ui-settings/src/styles';
import { IUnit, UnitsMainQueryResponse } from '@erxes/ui/src/team/types';
import { __, router } from '@erxes/ui/src/utils';

import ActionButtons from '@erxes/ui/src/components/ActionButtons';
import { BarItems } from 'modules/layout/styles';
import Button from 'modules/common/components/Button';
import DataWithLoader from 'modules/common/components/DataWithLoader';
import Form from '../../containers/common/BlockForm';
import FormControl from 'modules/common/components/form/Control';
import Icon from '@erxes/ui/src/components/Icon';
import ModalTrigger from 'modules/common/components/ModalTrigger';
import Pagination from 'modules/common/components/pagination/Pagination';
import React from 'react';
import SettingsSideBar from '../../containers/common/SettingSideBar';
import Table from 'modules/common/components/table';
import Tip from '@erxes/ui/src/components/Tip';
import Wrapper from 'modules/layout/components/Wrapper';

type Props = {
listQuery: UnitsMainQueryResponse;
Expand Down Expand Up @@ -59,7 +57,9 @@ class MainList extends React.Component<Props, State> {
</Button>
);

const content = ({ closeModal }) => <Form closeModal={closeModal} />;
const content = ({ closeModal }) => (
<Form queryType="units" closeModal={closeModal} />
);

return (
<ModalTrigger title="Add Unit" content={content} trigger={trigger} />
Expand Down Expand Up @@ -91,14 +91,19 @@ class MainList extends React.Component<Props, State> {
};

return (
<FormControl
type="text"
placeholder={__('Type to search')}
onChange={search}
value={this.state.searchValue}
autoFocus={true}
onFocus={moveCursorAtTheEnd}
/>
<FilterContainer marginRight={true}>
<InputBar type="searchBar">
<Icon icon="search-1" size={20} />
<FormControl
type="text"
placeholder={__('Type to search')}
onChange={search}
value={this.state.searchValue}
autoFocus={true}
onFocus={moveCursorAtTheEnd}
/>
</InputBar>
</FilterContainer>
);
}

Expand Down
32 changes: 21 additions & 11 deletions packages/erxes-ui/src/components/filterableList/FilterableList.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
import React from 'react';
import { Link } from 'react-router-dom';
import EmptyState from '../EmptyState';
import Icon from '../Icon';
import Spinner from '../Spinner';
import Filter from './Filter';
import {
AvatarImg,
ChildList,
FlexRow,
IconWrapper,
ItemText,
PopoverBody,
PopoverFooter,
PopoverHeader,
PopoverList,
ChildList,
ToggleIcon,
ItemText
ToggleIcon
} from './styles';

import EmptyState from '../EmptyState';
import Filter from './Filter';
import Icon from '../Icon';
import { Link } from 'react-router-dom';
import React from 'react';
import { SidebarList } from '../../layout/styles';
import Spinner from '../Spinner';

type Props = {
items?: any[];
Expand All @@ -28,7 +29,7 @@ type Props = {
treeView?: boolean;
isIndented?: boolean;
singleSelect?: boolean;

renderLoadMore?: any;
// hooks
onClick?: (items: any[], id: string) => void;
onSearch?: (e: React.FormEvent<HTMLElement>) => void;
Expand Down Expand Up @@ -83,6 +84,7 @@ class FilterableList extends React.Component<Props, State> {
if (this.props.singleSelect) {
items.map(i => {
if (i._id === id) {
// tslint:disable-next-line:no-unused-expression
i.selectedBy === 'all' ? 'none' : 'all';
} else {
i.selectedBy = 'none';
Expand Down Expand Up @@ -240,7 +242,14 @@ class FilterableList extends React.Component<Props, State> {
}

render() {
const { className, onSearch, selectable, links, isIndented } = this.props;
const {
className,
onSearch,
selectable,
links,
isIndented,
renderLoadMore
} = this.props;

return (
<div className={className}>
Expand All @@ -253,6 +262,7 @@ class FilterableList extends React.Component<Props, State> {
{this.renderItems()}
</PopoverList>
</PopoverBody>
{renderLoadMore && renderLoadMore()}
{links && (
<PopoverFooter>
<PopoverList>
Expand Down
9 changes: 3 additions & 6 deletions packages/erxes-ui/src/components/table/styles.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { FormLabel, Input } from '../form/styles';
import { colors, dimensions, typography } from '../../styles';
import styled, { css } from 'styled-components';

import styledTS from 'styled-components-ts';
import { colors, dimensions, typography } from '../../styles';
import { FormLabel, Input } from '../form/styles';

const tableHoverColor = '#f5f5f5';

Expand Down Expand Up @@ -106,10 +107,6 @@ const StyledTable = styledTS<{
props.wideHeader
? `${dimensions.unitSpacing + 2}px`
: `${dimensions.unitSpacing - 2}`} ${dimensions.coreSpacing - 2}px;
&:last-child {
padding-right: ${dimensions.coreSpacing}px;
}
}
}
`};
Expand Down
1 change: 1 addition & 0 deletions packages/erxes-ui/src/layout/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ const HeaderItems = styledTS<{
align-self: center;
flex: ${props => props.hasFlex && 1};
margin-left: ${props => props.rightAligned && 'auto'};
flex-shrink: ${props => props.rightAligned && '0'};
> * + * {
margin-left: ${dimensions.unitSpacing}px;
}
Expand Down
Loading

0 comments on commit b8c7ae4

Please sign in to comment.