People.Client: Article: applied real custom names
This commit is contained in:
parent
b660f92c36
commit
bfc06bb1f3
@ -7,7 +7,6 @@ import {
|
||||
Icons
|
||||
} from "asc-web-components";
|
||||
import { selectGroup } from '../../../store/people/actions';
|
||||
import { departments } from './../../../helpers/customNames';
|
||||
|
||||
const getItems = data => {
|
||||
return data.map(item => {
|
||||
@ -109,7 +108,7 @@ class ArticleBodyContent extends React.Component {
|
||||
};
|
||||
};
|
||||
|
||||
const getTreeGroups = (groups) => {
|
||||
const getTreeGroups = (groups, departments) => {
|
||||
const treeData = [
|
||||
{
|
||||
key: "root",
|
||||
@ -128,7 +127,7 @@ const getTreeGroups = (groups) => {
|
||||
|
||||
function mapStateToProps(state) {
|
||||
return {
|
||||
data: getTreeGroups(state.people.groups),
|
||||
data: getTreeGroups(state.people.groups, state.auth.settings.customNames.groupsCaption),
|
||||
selectedKeys: state.people.selectedGroup ? [state.people.selectedGroup] : ["root"]
|
||||
};
|
||||
}
|
||||
|
@ -10,7 +10,6 @@ import {
|
||||
import { InviteDialog } from './../../dialogs';
|
||||
import { withTranslation, I18nextProvider } from 'react-i18next';
|
||||
import i18n from '../i18n';
|
||||
import { typeUser, typeGuest, department } from './../../../helpers/customNames';
|
||||
import { store, utils } from 'asc-web-common';
|
||||
const { changeLanguage } = utils;
|
||||
const { isAdmin } = store.auth.selectors;
|
||||
@ -51,6 +50,7 @@ class PureArticleMainButtonContent extends React.Component {
|
||||
render() {
|
||||
console.log("People ArticleMainButtonContent render");
|
||||
const { isAdmin, settings, t } = this.props;
|
||||
const { userCaption, guestCaption, groupCaption } = settings.customNames;
|
||||
const { dialogVisible } = this.state;
|
||||
return (
|
||||
isAdmin ?
|
||||
@ -62,17 +62,17 @@ class PureArticleMainButtonContent extends React.Component {
|
||||
>
|
||||
<DropDownItem
|
||||
icon="CatalogEmployeeIcon"
|
||||
label={t('CustomNewEmployee', { typeUser })}
|
||||
label={t('CustomNewEmployee', { userCaption })}
|
||||
onClick={this.goToEmployeeCreate}
|
||||
/>
|
||||
<DropDownItem
|
||||
icon="CatalogGuestIcon"
|
||||
label={t('CustomNewGuest', { typeGuest })}
|
||||
label={t('CustomNewGuest', { guestCaption })}
|
||||
onClick={this.goToGuestCreate}
|
||||
/>
|
||||
<DropDownItem
|
||||
icon="CatalogDepartmentsIcon"
|
||||
label={t('CustomNewDepartment', { department })}
|
||||
label={t('CustomNewDepartment', { groupCaption })}
|
||||
onClick={this.goToGroupCreate}
|
||||
/>
|
||||
<DropDownItem isSeparator />
|
||||
|
@ -3,7 +3,7 @@
|
||||
"ImportPeople": "Import people",
|
||||
"Actions": "Actions",
|
||||
"LblInviteAgain": "Invite again",
|
||||
"CustomNewEmployee": "New {{typeUser, lowercase}}",
|
||||
"CustomNewGuest": "New {{typeGuest, lowercase}}",
|
||||
"CustomNewDepartment": "New {{department, lowercase}}"
|
||||
"CustomNewEmployee": "New {{userCaption, lowercase}}",
|
||||
"CustomNewGuest": "New {{guestCaption, lowercase}}",
|
||||
"CustomNewDepartment": "New {{groupCaption, lowercase}}"
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
"ImportPeople": "Импортировать людей",
|
||||
"Actions": "Действия",
|
||||
"LblInviteAgain": "Отправить приглашение ещё раз",
|
||||
"CustomNewEmployee": "Новый {{typeUser, lowercase}}",
|
||||
"CustomNewGuest": "Новый {{typeGuest, lowercase}}",
|
||||
"CustomNewDepartment": "Новый {{department, lowercase}}"
|
||||
"CustomNewEmployee": "Новый {{userCaption, lowercase}}",
|
||||
"CustomNewGuest": "Новый {{guestCaption, lowercase}}",
|
||||
"CustomNewDepartment": "Новый {{groupCaption, lowercase}}"
|
||||
}
|
Loading…
Reference in New Issue
Block a user