People.Client: Home: applied real custom names
This commit is contained in:
parent
68a6e7261a
commit
48218df13b
@ -5,11 +5,6 @@ import { fetchPeople } from "../../../../../store/people/actions";
|
||||
import find from "lodash/find";
|
||||
import result from "lodash/result";
|
||||
import { withTranslation } from "react-i18next";
|
||||
import {
|
||||
typeGuest,
|
||||
typeUser,
|
||||
department
|
||||
} from "./../../../../../helpers/customNames";
|
||||
import { withRouter } from "react-router";
|
||||
import { getFilterByLocation } from "../../../../../helpers/converters";
|
||||
import { store } from 'asc-web-common';
|
||||
@ -98,7 +93,8 @@ class SectionFilterContent extends React.Component {
|
||||
};
|
||||
|
||||
getData = () => {
|
||||
const { user, groups, t } = this.props;
|
||||
const { user, groups, t, settings } = this.props;
|
||||
const { guestCaption, userCaption, groupCaption } = settings.customNames;
|
||||
|
||||
const options = !isAdmin(user)
|
||||
? []
|
||||
@ -158,12 +154,12 @@ class SectionFilterContent extends React.Component {
|
||||
{
|
||||
key: "user",
|
||||
group: "filter-type",
|
||||
label: t("CustomTypeUser", { typeUser })
|
||||
label: t("CustomTypeUser", { userCaption })
|
||||
},
|
||||
{
|
||||
key: "guest",
|
||||
group: "filter-type",
|
||||
label: t("CustomTypeGuest", { typeGuest })
|
||||
label: t("CustomTypeGuest", { guestCaption })
|
||||
},
|
||||
{
|
||||
key: "filter-other",
|
||||
@ -175,7 +171,7 @@ class SectionFilterContent extends React.Component {
|
||||
key: "filter-type-group",
|
||||
group: "filter-other",
|
||||
subgroup: "filter-group",
|
||||
label: t("CustomDepartment", { department }),
|
||||
label: groupCaption,
|
||||
defaultSelectLabel: t("DefaultSelectLabel")
|
||||
},
|
||||
...groupOptions
|
||||
|
@ -19,11 +19,6 @@ import {
|
||||
updateUserType,
|
||||
fetchPeople
|
||||
} from "../../../../../store/people/actions";
|
||||
import {
|
||||
typeUser,
|
||||
typeGuest,
|
||||
department
|
||||
} from "../../../../../helpers/../helpers/customNames";
|
||||
import { deleteGroup } from "../../../../../store/group/actions";
|
||||
import { store, api, constants } from 'asc-web-common';
|
||||
import { InviteDialog } from '../../../../dialogs';
|
||||
@ -133,12 +128,12 @@ const SectionHeaderContent = props => {
|
||||
onSelect: item => onSelect(item.key)
|
||||
},
|
||||
{
|
||||
label: t("CustomMakeUser", { typeUser }),
|
||||
label: t("CustomMakeUser", { userCaption: settings.customNames.userCaption }),
|
||||
disabled: !selection.length,
|
||||
onClick: onSetEmployee
|
||||
},
|
||||
{
|
||||
label: t("CustomMakeGuest", { typeGuest }),
|
||||
label: t("CustomMakeGuest", { guestCaption: settings.customNames.guestCaption }),
|
||||
disabled: !selection.length,
|
||||
onClick: onSetGuest
|
||||
},
|
||||
@ -212,20 +207,21 @@ const SectionHeaderContent = props => {
|
||||
);
|
||||
|
||||
const getContextOptionsPlus = useCallback(() => {
|
||||
const { guestCaption, userCaption, groupCaption } = settings.customNames;
|
||||
return [
|
||||
{
|
||||
key: "new-employee",
|
||||
label: t("CustomNewEmployee", { typeUser }),
|
||||
label: t("CustomNewEmployee", { userCaption }),
|
||||
onClick: goToEmployeeCreate
|
||||
},
|
||||
{
|
||||
key: "new-guest",
|
||||
label: t("CustomNewGuest", { typeGuest }),
|
||||
label: t("CustomNewGuest", { guestCaption }),
|
||||
onClick: goToGuestCreate
|
||||
},
|
||||
{
|
||||
key: "new-group",
|
||||
label: t("CustomNewDepartment", { department }),
|
||||
label: t("CustomNewDepartment", { groupCaption }),
|
||||
onClick: goToGroupCreate
|
||||
},
|
||||
{ key: 'separator', isSeparator: true },
|
||||
@ -240,7 +236,7 @@ const SectionHeaderContent = props => {
|
||||
onClick: onSentInviteAgain
|
||||
} */
|
||||
];
|
||||
}, [t, goToEmployeeCreate, goToGuestCreate, goToGroupCreate, onInvitationDialogClick/* , onSentInviteAgain */]);
|
||||
}, [settings, t, goToEmployeeCreate, goToGuestCreate, goToGroupCreate, onInvitationDialogClick/* , onSentInviteAgain */]);
|
||||
|
||||
return (
|
||||
<StyledContainer>
|
||||
@ -278,7 +274,7 @@ const SectionHeaderContent = props => {
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Headline className='headline-header' truncate={true} type="content">Departments</Headline>
|
||||
<Headline className='headline-header' truncate={true} type="content">{settings.customNames.groupsCaption}</Headline>
|
||||
{isAdmin && (
|
||||
<>
|
||||
<ContextMenuButton
|
||||
|
@ -42,11 +42,10 @@
|
||||
"MessageEmailActivationInstuctionsSentOnEmail": "The email activation instructions have been sent to the <1>{{email}}</1> email address",
|
||||
|
||||
"CustomHeadOfDepartment": " {{headOfDepartment}}",
|
||||
"CustomTypeGuest": "{{typeGuest}}",
|
||||
"CustomTypeUser": "{{typeUser}}",
|
||||
"CustomMakeUser": "Make {{typeUser, lowercase}}",
|
||||
"CustomMakeGuest": "Make {{typeGuest, lowercase}}",
|
||||
"CustomDepartment": "{{department}}",
|
||||
"CustomTypeGuest": "{{guestCaption}}",
|
||||
"CustomTypeUser": "{{userCaption}}",
|
||||
"CustomMakeUser": "Make {{userCaption, lowercase}}",
|
||||
"CustomMakeGuest": "Make {{guestCaption, lowercase}}",
|
||||
"CountPerPage": "{{count}} per page",
|
||||
"PageOfTotalPage": "{{page}} of {{totalPage}}",
|
||||
|
||||
@ -57,9 +56,9 @@
|
||||
|
||||
"FilterPlaceholder": "Search",
|
||||
|
||||
"CustomNewEmployee": "New {{typeUser, lowercase}}",
|
||||
"CustomNewGuest": "New {{typeGuest, lowercase}}",
|
||||
"CustomNewDepartment": "New {{department, lowercase}}",
|
||||
"CustomNewEmployee": "New {{userCaption, lowercase}}",
|
||||
"CustomNewGuest": "New {{guestCaption, lowercase}}",
|
||||
"CustomNewDepartment": "New {{groupCaption, lowercase}}",
|
||||
"MakeInvitationLink": "Make invitation link",
|
||||
"SendInvitationAgain": "Send invitation once"
|
||||
}
|
@ -36,17 +36,16 @@
|
||||
"LblInviteAgain": "Выслать прилашение ещё раз",
|
||||
"ByFirstNameSorting": "По имени",
|
||||
"ByLastNameSorting": "По фамилии",
|
||||
"LblInvited": "Invited",
|
||||
"LblInvited": "Приглашен",
|
||||
"LblSetActive": "Разблокировать",
|
||||
"LblSetDisabled": "Заблокировать",
|
||||
"MessageEmailActivationInstuctionsSentOnEmail": "Инструкции по активации электронной почты были отправлены на адрес <1>{{email}}</1>",
|
||||
|
||||
"CustomHeadOfDepartment": " {{headOfDepartment}}",
|
||||
"CustomTypeGuest": "{{typeGuest}}",
|
||||
"CustomTypeUser": "{{typeUser}}",
|
||||
"CustomMakeUser": "Сделать {{typeUser, lowercase}}",
|
||||
"CustomMakeGuest": "Сделать {{typeGuest, lowercase}}",
|
||||
"CustomDepartment": "{{department}}",
|
||||
"CustomTypeGuest": "{{guestCaption}}",
|
||||
"CustomTypeUser": "{{userCaption}}",
|
||||
"CustomMakeUser": "Сделать {{userCaption, lowercase}}",
|
||||
"CustomMakeGuest": "Сделать {{guestCaption, lowercase}}",
|
||||
"CountPerPage": "{{count}} на странице",
|
||||
"PageOfTotalPage": "{{page}} из {{totalPage}}",
|
||||
|
||||
@ -57,9 +56,9 @@
|
||||
|
||||
"FilterPlaceholder": "Поиск",
|
||||
|
||||
"CustomNewEmployee": "Новый {{typeUser, lowercase}}",
|
||||
"CustomNewGuest": "Новый {{typeGuest, lowercase}}",
|
||||
"CustomNewDepartment": "Новый {{department, lowercase}}",
|
||||
"CustomNewEmployee": "Новый {{userCaption, lowercase}}",
|
||||
"CustomNewGuest": "Новый {{guestCaption, lowercase}}",
|
||||
"CustomNewDepartment": "Новый {{groupCaption, lowercase}}",
|
||||
"MakeInvitationLink": "Создать пригласительную ссылку",
|
||||
"SendInvitationAgain": "Отправить приглашение ещё раз"
|
||||
}
|
Loading…
Reference in New Issue
Block a user