Regression: Contact Chat History component not visible (#21316)

* Display Contact Chat History component

* Fix contact-history redirect not working

* Hide Contact history button within Omnichannel Contact directory

Co-authored-by: Renato Becker <renato.augusto.becker@gmail.com>
pull/21285/head
Murtaza Patrawala 4 years ago committed by GitHub
parent cbef094738
commit 60c341fc7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      app/livechat/client/tabBar.ts
  2. 2
      app/ui/client/views/app/room.js
  3. 4
      client/omnichannel/directory/contacts/contextualBar/ContactInfo.js

@ -10,3 +10,12 @@ addAction('room-info', {
template: lazy(() => import('../../../client/omnichannel/directory/chats/contextualBar')),
order: 0,
});
addAction('contact-chat-history', {
groups: ['live'],
id: 'contact-chat-history',
title: 'Contact_Chat_History',
icon: 'clock',
template: 'contactChatHistory',
order: 11,
});

@ -890,7 +890,7 @@ Meteor.startup(() => {
let room = Rooms.findOne({ _id: rid }, { fields: { t: 1 } });
if (room?.t === 'l') {
if (room?.t === 'l' && !FlowRouter.getParam('tab')) {
room = Tracker.nonreactive(() => Rooms.findOne({ _id: rid }));
roomTypes.getConfig(room.t).openCustomProfileTab(this, room, room.v.username);
}

@ -87,6 +87,8 @@ export function ContactInfo({ id }) {
FlowRouter.go(`/live/${ _id }/contact-chat-history`);
};
const showContactHistory = FlowRouter.getRouteName() === 'live';
const displayName = name || username;
return <>
@ -130,7 +132,7 @@ export function ContactInfo({ id }) {
</VerticalBar.ScrollableContent>
<VerticalBar.Footer>
<ButtonGroup stretch>
{ lastChat && <Button onClick={onChatHistory}><Icon name='history' size='x20'/> {t('Chat_History')}</Button>}
{ showContactHistory && lastChat && <Button onClick={onChatHistory}><Icon name='history' size='x20'/> {t('Chat_History')}</Button>}
<Button onClick={onEditButtonClick}><Icon name='pencil' size='x20'/> {t('Edit')}</Button>
</ButtonGroup>
</VerticalBar.Footer>

Loading…
Cancel
Save