From e687b654c02b04a4dd1ea1755a3987e5528fa8aa Mon Sep 17 00:00:00 2001 From: Akansha Sakhre Date: Tue, 26 Nov 2024 16:28:34 +0530 Subject: [PATCH] changed help info --- src/common/HelpData.tsx | 10 ++++++++++ src/containers/Template/List/Template.tsx | 20 +++---------------- .../Template/Template.test.helper.ts | 7 +++---- 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/src/common/HelpData.tsx b/src/common/HelpData.tsx index c6a90a4d8..d1414e58a 100644 --- a/src/common/HelpData.tsx +++ b/src/common/HelpData.tsx @@ -106,3 +106,13 @@ export const assistantsInfo: HelpDataProps = { 'Assistants can call OpenAI’s models with specific instructions to tune their personality and capabilities. Assistants can access multiple tools in parallel. Assistants can access files in several formats as part of their creation. When using tools, Assistants can also create files (e.g., images, spreadsheets, etc) and cite files they reference in the Messages they create.', link: 'https://glific.github.io/docs/docs/Integrations/RAG%20using%20OpenAI%20file%20search%20assistant', // Replace with the actual Glific documentation link }; + +export const failedTemplateInfo: HelpDataProps = { + heading: "The template has failed the review process at Gupshup's end.", +}; + +export const rejectedTemplateInfo: HelpDataProps = { + heading: + 'The template has failed to be reviewed due to violations of the approval criteria. This status requires revising and resubmitting the template.', + link: 'https://docs.gupshup.io/docs/message-template-approvals-statuses#rejection--revision', +}; diff --git a/src/containers/Template/List/Template.tsx b/src/containers/Template/List/Template.tsx index 6c9a29887..12b3ab031 100644 --- a/src/containers/Template/List/Template.tsx +++ b/src/containers/Template/List/Template.tsx @@ -27,7 +27,7 @@ import HelpIcon from 'components/UI/HelpIcon/HelpIcon'; import { Loading } from 'components/UI/Layout/Loading/Loading'; import { setNotification } from 'common/notification'; import { BULK_APPLY_SAMPLE_LINK } from 'config'; -import { speedSendInfo, templateInfo } from 'common/HelpData'; +import { failedTemplateInfo, rejectedTemplateInfo, speedSendInfo, templateInfo } from 'common/HelpData'; import styles from './Template.module.css'; import { RaiseToGupShup } from './RaiseToGupshupDialog/RaiseToGupShup'; @@ -60,10 +60,6 @@ const getCategory = (category: string) => { return

{capitalizeFirstLetter(categoryName)}

; }; -const failedInfo = "The template has failed the review process at Gupshup's end."; -const rejectedInfo = - 'The template has failed to be reviewed due to violations of the approval criteria. This status requires revising and resubmitting the template.'; - export interface TemplateProps { title: string; listItem: string; @@ -168,12 +164,7 @@ export const Template = ({ {t('Rejected')} - + ); break; @@ -185,12 +176,7 @@ export const Template = ({ {t('Failed')} - + ); break; diff --git a/src/containers/Template/Template.test.helper.ts b/src/containers/Template/Template.test.helper.ts index a15f64440..d310131cb 100644 --- a/src/containers/Template/Template.test.helper.ts +++ b/src/containers/Template/Template.test.helper.ts @@ -327,8 +327,7 @@ const createHsmWithButtontemplate = { isHsm: true, languageId: '1', hasButtons: true, - buttons: - '[{"type":"QUICK_REPLY","text":"Quick reply 1"},{"type":"QUICK_REPLY","text":"Quick reply 2"}]', + buttons: '[{"type":"QUICK_REPLY","text":"Quick reply 1"},{"type":"QUICK_REPLY","text":"Quick reply 2"}]', buttonType: 'QUICK_REPLY', translations: '{}', allowTemplateCategoryChange: false, @@ -354,8 +353,7 @@ const createHsmWithButtontemplate = { category: 'ACCOUNT_UPDATE', example: 'Hi [Glific], How are you', hasButtons: true, - buttons: - '[{"type":"QUICK_REPLY","text":"Quick reply 1"},{"type":"QUICK_REPLY","text":"Quick reply 2"}]', + buttons: '[{"type":"QUICK_REPLY","text":"Quick reply 1"},{"type":"QUICK_REPLY","text":"Quick reply 2"}]', buttonType: 'QUICK_REPLY', allowTemplateCategoryChange: false, }, @@ -829,6 +827,7 @@ export const HSM_LIST = [ getHSMTemplate('1', 'APPROVED', 'UNKNOWN'), getHSMTemplate('2', 'PENDING'), getHSMTemplate('3', 'REJECTED'), + getHSMTemplate('4', 'FAILED'), ], }, },