Skip to content

Commit

Permalink
Review
Browse files Browse the repository at this point in the history
  • Loading branch information
rique223 committed Jun 24, 2024
1 parent 0f521ab commit 80655f4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 34 deletions.
30 changes: 9 additions & 21 deletions apps/meteor/client/components/InfoPanel/index.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
import InfoPanel from './InfoPanel';
import InfoPanelAction from './InfoPanelAction';
import InfoPanelActionGroup from './InfoPanelActionGroup';
import InfoPanelAvatar from './InfoPanelAvatar';
import InfoPanelField from './InfoPanelField';
import InfoPanelLabel from './InfoPanelLabel';
import InfoPanelSection from './InfoPanelSection';
import InfoPanelText from './InfoPanelText';
import InfoPanelTitle from './InfoPanelTitle';

export {
InfoPanel,
InfoPanelTitle,
InfoPanelLabel,
InfoPanelText,
InfoPanelAvatar,
InfoPanelField,
InfoPanelAction,
InfoPanelSection,
InfoPanelActionGroup,
};
export { default as InfoPanel } from './InfoPanel';
export { default as InfoPanelAction } from './InfoPanelAction';
export { default as InfoPanelActionGroup } from './InfoPanelActionGroup';
export { default as InfoPanelAvatar } from './InfoPanelAvatar';
export { default as InfoPanelField } from './InfoPanelField';
export { default as InfoPanelLabel } from './InfoPanelLabel';
export { default as InfoPanelSection } from './InfoPanelSection';
export { default as InfoPanelText } from './InfoPanelText';
export { default as InfoPanelTitle } from './InfoPanelTitle';
11 changes: 4 additions & 7 deletions apps/meteor/client/components/UserInfo/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { InfoPanelLabel, InfoPanelText } from '../InfoPanel';
import UserInfo from './UserInfo';
import UserInfoAction from './UserInfoAction';
import UserInfoAvatar from './UserInfoAvatar';
import UserInfoUsername from './UserInfoUsername';

export { UserInfo, UserInfoAction, UserInfoAvatar, InfoPanelText as UserInfoText, InfoPanelLabel as UserInfoLabel, UserInfoUsername };
export { default as UserInfo } from './UserInfo';
export { default as UserInfoAction } from './UserInfoAction';
export { default as UserInfoAvatar } from './UserInfoAvatar';
export { default as UserInfoUsername } from './UserInfoUsername';
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useTranslation } from '@rocket.chat/ui-contexts';
import React from 'react';

import { UserInfoLabel, UserInfoText } from '../../components/UserInfo';
import { InfoPanelLabel, InfoPanelText } from '../../components/InfoPanel';
import { useHasLicenseModule } from '../../hooks/useHasLicenseModule';

const MaxChatsPerAgentDisplay = ({ maxNumberSimultaneousChat = 0 }) => {
Expand All @@ -14,8 +14,8 @@ const MaxChatsPerAgentDisplay = ({ maxNumberSimultaneousChat = 0 }) => {

return (
<>
<UserInfoLabel>{t('Max_number_of_chats_per_agent')}</UserInfoLabel>
<UserInfoText>{maxNumberSimultaneousChat}</UserInfoText>
<InfoPanelLabel>{t('Max_number_of_chats_per_agent')}</InfoPanelLabel>
<InfoPanelText>{maxNumberSimultaneousChat}</InfoPanelText>
</>
);
};
Expand Down
7 changes: 4 additions & 3 deletions apps/meteor/client/views/omnichannel/agents/AgentInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import {
ContextualbarHeader,
ContextualbarScrollableContent,
} from '../../../components/Contextualbar';
import { UserInfoAvatar, UserInfoLabel, UserInfoText, UserInfoUsername } from '../../../components/UserInfo';
import { InfoPanelLabel, InfoPanelText } from '../../../components/InfoPanel';
import { UserInfoAvatar, UserInfoUsername } from '../../../components/UserInfo';
import { UserStatus } from '../../../components/UserStatus';
import { MaxChatsPerAgentDisplay } from '../additionalForms';
import AgentInfoAction from './AgentInfoAction';
Expand Down Expand Up @@ -69,8 +70,8 @@ const AgentInfo = ({ uid }: AgentInfoProps) => {
</Box>
{statusLivechat && (
<>
<UserInfoLabel data-qa='AgentInfoUserInfoLabel'>{t('Livechat_status')}</UserInfoLabel>
<UserInfoText>{t(statusLivechat === 'available' ? 'Available' : 'Not_Available')}</UserInfoText>
<InfoPanelLabel data-qa='AgentInfoUserInfoLabel'>{t('Livechat_status')}</InfoPanelLabel>
<InfoPanelText>{t(statusLivechat === 'available' ? 'Available' : 'Not_Available')}</InfoPanelText>
</>
)}
{MaxChatsPerAgentDisplay && <MaxChatsPerAgentDisplay maxNumberSimultaneousChat={data.user.livechat?.maxNumberSimultaneousChat} />}
Expand Down

0 comments on commit 80655f4

Please sign in to comment.