Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KevLehman committed Jul 18, 2024
1 parent fde2cf6 commit 8b802f3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const CloseChatModal = ({
} = useForm();

const commentRequired = useSetting('Livechat_request_comment_when_closing_conversation') as boolean;
const customSubject = useSetting<string>('Livechat_transcript_email_subject');
const [tagRequired, setTagRequired] = useState(false);

const tags = watch('tags');
Expand Down Expand Up @@ -132,9 +133,9 @@ const CloseChatModal = ({
dispatchToastMessage({ type: 'error', message: t('Customer_without_registered_email') });
return;
}
setValue('subject', subject || t('Transcript_of_your_livechat_conversation'));
setValue('subject', subject || customSubject || t('Transcript_of_your_livechat_conversation'));
}
}, [transcriptEmail, setValue, visitorEmail, subject, t]);
}, [transcriptEmail, setValue, visitorEmail, subject, t, customSubject]);

if (commentRequired || tagRequired || canSendTranscript) {
return (
Expand Down
18 changes: 9 additions & 9 deletions apps/meteor/server/settings/omnichannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { settingsRegistry } from '../../app/settings/server';
const omnichannelEnabledQuery = { _id: 'Livechat_enabled', value: true };

export const createOmniSettings = () =>
settingsRegistry.addGroup('Omnichannel', async function () {
settingsRegistry.addGroup('Omnichannel', async function() {
await this.add('Livechat_enabled', true, {
type: 'boolean',
group: 'Omnichannel',
Expand Down Expand Up @@ -376,8 +376,8 @@ export const createOmniSettings = () =>
enableQuery: omnichannelEnabledQuery,
});

await settingsRegistry.addGroup('Omnichannel', async function () {
await this.section('Business_Hours', async function () {
await settingsRegistry.addGroup('Omnichannel', async function() {
await this.section('Business_Hours', async function() {
await this.add('Livechat_enable_business_hours', false, {
type: 'boolean',
group: 'Omnichannel',
Expand Down Expand Up @@ -424,7 +424,7 @@ export const createOmniSettings = () =>
type: 'string',
group: 'Omnichannel',
public: true,
enableQuery: [{ _id: 'Livechat_enable_transcript', value: true }, omnichannelEnabledQuery],
enableQuery: omnichannelEnabledQuery,
});

await this.add('Omnichannel_enable_department_removal', false, {
Expand Down Expand Up @@ -640,7 +640,7 @@ export const createOmniSettings = () =>
enableQuery: omnichannelEnabledQuery,
});
});
await settingsRegistry.addGroup('SMS', async function () {
await settingsRegistry.addGroup('SMS', async function() {
await this.add('SMS_Enabled', false, {
type: 'boolean',
i18nLabel: 'Enabled',
Expand Down Expand Up @@ -669,7 +669,7 @@ await settingsRegistry.addGroup('SMS', async function () {
type: 'string',
});

await this.section('Twilio', async function () {
await this.section('Twilio', async function() {
await this.add('SMS_Twilio_Account_SID', '', {
type: 'string',
enableQuery: {
Expand Down Expand Up @@ -709,7 +709,7 @@ await settingsRegistry.addGroup('SMS', async function () {
});
});

await this.section('Voxtelesys', async function () {
await this.section('Voxtelesys', async function() {
await this.add('SMS_Voxtelesys_authToken', '', {
type: 'string',
enableQuery: {
Expand Down Expand Up @@ -749,7 +749,7 @@ await settingsRegistry.addGroup('SMS', async function () {
});
});

await this.section('Mobex', async function () {
await this.section('Mobex', async function() {
await this.add('SMS_Mobex_gateway_address', '', {
type: 'string',
enableQuery: {
Expand Down Expand Up @@ -803,7 +803,7 @@ await settingsRegistry.addGroup('SMS', async function () {
i18nDescription: 'Mobex_sms_gateway_from_numbers_list_desc',
});
});
await this.section('External Frame', async function () {
await this.section('External Frame', async function() {
await this.add('Omnichannel_External_Frame_Enabled', false, {
type: 'boolean',
public: true,
Expand Down

0 comments on commit 8b802f3

Please sign in to comment.